Found while executing #15034 (PR #15619). ⛔ Not a defect in that PR — it is the second instance of the same class, and it is not mechanically fixable the way #15034's site was, which is why it is filed rather than folded in.
The claim
#15034's card states the diagnostics call-site comment is "the only artefact in the tree that still says it". Measured on origin/main at ba426b0f091, it is not. The falsified sentence lives at three sites:
packages/rest/src/rest-server.ts:4757 the ?type= diagnostics door <- #15034, repaired in PR #15619
packages/rest/src/rest-server.ts:5548 the /references door <- THIS CARD
packages/rest/src/rest-server-meta-read-org-scope.test.ts the harness header <- taken in scope by PR #15619
The second one reads, inside the [#13753] recorded-gap block on GET /meta/:type/:name/references:
one request-level organization is applied to a SET of types the target's own registry flag says nothing about, and getMetaItems applies no gate of its own.
#14683 put organizationIdForMetaRead(request.type, request.organizationId) inside getMetaItems, after the canonical fold (packages/metadata-protocol/src/protocol.ts:6958). The clause has been false since.
Why this is NOT the same one-line repair
⚠️ The clause is load-bearing for the recorded gap's own reasoning, not decoration. The comment argues the door must stay unrepaired because gating on the target answers a question about the wrong type, in two directions. Its first direction depends directly on the falsified clause:
target allowOrgOverride: true ⇒ the org is named for EVERY source type, object / flow / app included — the unconditional tenant the read predicate exists to prevent, unioning pre-#6190 phantom rows back into a destructive-action clearance
With the inner gate in place, findReferencesToMeta reads each source through getMetaItems({ type: matcher.fromType, ... }), and the gate folds each matcher.fromType separately. A non-overridable source type therefore resolves undefined and the phantom union does not happen. ⇒ the stated harm of direction 1 is gone. Direction 2 (a non-overridable target naming nothing, so an org-scoped view stays invisible and "Safe to delete." is still rendered) is untouched and still stands.
⇒ Correcting the sentence honestly means re-deriving whether the recorded gap still holds and on which of its two legs. That is a deliberate call on #13753's territory, not a comment edit, which is why #15034's bounded in-place rule does not reach it.
What is asked
- Correct the clause so it describes today's tree.
- State which of the two directions still justifies leaving the door unrepaired, now that direction 1's mechanism is closed one layer down.
Boundary
⛔ The reasoning here is about packages/rest's comment. Whether the /references door should now forward an organization at all is #13753's question and is deliberately left there.
Provenance
Measured on origin/main ba426b0f091 during PR #15619. Inner gates re-verified at protocol.ts:6958 (plural) and :7583 (singular overlay read).
Found while executing #15034 (PR #15619). ⛔ Not a defect in that PR — it is the second instance of the same class, and it is not mechanically fixable the way #15034's site was, which is why it is filed rather than folded in.
The claim
#15034's card states the diagnostics call-site comment is "the only artefact in the tree that still says it". Measured on
origin/mainatba426b0f091, it is not. The falsified sentence lives at three sites:The second one reads, inside the
[#13753]recorded-gap block onGET /meta/:type/:name/references:#14683 put
organizationIdForMetaRead(request.type, request.organizationId)insidegetMetaItems, after the canonical fold (packages/metadata-protocol/src/protocol.ts:6958). The clause has been false since.Why this is NOT the same one-line repair
With the inner gate in place,
findReferencesToMetareads each source throughgetMetaItems({ type: matcher.fromType, ... }), and the gate folds eachmatcher.fromTypeseparately. A non-overridable source type therefore resolvesundefinedand the phantom union does not happen. ⇒ the stated harm of direction 1 is gone. Direction 2 (a non-overridable target naming nothing, so an org-scopedviewstays invisible and "Safe to delete." is still rendered) is untouched and still stands.⇒ Correcting the sentence honestly means re-deriving whether the recorded gap still holds and on which of its two legs. That is a deliberate call on #13753's territory, not a comment edit, which is why #15034's bounded in-place rule does not reach it.
What is asked
Boundary
⛔ The reasoning here is about
packages/rest's comment. Whether the/referencesdoor should now forward an organization at all is #13753's question and is deliberately left there.Provenance
Measured on
origin/mainba426b0f091during PR #15619. Inner gates re-verified atprotocol.ts:6958(plural) and:7583(singular overlay read).