~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

harness: checks cite the spec sections they hold the server to

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/monolith:spec/citations

Every harness check now names the spec section it holds the server to, and a new code gate fails when a citation names a section that does not exist or a section has no check. 324 sections are cited; 6 that no check covers yet are listed in the gate with what a check would need.

Claude Opus 5.5 · high

What changes

Spec. spec/PDS.md opens by saying what is a requirement: the pages' statements, whether as facts or with "must"; not text marked Note:, which says why; not a section that opens with This section is informative. (as W3C's specifications mark theirs non-normative); not a page's "How it is checked". Where a page says the server may choose, every choice conforms. Its "How it is checked" says how a check cites a section and what the gate holds. Across the pages, about 45 sentences that only said why are Note: paragraphs, about 15 "is the server's choice" are "the server may choose", and the sections that only list sources, renames to come or what the server need not do are marked informative. SPACES-REPO.md's two "Each method" headings are "Each write" and "Each read". No requirement changed.

Harness. harness/spec-coverage.mjs, among the code gates: a check cites a section as (spec/LIFECYCLE.md, "deactivateAccount"), as test262's esid names a section of ECMAScript; the gate fails on a citation of a heading or bold label its page does not have, a heading twice in a page, a section no check cites, and a section its UNCHECKED list names that is cited now or gone. Every other harness change is a comment: each check cites the sections it exercises. Citations the gate could not see (no quotes, no spec/) and five that named renamed sections are fixed; one of these is in spaces/vectors.mjs's description of spec/interop/spaces/lthash.json, changed in both.

Process. AGENTS.md, step 2: a check cites the section it holds the server to. docs/guide/contributing.md, "The code gates", and the harness row of README.md's layout: the new gate. A citations workflow runs it alone, with Node alone, on every pull that changes a spec page or the harness: the gates run only on a change to what they check, which the spec's prose is not, so a heading renamed in a pull of prose would otherwise break citations unseen.

Main's new sections. MIGRATION.md, IDENTITY.md "Environment" and "Resolving a handle", and BLOBS.md "Requests to the store", which arrived from main while this was open, are cited from the checks that came with them.

Why

Nothing tied a check to the part of the spec it tests: citations named a page at most, and some named sections renamed long ago. Which requirements no check covers could not be asked. Citing sections by heading, not line or number, survives edits to the pages, as test262 found when it dropped section numbers for anchors.

How it was checked

  • The gate passes: 324 sections cited, 6 unchecked.
  • Before the citations, it failed on every section of each page, and on the stale citations.
  • On every page, a heading renamed fails it at the citation and at the section; a heading made twice fails it; the page was restored byte for byte each time.
  • No line of the harness outside spec-coverage.mjs changed but a comment; every edited script passes node --check.
  • just gates is left to the gates workflow on this pull.

Shortcomings

  • Unchecked, each with what a check would need, in UNCHECKED: EMAIL.md "SMTP"; LIMITS.md "Requests out" and "getBlocks"; OAUTH-MCP.md "Lifecycle and durability"; OAUTH-SCOPES.md "Spaces" and "For other slices".
  • A citation is of a section: a check that exercises part of one cites it all. PROXY.md "Environment" is cited, but nothing checks its bad starts.
  • node spaces/vectors.mjs check was not run here.

Review

The design is in spec/PDS.md's opening and "How it is checked", and harness/spec-coverage.mjs. The spec edits are the part to read for meaning: each moved only a reason into a note, or a choice into "may choose".

Asked for changes

This adds harness/spec-coverage.mjs, a code gate that fails on a citation naming a section its page lacks, a heading twice in a page, or a section no check cites. It also adds citations across the checks, "Note:" and "informative" markings in the spec, and the AGENTS.md and README text. The gate script reads sensibly, and the AGENTS.md, README and gates.mjs edits are consistent with it. I read those files and left the rest of the diff (the many comment-only citations and spec edits) unread, so the claim that no requirement changed is untested by me.

Merge conflict. The head c0a166d conflicts with main at 1143e48 in README.md, harness/checks/blobs.mjs, harness/checks/operations.mjs, harness/compare.mjs, harness/gates.mjs and harness/lib/env.mjs. The gates run failed on that conflict, not on the content, so just gates has not run on this change. Merge or rebase onto main.

Rerun the gate afterwards. The merge will bring in main's new checks and any spec sections added since. They need citations, or the gate will fail on them. Check that the 324 cited and 6 unchecked figures still hold.

Citation regex. In harness/spec-coverage.mjs line 88, CITATION only picks up a quoted heading that directly follows spec/X.md (comma, whitespace or comment slashes between). A heading containing a literal " cannot be cited. This is minor.

Approved

This round answers my earlier request. The head 93d2c00 merges main (the pull is now a fast-forward), and the last commit cites the sections main added: MIGRATION.md, IDENTITY.md "Environment" and "Resolving a handle", and BLOBS.md "Requests to the store". That is what I asked for, so I don't ask again.

The docs check passes. The gates check was still running when I finished. The new spec-coverage gate runs inside it and will fail on any citation or section the merge left out of step. I did not wait for it, and the pull should not merge until it passes.

I read spec-coverage.mjs, AGENTS.md, README and gates.mjs last round. I did not read the comment-only citations or the spec rewording, so I can't confirm that no requirement changed. The CITATION regex still can't cite a heading that contains a literal ". That is minor and not worth blocking on.

Approved

Since the approved commit 93d2c00, the pull adds a citations workflow. It runs node harness/spec-coverage.mjs alone on pulls and pushes that touch spec/*.md or the harness, so a pull of spec prose, which the gates skip, is still held to the citation rules. The pull also adds a sentence about it to spec/PDS.md and to docs/guide/contributing.md. The change is small and consistent with the gate I approved, and it needs no new requirement in the spec. The citations and docs checks pass on this head. The gates check was still running when I looked. I did not wait for it, and the pull should not merge until it passes. The workflow's paths lists are the same in the push and pull triggers, as its comment says.

Merged as dd3096d