checkwright 0.20.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +385 -19
- package/lib/common/digest.sh +18 -0
- package/lib/common/lock.sh +11 -0
- package/lib/common/recipe.sh +8 -11
- package/lib/doctor.sh +49 -0
- package/lib/init.sh +152 -29
- package/package.json +2 -2
- package/payload/artifact/targets.list +30 -0
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -0
- package/payload/canon-kit/README.md +1 -0
- package/payload/canon-kit/SPEC.md +281 -26
- package/payload/canon-kit/checks/check-comment-tier.sh +7 -2
- package/payload/canon-kit/checks/check-docs-link-convention.sh +11 -4
- package/payload/canon-kit/checks/check-md-refs.sh +22 -9
- package/payload/canon-kit/checks/check-payload-claim.sh +133 -0
- package/payload/canon-kit/checks/check-prose-enum.sh +1 -1
- package/payload/canon-kit/checks/check-spec-pointer.sh +15 -4
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
- package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +26 -3
- package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/OUTSIDE.md +4 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/docs/index.md +3 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/good/OUTSIDE.md +4 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/good/docs/methodology.md +8 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +94 -0
- package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +5 -3
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/README.md +15 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/expect.txt +2 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/install.md +19 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/posts/note.md +6 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.sh +8 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/payload-claims.sh +7 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/README.md +15 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/expect.txt +2 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/install.md +20 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/posts/note.md +6 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.sh +8 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/payload-claims.sh +7 -0
- package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +24 -1
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/widget.sh +1 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/widget.sh +1 -0
- package/payload/canon-kit/lib/spec.sh +22 -12
- package/payload/canon-kit/smoke/install.sh +20 -1
- package/payload/canon-kit/templates/SPEC-amendment.md +5 -1
- package/payload/context-kit/SPEC.md +38 -7
- package/payload/context-kit/lib/toolfloor.sh +1 -1
- package/payload/context-kit/smoke/install.sh +3 -1
- package/payload/delegation-kit/README.md +2 -1
- package/payload/delegation-kit/SPEC.md +590 -48
- package/payload/delegation-kit/bin/run-dispatch-guard-tests.sh +97 -0
- package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +61 -0
- package/payload/delegation-kit/checks/check-gate-tamper.sh +1 -1
- package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/bad/agents/silent.md +7 -0
- package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/bad/args +1 -0
- package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/bad/expect.txt +1 -0
- package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/agents/explicit-cheap.md +7 -0
- package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/agents/explicit-inherit.md +8 -0
- package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/args +1 -0
- package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/expect.txt +1 -0
- package/payload/delegation-kit/lib/delegation.sh +3 -0
- package/payload/delegation-kit/smoke/install.sh +3 -1
- package/payload/delegation-kit/templates/agent-dispatch-guard.sh +61 -0
- package/payload/delegation-kit/templates/agent-execution.md +171 -15
- package/payload/delegation-kit/templates/delegation-config.sh +4 -0
- package/payload/delegation-kit/templates/dispatch-checklists.md +1 -1
- package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +30 -0
- package/payload/doctrine-kit/DOCTRINE.md +27 -0
- package/payload/doctrine-kit/README.md +5 -0
- package/payload/doctrine-kit/SPEC.md +62 -3
- package/payload/doctrine-kit/bin/install-doctrine.sh +84 -4
- package/payload/doctrine-kit/smoke/install.sh +77 -1
- package/payload/drift-kit/README.md +3 -2
- package/payload/drift-kit/SPEC.md +253 -20
- package/payload/drift-kit/bin/stage-economics.sh +157 -3
- package/payload/drift-kit/kpis/kpi-incident-recurrence.sh +42 -0
- package/payload/drift-kit/smoke/install.sh +155 -1
- package/payload/drift-kit/templates/economics.md +9 -0
- package/payload/drift-kit/templates/kpis.list +6 -1
- package/payload/evidence-kit/README.md +20 -6
- package/payload/evidence-kit/SPEC.md +355 -17
- package/payload/evidence-kit/bin/run-validate.sh +51 -9
- package/payload/evidence-kit/checks/check-battery-roster.sh +86 -0
- package/payload/evidence-kit/checks/check-producer-liveness.sh +34 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/args +1 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/runner.md +14 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.sh +7 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/args +1 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/runner.md +14 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.sh +7 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +68 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/args +1 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/run-validate.lock +1 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/good/args +1 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/good/expect.txt +2 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/good/run-validate.lock +1 -0
- package/payload/evidence-kit/gate-tests/producer-lock.test.sh +109 -0
- package/payload/evidence-kit/lib/evidence.sh +18 -0
- package/payload/evidence-kit/smoke/install.sh +17 -3
- package/payload/gate-sdk/README.md +4 -1
- package/payload/gate-sdk/SPEC.md +1955 -79
- package/payload/gate-sdk/bin/gen-pre-commit.sh +13 -3
- package/payload/gate-sdk/bin/run-consumer-smoke.sh +121 -1
- package/payload/gate-sdk/bin/run-gate-tests.sh +40 -9
- package/payload/gate-sdk/bin/run-gates.sh +32 -3
- package/payload/gate-sdk/bin/upgrade-smoke.sh +3 -3
- package/payload/gate-sdk/checks/check-action-gh-repo.gate +2 -0
- package/payload/gate-sdk/checks/check-action-pinning.gate +2 -0
- package/payload/gate-sdk/checks/check-action-run-shell.sh +3 -1
- package/payload/gate-sdk/checks/check-core-files.sh +27 -4
- package/payload/gate-sdk/checks/check-exec-bit.sh +20 -1
- package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +106 -0
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +6 -7
- package/payload/gate-sdk/checks/check-gate-output.sh +9 -1
- package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +302 -0
- package/payload/gate-sdk/checks/check-graph.sh +7 -8
- package/payload/gate-sdk/checks/check-readme-roster.sh +5 -0
- package/payload/gate-sdk/checks/check-reads-couples.sh +73 -22
- package/payload/gate-sdk/checks/check-template-registry-parity.sh +81 -0
- package/payload/gate-sdk/checks/check-tree-terms.sh +11 -7
- package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +16 -1
- package/payload/gate-sdk/gate-tests/check-core-files.test.sh +64 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/kitroot/checks/check-vendored.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/check-ported.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.sh +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gates.list +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stamp.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stub-bin +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/args +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/kitroot/checks/check-vendored.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/check-ported.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.sh +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gates.list +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stamp.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stub-bin +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +81 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +3 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +3 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/gates/check-sample.sh +3 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-sample.sh +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/check-sample.sh +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/conservation.md +7 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +12 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/impl/gate.rs +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/kitroot/check-orphan.rs +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/publish.yml +15 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.gate +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/stub-bin +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/targets.list +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/args +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/conservation.md +8 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +7 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/impl/gate.rs +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/kitroot/check-other.rs +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/publish.yml +15 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-ported.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/stub-bin +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/targets.list +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +123 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +139 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/templates/widgets.list +4 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-one.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-two.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/args +4 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/templates/widgets.list +4 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-one.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-two.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/args +8 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/rules.list +5 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/table.tsv +4 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/lib-declaration.test.sh +4 -4
- package/payload/gate-sdk/gate-tests/lib-gate.test.sh +41 -1
- package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +144 -0
- package/payload/gate-sdk/lib/consumer-smoke.sh +26 -1
- package/payload/gate-sdk/lib/gate.sh +104 -13
- package/payload/gate-sdk/lib/inject.sh +21 -1
- package/payload/gate-sdk/smoke/install.sh +19 -1
- package/payload/guard-kit/README.md +4 -3
- package/payload/guard-kit/SPEC.md +88 -10
- package/payload/guard-kit/bin/compare-settings-allow.sh +40 -7
- package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +64 -0
- package/payload/guard-kit/lib/guard.sh +1 -0
- package/payload/guard-kit/templates/close-triage.md +35 -7
- package/payload/guard-kit/templates/guard-config.sh +3 -0
- package/payload/lifecycle-kit/README.md +1 -0
- package/payload/lifecycle-kit/SPEC.md +589 -33
- package/payload/lifecycle-kit/bin/enter-stage.sh +13 -3
- package/payload/lifecycle-kit/bin/file-gap.sh +42 -1
- package/payload/lifecycle-kit/bin/file-survey.sh +50 -0
- package/payload/lifecycle-kit/checks/check-merge-attrs.sh +1 -1
- package/payload/lifecycle-kit/checks/check-skill-binding.sh +1 -1
- package/payload/lifecycle-kit/checks/check-survey-record.sh +102 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs/bad/.gitattributes +1 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs/good/.gitattributes +1 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +1 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/expect.txt +4 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/record.md +18 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/good/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/good/record.md +13 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +84 -0
- package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +94 -0
- package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +102 -0
- package/payload/lifecycle-kit/lib/stages.sh +8 -2
- package/payload/lifecycle-kit/smoke/install.sh +17 -1
- package/payload/lifecycle-kit/templates/consult.md +73 -0
- package/payload/lifecycle-kit/templates/lead.md +141 -10
- package/payload/lifecycle-kit/templates/stages/align.md +12 -0
- package/payload/lifecycle-kit/templates/stages/build.md +8 -0
- package/payload/lifecycle-kit/templates/stages/close.md +25 -4
- package/payload/lifecycle-kit/templates/stages/scope.md +34 -0
- package/payload/lifecycle-kit/templates/stages/spec.md +8 -0
- package/payload/lifecycle-kit/templates/stages/validate.md +8 -0
- package/payload/queue-kit/README.md +4 -1
- package/payload/queue-kit/SPEC.md +230 -6
- package/payload/queue-kit/bin/queue-edges.sh +78 -0
- package/payload/queue-kit/checks/check-queue-entry-budget.sh +5 -3
- package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +5 -0
- package/payload/queue-kit/gate-tests/queue-edges.test.sh +130 -0
- package/payload/queue-kit/smoke/install.sh +4 -1
- package/payload/queue-kit/templates/TASK-QUEUE.md +3 -0
- package/payload/site-kit/SPEC.md +135 -29
- package/payload/site-kit/checks/check-docs-render-fidelity.sh +100 -27
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-batch.test.sh +158 -0
- package/payload/site-kit/lib/site.sh +16 -2
- package/payload/site-kit/smoke/install.sh +9 -1
- package/payload/gate-sdk/checks/check-action-gh-repo.sh +0 -321
- package/payload/gate-sdk/checks/check-action-pinning.sh +0 -55
|
@@ -79,6 +79,12 @@ design *ruling* is design work — it goes to the deferred section
|
|
|
79
79
|
`[design-pending]` until scope rules on it. Enforced by
|
|
80
80
|
`check-amendment-queue`.
|
|
81
81
|
|
|
82
|
+
An amendment file is **outside the governed manifest**: `CANON_KIT_MANIFEST_FILES`
|
|
83
|
+
globs `*/SPEC.md`, which `SPEC-<name>.md` does not match, so the prose and knob
|
|
84
|
+
gates never scan one. Their obligations attach at the merge rather than at the
|
|
85
|
+
amendment — an amendment may carry a citation or a knob mention that would red
|
|
86
|
+
once integrated, and §Merging an amendment step 2 is where that debt comes due.
|
|
87
|
+
|
|
82
88
|
The tag is a **checksum on the promotion move**, not a second source of the
|
|
83
89
|
state its section already carries. Its redundancy is the mechanism: a
|
|
84
90
|
promotion crosses a section boundary *and* swaps the tag, so
|
|
@@ -132,7 +138,13 @@ supplies the checklist they invoke and the gate behind the promotion rule.
|
|
|
132
138
|
embedded wire-delta becomes a citation to the now-existing contract
|
|
133
139
|
file — the amendment's exemption is file-scoped, so once step 3 deletes
|
|
134
140
|
the file `check-spec-embedded-source` re-arms and a kept embed goes red.
|
|
135
|
-
3. Delete the amendment file; verify none remain for the component.
|
|
141
|
+
3. Delete the amendment file; verify none remain for the component. **The
|
|
142
|
+
none-remain half is discharged at the iteration, not at the commit** — with
|
|
143
|
+
sibling amendments in flight for one component, only the batch merging the
|
|
144
|
+
last of them can satisfy it, and the earlier batches' identical assertions are
|
|
145
|
+
unsatisfiable at their own commits. The horizon is the iteration because the
|
|
146
|
+
build stage stays resident until the queue empties and close refuses entry on
|
|
147
|
+
a non-empty active queue.
|
|
136
148
|
4. Move the queue entry to `## Done`, dropping its `[spec:]` tag — the
|
|
137
149
|
amendment it referenced is gone, and `check-amendment-queue` requires
|
|
138
150
|
every `[spec:]` ref to resolve to a file on disk.
|
|
@@ -299,6 +311,15 @@ unset, and the loader exits 2 on a malformed config. Knobs:
|
|
|
299
311
|
kit literal (the provenance seam). This repo sets
|
|
300
312
|
`bash scripts/install-transports.sh`, `^(Quick start|Install)`, and
|
|
301
313
|
`("docs/posts/*")`.
|
|
314
|
+
- `CANON_KIT_PAYLOAD_CLAIMS_CMD` — a consumer command emitting the payload
|
|
315
|
+
disclosure classes `check-payload-claim` holds, one `<claim-id>`⇥`<ERE>` line
|
|
316
|
+
per class, default empty ⇒ clean skip (the correct posture for a tree whose
|
|
317
|
+
payload discloses one thing only). `CANON_KIT_PAYLOAD_CLAIM_EXCLUDE` — array
|
|
318
|
+
of globs dropped from that gate's scanned set on top of
|
|
319
|
+
`CANON_KIT_MDREF_EXCLUDE`, default empty. A spelling of what a payload
|
|
320
|
+
discloses is one project's distribution model, so it is consumer config for
|
|
321
|
+
the same provenance-seam reason the transport vocabulary above is. This repo
|
|
322
|
+
sets `bash scripts/payload-claims.sh` and `("docs/posts/*")`.
|
|
302
323
|
- `CANON_KIT_COMMENT_MACHINE` / `CANON_KIT_COMMENT_REASON` — arrays, default
|
|
303
324
|
empty: extra directive prefixes appended to the built-in kit-mechanism
|
|
304
325
|
roster (a consumer's product vocabulary). `CANON_KIT_COMMENT_SURFACE` —
|
|
@@ -352,6 +373,16 @@ each degrading to "no icebox" rather than to a wrong section when left unset. Va
|
|
|
352
373
|
|
|
353
374
|
## Per-component contracts
|
|
354
375
|
|
|
376
|
+
Each gate below owns its own section — the assertion, its fixture pair, and the
|
|
377
|
+
reason for any bespoke unit test beside it. The bespoke unit tests are named
|
|
378
|
+
together here, because a roster spread across per-gate sections is one no reader
|
|
379
|
+
and no oracle sees whole: `check-comment-tier.test.sh`,
|
|
380
|
+
`check-deprecation-task.test.sh`, `check-docs-link-convention.test.sh`,
|
|
381
|
+
`check-knob-citation.test.sh`, `check-knob-default-coupling.test.sh`,
|
|
382
|
+
`check-manifest-count.test.sh`, `check-md-refs.test.sh`,
|
|
383
|
+
`check-prose-enum.test.sh`, `check-spec-dod-singleton.test.sh` and
|
|
384
|
+
`check-tracking-claim.test.sh`.
|
|
385
|
+
|
|
355
386
|
### lib/spec.sh
|
|
356
387
|
|
|
357
388
|
The sourced config loader plus shared adapters — values and adapters only,
|
|
@@ -367,7 +398,24 @@ same shapes:
|
|
|
367
398
|
never disagree on the set — and a done slug for a bare-slug bullet outside
|
|
368
399
|
them; the single grammar `check-todo-task-liveness`
|
|
369
400
|
and `check-deprecation-task` resolve a `task: <slug>` binding through (each
|
|
370
|
-
caller builds its own live/done map and fail-closes on the walk status).
|
|
401
|
+
caller builds its own live/done map and fail-closes on the walk status). That
|
|
402
|
+
walk's bullet lead-line predicate is re-implemented here rather than sourced,
|
|
403
|
+
making canon-kit one of the format's independent holders under the
|
|
404
|
+
re-implement-and-cite-from-both-ends rule
|
|
405
|
+
(queue-kit/SPEC.md §The queue format); the holder census and the residue it
|
|
406
|
+
leaves live at gate-sdk/SPEC.md §check-gate-exemption-tasks.
|
|
407
|
+
- **The governed comment surface:** `spec_comment_surface` and
|
|
408
|
+
`spec_comment_surface_with_templates` — the one corpus primitive
|
|
409
|
+
`check-spec-pointer`, `check-comment-tier`, `check-todo-task-liveness` and
|
|
410
|
+
`check-deprecation-task` all call, the pair differing only in whether
|
|
411
|
+
`templates/` sources are pruned. Its file set spans **both gate declaration
|
|
412
|
+
spellings and the ported implementation**: `*.sh`, the `*.gate` descriptor,
|
|
413
|
+
and `*.rs`. Stated once here rather than at each of the four callers, since a
|
|
414
|
+
gate whose rule became a compiled subcommand must not have its `# spec:`
|
|
415
|
+
pointer, its comment tier, or a `TODO(task:)` marker silently drop out of
|
|
416
|
+
coverage — the widening is made at the shared primitive so no caller can
|
|
417
|
+
inherit a narrower corpus than its siblings
|
|
418
|
+
(gate-sdk/SPEC.md §Meta-gate conservation for the binary substrate).
|
|
371
419
|
- **Finders:** the canonical-spec / amendment finders the spec-scanning gates
|
|
372
420
|
share, and the manifest-set finder the narration-gate family shares —
|
|
373
421
|
canonical specs plus `README.md`/`CLAUDE.md`, amendments excluded — so its
|
|
@@ -389,17 +437,30 @@ same shapes:
|
|
|
389
437
|
matches the same total shapes — including a total whose cardinal and noun
|
|
390
438
|
straddle a prose wrap, reported at the cardinal's physical line. The boundary
|
|
391
439
|
rule and the mechanical exemptions live in one shared fragment, so no sibling
|
|
392
|
-
drifts from another in what it counts as a total (§check-manifest-count).
|
|
440
|
+
drifts from another in what it counts as a total (§check-manifest-count). That
|
|
441
|
+
boundary guards a prose **noun** against gluing to a following word ("gate"
|
|
442
|
+
inside "gatekeepers") — a different rule from the enum matcher's **identifier**
|
|
443
|
+
boundary (§check-prose-enum), which the two once spelled alike and only
|
|
444
|
+
half-alike at that. English nouns do not compound across underscores, so the
|
|
445
|
+
noun rule stays as it is; the shared spelling was never a shared rule.
|
|
393
446
|
- **The enum sets** arrive through the consumer's `CANON_KIT_ENUM_SETS_CMD`,
|
|
394
447
|
validated and fail-closing (exit 2) on a command error or an unparsable line
|
|
395
448
|
(§check-prose-enum).
|
|
396
|
-
- **The
|
|
397
|
-
`
|
|
449
|
+
- **The claim vocabularies** arrive the same way, through
|
|
450
|
+
`spec_claim_vocabulary <command> <label>` — one loader for every
|
|
451
|
+
`<id>`⇥`<ERE>` vocabulary a claim gate reads, taking the command as an
|
|
452
|
+
argument rather than from one named knob so a second claim axis costs a caller
|
|
453
|
+
and not a second copy. It carries the
|
|
398
454
|
same fail-closed contract its enum-set sibling does — a command error, an
|
|
399
|
-
unparsable line, an id that is not slug-shaped, or a repeated id is exit 2
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
455
|
+
unparsable line, an id that is not slug-shaped, or a repeated id is exit 2 —
|
|
456
|
+
and the `<label>` it is given names the failing vocabulary in every message,
|
|
457
|
+
so a fail-closed exit still says which one failed. The duplicate check is what
|
|
458
|
+
a bare emit grammar cannot express and both gates need: two lines claiming one
|
|
459
|
+
id would give a class two patterns and make its match order arbitrary. Its
|
|
460
|
+
callers are `spec_install_transports`, over
|
|
461
|
+
`CANON_KIT_INSTALL_TRANSPORTS_CMD` (§check-install-claim), and
|
|
462
|
+
`check-payload-claim` directly, over `CANON_KIT_PAYLOAD_CLAIMS_CMD`
|
|
463
|
+
(§check-payload-claim).
|
|
403
464
|
- **The comment-surface adapters:** the comment gates read *different* surfaces.
|
|
404
465
|
`check-spec-pointer` scans the template-pruned surface — a template's `spec:`
|
|
405
466
|
line is an unresolvable-by-design placeholder (§check-spec-pointer);
|
|
@@ -606,8 +667,25 @@ Set declarations are consumer config, never gate literals (the provenance seam):
|
|
|
606
667
|
emitting one `<set-name>`⇥`<member>` line per member, loaded through
|
|
607
668
|
`spec_enum_sets` (§lib/spec.sh); a command that fails or a line that does not
|
|
608
669
|
parse is fail-closed (exit 2). A member matches word-bounded — bracketed
|
|
609
|
-
(`[spec:]`) or bare (`spec`), neither an alphanumeric
|
|
610
|
-
stem never matches inside a longer tag
|
|
670
|
+
(`[spec:]`) or bare (`spec`), neither an alphanumeric, a hyphen, nor an
|
|
671
|
+
underscore abutting, so a stem never matches inside a longer tag, and an
|
|
672
|
+
**underscore-separated identifier never reads as present inside a longer
|
|
673
|
+
sibling**: `guard_allow` is named by "the `guard_allow` helper" and not by "the
|
|
674
|
+
`guard_allow_match` pair", which is what a reader means by both sentences. A
|
|
675
|
+
member that falsely reads as present is one the gate stops asking about, so the
|
|
676
|
+
paragraph omitting it reports clean — the silent direction, and the reason the
|
|
677
|
+
class holds the whole identifier rather than most of it. `.` and `/` stay
|
|
678
|
+
*outside* the class deliberately, and that is what makes the identifier reading
|
|
679
|
+
exactly one character wide: a basename member matches prose spelling the file
|
|
680
|
+
kit-relative, repo-relative or bare (below), which admitting either would break.
|
|
681
|
+
The attested drift used bare stems.
|
|
682
|
+
The grammar stays two fields. A third, scoping a set to a whole file rather than
|
|
683
|
+
a paragraph, was weighed against a **cross-document** absence — members spread
|
|
684
|
+
over per-section prose, which a paragraph-scoped judge structurally cannot see —
|
|
685
|
+
and refused: it changes a wire grammar whose fail-closed rule rejects a third
|
|
686
|
+
field, and a document-scoped completeness test has a far worse false-positive
|
|
687
|
+
profile, since any mention anywhere satisfies it. Reshaping such prose into a
|
|
688
|
+
roster the paragraph judge can read closes the same case with no grammar change.
|
|
611
689
|
|
|
612
690
|
The scanned set and the paragraph walk are the shared `spec_manifest_files`
|
|
613
691
|
finder and `spec_manifest_walk_awk` driver (§lib/spec.sh); this gate's
|
|
@@ -637,12 +715,50 @@ two roles are separate sets because a paragraph naming one role's tags is not
|
|
|
637
715
|
enumerating the other. A set a consumer can only hand-list is that consumer's
|
|
638
716
|
own drift to own; the kit contract asks only for the emit grammar.
|
|
639
717
|
|
|
718
|
+
The same emitter adds two roster families over the kit tree, one set per kit
|
|
719
|
+
root: a `<kit>-lib` set of the tracked top-level `lib/*.sh` basenames and a
|
|
720
|
+
`<kit>-gate-test` set of the tracked top-level `gate-tests/*.test.sh` basenames,
|
|
721
|
+
with the roots read from `gate_kit_roots_rel` (gate-sdk/SPEC.md §lib/gate.sh) so
|
|
722
|
+
the sets cannot enumerate a tree the battery does not. A new kit, lib or unit
|
|
723
|
+
test enrols with no edit, which is the property a hand correction per stale
|
|
724
|
+
roster would not have. Members are basenames rather than paths because a
|
|
725
|
+
basename matches prose spelling the file kit-relative, repo-relative or bare —
|
|
726
|
+
the boundary rule above accepts the leading slash. The families fail closed
|
|
727
|
+
where an empty result contradicts the shape they read (no kit roots at all, or a
|
|
728
|
+
`lib/` tracking no top-level `*.sh`) and stay silent where emptiness is real: a
|
|
729
|
+
`gate-tests/` holding only `good/`+`bad/` fixture directories ships no bespoke
|
|
730
|
+
unit test, and that is a normal kit.
|
|
731
|
+
|
|
732
|
+
Two further families — a per-lib set of its function names, and a per-lib set of
|
|
733
|
+
the files sourcing it — were derived, measured against this tree and refused;
|
|
734
|
+
the reason is recorded so neither is re-minted. Both fail on one property: a
|
|
735
|
+
lib's functions and its sourcers are a vocabulary prose *discusses*, not a set
|
|
736
|
+
prose *rosters*, so the set-difference is real while the finding is false. The
|
|
737
|
+
function family reported an omission at every passage explaining how two helpers
|
|
738
|
+
interact, none of them a roster — the measurement that is dispositive on its own,
|
|
739
|
+
and the one that produced the rule this paragraph ends on. The refusal rests on
|
|
740
|
+
that ground alone. It rests **not at all** on the matcher, which bounds an
|
|
741
|
+
identifier on the underscore too (above), so `guard_allow` is absent from a
|
|
742
|
+
paragraph naming only `guard_allow_match`: a refusal resting partly on a broken
|
|
743
|
+
matcher would invite exactly the wrong inference — fix the matcher, re-mint the
|
|
744
|
+
family. That matcher defect was sighted while measuring this very family, which
|
|
745
|
+
is where the identifier boundary rule came from and why the family is named here
|
|
746
|
+
as its origin rather than as a second reason to refuse.
|
|
747
|
+
The caller family's one intended site is a caller roster written as narrative, which
|
|
748
|
+
the hand-list adjacency rule correctly declines to judge, so it was inert there
|
|
749
|
+
while still firing falsely on a README row naming two of a kit's tools. The rule
|
|
750
|
+
the pair teaches: declare a derived set when the tree shape it reads is one the
|
|
751
|
+
prose rosters — a layout is such a shape, an incidental relation is not.
|
|
752
|
+
|
|
640
753
|
Calibration follows the count gate's procedure: tuned against this tree, every
|
|
641
754
|
hit dispositioned — cite the set, complete the list, or site-exempt with reason.
|
|
642
755
|
The good/bad pair covers a bare comma hand list dropping a member and the
|
|
643
756
|
marked-subset cases; `check-prose-enum.test.sh` covers the config-driven paths
|
|
644
757
|
(the empty-default skip, the fail-closed escapes, bracketed matching, multi-set
|
|
645
|
-
independence, the exempt escapes
|
|
758
|
+
independence, the exempt escapes, and the identifier boundary's prefix-sibling
|
|
759
|
+
pair) the pair cannot reach — the boundary case needs a declared set holding
|
|
760
|
+
underscore members, which is a config no pair running on the consumer's own
|
|
761
|
+
hyphenated sets can supply. `precommit` tier.
|
|
646
762
|
|
|
647
763
|
### check-knob-citation
|
|
648
764
|
|
|
@@ -785,7 +901,9 @@ topology exists). `align-only` tier.
|
|
|
785
901
|
|
|
786
902
|
Invariant: every full-line comment on a governed source is one of — a
|
|
787
903
|
machine directive (a comment a tool parses: `graph:`, `shellcheck`,
|
|
788
|
-
`contract:`
|
|
904
|
+
`contract:`, `smoke-unregistered:` — the last read by
|
|
905
|
+
`run-consumer-smoke.sh` off a kit's vendored `smoke/install.sh`, gate-sdk/SPEC.md
|
|
906
|
+
§Consumer smoke), a reason directive (a spec pointer, usage synopsis, or
|
|
789
907
|
positional justification: `spec:`, `usage:`, `exception-list:`,
|
|
790
908
|
`no-fixture:`, `assertion`, `permanent:`, `TODO(task:`,
|
|
791
909
|
`TODO(spec-ambiguity)`, which blesses a bounded window — its own line plus
|
|
@@ -810,6 +928,16 @@ second copy no gate reads. `comment-tier-exempt: <reason>` is the honest
|
|
|
810
928
|
directive for a genuinely-local fact below SPEC altitude that neither tier
|
|
811
929
|
owns.
|
|
812
930
|
|
|
931
|
+
The governed-source corpus reaches the **implementation of a ported gate**, not
|
|
932
|
+
just shell — `spec_comment_surface_with_templates` (§lib/spec.sh), which owns
|
|
933
|
+
the file set. This is the load-bearing half of the reader
|
|
934
|
+
partition gate-sdk/SPEC.md §The `# graph:` manifest states — locality-class
|
|
935
|
+
directives bind to a line of implementation and therefore stay there, so the
|
|
936
|
+
tier rule has to follow them across the substrate or go dark exactly where it
|
|
937
|
+
still applies. A descriptor's own lines are directives by construction. Marker
|
|
938
|
+
matching is on the **token**, independent of the comment leader, so `//` and `#`
|
|
939
|
+
carry the same directives and no language earns a quieter standard.
|
|
940
|
+
|
|
813
941
|
One shape overrides the window: a full-line comment carrying a **restated
|
|
814
942
|
collection total** — the count grammar of §check-manifest-count, over the same
|
|
815
943
|
`CANON_KIT_COUNT_COLLECTIONS` vocabulary — is flagged even where a directive
|
|
@@ -857,7 +985,16 @@ this gate governs them, where
|
|
|
857
985
|
workflow directory's **tracked** members blessing only `contract:`/`see`,
|
|
858
986
|
whatever their extension (the capture tier is gitignored and headerless, so
|
|
859
987
|
tracking is the filter, not the suffix — gate-sdk/SPEC.md §The workflow
|
|
860
|
-
directory)
|
|
988
|
+
directory). On a **markdown** member of that directory a `##`-or-deeper line is
|
|
989
|
+
the surface's own block grammar rather than a comment, and is read as an
|
|
990
|
+
ordinary content line: a workflow surface whose records *are* `## ` blocks
|
|
991
|
+
(lifecycle-kit/SPEC.md §The survey record) would otherwise have every record
|
|
992
|
+
heading flagged as untagged prose, and no tagging is available that would not
|
|
993
|
+
put a directive inside the data. The narrowing costs no coverage — the member's
|
|
994
|
+
`# contract:` header is still classified here, and its tier and header payload
|
|
995
|
+
are `check-workflow-tiering`'s (gate-sdk/SPEC.md §The workflow directory) — and
|
|
996
|
+
it is deliberately extension-scoped rather than content-sniffed, so a `.txt`
|
|
997
|
+
data member's `#` lines stay comments;
|
|
861
998
|
slash-comment parsing (`//`, `/* */`, doc-comments, heredoc skipping) ships
|
|
862
999
|
as mechanism and activates when a consumer widens `CANON_KIT_COMMENT_SURFACE`
|
|
863
1000
|
to a language that needs it. Positional rescue is language-agnostic — its
|
|
@@ -878,8 +1015,14 @@ pointer **directive** on a governed source resolves, and every free-prose
|
|
|
878
1015
|
directive set is exactly what `check-comment-tier` blesses by shape: full-line
|
|
879
1016
|
`spec:` / `contract:` comments on the governed sources, plus the `# contract:`
|
|
880
1017
|
headers on the workflow directory's **tracked** members (gate-sdk/SPEC.md §The
|
|
881
|
-
workflow directory owns that tier
|
|
882
|
-
and
|
|
1018
|
+
workflow directory owns that tier). That section rules two `contract:` payloads,
|
|
1019
|
+
and this gate honours both: a **version-marker** payload (`<format-name> v<N>`,
|
|
1020
|
+
matched on that section's own anchored shape, and only after `contract:` — a
|
|
1021
|
+
`spec:` directive wearing the shape still resolves as a path) is a wire-format
|
|
1022
|
+
version its owning gate parses, so it names no path, resolves as none, and is
|
|
1023
|
+
counted on the clean line rather than skipped silently. Discriminating it here is
|
|
1024
|
+
what keeps the form usable without a per-consumer whitelist entry. A directive's
|
|
1025
|
+
target grammar is
|
|
883
1026
|
`<path> [§<heading>]`: `<path>` (repo-relative) must be a tracked file, and when
|
|
884
1027
|
a `§<heading>` fragment is present the file must carry a matching markdown
|
|
885
1028
|
heading; a pointer without `§` resolves file-only. Reddens on a missing or
|
|
@@ -892,8 +1035,8 @@ heading while the structured directive and the markdown-link anchor were both
|
|
|
892
1035
|
verdict-checked. It scans the manifest set (`spec_manifest_files`, the same
|
|
893
1036
|
surface the manifest-narration gate family reads) over a blank-line-delimited
|
|
894
1037
|
paragraph join so a heading that wraps a line reassembles, and resolves the
|
|
895
|
-
heading through
|
|
896
|
-
|
|
1038
|
+
heading through one shared resolution path — the directive pass and the
|
|
1039
|
+
citation pass call the same helper, so they cannot diverge. Free prose runs on past the heading with no delimiter, so
|
|
897
1040
|
the citation pass matches a heading as a boundary-anchored **prefix** of the
|
|
898
1041
|
fragment where the directive pass matches it whole. A cited path that is not a
|
|
899
1042
|
tracked file is out of this pass's scope — path liveness stays with the gates
|
|
@@ -1160,13 +1303,17 @@ gate body, config, a directory: files the site does not render — cites the tre
|
|
|
1160
1303
|
with an absolute GitHub blob link
|
|
1161
1304
|
`https://<host>/<owner>/<repo>/blob/<ref>/<path>[#anchor]`, anchored when it
|
|
1162
1305
|
names a section, because a relative link into the unrendered surrounding tree
|
|
1163
|
-
would 404 on a site that serves `docs/` alone.
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1306
|
+
would 404 on a site that serves `docs/` alone. **That prescription is held by
|
|
1307
|
+
`check-docs-link-convention`'s off-root rule** (§check-docs-link-convention
|
|
1308
|
+
below): a relative link whose target resolves outside the site root is a
|
|
1309
|
+
violation, so the requirement above is enforced rather than merely stated.
|
|
1310
|
+
Both are the downward-citation shape of the tiering topology, one on-site and
|
|
1311
|
+
one off. Resolution of the blob form belongs to `check-md-refs`' self-repo pass
|
|
1312
|
+
(identity derivation and the ref knob live there); `check-docs-link-convention`
|
|
1313
|
+
owns the shape of the relative links that stay inside `docs/`. The mirror is
|
|
1314
|
+
what a site opts into, not a precondition of the grammar: absent a published
|
|
1315
|
+
mirror, rendered-document references fall back to the same off-site blob form
|
|
1316
|
+
as source references.
|
|
1170
1317
|
|
|
1171
1318
|
### check-docs-link-convention
|
|
1172
1319
|
|
|
@@ -1187,6 +1334,20 @@ there:
|
|
|
1187
1334
|
back to that same kit's own `README.md` or `SPEC.md` must carry a `#section`
|
|
1188
1335
|
anchor. A page cites downward into a *named* section, never at the whole spec —
|
|
1189
1336
|
the anti-restatement doctrine expressed as a link shape.
|
|
1337
|
+
- **No off-root relative link.** A relative link whose target *resolves* to an
|
|
1338
|
+
existing path outside `CANON_KIT_LINK_ROOT` must instead cite the absolute
|
|
1339
|
+
self-repo blob form (§The reference-link grammar). The rule turns on the
|
|
1340
|
+
resolved path, not the link text, so a `../`-prefixed link that resolves back
|
|
1341
|
+
under the root is silent. Only resolving targets are classified — a relative
|
|
1342
|
+
target that resolves to nothing is `check-md-refs`' finding alone, and this
|
|
1343
|
+
rule does not double-report it; a directory target outside the root still
|
|
1344
|
+
satisfies the first rule's predicate first and is reported there, once.
|
|
1345
|
+
Anchors and absolute URLs never fire, by the gate's existing scope. Generated
|
|
1346
|
+
mirror pages (`generated: true` front matter) are in scope, deliberately: their
|
|
1347
|
+
off-root conformance is a property of the generator that emits them, which is a
|
|
1348
|
+
thing that can regress, and exempting them would blind the corpus's larger half.
|
|
1349
|
+
The existing `docs-link-exempt: <reason>` valve suppresses this rule as it does
|
|
1350
|
+
the other two — no second valve.
|
|
1190
1351
|
|
|
1191
1352
|
The scanned tree is `CANON_KIT_LINK_ROOT` (default `docs`; the fixture pair
|
|
1192
1353
|
overrides it with a positional arg pointing at a synthetic tree), walked for
|
|
@@ -1264,6 +1425,19 @@ per transport through `CANON_KIT_INSTALL_TRANSPORTS_CMD`, loaded by
|
|
|
1264
1425
|
`spec_install_transports` (§lib/spec.sh) — because a kit literal spelling a
|
|
1265
1426
|
transport publishes one project's distribution model as a kit fact.
|
|
1266
1427
|
|
|
1428
|
+
**Where this gate ends and §check-payload-claim begins.** The two answer
|
|
1429
|
+
different questions and share only the vocabulary loader. This one is
|
|
1430
|
+
**positional and install-section-scoped**: naming a secondary transport is
|
|
1431
|
+
correct prose, so what it judges is which transport a selected section *leads*
|
|
1432
|
+
with. Its sibling is **membership over the whole governed document**, because a
|
|
1433
|
+
disclosure class other than the declared one has no correct-but-secondary form —
|
|
1434
|
+
it is wrong wherever it appears. The scopes do not coincide either, so neither
|
|
1435
|
+
gate is the other's second assertion pair: an install section under this repo's
|
|
1436
|
+
section regex is not where the disclosure claim is ruled, and folding a
|
|
1437
|
+
whole-document membership rule into a section-scoped positional gate would make
|
|
1438
|
+
this gate's name false and give one gate two unrelated calibrations to reason
|
|
1439
|
+
about on a red.
|
|
1440
|
+
|
|
1267
1441
|
The scanned set is `check-md-refs`' governed doc set (the manifest set minus
|
|
1268
1442
|
`CANON_KIT_MDREF_EXCLUDE`) minus `CANON_KIT_INSTALL_CLAIM_EXCLUDE`. Two
|
|
1269
1443
|
assertions:
|
|
@@ -1326,6 +1500,84 @@ select, and a published note the path valve keeps out of the scanned set. The
|
|
|
1326
1500
|
`# graph:` manifest couples the gate to the doc set and `scripts/*.sh`, so a
|
|
1327
1501
|
transport rename re-fires it over the docs. `precommit` tier.
|
|
1328
1502
|
|
|
1503
|
+
### check-payload-claim
|
|
1504
|
+
|
|
1505
|
+
Invariant: exactly one governed doc declares what a gate on the vendored payload
|
|
1506
|
+
discloses, and no scanned governed doc asserts a different disclosure class. Two
|
|
1507
|
+
assertions: (A) **singleton owner** — exactly one declaration exists across the
|
|
1508
|
+
scanned set; (B) **no contradicting assertion** — no scanned line matches the
|
|
1509
|
+
pattern of a class other than the declared one.
|
|
1510
|
+
|
|
1511
|
+
The claim's machine-readable owner is a full-line
|
|
1512
|
+
`<!-- payload-discloses: <claim-id> -->` HTML comment, the same
|
|
1513
|
+
tier-beside-the-prose shape §check-install-claim uses and for the same reason:
|
|
1514
|
+
the reader-facing form of this claim already exists as prose and must stay prose.
|
|
1515
|
+
It belongs in the section that rules the fact, which in this repo is
|
|
1516
|
+
gate-sdk/SPEC.md §Consumer payload. The disclosure vocabulary is consumer config
|
|
1517
|
+
— one `<claim-id>`⇥`<ERE>` line per class through
|
|
1518
|
+
`CANON_KIT_PAYLOAD_CLAIMS_CMD`, loaded by `spec_claim_vocabulary` (§lib/spec.sh)
|
|
1519
|
+
— because a spelling of what a payload discloses is one project's distribution
|
|
1520
|
+
model, and a kit literal carrying one would publish it. The scanned set is
|
|
1521
|
+
`check-md-refs`' governed doc set (the manifest set minus
|
|
1522
|
+
`CANON_KIT_MDREF_EXCLUDE`) minus `CANON_KIT_PAYLOAD_CLAIM_EXCLUDE` — the same
|
|
1523
|
+
composition its sibling uses, so a consumer configures one scanned-set idiom
|
|
1524
|
+
rather than two.
|
|
1525
|
+
|
|
1526
|
+
**Assertion A.** Zero declarations is the defect the gate exists for: nothing
|
|
1527
|
+
owns the claim, so an unbounded number of surfaces drift with nothing watching,
|
|
1528
|
+
and no reader can tell which surface is the one to believe. Two owners is that
|
|
1529
|
+
same defect wearing a different shape. A `<claim-id>` outside the configured
|
|
1530
|
+
vocabulary is **fail-closed (exit 2)** rather than a violation — with no
|
|
1531
|
+
resolvable declared class the gate holds nothing to compare a line against, so
|
|
1532
|
+
it must not run rather than pass.
|
|
1533
|
+
|
|
1534
|
+
**Assertion B.** Across each scanned document, any line matching the pattern of a
|
|
1535
|
+
class other than the declared one is a violation, wherever in the document it
|
|
1536
|
+
sits. Membership rather than position, because a non-declared disclosure class
|
|
1537
|
+
has no correct secondary form. The declaration line itself is skipped, since a
|
|
1538
|
+
claim is not evidence for itself. Fenced content is scanned, because a quoted
|
|
1539
|
+
recipe is exactly where a disclosure claim shows up in passing. The report names
|
|
1540
|
+
the offending class, because "wrong disclosure class" alone would leave the
|
|
1541
|
+
reader grepping.
|
|
1542
|
+
|
|
1543
|
+
**The declared class's own pattern is latent rather than unread.** Assertion B
|
|
1544
|
+
matches only the classes that are *not* declared, so the declared one's pattern
|
|
1545
|
+
does no work while it holds the declaration — and starts doing it the moment the
|
|
1546
|
+
declaration moves to another class. The vocabulary is a set of classes, not a set
|
|
1547
|
+
of live matchers, so a class is emitted with its pattern whether or not it is
|
|
1548
|
+
currently the declared one.
|
|
1549
|
+
|
|
1550
|
+
**One claim axis rather than a claim registry.** The shape behind this gate and
|
|
1551
|
+
its sibling — a declared owner, an id vocabulary, a scanned corpus — invites a
|
|
1552
|
+
registry keyed by claim name. Refused for now, with the reason recorded so it is
|
|
1553
|
+
not re-derived: one axis exists, this gate and its sibling already share the only
|
|
1554
|
+
piece worth sharing (the vocabulary loader), and a registry would mint an
|
|
1555
|
+
axis-name knob and an indirection to hold a single member. The refusal is cheap to reverse — a
|
|
1556
|
+
second axis is the trigger, and both gates would collapse into the registry with
|
|
1557
|
+
their vocabularies unchanged.
|
|
1558
|
+
|
|
1559
|
+
**Honest limits.** The gate is only as sharp as the emitted patterns, and a
|
|
1560
|
+
loosely-written one wins matches by accident — the same consumer-owned drift
|
|
1561
|
+
§check-install-claim states, since the kit contract asks for the emit grammar and
|
|
1562
|
+
never for the patterns. A claim phrased in a shape no emitted pattern recognizes
|
|
1563
|
+
is out of reach; what the gate converts is an unbounded prose corpus into a
|
|
1564
|
+
checkable one, not an English-language reader. And the scanned set is the
|
|
1565
|
+
manifest set, so a claim made on a surface the consumer has not brought into that
|
|
1566
|
+
set stays unheld.
|
|
1567
|
+
|
|
1568
|
+
Producer: the maintainer editing the section that rules the fact, plus the
|
|
1569
|
+
consumer's disclosure command; both are live tracked configuration in this repo,
|
|
1570
|
+
not fixture-only. Consumer: the committing operator via the output contract, and
|
|
1571
|
+
both assertions read the declaration's one field — at the membership check, at
|
|
1572
|
+
the declared-versus-other comparison, and in the violation report.
|
|
1573
|
+
|
|
1574
|
+
The good/bad pair covers the reintroduction path itself — one corrected sentence
|
|
1575
|
+
restored verbatim to its original overclaiming form — beside the near-miss
|
|
1576
|
+
sentences the pattern boundary must stay silent on and a published dated note the
|
|
1577
|
+
path valve keeps out of the scanned set. The `# graph:` manifest couples the gate
|
|
1578
|
+
to the governed doc set and `scripts/*.sh`, so an edit to a claim surface or to
|
|
1579
|
+
the vocabulary re-fires it. `precommit` tier.
|
|
1580
|
+
|
|
1329
1581
|
### check-prose-tells
|
|
1330
1582
|
|
|
1331
1583
|
The mechanical subset of the AI-prose tells — the machine-detectable patterns
|
|
@@ -1386,7 +1638,10 @@ by `check-prose-tells` at scan time and no other component.
|
|
|
1386
1638
|
|
|
1387
1639
|
### templates/
|
|
1388
1640
|
|
|
1389
|
-
`canon-config.sh` — the consumer config template
|
|
1641
|
+
`canon-config.sh` — the consumer config template: a two-line `# spec:` pointer
|
|
1642
|
+
to the §Layout and configuration knob table, so the table stays the one owner
|
|
1643
|
+
of the knob roster rather than a parallel copy in the template drifting
|
|
1644
|
+
against it.
|
|
1390
1645
|
`SPEC-amendment.md` — the amendment skeleton: delta sections plus the
|
|
1391
1646
|
Definition-of-Done checklist (causal completeness, no information lost on
|
|
1392
1647
|
merge, amendment deleted, none remaining, gaps filed as debt).
|
|
@@ -52,7 +52,7 @@ join_alt() { # a '|'-joined ERE alternation of bracket-escaped literals
|
|
|
52
52
|
# spec: canon-kit/SPEC.md §check-comment-tier — the built-in kit-mechanism roster
|
|
53
53
|
# (Checkwright's own directive names); the CANON_KIT_COMMENT_* knobs append a
|
|
54
54
|
# consumer's extras.
|
|
55
|
-
shell_colon=(graph: spec: contract: usage: exception-list: no-fixture: permanent: comment-tier-exempt: "TODO(task:" "TODO(spec-ambiguity)")
|
|
55
|
+
shell_colon=(graph: spec: contract: usage: exception-list: no-fixture: permanent: smoke-unregistered: comment-tier-exempt: "TODO(task:" "TODO(spec-ambiguity)")
|
|
56
56
|
# shellcheck disable=SC2034 # nameref-consumed by build_bless
|
|
57
57
|
shell_word=(shellcheck assertion)
|
|
58
58
|
shell_colon+=("${CANON_KIT_COMMENT_MACHINE[@]}" "${CANON_KIT_COMMENT_REASON[@]}")
|
|
@@ -139,6 +139,8 @@ STYLE == "hash" && hd != "" {
|
|
|
139
139
|
flush_block(0); next
|
|
140
140
|
}
|
|
141
141
|
STYLE == "hash" && FNR == 1 && /^#!/ { noncomment(); next }
|
|
142
|
+
# a markdown data surface's '##' section heading is structure, not a comment (MDHEAD)
|
|
143
|
+
STYLE == "hash" && MDHEAD == 1 && /^[ \t]*##/ { noncomment(); next }
|
|
142
144
|
STYLE == "hash" {
|
|
143
145
|
if ($0 ~ /^[ \t]*#/) { b = $0; sub(/^[ \t]*#/, "", b); record(b) }
|
|
144
146
|
else noncomment()
|
|
@@ -186,7 +188,10 @@ scanned=0
|
|
|
186
188
|
for f in "${SURFACE[@]}"; do
|
|
187
189
|
rel="${f#"$ROOT"/}"; rel="${rel#./}"
|
|
188
190
|
spec_comment_whitelisted "$rel" && continue
|
|
191
|
+
mdhead=0
|
|
189
192
|
case "$rel" in
|
|
193
|
+
# spec: canon-kit/SPEC.md §check-comment-tier — a workflow-dir markdown member's '##' headings are the surface's own block grammar, not comments; its '# contract:' header stays governed here and its tier stays governed by check-workflow-tiering
|
|
194
|
+
"${GATE_SDK_WORKFLOW_DIR:-.workflow}"/*.md) style="hash"; bless="$TXT_BLESS"; pos=""; mdhead=1 ;;
|
|
190
195
|
"${GATE_SDK_WORKFLOW_DIR:-.workflow}"/*) style="hash"; bless="$TXT_BLESS"; pos="" ;;
|
|
191
196
|
*.sh|*.bash) style="hash"; bless="$SHELL_BLESS"; pos="$POS_RE" ;;
|
|
192
197
|
*.txt) style="hash"; bless="$TXT_BLESS"; pos="" ;;
|
|
@@ -194,7 +199,7 @@ for f in "${SURFACE[@]}"; do
|
|
|
194
199
|
*) style="hash"; bless="$SHELL_BLESS"; pos="$POS_RE" ;;
|
|
195
200
|
esac
|
|
196
201
|
scanned=$((scanned + 1))
|
|
197
|
-
out="$(awk -v STYLE="$style" -v BLESS="$bless" -v POS="$pos" -v CAP="$CANON_KIT_COMMENT_RUN_CAP" -v SQ="'" -v DQ='"' -v XRE="$EXEMPT_RE" -v SK_QRE="$COUNT_QRE" -v SK_RRE="$COUNT_RRE" -v SK_PHRASES="$COUNT_PHRASES" "$AWKSRC" "$f")"; st=$?
|
|
202
|
+
out="$(awk -v STYLE="$style" -v MDHEAD="$mdhead" -v BLESS="$bless" -v POS="$pos" -v CAP="$CANON_KIT_COMMENT_RUN_CAP" -v SQ="'" -v DQ='"' -v XRE="$EXEMPT_RE" -v SK_QRE="$COUNT_QRE" -v SK_RRE="$COUNT_RRE" -v SK_PHRASES="$COUNT_PHRASES" "$AWKSRC" "$f")"; st=$?
|
|
198
203
|
fail_closed "$st" COMMENT-TIER "awk classifier ($rel)"
|
|
199
204
|
while IFS= read -r line; do
|
|
200
205
|
[[ -n "$line" ]] && errors+=("${line#"$ROOT"/}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=docs/*.md,docs/*/index.md,docs/posts/*.md dir=one valve=none tier=precommit
|
|
3
|
-
# spec: canon-kit/SPEC.md §check-docs-link-convention — docs pages cite downward: no directory-target relative link (name the file), a kit page's back-link to its own README/SPEC carries a #section anchor
|
|
3
|
+
# spec: canon-kit/SPEC.md §check-docs-link-convention — docs pages cite downward: no directory-target relative link (name the file), a kit page's back-link to its own README/SPEC carries a #section anchor, no relative link to a target resolving outside the docs root
|
|
4
4
|
#
|
|
5
5
|
# usage: check-docs-link-convention.sh [docs-root] (default CANON_KIT_LINK_ROOT;
|
|
6
6
|
# the optional arg points the fixture pair at a synthetic docs tree)
|
|
@@ -51,6 +51,11 @@ for f in "${pages[@]}"; do
|
|
|
51
51
|
exempt "$f" "$lno" || bad+=("$f:$lno: directory-target link '$tgt' → $p/ — name the file (e.g. $tgt/index.md), not the directory")
|
|
52
52
|
continue
|
|
53
53
|
fi
|
|
54
|
+
if [[ -e "$p" && "$p" != "$ROOT"/* ]]; then
|
|
55
|
+
exempt "$f" "$lno" \
|
|
56
|
+
|| bad+=("$f:$lno: off-root relative link '$tgt' → $p — resolves outside $ROOT/, so it 404s on a site served from $ROOT/ alone; cite it in the absolute self-repo blob form")
|
|
57
|
+
continue
|
|
58
|
+
fi
|
|
54
59
|
if [[ -n "$kit" && -z "$anchor" ]]; then
|
|
55
60
|
b="$(basename "$p")"
|
|
56
61
|
[[ ( "$b" == README.md || "$b" == SPEC.md ) && "$(basename "$(dirname "$p")")" == "$kit" ]] \
|
|
@@ -63,9 +68,11 @@ if [[ ${#bad[@]} -gt 0 ]]; then
|
|
|
63
68
|
echo "check-docs-link-convention: docs page link(s) break a shape convention (resolution is check-md-refs' job; this gate owns shape):"
|
|
64
69
|
printf ' %s\n' "${bad[@]}"
|
|
65
70
|
echo " help: name the file a directory link points at (kit/index.md, not kit/); give a kit page's"
|
|
66
|
-
echo " back-link to its own README/SPEC a #section anchor
|
|
67
|
-
echo "
|
|
71
|
+
echo " back-link to its own README/SPEC a #section anchor; cite a target outside the docs"
|
|
72
|
+
echo " root with the absolute self-repo blob form (canon-kit/SPEC.md §The reference-link"
|
|
73
|
+
echo " grammar) rather than relatively. Per-site valve: a 'docs-link-exempt: <reason>'"
|
|
74
|
+
echo " HTML comment on the link line or the one above."
|
|
68
75
|
exit 1
|
|
69
76
|
fi
|
|
70
|
-
echo "DOCS-LINK-CONVENTION: clean (${#pages[@]} docs page(s), $links relative link(s); no directory target, kit back-links anchored)"
|
|
77
|
+
echo "DOCS-LINK-CONVENTION: clean (${#pages[@]} docs page(s), $links relative link(s); no directory target, kit back-links anchored, no off-root relative target)"
|
|
71
78
|
exit 0
|
|
@@ -37,16 +37,29 @@ fi
|
|
|
37
37
|
# spec: canon-kit/SPEC.md §check-md-refs — the self-repo blob-link prefix, derived from origin through the shared gate.sh adapter (git@ and https forms normalize to one identity); CANON_KIT_DOCS_BLOB_REF is the ref policy, empty ⇒ no origin, the self-repo pass is skipped
|
|
38
38
|
self_repo_prefix="$(gate_self_repo_prefix "$CANON_KIT_DOCS_BLOB_REF")"
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
# spec: canon-kit/SPEC.md §check-md-refs — the tracked-file membership set, filled once from a single git ls-files pass rather than a per-link `git ls-files --error-unmatch` exec; check-ignore and the directory listing stay per-call (the fallback path, not the hot one)
|
|
41
|
+
declare -A TRACKED=()
|
|
42
|
+
while IFS= read -r -d '' _tf; do TRACKED["$_tf"]=1; done < <(git ls-files -z)
|
|
43
|
+
|
|
44
|
+
# spec: canon-kit/SPEC.md §check-md-refs — anchor_ok memoizes a target file's slug set on first use: one heading-extraction sed and one bulk slugify sed per file, however many anchors across however many links cite it, instead of re-forking sed per heading per link
|
|
45
|
+
declare -A ANCHOR_SLUGS=()
|
|
46
|
+
declare -A ANCHOR_SLUGS_DONE=()
|
|
44
47
|
|
|
45
48
|
anchor_ok() { # $1=target file, $2=anchor slug
|
|
46
|
-
local
|
|
47
|
-
|
|
48
|
-
[
|
|
49
|
-
|
|
49
|
+
local file="$1" headings s
|
|
50
|
+
if [[ -z "${ANCHOR_SLUGS_DONE[$file]:-}" ]]; then
|
|
51
|
+
ANCHOR_SLUGS_DONE["$file"]=1
|
|
52
|
+
headings="$(sed -nE 's/^#{1,6}[[:space:]]+(.*[^[:space:]])[[:space:]]*$/\1/p' "$file")"
|
|
53
|
+
if [[ -n "$headings" ]]; then
|
|
54
|
+
headings="${headings,,}"
|
|
55
|
+
ANCHOR_SLUGS["$file"]="$(sed -E 's/[^a-z0-9 _-]//g; s/ +/-/g' <<< "$headings")"
|
|
56
|
+
else
|
|
57
|
+
ANCHOR_SLUGS["$file"]=""
|
|
58
|
+
fi
|
|
59
|
+
fi
|
|
60
|
+
while IFS= read -r s; do
|
|
61
|
+
[[ "$s" == "$2" ]] && return 0
|
|
62
|
+
done <<< "${ANCHOR_SLUGS[$file]}"
|
|
50
63
|
return 1
|
|
51
64
|
}
|
|
52
65
|
|
|
@@ -54,7 +67,7 @@ target_resolves() { # $1=repo-relative path
|
|
|
54
67
|
local p="$1"
|
|
55
68
|
[[ "$p" == ..* ]] && return 1
|
|
56
69
|
if [[ -f "$p" ]]; then
|
|
57
|
-
|
|
70
|
+
[[ -n "${TRACKED[$p]:-}" ]] && return 0
|
|
58
71
|
git check-ignore -q -- "$p" && return 0
|
|
59
72
|
return 1
|
|
60
73
|
fi
|