checkwright 0.36.0 → 0.37.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.
Files changed (82) hide show
  1. package/package.json +2 -2
  2. package/payload/artifact/aarch64-apple-darwin/checkwright-gates +0 -0
  3. package/payload/artifact/aarch64-apple-darwin/checkwright-gates.sha256 +1 -1
  4. package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe +0 -0
  5. package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -1
  6. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates +0 -0
  7. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  8. package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates +0 -0
  9. package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates.sha256 +1 -1
  10. package/payload/artifact/x86_64-apple-darwin/checkwright-gates +0 -0
  11. package/payload/artifact/x86_64-apple-darwin/checkwright-gates.sha256 +1 -1
  12. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe +0 -0
  13. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -1
  14. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  15. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  16. package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates +0 -0
  17. package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates.sha256 +1 -1
  18. package/payload/canon-kit/README.md +1 -0
  19. package/payload/canon-kit/checks/check-comment-tier.gate +1 -1
  20. package/payload/canon-kit/checks/check-rule-id-coverage.gate +4 -0
  21. package/payload/canon-kit/gate-tests/check-amendment-queue.test.sh +39 -0
  22. package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +1 -0
  23. package/payload/canon-kit/gate-tests/check-comment-tier/bad/lib/rules.rs +5 -0
  24. package/payload/canon-kit/gate-tests/check-comment-tier/bad/scripts/canon-config.knobs +5 -0
  25. package/payload/canon-kit/gate-tests/check-comment-tier/good/expect.txt +1 -1
  26. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.rs +1 -0
  27. package/payload/canon-kit/gate-tests/check-comment-tier/good/scripts/canon-config.knobs +5 -0
  28. package/payload/canon-kit/gate-tests/check-comment-tier/good/src/rules.rs +5 -0
  29. package/payload/canon-kit/gate-tests/check-rule-id-coverage/bad/expect.txt +3 -0
  30. package/payload/canon-kit/gate-tests/check-rule-id-coverage/bad/scripts/canon-config.knobs +5 -0
  31. package/payload/canon-kit/gate-tests/check-rule-id-coverage/bad/specs/access.md +7 -0
  32. package/payload/canon-kit/gate-tests/check-rule-id-coverage/bad/specs/export.md +3 -0
  33. package/payload/canon-kit/gate-tests/check-rule-id-coverage/bad/src/rules.rs +5 -0
  34. package/payload/canon-kit/gate-tests/check-rule-id-coverage/good/expect.txt +1 -0
  35. package/payload/canon-kit/gate-tests/check-rule-id-coverage/good/scripts/canon-config.knobs +7 -0
  36. package/payload/canon-kit/gate-tests/check-rule-id-coverage/good/specs/access.md +9 -0
  37. package/payload/canon-kit/gate-tests/check-rule-id-coverage/good/specs/export.md +3 -0
  38. package/payload/canon-kit/gate-tests/check-rule-id-coverage/good/src/rules.rs +7 -0
  39. package/payload/canon-kit/gate-tests/check-unmarked-claim.test.sh +2 -2
  40. package/payload/doctrine-kit/DOCTRINE.md +1 -1
  41. package/payload/evidence-kit/README.md +8 -5
  42. package/payload/evidence-kit/checks/check-test-control.gate +4 -0
  43. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/validate-evidence.txt +2 -2
  44. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/validate-evidence.txt +2 -2
  45. package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +56 -7
  46. package/payload/evidence-kit/gate-tests/check-test-control/bad/TASK-QUEUE.md +1 -0
  47. package/payload/evidence-kit/gate-tests/check-test-control/bad/WORKFLOW-STATE.txt +4 -0
  48. package/payload/evidence-kit/gate-tests/check-test-control/bad/args +5 -0
  49. package/payload/evidence-kit/gate-tests/check-test-control/bad/expect.txt +2 -0
  50. package/payload/evidence-kit/gate-tests/check-test-control/bad/scripts/evidence-config.knobs +4 -0
  51. package/payload/evidence-kit/gate-tests/check-test-control/bad/since-baseline.txt +2 -0
  52. package/payload/evidence-kit/gate-tests/check-test-control/bad/validate-baseline.txt +4 -0
  53. package/payload/evidence-kit/gate-tests/check-test-control/bad/validate-evidence.txt +3 -0
  54. package/payload/evidence-kit/gate-tests/check-test-control/good/TASK-QUEUE.md +1 -0
  55. package/payload/evidence-kit/gate-tests/check-test-control/good/WORKFLOW-STATE.txt +4 -0
  56. package/payload/evidence-kit/gate-tests/check-test-control/good/args +5 -0
  57. package/payload/evidence-kit/gate-tests/check-test-control/good/expect.txt +1 -0
  58. package/payload/evidence-kit/gate-tests/check-test-control/good/scripts/evidence-config.knobs +4 -0
  59. package/payload/evidence-kit/gate-tests/check-test-control/good/since-baseline.txt +2 -0
  60. package/payload/evidence-kit/gate-tests/check-test-control/good/validate-baseline.txt +3 -0
  61. package/payload/evidence-kit/gate-tests/check-test-control/good/validate-evidence.txt +3 -0
  62. package/payload/evidence-kit/gate-tests/check-test-control.test.sh +121 -0
  63. package/payload/evidence-kit/gate-tests/pre-hook.test.sh +18 -2
  64. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +1 -1
  65. package/payload/evidence-kit/gate-tests/run-member-door.test.sh +1 -1
  66. package/payload/evidence-kit/gate-tests/statement-store.test.sh +64 -0
  67. package/payload/evidence-kit/gate-tests/test-control-run.test.sh +91 -0
  68. package/payload/evidence-kit/gate-tests/verify-gate-run-strict.test.sh +121 -0
  69. package/payload/evidence-kit/templates/evidence-config.knobs +7 -0
  70. package/payload/gate-sdk/gate-tests/binary-only-recipe.test.sh +125 -0
  71. package/payload/gate-sdk/gate-tests/lib-test-hermetic.test.sh +19 -1
  72. package/payload/gate-sdk/gate-tests/run-for-path.test.sh +16 -1
  73. package/payload/gate-sdk/lib/test-hermetic.sh +6 -1
  74. package/payload/lifecycle-kit/README.md +4 -0
  75. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +1 -1
  76. package/payload/lifecycle-kit/gate-tests/peer-channel.test.sh +150 -0
  77. package/payload/lifecycle-kit/templates/stages/close.md +2 -2
  78. package/payload/lifecycle-kit/templates/stages/scope.md +2 -0
  79. package/payload/lifecycle-kit/templates/stages/validate.md +1 -1
  80. package/payload/queue-kit/gate-tests/roadmap.test.sh +1 -1
  81. package/payload/site-kit/gate-tests/check-docs-since/bad/expect.txt +1 -0
  82. package/payload/site-kit/gate-tests/check-docs-since/bad/site/twice.md +9 -0
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "checkwright-pwsh": "bin/checkwright.ps1"
5
5
  },
