Skip to content

docs(qa/dogfood): retire stale "older client prepends code" rationale - #12122

Merged
os-trump merged 1 commit into
mainfrom
claude/issue-11589-dogfood-hook-error-comment
Aug 25, 2026
Merged

docs(qa/dogfood): retire stale "older client prepends code" rationale#12122
os-trump merged 1 commit into
mainfrom
claude/issue-11589-dogfood-hook-error-comment

Conversation

@os-trump

@os-trump os-trump commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Fixes #11589

What

packages/qa/dogfood/test/hook-error-format.dogfood.test.ts carried the retired
"older bundled @objectstack/client would prepend code as [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:

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 hook
throws new Error(BUSINESS_MSG) with no code declared — ADR-0112 invents
nothing 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)

  • Header site: line 12
  • Assertion-comment site: line 118 (now spans 118-119 after rewording)

Scope fence honored

packages/rest/src/** was not touched — its four sibling comments carrying the same
sentence 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 live
site: the remaining packages/rest hits (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). No
    red-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:

    $ grep -n "older bundled\|for old clients\|CODE: …" packages/qa/dogfood/test/hook-error-format.dogfood.test.ts
    (no matches)
    
    $ grep -n "declared no code\|threw no code\|declared none" packages/qa/dogfood/test/hook-error-format.dogfood.test.ts
    12:// and not a `code` field: `throw new Error(...)` declares no code, and
    118:    // No sandbox debug wrapper, no branding, and no `code` — the hook threw
    119:    // no code, and ADR-0112 invents nothing for a producer that declared none.
    

Gate family (re-derived with node scripts/pm/dispatch-gates.mjs against this diff,
not reconciled to the dispatch prompt's list) — all green:

  • pnpm --filter @objectstack/spec run check:empty-state
  • pnpm --filter @objectstack/spec run check:liveness
  • pnpm --filter @objectstack/spec run check:strictness-ledger
  • pnpm --filter @objectstack/spec run check:variant-docs
  • pnpm check:published-files
  • pnpm check:slot-lookup
  • pnpm check:test-source-alias
  • pnpm check:type-source-resolution
  • node scripts/check-plugin-teardown-shape.mjs
  • node scripts/docs-audit/check-affected-docs.mjs
  • node scripts/docs-audit/check-drift-comment.mjs
  • Convention-triggered (this diff edits a *.test.ts file): 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 FULL
    78-package workspace closure built (turbo run build --filter='./packages/*' --filter='./packages/*/*'), not just @objectstack/dogfood's own dependency
    closure — it errored naming @objectstack/service-knowledge unbuilt, a package
    outside dogfood's graph. Deferred as disproportionate to a comment-only diff:
    the DEBT/TEST_DEBT counters are raw tsc diagnostic counts, and this diff
    changes 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.yml builds the full closure first and
    will re-measure for real.
  • pnpm lint (full-repo, per this lane's standing instruction) — 5429 files
    scanned, 0 errors, 0 warnings
    (VERDICT command-exit 0, held the shared
    verify lock 154s after waiting 435s behind three other agents' jobs). A direct
    single-file eslint run on the target file alone was also 0/0, confirmed before
    the full run landed.

skip-changeset

Comment-only test-file change; no changeset, per triage. skip-changeset label
applied via the additive labels endpoint and read back: size/xs, tests,
skip-changeset.


Generated by Claude Code

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).
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing 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
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.

Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json e7480a80676dc70c1a21555d6a11a86c8f518209packageMentionDocs.

@os-trump os-trump added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Aug 25, 2026 — with Claude
@os-trump
os-trump marked this pull request as ready for review August 25, 2026 10:25
@os-trump
os-trump added this pull request to the merge queue Aug 25, 2026
Merged via the queue into main with commit 842b4b4 Aug 25, 2026
41 checks passed
@os-trump
os-trump deleted the claude/issue-11589-dogfood-hook-error-comment branch August 25, 2026 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

qa/dogfood: hook-error-format.dogfood.test.ts still states the retired "older clients prepend code to the message" rationale as live

2 participants