Observation filed by the os-dev seat for #12775 (session session_01AUF1NoViznQK32gqpK8wS8), out of that card's scope; unassigned, finding label, for triage.
What was measured
packages/rest/src/rest-server.ts — handleApprovalError (inside registerApprovalRoutes, around :11477) is the seam where every approvals refusal thrown by ApprovalService becomes an ADR-0112 envelope: it tests the thrown message against a prefix table and answers res.status(status).json({ code, error }). The FORBIDDEN row (^FORBIDDEN → 403, code FORBIDDEN) is the one every authorisation refusal rides — recall by a non-submitter, decide by a non-approver, reassign / remind / sendBack / resubmit by the wrong actor, the impersonation refusals from resolveActor.
packages/rest/src/rest-approvals-wire-codes.test.ts (#8885) pins that seam LIVE through the real routes for THROTTLED (429), READ_BACK_FAILED (500) and the template-generated APPROVAL_*_FAILED (500) codes, plus the closed-union class pin. git grep -n "FORBIDDEN\|403" packages/rest/src/rest-approvals-wire-codes.test.ts → no match; git grep -ln "approvals/requests\|handleApprovalError" packages/rest/src/*.test.ts → the other four files that match (openapi-builtin-paths, rest-data-door-code-prefix, rest-server-approvals-unknown-filter, rest-write-response-internal-fields.tripwire) pin route registration, query-param refusal, the code-prefix strip and response-echo shape, not the 403 row.
So the 403 FORBIDDEN half of the recall / decide refusal contract is pinned only indirectly: the service-side suites assert the FORBIDDEN: message prefix (recall-refusal-user-copy.test.ts WIRE_CODE, the #12775 pins in approval-revise.test.ts), and the mapping row that turns that prefix into 403 + code has no live-emission pin of its own. A regression that re-orders the table, drops the row, or changes the anchor regex would keep every service suite green.
Why it is an observation and not a defect
The row works today (read at origin/main 7286dd58e); nothing is broken. It is a coverage gap on a security-relevant envelope, of the kind rest-approvals-wire-codes.test.ts already exists to close for its sibling rows — one more it() in that file, through the real recall route with a fake service that throws FORBIDDEN: …, asserting status === 403, body.code === 'FORBIDDEN' and that the prefix is stripped from body.error, would close it.
Not fixed under #12775 because packages/rest is outside that card's claimed file surface.
Refs: #12775 (the narrowing whose pins stop at the service seam), #8885 (the wire-code pin file), #11993 (the recall refusal's user-facing half; its test documents the prefix contract in prose).
Generated by Claude Code
Generated by Claude Code
Observation filed by the
os-devseat for #12775 (sessionsession_01AUF1NoViznQK32gqpK8wS8), out of that card's scope; unassigned,findinglabel, for triage.What was measured
packages/rest/src/rest-server.ts—handleApprovalError(insideregisterApprovalRoutes, around :11477) is the seam where every approvals refusal thrown byApprovalServicebecomes an ADR-0112 envelope: it tests the thrown message against a prefix table and answersres.status(status).json({ code, error }). TheFORBIDDENrow (^FORBIDDEN→403, codeFORBIDDEN) is the one every authorisation refusal rides — recall by a non-submitter, decide by a non-approver, reassign / remind / sendBack / resubmit by the wrong actor, the impersonation refusals fromresolveActor.packages/rest/src/rest-approvals-wire-codes.test.ts(#8885) pins that seam LIVE through the real routes forTHROTTLED(429),READ_BACK_FAILED(500) and the template-generatedAPPROVAL_*_FAILED(500) codes, plus the closed-union class pin.git grep -n "FORBIDDEN\|403" packages/rest/src/rest-approvals-wire-codes.test.ts→ no match;git grep -ln "approvals/requests\|handleApprovalError" packages/rest/src/*.test.ts→ the other four files that match (openapi-builtin-paths, rest-data-door-code-prefix, rest-server-approvals-unknown-filter, rest-write-response-internal-fields.tripwire) pin route registration, query-param refusal, the code-prefix strip and response-echo shape, not the 403 row.So the
403 FORBIDDENhalf of the recall / decide refusal contract is pinned only indirectly: the service-side suites assert theFORBIDDEN:message prefix (recall-refusal-user-copy.test.tsWIRE_CODE, the #12775 pins inapproval-revise.test.ts), and the mapping row that turns that prefix into403+codehas no live-emission pin of its own. A regression that re-orders the table, drops the row, or changes the anchor regex would keep every service suite green.Why it is an observation and not a defect
The row works today (read at
origin/main7286dd58e); nothing is broken. It is a coverage gap on a security-relevant envelope, of the kindrest-approvals-wire-codes.test.tsalready exists to close for its sibling rows — one moreit()in that file, through the real recall route with a fake service that throwsFORBIDDEN: …, assertingstatus === 403,body.code === 'FORBIDDEN'and that the prefix is stripped frombody.error, would close it.Not fixed under #12775 because
packages/restis outside that card's claimed file surface.Refs: #12775 (the narrowing whose pins stop at the service seam), #8885 (the wire-code pin file), #11993 (the recall refusal's user-facing half; its test documents the prefix contract in prose).
Generated by Claude Code
Generated by Claude Code