6
6
  "checkwright": {
7
- "commit": "9f3480b6d0c86836064e6230d101b5bc6528dabc",
7
+ "commit": "d504ae4e87881881bf214e05521d475d1c874328",
8
8
  "spec_base_url": "https://checkwright.dev"
9
9
  },
10
10
  "description": "Reproducible checks that catch unsupported claims in coding-agent delivery before merge: a task marked done with no recorded test run, a skipped lifecycle stage, a spec naming a file the tree lacks. They prove the evidence a claim rests on exists, not that the code is correct.",
@@ -30,5 +30,5 @@
30
30
  "type": "git",
31
31
  "url": "git+https://github.com/checkwright/checkwright.git"
32
32
  },
33
- "version": "0.36.0"
33
+ "version": "0.37.0"
34
34
  }
@@ -1 +1 @@
1
- 2fb7ef0dd6b19fb3fedc95530d161084b29abbc596da7f1b0fb50a18870de0bc checkwright-gates
1
+ a32df8289ae3f7b900d9497c110d40cb7baa78b3076b926373b6b3dae96c5557 checkwright-gates
@@ -1 +1 @@
1
- 32f709e0435628ef3f10176fb00973dfd8bb8988014f5d1949e98898be6a92a8 *checkwright-gates.exe
1
+ fc003cff11bb93bd3819618f0535a1e0c3fa3ef5252d416fcba44b676846a4aa *checkwright-gates.exe
@@ -1 +1 @@
1
- 587bb0c812adc769e5fc43bf9c3d890737020be232ceebebd1032bdab3077a81 checkwright-gates
1
+ 578dce6e505f7405b20ed41a7160341088d45fc4eff046cb5d9aa0faac88c93a checkwright-gates
@@ -1 +1 @@
1
- d6bca511369d7d7838dfe1dad0801e034cfe4476f45ce76fefd3c80c6ffb38ad checkwright-gates
1
+ 945b49d305b822ae7f982c2eb63f9a017e7d983df83557d16c889ce139a1635d checkwright-gates
@@ -1 +1 @@
1
- 1abb74faaacf5872c91c343ac8f84694e527cbfaa02741e86abb88aef182cf72 checkwright-gates
1
+ 50ceec32d0fbe00b27884dbe25aba28d8f36f0c8c71bf0eb5637b8a18159bfbd checkwright-gates
@@ -1 +1 @@
1
- ff5174fbc2df3fdeeb8a5ecd3ebafa34598e0b9a92ccc79068090861a3777d46 *checkwright-gates.exe
1
+ 03506ead66ccfcfea415195e4e0484f2681038139eb0fd4dd6b01dce148e0827 *checkwright-gates.exe
@@ -1 +1 @@
1
- 16b01e72fe59d4cb0532246427040279a022fac05e55e3abe7ccc0563a4d49e2 checkwright-gates
1
+ 855372d495c45ef05686187b7234dd49fe81c7dd96c83d42c51339626ef18622 checkwright-gates
@@ -1 +1 @@
1
- 64f01bdf2de280b8cdaaeb5fabf503465c4b5684ea05ee5ae91be94d3c16b355 checkwright-gates
1
+ 44a607f52c4f6568af711b6e58d1b91ef0689661582e58ee7e7678d8b45fece4 checkwright-gates
@@ -43,6 +43,7 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required); the queue-facing gate
43
43
  check-tracking-claim # a path's tracking status in prose agrees with git
44
44
  check-task-path-claim # needs task lists (a ticked task names only paths that exist)
45
45
  check-task-label-resolution # needs task lists and label families (a cited label resolves beside it)
46
+ check-rule-id-coverage # needs rule families (a declared id is cited once and a cited id is declared)
46
47
  check-delta-agreement # needs deltas and their families (a delta agrees with its base on which items exist)
47
48
  check-prose-enum # partial enumeration of a governed set
48
49
  check-md-refs # internal markdown links resolve
@@ -1,3 +1,3 @@
1
- # graph: couples=*.sh,*.gate,knob:GATE_SDK_WORKFLOW_DIR/*,knob:CANON_KIT_COMMENT_SURFACE,*.yml,*.yaml,knob:CANON_KIT_COMMENT_ACTIONS dir=one valve=none tier=precommit
1
+ # graph: couples=*.sh,*.gate,knob:GATE_SDK_WORKFLOW_DIR/*,knob:CANON_KIT_COMMENT_SURFACE,*.yml,*.yaml,knob:CANON_KIT_COMMENT_ACTIONS,knob:CANON_KIT_RULE_ID_DECLARE_GLOBS dir=one valve=none tier=precommit
2
2
  # install: on-surface
3
3
  # spec: canon-kit/SPEC.md §check-comment-tier — every full-line comment on a governed surface is a machine/reason directive, rides a directive's bounded window, is comment-tier-exempt, or justifies a positional construct
@@ -0,0 +1,4 @@
1
+ # graph: couples=knob:CANON_KIT_RULE_ID_DECLARE_GLOBS,knob:CANON_KIT_RULE_ID_SPEC_GLOBS dir=one valve=none tier=precommit
2
+ # install: zero-config
3
+ # armed-by: CANON_KIT_RULE_ID_DECLARES
4
+ # spec: canon-kit/SPEC.md §check-rule-id-coverage — every rule id the code declares is cited by exactly one spec file, and every id a spec cites is declared
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env bash
2
+ # spec: canon-kit/SPEC.md §check-amendment-queue — the absent-queue clean and the wrong-kind refusal,
3
+ # arms the pair cannot spell: its good/ holds a queue, and exit 2 has no pair spelling
4
+ #
5
+ # Run by the --run-gate-tests arm (any <tests-dir>/*.test.sh; must exit 0).
6
+ set -uo pipefail
7
+ source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
8
+
9
+ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
10
+ SANDBOX="$(mktemp -d)"
11
+ trap 'rm -rf "$SANDBOX"' EXIT
12
+
13
+ fails=0
14
+
15
+ check_case() { # $1=label $2=want-rc $3=want-substring $4=queue path
16
+ local label="$1" want="$2" sub="$3" queue="$4"
17
+ local out rc
18
+ out="$(cd "$SANDBOX" && gate_run check-amendment-queue "$DIR/checks" "$queue" "$SANDBOX" 2>&1)"
19
+ rc=$?
20
+ if [[ "$rc" -ne "$want" ]]; then
21
+ echo " FAIL [$label]: want exit $want, got $rc -- $out"; fails=$((fails + 1)); return
22
+ fi
23
+ if ! grep -qF -- "$sub" <<<"$out"; then
24
+ echo " FAIL [$label]: exit $rc OK but output lacks '$sub':"; printf ' %s\n' "$out"
25
+ fails=$((fails + 1))
26
+ fi
27
+ }
28
+
29
+ check_case "absent-queue-is-not-applicable" 0 "clean (not applicable: no queue file at" "$SANDBOX/TASK-QUEUE.md"
30
+
31
+ mkdir -p "$SANDBOX/dirqueue"
32
+ check_case "non-file-queue-fails-closed" 2 "not a file" "$SANDBOX/dirqueue"
33
+
34
+ if [[ "$fails" -gt 0 ]]; then
35
+ echo "check-amendment-queue.test.sh: $fails case(s) failed"
36
+ exit 1
37
+ fi
38
+ echo "check-amendment-queue.test.sh: clean (an absent queue is not applicable; a queue path naming a directory refuses)"
39
+ exit 0
@@ -2,6 +2,7 @@ restated collection total: rules 1-8
2
2
  bad.sh:27: port: the bare word is not a roster entry, so this line is prose and is flagged
3
3
  bad.gate:4: this descriptor comment cites no owning section and carries no directive
4
4
  bad.rs:3: this crate comment restates the line below it and cites no owning section
5
+ lib/rules.rs:1: rule R-1: a request carries one owner,
5
6
  templates/bad-tmpl.sh:2: this templates stub comment paraphrases its own body and carries no directive
6
7
  .workflow/fixture-state.txt:3: this workflow-tier comment is prose the txt surface never blesses
7
8
  .github/workflows/ci.yml:4: this workflow comment narrates the job below and carries no directive
@@ -0,0 +1,5 @@
1
+ // rule R-1: a request carries one owner,
2
+ // named when the request is filed
3
+ pub fn owner() -> usize {
4
+ 1
5
+ }
@@ -4,3 +4,8 @@ CANON_KIT_COMMENT_ACTIONS = on
4
4
  CANON_KIT_COMMENT_SURFACE[] = **/*.sh
5
5
  CANON_KIT_COMMENT_SURFACE[] = **/*.gate
6
6
  CANON_KIT_COMMENT_SURFACE[] = **/*.rs
7
+ # spec: canon-kit/SPEC.md §check-comment-tier — the same rule family, so a declaring comment outside src/ stays prose
8
+ CANON_KIT_RULE_ID_DECLARE_GLOBS[] = src/*.rs
9
+ CANON_KIT_RULE_ID_SPEC_GLOBS[] = specs/*.md
10
+ CANON_KIT_RULE_ID_DECLARES[rule] = rule (R-[0-9]+):
11
+ CANON_KIT_RULE_ID_CITES[rule] = \[(R-[0-9]+)\]
@@ -1 +1 @@
1
- COMMENT-TIER: clean (6 governed source(s)
1
+ COMMENT-TIER: clean (7 governed source(s)
@@ -1,5 +1,6 @@
1
1
  // spec: some/SPEC.md §thing — the crate arm of the governed corpus, on the slash surface
2
2
  pub fn widget() -> usize {
3
3
  /* spec: some/SPEC.md §thing — a block comment opens its own directive window */
4
+ // rule-id-exempt: the rule-id site valve is blessed by name
4
5
  1
5
6
  }
@@ -4,3 +4,8 @@ CANON_KIT_COMMENT_ACTIONS = on
4
4
  CANON_KIT_COMMENT_SURFACE[] = **/*.sh
5
5
  CANON_KIT_COMMENT_SURFACE[] = **/*.gate
