checkwright 0.23.0 → 0.25.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 +175 -13
- package/lib/common/lock.sh +7 -0
- package/lib/common/recipe.sh +1 -1
- package/lib/diff.sh +2 -0
- package/lib/init.sh +40 -16
- package/lib/uninstall.sh +2 -0
- package/package.json +2 -2
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
- package/payload/canon-kit/README.md +2 -0
- package/payload/canon-kit/SPEC.md +454 -28
- package/payload/canon-kit/checks/check-amendment-queue.gate +3 -0
- package/payload/canon-kit/checks/check-amendment-update-target.gate +3 -0
- package/payload/canon-kit/checks/check-docs-link-convention.gate +3 -0
- package/payload/canon-kit/checks/check-knob-default-coupling.gate +3 -0
- package/payload/canon-kit/checks/check-prose-tells.gate +3 -0
- package/payload/canon-kit/checks/check-spec-embedded-source.gate +3 -0
- package/payload/canon-kit/checks/check-unmarked-claim.gate +3 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/SPEC-orphan.md +6 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +7 -2
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +8 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target/bad/SPEC-thing.md +26 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target/bad/expect.txt +8 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target/good/SPEC-widget.md +47 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target.test.sh +82 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.sh +3 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +4 -4
- package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +2 -2
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/SPEC-wire.md +18 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/expect.txt +3 -1
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/widget.proto +13 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC-wire.md +22 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC.md +17 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/widget.proto +13 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/SPEC.md +11 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/scripts/canon-config.sh +6 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/good/SPEC.md +18 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/good/scripts/canon-config.sh +6 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim.test.sh +85 -0
- package/payload/canon-kit/lib/spec.sh +16 -0
- package/payload/canon-kit/smoke/install.sh +3 -1
- package/payload/canon-kit/templates/SPEC-amendment.md +17 -2
- package/payload/context-kit/README.md +6 -4
- package/payload/context-kit/SPEC.md +256 -76
- package/payload/context-kit/bin/always-loaded.sh +5 -21
- package/payload/context-kit/bin/env-probe.sh +2 -17
- package/payload/context-kit/checks/check-brevity.gate +3 -0
- package/payload/context-kit/checks/check-footprint-fresh.gate +3 -0
- package/payload/context-kit/checks/check-memory-off.gate +3 -0
- package/payload/context-kit/checks/check-settings-paths.gate +3 -0
- package/payload/context-kit/checks/check-settings-pins.gate +3 -0
- package/payload/context-kit/gate-tests/check-brevity.test.sh +3 -2
- package/payload/context-kit/gate-tests/check-memory-off/bad/scripts/context-config.sh +4 -0
- package/payload/context-kit/gate-tests/check-memory-off/good/scripts/context-config.sh +4 -0
- package/payload/context-kit/gate-tests/check-memory-off.test.sh +18 -4
- package/payload/context-kit/gate-tests/check-settings-pins.test.sh +70 -0
- package/payload/context-kit/index-tests/expected/toolfloor.txt +5 -5
- package/payload/context-kit/index-tests/toolfloor-cases.sh +5 -5
- package/payload/context-kit/lib/context.sh +56 -0
- package/payload/context-kit/lib/toolfloor.sh +1 -1
- package/payload/context-kit/smoke/agents-md.sh +16 -4
- package/payload/context-kit/smoke/install.sh +3 -2
- package/payload/context-kit/templates/session-context.sh +5 -5
- package/payload/delegation-kit/README.md +11 -1
- package/payload/delegation-kit/SPEC.md +652 -11
- package/payload/delegation-kit/bin/wait-probe.sh +184 -0
- package/payload/delegation-kit/checks/check-agent-tier-explicit.gate +3 -0
- package/payload/delegation-kit/checks/check-gate-tamper.gate +3 -0
- package/payload/delegation-kit/checks/check-rule-citation.gate +3 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/added-exemptions +5 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/expect.txt +2 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +108 -0
- package/payload/delegation-kit/gate-tests/subagent-stop-liveness.test.sh +99 -0
- package/payload/delegation-kit/smoke/install.sh +21 -1
- package/payload/delegation-kit/templates/agent-execution.md +88 -4
- package/payload/delegation-kit/templates/subagent-stop-liveness.sh +56 -0
- package/payload/doctrine-kit/SPEC.md +1 -1
- package/payload/doctrine-kit/checks/check-doctrine-registration.gate +3 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +2 -3
- package/payload/doctrine-kit/smoke/install.sh +17 -4
- package/payload/drift-kit/README.md +2 -2
- package/payload/drift-kit/SPEC.md +71 -7
- package/payload/drift-kit/bin/stage-economics.sh +1 -1
- package/payload/drift-kit/lib/drift.sh +43 -0
- package/payload/drift-kit/smoke/install.sh +21 -14
- package/payload/evidence-kit/README.md +3 -1
- package/payload/evidence-kit/SPEC.md +160 -19
- package/payload/evidence-kit/checks/check-battery-roster.gate +3 -0
- package/payload/evidence-kit/checks/check-evidence-baseline.gate +3 -0
- package/payload/evidence-kit/checks/check-evidence-manifest.gate +3 -0
- package/payload/evidence-kit/checks/check-producer-liveness.sh +42 -2
- package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +4 -3
- package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +8 -5
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/WORKFLOW-STATE.txt +1 -1
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/scripts/evidence-config.sh +9 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/WORKFLOW-STATE.txt +1 -1
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/scripts/evidence-config.sh +9 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +6 -4
- package/payload/evidence-kit/gate-tests/producer-lock.test.sh +42 -1
- package/payload/evidence-kit/lib/evidence.sh +2 -0
- package/payload/evidence-kit/smoke/install.sh +1 -1
- package/payload/gate-sdk/README.md +17 -9
- package/payload/gate-sdk/SPEC.md +4680 -295
- package/payload/gate-sdk/bin/build-native.sh +66 -1
- package/payload/gate-sdk/bin/install-hooks.sh +14 -2
- package/payload/gate-sdk/bin/port-blockers.sh +37 -9
- package/payload/gate-sdk/bin/run-gate-tests.sh +1 -2
- package/payload/gate-sdk/bin/run-gates.sh +137 -13
- package/payload/gate-sdk/bin/upgrade-smoke.sh +21 -16
- package/payload/gate-sdk/checks/check-action-run-shell.sh +2 -1
- package/payload/gate-sdk/checks/check-commit-msg.gate +3 -0
- package/payload/gate-sdk/checks/check-commit-subject.gate +3 -0
- package/payload/gate-sdk/checks/check-core-files.gate +3 -0
- package/payload/gate-sdk/checks/check-crate-arms.sh +1 -0
- package/payload/gate-sdk/checks/check-enforcement-fresh.gate +3 -0
- package/payload/gate-sdk/checks/check-exec-bit.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-assertions.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-binary-fresh.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-fail-closed.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-fixture-coverage.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-output.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +132 -15
- package/payload/gate-sdk/checks/check-graph.gate +3 -0
- package/payload/gate-sdk/checks/check-hook-exec-bit.gate +3 -0
- package/payload/gate-sdk/checks/check-identity.gate +3 -0
- package/payload/gate-sdk/checks/check-install-disposition.sh +1 -0
- package/payload/gate-sdk/checks/check-kit-enum.gate +3 -0
- package/payload/gate-sdk/checks/check-readme-roster.gate +3 -0
- package/payload/gate-sdk/checks/check-reads-couples.gate +3 -0
- package/payload/gate-sdk/checks/check-root-tiering.gate +3 -0
- package/payload/gate-sdk/checks/check-shellcheck.sh +1 -0
- package/payload/gate-sdk/checks/check-template-copy-parity.gate +3 -0
- package/payload/gate-sdk/checks/check-tree-terms.gate +3 -0
- package/payload/gate-sdk/checks/check-workflow-tiering.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +17 -12
- package/payload/gate-sdk/gate-tests/check-core-files.test.sh +4 -5
- package/payload/gate-sdk/gate-tests/check-exec-bit/bad/dump.txt +2 -1
- package/payload/gate-sdk/gate-tests/check-exec-bit/bad/expect.txt +2 -1
- package/payload/gate-sdk/gate-tests/check-exec-bit/good/dump.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +3 -4
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/expect.txt +5 -1
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/SPEC.md +22 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-count.sh +11 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-extra.sh +14 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-zero.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/SPEC.md +27 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/check-qux.sh +13 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions.test.sh +117 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +26 -4
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/args +6 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored-descriptor.gate +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored.sh +14 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-descriptor.gate +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-held.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/args +8 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored-descriptor.gate +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored.sh +14 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-descriptor.gate +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-held.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks.test.sh +77 -0
- package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +4 -5
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/kit-spec.md +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-bare.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-both.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-heldtwice.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-nospec.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-twice.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-ungrounded.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +2 -1
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/kit-spec.md +12 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-held.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +49 -4
- package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +15 -5
- package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +12 -0
- package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-example-gate.md +27 -5
- package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-second-gate.md +12 -0
- package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +5 -4
- package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +14 -12
- package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +43 -17
- package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +190 -0
- package/payload/gate-sdk/gate-tests/check-identity/bad/gh-hosts.yml +9 -0
- package/payload/gate-sdk/gate-tests/check-identity/bad/identity.conf +4 -2
- package/payload/gate-sdk/gate-tests/check-identity/bad/scripts/gate-sdk-config.sh +10 -0
- package/payload/gate-sdk/gate-tests/check-identity/good/gh-hosts.yml +11 -0
- package/payload/gate-sdk/gate-tests/check-identity/good/identity.conf +5 -1
- package/payload/gate-sdk/gate-tests/check-identity/good/scripts/gate-sdk-config.sh +10 -0
- package/payload/gate-sdk/gate-tests/check-identity.test.sh +114 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/bad/check-native-sample.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/bad/gates.list +4 -1
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/check-native-sample.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/gates.list +5 -2
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/args +3 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/README.md +15 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-one.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-two.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/expect.txt +3 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +3 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/README.md +13 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/checks/check-delta-one.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/README.md +14 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-one.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-two.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +87 -89
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/agent-budget-guard.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity.test.sh +56 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/multi.txt +4 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/second-leak.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/patterns.list +3 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/anchored.txt +4 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/msg-patterns.list +2 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/msg-patterns.local.list +3 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/worktrees/vendored-note.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms.test.sh +94 -0
- package/payload/gate-sdk/gate-tests/declaration-lib-parity.test.sh +211 -0
- package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +16 -15
- package/payload/gate-sdk/gate-tests/lib-gate.test.sh +94 -1
- package/payload/gate-sdk/lib/gate.sh +232 -25
- package/payload/gate-sdk/smoke/install.sh +28 -1
- package/payload/guard-kit/README.md +4 -3
- package/payload/guard-kit/SPEC.md +578 -47
- package/payload/guard-kit/bin/compare-settings-allow.sh +36 -12
- package/payload/guard-kit/bin/run-guard-tests.sh +27 -4
- package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +46 -1
- package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +105 -0
- package/payload/guard-kit/guard-tests/background-cases.tsv +14 -0
- package/payload/guard-kit/guard-tests/cases.tsv +67 -9
- package/payload/guard-kit/lib/guard.sh +361 -18
- package/payload/guard-kit/templates/bash-guard.sh +2 -0
- package/payload/guard-kit/templates/close-triage.md +10 -3
- package/payload/guard-kit/templates/guard-config.sh +3 -0
- package/payload/lifecycle-kit/README.md +3 -2
- package/payload/lifecycle-kit/SPEC.md +509 -77
- package/payload/lifecycle-kit/bin/enter-stage.sh +72 -33
- package/payload/lifecycle-kit/bin/file-gap.sh +2 -2
- package/payload/lifecycle-kit/checks/check-close-surfaces.gate +3 -0
- package/payload/lifecycle-kit/checks/check-stage-entry.gate +3 -0
- package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +4 -4
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +1 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/bad/.workflow/WORKFLOW-STATE.txt +3 -3
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/good/.workflow/WORKFLOW-STATE.txt +3 -3
- package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +22 -22
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/bad/.workflow/WORKFLOW-STATE.txt +2 -2
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/good/.workflow/WORKFLOW-STATE.txt +2 -2
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +120 -10
- package/payload/lifecycle-kit/gate-tests/gap-inbox-route.test.sh +123 -0
- package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +11 -11
- package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +16 -5
- package/payload/lifecycle-kit/lib/stages.sh +5 -0
- package/payload/lifecycle-kit/smoke/install.sh +29 -15
- package/payload/lifecycle-kit/templates/lead.md +32 -0
- package/payload/lifecycle-kit/templates/stages/align.md +20 -2
- package/payload/lifecycle-kit/templates/stages/build.md +3 -3
- package/payload/lifecycle-kit/templates/stages/close.md +20 -6
- package/payload/lifecycle-kit/templates/stages/scope.md +20 -1
- package/payload/lifecycle-kit/templates/stages/spec.md +1 -1
- package/payload/lifecycle-kit/templates/stages/validate.md +1 -1
- package/payload/lifecycle-kit/templates/workflow-state-guard.sh +1 -1
- package/payload/queue-kit/README.md +10 -10
- package/payload/queue-kit/SPEC.md +379 -84
- package/payload/queue-kit/bin/queue-counts.sh +1 -1
- package/payload/queue-kit/checks/check-queue-entry-budget.gate +1 -1
- package/payload/queue-kit/checks/check-queue-prose-precondition.gate +3 -0
- package/payload/queue-kit/checks/check-roadmap-fresh.gate +3 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +15 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +2 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +7 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/expect.txt +4 -0
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/expect.txt +1 -1
- package/payload/queue-kit/gate-tests/queue-counts.test.sh +1 -1
- package/payload/queue-kit/gate-tests/queue-index.test.sh +55 -119
- package/payload/queue-kit/gate-tests/roadmap.test.sh +22 -12
- package/payload/queue-kit/lib/queue.sh +0 -49
- package/payload/queue-kit/smoke/install.sh +1 -1
- package/payload/site-kit/SPEC.md +41 -2
- package/payload/site-kit/checks/check-docs-cname-parity.gate +3 -0
- package/payload/site-kit/checks/check-docs-render-fidelity.sh +1 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +5 -4
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +6 -5
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/checks/check-sample.gate +3 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/expect.txt +1 -1
- package/payload/site-kit/smoke/install.sh +1 -1
- package/payload/canon-kit/checks/check-amendment-queue.sh +0 -117
- package/payload/canon-kit/checks/check-docs-link-convention.sh +0 -79
- package/payload/canon-kit/checks/check-knob-default-coupling.sh +0 -240
- package/payload/canon-kit/checks/check-prose-tells.sh +0 -208
- package/payload/canon-kit/checks/check-spec-embedded-source.sh +0 -134
- package/payload/context-kit/bin/footprint.sh +0 -144
- package/payload/context-kit/checks/check-brevity.sh +0 -124
- package/payload/context-kit/checks/check-footprint-fresh.sh +0 -39
- package/payload/context-kit/checks/check-memory-off.sh +0 -113
- package/payload/context-kit/checks/check-settings-paths.sh +0 -94
- package/payload/context-kit/checks/check-settings-pins.sh +0 -111
- package/payload/context-kit/gate-tests/check-memory-off/bad/args +0 -1
- package/payload/context-kit/gate-tests/check-memory-off/good/args +0 -1
- package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +0 -62
- package/payload/delegation-kit/checks/check-gate-tamper.sh +0 -140
- package/payload/delegation-kit/checks/check-rule-citation.sh +0 -77
- package/payload/doctrine-kit/checks/check-doctrine-registration.sh +0 -246
- package/payload/drift-kit/bin/trajectory.sh +0 -242
- package/payload/evidence-kit/checks/check-battery-roster.sh +0 -87
- package/payload/evidence-kit/checks/check-evidence-baseline.sh +0 -104
- package/payload/evidence-kit/checks/check-evidence-manifest.sh +0 -105
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/args +0 -3
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/args +0 -3
- package/payload/gate-sdk/bin/enforcement-map.sh +0 -273
- package/payload/gate-sdk/checks/check-commit-msg.sh +0 -51
- package/payload/gate-sdk/checks/check-commit-subject.sh +0 -44
- package/payload/gate-sdk/checks/check-core-files.sh +0 -76
- package/payload/gate-sdk/checks/check-enforcement-fresh.sh +0 -38
- package/payload/gate-sdk/checks/check-exec-bit.sh +0 -96
- package/payload/gate-sdk/checks/check-gate-assertions.sh +0 -148
- package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +0 -107
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +0 -106
- package/payload/gate-sdk/checks/check-gate-fail-closed.sh +0 -85
- package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +0 -93
- package/payload/gate-sdk/checks/check-gate-output.sh +0 -103
- package/payload/gate-sdk/checks/check-graph.sh +0 -632
- package/payload/gate-sdk/checks/check-hook-exec-bit.sh +0 -46
- package/payload/gate-sdk/checks/check-identity.sh +0 -135
- package/payload/gate-sdk/checks/check-kit-enum.sh +0 -95
- package/payload/gate-sdk/checks/check-readme-roster.sh +0 -108
- package/payload/gate-sdk/checks/check-reads-couples.sh +0 -200
- package/payload/gate-sdk/checks/check-root-tiering.sh +0 -67
- package/payload/gate-sdk/checks/check-template-copy-parity.sh +0 -127
- package/payload/gate-sdk/checks/check-tree-terms.sh +0 -66
- package/payload/gate-sdk/checks/check-workflow-tiering.sh +0 -85
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/args +0 -1
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/args +0 -1
- package/payload/gate-sdk/gate-tests/check-identity/bad/args +0 -1
- package/payload/gate-sdk/gate-tests/check-identity/good/args +0 -1
- package/payload/lifecycle-kit/bin/close-surfaces.sh +0 -94
- package/payload/lifecycle-kit/checks/check-close-surfaces.sh +0 -64
- package/payload/lifecycle-kit/checks/check-stage-entry.sh +0 -198
- package/payload/queue-kit/bin/queue-index.sh +0 -182
- package/payload/queue-kit/bin/roadmap.sh +0 -76
- package/payload/queue-kit/checks/check-queue-prose-precondition.sh +0 -64
- package/payload/queue-kit/checks/check-roadmap-fresh.sh +0 -111
- package/payload/site-kit/checks/check-docs-cname-parity.sh +0 -81
- /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/{gates → scripts}/check-sample.sh +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/{gates → scripts}/check-sample.sh +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{check-gamma.sh → scripts/check-gamma.sh} +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gates.list → scripts/gates.list} +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{check-beta.sh → scripts/check-beta.sh} +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gates.list → scripts/gates.list} +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/{site-config.sh → scripts/site-config.sh} +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/CNAME +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/index.md +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/docs → docs}/posts/2026-01-01-legacy.md +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/pkg → pkg}/gate-tests/fixture.md +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{site-config.sh → scripts/site-config.sh} +0 -0
|
@@ -28,12 +28,33 @@ Two governed surfaces, carrying **one axis each**:
|
|
|
28
28
|
then a `---` separator, then one data line per stage-skill invocation:
|
|
29
29
|
|
|
30
30
|
```
|
|
31
|
-
<iteration> <stage> <session-id> <YYYY-MM-DD>
|
|
31
|
+
<iteration> <stage> <session-id> <YYYY-MM-DD> <head>
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
It carries the *fast* axis too: **the last data line's `<stage>` token is the
|
|
35
35
|
cursor** — the single source for "which stage is this iteration in".
|
|
36
36
|
|
|
37
|
+
`<head>` is the abbreviated commit `bin/enter-stage.sh` read at the instant
|
|
38
|
+
it wrote the stamp, or the literal `none` where it found no git work tree and
|
|
39
|
+
no commit to name. It is **required**, and `none` is a value rather than an
|
|
40
|
+
omission: a permanently optional field is a permanent disarm switch for the
|
|
41
|
+
provenance assertion it exists to serve (§check-stage-evidence), which would
|
|
42
|
+
be enforcement-first inverted — the fix shipped beside its bypass. The field
|
|
43
|
+
is **appended** rather than inserted, so every positional reader of fields one
|
|
44
|
+
to four is unmoved.
|
|
45
|
+
|
|
46
|
+
**The five-field grammar is a breaking change to a shipped file format**, and
|
|
47
|
+
a consumer vendoring it mid-iteration reds until they rewrite their own
|
|
48
|
+
stamps: for each, `<head>` is the first parent of the commit that introduced
|
|
49
|
+
that stamp line, recoverable from history, and `none` where it is not — a
|
|
50
|
+
stamp whose introducing commit cannot be identified takes `none` rather than
|
|
51
|
+
a guess, because a guessed provenance value is indistinguishable from a real
|
|
52
|
+
one afterward. That rewrite is a **rewrite and not an introduction**, which is
|
|
53
|
+
what the migration clause of the newly-introduced test (§check-stage-evidence)
|
|
54
|
+
exists to say. The honest mitigation is the boundary: the first stage's reset
|
|
55
|
+
truncates this file, so a consumer upgrading at an iteration boundary pays
|
|
56
|
+
nothing.
|
|
57
|
+
|
|
37
58
|
The header once carried a `[stage:]` field as well. It was a second copy of a
|
|
38
59
|
derivable fact — every stage entry already stamps its `<stage>` — bought at one
|
|
39
60
|
queue write per stage entry, and kept in sync only by an assertion that existed
|
|
@@ -136,8 +157,12 @@ see §check-stage-evidence).
|
|
|
136
157
|
**Same-stage re-entry (N sibling sessions per stage).** Entering the
|
|
137
158
|
currently-stamped stage from a *new* session is legal and appends a fresh
|
|
138
159
|
stamp: `enter-stage.sh`'s idempotence guard keys on the full
|
|
139
|
-
`(iteration, stage, session-id)`
|
|
140
|
-
is a no-op
|
|
160
|
+
`(iteration, stage, session-id, head)` tuple, so only the *same* session
|
|
161
|
+
re-entering **at the same commit** is a no-op — a re-entry after `HEAD` moved
|
|
162
|
+
appends a fresh stamp carrying the new head, which is what makes re-running the
|
|
163
|
+
tool the stated remedy for a stale recorded head rather than a reported no-op
|
|
164
|
+
that changes nothing (§check-stage-evidence). `check-stage-entry` assertion A
|
|
165
|
+
keys on the *predecessor* stamp,
|
|
141
166
|
which the stage's first entry satisfied for every sibling. So N sessions may
|
|
142
167
|
enter one stage — a multi-session build, or a lead's intra-stage batch split
|
|
143
168
|
(§templates/lead.md) — serialized by the shared index/HEAD like any concurrent
|
|
@@ -683,6 +708,34 @@ around to stay accurate is miscalibrated, and the next filer does not know to
|
|
|
683
708
|
phrase around it. What all three trade against is prose, which the channel
|
|
684
709
|
already carries and a judge already reads.
|
|
685
710
|
|
|
711
|
+
**A fourth shape is refused — deriving post-close-ness from git — recorded so it
|
|
712
|
+
is not re-drafted.** The proposal: rather than reading the cursor, ask "has the
|
|
713
|
+
inbox been truncated since the close stamp's commit?", which separates the cases
|
|
714
|
+
with no marker field. It is refused on evidence, on four independent grounds.
|
|
715
|
+
|
|
716
|
+
- **It is wrong on the case that matters.** The predicate assumes the drain and
|
|
717
|
+
the closing stamp are commensurable in commit order. Measured over this
|
|
718
|
+
project's four most recently closed iterations they are not: the truncation is
|
|
719
|
+
**never** in the stamp's commit and is **always** a later, separately authored
|
|
720
|
+
one. So "truncated since the close stamp" is true of every normally-closed
|
|
721
|
+
iteration, and the single case it does distinguish — a close that stamped and
|
|
722
|
+
then skipped its drain — it answers *close-skipped*, handing the entering
|
|
723
|
+
session a recovery naming a stage that is gone. The cursor read is right there,
|
|
724
|
+
because close did run.
|
|
725
|
+
- **It cannot answer the other case at all.** Where close was genuinely skipped
|
|
726
|
+
there is no close-stamp commit to anchor on, so the git predicate degenerates
|
|
727
|
+
into "is there a close stamp?" — which is the cursor read, obtained from a file
|
|
728
|
+
the tool already holds open.
|
|
729
|
+
- **It would be `bin/enter-stage.sh`'s first `git` invocation.** That tool shells
|
|
730
|
+
out to git nowhere: every decision it takes is a read of the queue and the
|
|
731
|
+
state file. Adding history-dependence to the state machine's only writer makes
|
|
732
|
+
the entry decision non-hermetic, and the branch's fixture would have to
|
|
733
|
+
construct commit history rather than three files.
|
|
734
|
+
- **Its stated virtue does not discriminate.** "Needs no marker field, so
|
|
735
|
+
§check-gap-inbox-neutrality's two-field bound stays intact" is equally true of
|
|
736
|
+
the cursor read, which writes nothing anywhere. The bound is untouched by both,
|
|
737
|
+
so it selects neither.
|
|
738
|
+
|
|
686
739
|
**The tool writes no queue file, and that is the load-bearing constraint on the
|
|
687
740
|
whole channel.** This inbox exists precisely because a gap surfaced mid-stage has
|
|
688
741
|
no committed place to land except the queue file a stage session is already
|
|
@@ -729,36 +782,89 @@ scratch superseded at the boundary, but a gap filed on either side of a
|
|
|
729
782
|
concurrent merge must survive. The installer emits the line and
|
|
730
783
|
`check-merge-attrs` verifies it (§bin/install-lifecycle.sh, §check-merge-attrs).
|
|
731
784
|
|
|
732
|
-
**The boundary
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
785
|
+
**The boundary check: one detector, two dispositions.**
|
|
786
|
+
`bin/enter-stage.sh`'s first-stage (iteration-boundary) entry is unchanged in
|
|
787
|
+
**detection** — it still fires on any `- ` bullet in the inbox — and
|
|
788
|
+
**discriminates** on which of two dispositions it takes, because the drain and
|
|
789
|
+
the filing window do not coincide.
|
|
790
|
+
|
|
791
|
+
- **Close-skipped** — the closing iteration's cursor never reached the last
|
|
792
|
+
configured stage. The entry **refuses** (exit 1, the untriaged bullets
|
|
793
|
+
printed, nothing written — the same refusal contract as the non-empty Lessons
|
|
794
|
+
section), with the one recovery that applies: run the closing stage's
|
|
795
|
+
gap-drain step, truncate the inbox, re-enter. A stage was skipped, so the
|
|
796
|
+
recovery is to run it, and no gap outlives its iteration untriaged (the
|
|
797
|
+
gap-disposition rule: costed and filed, never flagged-and-skipped).
|
|
798
|
+
- **Post-close** — the cursor sits at the last configured stage, so the closing
|
|
799
|
+
stage has run and none is coming back. The entry is **admitted**: the bullets
|
|
800
|
+
print on stderr as an advisory naming them this iteration's first-stage
|
|
801
|
+
intake, and the stamp proceeds. Deleting a bullet without a disposition is
|
|
802
|
+
still not a drain.
|
|
803
|
+
|
|
804
|
+
The discriminator is the cursor read `lifecycle_closing_stage_reached`
|
|
805
|
+
(§lib/stages.sh), the same predicate `bin/file-gap.sh` warns from at capture, so
|
|
806
|
+
a filer told "none is left to drain it" is told so by the very test that later
|
|
807
|
+
admits the bullet rather than by a lookalike. **Two edges take the post-close
|
|
808
|
+
disposition**, both following precedents the script already carries: a closing
|
|
809
|
+
iteration that was never named (the `—` placeholder) has no close to have
|
|
810
|
+
skipped — the guard `LIFECYCLE_KIT_BOUNDARY_REQUIRE` applies one block down for
|
|
811
|
+
the same reason — and an inbox holding bullets with no cursor at all, a fresh
|
|
812
|
+
consumer's first boundary, is that case too.
|
|
813
|
+
|
|
814
|
+
**No second detector is added for the post-close window**: the existing refusal
|
|
815
|
+
already detects it, and what was missing was the message's actionability. That
|
|
816
|
+
ruling is **kept and re-read** rather than retired — the two-disposition shape
|
|
817
|
+
satisfies it more exactly than the two-recovery message did, since one detector
|
|
818
|
+
still fires and what the discriminator picks is only what to do about it.
|
|
819
|
+
|
|
820
|
+
**Why admission, and not merely a better-worded refusal.** A refusal that picks
|
|
821
|
+
the right message still leaves the queue write where this project's own history
|
|
822
|
+
puts it: made **before any stamp exists, by a session that has entered no
|
|
823
|
+
stage**, and committed as though by a stage that has not started. Routing a
|
|
824
|
+
post-close finding into the first stage's ordinary intake is satisfiable only
|
|
825
|
+
*inside* that stage — the intake is its — so the entry has to succeed for the
|
|
826
|
+
finding to reach it. What the change buys is that the disposition becomes an
|
|
827
|
+
ordinary in-stage queue write in the stage that writes the queue anyway.
|
|
828
|
+
|
|
829
|
+
**What the admission costs, and why the loss is smaller than it looks.** The
|
|
830
|
+
invariant "no gap outlives its iteration untriaged" is not weakened, because a
|
|
831
|
+
post-close bullet never had a drainer in the iteration it was filed in — that is
|
|
832
|
+
the defect, and no message could have supplied one. On admission the bullet
|
|
833
|
+
stops being post-close: it becomes an ordinary mid-iteration bullet of the
|
|
834
|
+
**new** iteration, and it therefore acquires the drainer it never had, that
|
|
835
|
+
iteration's mandatory close drain. The first stage is directed to take it
|
|
836
|
+
earlier because it is writing the queue anyway; if it does not, close does. That
|
|
837
|
+
forcing function is the existing one rather than a new one.
|
|
838
|
+
|
|
839
|
+
**The honest limit, stated because it is real.** The finding's *disposition*
|
|
840
|
+
then lands in the next iteration's ledger, which cannot be repaired: the finding
|
|
841
|
+
postdates its own iteration's close, so no iteration-correct ledger position
|
|
842
|
+
exists for it. What is repaired is legibility — a promoted entry's provenance
|
|
843
|
+
sentence carries the bullet's own date and names the iteration whose close
|
|
844
|
+
generated it, so a reader sees where the finding came from even though its
|
|
845
|
+
disposition sits one iteration later. A record that is late and says so is
|
|
846
|
+
strictly better than one that is late and silent.
|
|
847
|
+
|
|
848
|
+
That check is the inbox's
|
|
849
|
+
forcing function — branch-conditional as of the two dispositions above, refusing
|
|
850
|
+
on the close-skipped branch and obliging an in-stage disposition on the other —
|
|
851
|
+
so the inbox declares itself on the close-surface roster
|
|
751
852
|
(§The close-surface roster) here, where the forcing function is documented:
|
|
752
853
|
|
|
753
854
|
close-surface: .workflow/gap-inbox.md forced=lifecycle-kit/SPEC.md §bin/enter-stage.sh
|
|
754
855
|
|
|
755
856
|
**Producers and consumers.** Producer: any mid-iteration session (lead or stage)
|
|
756
857
|
via `bin/file-gap.sh` — the knob default makes the channel live everywhere the
|
|
757
|
-
kit is vendored. Consumers
|
|
758
|
-
|
|
759
|
-
fixed inline that session, or
|
|
760
|
-
|
|
761
|
-
|
|
858
|
+
kit is vendored. Consumers, **two**, one per disposition of the boundary check.
|
|
859
|
+
The close skill's drain step (§templates/stages/) dispositions every bullet —
|
|
860
|
+
promoted to a deferred `[design-pending]` entry, fixed inline that session, or
|
|
861
|
+
discarded with cause in the close commit message — then truncates the inbox to
|
|
862
|
+
its header. The **first stage's intake step** (§templates/stages/) takes the
|
|
863
|
+
bullets the boundary carried, with the same disposition set and the same
|
|
864
|
+
truncate-in-the-same-commit rule, run after its stamp; it is reachable at every
|
|
865
|
+
boundary with no enabling config, and it exists because a post-close bullet has
|
|
866
|
+
no drainer in the iteration that filed it. The boundary check reads emptiness at
|
|
867
|
+
the next first-stage entry as the backstop for both.
|
|
762
868
|
|
|
763
869
|
**A `recurrence:` date records a session's judgment that a finding re-occurred,
|
|
764
870
|
made by reading the bullet's prose. A slug appearing in a bullet is an input to
|
|
@@ -770,10 +876,60 @@ judgment: on a bullet it judges a recurrence it stamps the date onto that entry'
|
|
|
770
876
|
declaration — creating the line when absent, appending the date when present —
|
|
771
877
|
**in addition to** its ordinary disposition, never instead of it. It is reachable
|
|
772
878
|
at every close with no enabling config, since the drain is already mandatory and
|
|
773
|
-
the boundary refusal already forces it.
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
879
|
+
the boundary refusal already forces it.
|
|
880
|
+
|
|
881
|
+
The drain is *not* the only producer, and that path is **ruled: sanctioned, and
|
|
882
|
+
obliged.** A session that observes a recurrence outside the capture channel
|
|
883
|
+
stamps one directly, in the commit it is already making. The obligation attaches
|
|
884
|
+
to the **judgment**, not to the channel the observation arrived through — the
|
|
885
|
+
failure the counter exists to end is a recurrence *seen and not recorded*, and a
|
|
886
|
+
merely permitted write is one a session under pressure correctly declines, which
|
|
887
|
+
would answer the question in form and leave it open in substance.
|
|
888
|
+
|
|
889
|
+
**A lead cannot discharge that obligation as written, and the channel already
|
|
890
|
+
supplies what it can.** §templates/lead.md forbids the lead every queue write, so
|
|
891
|
+
a lead that judges a recurrence has exactly one channel — this inbox — and a
|
|
892
|
+
lead's judgment is made at the boundary, which is precisely where the check above
|
|
893
|
+
stands. The discharge is therefore *stated* rather than invented: **a lead
|
|
894
|
+
discharges the obligation by filing the judgment and its grounds into the
|
|
895
|
+
bullet's prose**, and the stamp is made by the session that may write the queue,
|
|
896
|
+
judging from that prose. That is the shape the drain already has — the bullet's
|
|
897
|
+
prose is the grounds the judge reads — so no new authority and no new producer is
|
|
898
|
+
created. What the two dispositions above supply is the route's far end: a
|
|
899
|
+
boundary-filed lead judgment reaches a judge rather than a refusal.
|
|
900
|
+
This settles the **authority** half only; the **reach** half — stages that may
|
|
901
|
+
write the queue but never load this rule — is untouched here.
|
|
902
|
+
|
|
903
|
+
*Not forbidden*, on three independent grounds. It would strand a class by
|
|
904
|
+
construction: this drain runs once, early in close, while close's own later steps
|
|
905
|
+
— audits, lesson disposition, staleness reads, release disposition — necessarily
|
|
906
|
+
generate findings that postdate it, leaving the one stage downstream of every
|
|
907
|
+
drain no legal channel at all. It is already being obeyed at a recorded cost, and
|
|
908
|
+
a rule whose disciplined observance produces a known-wrong count is the wrong
|
|
909
|
+
rule. And it would red roughly a third of its own precedent — the ground on which
|
|
910
|
+
the provenance gate below is refused, a refusal made to keep this route open.
|
|
911
|
+
|
|
912
|
+
*Not mechanized*, which is foreclosed rather than weighed: **no mechanism
|
|
913
|
+
produces the declaration** is the ruling stated above, and mechanizing this path
|
|
914
|
+
reverses it. Independently, the only available mechanism is the capture-time
|
|
915
|
+
matcher, whose honest limit above runs in the **under-counting** direction, so
|
|
916
|
+
mechanizing on it would dress a known-lossy predicate as a count.
|
|
917
|
+
|
|
918
|
+
*Prospective only, operator-ruled 2026-08-17, and this is the ruling's own reach
|
|
919
|
+
rather than a narrowing of it.* No session backfills a date onto a judgment an
|
|
920
|
+
earlier session declined to stamp. The trade below is what forecloses it: this
|
|
921
|
+
rule concedes re-derivability and pays with **auditability by inspection**, so a
|
|
922
|
+
date is legible only because the prose it was judged from sits in the same diff —
|
|
923
|
+
and for a past decline the judging session is gone and no contemporaneous prose
|
|
924
|
+
can be put there. A backfilled date would carry neither property, which is
|
|
925
|
+
precisely the artifact this section refuses to ship. The counter-argument is
|
|
926
|
+
recorded rather than buried: refutation two above rests on the declines having
|
|
927
|
+
produced a known-wrong count, and that count stays wrong. A rule change fixes the
|
|
928
|
+
count forward by removing what produced the error; retro-scoring is a different
|
|
929
|
+
act on a worse evidence base. Stated here so the reach is read rather than
|
|
930
|
+
re-derived.
|
|
931
|
+
|
|
932
|
+
Stamping is **idempotent per (slug, date)** — two filings of one slug on
|
|
777
933
|
one day record one date, the day being the only resolution the bullet's own
|
|
778
934
|
grammar has, and inventing a finer one would claim precision this channel does not
|
|
779
935
|
carry.
|
|
@@ -787,16 +943,37 @@ pays for it is **auditability by inspection** — the drain stamps the declarati
|
|
|
787
943
|
in the *same commit* that truncates the inbox, so the judgment and the prose it
|
|
788
944
|
was made from sit in one diff and a reader auditing a date reads that commit and
|
|
789
945
|
sees the bullet the judge read. That same-commit rule is therefore **load-bearing
|
|
790
|
-
rather than incidental**: it is the audit artifact.
|
|
946
|
+
rather than incidental**: it is the audit artifact. The **invariant** is the
|
|
947
|
+
judgment and its grounds landing in one commit; truncating the inbox is one way
|
|
948
|
+
of satisfying it and not the thing itself. A direct stamp truncates nothing, so
|
|
949
|
+
it discharges the same obligation the only way it can — **the observation is
|
|
950
|
+
written into the entry, beside the declaration, in the stamping commit** — and a
|
|
951
|
+
reader auditing a direct date finds the grounds there exactly as with a drained
|
|
952
|
+
one. The same-commit rule is also what makes the
|
|
953
|
+
stamp a **mandated write** in queue-kit's sense — the class
|
|
954
|
+
queue-kit/SPEC.md §check-queue-entry-budget defines, and the section a stamping
|
|
955
|
+
session reads for its relief when that gate's per-entry cap blocks the stamp;
|
|
956
|
+
that grounds write is the same mandated write as the date it accompanies, its
|
|
957
|
+
grounds half rather than a discretionary addition, so it claims the same relief.
|
|
958
|
+
Neither the class nor the relief is restated here; this section is only the
|
|
959
|
+
contract that mandates the write. Re-running a matcher is
|
|
791
960
|
replaced by reading the grounds, which is the correct trade when the thing
|
|
792
961
|
recorded is a judgment.
|
|
793
962
|
|
|
963
|
+
**What the sanction adds is judges.** It adds no *new* class of unverifiability —
|
|
964
|
+
re-derivability is conceded above for the drain's own stamps — but the population
|
|
965
|
+
that may stamp widens from one stage to every session, and some of those sessions
|
|
966
|
+
judge their own tool use, which is a session grading itself. No gate can hold
|
|
967
|
+
that and none is proposed; the counterweight is the grounds obligation above,
|
|
968
|
+
which makes a thin judgment visibly thin.
|
|
969
|
+
|
|
794
970
|
**A provenance gate was drafted here and is refused, recorded so it is not
|
|
795
971
|
re-drafted.** Requiring every commit that adds a `recurrence:` date to co-stage
|
|
796
972
|
the inbox looks like the enforced replacement for re-derivability. It is not: a
|
|
797
973
|
back-test over this project's own history redded roughly one in three of the
|
|
798
974
|
commits that had ever stamped one, and it would foreclose the direct-stamp path
|
|
799
|
-
above by gating exactly the route
|
|
975
|
+
above by gating exactly the route the ruling there opens — which makes this
|
|
976
|
+
refusal retrospectively correct rather than speculative. A gate that
|
|
800
977
|
reds a third of the precedent it was derived from is measuring the rule, not the
|
|
801
978
|
tree.
|
|
802
979
|
|
|
@@ -1091,7 +1268,8 @@ the same seam — a `forced=` declaration authored outside the manifest set woul
|
|
|
1091
1268
|
carry an unresolved citation, and no gate here catches that, because the
|
|
1092
1269
|
resolver is canon-kit's and lifecycle-kit does not depend on canon-kit.
|
|
1093
1270
|
|
|
1094
|
-
**The derivation** is `
|
|
1271
|
+
**The derivation** is the `close-surfaces` emit arm
|
|
1272
|
+
(§The close-surfaces emit arm), never a maintained registry. Two
|
|
1095
1273
|
sources, unioned: every `close-surface:` declaration across the resolved kit
|
|
1096
1274
|
roots and the consumer's configured declaration surfaces; and every **gitignored
|
|
1097
1275
|
member of the workflow directory** — capture-tier by definition (gate-sdk/SPEC.md
|
|
@@ -1143,15 +1321,28 @@ descriptor. For a case that differs by a knob rather than by argv, `gate_env
|
|
|
1143
1321
|
NAME=VALUE` sets that one case's environment in the caller's subshell;
|
|
1144
1322
|
`check-stage-evidence`'s session-boundary posture cases are the worked instance.
|
|
1145
1323
|
|
|
1146
|
-
Every gate-driving runner in this kit
|
|
1147
|
-
`
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1324
|
+
Every gate-driving runner in this kit resolves through `gate_run` rather than a
|
|
1325
|
+
held `checks/<name>.sh` path, and the payoff has now been collected **twice**:
|
|
1326
|
+
`check-stage-entry`'s runner needed no edit when that gate ported, and
|
|
1327
|
+
`check-close-surfaces`' sandbox-repo runner needed none when this one did —
|
|
1328
|
+
each already named the gate. Two attestations rather than one exception, which
|
|
1329
|
+
is the stronger claim this rule was written to earn.
|
|
1151
1330
|
|
|
1152
1331
|
The rest exercise `bin/` tools, which are advisory tooling with no gate to
|
|
1153
1332
|
dispatch and so have nothing to say about reach.
|
|
1154
1333
|
|
|
1334
|
+
`gate-tests/gap-inbox-route.test.sh` is one of those, and it is named because it
|
|
1335
|
+
closes a hole rather than adding coverage to a covered path: the
|
|
1336
|
+
iteration-boundary gap-inbox check had **no fixture at all**, so both its refusal
|
|
1337
|
+
and its recovery text were unpinned while being the thing an entering session
|
|
1338
|
+
acts on. It drives `bin/enter-stage.sh` against a sandboxed queue, state file and
|
|
1339
|
+
inbox — the harness `gate-tests/boundary-scratch-wipe.test.sh` established — and
|
|
1340
|
+
pins the branch both ways: the close-skipped case refuses with the drain recovery
|
|
1341
|
+
and writes nothing, the post-close case stamps and carries the bullets with its
|
|
1342
|
+
advisory, the never-named and no-cursor edges take the post-close branch, and
|
|
1343
|
+
`--simulate` reports each branch with its recovery relayed and writes nothing. No
|
|
1344
|
+
fixture *pair* is owed: this is a `bin/` tool, not a gate.
|
|
1345
|
+
|
|
1155
1346
|
## Per-component contracts
|
|
1156
1347
|
|
|
1157
1348
|
### lib/stages.sh
|
|
@@ -1177,6 +1368,22 @@ readers deliberately do *not* call this helper — each derives the cursor
|
|
|
1177
1368
|
itself from a path it already configures, so no consumer kit gains a
|
|
1178
1369
|
lifecycle-kit dependency.
|
|
1179
1370
|
|
|
1371
|
+
`lifecycle_closing_stage_reached [<state-file>]` is the **closing-stage
|
|
1372
|
+
predicate** built on that cursor: success when the cursor equals the last member
|
|
1373
|
+
of `LIFECYCLE_KIT_STAGES`, failure otherwise — including for both no-cursor
|
|
1374
|
+
shapes, since a cursor that does not exist has not reached anything. It is
|
|
1375
|
+
hoisted rather than spelled at each site because its **two callers must agree by
|
|
1376
|
+
construction**: `bin/file-gap.sh` reads it for the capture-time warning that
|
|
1377
|
+
tells a filer which consequence they are buying, and `bin/enter-stage.sh` reads
|
|
1378
|
+
it at the iteration-boundary gap-inbox check to choose between refusing and
|
|
1379
|
+
admitting (§The committed gap inbox). A filer warned that "none is left to drain
|
|
1380
|
+
it" is warned by the very test that later admits the bullet, rather than by a
|
|
1381
|
+
lookalike that can drift from it. **No knob is minted and none is possible**: the
|
|
1382
|
+
last configured stage is already `LIFECYCLE_KIT_STAGES`'s last member, so the
|
|
1383
|
+
predicate is config-derived in every consumer with nothing left to configure. It
|
|
1384
|
+
is a predicate over the cursor and must not acquire a third caller silently —
|
|
1385
|
+
`lifecycle_current_stage` remains the general reader.
|
|
1386
|
+
|
|
1180
1387
|
The loader also owns `lifecycle_registration_block`,
|
|
1181
1388
|
which renders the resident registration block (§bin/install-lifecycle.sh) from the
|
|
1182
1389
|
live config so `bin/install-lifecycle.sh` and `check-lifecycle-registration`
|
|
@@ -1256,6 +1463,12 @@ rather than calling it directly.
|
|
|
1256
1463
|
The deterministic writer for a stage transition: `enter-stage.sh <stage>`
|
|
1257
1464
|
appends the invocation stamp, reading `session-id.sh` for
|
|
1258
1465
|
the id — never an argument, so the no-hand-picking rule rides into the tool.
|
|
1466
|
+
It is the **sole production writer of `<head>`** (§The state machine), read as
|
|
1467
|
+
`git rev-parse --short HEAD` in the state file's own work tree at the instant of
|
|
1468
|
+
the append, and `none` where that yields nothing — so the field is produced by
|
|
1469
|
+
the live path every stage template's first step already invokes rather than only
|
|
1470
|
+
under test. It takes no enabling knob: the field is unconditional, which is what
|
|
1471
|
+
refusing an optional spelling buys.
|
|
1259
1472
|
`<stage>` must be a configured stage; anything else is a usage error (exit 2).
|
|
1260
1473
|
Its positionals are membership-validated rather than free text, so it owes no
|
|
1261
1474
|
leading-`-` refusal (gate-sdk/SPEC.md §The bin/-tool contract) — but it owes the
|
|
@@ -1282,6 +1495,13 @@ kit-owned surfaces — `LIFECYCLE_KIT_LESSON_EVIDENCE_FILE` and
|
|
|
1282
1495
|
as **built-in members**: the kit owns those surfaces, so they do not ride the
|
|
1283
1496
|
consumer knob (git history keeps the retired stamps and the retired surveys).
|
|
1284
1497
|
|
|
1498
|
+
That written-surface set is also the **source of the stamp-commit purity
|
|
1499
|
+
assertion's exemption** (§check-stage-evidence): the boundary reset is the one
|
|
1500
|
+
legitimate reason a stamp commit touches anything besides the state file, so the
|
|
1501
|
+
assertion reads the members this reset already resolves rather than a roster
|
|
1502
|
+
minted to describe it — which is why widening the reset cannot leave the
|
|
1503
|
+
assertion behind.
|
|
1504
|
+
|
|
1285
1505
|
**What counts as the header, for the truncate.** The retained run is the
|
|
1286
1506
|
member's leading blank and `#` **comment** lines, stopping at the first data
|
|
1287
1507
|
line *or* at a markdown `## ` section heading, whichever comes first. The second
|
|
@@ -1343,11 +1563,16 @@ The boundary entry also
|
|
|
1343
1563
|
**refuses outright when `## Lessons Learned` is non-empty** (exit 1, the
|
|
1344
1564
|
untriaged entries printed, nothing written — the same refusal contract as the
|
|
1345
1565
|
built-in pre-flight): an untriaged lesson must not cross into the next
|
|
1346
|
-
iteration, so no `[attend]` injection (queue-kit §
|
|
1347
|
-
outlive the iteration that filed it.
|
|
1348
|
-
(`LIFECYCLE_KIT_GAP_INBOX_FILE`)
|
|
1349
|
-
|
|
1350
|
-
|
|
1566
|
+
iteration, so no `[attend]` injection (queue-kit §The queue-index arm) can
|
|
1567
|
+
outlive the iteration that filed it. Its **gap-inbox check
|
|
1568
|
+
(`LIFECYCLE_KIT_GAP_INBOX_FILE`) is one detector with two dispositions**
|
|
1569
|
+
(§The committed gap inbox owns the design): it fires on any bullet, then reads
|
|
1570
|
+
`lifecycle_closing_stage_reached` to choose. A **close-skipped** boundary
|
|
1571
|
+
refuses on the same contract as the Lessons check, so a mid-iteration gap the
|
|
1572
|
+
close skill did not drain cannot cross untriaged; a **post-close** one admits
|
|
1573
|
+
the entry and prints the bullets as a stderr advisory naming them the entering
|
|
1574
|
+
stage's intake, because no stage of the closing iteration is coming back for
|
|
1575
|
+
them. An absent inbox has no bullets and passes either way.
|
|
1351
1576
|
**The survey record, its neighbour in the boundary reset, deliberately does
|
|
1352
1577
|
not refuse** (§The survey record): it is truncated like any built-in member, and
|
|
1353
1578
|
a non-empty one is never a blocker, because a survey owes nobody a disposition —
|
|
@@ -1390,17 +1615,40 @@ the compliant one). `LIFECYCLE_KIT_ENTRY_PREFLIGHT` is a generic per-stage hook
|
|
|
1390
1615
|
— no consumer surface is named in the kit; a downstream kit whose gate is the
|
|
1391
1616
|
real precondition for a stage wires itself here (as evidence-kit's manifest gate
|
|
1392
1617
|
does for close entry), turning a would-be pre-commit deadlock into a loud
|
|
1393
|
-
refusal at the entry.
|
|
1618
|
+
refusal at the entry. **Each entry's `<command>` is split on whitespace and
|
|
1619
|
+
exec'd as argv with no interpreter word prepended**, so the configured path rides
|
|
1620
|
+
its own exec bit: a consumer wiring a gate here configures the gate's *invocation*
|
|
1621
|
+
and not its declaration file, and a configured path that stops being executable —
|
|
1622
|
+
a member ported to a binary substrate leaving a data-file descriptor behind — is
|
|
1623
|
+
a stage-entry breakage rather than a stale reference. **`--simulate <stage>` — the read-only preflight mode:**
|
|
1394
1624
|
it runs everything a real entry runs up to the write — config load and stage
|
|
1395
1625
|
validation, header parse, session-id derivation, the idempotence probe (a
|
|
1396
1626
|
would-be no-op is reported as such and exits 0), the candidate-stamp temp
|
|
1397
1627
|
state build, `check-stage-entry`, every matching `LIFECYCLE_KIT_ENTRY_PREFLIGHT`
|
|
1398
|
-
entry, and
|
|
1399
|
-
|
|
1628
|
+
entry, and — at an iteration boundary — the Lessons check, the gap-inbox check
|
|
1629
|
+
and every `LIFECYCLE_KIT_BOUNDARY_REQUIRE` member, in the order a real entry runs
|
|
1630
|
+
them; then it stops: no stamp, no boundary truncation, the temp files removed.
|
|
1631
|
+
That roster is stated in full because a roster that stops short of the refusals
|
|
1632
|
+
the code runs is read as a guarantee the mode does not give. Every output
|
|
1400
1633
|
line is prefixed `enter-stage (simulate):` so a transcript can never read as
|
|
1401
1634
|
a stamp. Exit 0 = the real entry would proceed (or no-op); exit 1 = it would
|
|
1402
1635
|
refuse, with the refusing check's output relayed line-by-line; exit 2 =
|
|
1403
|
-
usage/config error, as a real entry.
|
|
1636
|
+
usage/config error, as a real entry.
|
|
1637
|
+
|
|
1638
|
+
**Every refusal's recovery is relayed too, and that is the mode's contract
|
|
1639
|
+
rather than a courtesy.** A refusal's `help:` line is its actionable half — the
|
|
1640
|
+
real refusal's own design rests on that (§The committed gap inbox) — so each one
|
|
1641
|
+
prints under `--simulate` as well, prefixed like every other simulate line. The
|
|
1642
|
+
mode's designed consumer is the lead (§templates/lead.md), which gates an
|
|
1643
|
+
expensive dispatch on it rather than hand-deriving prior-stage completeness;
|
|
1644
|
+
relaying a verdict while withholding the one line that resolves it hands that
|
|
1645
|
+
consumer the refusal and keeps the recovery, which is measured rather than
|
|
1646
|
+
supposed — a lead reading a simulated boundary refusal escalated a question the
|
|
1647
|
+
withheld line answers verbatim. The **gap-inbox check's post-close disposition
|
|
1648
|
+
reports the branch it would take**: that the entry would proceed, naming how
|
|
1649
|
+
many bullets it would carry into the entering stage's intake, since "would
|
|
1650
|
+
refuse" and "would proceed carrying work" are different answers to the question
|
|
1651
|
+
the lead is asking. Not a gate — exercised in `smoke/`
|
|
1404
1652
|
beside the existing enter-stage coverage (would-pass, would-refuse,
|
|
1405
1653
|
would-no-op, nothing written).
|
|
1406
1654
|
|
|
@@ -1418,8 +1666,14 @@ stamp is appended and no stage token is written, so the cursor is untouched and
|
|
|
1418
1666
|
"stage motion never writes the queue" is unweakened. The precedent for this tool
|
|
1419
1667
|
writing the queue header at all is the boundary reset, which already does.
|
|
1420
1668
|
|
|
1421
|
-
Before writing, the mode asserts its **columns-2-
|
|
1422
|
-
|
|
1669
|
+
Before writing, the mode asserts its **columns-2-to-last witness** — fields 2
|
|
1670
|
+
through `NF` of every data line (stage, session id, date, head, and any field a
|
|
1671
|
+
later grammar appends) identical before and after. It reads to the end of the
|
|
1672
|
+
line rather than to a pinned column because a field riding *outside* the witness
|
|
1673
|
+
could be dropped or corrupted by the rename with neither the tool nor its test
|
|
1674
|
+
noticing, which is exactly what the four-field spelling did to `<head>` the
|
|
1675
|
+
moment that field landed; an explicit column-5 check was refused because it
|
|
1676
|
+
re-hardcodes the arity the gap came from. This
|
|
1423
1677
|
is the content predicate applied by the **writer**, where it is cheap and exact,
|
|
1424
1678
|
rather than by the `Write`/`Edit` guard: a `PreToolUse` hook sees only *proposed*
|
|
1425
1679
|
content, so proving "no stage token moved" there means reconstructing the
|
|
@@ -1432,11 +1686,9 @@ resolved through gate-sdk's `gate_command` rather than named by script path, so
|
|
|
1432
1686
|
the arm names a gate and never a substrate: the resolved argv is prefix-shaped,
|
|
1433
1687
|
so the two positionals ride it unchanged, and an argv the bridge refused to build
|
|
1434
1688
|
is exit 2 — the dispatcher's own verdict — never a rename pre-flighted by a check
|
|
1435
|
-
that did not run. The built-in `check-stage-entry` pre-flight above
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
resolve differently and the difference is the member's substrate, not a
|
|
1439
|
-
convention gap. **Refusals** (exit 2,
|
|
1689
|
+
that did not run. The built-in `check-stage-entry` pre-flight above resolves the
|
|
1690
|
+
same way, so both arms of this tool name a gate and neither names a substrate.
|
|
1691
|
+
**Refusals** (exit 2,
|
|
1440
1692
|
nothing written): `<name>` empty; `<name>` equal to the unnamed placeholder,
|
|
1441
1693
|
which only the boundary reset may write — checked ahead of the grammar that would
|
|
1442
1694
|
also reject it, so the message names the owning writer instead of reporting a
|
|
@@ -1537,22 +1789,45 @@ line is live the moment `.gitattributes` carries it.
|
|
|
1537
1789
|
Advisory tooling, not a gate: no fixture pair is owed; every step is exercised
|
|
1538
1790
|
end-to-end in `smoke/install.sh`.
|
|
1539
1791
|
|
|
1540
|
-
###
|
|
1792
|
+
### The close-surfaces emit arm
|
|
1541
1793
|
|
|
1542
1794
|
Prints the derived close-surface roster (§The close-surface roster), one row per
|
|
1543
1795
|
surface, tab-separated `<path> <mode> <reclaim> <owner>`, sorted by path. A
|
|
1544
1796
|
field with nothing declared is `-`; an owner-less row is a capture surface source
|
|
1545
1797
|
2 found with no declaration, whose mode reads `(undeclared)`. The mode is echoed
|
|
1546
1798
|
verbatim — a malformed one is passed through for `check-close-surfaces` to rule
|
|
1547
|
-
on, so the derivation never silently repairs what the gate exists to catch.
|
|
1799
|
+
on, so the derivation never silently repairs what the gate exists to catch. An
|
|
1800
|
+
empty roster prints nothing and succeeds: a resolved-empty derivation is an
|
|
1801
|
+
answer, never an error.
|
|
1802
|
+
|
|
1803
|
+
A **non-gate arm** (gate-sdk/SPEC.md §The non-gate arm), invoked as
|
|
1804
|
+
`bash gate-sdk/bin/run-gates.sh --emit close-surfaces [scan-root]` — the
|
|
1805
|
+
front-end that resolves the arm's bridged knobs in front of it. Its two callers
|
|
1806
|
+
are `check-close-surfaces`, which reaches the derivation **in process** rather
|
|
1807
|
+
than spawning anything, and close's own inbound-triage sweep. Nothing stores the
|
|
1808
|
+
roster and nothing must: its whole value is that it is recomputed at the moment
|
|
1809
|
+
close reads it, so a capture surface added yesterday appears today.
|
|
1548
1810
|
|
|
1549
1811
|
The declaration surfaces are the resolved kit roots' `LIFECYCLE_KIT_ROSTER_BASENAME`
|
|
1550
1812
|
files plus every `LIFECYCLE_KIT_CLOSE_SURFACE_GLOBS` match (gate-sdk's kit-root
|
|
1551
1813
|
resolution, consumer-first with kit shadowing — the order every kit registry
|
|
1552
|
-
already uses); duplicates collapse. Follows the affordance contract
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1814
|
+
already uses); duplicates collapse. Follows the affordance contract, with the
|
|
1815
|
+
`cd` a compiled arm cannot take becoming a **computed base**: the scan-root
|
|
1816
|
+
argument, else the repo toplevel, with every path globbed, ignored and printed
|
|
1817
|
+
relative to it. Config-via-env across the bridge; and the three exit-2 causes —
|
|
1818
|
+
a non-repo base, an unreadable declaration surface, a `git check-ignore` that
|
|
1819
|
+
could not decide — become the arm's error return, which the front-end and the
|
|
1820
|
+
in-process caller both surface. Advisory tooling, no fixture pair owed — the
|
|
1821
|
+
gate below is what blocks, and §The non-gate arm is the second, now-structural
|
|
1822
|
+
ground for the same verdict: an arm returning a document has no pass and no
|
|
1823
|
+
fail to fixture.
|
|
1824
|
+
|
|
1825
|
+
The sort is by path, with the **whole row** as its tie-break, and that is
|
|
1826
|
+
observable rather than incidental: one path may be declared on two surfaces, a
|
|
1827
|
+
duplication the derivation deliberately does not collapse (it collapses
|
|
1828
|
+
duplicate *surfaces*, not duplicate declarations). A path-only sort would leave
|
|
1829
|
+
the tie order at the sorter's discretion and churn the gate's error order for no
|
|
1830
|
+
edit.
|
|
1556
1831
|
|
|
1557
1832
|
### check-close-surfaces
|
|
1558
1833
|
|
|
@@ -1574,17 +1849,35 @@ depend on canon-kit — the same ownership-cycle argument that rules out the log
|
|
|
1574
1849
|
merge. The honest arrangement is a pair of gates independently reading one
|
|
1575
1850
|
surface, each asserting what it owns.
|
|
1576
1851
|
|
|
1577
|
-
The gate reads the roster by
|
|
1578
|
-
|
|
1579
|
-
|
|
1852
|
+
The gate reads the roster by **calling the derivation in process**
|
|
1853
|
+
(§The close-surfaces emit arm),
|
|
1854
|
+
so a roster it could not derive is fail-closed (exit
|
|
1855
|
+
2), as is an unreadable declaration surface. The in-process call is the point
|
|
1856
|
+
rather than an optimization: it makes "the derivation and the gate can never
|
|
1857
|
+
disagree" structural instead of conventional. It also means the descriptor
|
|
1858
|
+
acquires a **source coupling** — the gate module and the emit module it reaches
|
|
1859
|
+
transitively join `couples=` beside the surfaces already named, or the gate
|
|
1860
|
+
stays registered, green, and never triggered on the edit that broke it.
|
|
1861
|
+
|
|
1862
|
+
An optional scan-root argument (passed through to the derivation as its base) is
|
|
1863
|
+
the fixture
|
|
1580
1864
|
capability: `git check-ignore` never reports a *tracked* path, and a fixture file
|
|
1581
1865
|
must be tracked to survive a clone, so a case dir cannot hold a capture-tier
|
|
1582
1866
|
member. The `good/`+`bad/` pair therefore covers assertion B on a consumer-set
|
|
1583
1867
|
`LIFECYCLE_KIT_CLOSE_SURFACE_GLOBS`, and the bespoke
|
|
1584
1868
|
`gate-tests/check-close-surfaces.test.sh` builds sandbox repos with a real
|
|
1585
|
-
`.gitignore` for assertions A and C — the `check-exec-bit` precedent.
|
|
1586
|
-
|
|
1587
|
-
|
|
1869
|
+
`.gitignore` for assertions A and C — the `check-exec-bit` precedent. Both move
|
|
1870
|
+
with the member across a substrate change rather than being re-authored: the
|
|
1871
|
+
pair is keyed by gate *name*, and the scenario runner dispatches by name through
|
|
1872
|
+
`gate_run` (§Testing). Tier
|
|
1873
|
+
`precommit`; the `# graph:` manifest couples the workflow dir, the
|
|
1874
|
+
declaration surfaces and the two crate modules.
|
|
1875
|
+
|
|
1876
|
+
The three assertions carry `assertion A:` / `assertion B:` / `assertion C:`
|
|
1877
|
+
markers in the implementing member's own source, in whatever comment leader its
|
|
1878
|
+
substrate spells. That is not decoration: `check-gate-assertions` set-matches
|
|
1879
|
+
the enumeration above against those markers and reds on an **empty** set, so a
|
|
1880
|
+
port that drops them leaves the gate looking unasserted.
|
|
1588
1881
|
|
|
1589
1882
|
Calibration and honest limit: the gate asserts the roster is **complete and
|
|
1590
1883
|
moded**, never that close actually *read* a surface. Reading is a session act
|
|
@@ -1616,7 +1909,7 @@ exit 1). The stale-block report prints **every** hunk: the format and the
|
|
|
1616
1909
|
uncapped contract are the crate renderer's, whose home is
|
|
1617
1910
|
gate-sdk/SPEC.md §The diff renderer since it stopped being this gate's private
|
|
1618
1911
|
mechanism, and this gate is its one live consumer. Resolution fails closed: a missing agent file, a begin marker without
|
|
1619
|
-
its end, or an errored
|
|
1912
|
+
its end, or an errored marker capture is exit 2 — a half-written or unreadable
|
|
1620
1913
|
target must not pass as clean. The gate satisfies the four gate-sdk contracts
|
|
1621
1914
|
(gate-sdk/SPEC.md §The gate model): the single `LIFECYCLE-REGISTRATION: clean`
|
|
1622
1915
|
line and a `help:` remedy on each finding path (output); exit 2 on an
|
|
@@ -1652,9 +1945,11 @@ stage axis off the header, nothing else would have caught it (an empty file
|
|
|
1652
1945
|
gives the grammar and staleness passes nothing to reject).
|
|
1653
1946
|
|
|
1654
1947
|
The stamp file is additionally kept provably bounded: every data line
|
|
1655
|
-
must be grammatically well-formed — exactly
|
|
1948
|
+
must be grammatically well-formed — exactly five fields, stage ∈ the
|
|
1656
1949
|
configured stage set plus the waiver token (a stamp token but never a header
|
|
1657
|
-
stage), date `YYYY-MM-DD
|
|
1950
|
+
stage), date `YYYY-MM-DD`, and `<head>` either the literal `none` or a
|
|
1951
|
+
lowercase hex abbreviation of 7 to 40 characters (§The state machine owns the
|
|
1952
|
+
field); every data line's iteration must be the current
|
|
1658
1953
|
one, stale lines from a prior iteration are rejected; and the `—`
|
|
1659
1954
|
unnamed-iteration sentinel may appear only while the header itself is unnamed.
|
|
1660
1955
|
It also reads the `<session-id>` field (which it once ignored) for one
|
|
@@ -1684,7 +1979,91 @@ undetected, so the allowance is stage-scoped, not global. The data section
|
|
|
1684
1979
|
begins after the first `---` separator; prose above it is not validated
|
|
1685
1980
|
line-by-line. Argument mode `$1 $2` (queue, state) with configured defaults
|
|
1686
1981
|
makes the gate fixture-capable; the sentinel-scoping interplay that exceeds
|
|
1687
|
-
one good/bad pair is covered by `gate-tests/check-stage-evidence.test.sh
|
|
1982
|
+
one good/bad pair is covered by `gate-tests/check-stage-evidence.test.sh`, which
|
|
1983
|
+
is also where the two assertions below are exercised — each needs a real git
|
|
1984
|
+
history, which no static fixture pair can carry.
|
|
1985
|
+
|
|
1986
|
+
**The stamp-provenance assertion.** A stamp proves the stage skill was invoked;
|
|
1987
|
+
this assertion is what makes it prove the invocation came **first**. For every
|
|
1988
|
+
**newly introduced** stamp, inside a git work tree: **`<head>` must name
|
|
1989
|
+
`HEAD`** — the recorded abbreviation, at least seven characters, must be a
|
|
1990
|
+
prefix of the full `HEAD` sha, so a consumer's `core.abbrev` never enters the
|
|
1991
|
+
contract.
|
|
1992
|
+
|
|
1993
|
+
A stamp is **newly introduced** when no data line in `HEAD`'s version of the
|
|
1994
|
+
state file carries the same `<session-id> <head>` pair. Identity is that pair
|
|
1995
|
+
rather than the whole line because `bin/enter-stage.sh --rename` rewrites
|
|
1996
|
+
column 1 of every data line and must not read as re-introducing all of them.
|
|
1997
|
+
**The migration clause** applies that same reasoning to the one other bulk
|
|
1998
|
+
rewrite this format has: a `HEAD`-version data line carrying only **four**
|
|
1999
|
+
fields matches any working-tree line with the same `<session-id>`, so the
|
|
2000
|
+
one-time five-field migration (§The state machine) is a rewrite and not an
|
|
2001
|
+
introduction. Without it the migration commit — and every consumer's own
|
|
2002
|
+
rewrite, which that section names as the recovery — would red against an
|
|
2003
|
+
assertion no historical stamp can satisfy. The clause is self-retiring:
|
|
2004
|
+
four-field lines cease to exist once migrated, and the boundary reset truncates
|
|
2005
|
+
the file within one iteration.
|
|
2006
|
+
|
|
2007
|
+
What it catches, without a history walk and without a per-stage surface roster:
|
|
2008
|
+
a session that stamps first and commits the stamp *after* its work commits has
|
|
2009
|
+
moved `HEAD` between the write and the commit, so the recorded head is stale and
|
|
2010
|
+
the gate reds naming both commits. **Same-stage re-entry is in reach by shape
|
|
2011
|
+
rather than by exemption** — a second session's stamp records its own `HEAD` and
|
|
2012
|
+
is committed on it, and the assertion never compares two stamps to each other.
|
|
2013
|
+
|
|
2014
|
+
**Four inertness conditions, all stated, because an unstated one reads as
|
|
2015
|
+
coverage.** The assertion does not run when
|
|
2016
|
+
|
|
2017
|
+
- **(a)** the state file's directory lies in no git work tree, or in a different
|
|
2018
|
+
one from the configured surfaces — a vendored tree under test, a sandbox;
|
|
2019
|
+
- **(b)** the file handed to the gate is not *this* work tree's own configured
|
|
2020
|
+
state file — its repo-root-relative path is not `LIFECYCLE_KIT_STATE_FILE`.
|
|
2021
|
+
"Inside a work tree" alone is not the discriminator the amendment behind this
|
|
2022
|
+
section assumed it was: a `gate-tests/` fixture tree sits inside the repo like
|
|
2023
|
+
everything else, and firing there would assert a recorded head against a repo
|
|
2024
|
+
whose history the fixture's stamps were never taken in. That is also what
|
|
2025
|
+
keeps this gate's argument mode fixture-capable at no cost to the assertion;
|
|
2026
|
+
- **(c)** the state file is not tracked in `HEAD`, because there is then no
|
|
2027
|
+
prior version to diff against and "newly introduced" is unanswerable rather
|
|
2028
|
+
than false — a consumer's first state-file commit;
|
|
2029
|
+
- **(d)** no stamp is newly introduced, which is every battery run that stamps
|
|
2030
|
+
nothing.
|
|
2031
|
+
|
|
2032
|
+
On the live file, `none` on a newly introduced stamp is a **red**, and that is
|
|
2033
|
+
what keeps the inertness from being a disarm. The residual is `git rm --cached`
|
|
2034
|
+
of the state file, which would restore condition (c): the same class as
|
|
2035
|
+
`--no-verify`, and closed by neither.
|
|
2036
|
+
|
|
2037
|
+
**The stamp-commit purity assertion.** The provenance assertion alone is
|
|
2038
|
+
defeated by a session that writes the stamp and its work into **one** commit:
|
|
2039
|
+
`HEAD` has not moved, so the recorded head is current. The complement closes it.
|
|
2040
|
+
Where the state file is among the staged paths *and* introduces a stamp, the
|
|
2041
|
+
staged path set must contain **only**:
|
|
2042
|
+
|
|
2043
|
+
- the state file — for any stage's stamp; and additionally
|
|
2044
|
+
- the queue file, `LIFECYCLE_KIT_LESSON_EVIDENCE_FILE`,
|
|
2045
|
+
`LIFECYCLE_KIT_SURVEY_RECORD_FILE`, the members of
|
|
2046
|
+
`LIFECYCLE_KIT_BOUNDARY_TRUNCATE`, and `LIFECYCLE_KIT_GAP_INBOX_FILE` — for
|
|
2047
|
+
the **first stage**'s stamp only, because the iteration-boundary reset
|
|
2048
|
+
legitimately writes all of them in one motion (§bin/enter-stage.sh).
|
|
2049
|
+
|
|
2050
|
+
The exemption set is **derived from the configuration the boundary reset already
|
|
2051
|
+
reads**, so no roster is minted and none can rot; no knob is added. Widening the
|
|
2052
|
+
set can only remove violations and narrowing it can only add them, so a config
|
|
2053
|
+
change here is safe to reason about by inspection in both directions. Gating on
|
|
2054
|
+
the *staged* set rather than on the working tree is what keeps a sibling
|
|
2055
|
+
session's staged file out of this verdict: a stamp nothing is committing is not
|
|
2056
|
+
a stamp this commit introduces. It mechanizes a sentence every stage template
|
|
2057
|
+
already carries — *commit the stamp on its own* — which is enforcement-first
|
|
2058
|
+
applied to prose that had no gate behind it.
|
|
2059
|
+
|
|
2060
|
+
**The concurrent-session false fire is real and its remedy is cheap.** Where a
|
|
2061
|
+
repo shares its git index between sessions, a sibling committing between a
|
|
2062
|
+
stamp's write and its commit moves `HEAD` and reds the stamp. The remedy is to
|
|
2063
|
+
re-run `bin/enter-stage.sh`, which appends a fresh stamp at the current `HEAD` —
|
|
2064
|
+
a same-stage re-entry, in-contract, and cheaper than any weakening that would
|
|
2065
|
+
admit the case the assertion exists to catch. The tool's idempotence guard reads
|
|
2066
|
+
the head for exactly this reason (§The state machine).
|
|
1688
2067
|
|
|
1689
2068
|
Honest limit: the stamp proves the stage skill was *invoked*, never that it
|
|
1690
2069
|
produced its green result — a validate stamp says validate ran, not that the
|
|
@@ -1693,13 +2072,39 @@ evidence manifest (a suite verdict per line) and, via the optional
|
|
|
1693
2072
|
`LIFECYCLE_KIT_BOUNDARY_TRUNCATE` integration, couples a close entry to
|
|
1694
2073
|
the full green block.
|
|
1695
2074
|
|
|
2075
|
+
**The one ordering case neither assertion above reaches**, and it is structural
|
|
2076
|
+
rather than a gap in their design: a session that does its work, commits it, and
|
|
2077
|
+
only *then* runs `bin/enter-stage.sh`. The stamp legitimately records the
|
|
2078
|
+
post-work `HEAD`, the stamp commit is pure, both assertions pass — and the work
|
|
2079
|
+
still preceded the mark. The interval between stage X-1's stamp and stage X's
|
|
2080
|
+
holds X-1's legitimate work and X's illegitimate pre-stamp work, and nothing in
|
|
2081
|
+
the tree separates them. Only a *declared* boundary can, and there are two
|
|
2082
|
+
candidates: a per-stage output-surface roster, refused because "a stage's own
|
|
2083
|
+
output surfaces" is not derivable from the tree — a build stage's are
|
|
2084
|
+
approximately everything — and a configured one false-fires when coarse and
|
|
2085
|
+
misses when narrow; or an **exit mark**, which this kit does not have and which
|
|
2086
|
+
no reading of an entry stamp can supply. Closing the remaining case is therefore
|
|
2087
|
+
a **composition** with a deliverable that mints an exit mark, not more work
|
|
2088
|
+
inside these assertions. Recording that is what stops the next reader
|
|
2089
|
+
re-deriving the refused roster.
|
|
2090
|
+
|
|
2091
|
+
What the assertions do close is the generalization that *every entry-time
|
|
2092
|
+
assertion is satisfiable retroactively*, which fails for this one: the recorded
|
|
2093
|
+
head is bound to a commit that already existed when the stamp was written, and a
|
|
2094
|
+
stamp introduced later is checked against the `HEAD` of its own introduction, so
|
|
2095
|
+
re-satisfying it means re-stamping — which is a fresh, honest stamp rather than
|
|
2096
|
+
a forged one.
|
|
2097
|
+
|
|
1696
2098
|
**The uncommitted window, and what closes it.** This gate — and every other one
|
|
1697
2099
|
that would catch a hand-written stamp — fires at *commit*. The cursor, though, is
|
|
1698
2100
|
the working tree's last stamp, and every reader reads the working tree. So a
|
|
1699
2101
|
session that hand-edits the state file and simply never commits moves the stage
|
|
1700
2102
|
cursor for its entire life and is caught by nothing. Content-based detection
|
|
1701
|
-
|
|
1702
|
-
|
|
2103
|
+
narrows this and does not close it: the `<head>` field makes a hand-written stamp
|
|
2104
|
+
name the `HEAD` it claims to have been taken at, so it is not byte-identical to
|
|
2105
|
+
`bin/enter-stage.sh`'s for free — but a hand that reads `git rev-parse --short
|
|
2106
|
+
HEAD` writes an identical line, and a stamp that is never committed is never
|
|
2107
|
+
checked at all.
|
|
1703
2108
|
|
|
1704
2109
|
`templates/workflow-state-guard.sh` closes the part of that window an agent
|
|
1705
2110
|
tooling actually passes through. It is a `PreToolUse(Write|Edit)` hook (register
|
|
@@ -1731,7 +2136,12 @@ exit, extending the invocation-stamp floor `check-stage-evidence` provides
|
|
|
1731
2136
|
for the current stage one hop back (a shared surface, a distinct invariant:
|
|
1732
2137
|
*stamp grammar + name-axis agreement* there, *prior-stage invoked +
|
|
1733
2138
|
entered-stage static exit* here). It reads the entered stage from the **cursor**
|
|
1734
|
-
— the state file's last stamp — and the iteration from the header
|
|
2139
|
+
— the state file's last stamp — and the iteration from the header, both through
|
|
2140
|
+
the shared `lifecycle_current_stage`/`header_iter` derivations, which take
|
|
2141
|
+
positional fields one to three. That is why the `<head>` field appended in
|
|
2142
|
+
§The state machine moved nothing here, and it is recorded rather than left
|
|
2143
|
+
unstated so the next grammar change knows this reader was checked and cleared
|
|
2144
|
+
rather than overlooked. An empty
|
|
1735
2145
|
cursor is unreachable by construction here and stays a hard parse error rather
|
|
1736
2146
|
than a disarm: `enter-stage.sh` hands the gate a temp state file that always
|
|
1737
2147
|
carries the candidate stamp, and at commit time the entry commit stages that
|
|
@@ -1797,7 +2207,29 @@ approximates "changes ≥2 components' *contracts*" with "touches or names ≥2
|
|
|
1797
2207
|
component surfaces" — it can over-demand (the cheap waiver valve absorbs
|
|
1798
2208
|
that) and can under-detect a purely semantic cross-component impact; it
|
|
1799
2209
|
converts a silent skip into a stamp, a recorded waiver, or a narrow
|
|
1800
|
-
false-negative, strictly better than self-report.
|
|
2210
|
+
false-negative, strictly better than self-report.
|
|
2211
|
+
|
|
2212
|
+
**The gate dispatches to the binary substrate** — `checks/check-stage-entry.gate`
|
|
2213
|
+
to `native/src/gates/stage_entry.rs`, the shell script deleted — and the port
|
|
2214
|
+
asserts nothing new: the three assertions, their calibration and assertion C's
|
|
2215
|
+
honest limit are exactly as stated above. The port was held on the config
|
|
2216
|
+
bridge's want of a key channel, since the predecessor map is read **by key**
|
|
2217
|
+
(gate-sdk/SPEC.md §lib/gate.sh, the keyed arm that retired the hold). Two
|
|
2218
|
+
consequences are worth stating where a reader of this gate will look for them.
|
|
2219
|
+
Its `couples=` **widens** to reach the amendment and roster corpora assertion C
|
|
2220
|
+
scans, which is correct coupling rather than a concession: an amendment landing
|
|
2221
|
+
anywhere genuinely changes what C sees, and the shell form's
|
|
2222
|
+
`# reads-couples-exempt:` markers were excusing that rather than expressing it.
|
|
2223
|
+
And its two whole-tree scans are declared to `--reads` as one root under two
|
|
2224
|
+
**filter-knob** names, `LIFECYCLE_KIT_ROSTER_BASENAME` and
|
|
2225
|
+
`LIFECYCLE_KIT_AMENDMENT_GLOB` — the channel gate-sdk/SPEC.md §check-reads-couples
|
|
2226
|
+
grew for it, so the port **answers** that assertion where the shell member was
|
|
2227
|
+
exempt from it. **Honest limit on the crate-side declaration:** neither fixture
|
|
2228
|
+
case reaches assertion C, so the crate's declared-roots unit test holds over an
|
|
2229
|
+
empty observation for this member and the scans' coverage rests on the
|
|
2230
|
+
behavioral test below and on the live battery.
|
|
2231
|
+
|
|
2232
|
+
The good/bad pair covers
|
|
1801
2233
|
assertion A; `gate-tests/check-stage-entry.test.sh` covers B and C over nine
|
|
1802
2234
|
sandbox scenarios (untagged residue red, tagged residue at drain entry green,
|
|
1803
2235
|
empty-reason tag red, tagged residue at successor entry red; two-dir
|
|
@@ -2172,7 +2604,7 @@ slot's content:
|
|
|
2172
2604
|
you own the ritual prose, an upgrade's re-vendor does not reach it, and the
|
|
2173
2605
|
shim gates do not cover it. It is kept deliberately — the blessed escape hatch
|
|
2174
2606
|
that keeps legitimate structural divergence (different stages, a reshaped
|
|
2175
|
-
machine) visible and contained, and the harness-agnostic floor the
|
|
2607
|
+
machine) visible and contained, and the harness-agnostic floor the
|
|
2176
2608
|
upgrade smoke assumes; removing it would drive forks into edits of the
|
|
2177
2609
|
vendored template, which break Phase-A upgrade determinism with no gate to
|
|
2178
2610
|
catch them.
|
|
@@ -2237,7 +2669,7 @@ and one that genuinely has not been consumed *should* keep firing.
|
|
|
2237
2669
|
A consumer deriving that outstanding set reads the disposition file as
|
|
2238
2670
|
**history ∪ live** — not replacement, not fallback — the same reader
|
|
2239
2671
|
drift-kit/SPEC.md §The stage-economics meter applies to the stage stamps and
|
|
2240
|
-
|
|
2672
|
+
drift-kit's `trajectory` emit arm already ships. The file is typically a `LIFECYCLE_KIT_BOUNDARY_TRUNCATE` member,
|
|
2241
2673
|
so a carrying line survives only in committed history and a live-only reader sees
|
|
2242
2674
|
nothing; conversely a history-only reader is blind at exactly the moment that
|
|
2243
2675
|
matters most for a precommit gate — the pre-commit of the very close commit
|