Observation, filed unassigned while landing #10345. Nothing is red and no assertion is wrong — this is comment drift in a pin file, which is the kind that misleads the next author into re-deriving a rule that no longer holds.
What the file says
packages/qa/dogfood/test/hook-error-format.dogfood.test.ts, header (~line 12):
…and not a code field an older bundled @objectstack/client would prepend as [ObjectStack] CODE: ….
and at the assertion (~line 118):
// No sandbox debug wrapper, no branding, no code for old clients to prepend.
expect(body.code).toBeUndefined();
Why it is stale
#10345 measured both halves of that rationale as false and retired it from packages/rest/src/error-response.ts, where the same sentence was the stated reason the sandbox unwrap door emitted no code:
What is NOT wrong
The assertion itself stays correct and stays green. The hook it drives throws new Error(BUSINESS_MSG) with no code, so what expect(body.code).toBeUndefined() actually pins is ADR-0112's "nothing is invented for a half-declaration" — which #10345 preserves deliberately. Only the reason attached to it has expired.
The four sibling comments carrying the same sentence inside packages/rest/src/** were rewritten in #10345's PR. This one sits outside that card's declared file surface, so it was left for its own change rather than folded in.
Fix is a comment edit in one file; the natural companion is re-reading the assertion's intent into the comment ("no code because this producer declared none").
Generated by Claude Code
Observation, filed unassigned while landing #10345. Nothing is red and no assertion is wrong — this is comment drift in a pin file, which is the kind that misleads the next author into re-deriving a rule that no longer holds.
What the file says
packages/qa/dogfood/test/hook-error-format.dogfood.test.ts, header (~line 12):and at the assertion (~line 118):
Why it is stale
#10345 measured both halves of that rationale as false and retired it from
packages/rest/src/error-response.ts, where the same sentence was the stated reason the sandbox unwrap door emitted nocode:@objectstack/clientkeeps.messageto "the server's human-readable message — no[ObjectStack]branding and noCODE:prefix" by explicit rule, and attaches the code programmatically aserror.code;codeprobe retires — ADR-0112 D5 says "after batch 3", the code now says "legacy-server fallback, NOT debt" #4007 retired the compat read for exactly that combination, since SDK and server ship on one release train.What is NOT wrong
The assertion itself stays correct and stays green. The hook it drives throws
new Error(BUSINESS_MSG)with nocode, so whatexpect(body.code).toBeUndefined()actually pins is ADR-0112's "nothing is invented for a half-declaration" — which #10345 preserves deliberately. Only the reason attached to it has expired.The four sibling comments carrying the same sentence inside
packages/rest/src/**were rewritten in #10345's PR. This one sits outside that card's declared file surface, so it was left for its own change rather than folded in.Fix is a comment edit in one file; the natural companion is re-reading the assertion's intent into the comment ("no code because this producer declared none").
Generated by Claude Code