evidence-kit
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), so the kit is adoptable with or without an iteration lifecycle.
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 for the full contracts.
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.
Install
Vendor the kit beside gate-sdk (required), then:
-
Register the gates — add each to your
gates.listexceptcheck-producer-liveness, which you wire at stage entry instead, andcheck-test-control, which the optional test-controls step selects:check-evidence-baseline check-evidence-manifest check-battery-roster check-test-control # opt-in, with your first test control check-producer-liveness # entry hook only — never gates.listThe pre-commit hook runs the gates their
# graph:manifests trigger, read at commit;--install-hookson the gate binaryGATE_SDK_NATIVE_BINnames places both hooks in a clone once, and a gate registered later is reached with no re-install. -
Seed the two surfaces —
.workflow/validate-baseline.txt:# contract: evidence-kit/SPEC.md §Baseline manifest — held-constant validate baseline: <suite> <scenario> <status> [<slug> [reproduces-at=<rev>]]and
.workflow/validate-evidence.txt:# contract: evidence-manifest v2(override the paths with
EVIDENCE_KIT_BASELINE_FILE/EVIDENCE_KIT_MANIFEST_FILE). -
Configure the suites — copy
templates/evidence-config.knobsinto your gates dir asevidence-config.knobs, namingEVIDENCE_KIT_SUITES(oneEVIDENCE_KIT_SUITES[] = <suite>line each, orEVIDENCE_KIT_SUITES[] <- EVIDENCE_KIT_FIXTURE_SUITESfor the derived fixture suites, whose run commands are derived too), anEVIDENCE_KIT_RUN_<suite>command per other suite, and theEVIDENCE_KIT_PARSERadapter (exit-codefor a whole-suite pass/fail,libtestfor per-test result logs, or your own log-parsing command). -
Record evidence at validate — run
--run-validateon the gate binaryGATE_SDK_NATIVE_BINnames; it runs each suite, diffs the baseline, and records one evidence line per suite — written to the manifest in a single fold once the whole roster has run, so a suite needing a clean worktree may sit anywhere in it. -
Optional lifecycle integration — set
LIFECYCLE_KIT_BOUNDARY_TRUNCATEto the evidence manifest so a new iteration starts from the contract header, and the manifest gate’s close-entry and stamp-coupling assertions arm automatically. -
Wire
check-producer-livenessonLIFECYCLE_KIT_ENTRY_PREFLIGHTrather than ingates.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 owns why a preflight entry names the gate), at whichever stage entries must not begin while--run-validateis still running. It asks whether a producer is in flight, not whether the tree is consistent, so a battery that--run-validateitself invokes would red every run against that run’s own lock. See SPEC.md §check-producer-liveness. -
Optional test controls — to prove a recorded test can fail, name it in
EVIDENCE_KIT_CONTROLSwith anEVIDENCE_KIT_CONTROL_<name> = <suite> <scenario> <VAR>=<value>declaration whose assignments re-introduce the defect it catches, and registercheck-test-control.--run-validatethen re-runs the suite under those assignments and records whether the test went red. See SPEC.md §Test controls.
Test
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:
gates="${GATE_SDK_NATIVE_BIN:-./scripts/checkwright-gates}"
"$gates" --run-gate-tests evidence-kit/gate-tests evidence-kit/checks
License
Licensed under Apache-2.0, with the text in LICENSE beside this file in an installed copy and at the repository root in the source tree.