docs(qa/dogfood): retire stale "older client prepends code" rationale - #12122
Merged
Conversation
hook-error-format.dogfood.test.ts still stated, in two comment sites, the rationale #10345 measured false and removed from packages/rest/src/error-response.ts: that an older bundled @objectstack/client would prepend `code` as `[ObjectStack] CODE: ...`. Neither half held — the shipping client keeps `.message` to the server's human-readable message by explicit rule, and "older bundled client, current server" was retired as a supported pairing by #4007 (SDK and server ship on one release train). The assertions themselves were always correct and are unchanged: they pin ADR-0112's rule that nothing is invented for a half-declaration — the hook throws `new Error(BUSINESS_MSG)` with no `code`, so the wire carries none. Only the stale reason attached to that fact is reworded, at both sites (header ~line 12, assertion ~line 118), to name the real cause: this producer declared no code. Comment-only change; no behaviour, no changeset (skip-changeset).
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
os-trump
marked this pull request as ready for review
August 25, 2026 10:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11589
What
packages/qa/dogfood/test/hook-error-format.dogfood.test.tscarried the retired"older bundled
@objectstack/clientwould prependcodeas[ObjectStack] CODE: …"rationale at two comment sites — header (line 12) and the assertion site (line 118,
now spans 118-119 after the edit). #10345 measured both halves of that rationale
false and retired the same sentence from
packages/rest/src/error-response.ts:.messageto the server's human-readable message byexplicit rule, attaching the code programmatically as
error.code;codeprobe retires — ADR-0112 D5 says "after batch 3", the code now says "legacy-server fallback, NOT debt" #4007 retiredthe compat read, since SDK and server ship on one release train.
This PR is a comment-only reword in that one file, replacing the stale rationale
with the real one:
expect(body.code).toBeUndefined()is correct because the hookthrows
new Error(BUSINESS_MSG)with no code declared — ADR-0112 inventsnothing for a producer that declared none. No executable line changed; both
assertions are byte-identical to before.
Verified line numbers (re-derived against this tree, no drift from the issue)
Scope fence honored
packages/rest/src/**was not touched — its four sibling comments carrying the samesentence were already rewritten in #10345's PR, and a grep for the retired phrasing
(
older bundled,for old clients,CODE: …) across the repo found no further livesite: the remaining
packages/resthits (rest.test.ts:2695,rest-sandbox-declared-status.test.ts:30,rest-hook-script-fault-envelope.test.ts:331)already narrate the retirement in the past tense, not as live rationale.
Tests
Ran at
4663677c(this branch's only commit, current head):pnpm --filter '@objectstack/dogfood^...' build— full dependency closure, clean,no errors (via the shared verify lock).
pnpm --filter @objectstack/dogfood exec vitest run --maxWorkers=2 test/hook-error-format.dogfood.test.ts— 4 passed (4), via the shared verify lock (
VERDICT command-exit 0). Nored-before state exists for a comment-only change, as expected; this is the
file's suite green after the edit, not evidence the edit itself is correct — the
anchored greps below are that evidence.
Anchored grep proving the retired sentence is gone from both sites and the new
reason is present:
Gate family (re-derived with
node scripts/pm/dispatch-gates.mjsagainst this diff,not reconciled to the dispatch prompt's list) — all green:
pnpm --filter @objectstack/spec run check:empty-statepnpm --filter @objectstack/spec run check:livenesspnpm --filter @objectstack/spec run check:strictness-ledgerpnpm --filter @objectstack/spec run check:variant-docspnpm check:published-filespnpm check:slot-lookuppnpm check:test-source-aliaspnpm check:type-source-resolutionnode scripts/check-plugin-teardown-shape.mjsnode scripts/docs-audit/check-affected-docs.mjsnode scripts/docs-audit/check-drift-comment.mjs*.test.tsfile):pnpm check:query-options-erasure,pnpm check:engine-double-contract,pnpm check:cross-package-test-inputs,pnpm check:where-matcher,pnpm check:type-check-coverage— all green.pnpm check:type-check-debt(--re-measure) refuses locally: it needs the FULL78-package workspace closure built (
turbo run build --filter='./packages/*' --filter='./packages/*/*'), not just@objectstack/dogfood's own dependencyclosure — it errored naming
@objectstack/service-knowledgeunbuilt, a packageoutside dogfood's graph. Deferred as disproportionate to a comment-only diff:
the DEBT/TEST_DEBT counters are raw
tscdiagnostic counts, and this diffchanges zero non-comment bytes in an already-tracked (not newly added) test
file, so
tsc's AST — and therefore every ledger count this gate re-measures —is unaffected by construction. CI's
lint.ymlbuilds the full closure first andwill re-measure for real.
pnpm lint(full-repo, per this lane's standing instruction) — 5429 filesscanned, 0 errors, 0 warnings (
VERDICT command-exit 0, held the sharedverify lock 154s after waiting 435s behind three other agents' jobs). A direct
single-file
eslintrun on the target file alone was also 0/0, confirmed beforethe full run landed.
skip-changeset
Comment-only test-file change; no changeset, per triage.
skip-changesetlabelapplied via the additive labels endpoint and read back:
size/xs,tests,skip-changeset.Generated by Claude Code