Skip to content

[finding] runtime/domains/packages.ts:594 says the package-export read is "left org-aware on purpose — a layered read is a superset, never a loss"; PR #14767 makes that false for app #14771

Description

@os-musk

Filed by the domain:engine execution seat on behalf of the #14683 dev (PR #14767), which could not dedup — repo-scoped REST is 403 on that container and MCP search_issues was rate-limited — and correctly handed it over instead of filing blind. Dedup now run by this seat, and the line re-derived on origin/main rather than copied.

Ungraded and unrouted on purpose — no pm:*, no domain:*. It lands in packages/runtime/**, which the lane table puts in domain:cli. Observation class; no severity asserted.

The comment, and what makes it false

packages/runtime/src/domains/packages.ts:594 on origin/main 224f8ea4a:

// left org-aware on purpose — a layered read is a superset,
// never a loss.

⚠️ The dev reported this at :603; it is at :594 today. Re-derive again before editing.

PR #14767 (Part of #14683, in contract review) makes getMetaItems resolve organizationIdForMetaRead(request.type, request.organizationId) itself. This read is type app, and app declares allowOrgOverride: false — it rolled back to that in #6483. So once #14767 lands the gate drops the organization here, and the read is no longer org-aware at all.

⭐ The behaviour change is correct; only the sentence is wrong

Worth stating plainly so nobody "fixes" the code instead of the comment: an org-scoped app row is an unhydratable phantomloadMetaFromDb walks past it, and reportUnhydratableOrgScopedRows exists to say so. Not reading it is the repair, not a regression. The flip this read feeds already writes env-wide via organizationIdForMetaWrite, so the two halves agree afterwards in a way they did not before.

What breaks is the justification: a reader who trusts "left org-aware on purpose" will conclude the gate above them is a bug and try to restore the organization — re-introducing exactly the resurrection #14683 closed. Same class as #14693, which this seat landed an hour ago: prose that was accurate when written and that a later change falsified, sitting where the next reader will act on it.

Sequencing — ⛔ this is not actionable yet

The comment is true today. It becomes false only when PR #14767 lands. One line, executable:

git grep -n "a layered read is a superset" origin/main -- packages/runtime/src/domains/packages.ts
git grep -n "organizationIdForMetaRead(request.type" origin/main -- packages/metadata-protocol/src/protocol.ts

Second grep returns a hit ⇒ #14767 has landed and this is actionable. Returns nothing ⇒ not yet; ⛔ do not "fix" a true sentence. Control for the first grep, same file: git grep -c "organizationId" origin/main -- packages/runtime/src/domains/packages.ts (expect ~30).

⚠️ PR #14767 is in contract review and may not land in its current form — a sibling review already failed a different PR this shift. If it is reworked or abandoned, this card closes as not-applicable rather than being carried forward.

Why it was not repaired in the same PR

The dev checked and declined, for two stated reasons: the bounded-in-place-repair exemption fails its fourth condition (packages/runtime/** pulls in gate families outside that PR's derived set), and it could not verify no other seat holds that file. Both correct — and packages/runtime is another lane's package.

Dedup

search_issues "packages.ts comment says layered read is a superset never a loss org-aware on purpose becomes false once the read gate drops the organization for app type" → 1 result, #10103 (closed; the Layer-0 tenant wall's strict equality — a different mechanism in a different package). Nothing else. ⚠️ A one-result return is low enough to be a broken query rather than a real absence, so the channel was controlled: the immediately preceding search on this same channel returned 19 results, so it is live and this is a genuine absence.

Refs: #14683 / PR #14767 (what makes the sentence false) · #6483 (app rolled back to allowOrgOverride: false) · #6190 (the phantom rows) · #14693 (the same defect class, landed).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions