Commit c4f995f
test(docs): byte-gate the requirement backlink on a real fixture — task 7, series complete
Plan: docs/superpowers/plans/2026-08-21-requirements-doc-surface.md. Adds
fixtures/conformance/requirement-levels-and-nesting/expected/Order.md, which
test/golden/docs-file-conformance.test.ts now byte-matches against docsFile() output.
THE PLAN POINTED AT A REJECTED CORPUS AND IS CORRECTED, NOT FOLLOWED. Task 7 originally said
"a codegen-conformance case". fixtures/codegen-conformance/ is FORMALLY REJECTED — FR-007
rejected 2026-05-26, re-confirmed 2026-05-31, its README kept solely so nobody re-proposes
it, on the reasoning that codegen is a substrate whose observable consequences are already
gated by the behaviour corpora. Following my own plan would have revived something the repo
deliberately killed. The real mechanism is the docs golden harness, which byte-matches ANY
fixtures/conformance/<name>/expected/<Entity>.md and skips fixtures without one — so the
golden lands on an existing fixture and no new corpus appears.
WHY THIS FIXTURE. requirement-levels-and-nesting already pairs an Order entity with a nested
ledger, so one golden covers four things at once that a purpose-built fixture would have had
to assemble: a nested dotted path (Storefront.OrderService.OrderRecord), an L4 claim, an
ARCHITECTURAL claim rendering with no level at all (the unlevelled policy form), and —
silently but importantly — the entity-grain rule, since the L5 TranscribableReference claims
Order.reference, a FIELD, and correctly does NOT appear on the entity page.
THE GOLDEN WAS REVIEWED, NOT ACCEPTED. Generating a golden from current behaviour encodes
whatever the code does, which is how a golden goes quiet the moment it is regenerated to
match a bad fix. I read the emitted file and checked each line said what the model actually
declares before installing it. It then failed on first run against the harness — my generator
used an in-memory source so Source read `<inline>` where the harness loads real files and
reads `meta.shop.json`. Corrected to the harness's truth; the entire Required-by section
matched byte-for-byte on that first run, which is the part that mattered.
PROVEN ABLE TO FAIL: forcing claimedBy to undefined turns this golden red and restoring it
turns it green. Third gate in this series verified by sabotage rather than by its silence,
after the one vacuous assertion found earlier.
Cross-port safety: this corpus is shared by all five ports, and expected.json coexisting with
an expected/ directory is an established pattern here (docs-file-basic carries both), so the
addition is TS-additive and invisible to the other runners.
Verified: codegen-ts 1300 pass / 0 fail (the golden harness goes 4 -> 5 cases).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 8a161e6 commit c4f995f
2 files changed
Lines changed: 34 additions & 4 deletions
File tree
- docs/superpowers/plans
- fixtures/conformance/requirement-levels-and-nesting/expected
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
136 | 144 | | |
137 | 145 | | |
138 | 146 | | |
| |||
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments