docs(spec): fix QA field/capture path convention — no body. prefix - #7565
Conversation
…7365) TestAssertionSchema.field's describe() text and TestStepSchema.capture's sibling describe() both taught a `body.*` path convention that never matched the runtime: TestRunner resolves both against `result` directly, the value HttpTestAdapter.handleResponse returns (the parsed response body itself, no `body` wrapper). Executes the 2026-08-11 maintainer ruling on #7365 (comment 5248467805): docs follow the adapter, root- relative paths, no stored-suite compatibility to preserve since body.* never worked. Acceptance face unchanged - field and capture keep their original Zod types, only description text moves. Regenerates content/docs/references/qa/testing.mdx via `pnpm --filter @objectstack/spec gen:docs`; check:docs reports all 231 files in sync. Adds a patch changeset for @objectstack/spec, following the #7444 precedent for describe/TSDoc-only spec docs fixes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016R9de1FqP7NvwKvqXi92Gh
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
📓 Docs Drift CheckThis PR changes 1 package(s): 106 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
⛔ 7 release-owned page(s) also reference the affected code. These are read-only:
|
Fixes #7365
What
Executes the 2026-08-11 maintainer ruling on #7365 (issue comment
5248467805):
TestAssertionSchema.field's.describe()text, and the sibling.describe()onTestStepSchema.capturein the same file, both taught abody.*path example. Neither ever matched the runtime:TestRunner.assert/runStep(packages/core/src/qa/runner.ts) resolve bothfieldandcapturepaths againstresultdirectly — the valueHttpTestAdapter.handleResponsereturns, which is the parsed response body itself with nobodywrapper (nor does the platform's own response envelope ever nest under abodykey).Before → after (
packages/spec/src/qa/testing.zod.ts):field:'Field path in the result to check (e.g. "body.data.0.status")'→'Field path in the result to check, resolved against the parsed response body root — no "body." prefix (e.g. "data.0.status")'capture:'Map result fields to context variables: { "newId": "body.id" }'→'Map result fields to context variables, paths resolved against the response body root (e.g. { "newId": "data.id" })'Acceptance face unchanged — both properties keep their original Zod types (
field: z.string(),capture: z.record(z.string(), z.string())); only description text moves.Regeneration
content/docs/references/qa/testing.mdxis regenerated viapnpm --filter @objectstack/spec gen:docsand committed.pnpm --filter @objectstack/spec check:docsreports all 231 generated files in sync.Grepped
content/docs/**(hand-written pages, excludingreferences/andreleases/) for the oldbody.data/body.status/body.idconvention being taught as a QA assertion example — no hits, so no hand-written-docs finding.Tests
pnpm --filter @objectstack/spec typecheck— pass (tsc --noEmit,check:scripts-typecheck,check:test-typecheckall clean)pnpm --filter @objectstack/spec test— 374 test files / 9805 tests passed, includingpackages/spec/src/qa/testing.test.ts(uses'body.status'/'body.id'as arbitrary string fixture values againstfield: z.string(), not as a pin on the.describe()text — confirmed no test asserts the description string, so nothing needed updating there)node scripts/check-nul-bytes.mjs— OKChangeset
Added a patch changeset for
@objectstack/spec, following the #7444 precedent (docs(spec): state the RLS using grammar...) for describe/TSDoc-only spec docs fixes that render into the published reference.Out of scope (per the ruling and the dispatch card)
The ruling's optional follow-up — a loud runner guidance error on
body.-prefixed paths inpackages/core/src/qa/— is explicitly not part of this card and is not implemented here.Generated by Claude Code