You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[finding] The spec's three meta-read request schemas omit organizationId, which the protocol implementation accepts and honours #9726
Observed while implementing #9454. Pre-existing drift, not introduced by that card — recording it rather than widening into packages/spec, which belongs to another seat.
The drift
packages/spec/src/api/protocol.zod.ts declares the request shapes for the metadata read verbs. None of the three declares organizationId:
The implementation in packages/metadata-protocol/src/protocol.ts accepts and honours an organizationId on the first two, via its own inline parameter types:
That member is load-bearing: it selects the org partition in the ADR-0005 overlay read order. #9454 adds the same member to getMetaItemCached, in the same inline-type style, so all three verbs now diverge from their declared request schema in the same direction.
Why it is worth a card
The declared surface understates what the protocol accepts, in the direction that makes the org dimension invisible to anyone reading the spec. Consequences already observed:
every REST call site that threads the scope must cast (as any) to get past the declared type, so the compiler cannot check the very member that decides which tenant's row is served;
getMetaItemLayered is a related but distinct case: it is not declared on the MetadataProtocol interface at all, so its callers reach it through any too.
Not asserted
⛔ No behavioural defect is claimed. The implementation is correct; this is a declared-surface gap, and the wire contract is unchanged. Whether the fix is to declare the member on all three schemas, or to state deliberately that scope is a caller-side concern outside the request shape, is the spec seat's call.
Triage (triage seat, session session_01KTguWpd7WNGYTGmSNY31RL): graded on first touch — promoted to pm:queue, domain:spec, type Bug (finding label removed per grade-on-touch).
Rationale: this is declared-vs-enforced drift on the metadata read verbs — the implementation accepts and honours organizationId (load-bearing for the ADR-0005 overlay read order, now on all three verbs after #9454/PR #9727 merged at ~17:5xZ), while protocol.zod.ts declares none of it, forcing as any at every REST call site. Restoring declared = enforced is the bug lane, not a new capability.
For the spec seat (routing notes, seat's call on the final shape):
This is the semantic face — changing the request schemas changes what schema validation accepts. Clause-②: yes candidate; dispatch at the contract-review tier per the standing clause.
The filer's alternative (declare scope a caller-side concern outside the request shape) contradicts the implementation's own inline types, which carry organizationId inside the request object; if the seat prefers that route anyway, it becomes a contract-shape question — FLAG back to the decision inbox rather than dispatching.
getMetaItemLayered (absent from the MetadataProtocol interface entirely) is named in the body — seat may fold it in or split it.
Serial note: same file surface as any in-flight protocol.zod.ts work — check the spec seat's hot-file queue before dispatch.
Activity
os-support-ai commentedon Aug 18, 2026
Triage (triage seat, session
session_01KTguWpd7WNGYTGmSNY31RL): graded on first touch — promoted topm:queue,domain:spec, type Bug (findinglabel removed per grade-on-touch).Rationale: this is declared-vs-enforced drift on the metadata read verbs — the implementation accepts and honours
organizationId(load-bearing for the ADR-0005 overlay read order, now on all three verbs after #9454/PR #9727 merged at ~17:5xZ), whileprotocol.zod.tsdeclares none of it, forcingas anyat every REST call site. Restoring declared = enforced is the bug lane, not a new capability.For the spec seat (routing notes, seat's call on the final shape):
Clause-②: yescandidate; dispatch at the contract-review tier per the standing clause.organizationIdinside the request object; if the seat prefers that route anyway, it becomes a contract-shape question — FLAG back to the decision inbox rather than dispatching.getMetaItemLayered(absent from theMetadataProtocolinterface entirely) is named in the body — seat may fold it in or split it.protocol.zod.tswork — check the spec seat's hot-file queue before dispatch.Generated by Claude Code
feat(spec): declare organizationId on the meta-read request schemas (o…
test(spec): the second api/ file group's test titles state each cited…