checkwright 0.23.0 → 0.24.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 +172 -10
- package/lib/common/lock.sh +7 -0
- package/lib/common/recipe.sh +1 -1
- package/lib/diff.sh +2 -0
- package/lib/init.sh +40 -16
- package/lib/uninstall.sh +2 -0
- package/package.json +2 -2
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
- package/payload/canon-kit/SPEC.md +125 -13
- package/payload/canon-kit/checks/check-amendment-queue.gate +3 -0
- package/payload/canon-kit/checks/check-docs-link-convention.gate +3 -0
- package/payload/canon-kit/checks/check-knob-default-coupling.gate +3 -0
- package/payload/canon-kit/checks/check-prose-tells.gate +3 -0
- package/payload/canon-kit/checks/check-spec-embedded-source.gate +3 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/SPEC-orphan.md +6 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +7 -2
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +8 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.sh +3 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +4 -4
- package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +2 -2
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/SPEC-wire.md +18 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/expect.txt +3 -1
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/widget.proto +13 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC-wire.md +22 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC.md +17 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/widget.proto +13 -0
- package/payload/canon-kit/smoke/install.sh +1 -1
- package/payload/context-kit/README.md +6 -4
- package/payload/context-kit/SPEC.md +239 -70
- package/payload/context-kit/bin/always-loaded.sh +5 -21
- package/payload/context-kit/bin/env-probe.sh +2 -17
- package/payload/context-kit/checks/check-brevity.gate +3 -0
- package/payload/context-kit/checks/check-footprint-fresh.gate +3 -0
- package/payload/context-kit/checks/check-memory-off.gate +3 -0
- package/payload/context-kit/checks/check-settings-paths.gate +3 -0
- package/payload/context-kit/checks/check-settings-pins.gate +3 -0
- package/payload/context-kit/gate-tests/check-brevity.test.sh +3 -2
- package/payload/context-kit/gate-tests/check-memory-off/bad/scripts/context-config.sh +4 -0
- package/payload/context-kit/gate-tests/check-memory-off/good/scripts/context-config.sh +4 -0
- package/payload/context-kit/gate-tests/check-memory-off.test.sh +18 -4
- package/payload/context-kit/gate-tests/check-settings-pins.test.sh +70 -0
- package/payload/context-kit/index-tests/expected/toolfloor.txt +5 -5
- package/payload/context-kit/index-tests/toolfloor-cases.sh +5 -5
- package/payload/context-kit/lib/context.sh +56 -0
- package/payload/context-kit/lib/toolfloor.sh +1 -1
- package/payload/context-kit/smoke/agents-md.sh +16 -4
- package/payload/context-kit/smoke/install.sh +3 -2
- package/payload/context-kit/templates/session-context.sh +5 -5
- package/payload/delegation-kit/SPEC.md +284 -9
- package/payload/delegation-kit/checks/check-agent-tier-explicit.gate +3 -0
- package/payload/delegation-kit/checks/check-gate-tamper.gate +3 -0
- package/payload/delegation-kit/checks/check-rule-citation.gate +3 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/added-exemptions +5 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/expect.txt +2 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +108 -0
- package/payload/delegation-kit/smoke/install.sh +1 -1
- package/payload/delegation-kit/templates/agent-execution.md +71 -4
- package/payload/doctrine-kit/SPEC.md +1 -1
- package/payload/doctrine-kit/checks/check-doctrine-registration.gate +3 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +2 -3
- package/payload/doctrine-kit/smoke/install.sh +17 -4
- package/payload/drift-kit/README.md +2 -2
- package/payload/drift-kit/SPEC.md +71 -7
- package/payload/drift-kit/bin/stage-economics.sh +1 -1
- package/payload/drift-kit/lib/drift.sh +43 -0
- package/payload/drift-kit/smoke/install.sh +21 -14
- package/payload/evidence-kit/README.md +3 -1
- package/payload/evidence-kit/SPEC.md +160 -19
- package/payload/evidence-kit/checks/check-battery-roster.gate +3 -0
- package/payload/evidence-kit/checks/check-evidence-baseline.gate +3 -0
- package/payload/evidence-kit/checks/check-evidence-manifest.gate +3 -0
- package/payload/evidence-kit/checks/check-producer-liveness.sh +42 -2
- package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +4 -3
- package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +8 -5
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/WORKFLOW-STATE.txt +1 -1
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/scripts/evidence-config.sh +9 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/WORKFLOW-STATE.txt +1 -1
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/scripts/evidence-config.sh +9 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +6 -4
- package/payload/evidence-kit/gate-tests/producer-lock.test.sh +42 -1
- package/payload/evidence-kit/lib/evidence.sh +2 -0
- package/payload/evidence-kit/smoke/install.sh +1 -1
- package/payload/gate-sdk/README.md +10 -7
- package/payload/gate-sdk/SPEC.md +3916 -265
- package/payload/gate-sdk/bin/install-hooks.sh +14 -2
- package/payload/gate-sdk/bin/port-blockers.sh +37 -9
- package/payload/gate-sdk/bin/run-gate-tests.sh +1 -2
- package/payload/gate-sdk/bin/run-gates.sh +22 -0
- package/payload/gate-sdk/bin/upgrade-smoke.sh +21 -16
- package/payload/gate-sdk/checks/check-action-run-shell.sh +1 -0
- package/payload/gate-sdk/checks/check-commit-msg.gate +3 -0
- package/payload/gate-sdk/checks/check-commit-subject.gate +3 -0
- package/payload/gate-sdk/checks/check-core-files.gate +3 -0
- package/payload/gate-sdk/checks/check-crate-arms.sh +1 -0
- package/payload/gate-sdk/checks/check-enforcement-fresh.gate +3 -0
- package/payload/gate-sdk/checks/check-exec-bit.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-assertions.sh +1 -0
- package/payload/gate-sdk/checks/check-gate-binary-fresh.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-fail-closed.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-fixture-coverage.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-output.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +78 -14
- package/payload/gate-sdk/checks/check-graph.gate +3 -0
- package/payload/gate-sdk/checks/check-hook-exec-bit.gate +3 -0
- package/payload/gate-sdk/checks/check-identity.gate +3 -0
- package/payload/gate-sdk/checks/check-install-disposition.sh +1 -0
- package/payload/gate-sdk/checks/check-kit-enum.gate +3 -0
- package/payload/gate-sdk/checks/check-readme-roster.gate +3 -0
- package/payload/gate-sdk/checks/check-reads-couples.gate +3 -0
- package/payload/gate-sdk/checks/check-root-tiering.gate +3 -0
- package/payload/gate-sdk/checks/check-shellcheck.sh +1 -0
- package/payload/gate-sdk/checks/check-template-copy-parity.gate +3 -0
- package/payload/gate-sdk/checks/check-tree-terms.sh +1 -0
- package/payload/gate-sdk/checks/check-workflow-tiering.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +17 -12
- package/payload/gate-sdk/gate-tests/check-core-files.test.sh +4 -5
- package/payload/gate-sdk/gate-tests/check-exec-bit/bad/dump.txt +2 -1
- package/payload/gate-sdk/gate-tests/check-exec-bit/bad/expect.txt +2 -1
- package/payload/gate-sdk/gate-tests/check-exec-bit/good/dump.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +3 -4
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +26 -4
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/args +6 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored-descriptor.gate +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored.sh +14 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-descriptor.gate +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-held.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/args +8 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored-descriptor.gate +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored.sh +14 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-descriptor.gate +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-held.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks.test.sh +77 -0
- package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +4 -5
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +7 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-bare.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-both.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-heldtwice.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-twice.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +2 -1
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-held.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +49 -4
- package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +15 -5
- package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +12 -0
- package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-example-gate.md +27 -5
- package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-second-gate.md +12 -0
- package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +5 -4
- package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +14 -12
- package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +43 -17
- package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +190 -0
- package/payload/gate-sdk/gate-tests/check-identity/bad/gh-hosts.yml +9 -0
- package/payload/gate-sdk/gate-tests/check-identity/bad/identity.conf +4 -2
- package/payload/gate-sdk/gate-tests/check-identity/bad/scripts/gate-sdk-config.sh +10 -0
- package/payload/gate-sdk/gate-tests/check-identity/good/gh-hosts.yml +11 -0
- package/payload/gate-sdk/gate-tests/check-identity/good/identity.conf +5 -1
- package/payload/gate-sdk/gate-tests/check-identity/good/scripts/gate-sdk-config.sh +10 -0
- package/payload/gate-sdk/gate-tests/check-identity.test.sh +114 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/bad/check-native-sample.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/bad/gates.list +4 -1
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/check-native-sample.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/gates.list +5 -2
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/args +3 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/README.md +15 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-one.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-two.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/expect.txt +3 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +3 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/README.md +13 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/checks/check-delta-one.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/README.md +14 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-one.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-two.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +87 -89
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/agent-budget-guard.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity.test.sh +56 -0
- package/payload/gate-sdk/gate-tests/declaration-lib-parity.test.sh +211 -0
- package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +16 -15
- package/payload/gate-sdk/gate-tests/lib-gate.test.sh +94 -1
- package/payload/gate-sdk/lib/gate.sh +232 -25
- package/payload/gate-sdk/smoke/install.sh +5 -1
- package/payload/guard-kit/SPEC.md +207 -28
- package/payload/guard-kit/bin/run-guard-tests.sh +6 -1
- package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +105 -0
- package/payload/guard-kit/guard-tests/cases.tsv +37 -9
- package/payload/guard-kit/lib/guard.sh +170 -6
- package/payload/lifecycle-kit/README.md +3 -2
- package/payload/lifecycle-kit/SPEC.md +507 -75
- package/payload/lifecycle-kit/bin/enter-stage.sh +72 -33
- package/payload/lifecycle-kit/bin/file-gap.sh +2 -2
- package/payload/lifecycle-kit/checks/check-close-surfaces.gate +3 -0
- package/payload/lifecycle-kit/checks/check-stage-entry.gate +3 -0
- package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +4 -4
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +1 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/bad/.workflow/WORKFLOW-STATE.txt +3 -3
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/good/.workflow/WORKFLOW-STATE.txt +3 -3
- package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +22 -22
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/bad/.workflow/WORKFLOW-STATE.txt +2 -2
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/good/.workflow/WORKFLOW-STATE.txt +2 -2
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +120 -10
- package/payload/lifecycle-kit/gate-tests/gap-inbox-route.test.sh +123 -0
- package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +11 -11
- package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +16 -5
- package/payload/lifecycle-kit/lib/stages.sh +5 -0
- package/payload/lifecycle-kit/smoke/install.sh +29 -15
- package/payload/lifecycle-kit/templates/lead.md +24 -0
- package/payload/lifecycle-kit/templates/stages/align.md +20 -2
- package/payload/lifecycle-kit/templates/stages/build.md +3 -3
- package/payload/lifecycle-kit/templates/stages/close.md +20 -6
- package/payload/lifecycle-kit/templates/stages/scope.md +20 -1
- package/payload/lifecycle-kit/templates/stages/spec.md +1 -1
- package/payload/lifecycle-kit/templates/stages/validate.md +1 -1
- package/payload/lifecycle-kit/templates/workflow-state-guard.sh +1 -1
- package/payload/queue-kit/README.md +10 -10
- package/payload/queue-kit/SPEC.md +301 -84
- package/payload/queue-kit/bin/queue-counts.sh +1 -1
- package/payload/queue-kit/checks/check-queue-entry-budget.gate +1 -1
- package/payload/queue-kit/checks/check-queue-prose-precondition.gate +3 -0
- package/payload/queue-kit/checks/check-roadmap-fresh.gate +3 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +15 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +2 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +7 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/expect.txt +4 -0
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/expect.txt +1 -1
- package/payload/queue-kit/gate-tests/queue-counts.test.sh +1 -1
- package/payload/queue-kit/gate-tests/queue-index.test.sh +55 -119
- package/payload/queue-kit/gate-tests/roadmap.test.sh +22 -12
- package/payload/queue-kit/lib/queue.sh +0 -49
- package/payload/queue-kit/smoke/install.sh +1 -1
- package/payload/site-kit/SPEC.md +29 -2
- package/payload/site-kit/checks/check-docs-cname-parity.gate +3 -0
- package/payload/site-kit/checks/check-docs-render-fidelity.sh +1 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +5 -4
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +6 -5
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/checks/check-sample.gate +3 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/expect.txt +1 -1
- package/payload/site-kit/smoke/install.sh +1 -1
- package/payload/canon-kit/checks/check-amendment-queue.sh +0 -117
- package/payload/canon-kit/checks/check-docs-link-convention.sh +0 -79
- package/payload/canon-kit/checks/check-knob-default-coupling.sh +0 -240
- package/payload/canon-kit/checks/check-prose-tells.sh +0 -208
- package/payload/canon-kit/checks/check-spec-embedded-source.sh +0 -134
- package/payload/context-kit/bin/footprint.sh +0 -144
- package/payload/context-kit/checks/check-brevity.sh +0 -124
- package/payload/context-kit/checks/check-footprint-fresh.sh +0 -39
- package/payload/context-kit/checks/check-memory-off.sh +0 -113
- package/payload/context-kit/checks/check-settings-paths.sh +0 -94
- package/payload/context-kit/checks/check-settings-pins.sh +0 -111
- package/payload/context-kit/gate-tests/check-memory-off/bad/args +0 -1
- package/payload/context-kit/gate-tests/check-memory-off/good/args +0 -1
- package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +0 -62
- package/payload/delegation-kit/checks/check-gate-tamper.sh +0 -140
- package/payload/delegation-kit/checks/check-rule-citation.sh +0 -77
- package/payload/doctrine-kit/checks/check-doctrine-registration.sh +0 -246
- package/payload/drift-kit/bin/trajectory.sh +0 -242
- package/payload/evidence-kit/checks/check-battery-roster.sh +0 -87
- package/payload/evidence-kit/checks/check-evidence-baseline.sh +0 -104
- package/payload/evidence-kit/checks/check-evidence-manifest.sh +0 -105
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/args +0 -3
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/args +0 -3
- package/payload/gate-sdk/bin/enforcement-map.sh +0 -273
- package/payload/gate-sdk/checks/check-commit-msg.sh +0 -51
- package/payload/gate-sdk/checks/check-commit-subject.sh +0 -44
- package/payload/gate-sdk/checks/check-core-files.sh +0 -76
- package/payload/gate-sdk/checks/check-enforcement-fresh.sh +0 -38
- package/payload/gate-sdk/checks/check-exec-bit.sh +0 -96
- package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +0 -107
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +0 -106
- package/payload/gate-sdk/checks/check-gate-fail-closed.sh +0 -85
- package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +0 -93
- package/payload/gate-sdk/checks/check-gate-output.sh +0 -103
- package/payload/gate-sdk/checks/check-graph.sh +0 -632
- package/payload/gate-sdk/checks/check-hook-exec-bit.sh +0 -46
- package/payload/gate-sdk/checks/check-identity.sh +0 -135
- package/payload/gate-sdk/checks/check-kit-enum.sh +0 -95
- package/payload/gate-sdk/checks/check-readme-roster.sh +0 -108
- package/payload/gate-sdk/checks/check-reads-couples.sh +0 -200
- package/payload/gate-sdk/checks/check-root-tiering.sh +0 -67
- package/payload/gate-sdk/checks/check-template-copy-parity.sh +0 -127
- package/payload/gate-sdk/checks/check-workflow-tiering.sh +0 -85
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/args +0 -1
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/args +0 -1
- package/payload/gate-sdk/gate-tests/check-identity/bad/args +0 -1
- package/payload/gate-sdk/gate-tests/check-identity/good/args +0 -1
- package/payload/lifecycle-kit/bin/close-surfaces.sh +0 -94
- package/payload/lifecycle-kit/checks/check-close-surfaces.sh +0 -64
- package/payload/lifecycle-kit/checks/check-stage-entry.sh +0 -198
- package/payload/queue-kit/bin/queue-index.sh +0 -182
- package/payload/queue-kit/bin/roadmap.sh +0 -76
- package/payload/queue-kit/checks/check-queue-prose-precondition.sh +0 -64
- package/payload/queue-kit/checks/check-roadmap-fresh.sh +0 -111
- package/payload/site-kit/checks/check-docs-cname-parity.sh +0 -81
- /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/{gates → scripts}/check-sample.sh +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/{gates → scripts}/check-sample.sh +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{check-gamma.sh → scripts/check-gamma.sh} +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gates.list → scripts/gates.list} +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{check-beta.sh → scripts/check-beta.sh} +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gates.list → scripts/gates.list} +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/{site-config.sh → scripts/site-config.sh} +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/CNAME +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/index.md +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/docs → docs}/posts/2026-01-01-legacy.md +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/pkg → pkg}/gate-tests/fixture.md +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{site-config.sh → scripts/site-config.sh} +0 -0
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# graph: couples=*/templates/*.sh,scripts/*.sh dir=bi valve=none tier=precommit
|
|
3
|
-
# install: on-surface
|
|
4
|
-
# spec: gate-sdk/SPEC.md §check-template-copy-parity — a kit template and its vendored consumer copy agree on their declared contract surface, with copy-side additions declared
|
|
5
|
-
#
|
|
6
|
-
# usage: check-template-copy-parity.sh [root]
|
|
7
|
-
# root defaults to the git toplevel; the pairing is <root>/*/templates/<n>.sh
|
|
8
|
-
# <-> <root>/<gates-dir>/<n>.sh, minus the *-config.sh suffix exclusion.
|
|
9
|
-
set -uo pipefail
|
|
10
|
-
|
|
11
|
-
SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
12
|
-
# shellcheck source=../lib/gate.sh
|
|
13
|
-
source "$SDK/lib/gate.sh"
|
|
14
|
-
|
|
15
|
-
ROOT="${1:-}"
|
|
16
|
-
if [[ -z "$ROOT" ]]; then
|
|
17
|
-
ROOT="$(git rev-parse --show-toplevel 2>/dev/null)" \
|
|
18
|
-
|| { echo "check-template-copy-parity: not a git repository and no root given" >&2; exit 2; }
|
|
19
|
-
fi
|
|
20
|
-
[[ -d "$ROOT" ]] || { echo "check-template-copy-parity: root not a directory: $ROOT" >&2; exit 2; }
|
|
21
|
-
|
|
22
|
-
GATES_DIR="$(gate_sdk_gates_dir)"
|
|
23
|
-
|
|
24
|
-
# spec: gate-sdk/SPEC.md §check-template-copy-parity — assertion A reads the resolved `<file> §<section>` target, never the trailing prose: a pair may gloss one target two ways deliberately
|
|
25
|
-
spec_target() {
|
|
26
|
-
sed -n 's/^# spec:[[:space:]]*//p' "$1" 2>/dev/null | head -1 \
|
|
27
|
-
| sed 's/[[:space:]]*—.*$//; s/[[:space:]]*$//'
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
# spec: gate-sdk/SPEC.md §check-template-copy-parity — the declared surface: four classes of *declaration*, never content. `case` arms contribute the arm's exit token (its first command word), never the arm's pattern — a consumer's rule patterns are its own vocabulary and the gate must not read them.
|
|
31
|
-
declared_surface() {
|
|
32
|
-
local f="$1"
|
|
33
|
-
{
|
|
34
|
-
sed -n -E 's/^[[:space:]]*(function[[:space:]]+)?([A-Za-z_][A-Za-z0-9_]*)[[:space:]]*\(\)[[:space:]]*\{?.*$/func:\2/p' "$f"
|
|
35
|
-
# comment-tier-exempt: local parser fact, below SPEC altitude — an arm opens only where a `;;` (or the `in`) last closed one, so a `)` inside an arm body's prose is not read as a new arm
|
|
36
|
-
awk '
|
|
37
|
-
/(^|[[:space:];])case[[:space:]].*[[:space:]]in[[:space:]]*$/ { in_case=1; expect=1; next }
|
|
38
|
-
/^[[:space:]]*esac([[:space:]]|$)/ { in_case=0; expect=0; want=0; next }
|
|
39
|
-
in_case {
|
|
40
|
-
line=$0
|
|
41
|
-
if (expect && index(line, ")")) {
|
|
42
|
-
line=substr(line, index(line, ")")+1) # first ")" closes the pattern
|
|
43
|
-
expect=0; want=1
|
|
44
|
-
}
|
|
45
|
-
if (want && match(line, /[A-Za-z_][A-Za-z0-9_]*/)) {
|
|
46
|
-
print "case:" substr(line, RSTART, RLENGTH)
|
|
47
|
-
want=0
|
|
48
|
-
}
|
|
49
|
-
if (index($0, ";;")) { expect=1; want=0 }
|
|
50
|
-
}
|
|
51
|
-
' "$f"
|
|
52
|
-
grep -oE '(^|[;&|)]|\$\(|&&|\|\|)[[:space:]]*[a-z_][a-z0-9]*_[a-z0-9_]+([[:space:]]|\))' "$f" \
|
|
53
|
-
| grep -oE '[a-z_][a-z0-9]*_[a-z0-9_]+' | sed 's/^/lib:/'
|
|
54
|
-
grep -oE '\$\{[A-Z][A-Z0-9]*_[A-Z0-9_]+:[-=]' "$f" \
|
|
55
|
-
| sed -E 's/^\$\{//; s/:[-=]$//; s/^/knob:/'
|
|
56
|
-
} 2>/dev/null | sort -u
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
# spec: gate-sdk/SPEC.md §check-template-copy-parity — the `# copy-divergence:` marker grammar assertion C reads
|
|
60
|
-
divergence_reasons() {
|
|
61
|
-
sed -n 's/^[[:space:]]*#[[:space:]]*copy-divergence:[[:space:]]*//p' "$1" 2>/dev/null
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
pairs=0
|
|
65
|
-
findings=()
|
|
66
|
-
|
|
67
|
-
shopt -s nullglob
|
|
68
|
-
templates=("$ROOT"/*/templates/*.sh)
|
|
69
|
-
shopt -u nullglob
|
|
70
|
-
|
|
71
|
-
for tpl in "${templates[@]}"; do
|
|
72
|
-
name="${tpl##*/}"
|
|
73
|
-
[[ "$name" == *-config.sh ]] && continue # a config template is a starting point; divergence is its contract
|
|
74
|
-
copy="$ROOT/$GATES_DIR/$name"
|
|
75
|
-
[[ -f "$copy" ]] || continue # unpaired: not vendored here, nothing to be in parity with
|
|
76
|
-
pairs=$((pairs + 1))
|
|
77
|
-
rel_copy="${copy#"$ROOT"/}"
|
|
78
|
-
|
|
79
|
-
# assertion A — same resolved spec: target
|
|
80
|
-
t_target="$(spec_target "$tpl")"
|
|
81
|
-
c_target="$(spec_target "$copy")"
|
|
82
|
-
if [[ "$t_target" != "$c_target" ]]; then
|
|
83
|
-
findings+=("$rel_copy: spec: target differs from its template")
|
|
84
|
-
findings+=(" template: ${t_target:-<none>}")
|
|
85
|
-
findings+=(" copy: ${c_target:-<none>}")
|
|
86
|
-
fi
|
|
87
|
-
|
|
88
|
-
t_surface="$(declared_surface "$tpl")"; st=$?
|
|
89
|
-
fail_closed "$st" check-template-copy-parity "declared_surface"
|
|
90
|
-
c_surface="$(declared_surface "$copy")"; st=$?
|
|
91
|
-
fail_closed "$st" check-template-copy-parity "declared_surface"
|
|
92
|
-
|
|
93
|
-
# assertion B — the template's declared surface is present in the copy
|
|
94
|
-
missing="$(comm -23 <(printf '%s\n' "$t_surface") <(printf '%s\n' "$c_surface") | grep -v '^$' || true)"
|
|
95
|
-
if [[ -n "$missing" ]]; then
|
|
96
|
-
findings+=("$rel_copy: drops surface the template declares (a template-side change never propagated, or a copy-side removal):")
|
|
97
|
-
while IFS= read -r tok; do findings+=(" $tok"); done <<<"$missing"
|
|
98
|
-
fi
|
|
99
|
-
|
|
100
|
-
# assertion C — copy-side additions are declared by a marker naming them
|
|
101
|
-
extra="$(comm -13 <(printf '%s\n' "$t_surface") <(printf '%s\n' "$c_surface") | grep -v '^$' || true)"
|
|
102
|
-
if [[ -n "$extra" ]]; then
|
|
103
|
-
reasons="$(divergence_reasons "$copy")"
|
|
104
|
-
undeclared=()
|
|
105
|
-
while IFS= read -r tok; do
|
|
106
|
-
bare="${tok#*:}"
|
|
107
|
-
grep -qF -- "$bare" <<<"$reasons" || undeclared+=("$tok")
|
|
108
|
-
done <<<"$extra"
|
|
109
|
-
if [[ ${#undeclared[@]} -gt 0 ]]; then
|
|
110
|
-
findings+=("$rel_copy: adds surface no '# copy-divergence:' marker names:")
|
|
111
|
-
for tok in "${undeclared[@]}"; do findings+=(" $tok"); done
|
|
112
|
-
fi
|
|
113
|
-
fi
|
|
114
|
-
done
|
|
115
|
-
|
|
116
|
-
if [[ ${#findings[@]} -gt 0 ]]; then
|
|
117
|
-
echo "check-template-copy-parity: template <-> consumer-copy contract surface diverged:"
|
|
118
|
-
printf '%s\n' "${findings[@]}"
|
|
119
|
-
echo " help: assertion A — point both copies' 'spec:' line at the same '<file> §<section>'"
|
|
120
|
-
echo " (trailing prose may differ). Assertion B — propagate the template's"
|
|
121
|
-
echo " declaration to the copy, or retire it from the template. Assertion C —"
|
|
122
|
-
echo " add a '# copy-divergence: <reason>' line to the copy whose reason names"
|
|
123
|
-
echo " the added token and says why the copy needs it."
|
|
124
|
-
exit 1
|
|
125
|
-
fi
|
|
126
|
-
echo "TEMPLATE-COPY-PARITY: clean ($pairs template<->copy pair(s) agree on spec: target, template-declared surface present, copy additions declared)"
|
|
127
|
-
exit 0
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# graph: couples=.workflow/*,.gitignore dir=one valve=none tier=precommit
|
|
3
|
-
# install: on-surface
|
|
4
|
-
# spec: gate-sdk/SPEC.md §The workflow directory — every workflow-dir member is tracked or ignored, and every tracked member opens with a '# contract: ' header carrying a ruled payload
|
|
5
|
-
#
|
|
6
|
-
# usage: check-workflow-tiering.sh [scan-root] (default '.')
|
|
7
|
-
set -uo pipefail
|
|
8
|
-
|
|
9
|
-
SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
10
|
-
# shellcheck source=../lib/gate.sh
|
|
11
|
-
source "$SDK/lib/gate.sh"
|
|
12
|
-
|
|
13
|
-
ROOT="${1:-.}"
|
|
14
|
-
[[ -d "$ROOT" ]] || { echo "check-workflow-tiering: not a directory: $ROOT" >&2; exit 2; }
|
|
15
|
-
git -C "$ROOT" rev-parse --git-dir >/dev/null 2>&1 || {
|
|
16
|
-
echo "check-workflow-tiering: $ROOT is not a git repository — the tracked/ignored partition is unreadable" >&2; exit 2; }
|
|
17
|
-
|
|
18
|
-
WF="$GATE_SDK_WORKFLOW_DIR"
|
|
19
|
-
[[ -d "$ROOT/$WF" ]] || {
|
|
20
|
-
echo "check-workflow-tiering: workflow directory not found: $ROOT/$WF" >&2; exit 2; }
|
|
21
|
-
|
|
22
|
-
# spec: gate-sdk/SPEC.md §The workflow directory — the two ruled payload forms
|
|
23
|
-
POINTER_RE='^[A-Za-z0-9._/-]+\.md[[:space:]]+§[^[:space:]]'
|
|
24
|
-
VERSION_RE='^[a-z0-9-]+ v[0-9]+$'
|
|
25
|
-
|
|
26
|
-
errors=()
|
|
27
|
-
tracked=0
|
|
28
|
-
ignored=0
|
|
29
|
-
|
|
30
|
-
shopt -s nullglob dotglob
|
|
31
|
-
members=("$ROOT/$WF"/*)
|
|
32
|
-
shopt -u nullglob dotglob
|
|
33
|
-
|
|
34
|
-
for m in "${members[@]}"; do
|
|
35
|
-
rel="${m#"$ROOT"/}"
|
|
36
|
-
is_tracked=0
|
|
37
|
-
if [[ -d "$m" ]]; then
|
|
38
|
-
listing="$(git -C "$ROOT" ls-files -- "$rel")"; st=$?
|
|
39
|
-
fail_closed "$st" WORKFLOW-TIERING "git ls-files ($rel)"
|
|
40
|
-
[[ -n "$listing" ]] && is_tracked=1
|
|
41
|
-
else
|
|
42
|
-
git -C "$ROOT" ls-files --error-unmatch -- "$rel" >/dev/null 2>&1 && is_tracked=1
|
|
43
|
-
fi
|
|
44
|
-
|
|
45
|
-
is_ignored=0
|
|
46
|
-
git -C "$ROOT" check-ignore -q -- "$rel"; st=$?
|
|
47
|
-
case "$st" in
|
|
48
|
-
0) is_ignored=1 ;;
|
|
49
|
-
1) ;;
|
|
50
|
-
*) echo "check-workflow-tiering: git check-ignore exited $st on $rel" >&2; exit 2 ;;
|
|
51
|
-
esac
|
|
52
|
-
|
|
53
|
-
# assertion A: partition totality
|
|
54
|
-
if [[ "$is_tracked" == 0 && "$is_ignored" == 0 ]]; then
|
|
55
|
-
errors+=("$rel: neither tracked nor ignored — no tier holds it")
|
|
56
|
-
continue
|
|
57
|
-
fi
|
|
58
|
-
if [[ "$is_tracked" == 0 ]]; then ignored=$((ignored + 1)); continue; fi
|
|
59
|
-
tracked=$((tracked + 1))
|
|
60
|
-
[[ -d "$m" ]] && continue
|
|
61
|
-
|
|
62
|
-
# assertion B: header presence and ruled payload form
|
|
63
|
-
[[ -r "$m" ]] || { echo "check-workflow-tiering: member not readable: $rel" >&2; exit 2; }
|
|
64
|
-
first=""
|
|
65
|
-
IFS= read -r first < "$m" || true
|
|
66
|
-
if [[ "$first" != "# contract: "* ]]; then
|
|
67
|
-
errors+=("$rel: tracked member's first line is not a '# contract: ' header: ${first:0:60}")
|
|
68
|
-
continue
|
|
69
|
-
fi
|
|
70
|
-
payload="${first#"# contract: "}"
|
|
71
|
-
sig="${payload%% — *}"; sig="${sig%% -- *}"
|
|
72
|
-
sig="${sig%"${sig##*[![:space:]]}"}"
|
|
73
|
-
if [[ ! "$sig" =~ $POINTER_RE ]] && [[ ! "$sig" =~ $VERSION_RE ]]; then
|
|
74
|
-
errors+=("$rel: '# contract: ' payload is neither '<owner-path>.md §<section>' nor '<format-name> v<N>': $sig")
|
|
75
|
-
fi
|
|
76
|
-
done
|
|
77
|
-
|
|
78
|
-
if [[ ${#errors[@]} -gt 0 ]]; then
|
|
79
|
-
echo "check-workflow-tiering: ${#errors[@]} workflow-surface violation(s):"
|
|
80
|
-
printf ' %s\n' "${errors[@]}"
|
|
81
|
-
echo " help: every workflow-dir member belongs to one of two tiers — a tracked checked projection or a gitignored local capture; add the member to .gitignore or commit it. A tracked member's first line is '# contract: <owner-path>.md §<section>' (optionally ' — <grammar or gloss>'), or '# contract: <format-name> v<N>' where a gate parses the header as a wire-format version and its owning SPEC says so."
|
|
82
|
-
exit 1
|
|
83
|
-
fi
|
|
84
|
-
echo "WORKFLOW-TIERING: clean ($tracked tracked projection(s) with a ruled '# contract: ' header, $ignored capture member(s); every member holds a tier)"
|
|
85
|
-
exit 0
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
--fixture .
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
--fixture .
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# spec: lifecycle-kit/SPEC.md §The close-surface roster — the derivation: every close-surface: declaration, unioned with the workflow directory's capture tier so an undeclared capture surface is reported rather than missing
|
|
3
|
-
# usage: close-surfaces.sh [scan-root] (default: the repo toplevel)
|
|
4
|
-
# prints one tab-separated '<path> <mode> <reclaim> <owner>' row per surface,
|
|
5
|
-
# sorted by path; exit 2 on an unreadable configuration or declaration surface
|
|
6
|
-
set -uo pipefail
|
|
7
|
-
|
|
8
|
-
ROOT="${1:-}"
|
|
9
|
-
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
10
|
-
SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
|
|
11
|
-
[[ -n "$ROOT" ]] && { cd "$ROOT" || exit 2; }
|
|
12
|
-
# shellcheck source=../../gate-sdk/lib/gate.sh
|
|
13
|
-
source "$SDK/lib/gate.sh"
|
|
14
|
-
# shellcheck source=../lib/stages.sh
|
|
15
|
-
source "$KIT/lib/stages.sh"
|
|
16
|
-
|
|
17
|
-
if [[ -z "$ROOT" ]]; then
|
|
18
|
-
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null)" || {
|
|
19
|
-
echo "close-surfaces: not a git repository — the capture tier is underivable" >&2; exit 2; }
|
|
20
|
-
cd "$REPO_ROOT" || exit 2
|
|
21
|
-
fi
|
|
22
|
-
git rev-parse --git-dir >/dev/null 2>&1 || {
|
|
23
|
-
echo "close-surfaces: not a git repository — the capture tier is underivable" >&2; exit 2; }
|
|
24
|
-
|
|
25
|
-
declare -a SURFACES=()
|
|
26
|
-
_add_surface() {
|
|
27
|
-
local f s
|
|
28
|
-
f="${1#./}"
|
|
29
|
-
for s in ${SURFACES[@]+"${SURFACES[@]}"}; do [[ "$s" == "$f" ]] && return 0; done
|
|
30
|
-
SURFACES+=("$f")
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
while IFS= read -r r; do
|
|
34
|
-
[[ -n "$r" ]] || continue
|
|
35
|
-
[[ -f "${r%/}/$LIFECYCLE_KIT_ROSTER_BASENAME" ]] && _add_surface "${r%/}/$LIFECYCLE_KIT_ROSTER_BASENAME"
|
|
36
|
-
done < <(gate_kit_roots_rel)
|
|
37
|
-
|
|
38
|
-
shopt -s nullglob globstar
|
|
39
|
-
for g in ${LIFECYCLE_KIT_CLOSE_SURFACE_GLOBS[@]+"${LIFECYCLE_KIT_CLOSE_SURFACE_GLOBS[@]}"}; do
|
|
40
|
-
for f in $g; do [[ -f "$f" ]] && _add_surface "$f"; done
|
|
41
|
-
done
|
|
42
|
-
shopt -u nullglob globstar
|
|
43
|
-
|
|
44
|
-
# spec: lifecycle-kit/SPEC.md §The close-surface roster — fenced blocks are skipped, so the directive's own grammar is quotable where it is specified (check-spec-pointer's carve-out, same reason)
|
|
45
|
-
read -r -d '' EXTRACT <<'AWK' || true
|
|
46
|
-
/^[[:space:]]*```/ { fence = !fence; next }
|
|
47
|
-
fence { next }
|
|
48
|
-
/^[[:space:]]*close-surface:[[:space:]]/ { print }
|
|
49
|
-
AWK
|
|
50
|
-
|
|
51
|
-
declare -a ROWS=()
|
|
52
|
-
declare -a DECLARED=()
|
|
53
|
-
for s in ${SURFACES[@]+"${SURFACES[@]}"}; do
|
|
54
|
-
[[ -r "$s" ]] || { echo "close-surfaces: declaration surface not readable: $s" >&2; exit 2; }
|
|
55
|
-
while IFS= read -r line; do
|
|
56
|
-
[[ -n "$line" ]] || continue
|
|
57
|
-
body="${line#"${line%%close-surface:*}"}"
|
|
58
|
-
body="${body#close-surface:}"
|
|
59
|
-
body="${body#"${body%%[![:space:]]*}"}"
|
|
60
|
-
body="${body%"${body##*[![:space:]]}"}"
|
|
61
|
-
reclaim="-"
|
|
62
|
-
if [[ "$body" == *" reclaim="* ]]; then
|
|
63
|
-
reclaim="${body#* reclaim=}"
|
|
64
|
-
body="${body%% reclaim=*}"
|
|
65
|
-
fi
|
|
66
|
-
path="${body%%[[:space:]]*}"
|
|
67
|
-
mode="${body#"$path"}"
|
|
68
|
-
mode="${mode#"${mode%%[![:space:]]*}"}"
|
|
69
|
-
mode="${mode%"${mode##*[![:space:]]}"}"
|
|
70
|
-
ROWS+=("$path $mode $reclaim $s")
|
|
71
|
-
DECLARED+=("$path")
|
|
72
|
-
done < <(awk "$EXTRACT" "$s")
|
|
73
|
-
done
|
|
74
|
-
|
|
75
|
-
WF="${GATE_SDK_WORKFLOW_DIR:-.workflow}"
|
|
76
|
-
if [[ -d "$WF" ]]; then
|
|
77
|
-
shopt -s nullglob dotglob
|
|
78
|
-
for m in "$WF"/*; do
|
|
79
|
-
[[ -f "$m" ]] || continue
|
|
80
|
-
git check-ignore -q -- "$m"; st=$?
|
|
81
|
-
case "$st" in
|
|
82
|
-
0) ;;
|
|
83
|
-
1) continue ;;
|
|
84
|
-
*) echo "close-surfaces: git check-ignore exited $st on $m" >&2; exit 2 ;;
|
|
85
|
-
esac
|
|
86
|
-
seen=0
|
|
87
|
-
for d in ${DECLARED[@]+"${DECLARED[@]}"}; do [[ "$d" == "$m" ]] && { seen=1; break; }; done
|
|
88
|
-
[[ "$seen" == 1 ]] || ROWS+=("$m (undeclared) - -")
|
|
89
|
-
done
|
|
90
|
-
shopt -u nullglob dotglob
|
|
91
|
-
fi
|
|
92
|
-
|
|
93
|
-
[[ ${#ROWS[@]} -eq 0 ]] && exit 0
|
|
94
|
-
printf '%s\n' "${ROWS[@]}" | LC_ALL=C sort -t' ' -k1,1
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# graph: couples=.workflow/*,kit:SPEC.md,.claude/commands/*.md,.gitignore dir=one valve=none tier=precommit
|
|
3
|
-
# install: on-surface
|
|
4
|
-
# spec: lifecycle-kit/SPEC.md §check-close-surfaces — the derived close-surface roster is complete and moded: no undeclared capture surface, every declaration carries a mode with a well-formed forced= citation, every capture-tier declaration names a reclaim command
|
|
5
|
-
#
|
|
6
|
-
# usage: check-close-surfaces.sh [scan-root] (derives through bin/close-surfaces.sh)
|
|
7
|
-
set -uo pipefail
|
|
8
|
-
|
|
9
|
-
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
10
|
-
SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
|
|
11
|
-
# shellcheck source=../../gate-sdk/lib/gate.sh
|
|
12
|
-
source "$SDK/lib/gate.sh"
|
|
13
|
-
|
|
14
|
-
declare -a ROOTARG=()
|
|
15
|
-
if [[ -n "${1:-}" ]]; then
|
|
16
|
-
cd "$1" || { echo "check-close-surfaces: not a directory: $1" >&2; exit 2; }
|
|
17
|
-
ROOTARG=(.)
|
|
18
|
-
fi
|
|
19
|
-
|
|
20
|
-
roster="$(bash "$KIT/bin/close-surfaces.sh" ${ROOTARG[@]+"${ROOTARG[@]}"})"; st=$?
|
|
21
|
-
fail_closed "$st" CLOSE-SURFACES "bin/close-surfaces.sh"
|
|
22
|
-
|
|
23
|
-
WF="${GATE_SDK_WORKFLOW_DIR:-.workflow}"
|
|
24
|
-
FORCED_RE='^forced=[A-Za-z0-9._/-]+\.md[[:space:]]+§[^[:space:]]'
|
|
25
|
-
|
|
26
|
-
errors=()
|
|
27
|
-
declarations=0
|
|
28
|
-
captures=0
|
|
29
|
-
while IFS=$'\t' read -r path mode reclaim owner; do
|
|
30
|
-
[[ -n "$path" ]] || continue
|
|
31
|
-
|
|
32
|
-
# assertion A: no undeclared capture surface
|
|
33
|
-
if [[ "$mode" == "(undeclared)" ]]; then
|
|
34
|
-
captures=$((captures + 1))
|
|
35
|
-
errors+=("$path: capture-tier workflow member with no 'close-surface:' declaration — close would read it only by luck")
|
|
36
|
-
continue
|
|
37
|
-
fi
|
|
38
|
-
declarations=$((declarations + 1))
|
|
39
|
-
|
|
40
|
-
# assertion B: every declaration carries a mode; a forced= citation is well-formed
|
|
41
|
-
if [[ -z "$mode" ]]; then
|
|
42
|
-
errors+=("$owner: 'close-surface: $path' carries no mode — say 'advisory' or 'forced=<owner-path>.md §<section>'")
|
|
43
|
-
elif [[ "$mode" != "advisory" ]]; then
|
|
44
|
-
if [[ ! "$mode" =~ $FORCED_RE ]]; then
|
|
45
|
-
errors+=("$owner: 'close-surface: $path' mode is neither 'advisory' nor a well-formed 'forced=<owner-path>.md §<section>': $mode")
|
|
46
|
-
fi
|
|
47
|
-
fi
|
|
48
|
-
|
|
49
|
-
# assertion C: a capture-tier declaration names its reclaim command
|
|
50
|
-
if [[ "$path" == "$WF"/* ]] && git check-ignore -q -- "$path" 2>/dev/null; then
|
|
51
|
-
captures=$((captures + 1))
|
|
52
|
-
[[ "$reclaim" == "-" || -z "$reclaim" ]] \
|
|
53
|
-
&& errors+=("$owner: 'close-surface: $path' is capture-tier (gitignored) and names no reclaim= command")
|
|
54
|
-
fi
|
|
55
|
-
done <<<"$roster"
|
|
56
|
-
|
|
57
|
-
if [[ ${#errors[@]} -gt 0 ]]; then
|
|
58
|
-
echo "check-close-surfaces: ${#errors[@]} close-surface roster violation(s):"
|
|
59
|
-
printf ' %s\n' "${errors[@]}"
|
|
60
|
-
echo " help: declare the surface with a full-line 'close-surface: <path> <mode> [reclaim=<command>]' directive in the SPEC section that already owns it — never a central list. <mode> is 'advisory' (no forcing function; a skip is a visible judgment) or 'forced=<owner-path>.md §<section>' naming the structural forcing function. A gitignored capture surface names the drain that empties it as the trailing reclaim=<command>."
|
|
61
|
-
exit 1
|
|
62
|
-
fi
|
|
63
|
-
echo "CLOSE-SURFACES: clean ($declarations declared surface(s), $captures capture-tier; every capture member declared, every declaration moded, every capture-tier declaration reclaimed)"
|
|
64
|
-
exit 0
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# graph: couples=TASK-QUEUE.md,.workflow/WORKFLOW-STATE.txt dir=one valve=none tier=precommit
|
|
3
|
-
# install: on-surface
|
|
4
|
-
# spec: lifecycle-kit/SPEC.md §check-stage-entry — prior-stage invocation-stamp ordering + drain-entry queue-empty + audit-trigger signal
|
|
5
|
-
set -uo pipefail
|
|
6
|
-
|
|
7
|
-
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
8
|
-
SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
|
|
9
|
-
# shellcheck source=../../gate-sdk/lib/gate.sh
|
|
10
|
-
source "$SDK/lib/gate.sh"
|
|
11
|
-
# shellcheck source=../lib/stages.sh
|
|
12
|
-
source "$KIT/lib/stages.sh"
|
|
13
|
-
|
|
14
|
-
QUEUE="${1:-$LIFECYCLE_KIT_QUEUE_FILE}"
|
|
15
|
-
STATE="${2:-$LIFECYCLE_KIT_STATE_FILE}"
|
|
16
|
-
|
|
17
|
-
[[ -f "$QUEUE" ]] || { echo "check-stage-entry: file not found: $QUEUE" >&2; exit 2; }
|
|
18
|
-
[[ -f "$STATE" ]] || { echo "check-stage-entry: file not found: $STATE" >&2; exit 2; }
|
|
19
|
-
|
|
20
|
-
hdr="$(lifecycle_header "$QUEUE")"
|
|
21
|
-
if [[ -z "$hdr" ]]; then
|
|
22
|
-
echo "STAGE-ENTRY: no '## Iteration:' header in $QUEUE"
|
|
23
|
-
echo " help: add '## Iteration: <name>' to $QUEUE"
|
|
24
|
-
exit 1
|
|
25
|
-
fi
|
|
26
|
-
|
|
27
|
-
# spec: lifecycle-kit/SPEC.md §check-stage-entry — the two axes, two surfaces: the header names the iteration, the state file's last stamp is the entered stage. An empty cursor is unreachable by construction here — enter-stage hands this gate a temp state file that always carries the candidate stamp, and at pre-commit the entry commit stages that same stamp — so it stays a hard parse error rather than a disarm.
|
|
28
|
-
iter="$(lifecycle_header_iter "$hdr")"
|
|
29
|
-
stage="$(lifecycle_current_stage "$STATE")"
|
|
30
|
-
if [[ -z "$iter" ]]; then
|
|
31
|
-
echo "STAGE-ENTRY: could not parse the iteration from: $hdr"
|
|
32
|
-
echo " help: header must read '## Iteration: <name>'"
|
|
33
|
-
exit 1
|
|
34
|
-
fi
|
|
35
|
-
if [[ -z "$stage" ]]; then
|
|
36
|
-
echo "STAGE-ENTRY: could not parse the entered stage — no stamp line in $STATE"
|
|
37
|
-
echo " help: the entered stage is the last '<iter> <stage> <session-id> <YYYY-MM-DD>' stamp; run the stage skill (it stamps as its first step)"
|
|
38
|
-
exit 1
|
|
39
|
-
fi
|
|
40
|
-
|
|
41
|
-
if ! lifecycle_stage_known "$stage"; then
|
|
42
|
-
echo "STAGE-ENTRY: cursor stage '$stage' is not a lifecycle stage (${LIFECYCLE_KIT_STAGES[*]})"
|
|
43
|
-
echo " help: the last stamp in $STATE must name one of the configured lifecycle stages"
|
|
44
|
-
exit 1
|
|
45
|
-
fi
|
|
46
|
-
pred="${LIFECYCLE_KIT_PREDECESSOR[$stage]:-}"
|
|
47
|
-
|
|
48
|
-
errors=()
|
|
49
|
-
c_fired=0
|
|
50
|
-
|
|
51
|
-
# assertion A: the entered stage's mandatory-predecessor stamp exists for this iteration
|
|
52
|
-
if [[ -n "$pred" ]]; then
|
|
53
|
-
found="$(awk -v it="$iter" -v pr="$pred" '
|
|
54
|
-
/^---[[:space:]]*$/ { f = 1; next }
|
|
55
|
-
f && NF { if ($1 == it && $2 == pr) { print "1"; exit } }
|
|
56
|
-
' "$STATE")"; st=$?
|
|
57
|
-
fail_closed "$st" STAGE-ENTRY "awk predecessor-stamp scan"
|
|
58
|
-
[[ "$found" == "1" ]] || errors+=("entering '$stage' but no '$iter $pred' stamp in $STATE — the mandatory predecessor stage was never invoked (run /$pred, or correct the entry stamp)")
|
|
59
|
-
fi
|
|
60
|
-
|
|
61
|
-
# assertion B: drain-entry queue-empty — [drain-exempt:] exempts at drain entry only; the drain successor's entry backstops with no exemption
|
|
62
|
-
b_mode=""
|
|
63
|
-
if [[ -n "$LIFECYCLE_KIT_DRAIN_STAGE" ]]; then
|
|
64
|
-
if [[ "$stage" == "$LIFECYCLE_KIT_DRAIN_STAGE" ]]; then
|
|
65
|
-
b_mode=drain
|
|
66
|
-
else
|
|
67
|
-
for s in "${!LIFECYCLE_KIT_PREDECESSOR[@]}"; do
|
|
68
|
-
[[ "$s" == "$stage" && "${LIFECYCLE_KIT_PREDECESSOR[$s]}" == "$LIFECYCLE_KIT_DRAIN_STAGE" ]] && b_mode=successor
|
|
69
|
-
done
|
|
70
|
-
fi
|
|
71
|
-
fi
|
|
72
|
-
exempt_detail=""
|
|
73
|
-
if [[ -n "$b_mode" ]]; then
|
|
74
|
-
secs=""
|
|
75
|
-
for s in "${LIFECYCLE_KIT_ACTIVE_SECTIONS[@]}"; do secs+="${secs:+|}$s"; done
|
|
76
|
-
scan="$(awk -v secre="^## ($secs)[[:space:]]*$" -v exempt="$([[ "$b_mode" == drain ]] && echo 1 || echo 0)" '
|
|
77
|
-
$0 ~ secre { inq = 1; next }
|
|
78
|
-
/^## / { inq = 0 }
|
|
79
|
-
!inq || $0 !~ /^- / { next }
|
|
80
|
-
{
|
|
81
|
-
if (match($0, /\[drain-exempt:[[:space:]]*[^]]*\]/)) {
|
|
82
|
-
r = substr($0, RSTART, RLENGTH)
|
|
83
|
-
sub(/^\[drain-exempt:[[:space:]]*/, "", r); sub(/\]$/, "", r)
|
|
84
|
-
gsub(/[[:space:]]+$/, "", r)
|
|
85
|
-
if (r == "") printf "M\t%d\t%s\n", FNR, $0
|
|
86
|
-
else if (exempt) printf "E\t%d\t%s\n", FNR, r
|
|
87
|
-
else printf "L\t%d\t%s\n", FNR, $0
|
|
88
|
-
} else printf "L\t%d\t%s\n", FNR, $0
|
|
89
|
-
}
|
|
90
|
-
' "$QUEUE")"; st=$?
|
|
91
|
-
fail_closed "$st" STAGE-ENTRY "awk active-queue scan"
|
|
92
|
-
leftover=""; malformed=""; n_exempt=0
|
|
93
|
-
while IFS=$'\t' read -r kind ln text; do
|
|
94
|
-
[[ -n "$kind" ]] || continue
|
|
95
|
-
case "$kind" in
|
|
96
|
-
L) leftover+=$'\n'" $ln: $text" ;;
|
|
97
|
-
M) malformed+=$'\n'" $ln: $text" ;;
|
|
98
|
-
E) n_exempt=$((n_exempt + 1)); exempt_detail+="${exempt_detail:+; }$ln: $text" ;;
|
|
99
|
-
esac
|
|
100
|
-
done <<< "$scan"
|
|
101
|
-
if [[ -n "$leftover" ]]; then
|
|
102
|
-
if [[ "$b_mode" == drain ]]; then
|
|
103
|
-
errors+=("entering '$stage' but the active queue is non-empty (the prior stage is not drained):$leftover")
|
|
104
|
-
else
|
|
105
|
-
errors+=("entering '$stage' (the drain successor) but the active queue is non-empty — nothing may remain active past '$LIFECYCLE_KIT_DRAIN_STAGE', [drain-exempt:] included:$leftover")
|
|
106
|
-
fi
|
|
107
|
-
fi
|
|
108
|
-
[[ -z "$malformed" ]] || errors+=("[drain-exempt:] with an empty reason is malformed (the reason is the audit trail):$malformed")
|
|
109
|
-
fi
|
|
110
|
-
|
|
111
|
-
# assertion C: audit-entry with a cross-component amendment signal and no audit stamp demands that stamp or a recorded waiver (lifecycle-kit/SPEC.md §check-stage-entry)
|
|
112
|
-
if [[ -n "$LIFECYCLE_KIT_AUDIT_STAGE" && "$stage" == "$LIFECYCLE_KIT_AUDIT_ENTRY_STAGE" ]]; then
|
|
113
|
-
audit_stamp="$(awk -v it="$iter" -v au="$LIFECYCLE_KIT_AUDIT_STAGE" '
|
|
114
|
-
/^---[[:space:]]*$/ { f = 1; next }
|
|
115
|
-
f && NF { if ($1 == it && $2 == au) { print "1"; exit } }
|
|
116
|
-
' "$STATE")"; st=$?
|
|
117
|
-
fail_closed "$st" STAGE-ENTRY "awk audit-stamp scan"
|
|
118
|
-
|
|
119
|
-
if [[ "$audit_stamp" != "1" ]]; then
|
|
120
|
-
# spec: lifecycle-kit/SPEC.md §check-stage-entry — templates/ paths excluded (a shipped stub is not a live amendment)
|
|
121
|
-
declare -A roster=()
|
|
122
|
-
while IFS= read -r sf; do
|
|
123
|
-
[[ -n "$sf" ]] || continue
|
|
124
|
-
sf="${sf#./}"; roster["${sf%/*}"]=1
|
|
125
|
-
done < <(gate_find "." -name "$LIFECYCLE_KIT_ROSTER_BASENAME" -type f | grep -v '/templates/' || true) # reads-couples-exempt: whole-tree audit-signal scan; re-fire is owned by the state-file couple every stage entry stamps
|
|
126
|
-
|
|
127
|
-
declare -A amend_dirs=()
|
|
128
|
-
amend_files=()
|
|
129
|
-
while IFS= read -r af; do
|
|
130
|
-
[[ -n "$af" ]] || continue
|
|
131
|
-
af="${af#./}"; amend_dirs["${af%/*}"]=1; amend_files+=("$af")
|
|
132
|
-
done < <(gate_find "." -name "$LIFECYCLE_KIT_AMENDMENT_GLOB" -type f | grep -v '/templates/' || true) # reads-couples-exempt: whole-tree audit-signal scan; re-fire is owned by the state-file couple every stage entry stamps
|
|
133
|
-
|
|
134
|
-
contract_alt=""
|
|
135
|
-
for ct in "${LIFECYCLE_KIT_CONTRACT_TOKENS[@]}"; do
|
|
136
|
-
contract_alt+="${contract_alt:+|}${ct//./\\.}"
|
|
137
|
-
done
|
|
138
|
-
|
|
139
|
-
signal_detail=""
|
|
140
|
-
if [[ ${#amend_dirs[@]} -ge 2 ]]; then
|
|
141
|
-
signal_detail="amendments span ${#amend_dirs[@]} component dirs: ${!amend_dirs[*]}"
|
|
142
|
-
else
|
|
143
|
-
for af in ${amend_files[@]+"${amend_files[@]}"}; do
|
|
144
|
-
declare -A comps=(["${af%/*}"]=1)
|
|
145
|
-
while IFS= read -r tok; do
|
|
146
|
-
[[ -n "$tok" ]] || continue
|
|
147
|
-
d="$tok"
|
|
148
|
-
for ct in "${LIFECYCLE_KIT_CONTRACT_TOKENS[@]}"; do
|
|
149
|
-
d="${d%/$ct}"; d="${d%/${ct%/}}"
|
|
150
|
-
done
|
|
151
|
-
[[ -n "${roster[$d]:-}" ]] && comps["$d"]=1
|
|
152
|
-
done < <(grep -oE '[a-z0-9][a-z0-9/_-]*/('"$contract_alt"')' "$af" 2>/dev/null || true)
|
|
153
|
-
if [[ ${#comps[@]} -ge 2 ]]; then
|
|
154
|
-
signal_detail="amendment $af references ${#comps[@]} components: ${!comps[*]}"
|
|
155
|
-
unset comps
|
|
156
|
-
break
|
|
157
|
-
fi
|
|
158
|
-
unset comps
|
|
159
|
-
done
|
|
160
|
-
fi
|
|
161
|
-
|
|
162
|
-
if [[ -n "$signal_detail" ]]; then
|
|
163
|
-
waiver="$(awk -v it="$iter" -v wv="$LIFECYCLE_KIT_WAIVER_TOKEN" '
|
|
164
|
-
/^---[[:space:]]*$/ { f = 1; next }
|
|
165
|
-
f && NF { if ($1 == it && $2 == wv) { print "1"; exit } }
|
|
166
|
-
' "$STATE")"; st=$?
|
|
167
|
-
fail_closed "$st" STAGE-ENTRY "awk waiver scan"
|
|
168
|
-
if [[ "$waiver" != "1" ]]; then
|
|
169
|
-
c_fired=1
|
|
170
|
-
errors+=("entering '$stage' with a cross-component amendment signal and no '$iter $LIFECYCLE_KIT_AUDIT_STAGE' stamp ($signal_detail) — the audit trigger (≥2 components' contracts) was not verified for this iteration")
|
|
171
|
-
fi
|
|
172
|
-
fi
|
|
173
|
-
fi
|
|
174
|
-
fi
|
|
175
|
-
|
|
176
|
-
if [[ ${#errors[@]} -gt 0 ]]; then
|
|
177
|
-
echo "STAGE-ENTRY: ${#errors[@]} prior-stage readiness issue(s) entering '$stage' of '$iter':"
|
|
178
|
-
printf ' %s\n' "${errors[@]}"
|
|
179
|
-
if [[ "$c_fired" == "1" ]]; then
|
|
180
|
-
echo " help: a cross-component $LIFECYCLE_KIT_AUDIT_ENTRY_STAGE entry must run /$LIFECYCLE_KIT_AUDIT_STAGE (stamps '$iter $LIFECYCLE_KIT_AUDIT_STAGE <session> <date>'), or — on an explicit user ruling, never self-issued by the entering session — record a deliberate waiver line '$iter $LIFECYCLE_KIT_WAIVER_TOKEN <session> <date>' in $STATE"
|
|
181
|
-
else
|
|
182
|
-
echo " help: a stage entry re-verifies the prior stage's static exit — invoke the predecessor skill (it stamps $STATE) and drain the active queue before entering $LIFECYCLE_KIT_DRAIN_STAGE"
|
|
183
|
-
fi
|
|
184
|
-
exit 1
|
|
185
|
-
fi
|
|
186
|
-
|
|
187
|
-
if [[ -z "$pred" ]]; then
|
|
188
|
-
detail="'$stage' has no mandatory predecessor"
|
|
189
|
-
elif [[ "$b_mode" == drain ]]; then
|
|
190
|
-
detail="predecessor '$pred' stamped; active queue drained"
|
|
191
|
-
[[ -z "$exempt_detail" ]] || detail+=" (drain-exempt residue — $exempt_detail)"
|
|
192
|
-
elif [[ "$b_mode" == successor ]]; then
|
|
193
|
-
detail="predecessor '$pred' stamped; active queue empty (drain-successor backstop, no exemption)"
|
|
194
|
-
else
|
|
195
|
-
detail="predecessor '$pred' stamped"
|
|
196
|
-
fi
|
|
197
|
-
echo "STAGE-ENTRY: clean ('$iter' / '$stage' — $detail)"
|
|
198
|
-
exit 0
|