docs(spec): fence the endpoint listings on the automation and package API reference pages - #16961
Merged
Merged
Conversation
… API docblocks `api/automation-api` and `api/package-api` captioned a listing with `@example Endpoints` and then wrote its rows as ordinary prose lines. Consecutive non-blank lines are one markdown paragraph and the docs site loads no `remark-breaks`, so each soft break rendered as a space and both pages published their whole listing as one run-on line with the author's column alignment collapsed. Fence both listings at the source, exactly as the neighbouring `api/odata` and `api/metadata` docblocks already do, and regenerate the two reference pages. The renderer is not touched: it preserves the source's own line layout deliberately, and a rule that guessed which prose runs are really tables is the shape-sniffing its header rejects. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016N6xmWt5hYm94ffVEwGH8x
Contributor
📓 Docs Drift Check
What this run could not see
Coarse fallback — 131 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
This was referenced Sep 8, 2026
zhuangjianguo
marked this pull request as ready for review
September 8, 2026 20:18
zhuangjianguo
enabled auto-merge
September 8, 2026 20:18
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 #15440
api/automation-apiandapi/package-apipublished their endpoint listing as a run-on line. Both module docblocks captioned a listing with@example Endpointsand then wrote the rows as ordinary prose lines. Consecutive non-blank lines are one markdown paragraph, and the docs site loads noremark-breaks, so every soft break rendered as a space: nine rows on one page and eight on the other arrived as a single sentence with the author's column alignment collapsed away.Both listings are now fenced at the source, exactly as the neighbouring
api/odataandapi/metadatadocblocks already fence theirs, and the two reference pages are regenerated from them.Clause-②: no
Fencing a listing changes rendering only. No accept set moves, no export is added, no schema arm, bound or behaviour changes — the page gains the line breaks it always meant to have. This is the boundary test triage wrote on the card, and the diff stays inside it: no schema, no
.describe()string, no renderer, no remark plugin.Premises, re-measured on this branch's base rather than inherited
Base
f36eef55d. All five held.@example Endpointsoccurs in exactly two files —packages/spec/src/api/automation-api.zod.ts:16andpackages/spec/src/api/package-api.zod.ts:19. Measured repo-wide, not just underpackages/. That is the completeness bound: there is no third page.automation-api.zod.ts:16-25— nine consecutive unfenced rows. Reproduced.package-api.zod.ts:19-27— eight, identical shape. Reproduced.remark-breaksappears nowhere in the repo;apps/docs/source.config.tsadds exactly one remark plugin,remarkMermaid.content/docs/references/api/odata.mdxfences its listing under the same kind of caption and renders as a block — the positive control.The defect, measured by a markdown parser rather than asserted
Parsed with the workspace's own
mdast-util-from-markdown, the description block of the generated page. Before, the caption and every row are one paragraph node:After, the caption is its own paragraph and the rows are a
codenode — the same two-node shape theodatacontrol has:Compiled the rest of the way to HTML and applied the whitespace collapsing a browser performs, the BEFORE listing is one 598-character line reading
Endpoints GET /api/automation — List flows GET /api/automation/:name — Get flow POST …, alignment gone. The AFTER is a caption paragraph followed by a preformatted code block that browsers do not collapse.Not the renderer
renderFileDescriptionis untouched. It preserves the source's own line layout deliberately, and a renderer-side rule that guessed which prose runs are really tables is exactly the shape-sniffing its header rejects. The generated pages come frompnpm --filter @objectstack/spec gen:docs; neither page was hand-edited, and both carry the AUTO-GENERATED banner.That claim is not taken on trust. Ablation: with the fix committed, the two fence lines were deleted from the generated page alone, leaving the source fenced. The mutation was proven on disk (fence count 3 to 1; blob hash differs from the HEAD blob) before the gate ran.
check:docscontent/docs/references/api/automation-api.mdx (out of date)228 generated files in sync with packages/specRestoration was proven by hash equality against the HEAD blob and an empty
git diff HEADfor that path — not by a checkout's exit code. So the green above is a measurement: the gate is live and would catch a page that is not the generator's own output.Changeset — both halves, because half 1 alone gives the wrong answer here
Half 1, is the changed path inside
files[]?packages/spec'sfiles[]carriessrc/**/*.zod.ts. Measured withnpm pack --dry-run --jsonrather than read off the glob: the tarball has 1854 entries and both changed paths are among them, with a discriminating control —src/api/automation-api.ts,scripts/build-docs.tsandvitest.config.tsare all absent, so the list is not simply matching everything. YES.Half 2, is the changed text present in what ships? Packed for real and read back out of the tarball:
package/src/api/automation-api.zod.tscontains the fenced listing verbatim, fence lines included. YES — via thesrc/copy.Worth recording that half 2 answers differently for the other shipped tree: the changed text is not in
dist/. A module-level docblock does not survive the declaration build — searched the builtdist/for the docblock's own first lineAutomation API Protocol(absent) against a positive controlAutomationFlowPathParamsSchema(present). Had these bytes lived only indist/, half 2 would have flipped the answer to skip-changeset.Published content moves, so a changeset is owed: patch,
.changeset/fence-api-endpoint-listings.md.Verification
Every command below was run on this branch and exited 0. Exit codes were captured after redirecting to a file, never through a pipe.
pnpm exec eslint . --no-inline-config --format json— 1m48s, exit 0, 6384 files, 0 errors, 0 warnings, population read from eslint's own config. Both changed.tsfiles are in it and clean. No.mdxand no changeset.mdare in eslint's population.check:docs—228 generated files in sync with packages/spec.pnpm --filter @objectstack/spec test— 467 test files, 13100 tests, all passed.pnpm --filter @objectstack/spec typecheck— passed, including the test-layer ledger.scripts/pm/dispatch-gates.mjsand reconciled back with--ran. Among them:check:generated,check:authorable-surface,check:api-surface,check:export-origins,check:skill-refs,check:skill-examples,check:yaml-examples,check:llms-txt,check:variant-docs,check:liveness,check:empty-state,check:nul-bytes,check:doc-authoring,check:doc-anchors,check:docs-single-h1,check:docs-audit-scope,check:docs-redirects,check:docs-transcript-drift,check:published-files,check:empty-changeset,check:objectui-changeset,check:adr-0087-registration.--self-testvariants, which grade the checker's own fixtures and are not a PR verdict in either direction, and the remainder are repo-wide families no path in this diff feeds. Those are CI's runs, not this branch's.check:generated(exit 1),check:skill-examples(exit 1) andcheck:docs-transcript-drift(exit 3) each refused to measure against an unbuiltdist— the last says so in as many words,PREREQUISITE NOT MET … NOT a pass and NOT a finding: nothing was measured.check:generatedadditionally warned that the staleness it reported was a phantom of the unbuilt tree. After building@objectstack/lintand@objectstack/client-reactwith their dependency closures, all three run and all three pass;check:generatedreports nothing stale, confirming the phantom.gen:schemaand both builds wrote no tracked file, which is its own small piece of evidence that this change moves no projection.Out of scope, deliberately
No other docblock was swept for similar prose runs — the census in premise 1 says there is no third page under this caption, and a wider sweep is a different card with a different justification. This is not rework on #14455, which rewrote the caption above these listings and was ruled to the tag line; that scoping was correct and this is the intended way for the remainder to survive.
Generated by Claude Code