6
6
  CANON_KIT_COMMENT_SURFACE[] = **/*.rs
7
+ # spec: canon-kit/SPEC.md §check-comment-tier — a rule family whose declaring comments under src/ are reason directives
8
+ CANON_KIT_RULE_ID_DECLARE_GLOBS[] = src/*.rs
9
+ CANON_KIT_RULE_ID_SPEC_GLOBS[] = specs/*.md
10
+ CANON_KIT_RULE_ID_DECLARES[rule] = rule (R-[0-9]+):
11
+ CANON_KIT_RULE_ID_CITES[rule] = \[(R-[0-9]+)\]
@@ -0,0 +1,5 @@
1
+ // rule R-1: a request carries one owner,
2
+ // named when the request is filed
3
+ pub fn owner() -> usize {
4
+ 1
5
+ }
@@ -0,0 +1,3 @@
1
+ specs/access.md:7: undeclared: family `rule` cites `R-9`, which no declaring file declares
2
+ src/rules.rs:3: uncited: family `rule` declares `R-2`, which no spec file cites
3
+ src/rules.rs:4: cited twice: family `rule` declares `R-3`, cited by 2 spec files: specs/access.md:5, specs/export.md:3
@@ -0,0 +1,5 @@
1
+ # spec: canon-kit/SPEC.md §check-rule-id-coverage — fixture consumer config: the code under src/ declares rule ids the specs under specs/ cite
2
+ CANON_KIT_RULE_ID_DECLARE_GLOBS[] = src/*.rs
3
+ CANON_KIT_RULE_ID_SPEC_GLOBS[] = specs/*.md
4
+ CANON_KIT_RULE_ID_DECLARES[rule] = rule\("(R-[0-9]+)"\)
5
+ CANON_KIT_RULE_ID_CITES[rule] = \[(R-[0-9]+)\]
@@ -0,0 +1,7 @@
1
+ # Access
2
+
3
+ [R-1] A reader reads.
4
+
5
+ [R-3] A reader may export.
6
+
7
+ [R-9] A reader may delete.
@@ -0,0 +1,3 @@
1
+ # Export
2
+
3
+ [R-3] A writer exports.
@@ -0,0 +1,5 @@
1
+ pub fn register() {
2
+ rule("R-1");
3
+ rule("R-2");
4
+ rule("R-3");
5
+ }
@@ -0,0 +1 @@
1
+ RULE-ID-COVERAGE: clean (1 declaring file(s), 2 spec file(s), 2 rule famil(ies), 3 declared id(s), 4 citation(s), 1 valved
@@ -0,0 +1,7 @@
1
+ # spec: canon-kit/SPEC.md §check-rule-id-coverage — fixture consumer config: the code under src/ declares rule and limit ids the specs under specs/ cite
2
+ CANON_KIT_RULE_ID_DECLARE_GLOBS[] = src/*.rs
3
+ CANON_KIT_RULE_ID_SPEC_GLOBS[] = specs/*.md
4
+ CANON_KIT_RULE_ID_DECLARES[rule] = rule\("(R-[0-9]+)"\)
5
+ CANON_KIT_RULE_ID_CITES[rule] = \[(R-[0-9]+)\]
6
+ CANON_KIT_RULE_ID_DECLARES[limit] = limit\("(L-[0-9]+)"\)
7
+ CANON_KIT_RULE_ID_CITES[limit] = \{(L-[0-9]+)\}
@@ -0,0 +1,9 @@
1
+ # Access
2
+
3
+ [R-1] A reader reads, and a second read is the same rule [R-1].
4
+
5
+ {L-1} A reader opens at most ten files.
6
+
7
+ ```text
8
+ [R-9] An example citing a rule no code declares.
9
+ ```
@@ -0,0 +1,3 @@
1
+ # Export
2
+
3
+ [R-2] A writer exports.
@@ -0,0 +1,7 @@
1
+ pub fn register() {
2
+ rule("R-1");
3
+ rule("R-2");
4
+ // rule-id-exempt: reserved for the export rule, specified next release
5
+ rule("R-3");
6
+ limit("L-1");
7
+ }
@@ -75,8 +75,8 @@ check_case "uncompilable-ere-fails-closed" 2 "does not compile" uncompilable.kno
75
75
  # at all, and one configured that declared nothing. Both are green and they are
76
76
  # green for different reasons, which is why the reader checks the command knob
77
77
  # before it spawns the command.
78
- check_case "no-vocabulary-is-clean" 0 "CANON_KIT_CLAIM_CLASSES_CMD unset" off.knobs
79
- check_case "declared-nothing-is-clean" 0 "declared no claim classes" nothing.knobs
78
+ check_case "no-vocabulary-is-clean" 0 "not applicable: CANON_KIT_CLAIM_CLASSES_CMD unset" off.knobs
79
+ check_case "declared-nothing-is-clean" 0 "not applicable: CANON_KIT_CLAIM_CLASSES_CMD declared no claim classes" nothing.knobs
80
80
 
81
81
  # A full-line marker discharges exactly the claim it binds, the claim
82
82
  # check-measured-claim reads: the span narrows it, off leaves the whole block
@@ -174,7 +174,7 @@ Where a rule below is *Enforced by* convention, no checkwright gate reads it yet
174
174
 
175
175
  *Under agent work:* an agent writes the check and reads its verdict in one motion, so the exit code is the only evidence it holds that the check bit. A predicate just rewritten (a regex carried between dialects, a path list narrowed) fails by matching nothing, which is indistinguishable from success. A printed count is the one signal that survives the rewrite.
176
176
 
177
- *Enforced by:* judgment, over a class only partly mechanizable — stated honestly rather than promised to a scanner. Shipped: the vacuous-pass tripwire in [gate-sdk/SPEC.md](../gate-sdk/SPEC.md) §run-gates, and the `good/`+`bad/` fixture pair every gate already owes ([gate-sdk/SPEC.md](../gate-sdk/SPEC.md) §The gate model), which exercises a predicate rather than trusting it. Buildable but unbuilt: a branch-coverage assertion over a check's fixture corpus, for the arm that ships with no fixture to run it. Unreachable: whether a session's mutation probe targeted something its assertion ranges over is a property of a session act that leaves no residue in the tree, so that third stays judgment.
177
+ *Enforced by:* judgment, over a class only partly mechanizable — stated honestly rather than promised to a scanner. Shipped: the vacuous-pass tripwire in [gate-sdk/SPEC.md](../gate-sdk/SPEC.md) §run-gates, and the `good/`+`bad/` fixture pair every gate already owes ([gate-sdk/SPEC.md](../gate-sdk/SPEC.md) §The gate model), which exercises a predicate rather than trusting it. Shipped too: the declared test controls in [evidence-kit/SPEC.md](../evidence-kit/SPEC.md) §Test controls, which witness a recorded test failing under the defect it names. Buildable but unbuilt: a branch-coverage assertion over a check's fixture corpus, for the arm that ships with no fixture to run it. Unreachable: whether a session's mutation probe targeted something its assertion ranges over is a property of a session act that leaves no residue in the tree, so that third stays judgment.
178
178
 
179
179
  *Stages:* build, validate
180
180
 
@@ -1,8 +1,8 @@
1
1
  # evidence-kit
2
2
 
3
- A held-constant test baseline and a committed per-run evidence manifest for the validate stage: a stage stamp proves a stage was *invoked*, evidence-kit proves it produced its green result. The manifest is a versioned, hashable wire contract (`# contract: evidence-manifest v1`) an external verifier can consume, so the kit is adoptable with or without an iteration lifecycle.
3
+ A held-constant test baseline and a committed per-run evidence manifest for the validate stage: a stage stamp proves a stage was *invoked*, evidence-kit proves it produced its green result. The manifest is a versioned, hashable record (`# contract: evidence-manifest v2`), and a run can publish it as an in-toto Statement an attestation verifier reads, written to a file or handed to `EVIDENCE_KIT_STATEMENT_WRITE_CMD` to store outside the tree (a git-notes pair is documented in [SPEC.md §bin/run-validate.sh](https://checkwright.dev/evidence-kit/SPEC#binrun-validatesh)), so the kit is adoptable with or without an iteration lifecycle.
4
4
 
5
- The gates: `check-evidence-baseline` (baseline grammar, blocking-slug liveness, scenario coverage, flip causation), `check-evidence-manifest` (manifest grammar and, where lifecycle drives the tree, close-entry green block + validate-stamp coupling), `check-battery-roster` (the runner doc's battery block against the suite roster) and `check-producer-liveness` (no stage entry while the producer is still running). The tools that drive it are non-gate arms of the gate binary, reached through gate-sdk's front end: `--run-validate` (the codified spine that runs the suites and records evidence), `--diff-baseline` (the situational runtime diff) and `--emit baseline-claims` (each baseline row as a `measured:` oracle line, for prose that quotes one). See [SPEC.md](https://checkwright.dev/evidence-kit/SPEC) for the full contracts.
5
+ The gates: `check-evidence-baseline` (baseline grammar, blocking-slug liveness, scenario coverage, flip causation), `check-evidence-manifest` (manifest grammar and, where lifecycle drives the tree, close-entry green block + validate-stamp coupling), `check-battery-roster` (the runner doc's battery block against the suite roster), `check-test-control` (every newly baselined test names a declared control, and every control was witnessed red before close) and `check-producer-liveness` (no stage entry while the producer is still running). The tools that drive it are non-gate arms of the gate binary, reached through gate-sdk's front end: `--run-validate` (the codified spine that runs the suites, re-runs each under its declared test controls, and records evidence), `--diff-baseline` (the situational runtime diff), `--verify-gate-run` and `--import-gate-run` (judge a gate-run Statement against the tree, the first in a versioned JSON document under `--json`, with `EVIDENCE_KIT_VERIFY_REQUIRE` selecting a merge predicate's run-of-`HEAD` and every-suite-clean requirements, and record a verified one produced elsewhere) and `--emit baseline-claims` (each baseline row as a `measured:` oracle line, for prose that quotes one). See [SPEC.md](https://checkwright.dev/evidence-kit/SPEC) for the full contracts.
6
6
 
7
7
  This file ships in the installer payload; what that payload withholds, and where this page's `SPEC.md` links then resolve, is [gate-sdk/SPEC.md §Consumer payload](https://checkwright.dev/gate-sdk/SPEC#consumer-payload).
8
8
 
@@ -10,14 +10,15 @@ This file ships in the installer payload; what that payload withholds, and where
10
10
 
11
11
  Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
12
12
 
13
- 1. Register the gates — add each to your `gates.list` except `check-producer-liveness`, which step 6 wires at stage entry instead:
13
+ 1. Register the gates — add each to your `gates.list` except `check-producer-liveness`, which you wire at stage entry instead, and `check-test-control`, which the optional test-controls step selects:
14
14
 
15
15
  <!-- gate-roster:begin -->
16
16
  ```
17
17
  check-evidence-baseline
18
18
  check-evidence-manifest
19
19
  check-battery-roster
20
- check-producer-liveness # entry hook only — never gates.list, see step 6
20
+ check-test-control # opt-in, with your first test control
21
+ check-producer-liveness # entry hook only — never gates.list
21
22
  ```
22
23
  <!-- gate-roster:end -->
23
24
 
@@ -32,7 +33,7 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
32
33
  and `.workflow/validate-evidence.txt`:
33
34
 
34
35
  ```text
35
- # contract: evidence-manifest v1
36
+ # contract: evidence-manifest v2
36
37
  ```
37
38
 
38
39
  (override the paths with `EVIDENCE_KIT_BASELINE_FILE` / `EVIDENCE_KIT_MANIFEST_FILE`).
@@ -45,6 +46,8 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
45
46
 
46
47
  6. Wire `check-producer-liveness` on `LIFECYCLE_KIT_ENTRY_PREFLIGHT` rather than in `gates.list`, its command naming the lock file through a name-resolving front end rather than a path (`<stage>=<front end> check-producer-liveness <lock-file>`; [SPEC.md §check-evidence-manifest](https://checkwright.dev/evidence-kit/SPEC#check-evidence-manifest) owns why a preflight entry names the gate), at whichever stage entries must not begin while `--run-validate` is still running. It asks whether a producer is in flight, not whether the tree is consistent, so a battery that `--run-validate` itself invokes would red every run against that run's own lock. See [SPEC.md §check-producer-liveness](https://checkwright.dev/evidence-kit/SPEC#check-producer-liveness).
47
48
 
49
+ 7. Optional test controls — to prove a recorded test can fail, name it in `EVIDENCE_KIT_CONTROLS` with an `EVIDENCE_KIT_CONTROL_<name> = <suite> <scenario> <VAR>=<value>` declaration whose assignments re-introduce the defect it catches, and register `check-test-control`. `--run-validate` then re-runs the suite under those assignments and records whether the test went red. See [SPEC.md §Test controls](https://checkwright.dev/evidence-kit/SPEC#test-controls).
50
+
48
51
  ## Test
49
52
 
50
53
  Run this arm with the gate binary `GATE_SDK_NATIVE_BIN` names, where `init` places it. In PowerShell, spell the line `./scripts/checkwright-gates <arm>` at the repository root, with `.exe` on native Windows:
@@ -0,0 +1,4 @@
1
+ # graph: couples=knob:EVIDENCE_KIT_BASELINE_FILE,knob:EVIDENCE_KIT_MANIFEST_FILE,knob:EVIDENCE_KIT_QUEUE_FILE,knob:EVIDENCE_KIT_STATE_FILE dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # armed-by: EVIDENCE_KIT_CONTROLS
4
+ # spec: evidence-kit/SPEC.md §check-test-control — every declared control well-formed, every newly baselined pass row named by a control, and on a close cursor every control witnessed red by the current run
@@ -1,2 +1,2 @@
1
- # contract: evidence-manifest v1
2
- other-iter unit sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 pass=1 fail=0 ignore=0 verdict=clean 2026-07-06
1
+ # contract: evidence-manifest v2
2
+ other-iter unit sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 pass=1 fail=0 ignore=0 verdict=clean 2026-07-06 commit=0123456789abcdef0123456789abcdef01234567 tree=clean cmd=905824952f237b54064c7ed1b7f3fed04e83f320e50304a255afb6de608daea3 origin=local
@@ -1,2 +1,2 @@
1
- # contract: evidence-manifest v1
2
- demo-iter unit sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 pass=3 fail=0 ignore=0 verdict=clean 2026-07-06
1
+ # contract: evidence-manifest v2
2
+ demo-iter unit sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 pass=3 fail=0 ignore=0 verdict=clean 2026-07-06 commit=0123456789abcdef0123456789abcdef01234567 tree=clean cmd=905824952f237b54064c7ed1b7f3fed04e83f320e50304a255afb6de608daea3 origin=local
@@ -3,7 +3,9 @@
3
3
  # assertions the one good/bad pair (grammar) cannot hold: (C) a validate stamp
4
4
  # demands ≥1 evidence line, disarmed while the cursor is still at validate and
5
5
  # re-armed past it; (A) a close-entry cursor demands the full green block over
6
- # every configured suite; and both no-cursor disarms.
6
+ # every configured suite, imported lines included; both no-cursor disarms; and
7
+ # (B) per major: each v2 field and line kind, a line under the other major's
8
+ # header, a green v1 file and an unknown major.
7
9
  #
8
10
  # The cursor is the state file's last data line, so every case
9
11
  # below drives the stage axis from <state-body> and the header carries the name
@@ -21,11 +23,17 @@ fails=0
21
23
  tmp="$(mktemp -d)"
22
24
  trap 'rm -rf "$tmp"' EXIT
23
25
 
26
+ # The v2 suite line's four appended fields, for a line otherwise spelled at v1's eight.
27
+ COMMIT=0123456789abcdef0123456789abcdef01234567
28
+ TAIL=" commit=$COMMIT tree=clean cmd=$HASH origin=local"
29
+ MAJOR=v2
30
+
24
31
  # case_run <name> <manifest-body> <header> <state-body> <suites> <want> <expect>
32
+ # (the manifest header's major is $MAJOR)
25
33
  case_run() {
26
34
  local name="$1" man="$2" hdr="$3" state="$4" suites="$5" want="$6" expect="$7"
27
35
  local d="$tmp/$name" out rc; mkdir -p "$d/scripts"
28
- printf '# contract: evidence-manifest v1\n%b' "$man" >"$d/man.txt"
36
+ printf '# contract: evidence-manifest %s\n%b' "$MAJOR" "$man" >"$d/man.txt"
29
37
  printf '%s\n' "$hdr" >"$d/queue.md"
30
38
  printf '%b' "$state" >"$d/state.txt"
31
39
  # shellcheck disable=SC2086 # one element line per space-separated suite
@@ -58,7 +66,7 @@ case_run "C-disarmed-at-validate" \
58
66
  # C — close entry with one of two configured suites missing its clean line:
59
67
  # assertion A fires for the missing suite.
60
68
  case_run "A-missing-suite" \
61
- "it unit sha256=$HASH pass=1 fail=0 ignore=0 verdict=clean 2026-07-06\n" \
69
+ "it unit sha256=$HASH pass=1 fail=0 ignore=0 verdict=clean 2026-07-06$TAIL\n" \
62
70
  '## Iteration: it' \
63
71
  'h\n---\nit validate s2 2026-07-05\nit close s3 2026-07-06\n' 'unit extra' \
64
72
  1 "no clean evidence line"
@@ -66,18 +74,59 @@ case_run "A-missing-suite" \
66
74
  # D — close entry with both suites clean and dated after the validate stamp is
67
75
  # CLEAN (the full green block).
68
76
  case_run "A-green-block" \
69
- "it unit sha256=$HASH pass=1 fail=0 ignore=0 verdict=clean 2026-07-06\nit extra sha256=$HASH pass=2 fail=0 ignore=0 verdict=clean 2026-07-06\n" \
77
+ "it unit sha256=$HASH pass=1 fail=0 ignore=0 verdict=clean 2026-07-06$TAIL\nit extra sha256=$HASH pass=2 fail=0 ignore=0 verdict=clean 2026-07-06$TAIL\n" \
70
78
  '## Iteration: it' \
71
79
  'h\n---\nit validate s2 2026-07-05\nit close s3 2026-07-06\n' 'unit extra' \
72
80
  0 "clean"
73
81
 
74
82
  # E — a clean line dated BEFORE the earliest validate stamp is stale evidence.
75
83
  case_run "A-stale-date" \
76
- "it unit sha256=$HASH pass=1 fail=0 ignore=0 verdict=clean 2026-07-01\n" \
84
+ "it unit sha256=$HASH pass=1 fail=0 ignore=0 verdict=clean 2026-07-01$TAIL\n" \
77
85
  '## Iteration: it' \
78
86
  'h\n---\nit validate s2 2026-07-05\nit close s3 2026-07-06\n' 'unit' \
79
87
  1 "before the earliest validate stamp"
80
88
 
89
+ # E2 — an imported clean line satisfies the close-entry block like a local one.
90
+ case_run "A-imported-line" \
91
+ "it unit sha256=$HASH pass=1 fail=0 ignore=0 verdict=clean 2026-07-06${TAIL/origin=local/origin=imported}\n" \
92
+ '## Iteration: it' \
93
+ 'h\n---\nit validate s2 2026-07-05\nit close s3 2026-07-06\n' 'unit' \
94
+ 0 "clean"
95
+
96
+ # B — the grammar of each major. A v2 header reds an unknown third field and each
97
+ # malformed appended field; the stage cursor is disarmed so only (B) speaks.
98
+ V1LINE="it unit sha256=$HASH pass=1 fail=0 ignore=0 verdict=clean 2026-07-06"
99
+ case_run "B-unknown-kind" "it unit mutant=x pass=1 fail=0 ignore=0 verdict=clean 2026-07-06$TAIL\n" \
100
+ '## Iteration: it' 'h\n---\n' '' 1 "unknown line kind"
101
+ case_run "B-v1-line-under-v2" "$V1LINE\n" '## Iteration: it' 'h\n---\n' '' 1 "malformed line"
102
+ case_run "B-bad-commit" "$V1LINE${TAIL/commit=$COMMIT/commit=ABC}\n" \
103
+ '## Iteration: it' 'h\n---\n' '' 1 "bad commit field"
104
+ case_run "B-bad-tree" "$V1LINE${TAIL/tree=clean/tree=-}\n" \
105
+ '## Iteration: it' 'h\n---\n' '' 1 "bad tree field"
106
+ case_run "B-bad-cmd" "$V1LINE${TAIL/cmd=$HASH/cmd=xyz}\n" \
107
+ '## Iteration: it' 'h\n---\n' '' 1 "bad cmd field"
108
+ case_run "B-bad-origin" "$V1LINE${TAIL/origin=local/origin=ci}\n" \
109
+ '## Iteration: it' 'h\n---\n' '' 1 "bad origin field"
110
+ case_run "B-unborn" "$V1LINE commit=- tree=- cmd=$HASH origin=local\n" \
111
+ '## Iteration: it' 'h\n---\n' '' 0 "clean"
112
+ # A control line is v2's second kind: green under its suite line, red with none above it, red
113
+ # on a witness outside red|green|absent, and red at eight fields, its assign= dropped.
114
+ CTLLINE="it unit control=c scenario=t witnessed=red 2026-07-06 commit=$COMMIT cmd=$HASH assign=$HASH"
115
+ case_run "B-control-under-suite" "$V1LINE$TAIL\n$CTLLINE\n" '## Iteration: it' 'h\n---\n' '' 0 "clean"
116
+ case_run "B-control-no-suite" "$CTLLINE\n$V1LINE$TAIL\n" \
117
+ '## Iteration: it' 'h\n---\n' '' 1 "control line with no 'it unit' suite line above it"
118
+ case_run "B-control-bad-witness" "$V1LINE$TAIL\n${CTLLINE/witnessed=red/witnessed=pink}\n" \
119
+ '## Iteration: it' 'h\n---\n' '' 1 "bad witnessed field"
120
+ case_run "B-control-eight-fields" "$V1LINE$TAIL\n${CTLLINE% assign=*}\n" \
121
+ '## Iteration: it' 'h\n---\n' '' 1 "malformed control line"
122
+ # A v1 file whose lines are v1 stays green; a v2 line under a v1 header is red.
123
+ MAJOR=v1
124
+ case_run "B-v1-file" "$V1LINE\n" '## Iteration: it' 'h\n---\n' '' 0 "clean"
125
+ case_run "B-v2-line-under-v1" "$V1LINE$TAIL\n" '## Iteration: it' 'h\n---\n' '' 1 "malformed line"
126
+ MAJOR=v3
127
+ case_run "B-unknown-major" "" '## Iteration: it' 'h\n---\n' '' 1 "not a versioned wire-format header"
128
+ MAJOR=v2
129
+
81
130
  # F — the no-cursor window /scope leaves at the iteration boundary: the state
82
131
  # file exists but is truncated to its preamble + '---', so there is no data
83
132
  # line to read a stage from. A and C must disarm at the gate's DECLARED
@@ -94,7 +143,7 @@ case_run "no-cursor-window" \
94
143
  # G — no lifecycle state file at all: the second no-cursor shape, same early-out.
95
144
  _no_state() {
96
145
  local d="$tmp/nostate"; mkdir -p "$d"
97
- printf '# contract: evidence-manifest v1\n' >"$d/man.txt"
146
+ printf '# contract: evidence-manifest v2\n' >"$d/man.txt"
98
147
  printf '## Iteration: it\n' >"$d/queue.md"
99
148
  gate_run check-evidence-manifest "$CHECKS" "$d/man.txt" "$d/queue.md" "$d/absent-state.txt" 2>&1
100
149
  }
@@ -106,5 +155,5 @@ if [[ "$fails" -gt 0 ]]; then
106
155
  echo "check-evidence-manifest.test: $fails assertion(s) failed"
107
156
  exit 1
108
157
  fi
109
- echo "check-evidence-manifest.test: ok (C recorded-nothing + A missing-suite + A stale-date rejected; C disarmed-at-validate + A green-block + both no-cursor shapes accepted)"
158
+ echo "check-evidence-manifest.test: ok (C recorded-nothing + A missing-suite + A stale-date + each v2 field and kind + a cross-major line + an unknown major rejected; C disarmed-at-validate + A green-block + A imported + a v1 file + an unborn line + both no-cursor shapes accepted)"
110
159
  exit 0
@@ -0,0 +1 @@
1
+ ## Iteration: demo-iter
@@ -0,0 +1,4 @@
1
+ fixture state header
2
+ ---
3
+ demo-iter validate s1 2026-07-02 none
4
+ demo-iter close s1 2026-07-03 none
@@ -0,0 +1,5 @@
1
+ validate-baseline.txt
2
+ since-baseline.txt
3
+ validate-evidence.txt
4
+ TASK-QUEUE.md
5
+ WORKFLOW-STATE.txt
@@ -0,0 +1,2 @@
1
+ new test 'unit t_new'
2
+ control 'nullguard' witnessed=green
@@ -0,0 +1,4 @@
1
+ # spec: evidence-kit/SPEC.md §check-test-control — one suite and one declared control, so all three assertions are armed
2
+ EVIDENCE_KIT_SUITES[] = unit
3
+ EVIDENCE_KIT_CONTROLS[] = nullguard
4
+ EVIDENCE_KIT_CONTROL_nullguard = unit t_null BREAK_NULL=1
@@ -0,0 +1,2 @@
1
+ # fixture baseline at the since commit
2
+ unit t_old pass
@@ -0,0 +1,4 @@
1
+ # fixture baseline
2
+ unit t_old pass
3
+ unit t_null pass
4
+ unit t_new pass
@@ -0,0 +1,3 @@
1
+ # contract: evidence-manifest v2
2
+ demo-iter unit sha256=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa pass=2 fail=0 ignore=0 verdict=clean 2026-07-02 commit=- tree=- cmd=bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb origin=local
3
+ demo-iter unit control=nullguard scenario=t_null witnessed=green 2026-07-02 commit=- cmd=bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb assign=ffc2bf120f95ff83431fa8cb7d89902ed9cdf9a3c62dd02a78a7fc2c0d3d2ff3
@@ -0,0 +1 @@
1
+ ## Iteration: demo-iter
@@ -0,0 +1,4 @@
1
+ fixture state header
2
+ ---
3
+ demo-iter validate s1 2026-07-02 none
4
+ demo-iter close s1 2026-07-03 none
@@ -0,0 +1,5 @@
1
+ validate-baseline.txt
2
+ since-baseline.txt
3
+ validate-evidence.txt
4
+ TASK-QUEUE.md
5
+ WORKFLOW-STATE.txt
@@ -0,0 +1,4 @@
1
+ # spec: evidence-kit/SPEC.md §check-test-control — one suite and one declared control, so all three assertions are armed
2
+ EVIDENCE_KIT_SUITES[] = unit
3
+ EVIDENCE_KIT_CONTROLS[] = nullguard
4
+ EVIDENCE_KIT_CONTROL_nullguard = unit t_null BREAK_NULL=1
@@ -0,0 +1,2 @@
1
+ # fixture baseline at the since commit
2
+ unit t_old pass
@@ -0,0 +1,3 @@
1
+ # fixture baseline
2
+ unit t_old pass
3
+ unit t_null pass
@@ -0,0 +1,3 @@
1
+ # contract: evidence-manifest v2
2
+ demo-iter unit sha256=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa pass=2 fail=0 ignore=0 verdict=clean 2026-07-02 commit=- tree=- cmd=bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb origin=local
3
+ demo-iter unit control=nullguard scenario=t_null witnessed=red 2026-07-02 commit=- cmd=bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb assign=ffc2bf120f95ff83431fa8cb7d89902ed9cdf9a3c62dd02a78a7fc2c0d3d2ff3