Skip to content

Commit 5b342a1

Browse files
committed
docs(rest): retire the stale crash-divergence note on armSentence
Contract review F1: the "What this deliberately does NOT decide" block in `armSentence`'s docblock still described the pre-#15071 world, and after this PR every clause of it was false. It said a sandboxed CRASH reaches an arm and is answered at the arm's own declared status, that the divergence against the unwrap door's sanitised 500 is UNCHANGED, that the pin records it as an accepted divergence, and that it "carries its own decision card" -- while the card is this one and it has been executed: the crash terminal now sits above the code-gated arms, so no crash reaches this function on either door. Rewritten as a cross-reference rather than a second statement of the ruling. `isSandboxCrash`'s own docblock carries the maintainer ruling, its fence and its negative control; a file that states one rule twice is the drift this finding is made of, so the block now points there and stops. The second paragraph keeps the surviving divergence visible: what converged is the no-declared-status case. A crash that DECLARED a 4xx still leaves `resolveErrorResponse` at that status with the QuickJS wrapper, through a passthrough this card did not touch -- pinned as an ACCEPTED DIVERGENCE in `error-response-structured-arm-door-parity.test.ts`. The prose must not read as "all divergence is gone", because it is not. Comment lines only -- no executable byte moves. Proven at parser level: both revisions re-printed with `removeComments: true` hash identically (sha256 5daab82cdd23e0b93a1dfb420b2a9e3c83786975248504bdbf9907b321005fa7), with a control leg that flips one identifier and is correctly rejected. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015QE8qk46e5CHJxyQEUjbf8
1 parent d4f4a32 commit 5b342a1

1 file changed

Lines changed: 16 additions & 10 deletions

File tree

‎packages/rest/src/error-response.ts‎

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -307,16 +307,22 @@ export function sandboxBusinessMessage(error: any): string | undefined {
307307
*
308308
* ## ⛔ What this deliberately does NOT decide
309309
*
310-
* A sandboxed **CRASH** (#7543). {@link sandboxBusinessMessage} declines one by
311-
* contract, so the fallback hands the arm `error.message` — the wrapper — and
312-
* the arm answers with its own declared status, where the unwrap door's
313-
* terminal for the same crash is the sanitised 500. That divergence is
314-
* UNCHANGED by this rule, on purpose: choosing between those two answers is
315-
* fault classification rather than message sourcing (triage on #14704, verbatim:
316-
* "leave today's behaviour exactly as it is, implement the business-message
317-
* read only, and name the site and the divergence"). It is pinned in
318-
* `error-response-sandbox-arm-message.test.ts` §4 so that deciding it is a
319-
* visible edit rather than a drift, and it carries its own decision card.
310+
* Fault classification. A sandboxed **CRASH** (#7543) no longer reaches this
311+
* function at all: #15071 put {@link isSandboxCrash} ABOVE the code-gated arms
312+
* in {@link classifyDataError}, so a crashed body is answered by
313+
* {@link UNCLASSIFIED_FAULT} whatever code it declared, and the other door
314+
* declines the consult for a sandbox producer outright (the section above).
315+
* ⛔ The ruling that decided it, its fence and its negative control are stated
316+
* ONCE, on {@link isSandboxCrash} — read them there rather than a second time
317+
* here. `error-response-sandbox-arm-message.test.ts` §4 records the verdict,
318+
* now CONVERGED. {@link sandboxBusinessMessage} still declines a crash by
319+
* contract, so this function keeps no opinion of its own about one.
320+
*
321+
* ⚠️ CONVERGED is the no-declared-status case, not the whole question: a crash
322+
* that DECLARED a 4xx still leaves {@link resolveErrorResponse} at that status,
323+
* wrapper and all, through a passthrough this card did not touch — pinned as an
324+
* ACCEPTED DIVERGENCE, widened by #15071, in
325+
* `error-response-structured-arm-door-parity.test.ts` §4.
320326
*
321327
* ⛔ Deliberately a READ of the field the sandbox populated, never a
322328
* pattern-strip of the wrapper off `.message` — {@link sandboxBusinessMessage}

0 commit comments

Comments
 (0)