checkwright 0.25.0 → 0.27.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 +35 -1361
- package/bin/checkwright.ps1 +176 -0
- package/bin/checkwright.sh +187 -44
- package/package.json +15 -14
- package/payload/artifact/aarch64-apple-darwin/checkwright-gates +0 -0
- package/payload/artifact/aarch64-apple-darwin/checkwright-gates.sha256 +1 -0
- package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe +0 -0
- package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -0
- package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates +0 -0
- package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates.sha256 +1 -0
- package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates +0 -0
- package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates.sha256 +1 -0
- package/payload/artifact/targets.list +133 -24
- package/payload/artifact/x86_64-apple-darwin/checkwright-gates +0 -0
- package/payload/artifact/x86_64-apple-darwin/checkwright-gates.sha256 +1 -0
- package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe +0 -0
- package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -0
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
- package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates +0 -0
- package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates.sha256 +1 -0
- package/payload/canon-kit/README.md +25 -37
- package/payload/canon-kit/checks/check-amendment-queue.gate +2 -2
- package/payload/canon-kit/checks/check-amendment-retired-spelling.gate +3 -0
- package/payload/canon-kit/checks/check-amendment-update-target.gate +1 -1
- package/payload/canon-kit/checks/check-citation-link.gate +4 -0
- package/payload/canon-kit/checks/check-comment-tier.gate +1 -1
- package/payload/canon-kit/checks/check-deprecation-task.gate +2 -1
- package/payload/canon-kit/checks/check-docs-cmd.gate +2 -2
- package/payload/canon-kit/checks/check-docs-link-convention.gate +1 -1
- package/payload/canon-kit/checks/check-docs-page-repeat.gate +4 -0
- package/payload/canon-kit/checks/check-docs-restatement-parity.gate +4 -0
- package/payload/canon-kit/checks/check-fence-command-head.gate +3 -0
- package/payload/canon-kit/checks/check-fence-run.gate +3 -0
- package/payload/canon-kit/checks/check-install-claim.gate +2 -1
- package/payload/canon-kit/checks/check-knob-citation.gate +1 -1
- package/payload/canon-kit/checks/check-manifest-count.gate +1 -1
- package/payload/canon-kit/checks/check-manifest-temporal.gate +1 -1
- package/payload/canon-kit/checks/check-md-refs.gate +1 -1
- package/payload/canon-kit/checks/check-md-unwrapped.gate +3 -0
- package/payload/canon-kit/checks/check-measured-claim.gate +2 -1
- package/payload/canon-kit/checks/check-payload-claim.gate +2 -1
- package/payload/canon-kit/checks/check-prose-bounds.gate +3 -0
- package/payload/canon-kit/checks/check-prose-enum.gate +2 -1
- package/payload/canon-kit/checks/check-prose-tells.gate +1 -1
- package/payload/canon-kit/checks/check-provenance-seam.gate +3 -0
- package/payload/canon-kit/checks/check-spec-derivable-section.gate +1 -1
- package/payload/canon-kit/checks/check-spec-dod-singleton.gate +1 -1
- package/payload/canon-kit/checks/check-spec-embedded-source.gate +1 -1
- package/payload/canon-kit/checks/check-spec-fence-balance.gate +1 -1
- package/payload/canon-kit/checks/check-spec-pointer.gate +2 -2
- package/payload/canon-kit/checks/check-surface-duplication.gate +3 -0
- package/payload/canon-kit/checks/check-todo-task-liveness.gate +1 -1
- package/payload/canon-kit/checks/check-tracking-claim.gate +1 -1
- package/payload/canon-kit/checks/check-unmarked-claim.gate +2 -1
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/SPEC-tidy.md +3 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +37 -8
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +6 -3
- package/payload/canon-kit/gate-tests/check-amendment-queue/good/SPEC-widget.md +7 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/good/TASK-QUEUE.md +11 -3
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/SPEC-nosection.md +16 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/SPEC-thing.md +26 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/expect.txt +8 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/surface/one.md +4 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/surface/two.md +3 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/SPEC-tidy.md +20 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/SPEC-widget.md +37 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/component/README.md +4 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/component/SPEC.md +4 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/unnamed.md +4 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target.test.sh +1 -1
- package/payload/canon-kit/gate-tests/check-citation-link/bad/expect.txt +6 -0
- package/payload/canon-kit/gate-tests/check-citation-link/bad/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-citation-link/bad/site/page.md +13 -0
- package/payload/canon-kit/gate-tests/check-citation-link/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-citation-link/good/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-citation-link/good/site/page.md +28 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/.github/workflows/ci.yml +15 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +2 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/.github/workflows/ci.yml +23 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/config.yml +2 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/expect.txt +1 -1
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +1 -1
- package/payload/canon-kit/gate-tests/check-comment-tier/good/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +37 -26
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/TASK-QUEUE.md +3 -1
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/TASK-QUEUE.md +6 -2
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -1
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +12 -10
- package/payload/canon-kit/gate-tests/check-docs-cmd/good/doc.md +4 -1
- package/payload/canon-kit/gate-tests/check-docs-cmd.test.sh +61 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +21 -2
- package/payload/canon-kit/gate-tests/check-docs-page-repeat/bad/expect.txt +2 -0
- package/payload/canon-kit/gate-tests/check-docs-page-repeat/bad/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-docs-page-repeat/bad/site/page.md +8 -0
- package/payload/canon-kit/gate-tests/check-docs-page-repeat/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-docs-page-repeat/good/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-docs-page-repeat/good/site/page.md +24 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/expect.txt +2 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/kit/README.md +10 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/kit/index.md +11 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/scripts/gate-sdk-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/kit/README.md +12 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/kit/index.md +13 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/scripts/gate-sdk-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/bad/args +1 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/bad/doc.md +16 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/bad/expect.txt +5 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/good/args +1 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/good/bin/run.sh +3 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/good/doc.md +41 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/good/lib/tool.sh +5 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/good/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-fence-run/bad/args +1 -0
- package/payload/canon-kit/gate-tests/check-fence-run/bad/doc.md +32 -0
- package/payload/canon-kit/gate-tests/check-fence-run/bad/expect.txt +7 -0
- package/payload/canon-kit/gate-tests/check-fence-run/good/args +1 -0
- package/payload/canon-kit/gate-tests/check-fence-run/good/doc.md +31 -0
- package/payload/canon-kit/gate-tests/check-fence-run/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/canon-config.knobs +7 -0
- package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/canon-config.knobs +7 -0
- package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +42 -7
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +1 -2
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
- package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +37 -8
- package/payload/canon-kit/gate-tests/check-manifest-count/bad/SPEC.md +3 -0
- package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +10 -0
- package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +6 -6
- package/payload/canon-kit/gate-tests/check-md-refs.test.sh +1 -1
- package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/doc.md +13 -0
- package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/expect.txt +4 -0
- package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-md-unwrapped/good/doc.md +45 -0
- package/payload/canon-kit/gate-tests/check-md-unwrapped/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-md-unwrapped/good/scripts/canon-config.knobs +4 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/SPEC.md +3 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.knobs +4 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/good/SPEC.md +8 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.knobs +4 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/good/worktrees/SPEC.md +12 -0
- package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +32 -13
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.knobs +6 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.knobs +6 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/bad/CLAUDE.md +9 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/bad/SPEC.md +11 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/bad/scripts/canon-config.knobs +3 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/good/CLAUDE.md +10 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/good/SPEC.md +27 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/good/scripts/canon-config.knobs +3 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds.test.sh +98 -0
- package/payload/canon-kit/gate-tests/check-prose-enum/bad/scripts/canon-config.knobs +3 -0
- package/payload/canon-kit/gate-tests/check-prose-enum/good/scripts/canon-config.knobs +3 -0
- package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +55 -25
- package/payload/canon-kit/gate-tests/check-prose-tells/bad/prose.md +2 -0
- package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.knobs +5 -0
- package/payload/canon-kit/gate-tests/check-prose-tells/good/prose.md +6 -0
- package/payload/canon-kit/gate-tests/check-prose-tells/good/scripts/{canon-config.sh → canon-config.knobs} +2 -5
- package/payload/canon-kit/gate-tests/check-prose-tells/good/worktrees/prose.md +17 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/bad/TASK-QUEUE.md +15 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/bad/expect.txt +8 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/canon-config.knobs +3 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/gate-sdk-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/lifecycle-config.knobs +12 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/bad/widget-toolkit/SPEC.md +27 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/good/TASK-QUEUE.md +15 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/canon-config.knobs +3 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/gate-sdk-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/lifecycle-config.knobs +12 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/good/widget-toolkit/SPEC.md +20 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam.test.sh +136 -0
- package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +1 -1
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/README.md +6 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/SPEC-widget.md +5 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.rs +2 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +4 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/scripts/canon-config.knobs +6 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/README.md +15 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/SPEC-widget.md +10 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/expect.txt +1 -1
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.rs +2 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.knobs +6 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/vendored-kit/notes.txt +4 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/TASK-QUEUE.md +3 -1
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/TASK-QUEUE.md +9 -3
- package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +1 -1
- package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/SPEC.md +3 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/scripts/canon-config.knobs +4 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/good/SPEC.md +3 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/good/scripts/canon-config.knobs +4 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/good/worktrees/SPEC.md +11 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim.test.sh +53 -28
- package/payload/canon-kit/templates/SPEC-amendment.md +46 -25
- package/payload/canon-kit/templates/canon-config.knobs +1 -0
- package/payload/context-kit/README.md +33 -61
- package/payload/context-kit/checks/check-brevity.gate +2 -2
- package/payload/context-kit/checks/check-footprint-fresh.gate +3 -2
- package/payload/context-kit/checks/check-memory-off.gate +1 -1
- package/payload/context-kit/checks/check-settings-paths.gate +2 -2
- package/payload/context-kit/checks/check-settings-pins.gate +1 -1
- package/payload/context-kit/checks/check-surface-ratchet.gate +3 -0
- package/payload/context-kit/gate-tests/check-brevity/bad/CLAUDE.md +9 -2
- package/payload/context-kit/gate-tests/check-brevity/bad/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-brevity/good/CLAUDE.md +9 -4
- package/payload/context-kit/gate-tests/check-brevity/good/expect.txt +1 -1
- package/payload/context-kit/gate-tests/check-brevity.test.sh +107 -24
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/CLAUDE.md +6 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/demo-kit/SPEC.md +3 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/demo-kit/templates/guide.md +3 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/docs/footprint.md +32 -0
- package/payload/context-kit/gate-tests/check-memory-off/bad/scripts/{context-config.sh → context-config.knobs} +1 -3
- package/payload/context-kit/gate-tests/check-memory-off/good/scripts/{context-config.sh → context-config.knobs} +1 -3
- package/payload/context-kit/gate-tests/check-memory-off.test.sh +1 -1
- package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +2 -0
- package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +21 -0
- package/payload/context-kit/gate-tests/check-settings-paths/bad/tools/run-gates.sh +4 -0
- package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +2 -1
- package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +48 -1
- package/payload/context-kit/gate-tests/check-settings-paths/good/tools/run-gates.sh +4 -0
- package/payload/context-kit/gate-tests/check-settings-pins.test.sh +1 -1
- package/payload/context-kit/gate-tests/check-surface-ratchet/bad/CLAUDE.md +5 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/bad/expect.txt +2 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/bad/scripts/context-config.knobs +4 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/bad/surface-ceiling.txt +2 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/bad/templates/ungoverned.md +3 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/good/CLAUDE.md +3 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/good/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/good/scripts/context-config.knobs +4 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/good/surface-ceiling.txt +4 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/good/templates/held.md +4 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet.test.sh +76 -0
- package/payload/context-kit/index-tests/corpus/baseline.txt +1 -1
- package/payload/context-kit/index-tests/corpus/surface.md +1 -6
- package/payload/context-kit/index-tests/expected/always-loaded.txt +1 -1
- package/payload/context-kit/templates/close-brevity.md +9 -28
- package/payload/context-kit/templates/context-config.knobs +1 -0
- package/payload/context-kit/templates/session-context.sh +44 -29
- package/payload/delegation-kit/README.md +35 -69
- package/payload/delegation-kit/checks/check-agent-tier-explicit.gate +1 -1
- package/payload/delegation-kit/checks/check-gate-tamper.gate +1 -1
- package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +23 -2
- package/payload/delegation-kit/templates/agent-execution.md +23 -389
- package/payload/delegation-kit/templates/delegation-config.knobs +4 -0
- package/payload/delegation-kit/templates/dispatch-checklists.md +8 -45
- package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +33 -17
- package/payload/doctrine-kit/DOCTRINE.md +92 -458
- package/payload/doctrine-kit/README.md +24 -55
- package/payload/doctrine-kit/checks/check-doctrine-registration.gate +1 -1
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +48 -3
- package/payload/drift-kit/README.md +43 -89
- package/payload/drift-kit/templates/close-knowledge.md +7 -22
- package/payload/drift-kit/templates/drift-config.knobs +1 -0
- package/payload/drift-kit/templates/economics.md +10 -48
- package/payload/drift-kit/templates/kpi-deprecated-surface.sh +31 -9
- package/payload/drift-kit/templates/kpis.list +2 -1
- package/payload/drift-kit/templates/price-table.tsv +1 -1
- package/payload/evidence-kit/README.md +24 -43
- package/payload/evidence-kit/checks/check-battery-roster.gate +1 -1
- package/payload/evidence-kit/checks/check-evidence-baseline.gate +2 -2
- package/payload/evidence-kit/checks/check-evidence-manifest.gate +1 -1
- package/payload/evidence-kit/checks/check-producer-liveness.gate +3 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.knobs +7 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.knobs +7 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +7 -7
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/TASK-QUEUE.md +3 -1
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/args +1 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/expect.txt +2 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/scripts/evidence-config.knobs +4 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/validate-baseline.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/TASK-QUEUE.md +3 -1
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/args +1 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/scripts/evidence-config.knobs +3 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +134 -14
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/scripts/{evidence-config.sh → evidence-config.knobs} +3 -5
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/scripts/{evidence-config.sh → evidence-config.knobs} +3 -5
- package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +5 -4
- package/payload/evidence-kit/gate-tests/diff-baseline-status.test.sh +128 -0
- package/payload/evidence-kit/gate-tests/evidence-lib.test.sh +51 -45
- package/payload/evidence-kit/gate-tests/pre-hook.test.sh +66 -0
- package/payload/evidence-kit/gate-tests/producer-lock.test.sh +29 -16
- package/payload/evidence-kit/templates/evidence-config.knobs +1 -0
- package/payload/gate-sdk/README.md +48 -79
- package/payload/gate-sdk/bin/build-native.sh +27 -4
- package/payload/gate-sdk/bin/run-gates.ps1 +266 -0
- package/payload/gate-sdk/bin/run-gates.sh +53 -277
- package/payload/gate-sdk/checks/check-action-gh-repo.gate +1 -1
- package/payload/gate-sdk/checks/check-action-job-ref.gate +3 -0
- package/payload/gate-sdk/checks/check-action-permissions.gate +3 -0
- package/payload/gate-sdk/checks/check-action-pinning.gate +1 -1
- package/payload/gate-sdk/checks/check-action-run-path.gate +3 -0
- package/payload/gate-sdk/checks/check-action-run-shell.gate +3 -0
- package/payload/gate-sdk/checks/check-commit-msg.gate +2 -1
- package/payload/gate-sdk/checks/check-commit-subject.gate +1 -1
- package/payload/gate-sdk/checks/check-core-files.gate +1 -1
- package/payload/gate-sdk/checks/check-crate-arms.gate +3 -0
- package/payload/gate-sdk/checks/check-enforcement-fresh.gate +3 -2
- package/payload/gate-sdk/checks/check-exec-bit.gate +1 -1
- package/payload/gate-sdk/checks/check-front-end-fail-open.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-assertions.gate +2 -2
- package/payload/gate-sdk/checks/check-gate-binary-fresh.gate +1 -1
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.gate +1 -1
- package/payload/gate-sdk/checks/check-gate-fail-closed.gate +1 -1
- package/payload/gate-sdk/checks/check-gate-fixture-coverage.gate +1 -1
- package/payload/gate-sdk/checks/check-gate-output.gate +1 -1
- package/payload/gate-sdk/checks/check-gate-substrate-parity.gate +3 -0
- package/payload/gate-sdk/checks/check-graph.gate +2 -1
- package/payload/gate-sdk/checks/check-hook-exec-bit.gate +1 -1
- package/payload/gate-sdk/checks/check-identity.gate +1 -1
- package/payload/gate-sdk/checks/check-install-disposition.gate +3 -0
- package/payload/gate-sdk/checks/check-kit-enum.gate +1 -1
- package/payload/gate-sdk/checks/check-kit-registration.gate +1 -1
- package/payload/gate-sdk/checks/check-kit-roots-dialect.gate +3 -0
- package/payload/gate-sdk/checks/check-packed-links.gate +3 -0
- package/payload/gate-sdk/checks/check-path-dialect.gate +3 -0
- package/payload/gate-sdk/checks/check-pipe-membership.gate +3 -0
- package/payload/gate-sdk/checks/check-portability-floor.gate +4 -0
- package/payload/gate-sdk/checks/check-projection-roster.gate +4 -0
- package/payload/gate-sdk/checks/check-reads-couples.gate +1 -1
- package/payload/gate-sdk/checks/check-root-tiering.gate +1 -1
- package/payload/gate-sdk/checks/check-shellcheck.gate +3 -0
- package/payload/gate-sdk/checks/check-template-copy-parity.gate +1 -1
- package/payload/gate-sdk/checks/check-tree-terms.gate +2 -1
- package/payload/gate-sdk/checks/check-workflow-tiering.gate +1 -1
- package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/scripts/gate-sdk-config.knobs +1 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/tree/notes.md +3 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/tree/workflows/ci.yml +8 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/good/args +3 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/good/scripts/gate-sdk-config.knobs +1 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/good/tree/notes.md +3 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/good/tree/workflows/ci.yml +8 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/bad/args +3 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/bad/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/bad/tree/workflows/empty-allowlist.yml +29 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/bad/tree/workflows/gates.yml +25 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/good/args +5 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/action.yml +9 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/not-actions.yml +7 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/workflows/declared.yml +69 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/workflows/valves.yml +22 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/bad/args +4 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/bad/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/bad/tree/scripts/present.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/bad/tree/workflows/ci.yml +14 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/good/args +5 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/scripts/build.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/sub/scripts/inner.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/workflows/ci.yml +36 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/args +4 -2
- package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/tree/workflows/runner-dialect.yml +36 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/good/args +3 -2
- package/payload/gate-sdk/gate-tests/check-action-run-shell/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-action-run-shell/good/tree/workflows/runner-dialect.yml +71 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +102 -9
- package/payload/gate-sdk/gate-tests/check-assertion-strength/bad/smoke/install.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-assertion-strength/good/smoke/install.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-assertion-strength.test.sh +55 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/bad/msg.txt +4 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/bad/patterns.list +5 -1
- package/payload/gate-sdk/gate-tests/check-commit-msg/good/msg.txt +7 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/good/patterns.list +5 -1
- package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +2 -2
- package/payload/gate-sdk/gate-tests/check-core-files.test.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.knobs +3 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.knobs +3 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/SPEC.md +3 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/checks/check-demo.gate +1 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/probe.conf +1 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/templates/guide.md +3 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/docs/enforcement.md +33 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/scripts/gate-sdk-config.knobs +1 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/scripts/gates.list +1 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/args +3 -0
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/gate-sdk/bin/run-gates.ps1 +5 -0
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/gate-sdk/bin/run-gates.sh +9 -0
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/args +4 -0
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/gate-sdk/bin/run-gates.ps1 +5 -0
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/gate-sdk/bin/run-gates.sh +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/SPEC.md +4 -1
- package/payload/gate-sdk/gate-tests/check-gate-assertions.test.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.knobs +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.knobs +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +6 -12
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +5 -3
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/TASK-QUEUE.md +3 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks.test.sh +4 -2
- package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/ci/build-artifact.sh +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/ci.yml +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +4 -2
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.knobs +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/ci/build-artifact.sh +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/ci.yml +16 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +7 -3
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.knobs +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +1 -1
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +222 -197
- package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +7 -2
- package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +4 -0
- package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-second-gate.md +3 -1
- package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +8 -8
- package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +2 -2
- package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +49 -14
- package/payload/gate-sdk/gate-tests/check-identity/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +4 -4
- package/payload/gate-sdk/gate-tests/check-identity/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +4 -4
- package/payload/gate-sdk/gate-tests/check-identity.test.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-eta.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-iota.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-theta.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-zeta.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/smoke/install.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/args +8 -5
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/native/src/installer/recipe.rs +10 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/args +8 -4
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/{alpha-kit → site-kit}/checks/check-alpha.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-beta.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-gamma.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-omega.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-psi.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/{alpha-kit → site-kit}/smoke/install.sh +2 -2
- package/payload/gate-sdk/gate-tests/check-kit-registration/bad/registry-doc.md +15 -12
- package/payload/gate-sdk/gate-tests/check-kit-registration/good/args +7 -5
- package/payload/gate-sdk/gate-tests/check-kit-registration/good/scripts/gate-sdk-config.knobs +2 -0
- package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +2 -2
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/args +5 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/checks/placeholder.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/gate-tests/alpha.test.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/lib/alpha.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/checks/placeholder.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/gate-tests/beta.test.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/lib/beta.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/gate-sdk/checks/placeholder.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/gate-sdk/lib/gate.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/scripts/gate-sdk-config.knobs +7 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/scripts/gates.list +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/args +7 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/checks/placeholder.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/gate-tests/alpha.test.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/lib/alpha.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/checks/placeholder.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/gate-tests/beta.test.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/lib/beta.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/gate-sdk/checks/placeholder.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/gate-sdk/lib/gate.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/scripts/gates.list +3 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/bad/alpha-kit/README.md +5 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/bad/args +5 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/bad/beta-kit/README.md +5 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/bad/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/bad/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/good/alpha-kit/README.md +5 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/good/args +8 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/good/beta-kit/README.md +9 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/good/gamma-kit/SPEC.md +4 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/good/scripts/gate-sdk-config.knobs +6 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/args +3 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/expect.txt +15 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/primitive.rs +19 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/producer.rs +8 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/walk.rs +13 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/bound-root.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/case-arm.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/commented.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/common-dir.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/glob-test.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/late-anchor.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/logical-readback.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/probe.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/two-root.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/args +3 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/expect.txt +13 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/commented.rs +5 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/local.rs +12 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/namespace.rs +11 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/typed.rs +10 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/verdict.rs +5 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/walk.rs +24 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/anchored.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/cd-only.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/commented.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/one-root.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/probe.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/rooted.sh +23 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/subshell.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/two-line.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/verdict.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/args +4 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/expect.txt +6 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/scripts/gate-sdk-config.knobs +1 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/array-grep.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/echo-max-count.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/gate-tests/membership.test.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/loop-head.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/tests/relocated.test.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/args +5 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/expect.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/full-reader.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/gate-tests/check-x/bad/violating.test.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/gate-tests/clean.test.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/loop-membership.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/no-pipefail.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/one-line-producer.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/expect.txt +8 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/patterns.list +4 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/empty-reason-verb +5 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/strings.ps1 +6 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/too-far-verb +5 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/undeclared-verb +3 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/args +2 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/patterns.list +5 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/front.ps1 +7 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/plain-verb +5 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/portability-patterns.list +5 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/upgrade-verb +7 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor.test.sh +154 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/demo-kit/checks/check-beta.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/docs/roster.md +11 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/expect.txt +7 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-alpha.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-gamma.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-plain.gate +1 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/gate-sdk-config.knobs +3 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/gates.list +4 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/demo-kit/checks/check-beta.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/docs/roster.md +16 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-alpha.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-delta.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-epsilon.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-plain.gate +1 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/gates.list +5 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +1 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/bad/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-reads-couples/bad/sandbox-gate.sh +4 -4
- package/payload/gate-sdk/gate-tests/check-reads-couples/good/sandbox-gate.sh +4 -4
- package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +25 -20
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/alpha-kit/smoke/install.sh +1 -1
- package/payload/gate-sdk/gate-tests/{check-template-registry-parity/bad/scripts/gate-sdk-config.sh → check-smoke-entry-guard/bad/scripts/gate-sdk-config.knobs} +2 -3
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/install.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/violation.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/args +1 -1
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/beta-kit/smoke/install.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/args +3 -1
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/delegation-kit/templates/session-note.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/session-note.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity.test.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/drift-kit/templates/kpis.list +18 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/{check-smoke-entry-guard/bad/scripts/gate-sdk-config.sh → check-template-registry-parity/bad/scripts/gate-sdk-config.knobs} +2 -3
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/args +3 -1
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/drift-kit/templates/kpis.list +17 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +5 -5
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/patterns.list +4 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/accounts.txt +1 -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 +5 -1
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/anchored.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/handles.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms.test.sh +44 -5
- package/payload/gate-sdk/gate-tests/emit-arm-shape.test.sh +95 -0
- package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +10 -10
- package/payload/gate-sdk/gate-tests/lib-gate.test.sh +10 -184
- package/payload/gate-sdk/gate-tests/reads-census.test.sh +96 -0
- package/payload/gate-sdk/gate-tests/run-arm-contract.test.sh +190 -0
- package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +64 -41
- package/payload/gate-sdk/gate-tests/run-for-path.test.sh +2 -2
- package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +121 -16
- package/payload/gate-sdk/gate-tests/run-gates-linked-worktree.test.sh +136 -0
- package/payload/gate-sdk/lib/gate.sh +231 -484
- package/payload/gate-sdk/lib/test-hermetic.sh +39 -9
- package/payload/gate-sdk/templates/check-skeleton.sh +3 -2
- package/payload/gate-sdk/templates/gates-workflow.yml +16 -32
- package/payload/gate-sdk/templates/msg-patterns.list +14 -5
- package/payload/gate-sdk/templates/portability-patterns.list +56 -0
- package/payload/guard-kit/README.md +43 -47
- package/payload/guard-kit/checks/check-door-binding.gate +3 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/alpha-kit/README.md +6 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/alpha-kit/templates/alpha-config.knobs +3 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/args +5 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/beta-kit/lib/beta.sh +6 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/expect.txt +5 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/scripts/gate-sdk-config.knobs +4 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/scripts/guard-config.knobs +3 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/site/banner.md +8 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/site/landing.md +11 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/alpha-kit/README.md +8 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/alpha-kit/templates/settings-hooks.json +20 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/args +7 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/beta-kit/lib/beta.sh +6 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/expect.txt +1 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/scripts/gate-sdk-config.knobs +4 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/scripts/guard-config.knobs +3 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/site/mirror.md +12 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/site/register.md +24 -0
- package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +40 -27
- package/payload/guard-kit/gate-tests/consumer-rules.test.sh +189 -0
- package/payload/guard-kit/gate-tests/door-binding-corpus.test.sh +72 -0
- package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +48 -23
- package/payload/guard-kit/gate-tests/guard-config-knobs.test.sh +170 -0
- package/payload/guard-kit/gate-tests/rewrite.test.sh +73 -0
- package/payload/guard-kit/gate-tests/scan-prompts.test.sh +174 -8
- package/payload/guard-kit/gate-tests/scratch-run.test.sh +150 -13
- package/payload/guard-kit/gate-tests/worktree-confinement.test.sh +169 -0
- package/payload/guard-kit/guard-tests/background-cases.tsv +14 -5
- package/payload/guard-kit/guard-tests/cases.tsv +360 -54
- package/payload/guard-kit/guard-tests/powershell-background-cases.tsv +29 -0
- package/payload/guard-kit/guard-tests/powershell-cases.tsv +81 -0
- package/payload/guard-kit/templates/close-triage.md +15 -62
- package/payload/guard-kit/templates/guard-config.knobs +26 -0
- package/payload/guard-kit/templates/settings-allow.json +15 -0
- package/payload/guard-kit/templates/settings-hooks.json +5 -5
- package/payload/lifecycle-kit/README.md +50 -76
- package/payload/lifecycle-kit/checks/check-audit-roster.gate +3 -0
- package/payload/lifecycle-kit/checks/check-close-surfaces.gate +1 -1
- package/payload/lifecycle-kit/checks/check-dispatch-entry.gate +3 -0
- package/payload/lifecycle-kit/checks/check-gap-inbox-neutrality.gate +1 -1
- package/payload/lifecycle-kit/checks/check-lesson-disposition.gate +1 -1
- package/payload/lifecycle-kit/checks/check-lifecycle-registration.gate +1 -1
- package/payload/lifecycle-kit/checks/check-merge-attrs.gate +1 -1
- package/payload/lifecycle-kit/checks/check-scratch-citation.gate +1 -1
- package/payload/lifecycle-kit/checks/check-shim-restatement.gate +1 -1
- package/payload/lifecycle-kit/checks/check-skill-binding.gate +1 -1
- package/payload/lifecycle-kit/checks/check-stage-entry.gate +2 -2
- package/payload/lifecycle-kit/checks/check-stage-evidence.gate +1 -1
- package/payload/lifecycle-kit/checks/check-stage-skill-coverage.gate +2 -2
- package/payload/lifecycle-kit/checks/check-stamp-subject.gate +3 -0
- package/payload/lifecycle-kit/checks/check-survey-record.gate +2 -2
- package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +98 -21
- package/payload/lifecycle-kit/gate-tests/boundary-stage-journal.test.sh +196 -0
- package/payload/lifecycle-kit/gate-tests/boundary-worktree-refusal.test.sh +214 -0
- package/payload/lifecycle-kit/gate-tests/capture-linked-worktree.test.sh +53 -0
- package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/expect.txt +6 -0
- package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/roster.txt +34 -0
- package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/roster.txt +22 -0
- package/payload/lifecycle-kit/gate-tests/check-audit-roster.test.sh +101 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/scripts/lifecycle-config.knobs +2 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/owners/worktrees/inbox.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/scripts/lifecycle-config.knobs +2 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +21 -4
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/args +6 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/head.txt +5 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/marker.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/msg.txt +4 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/paths.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/staged.txt +5 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/args +6 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/head.txt +5 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/marker.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/msg.txt +4 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/paths.txt +2 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/staged.txt +6 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry.test.sh +60 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +1 -1
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/bad/AGENT.md +1 -5
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/good/AGENT.md +1 -5
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +1 -1
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +2 -2
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.knobs +2 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.knobs +2 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/surfaces/worktrees/queue.md +13 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +1 -1
- package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +1 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +165 -15
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +27 -2
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/align.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/build.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/close.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/scope.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/validate.md +1 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/expect.txt +1 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/align.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/build.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/close.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/scope.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/validate.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage.test.sh +73 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/args +4 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/head.txt +5 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/msg.txt +4 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/staged.txt +6 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/args +4 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/head.txt +5 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/msg.txt +4 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/staged.txt +7 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject.test.sh +59 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/expect.txt +4 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/record.md +33 -2
- package/payload/lifecycle-kit/gate-tests/check-survey-record/good/expect.txt +1 -1
- package/payload/lifecycle-kit/gate-tests/check-survey-record/good/record.md +19 -2
- package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +66 -7
- package/payload/lifecycle-kit/gate-tests/dispatch-marker.test.sh +152 -0
- package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +23 -48
- package/payload/lifecycle-kit/gate-tests/gap-inbox-route.test.sh +7 -5
- package/payload/lifecycle-kit/gate-tests/lead-journal-open.test.sh +119 -0
- package/payload/lifecycle-kit/gate-tests/preflight-valve.test.sh +170 -0
- package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +5 -3
- package/payload/lifecycle-kit/gate-tests/ruling-staleness.test.sh +89 -0
- package/payload/lifecycle-kit/gate-tests/stamp-before-write.test.sh +77 -0
- package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +12 -6
- package/payload/lifecycle-kit/templates/consult.md +9 -63
- package/payload/lifecycle-kit/templates/lead.md +147 -431
- package/payload/lifecycle-kit/templates/lifecycle-config.knobs +1 -0
- package/payload/lifecycle-kit/templates/release-sweep.md +6 -35
- package/payload/lifecycle-kit/templates/stages/align.md +14 -82
- package/payload/lifecycle-kit/templates/stages/build.md +30 -98
- package/payload/lifecycle-kit/templates/stages/close.md +21 -170
- package/payload/lifecycle-kit/templates/stages/scope.md +42 -167
- package/payload/lifecycle-kit/templates/stages/spec.md +31 -97
- package/payload/lifecycle-kit/templates/stages/validate.md +22 -59
- package/payload/lifecycle-kit/templates/upgrade.md +6 -37
- package/payload/queue-kit/README.md +33 -48
- package/payload/queue-kit/checks/check-deferred-board-tags.gate +3 -0
- package/payload/queue-kit/checks/check-queue-entry-budget.gate +2 -2
- package/payload/queue-kit/checks/check-queue-hygiene.gate +2 -2
- package/payload/queue-kit/checks/check-queue-prose-precondition.gate +1 -1
- package/payload/queue-kit/checks/check-queue-sections.gate +1 -1
- package/payload/queue-kit/checks/check-queue-slug-liveness.gate +2 -2
- package/payload/queue-kit/checks/check-queue-wrap.gate +2 -2
- package/payload/queue-kit/checks/check-roadmap-fresh.gate +3 -2
- package/payload/queue-kit/checks/check-tag-lead-line.gate +2 -2
- package/payload/queue-kit/checks/check-task-conservation.gate +1 -1
- package/payload/queue-kit/checks/check-task-names.gate +2 -2
- package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/TASK-QUEUE.md +41 -0
- package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/expect.txt +6 -0
- package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/widget-kit/README.md +3 -0
- package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/TASK-QUEUE.md +39 -0
- package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/widget-kit/README.md +3 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +76 -31
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +12 -4
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/scripts/queue-config.knobs +4 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +58 -19
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/expect.txt +8 -4
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/scripts/queue-config.knobs +4 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget.test.sh +124 -0
- package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/TASK-QUEUE.md +11 -1
- package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/expect.txt +2 -0
- package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +30 -11
- package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/TASK-QUEUE.md +3 -1
- package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-queue-prose-precondition/good/TASK-QUEUE.md +22 -6
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/TASK-QUEUE.md +3 -1
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/docs/page.md +1 -1
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/expect.txt +3 -1
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/scripts/queue-config.knobs +1 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/TASK-QUEUE.md +6 -2
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/docs/page.md +3 -3
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/docs/worktrees/page.md +4 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/scripts/queue-config.knobs +1 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness.test.sh +100 -0
- package/payload/queue-kit/gate-tests/check-queue-wrap/bad/TASK-QUEUE.md +3 -1
- package/payload/queue-kit/gate-tests/check-queue-wrap/good/TASK-QUEUE.md +20 -6
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/TASK-QUEUE.md +15 -8
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/scripts/queue-config.knobs +5 -0
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/TASK-QUEUE.md +13 -6
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/scripts/queue-config.knobs +5 -0
- package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/TASK-QUEUE.md +28 -7
- package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/expect.txt +10 -2
- package/payload/queue-kit/gate-tests/check-tag-lead-line/good/TASK-QUEUE.md +30 -8
- package/payload/queue-kit/gate-tests/check-task-names/bad/TASK-QUEUE.md +18 -3
- package/payload/queue-kit/gate-tests/check-task-names/bad/expect.txt +9 -0
- package/payload/queue-kit/gate-tests/check-task-names/good/TASK-QUEUE.md +20 -6
- package/payload/queue-kit/gate-tests/entry-history.test.sh +197 -0
- package/payload/queue-kit/gate-tests/queue-counts.test.sh +77 -73
- package/payload/queue-kit/gate-tests/queue-edges.test.sh +168 -87
- package/payload/queue-kit/gate-tests/queue-index.test.sh +30 -16
- package/payload/queue-kit/gate-tests/roadmap.test.sh +65 -58
- package/payload/queue-kit/templates/TASK-QUEUE.md +36 -23
- package/payload/queue-kit/templates/queue-config.knobs +1 -0
- package/payload/site-kit/README.md +29 -45
- package/payload/site-kit/checks/check-docs-cname-parity.gate +1 -1
- package/payload/site-kit/checks/check-docs-collapsible.gate +3 -0
- package/payload/site-kit/checks/check-docs-highlight-coverage.gate +4 -0
- package/payload/site-kit/checks/check-docs-liquid-parse.gate +3 -0
- package/payload/site-kit/checks/check-docs-render-fidelity.gate +3 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +1 -1
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/scripts/site-config.knobs +2 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +2 -2
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/scripts/site-config.knobs +2 -0
- package/payload/site-kit/gate-tests/check-docs-collapsible/bad/docs/regions.md +23 -0
- package/payload/site-kit/gate-tests/check-docs-collapsible/bad/expect.txt +4 -0
- package/payload/site-kit/gate-tests/check-docs-collapsible/good/docs/plain.md +3 -0
- package/payload/site-kit/gate-tests/check-docs-collapsible/good/docs/regions.md +26 -0
- package/payload/site-kit/gate-tests/check-docs-collapsible/good/expect.txt +1 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/docs/_layouts/default.html +11 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/expect.txt +4 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/scripts/highlight-tokens.list +7 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/scripts/site-config.knobs +3 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/docs/_layouts/default.html +14 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/expect.txt +1 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/scripts/highlight-tokens.list +7 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/scripts/site-config.knobs +1 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/docs/_layouts/default.html +4 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/docs/span.md +3 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/expect.txt +2 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/_layouts/default.html +4 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/front.md +7 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/loop.md +5 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/plain.html +1 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/raw.md +3 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/search.json +4 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/expect.txt +1 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse-parser.test.sh +62 -0
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-batch.test.sh +40 -45
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-foreign.test.sh +7 -4
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-span.test.sh +7 -4
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-table.test.sh +7 -4
- package/payload/site-kit/templates/site-health.yml +60 -88
- package/profiles.list +4 -5
- package/lib/common/digest.sh +0 -18
- package/lib/common/lock.sh +0 -75
- package/lib/common/profile.sh +0 -91
- package/lib/common/recipe.sh +0 -106
- package/lib/diff.sh +0 -66
- package/lib/doctor.sh +0 -164
- package/lib/init.sh +0 -428
- package/lib/uninstall.sh +0 -214
- package/lib/update.sh +0 -34
- package/payload/canon-kit/SPEC.md +0 -2443
- package/payload/canon-kit/checks/check-surface-duplication.sh +0 -106
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +0 -6
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +0 -6
- package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/canon-config.sh +0 -10
- package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/canon-config.sh +0 -10
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.sh +0 -6
- package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.sh +0 -6
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.sh +0 -8
- package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.sh +0 -8
- package/payload/canon-kit/gate-tests/check-prose-enum/bad/scripts/canon-config.sh +0 -4
- package/payload/canon-kit/gate-tests/check-prose-enum/good/scripts/canon-config.sh +0 -4
- package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.sh +0 -8
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/scripts/canon-config.sh +0 -5
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.sh +0 -5
- package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/scripts/canon-config.sh +0 -6
- package/payload/canon-kit/gate-tests/check-unmarked-claim/good/scripts/canon-config.sh +0 -6
- package/payload/canon-kit/lib/spec.sh +0 -560
- package/payload/canon-kit/smoke/install.sh +0 -58
- package/payload/canon-kit/smoke/violation.sh +0 -22
- package/payload/canon-kit/templates/canon-config.sh +0 -2
- package/payload/context-kit/SPEC.md +0 -1134
- package/payload/context-kit/bin/always-loaded.sh +0 -70
- package/payload/context-kit/bin/env-probe.sh +0 -142
- package/payload/context-kit/bin/md-index.sh +0 -80
- package/payload/context-kit/bin/md-section.sh +0 -63
- package/payload/context-kit/bin/pub-index.sh +0 -90
- package/payload/context-kit/bin/run-index-tests.sh +0 -91
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/args +0 -4
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/emit.txt +0 -12
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/projection.txt +0 -12
- package/payload/context-kit/index-tests/expected/toolfloor.txt +0 -23
- package/payload/context-kit/index-tests/toolfloor-cases.sh +0 -49
- package/payload/context-kit/lib/context.sh +0 -56
- package/payload/context-kit/lib/pub-lang/rust.sh +0 -26
- package/payload/context-kit/lib/pub-lang/ts.sh +0 -32
- package/payload/context-kit/lib/toolfloor.sh +0 -58
- package/payload/context-kit/smoke/agents-md.sh +0 -139
- package/payload/context-kit/smoke/install.sh +0 -64
- package/payload/context-kit/smoke/violation.sh +0 -21
- package/payload/context-kit/templates/context-config.sh +0 -2
- package/payload/delegation-kit/SPEC.md +0 -2078
- package/payload/delegation-kit/bin/run-budget-guard-tests.sh +0 -88
- package/payload/delegation-kit/bin/run-dispatch-guard-tests.sh +0 -97
- package/payload/delegation-kit/bin/run-trend-tests.sh +0 -63
- package/payload/delegation-kit/bin/run-usage-tests.sh +0 -226
- package/payload/delegation-kit/bin/usage-trend.sh +0 -120
- package/payload/delegation-kit/bin/usage-verdict.sh +0 -144
- package/payload/delegation-kit/bin/wait-probe.sh +0 -184
- package/payload/delegation-kit/gate-tests/subagent-stop-liveness.test.sh +0 -99
- package/payload/delegation-kit/lib/delegation.sh +0 -84
- package/payload/delegation-kit/smoke/install.sh +0 -83
- package/payload/delegation-kit/smoke/violation.sh +0 -16
- package/payload/delegation-kit/templates/agent-budget-guard.sh +0 -18
- package/payload/delegation-kit/templates/agent-dispatch-guard.sh +0 -61
- package/payload/delegation-kit/templates/delegation-config.sh +0 -6
- package/payload/delegation-kit/templates/statusline-usage.sh +0 -101
- package/payload/delegation-kit/templates/subagent-stop-liveness.sh +0 -56
- package/payload/delegation-kit/templates/usage-poller.sh +0 -67
- package/payload/delegation-kit/usage-tests/budget-guard-cases.tsv +0 -20
- package/payload/doctrine-kit/SPEC.md +0 -385
- package/payload/doctrine-kit/bin/install-doctrine.sh +0 -194
- package/payload/doctrine-kit/bin/stage-rules.sh +0 -51
- package/payload/doctrine-kit/lib/doctrine.sh +0 -29
- package/payload/doctrine-kit/smoke/install.sh +0 -203
- package/payload/doctrine-kit/smoke/violation.sh +0 -13
- package/payload/drift-kit/SPEC.md +0 -1187
- package/payload/drift-kit/bin/drift-report.sh +0 -155
- package/payload/drift-kit/bin/kfric.sh +0 -61
- package/payload/drift-kit/bin/overhead-meter.sh +0 -106
- package/payload/drift-kit/bin/stage-economics.sh +0 -465
- package/payload/drift-kit/kpis/kpi-always-loaded.sh +0 -39
- package/payload/drift-kit/kpis/kpi-amendment-age.sh +0 -33
- package/payload/drift-kit/kpis/kpi-deferred-age.sh +0 -46
- package/payload/drift-kit/kpis/kpi-gate-backlog.sh +0 -52
- package/payload/drift-kit/kpis/kpi-gate-runtime.sh +0 -31
- package/payload/drift-kit/kpis/kpi-incident-recurrence.sh +0 -42
- package/payload/drift-kit/kpis/kpi-knowledge-friction.sh +0 -21
- package/payload/drift-kit/kpis/kpi-overhead.sh +0 -44
- package/payload/drift-kit/kpis/kpi-price-table-age.sh +0 -68
- package/payload/drift-kit/kpis/kpi-prompt-friction.sh +0 -38
- package/payload/drift-kit/kpis/kpi-queue-net-delta.sh +0 -74
- package/payload/drift-kit/kpis/kpi-settings-local.sh +0 -21
- package/payload/drift-kit/kpis/kpi-task-split.sh +0 -43
- package/payload/drift-kit/lib/drift.sh +0 -43
- package/payload/drift-kit/smoke/install.sh +0 -537
- package/payload/drift-kit/smoke/overhead-fixture.jsonl +0 -4
- package/payload/drift-kit/templates/drift-config.sh +0 -2
- package/payload/evidence-kit/SPEC.md +0 -740
- package/payload/evidence-kit/bin/diff-baseline.sh +0 -34
- package/payload/evidence-kit/bin/run-validate.sh +0 -124
- package/payload/evidence-kit/checks/check-producer-liveness.sh +0 -75
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.sh +0 -7
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.sh +0 -7
- package/payload/evidence-kit/lib/evidence.sh +0 -193
- package/payload/evidence-kit/smoke/install.sh +0 -59
- package/payload/evidence-kit/smoke/violation.sh +0 -8
- package/payload/evidence-kit/templates/evidence-config.sh +0 -2
- package/payload/gate-sdk/SPEC.md +0 -10872
- package/payload/gate-sdk/bin/gen-pre-commit.sh +0 -297
- package/payload/gate-sdk/bin/install-hooks.sh +0 -60
- package/payload/gate-sdk/bin/port-blockers.sh +0 -473
- package/payload/gate-sdk/bin/run-consumer-smoke.sh +0 -239
- package/payload/gate-sdk/bin/run-gate-tests.sh +0 -179
- package/payload/gate-sdk/bin/upgrade-smoke.sh +0 -236
- package/payload/gate-sdk/checks/check-action-run-shell.sh +0 -223
- package/payload/gate-sdk/checks/check-crate-arms.sh +0 -62
- package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +0 -450
- package/payload/gate-sdk/checks/check-install-disposition.sh +0 -93
- package/payload/gate-sdk/checks/check-shellcheck.sh +0 -57
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.sh +0 -2
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.sh +0 -2
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/args +0 -4
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/emit.txt +0 -14
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/projection.txt +0 -14
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.sh +0 -2
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.sh +0 -2
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.sh +0 -6
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/stub-bin +0 -3
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.sh +0 -6
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/stub-bin +0 -3
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/installer/lib/common/recipe.sh +0 -9
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-beta.gate +0 -3
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-gamma.sh +0 -6
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/installer/lib/common/recipe.sh +0 -10
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +0 -5
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +0 -5
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/scripts/gate-sdk-config.sh +0 -5
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.sh +0 -5
- package/payload/gate-sdk/gate-tests/declaration-lib-parity.test.sh +0 -211
- package/payload/gate-sdk/gate-tests/lib-declaration.test.sh +0 -112
- package/payload/gate-sdk/lib/consumer-smoke.sh +0 -69
- package/payload/gate-sdk/lib/declaration.sh +0 -59
- package/payload/gate-sdk/lib/inject.sh +0 -80
- package/payload/gate-sdk/smoke/install.sh +0 -171
- package/payload/gate-sdk/smoke/violation.sh +0 -13
- package/payload/guard-kit/SPEC.md +0 -1415
- package/payload/guard-kit/bin/compare-settings-allow.sh +0 -115
- package/payload/guard-kit/bin/run-guard-tests.sh +0 -110
- package/payload/guard-kit/bin/scan-prompts.sh +0 -166
- package/payload/guard-kit/bin/scratch-run.sh +0 -34
- package/payload/guard-kit/gate-tests/guard-read-path.test.sh +0 -52
- package/payload/guard-kit/lib/guard.sh +0 -1014
- package/payload/guard-kit/smoke/install.sh +0 -26
- package/payload/guard-kit/templates/bash-guard.sh +0 -20
- package/payload/guard-kit/templates/escalation-guard.sh +0 -27
- package/payload/guard-kit/templates/guard-config.sh +0 -8
- package/payload/guard-kit/templates/wakeup-guard.sh +0 -20
- package/payload/lifecycle-kit/SPEC.md +0 -2884
- package/payload/lifecycle-kit/bin/cite-survey.sh +0 -81
- package/payload/lifecycle-kit/bin/enter-stage.sh +0 -380
- package/payload/lifecycle-kit/bin/file-gap.sh +0 -101
- package/payload/lifecycle-kit/bin/file-survey.sh +0 -69
- package/payload/lifecycle-kit/bin/install-lifecycle.sh +0 -36
- package/payload/lifecycle-kit/bin/session-id.sh +0 -75
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/scripts/lifecycle-config.sh +0 -4
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/scripts/lifecycle-config.sh +0 -4
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.sh +0 -4
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.sh +0 -4
- package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +0 -100
- package/payload/lifecycle-kit/lib/stages.sh +0 -194
- package/payload/lifecycle-kit/smoke/install.sh +0 -434
- package/payload/lifecycle-kit/smoke/violation.sh +0 -8
- package/payload/lifecycle-kit/templates/lifecycle-config.sh +0 -2
- package/payload/lifecycle-kit/templates/workflow-state-guard.sh +0 -29
- package/payload/queue-kit/SPEC.md +0 -1436
- package/payload/queue-kit/bin/lesson-sink.sh +0 -28
- package/payload/queue-kit/bin/queue-counts.sh +0 -35
- package/payload/queue-kit/bin/queue-edges.sh +0 -78
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/scripts/queue-config.sh +0 -6
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/scripts/queue-config.sh +0 -6
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/scripts/queue-config.sh +0 -3
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/scripts/queue-config.sh +0 -3
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/scripts/queue-config.sh +0 -6
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/scripts/queue-config.sh +0 -6
- package/payload/queue-kit/gate-tests/queue-lib-parity.test.sh +0 -215
- package/payload/queue-kit/lib/queue.sh +0 -129
- package/payload/queue-kit/smoke/install.sh +0 -25
- package/payload/queue-kit/smoke/violation.sh +0 -8
- package/payload/queue-kit/templates/queue-config.sh +0 -2
- package/payload/site-kit/SPEC.md +0 -601
- package/payload/site-kit/checks/check-docs-render-fidelity.sh +0 -242
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/scripts/site-config.sh +0 -7
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/scripts/site-config.sh +0 -7
- package/payload/site-kit/lib/site.sh +0 -43
- package/payload/site-kit/smoke/install.sh +0 -34
- package/payload/site-kit/smoke/violation.sh +0 -20
- /package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/{check-ported.gate → check-stage-entry.gate} +0 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the boundary scratch wipe end-to-end through a sandboxed enter-stage: the iteration-boundary entry deletes the scratch dir's members, keeps the .gitkeep kit
|
|
2
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the boundary scratch wipe end-to-end through a sandboxed enter-stage: the iteration-boundary entry deletes the scratch dir's members, keeps the .gitkeep, self-ignore .gitignore and lead-journal kit invariants and every LIFECYCLE_KIT_BOUNDARY_PRESERVE name at the scratch root only (a spared directory whole, a nested keep-name deleted with its ancestors), names the wiped set by immediate child rather than by the nested paths deleted to remove it, names each non-root keep-list entry in its report, raises the undisposed-journal advisory without blocking for every prior segment while exempting the live lead's, and a non-boundary entry wipes no scratch at all
|
|
3
3
|
set -uo pipefail
|
|
4
4
|
source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the second sanctioned caller: this harness
|
|
7
|
+
# drives the arm from a non-git sandbox cwd, which bin/run-gates.sh refuses by design (it cds to
|
|
8
|
+
# the git toplevel and a `mktemp -d` is no repository), so it resolves the binary through
|
|
9
|
+
# gate_arm_run rather than through that front-end.
|
|
8
10
|
SANDBOX="$(mktemp -d)"
|
|
9
11
|
trap 'rm -rf "$SANDBOX"' EXIT
|
|
10
12
|
|
|
@@ -13,7 +15,7 @@ note() { echo " FAIL [$1]: $2"; fails=$((fails + 1)); }
|
|
|
13
15
|
|
|
14
16
|
seed() { # $1=sandbox subdir; writes a boundary-ready consumer with a populated scratch dir
|
|
15
17
|
local sb="$1"
|
|
16
|
-
mkdir -p "$sb/.workflow" "$sb/scratch/doomed-sub" "$sb/scratch/mixed-sub"
|
|
18
|
+
mkdir -p "$sb/.workflow" "$sb/scratch/doomed-sub" "$sb/scratch/mixed-sub" "$sb/scratch/x/y" "$sb/scratch/kept-dir/deep"
|
|
17
19
|
cat >"$sb/TASK-QUEUE.md" <<'EOF'
|
|
18
20
|
# TASK-QUEUE.md
|
|
19
21
|
|
|
@@ -37,22 +39,32 @@ demo-iteration build bbbbbbbb 2026-06-02 none
|
|
|
37
39
|
demo-iteration validate cccccccc 2026-06-03 none
|
|
38
40
|
demo-iteration close dddddddd 2026-06-04 none
|
|
39
41
|
EOF
|
|
40
|
-
cat >"$sb/lifecycle-config.
|
|
41
|
-
|
|
42
|
-
LIFECYCLE_KIT_BOUNDARY_PRESERVE=
|
|
42
|
+
cat >"$sb/lifecycle-config.knobs" <<'EOF'
|
|
43
|
+
LIFECYCLE_KIT_BOUNDARY_PRESERVE[] = keep-me
|
|
44
|
+
LIFECYCLE_KIT_BOUNDARY_PRESERVE[] = kept-dir
|
|
45
|
+
LIFECYCLE_KIT_BOUNDARY_PRESERVE[] = mixed-sub/keep-me
|
|
43
46
|
EOF
|
|
44
47
|
: >"$sb/scratch/.gitkeep"
|
|
45
48
|
printf 'live\n' >"$sb/scratch/keep-me"
|
|
46
49
|
printf 'stale\n' >"$sb/scratch/doomed.log"
|
|
47
50
|
printf 'stale\n' >"$sb/scratch/doomed-sub/nested.txt"
|
|
48
|
-
printf '
|
|
51
|
+
printf 'stale\n' >"$sb/scratch/mixed-sub/keep-me"
|
|
52
|
+
: >"$sb/scratch/x/y/.gitkeep"
|
|
53
|
+
printf 'live\n' >"$sb/scratch/kept-dir/deep/file"
|
|
54
|
+
cat >"$sb/scratch/lead-journal.md" <<'EOF'
|
|
55
|
+
# lead journal
|
|
56
|
+
|
|
57
|
+
## batch roster and tiering
|
|
58
|
+
|
|
59
|
+
prose the next lead would have to re-derive
|
|
60
|
+
EOF
|
|
49
61
|
}
|
|
50
62
|
|
|
51
63
|
run_enter() { # $1=sandbox subdir $2=stage
|
|
52
|
-
( cd "$1" &&
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
64
|
+
( cd "$1" && gate_env LIFECYCLE_KIT_KNOB_FILE="$1/lifecycle-config.knobs" \
|
|
65
|
+
GATE_SDK_TMP_DIR=scratch \
|
|
66
|
+
LIFECYCLE_KIT_SESSION_ID=deadbeef01 \
|
|
67
|
+
&& gate_arm_run --enter-stage "$2" 2>&1 )
|
|
56
68
|
}
|
|
57
69
|
|
|
58
70
|
# --- the boundary entry wipes, keeping the invariant and the keep-list ---
|
|
@@ -62,35 +74,100 @@ out="$(run_enter "$bnd" scope)"; rc=$?
|
|
|
62
74
|
[[ "$rc" -eq 0 ]] || note boundary-entry "want exit 0, got $rc -- $out"
|
|
63
75
|
|
|
64
76
|
[[ -f "$bnd/scratch/.gitkeep" ]] || note keep-invariant ".gitkeep was deleted (kit invariant)"
|
|
65
|
-
[[
|
|
66
|
-
[[ -f "$bnd/scratch/
|
|
77
|
+
[[ "$(cat "$bnd/scratch/.gitignore" 2>/dev/null)" == "*" ]] || note self-ignore "the scratch dir's self-ignore was not written or was wiped (kit invariant)"
|
|
78
|
+
[[ -f "$bnd/scratch/keep-me" ]] || note keep-listed "the PRESERVE member was deleted"
|
|
79
|
+
[[ -e "$bnd/scratch/mixed-sub" ]] && note wipe-nested-name "a keep-list basename below the scratch root was spared"
|
|
80
|
+
[[ -e "$bnd/scratch/x" ]] && note wipe-nested-gitkeep "a nested .gitkeep kept its ancestors alive"
|
|
81
|
+
[[ -f "$bnd/scratch/kept-dir/deep/file" ]] || note keep-dir-whole "a spared root directory was descended and emptied"
|
|
67
82
|
[[ -e "$bnd/scratch/doomed.log" ]] && note wipe-file "an unlisted scratch file survived"
|
|
68
83
|
[[ -e "$bnd/scratch/doomed-sub" ]] && note wipe-dir "an all-unlisted subdirectory survived"
|
|
69
84
|
[[ -d "$bnd/scratch" ]] || note wipe-dir-self "the scratch dir itself was removed (members, not the dir)"
|
|
70
85
|
|
|
71
86
|
grep -qF 'boundary-wiped from scratch' <<<"$out" || note report "the boundary report names no wiped set: $out"
|
|
72
87
|
grep -qF 'doomed.log' <<<"$out" || note report-member "the report does not name the wiped file: $out"
|
|
73
|
-
grep -
|
|
74
|
-
|
|
75
|
-
|
|
88
|
+
wiped_line="$(grep -F 'boundary-wiped' <<<"$out")"
|
|
89
|
+
grep -qE 'scratch/keep-me( |$)' <<<"$wiped_line" && note report-kept "the report names a kept member as wiped: $out"
|
|
90
|
+
grep -qF 'kept-dir' <<<"$wiped_line" && note report-kept-dir "the report names the spared directory as wiped: $out"
|
|
91
|
+
grep -qF 'scratch/x' <<<"$wiped_line" || note report-nested "the report does not name the wiped x/ subtree by its own immediate name: $out"
|
|
92
|
+
grep -qF 'scratch/x/y/.gitkeep' <<<"$wiped_line" && note report-nested-leak "the report names a nested path rather than the immediate child that owns it: $out"
|
|
93
|
+
grep -qF 'nested.txt' <<<"$wiped_line" && note report-nested-file "the report names a file below an immediate child rather than the child itself: $out"
|
|
94
|
+
grep -qF "boundary-preserve entry 'mixed-sub/keep-me' is not a scratch-root name" <<<"$out" || note report-non-root "the non-root keep-list entry was not named: $out"
|
|
95
|
+
grep -qF 'boundary-wipe could not remove' <<<"$out" && note report-failed "a clean wipe reported a failed removal: $out"
|
|
96
|
+
|
|
97
|
+
# the lead journal is a kit invariant this consumer's keep-list never names, and an undisposed
|
|
98
|
+
# one is announced with its headings rather than refused
|
|
99
|
+
[[ -f "$bnd/scratch/lead-journal.md" ]] || note lead-journal-invariant "the lead journal was deleted though no keep-list names it"
|
|
100
|
+
grep -qF 'lead-journal.md' <<<"$out" || note lead-journal-advisory "no undisposed-journal advisory: $out"
|
|
101
|
+
grep -qF '## batch roster and tiering' <<<"$out" || note lead-journal-headings "the advisory printed no headings: $out"
|
|
102
|
+
|
|
103
|
+
# --- a non-boundary entry wipes no scratch ---
|
|
76
104
|
non="$SANDBOX/nonboundary"
|
|
77
105
|
seed "$non"
|
|
78
106
|
before="$(find "$non/scratch" | sort)"
|
|
79
107
|
out="$(run_enter "$non" build)"; rc=$?
|
|
80
108
|
[[ "$rc" -eq 0 ]] || note nonboundary-entry "want exit 0, got $rc -- $out"
|
|
81
|
-
after="$(find "$non/scratch" | sort)"
|
|
82
|
-
[[ "$before" == "$after" ]] || note nonboundary-scratch "a non-boundary entry changed the scratch dir"
|
|
109
|
+
after="$(find "$non/scratch" ! -path "$non/scratch/.gitignore" | sort)"
|
|
110
|
+
[[ "$before" == "$after" ]] || note nonboundary-scratch "a non-boundary entry changed the scratch dir beyond its self-ignore"
|
|
111
|
+
[[ -f "$non/scratch/.gitignore" ]] || note nonboundary-self-ignore "a stamping entry left the scratch dir without its self-ignore"
|
|
83
112
|
grep -qF 'boundary-wiped' <<<"$out" && note nonboundary-report "a non-boundary entry reported a wipe: $out"
|
|
84
113
|
|
|
85
114
|
# --- an unset keep-list still spares the invariant ---
|
|
86
115
|
def="$SANDBOX/default-knob"
|
|
87
116
|
seed "$def"
|
|
88
|
-
: >"$def/lifecycle-config.
|
|
117
|
+
: >"$def/lifecycle-config.knobs"
|
|
89
118
|
out="$(run_enter "$def" scope)"; rc=$?
|
|
90
119
|
[[ "$rc" -eq 0 ]] || note default-entry "want exit 0, got $rc -- $out"
|
|
91
120
|
[[ -f "$def/scratch/.gitkeep" ]] || note default-invariant ".gitkeep was deleted under an empty keep-list"
|
|
92
121
|
[[ -e "$def/scratch/keep-me" ]] && note default-wipe "an unset keep-list spared a member anyway"
|
|
122
|
+
[[ -f "$def/scratch/lead-journal.md" ]] || note default-lead-journal "the lead journal was deleted under an empty keep-list (kit invariant, not config)"
|
|
123
|
+
|
|
124
|
+
# --- a disposed journal survives and raises nothing ---
|
|
125
|
+
dis="$SANDBOX/disposed"
|
|
126
|
+
seed "$dis"
|
|
127
|
+
printf 'DISPOSED\n' >>"$dis/scratch/lead-journal.md"
|
|
128
|
+
out="$(run_enter "$dis" scope)"; rc=$?
|
|
129
|
+
[[ "$rc" -eq 0 ]] || note disposed-entry "want exit 0, got $rc -- $out"
|
|
130
|
+
[[ -f "$dis/scratch/lead-journal.md" ]] || note disposed-kept "a disposed lead journal was deleted"
|
|
131
|
+
grep -qF '## batch roster and tiering' <<<"$out" && note disposed-advisory "a disposed journal still raised the advisory: $out"
|
|
132
|
+
|
|
133
|
+
# --- the segment the live lead opened after the closing stamp is exempt ---
|
|
134
|
+
live_key='close dddddddd 2026-06-04 none'
|
|
135
|
+
liv="$SANDBOX/live"
|
|
136
|
+
seed "$liv"
|
|
137
|
+
printf '## lead-journal opened after %s\n\n## live roster\n\nprose\n' "$live_key" >"$liv/scratch/lead-journal.md"
|
|
138
|
+
out="$(run_enter "$liv" scope)"; rc=$?
|
|
139
|
+
[[ "$rc" -eq 0 ]] || note live-entry "want exit 0, got $rc -- $out"
|
|
140
|
+
[[ -f "$liv/scratch/lead-journal.md" ]] || note live-kept "the live lead's journal was deleted"
|
|
141
|
+
grep -qF 'is undisposed' <<<"$out" && note live-advisory "the live lead's own segment raised the advisory: $out"
|
|
142
|
+
|
|
143
|
+
# --- a prior undisposed segment before the live one is reported, and only its headings print ---
|
|
144
|
+
pri="$SANDBOX/prior-then-live"
|
|
145
|
+
seed "$pri"
|
|
146
|
+
printf '## lead-journal opened after close zzzzzzzz 2026-05-01 none\n\n## prior findings\n\nprose\n\n## lead-journal opened after %s\n\n## live roster\n' \
|
|
147
|
+
"$live_key" >"$pri/scratch/lead-journal.md"
|
|
148
|
+
out="$(run_enter "$pri" scope)"; rc=$?
|
|
149
|
+
[[ "$rc" -eq 0 ]] || note prior-entry "want exit 0, got $rc -- $out"
|
|
150
|
+
grep -qF 'is undisposed' <<<"$out" || note prior-advisory "an undisposed prior segment raised no advisory: $out"
|
|
151
|
+
grep -qF '## prior findings' <<<"$out" || note prior-headings "the prior segment's headings did not print: $out"
|
|
152
|
+
grep -qF 'opened after close zzzzzzzz' <<<"$out" || note prior-opening "the prior segment's opening heading did not print: $out"
|
|
153
|
+
grep -qF '## live roster' <<<"$out" && note prior-live-leak "the live segment's headings printed: $out"
|
|
154
|
+
|
|
155
|
+
# --- a lone segment keyed on an older stamp is prior ---
|
|
156
|
+
old="$SANDBOX/older-key"
|
|
157
|
+
seed "$old"
|
|
158
|
+
printf '## lead-journal opened after validate cccccccc 2026-06-03 none\n\n## stale roster\n' >"$old/scratch/lead-journal.md"
|
|
159
|
+
out="$(run_enter "$old" scope)"; rc=$?
|
|
160
|
+
[[ "$rc" -eq 0 ]] || note older-entry "want exit 0, got $rc -- $out"
|
|
161
|
+
grep -qF '## stale roster' <<<"$out" || note older-advisory "a segment keyed on an older stamp was read as live: $out"
|
|
162
|
+
|
|
163
|
+
# --- a heading-less journal keeps the whole-file test: a mid-file mark disposes nothing ---
|
|
164
|
+
hl="$SANDBOX/headingless"
|
|
165
|
+
seed "$hl"
|
|
166
|
+
printf '## early\nDISPOSED\n\n## late\nprose\n' >"$hl/scratch/lead-journal.md"
|
|
167
|
+
out="$(run_enter "$hl" scope)"; rc=$?
|
|
168
|
+
[[ "$rc" -eq 0 ]] || note headingless-entry "want exit 0, got $rc -- $out"
|
|
169
|
+
grep -qF '## late' <<<"$out" || note headingless-advisory "a heading-less journal whose last line is not the mark raised no advisory: $out"
|
|
93
170
|
|
|
94
171
|
[[ "$fails" -eq 0 ]] || { echo "boundary-scratch-wipe.test: $fails assertion(s) failed"; exit 1; }
|
|
95
|
-
echo "boundary-scratch-wipe.test: clean (boundary wipe keeps .gitkeep and every PRESERVE
|
|
172
|
+
echo "boundary-scratch-wipe.test: clean (boundary wipe keeps .gitkeep, the lead journal and every PRESERVE name at the scratch root with a spared directory whole, deletes nested keep-names, reports the wiped set by immediate child, announces an undisposed prior segment without blocking and exempts the live one, and leaves non-boundary entries untouched)"
|
|
96
173
|
exit 0
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the journal opener and the predecessor assertion end-to-end through a sandboxed enter-stage: the derived path is a function of the stage, the default REQUIRE=0 opens nothing and asserts nothing, REQUIRE=1 opens the journal at the stamp and refuses on an absent, empty or opened-but-unwritten predecessor journal writing no stamp, --simulate relays the refusal and writes no journal, the escape clears it, the opener appends rather than overwrites and runs after the boundary wipe, the first stage of an iteration is never asserted against, a second session of one stage asserts the first session's journal at the same path, and a pattern with no <stage> placeholder is refused as config
|
|
3
|
+
set -uo pipefail
|
|
4
|
+
source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
|
|
5
|
+
|
|
6
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the second sanctioned caller: this harness
|
|
7
|
+
# drives the arm from a non-git sandbox cwd, which bin/run-gates.sh refuses by design (it cds to
|
|
8
|
+
# the git toplevel and a `mktemp -d` is no repository), so it resolves the binary through
|
|
9
|
+
# gate_arm_run rather than through that front-end.
|
|
10
|
+
SANDBOX="$(mktemp -d)"
|
|
11
|
+
trap 'rm -rf "$SANDBOX"' EXIT
|
|
12
|
+
|
|
13
|
+
fails=0
|
|
14
|
+
note() { echo " FAIL [$1]: $2"; fails=$((fails + 1)); }
|
|
15
|
+
|
|
16
|
+
seed() { # $1=sandbox subdir; a consumer whose cursor is 'build', predecessor of nothing but itself
|
|
17
|
+
local sb="$1"
|
|
18
|
+
mkdir -p "$sb/.workflow" "$sb/scratch"
|
|
19
|
+
cat >"$sb/TASK-QUEUE.md" <<'EOF'
|
|
20
|
+
# TASK-QUEUE.md
|
|
21
|
+
|
|
22
|
+
## Iteration: demo-iteration
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## New Features
|
|
27
|
+
|
|
28
|
+
## Technical Debt
|
|
29
|
+
|
|
30
|
+
## Done
|
|
31
|
+
EOF
|
|
32
|
+
cat >"$sb/.workflow/WORKFLOW-STATE.txt" <<'EOF'
|
|
33
|
+
# contract: lifecycle-kit/SPEC.md §check-stage-evidence
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
demo-iteration scope aaaaaaaa 2026-06-01 none
|
|
38
|
+
demo-iteration build bbbbbbbb 2026-06-02 none
|
|
39
|
+
EOF
|
|
40
|
+
: >"$sb/lifecycle-config.knobs"
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
run_enter() { # $1=sandbox $2=REQUIRE $3...=enter-stage argv
|
|
44
|
+
local sb="$1" req="$2"; shift 2
|
|
45
|
+
( cd "$sb" && gate_env LIFECYCLE_KIT_KNOB_FILE="$sb/lifecycle-config.knobs" \
|
|
46
|
+
GATE_SDK_TMP_DIR=scratch \
|
|
47
|
+
LIFECYCLE_KIT_SESSION_ID=deadbeef01 \
|
|
48
|
+
LIFECYCLE_KIT_STAGE_JOURNAL_REQUIRE="$req" \
|
|
49
|
+
&& gate_arm_run --enter-stage "$@" 2>&1 )
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
state_of() { cat "$1/.workflow/WORKFLOW-STATE.txt"; }
|
|
53
|
+
|
|
54
|
+
# --- the DEFAULT asserts nothing and opens nothing: a consumer who has not taken the feature gains no file ---
|
|
55
|
+
sb="$SANDBOX/default-off"; seed "$sb"
|
|
56
|
+
out="$( cd "$sb" && gate_env LIFECYCLE_KIT_KNOB_FILE="$sb/lifecycle-config.knobs" \
|
|
57
|
+
GATE_SDK_TMP_DIR=scratch LIFECYCLE_KIT_SESSION_ID=deadbeef01 \
|
|
58
|
+
&& gate_arm_run --enter-stage validate 2>&1 )"; rc=$?
|
|
59
|
+
[[ "$rc" -eq 0 ]] || note default-off "the default REQUIRE refused an entry with no journal: $out"
|
|
60
|
+
[[ -e "$sb/scratch/validate-journal.md" ]] && note default-off-opener "the opener wrote a journal at the kit default REQUIRE=0"
|
|
61
|
+
|
|
62
|
+
# --- REQUIRE=1, predecessor journal ABSENT: refuse, name the derived path, write nothing ---
|
|
63
|
+
sb="$SANDBOX/absent"; seed "$sb"
|
|
64
|
+
before="$(state_of "$sb")"
|
|
65
|
+
out="$(run_enter "$sb" 1 validate)"; rc=$?
|
|
66
|
+
[[ "$rc" -eq 1 ]] || note absent-status "want exit 1 with the predecessor journal absent, got $rc -- $out"
|
|
67
|
+
grep -qF 'scratch/build-journal.md' <<<"$out" || note absent-path "the refusal does not name the derived path: $out"
|
|
68
|
+
grep -qF "predecessor stage 'build'" <<<"$out" || note absent-pred "the refusal does not name the predecessor: $out"
|
|
69
|
+
grep -qF 'does not exist' <<<"$out" || note absent-why "the refusal does not say why: $out"
|
|
70
|
+
[[ "$(state_of "$sb")" == "$before" ]] || note absent-nowrite "a refused entry wrote to the state file"
|
|
71
|
+
|
|
72
|
+
# --- --simulate relays the same refusal and writes nothing ---
|
|
73
|
+
out="$(run_enter "$sb" 1 --simulate validate)"; rc=$?
|
|
74
|
+
[[ "$rc" -eq 1 ]] || note sim-status "want exit 1 under --simulate, got $rc -- $out"
|
|
75
|
+
grep -qF 'enter-stage (simulate)' <<<"$out" || note sim-prefix "the simulate transcript is unprefixed: $out"
|
|
76
|
+
grep -qF 'scratch/build-journal.md' <<<"$out" || note sim-path "the simulate refusal does not name the path: $out"
|
|
77
|
+
[[ "$(state_of "$sb")" == "$before" ]] || note sim-nowrite "--simulate wrote to the state file"
|
|
78
|
+
|
|
79
|
+
# --- REQUIRE=1, predecessor journal EMPTY: refused too, and told apart from absent ---
|
|
80
|
+
sb="$SANDBOX/empty"; seed "$sb"
|
|
81
|
+
mkdir -p "$sb/scratch"; : >"$sb/scratch/build-journal.md"
|
|
82
|
+
out="$(run_enter "$sb" 1 validate)"; rc=$?
|
|
83
|
+
[[ "$rc" -eq 1 ]] || note empty-status "an empty predecessor journal did not refuse: $out"
|
|
84
|
+
grep -qF 'is empty' <<<"$out" || note empty-why "an empty journal was not reported as empty: $out"
|
|
85
|
+
grep -qF 'does not exist' <<<"$out" && note empty-conflate "an empty journal was reported as absent: $out"
|
|
86
|
+
|
|
87
|
+
# --- the ESCAPE clears it: writing the file is all the refusal asks for ---
|
|
88
|
+
echo "the predecessor left none" > "$sb/scratch/build-journal.md"
|
|
89
|
+
out="$(run_enter "$sb" 1 validate)"; rc=$?
|
|
90
|
+
[[ "$rc" -eq 0 ]] || note escape "a written journal still refused: $out"
|
|
91
|
+
grep -qF 'demo-iteration validate' "$sb/.workflow/WORKFLOW-STATE.txt" \
|
|
92
|
+
|| note escape-stamp "the cleared entry wrote no stamp: $out"
|
|
93
|
+
|
|
94
|
+
# --- and that admitted entry OPENED its own journal and reported the path ---
|
|
95
|
+
[[ -s "$sb/scratch/validate-journal.md" ]] \
|
|
96
|
+
|| note opener-writes "the admitted entry opened no journal for the stage it entered: $out"
|
|
97
|
+
grep -qF 'scratch/validate-journal.md' <<<"$out" \
|
|
98
|
+
|| note opener-reports "the entry report does not name the journal it opened: $out"
|
|
99
|
+
grep -qE '^# stage-journal validate — demo-iteration [0-9a-f]+ [0-9-]+ ' "$sb/scratch/validate-journal.md" \
|
|
100
|
+
|| note opener-fields "the opening line does not carry the stamp's own fields: $(cat "$sb/scratch/validate-journal.md")"
|
|
101
|
+
|
|
102
|
+
# --- REQUIRE=1, predecessor journal OPENED BUT UNWRITTEN: the vacuity delta (3) closes ---
|
|
103
|
+
sb="$SANDBOX/unwritten"; seed "$sb"
|
|
104
|
+
out="$(run_enter "$sb" 1 build)"; rc=$? # a second 'build' session, opening build's own journal
|
|
105
|
+
[[ "$rc" -eq 1 ]] || note unwritten-seed "the seeding entry was not refused as expected: $out"
|
|
106
|
+
mkdir -p "$sb/scratch"; echo "the predecessor left none" > "$sb/scratch/build-journal.md"
|
|
107
|
+
out="$(run_enter "$sb" 1 build)"; rc=$?
|
|
108
|
+
[[ "$rc" -eq 0 ]] || note unwritten-seed2 "the stand-in did not clear the same-stage entry: $out"
|
|
109
|
+
out="$( cd "$sb" && gate_env LIFECYCLE_KIT_KNOB_FILE="$sb/lifecycle-config.knobs" \
|
|
110
|
+
GATE_SDK_TMP_DIR=scratch LIFECYCLE_KIT_SESSION_ID=deadbeef02 \
|
|
111
|
+
LIFECYCLE_KIT_STAGE_JOURNAL_REQUIRE=1 \
|
|
112
|
+
&& gate_arm_run --enter-stage validate 2>&1 )"; rc=$?
|
|
113
|
+
[[ "$rc" -eq 0 ]] || note unwritten-setup "the validate entry that opens the skeleton was refused: $out"
|
|
114
|
+
before="$(state_of "$sb")"
|
|
115
|
+
[[ -s "$sb/scratch/validate-journal.md" ]] \
|
|
116
|
+
|| note unwritten-nonempty "the opened skeleton is empty — the old non-emptiness predicate would not have passed on it"
|
|
117
|
+
out="$(run_enter "$sb" 1 close)"; rc=$?
|
|
118
|
+
[[ "$rc" -eq 1 ]] || note unwritten-status "an opened-but-unwritten predecessor journal did not refuse (exit $rc): $out"
|
|
119
|
+
grep -qF 'never written into' <<<"$out" || note unwritten-why "the refusal does not name it as unwritten: $out"
|
|
120
|
+
grep -qF 'is empty' <<<"$out" && note unwritten-conflate "an opened journal was reported as empty: $out"
|
|
121
|
+
[[ "$(state_of "$sb")" == "$before" ]] || note unwritten-nowrite "a refused entry wrote to the state file"
|
|
122
|
+
|
|
123
|
+
# --- the ESCAPE still works from the new state: append the stand-in and re-enter ---
|
|
124
|
+
echo "validate left none" >> "$sb/scratch/validate-journal.md"
|
|
125
|
+
out="$(run_enter "$sb" 1 close)"; rc=$?
|
|
126
|
+
[[ "$rc" -eq 0 ]] || note unwritten-escape "an appended stand-in did not clear the unwritten refusal: $out"
|
|
127
|
+
|
|
128
|
+
# --- the opener APPENDS and never overwrites: a second session keeps the first's content ---
|
|
129
|
+
sb="$SANDBOX/append"; seed "$sb"
|
|
130
|
+
mkdir -p "$sb/scratch"; echo "session one wrote this" > "$sb/scratch/build-journal.md"
|
|
131
|
+
out="$(run_enter "$sb" 1 build)"; rc=$?
|
|
132
|
+
[[ "$rc" -eq 0 ]] || note append-entry "the second same-stage session was refused: $out"
|
|
133
|
+
grep -qF 'session one wrote this' "$sb/scratch/build-journal.md" \
|
|
134
|
+
|| note append-overwrite "the opener overwrote the first session's journal"
|
|
135
|
+
[[ "$(grep -c '^# stage-journal ' "$sb/scratch/build-journal.md")" -eq 1 ]] \
|
|
136
|
+
|| note append-heading "the second session did not append exactly one heading naming itself"
|
|
137
|
+
|
|
138
|
+
# --- --simulate writes NO journal: the scratch dir is byte-identical across the run ---
|
|
139
|
+
sb="$SANDBOX/sim-nowrite"; seed "$sb"
|
|
140
|
+
mkdir -p "$sb/scratch"; echo "written" > "$sb/scratch/build-journal.md"
|
|
141
|
+
before_ls="$(find "$sb/scratch" | sort)"
|
|
142
|
+
before_body="$(cat "$sb/scratch/build-journal.md")"
|
|
143
|
+
out="$(run_enter "$sb" 1 --simulate validate)"; rc=$?
|
|
144
|
+
[[ "$rc" -eq 0 ]] || note sim-open-status "the simulated entry did not clear: $out"
|
|
145
|
+
[[ "$(find "$sb/scratch" | sort)" == "$before_ls" ]] \
|
|
146
|
+
|| note sim-open-nowrite "--simulate opened a journal — the read-only probe performed a state write"
|
|
147
|
+
[[ "$(cat "$sb/scratch/build-journal.md")" == "$before_body" ]] \
|
|
148
|
+
|| note sim-open-append "--simulate appended to an existing journal"
|
|
149
|
+
|
|
150
|
+
# --- the opener runs AFTER the boundary wipe: the first stage's skeleton survives it ---
|
|
151
|
+
sb="$SANDBOX/wipe"; seed "$sb"
|
|
152
|
+
mkdir -p "$sb/scratch"; echo "stale" > "$sb/scratch/leftover.md"
|
|
153
|
+
out="$(run_enter "$sb" 1 scope)"; rc=$?
|
|
154
|
+
[[ "$rc" -eq 0 ]] || note wipe-status "the iteration-boundary entry was refused: $out"
|
|
155
|
+
[[ -e "$sb/scratch/leftover.md" ]] && note wipe-ran "the boundary wipe did not run"
|
|
156
|
+
[[ -s "$sb/scratch/scope-journal.md" ]] \
|
|
157
|
+
|| note wipe-order "the boundary wipe deleted the skeleton — the opener ran before it"
|
|
158
|
+
|
|
159
|
+
# --- the FIRST stage of an iteration is never asserted against, journal or no ---
|
|
160
|
+
sb="$SANDBOX/first"; seed "$sb"
|
|
161
|
+
out="$(run_enter "$sb" 1 --simulate scope)"; rc=$?
|
|
162
|
+
grep -qF 'no resume journal' <<<"$out" && note first-stage "the boundary entry asserted a predecessor journal: $out"
|
|
163
|
+
|
|
164
|
+
# --- a SECOND session of one stage asserts the first session's journal, same derived path ---
|
|
165
|
+
sb="$SANDBOX/same-stage"; seed "$sb"
|
|
166
|
+
out="$(run_enter "$sb" 1 build)"; rc=$?
|
|
167
|
+
[[ "$rc" -eq 1 ]] || note same-stage-status "a second session of 'build' asserted nothing: $out"
|
|
168
|
+
grep -qF 'scratch/build-journal.md' <<<"$out" || note same-stage-path "the same-stage assertion names the wrong path: $out"
|
|
169
|
+
mkdir -p "$sb/scratch"; echo "session one" > "$sb/scratch/build-journal.md"
|
|
170
|
+
out="$(run_enter "$sb" 1 build)"; rc=$?
|
|
171
|
+
[[ "$rc" -eq 0 ]] || note same-stage-pass "the first session's journal did not satisfy the second's entry: $out"
|
|
172
|
+
|
|
173
|
+
# --- the derivation is a real expansion, not a hardcoded name ---
|
|
174
|
+
sb="$SANDBOX/pattern"; seed "$sb"
|
|
175
|
+
mkdir -p "$sb/scratch/j"; echo x > "$sb/scratch/j/build.log"
|
|
176
|
+
out="$( cd "$sb" && gate_env LIFECYCLE_KIT_KNOB_FILE="$sb/lifecycle-config.knobs" \
|
|
177
|
+
GATE_SDK_TMP_DIR=scratch LIFECYCLE_KIT_SESSION_ID=deadbeef01 \
|
|
178
|
+
LIFECYCLE_KIT_STAGE_JOURNAL_REQUIRE=1 \
|
|
179
|
+
LIFECYCLE_KIT_STAGE_JOURNAL_PATTERN='scratch/j/<stage>.log' \
|
|
180
|
+
&& gate_arm_run --enter-stage validate 2>&1 )"; rc=$?
|
|
181
|
+
[[ "$rc" -eq 0 ]] || note pattern "a configured pattern did not resolve to the file it names: $out"
|
|
182
|
+
|
|
183
|
+
# --- a pattern with no <stage> placeholder is a config refusal, never a wrong-file assertion ---
|
|
184
|
+
out="$( cd "$sb" && gate_env LIFECYCLE_KIT_KNOB_FILE="$sb/lifecycle-config.knobs" \
|
|
185
|
+
GATE_SDK_TMP_DIR=scratch LIFECYCLE_KIT_SESSION_ID=deadbeef01 \
|
|
186
|
+
LIFECYCLE_KIT_STAGE_JOURNAL_PATTERN='scratch/j/one.log' \
|
|
187
|
+
&& gate_arm_run --enter-stage --simulate validate 2>&1 )"; rc=$?
|
|
188
|
+
[[ "$rc" -eq 2 ]] || note no-placeholder "a pattern with no <stage> placeholder was not refused as config (exit $rc): $out"
|
|
189
|
+
|
|
190
|
+
# --- and so is a REQUIRE that is neither 0 nor 1 ---
|
|
191
|
+
out="$(run_enter "$sb" yes --simulate validate)"; rc=$?
|
|
192
|
+
[[ "$rc" -eq 2 ]] || note bad-require "a non-boolean REQUIRE was not refused as config (exit $rc): $out"
|
|
193
|
+
|
|
194
|
+
[[ "$fails" -eq 0 ]] || { echo "boundary-stage-journal.test: $fails assertion(s) failed"; exit 1; }
|
|
195
|
+
echo "boundary-stage-journal.test: clean (the default opens and asserts nothing; REQUIRE=1 opens the entering stage's journal and refuses an absent, empty or opened-but-unwritten predecessor writing nothing, --simulate relays the refusal and writes no journal, both escapes clear it, the opener appends and survives the boundary wipe, the first stage is exempt, a same-stage second session asserts the first's file, the pattern really expands, and two malformed configs are refused)"
|
|
196
|
+
exit 0
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the iteration-boundary linked-worktree refusal end-to-end through a sandboxed enter-stage on a real git checkout: a boundary entry with a linked worktree present refuses and writes nothing, --simulate relays the same refusal, the same tree with the worktree reaped enters cleanly, LIFECYCLE_KIT_BOUNDARY_WORKTREE_CHECK=0 turns it off, a non-git tree skips the check rather than failing on it; and the liveness classification: each of the four class readings, the empty-knob default that classifies nothing, the loss report on a residue path and on a live one, the live class's loss-gated reap remedy in place of a wait on a pid that does not establish a holder, the mid-iteration advisory that reports orphans without refusing, and a malformed pattern refused as config
|
|
3
|
+
set -uo pipefail
|
|
4
|
+
source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
|
|
5
|
+
|
|
6
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the second sanctioned caller: this harness
|
|
7
|
+
# drives the arm from a non-git sandbox cwd, which bin/run-gates.sh refuses by design (it cds to
|
|
8
|
+
# the git toplevel and a `mktemp -d` is no repository), so it resolves the binary through
|
|
9
|
+
# gate_arm_run rather than through that front-end.
|
|
10
|
+
SANDBOX="$(mktemp -d)"
|
|
11
|
+
trap 'rm -rf "$SANDBOX"' EXIT
|
|
12
|
+
|
|
13
|
+
fails=0
|
|
14
|
+
note() { echo " FAIL [$1]: $2"; fails=$((fails + 1)); }
|
|
15
|
+
|
|
16
|
+
seed() { # $1=sandbox subdir; writes a boundary-ready consumer (no git init)
|
|
17
|
+
local sb="$1"
|
|
18
|
+
mkdir -p "$sb/.workflow" "$sb/scratch"
|
|
19
|
+
cat >"$sb/TASK-QUEUE.md" <<'EOF'
|
|
20
|
+
# TASK-QUEUE.md
|
|
21
|
+
|
|
22
|
+
## Iteration: demo-iteration
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## New Features
|
|
27
|
+
|
|
28
|
+
## Technical Debt
|
|
29
|
+
|
|
30
|
+
## Done
|
|
31
|
+
EOF
|
|
32
|
+
cat >"$sb/.workflow/WORKFLOW-STATE.txt" <<'EOF'
|
|
33
|
+
# contract: lifecycle-kit/SPEC.md §check-stage-evidence
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
demo-iteration scope aaaaaaaa 2026-06-01 none
|
|
38
|
+
demo-iteration build bbbbbbbb 2026-06-02 none
|
|
39
|
+
demo-iteration validate cccccccc 2026-06-03 none
|
|
40
|
+
demo-iteration close dddddddd 2026-06-04 none
|
|
41
|
+
EOF
|
|
42
|
+
: >"$sb/lifecycle-config.knobs"
|
|
43
|
+
: >"$sb/scratch/.gitkeep"
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
git_seed() { # $1=sandbox subdir; seeds and turns it into a real checkout with one commit
|
|
47
|
+
seed "$1"
|
|
48
|
+
git -C "$1" init -q -b main
|
|
49
|
+
git -C "$1" -c user.email=t@example.invalid -c user.name=t add -A
|
|
50
|
+
git -C "$1" -c user.email=t@example.invalid -c user.name=t commit -qm seed
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
run_enter() { # $1=sandbox subdir $2...=enter-stage argv
|
|
54
|
+
local sb="$1"; shift
|
|
55
|
+
( cd "$sb" && gate_env LIFECYCLE_KIT_KNOB_FILE="$sb/lifecycle-config.knobs" \
|
|
56
|
+
GATE_SDK_TMP_DIR=scratch \
|
|
57
|
+
LIFECYCLE_KIT_SESSION_ID=deadbeef01 \
|
|
58
|
+
&& gate_arm_run --enter-stage "$@" 2>&1 )
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
state_of() { cat "$1/.workflow/WORKFLOW-STATE.txt"; }
|
|
62
|
+
|
|
63
|
+
# --- a boundary entry with a linked worktree present refuses and writes nothing ---
|
|
64
|
+
wt="$SANDBOX/with-worktree"
|
|
65
|
+
git_seed "$wt"
|
|
66
|
+
git -C "$wt" worktree add -q -b agent-branch "$wt/.claude/worktrees/agent-01" HEAD
|
|
67
|
+
before="$(state_of "$wt")"
|
|
68
|
+
|
|
69
|
+
out="$(run_enter "$wt" scope)"; rc=$?
|
|
70
|
+
[[ "$rc" -eq 1 ]] || note refuse-status "want exit 1 on a linked worktree, got $rc -- $out"
|
|
71
|
+
grep -qF 'refused' <<<"$out" || note refuse-text "the refusal does not say refused: $out"
|
|
72
|
+
grep -qF '.claude/worktrees/agent-01' <<<"$out" || note refuse-path "the refusal does not name the worktree path: $out"
|
|
73
|
+
grep -qF 'branch ref' <<<"$out" || note refuse-branch "the refusal guidance does not name the branch half: $out"
|
|
74
|
+
[[ "$(state_of "$wt")" == "$before" ]] || note refuse-nowrite "a refused boundary entry wrote to the state file"
|
|
75
|
+
|
|
76
|
+
# --- --simulate relays the same refusal and writes nothing either ---
|
|
77
|
+
out="$(run_enter "$wt" --simulate scope)"; rc=$?
|
|
78
|
+
[[ "$rc" -eq 1 ]] || note sim-status "want exit 1 under --simulate, got $rc -- $out"
|
|
79
|
+
grep -qF 'enter-stage (simulate)' <<<"$out" || note sim-prefix "the simulate transcript is unprefixed: $out"
|
|
80
|
+
grep -qF '.claude/worktrees/agent-01' <<<"$out" || note sim-path "the simulate refusal does not name the path: $out"
|
|
81
|
+
[[ "$(state_of "$wt")" == "$before" ]] || note sim-nowrite "--simulate wrote to the state file"
|
|
82
|
+
|
|
83
|
+
# --- the knob turns it off, and the same entry then proceeds ---
|
|
84
|
+
out="$( cd "$wt" && gate_env LIFECYCLE_KIT_KNOB_FILE="$wt/lifecycle-config.knobs" \
|
|
85
|
+
GATE_SDK_TMP_DIR=scratch LIFECYCLE_KIT_SESSION_ID=deadbeef01 \
|
|
86
|
+
LIFECYCLE_KIT_BOUNDARY_WORKTREE_CHECK=0 \
|
|
87
|
+
&& gate_arm_run --enter-stage --simulate scope 2>&1 )"; rc=$?
|
|
88
|
+
[[ "$rc" -eq 0 ]] || note knob-off "the knob at 0 still refused: $out"
|
|
89
|
+
|
|
90
|
+
# --- a NON-boundary entry ignores the worktree entirely ---
|
|
91
|
+
out="$(run_enter "$wt" build)"; rc=$?
|
|
92
|
+
[[ "$rc" -eq 0 ]] || note nonboundary "a non-boundary entry refused on a linked worktree: $out"
|
|
93
|
+
|
|
94
|
+
# --- the liveness classification ---
|
|
95
|
+
# The fixture's lock vocabulary is invented on purpose: the kit ships an empty
|
|
96
|
+
# pattern default, so a fixture spelling a real harness's reason would publish
|
|
97
|
+
# the vocabulary the seam ruling keeps in consumer config.
|
|
98
|
+
RE='^testharness \(pid ([0-9]+)\)$'
|
|
99
|
+
DEAD_PID=2147483646 # never a live process; the same probe value producer_liveness.rs uses
|
|
100
|
+
|
|
101
|
+
run_classified() { # $1=sandbox $2=pattern $3...=argv
|
|
102
|
+
local sb="$1" re="$2"; shift 2
|
|
103
|
+
( cd "$sb" && gate_env LIFECYCLE_KIT_KNOB_FILE="$sb/lifecycle-config.knobs" \
|
|
104
|
+
GATE_SDK_TMP_DIR=scratch \
|
|
105
|
+
LIFECYCLE_KIT_SESSION_ID=deadbeef01 \
|
|
106
|
+
LIFECYCLE_KIT_WORKTREE_LOCK_PID_RE="$re" \
|
|
107
|
+
&& gate_arm_run --enter-stage "$@" 2>&1 )
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
seed_wt() { # $1=name -> echoes the sandbox path with one linked worktree at .claude/worktrees/agent-01
|
|
111
|
+
local sb="$SANDBOX/$1"
|
|
112
|
+
git_seed "$sb"
|
|
113
|
+
git -C "$sb" worktree add -q -b agent-branch "$sb/.claude/worktrees/agent-01" HEAD
|
|
114
|
+
echo "$sb"
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
# locked, reason matches, captured pid alive -> live: the line names the locking pid and carries the
|
|
118
|
+
# loss report; the guidance denies that the pid establishes a holder and gives the loss-gated reap
|
|
119
|
+
# instead of a bare wait; a force-removal is still never offered here
|
|
120
|
+
sb="$(seed_wt class-live)"
|
|
121
|
+
git -C "$sb" worktree lock --reason "testharness (pid $$)" "$sb/.claude/worktrees/agent-01"
|
|
122
|
+
out="$(run_classified "$sb" "$RE" scope)"; rc=$?
|
|
123
|
+
[[ "$rc" -eq 1 ]] || note live-status "want exit 1 with a live worktree, got $rc -- $out"
|
|
124
|
+
grep -qE '^live +.*agent-01' <<<"$out" || note live-class "a live worktree was not classified live: $out"
|
|
125
|
+
grep -qF "names pid $$" <<<"$out" || note live-pid "the live line does not name the locking pid: $out"
|
|
126
|
+
grep -qF 'removal is lossless' <<<"$out" || note live-loss "the live line carries no loss report: $out"
|
|
127
|
+
grep -qF 'NOT evidence' <<<"$out" || note live-signal "the live guidance still reads the pid as holder liveness: $out"
|
|
128
|
+
grep -qF "git worktree unlock <path>" <<<"$out" || note live-remedy "the live class was given no reap remedy: $out"
|
|
129
|
+
grep -qF 'wait for the named pid' <<<"$out" && note live-wait "the live class was told to wait on the pid: $out"
|
|
130
|
+
grep -qF -- '--force --force' <<<"$out" && note live-force "the live class was offered a force-remove: $out"
|
|
131
|
+
|
|
132
|
+
# locked, reason matches, captured pid dead -> orphaned: --force --force named here and only here
|
|
133
|
+
sb="$(seed_wt class-orphan-locked)"
|
|
134
|
+
git -C "$sb" worktree lock --reason "testharness (pid $DEAD_PID)" "$sb/.claude/worktrees/agent-01"
|
|
135
|
+
out="$(run_classified "$sb" "$RE" scope)"; rc=$?
|
|
136
|
+
[[ "$rc" -eq 1 ]] || note orphan-status "want exit 1 with an orphaned worktree, got $rc -- $out"
|
|
137
|
+
grep -qE '^orphaned +.*agent-01' <<<"$out" || note orphan-class "a dead holder was not classified orphaned: $out"
|
|
138
|
+
grep -qF -- '--force --force' <<<"$out" || note orphan-remedy "the orphaned class was not given the double-force remedy: $out"
|
|
139
|
+
grep -qF 'removal is lossless' <<<"$out" || note orphan-loss "a clean commitless orphan was not reported lossless: $out"
|
|
140
|
+
grep -qF 'wait for the named pid' <<<"$out" && note orphan-wait "the orphaned class was told to wait: $out"
|
|
141
|
+
|
|
142
|
+
# not locked at all, knob set -> orphaned
|
|
143
|
+
sb="$(seed_wt class-orphan-unlocked)"
|
|
144
|
+
out="$(run_classified "$sb" "$RE" scope)"; rc=$?
|
|
145
|
+
[[ "$rc" -eq 1 ]] || note unlocked-status "want exit 1 with an unlocked worktree, got $rc -- $out"
|
|
146
|
+
grep -qE '^orphaned +.*agent-01' <<<"$out" || note unlocked-class "an unlocked worktree was not classified orphaned: $out"
|
|
147
|
+
|
|
148
|
+
# locked, reason does not match the pattern -> unclassified, and today's reap guidance
|
|
149
|
+
sb="$(seed_wt class-unclassified)"
|
|
150
|
+
git -C "$sb" worktree lock --reason "some other tool is holding this" "$sb/.claude/worktrees/agent-01"
|
|
151
|
+
out="$(run_classified "$sb" "$RE" scope)"; rc=$?
|
|
152
|
+
[[ "$rc" -eq 1 ]] || note uncl-status "want exit 1 with an unclassified worktree, got $rc -- $out"
|
|
153
|
+
grep -qE '^unclassified +.*agent-01' <<<"$out" || note uncl-class "an unmatched lock reason was not unclassified: $out"
|
|
154
|
+
grep -qF "git worktree remove <path>" <<<"$out" || note uncl-remedy "the unclassified class lost today's reap guidance: $out"
|
|
155
|
+
|
|
156
|
+
# the EMPTY-knob default classifies nothing: a live-looking lock still reads unclassified
|
|
157
|
+
sb="$(seed_wt class-default)"
|
|
158
|
+
git -C "$sb" worktree lock --reason "testharness (pid $$)" "$sb/.claude/worktrees/agent-01"
|
|
159
|
+
out="$(run_enter "$sb" scope)"; rc=$?
|
|
160
|
+
[[ "$rc" -eq 1 ]] || note default-status "want exit 1 under the empty-knob default, got $rc -- $out"
|
|
161
|
+
grep -qE '^unclassified +.*agent-01' <<<"$out" || note default-class "the empty knob classified a worktree: $out"
|
|
162
|
+
grep -qE '^live ' <<<"$out" && note default-live "the empty knob produced a live reading: $out"
|
|
163
|
+
|
|
164
|
+
# the loss report is a real read, not a constant: a commit in the worktree is counted as unreachable
|
|
165
|
+
sb="$(seed_wt class-loss)"
|
|
166
|
+
git -C "$sb" worktree lock --reason "testharness (pid $DEAD_PID)" "$sb/.claude/worktrees/agent-01"
|
|
167
|
+
echo stray > "$sb/.claude/worktrees/agent-01/stray.txt"
|
|
168
|
+
git -C "$sb/.claude/worktrees/agent-01" add -A
|
|
169
|
+
git -C "$sb/.claude/worktrees/agent-01" -c user.email=t@example.invalid -c user.name=t commit -qm stray
|
|
170
|
+
out="$(run_classified "$sb" "$RE" scope)"; rc=$?
|
|
171
|
+
grep -qF '1 commit(s) unreachable from HEAD' <<<"$out" || note loss-commits "the loss report did not count the unreachable commit: $out"
|
|
172
|
+
grep -qF 'removal is lossless' <<<"$out" && note loss-lossless "a worktree carrying a commit was called lossless: $out"
|
|
173
|
+
|
|
174
|
+
# mid-iteration: an orphan is ADVISORY, the entry proceeds and the stamp lands
|
|
175
|
+
sb="$(seed_wt advisory)"
|
|
176
|
+
git -C "$sb" worktree lock --reason "testharness (pid $DEAD_PID)" "$sb/.claude/worktrees/agent-01"
|
|
177
|
+
out="$(run_classified "$sb" "$RE" build)"; rc=$?
|
|
178
|
+
[[ "$rc" -eq 0 ]] || note advisory-status "the mid-iteration advisory refused the entry: $out"
|
|
179
|
+
grep -qF 'advisory' <<<"$out" || note advisory-text "no mid-iteration advisory for an orphan: $out"
|
|
180
|
+
grep -qE '^orphaned +.*agent-01' <<<"$out" || note advisory-path "the advisory does not name the orphan: $out"
|
|
181
|
+
grep -qF 'demo-iteration build' "$sb/.workflow/WORKFLOW-STATE.txt" \
|
|
182
|
+
|| note advisory-stamp "the advisory suppressed the stamp: $out"
|
|
183
|
+
|
|
184
|
+
# mid-iteration: a LIVE worktree is reported nowhere — an in-flight dispatch is the normal state
|
|
185
|
+
sb="$(seed_wt advisory-live)"
|
|
186
|
+
git -C "$sb" worktree lock --reason "testharness (pid $$)" "$sb/.claude/worktrees/agent-01"
|
|
187
|
+
out="$(run_classified "$sb" "$RE" build)"; rc=$?
|
|
188
|
+
[[ "$rc" -eq 0 ]] || note advisory-live-status "a live worktree refused a non-boundary entry: $out"
|
|
189
|
+
grep -qF 'advisory' <<<"$out" && note advisory-live-quiet "a live worktree was reported mid-iteration: $out"
|
|
190
|
+
|
|
191
|
+
# a malformed pattern is a config refusal, never a silent everything-unclassified
|
|
192
|
+
sb="$(seed_wt bad-pattern)"
|
|
193
|
+
out="$(run_classified "$sb" '^testharness ((' --simulate scope)"; rc=$?
|
|
194
|
+
[[ "$rc" -eq 2 ]] || note bad-ere "an uncompilable pattern was not refused as config (exit $rc): $out"
|
|
195
|
+
out="$(run_classified "$sb" '^testharness pid [0-9]+$' --simulate scope)"; rc=$?
|
|
196
|
+
[[ "$rc" -eq 2 ]] || note no-group "a pattern with no capture group was not refused as config (exit $rc): $out"
|
|
197
|
+
|
|
198
|
+
# --- the same tree with the worktree reaped enters cleanly (the refusal's off state) ---
|
|
199
|
+
clean="$SANDBOX/reaped"
|
|
200
|
+
git_seed "$clean"
|
|
201
|
+
git -C "$clean" worktree add -q -b agent-branch "$clean/.claude/worktrees/agent-02" HEAD
|
|
202
|
+
git -C "$clean" worktree remove --force "$clean/.claude/worktrees/agent-02"
|
|
203
|
+
out="$(run_enter "$clean" --simulate scope)"; rc=$?
|
|
204
|
+
[[ "$rc" -eq 0 ]] || note reaped "a reaped tree still refused the boundary entry: $out"
|
|
205
|
+
|
|
206
|
+
# --- a tree that is no git checkout at all skips the check rather than failing on it ---
|
|
207
|
+
nogit="$SANDBOX/nogit"
|
|
208
|
+
seed "$nogit"
|
|
209
|
+
out="$(run_enter "$nogit" --simulate scope)"; rc=$?
|
|
210
|
+
[[ "$rc" -eq 0 ]] || note nogit "a non-git tree failed the worktree check instead of skipping it: $out"
|
|
211
|
+
|
|
212
|
+
[[ "$fails" -eq 0 ]] || { echo "boundary-worktree-refusal.test: $fails assertion(s) failed"; exit 1; }
|
|
213
|
+
echo "boundary-worktree-refusal.test: clean (the boundary refuses on a linked worktree and writes nothing, --simulate relays it, the knob disables it, a reaped tree passes, a non-git tree skips; four class readings, the empty-knob default, the loss report on both a residue and a live path, the live class's loss-gated remedy, the mid-iteration advisory live and orphaned, and two malformed patterns refused as config)"
|
|
214
|
+
exit 0
|