Skip to content

Commit a634218

Browse files
committed
docs(rest): state the direction the read predicate rules on at the /published door
The `GET /meta/:type/:name/published` handler's comment argued that passing the RAW tenant "is right for a READ" because `getMetaItemLayered`'s overlay lookup is org-scoped-first then env-wide, so "nothing that resolves today stops resolving". That fail-open direction is precisely the reasoning `organizationIdForMetaRead` was written to refute: an org named on a type the registry does not declare per-org overridable resurrects the phantom rows #6190 stopped minting. Since #14907 the callee gates: `getMetaItemLayered` resolves `organizationIdForMetaRead` itself, AFTER its canonical fold. So the raw tenant is correct here for a different reason than the one stated, and this door must NOT pre-gate — `req.params.type` is unfolded, and gating on it is the #10340 defect. Because the old prose read as a deliberate, reasoned decision to gate, two successive enumerations in the same series recorded this door as already gating when it does not. The `#8805` half above is untouched and still true. Comment-only and line-count-neutral: 8 comment lines out, 8 in, no executable change, so the absolute-line anchors in `content/docs/permissions/system-context.mdx` cannot move. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YFY46JydE1gMxQG1TqBcMZ
1 parent d1c86a7 commit a634218

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

packages/rest/src/rest-server.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8205,14 +8205,14 @@ export class RestServer {
82058205
// inventing org RESOLUTION here, and this reads
82068206
// `tenantId` off the execution context `resolveExecCtx`
82078207
// already resolves, exactly as #8803 did for the audit
8208-
// read. The raw tenant is right for a READ (the write
8209-
// doors run it through `organizationIdForMetaWrite`
8210-
// instead): `getMetaItemLayered`'s overlay layer is
8211-
// org-scoped-first, THEN env-wide, so this is fail-open
8212-
// in the safe direction — an org-less caller reads
8213-
// exactly what it reads today, and an org-scoped caller
8214-
// still falls back to the env-wide row. Nothing that
8215-
// resolves today stops resolving.
8208+
// read. [#14907] The CALLEE gates: `getMetaItemLayered`
8209+
// resolves `organizationIdForMetaRead` AFTER its canonical
8210+
// fold, so the tenant goes over RAW. ⛔ Pre-gating HERE, on
8211+
// the unfolded `:type`, would be the #10340 defect. ⛔ And
8212+
// the old "fail-open in the safe direction" reading is the
8213+
// argument the predicate refutes: an org named on a type
8214+
// the registry does not declare overridable resurrects the
8215+
// phantoms #6190 stopped minting.
82168216
//
82178217
// Environment scoping still holds: it comes from WHICH
82188218
// protocol `resolveProtocol` hands back, not from the

0 commit comments

Comments
 (0)