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,107 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# graph: couples=kit:checks/*.gate,scripts/gates.list,native/* dir=one valve=none tier=precommit
|
|
3
|
-
# install: never
|
|
4
|
-
# spec: gate-sdk/SPEC.md §check-gate-binary-fresh — whenever a registered member resolving to a .gate descriptor makes the binary load-bearing, the binary was built from the source now in the tree
|
|
5
|
-
#
|
|
6
|
-
# usage: check-gate-binary-fresh.sh [gates-dir] [tree-stamp-file]
|
|
7
|
-
# No second argument: computes the tree-side stamp from the crate's tracked
|
|
8
|
-
# source with git. With one: reads it from that file (hermetic fixtures).
|
|
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
|
-
GATES_DIR="${1:-$(gate_sdk_gates_dir)}"
|
|
16
|
-
STAMP_FILE="${2:-}"
|
|
17
|
-
LIST="$GATES_DIR/gates.list"
|
|
18
|
-
BIN="$(gate_native_bin)"
|
|
19
|
-
CRATE="$(gate_native_crate)"
|
|
20
|
-
REBUILD="bash gate-sdk/bin/build-native.sh"
|
|
21
|
-
|
|
22
|
-
RESOLVE_DIRS=("$GATES_DIR")
|
|
23
|
-
while IFS= read -r k; do RESOLVE_DIRS+=("$k/checks"); done < <(gate_kit_roots_rel)
|
|
24
|
-
|
|
25
|
-
# spec: gate-sdk/SPEC.md §check-gate-binary-fresh — the descriptor set is the trigger, derived over the resolve dirs as check-gate-substrate-parity assertion B already derives it
|
|
26
|
-
mapfile -t DESCRIPTORS < <(
|
|
27
|
-
for d in "${RESOLVE_DIRS[@]}"; do
|
|
28
|
-
[[ -d "$d" ]] || continue
|
|
29
|
-
for f in "$d"/*.gate; do
|
|
30
|
-
[[ -f "$f" ]] || continue
|
|
31
|
-
b="${f##*/}"; printf '%s\n' "${b%.gate}"
|
|
32
|
-
done
|
|
33
|
-
done | sort -u
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
# spec: gate-sdk/SPEC.md §check-gate-binary-fresh — a descriptor on disk is a declaration; a
|
|
37
|
-
# registered member resolving to one is a dispatch, and only a dispatch makes the binary
|
|
38
|
-
# load-bearing. The live registry is therefore an input, and an absent one is "cannot verify".
|
|
39
|
-
[[ -f "$LIST" ]] || {
|
|
40
|
-
echo "check-gate-binary-fresh: no gate registry at $LIST — the live member set is what decides whether the binary is load-bearing, so the check could not run; treating as failure (not clean)" >&2
|
|
41
|
-
echo " help: pass the gates dir carrying gates.list as the first argument, or set GATE_SDK_GATES_DIR." >&2
|
|
42
|
-
exit 2
|
|
43
|
-
}
|
|
44
|
-
mapfile -t DISPATCHING < <(
|
|
45
|
-
while IFS= read -r m; do
|
|
46
|
-
[[ -n "$m" ]] || continue
|
|
47
|
-
src="$(gate_resolve "$m" "${RESOLVE_DIRS[@]}")" || continue
|
|
48
|
-
[[ "$src" == *.gate ]] && printf '%s\n' "$m"
|
|
49
|
-
done < <(gates_list_members "$LIST")
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
# spec: gate-sdk/SPEC.md §check-gate-binary-fresh — nothing dispatching is a clean report, not a
|
|
53
|
-
# skipped assertion: no gate dispatches to the binary, so nothing can run stale. Both counts are
|
|
54
|
-
# named, so a reader can tell "no descriptors" from "descriptors nothing dispatches to".
|
|
55
|
-
# Deliberately *not* the split-halves shape check-gate-substrate-parity assertion B uses, for
|
|
56
|
-
# the reason that section states.
|
|
57
|
-
if [[ ${#DISPATCHING[@]} -eq 0 ]]; then
|
|
58
|
-
echo "GATE-BINARY-FRESH: clean (${#DESCRIPTORS[@]} .gate descriptor(s) across ${#RESOLVE_DIRS[@]} resolve dir(s), 0 dispatched to by a live member of $LIST, so nothing dispatches to $BIN and no build can be stale; crate $CRATE unread)"
|
|
59
|
-
exit 0
|
|
60
|
-
fi
|
|
61
|
-
|
|
62
|
-
# spec: gate-sdk/SPEC.md §Fail-closed contract — with the binary load-bearing, an absent
|
|
63
|
-
# or unreadable one is "cannot verify", which must not share an exit code with "verified fresh"
|
|
64
|
-
if [[ ! -x "$BIN" ]]; then
|
|
65
|
-
echo "check-gate-binary-fresh: $BIN is absent or not executable, but ${#DISPATCHING[@]} registered member(s) dispatch to it — the check could not run; treating as failure (not clean)" >&2
|
|
66
|
-
echo " help: build it — $REBUILD" >&2
|
|
67
|
-
exit 2
|
|
68
|
-
fi
|
|
69
|
-
|
|
70
|
-
baked="$("$BIN" --source-stamp 2>/dev/null)"; st=$?
|
|
71
|
-
fail_closed "$st" check-gate-binary-fresh "$BIN --source-stamp"
|
|
72
|
-
baked="${baked%%$'\n'*}"
|
|
73
|
-
[[ -n "$baked" ]] || {
|
|
74
|
-
echo "check-gate-binary-fresh: $BIN --source-stamp reported no stamp — the check could not run; treating as failure (not clean)" >&2
|
|
75
|
-
echo " help: rebuild it — $REBUILD" >&2
|
|
76
|
-
exit 2
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if [[ -n "$STAMP_FILE" ]]; then
|
|
80
|
-
[[ -r "$STAMP_FILE" ]] || { echo "check-gate-binary-fresh: tree-stamp file not readable: $STAMP_FILE" >&2; exit 2; }
|
|
81
|
-
tree="$(cat -- "$STAMP_FILE")"; st=$?
|
|
82
|
-
fail_closed "$st" check-gate-binary-fresh cat
|
|
83
|
-
tree="${tree%%$'\n'*}"
|
|
84
|
-
source_desc="$STAMP_FILE"
|
|
85
|
-
else
|
|
86
|
-
tree="$(gate_native_source_stamp)" || {
|
|
87
|
-
echo "check-gate-binary-fresh: git could not hash the tracked source under $CRATE — the check could not run; treating as failure (not clean)" >&2
|
|
88
|
-
echo " help: the stamp is git's content identity for the crate's tracked source set, so the crate root must be a tracked directory inside a git worktree." >&2
|
|
89
|
-
exit 2
|
|
90
|
-
}
|
|
91
|
-
source_desc="$CRATE"
|
|
92
|
-
fi
|
|
93
|
-
[[ -n "$tree" ]] || { echo "check-gate-binary-fresh: no tree-side stamp from $source_desc" >&2; exit 2; }
|
|
94
|
-
|
|
95
|
-
if [[ "$baked" != "$tree" ]]; then
|
|
96
|
-
echo "check-gate-binary-fresh: the gate binary was not built from the source now in the tree:"
|
|
97
|
-
echo " $BIN reports source stamp $baked"
|
|
98
|
-
echo " $source_desc hashes to $tree"
|
|
99
|
-
echo " ${#DISPATCHING[@]} descriptor(s) dispatch to that binary: ${DISPATCHING[*]}"
|
|
100
|
-
echo " help: rebuild it — $REBUILD"
|
|
101
|
-
echo " Until then the descriptor-named gate(s) above run the old implementation"
|
|
102
|
-
echo " and pass on code that is not what is committed."
|
|
103
|
-
exit 1
|
|
104
|
-
fi
|
|
105
|
-
|
|
106
|
-
echo "GATE-BINARY-FRESH: clean (${#DESCRIPTORS[@]} .gate descriptor(s) across ${#RESOLVE_DIRS[@]} resolve dir(s), ${#DISPATCHING[@]} dispatched to by a live member of $LIST; $BIN built from the source now in $source_desc, stamp $baked)"
|
|
107
|
-
exit 0
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# graph: couples=scripts/*.sh,kit:*.sh,TASK-QUEUE.md dir=one valve=none tier=precommit
|
|
3
|
-
# install: zero-config
|
|
4
|
-
# spec: gate-sdk/SPEC.md §check-gate-exemption-tasks — every exception-list element carries a live until: task or permanent: reason
|
|
5
|
-
#
|
|
6
|
-
# usage: check-gate-exemption-tasks.sh [queue-file [dir...]]
|
|
7
|
-
# defaults: $GATE_SDK_QUEUE_FILE (TASK-QUEUE.md); gates dir + each kit's checks/
|
|
8
|
-
set -uo pipefail
|
|
9
|
-
|
|
10
|
-
SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
11
|
-
# shellcheck source=../lib/gate.sh
|
|
12
|
-
source "$SDK/lib/gate.sh"
|
|
13
|
-
|
|
14
|
-
QUEUE="${1:-${GATE_SDK_QUEUE_FILE:-TASK-QUEUE.md}}"
|
|
15
|
-
if [[ $# -gt 1 ]]; then
|
|
16
|
-
DIRS=("${@:2}")
|
|
17
|
-
else
|
|
18
|
-
mapfile -t DIRS < <(gate_check_dirs)
|
|
19
|
-
fi
|
|
20
|
-
|
|
21
|
-
declare -A IS_LIVE=()
|
|
22
|
-
while IFS= read -r slug; do
|
|
23
|
-
[[ -n "$slug" ]] && IS_LIVE["$slug"]=1
|
|
24
|
-
done < <(awk '
|
|
25
|
-
/^## New Features/ { s=1; next }
|
|
26
|
-
/^## Technical Debt/ { s=1; next }
|
|
27
|
-
/^## Deferred/ { s=1; next }
|
|
28
|
-
/^## Done/ { s=0 }
|
|
29
|
-
/^## Lessons Learned/{ s=0 }
|
|
30
|
-
s && $0 ~ /^[[:space:]]*-[[:space:]]+\*\*[a-z0-9][a-z0-9-]*\*\*/ {
|
|
31
|
-
match($0, /\*\*[a-z0-9][a-z0-9-]*\*\*/)
|
|
32
|
-
print substr($0, RSTART+2, RLENGTH-4)
|
|
33
|
-
}
|
|
34
|
-
' "$QUEUE" 2>/dev/null)
|
|
35
|
-
|
|
36
|
-
parse_elements() {
|
|
37
|
-
awk -v hl="$2" '
|
|
38
|
-
function strip(x){ t=x; gsub(/#.*/,"",t); gsub(/"[^"]*"/,"",t); gsub(/\047[^\047]*\047/,"",t); return t }
|
|
39
|
-
NR<=hl { next }
|
|
40
|
-
asgn==0 && /^[[:space:]]*[A-Za-z_][A-Za-z0-9_]*=\(/ {
|
|
41
|
-
asgn=NR
|
|
42
|
-
open=$0; sub(/^[^(]*\(/,"",open); sub(/#.*/,"",open); gsub(/[)[:space:]]/,"",open)
|
|
43
|
-
if (length(open)>0) print NR "\topen-line\t"
|
|
44
|
-
}
|
|
45
|
-
asgn==0 { next }
|
|
46
|
-
{
|
|
47
|
-
if (NR > asgn) {
|
|
48
|
-
noc=$0; sub(/#.*/,"",noc)
|
|
49
|
-
if (noc ~ /[^[:space:]()]/) {
|
|
50
|
-
type="none"; payload=""
|
|
51
|
-
if (match($0, /#[[:space:]]*until:[[:space:]]*[a-z0-9][a-z0-9-]*/)) {
|
|
52
|
-
type="until"; payload=substr($0, RSTART, RLENGTH)
|
|
53
|
-
sub(/.*until:[[:space:]]*/, "", payload)
|
|
54
|
-
} else if ($0 ~ /#[[:space:]]*permanent:/) {
|
|
55
|
-
type="permanent"
|
|
56
|
-
}
|
|
57
|
-
print NR "\t" type "\t" payload
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
s2=strip($0); o=gsub(/\(/,"x",s2); c=gsub(/\)/,"x",s2)
|
|
61
|
-
if (o>0) started=1
|
|
62
|
-
bal += o - c
|
|
63
|
-
if (started && bal<=0) exit
|
|
64
|
-
}
|
|
65
|
-
' "$1"
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
errors=()
|
|
69
|
-
arrays=0
|
|
70
|
-
scan_files=()
|
|
71
|
-
shopt -s nullglob
|
|
72
|
-
for d in "${DIRS[@]}"; do
|
|
73
|
-
# spec: gate-sdk/SPEC.md §Meta-gate conservation for the binary substrate
|
|
74
|
-
scan_files+=("$d"/*.sh "$d"/*.gate)
|
|
75
|
-
done
|
|
76
|
-
shopt -u nullglob
|
|
77
|
-
|
|
78
|
-
if [[ ${#scan_files[@]} -gt 0 ]]; then
|
|
79
|
-
while IFS= read -r hdr; do
|
|
80
|
-
[[ -z "$hdr" ]] && continue
|
|
81
|
-
file="${hdr%%:*}"; rest="${hdr#*:}"; lineno="${rest%%:*}"
|
|
82
|
-
arrays=$(( arrays + 1 ))
|
|
83
|
-
while IFS=$'\t' read -r el etype slug; do
|
|
84
|
-
[[ -z "$el" ]] && continue
|
|
85
|
-
case "$etype" in
|
|
86
|
-
permanent) : ;;
|
|
87
|
-
until)
|
|
88
|
-
if [[ -z "${IS_LIVE[$slug]:-}" ]]; then
|
|
89
|
-
errors+=("$file:$el — # until: $slug does not resolve to a live task (moved to Done, or missing from $QUEUE)")
|
|
90
|
-
fi ;;
|
|
91
|
-
open-line)
|
|
92
|
-
errors+=("$file:$el — exemption element(s) on the array's opening '=(' line cannot carry a per-element disposition; put each element on its own line with a # until:/# permanent: comment") ;;
|
|
93
|
-
*) errors+=("$file:$el — exemption element carries neither # until: <slug> nor # permanent: <reason>") ;;
|
|
94
|
-
esac
|
|
95
|
-
done < <(parse_elements "$file" "$lineno")
|
|
96
|
-
done < <(grep -nE '^[[:space:]]*# exception-list:' "${scan_files[@]}" /dev/null 2>/dev/null)
|
|
97
|
-
fi
|
|
98
|
-
|
|
99
|
-
if [[ ${#errors[@]} -gt 0 ]]; then
|
|
100
|
-
echo "GATE-EXEMPTION-TASKS: ${#errors[@]} violation(s):"
|
|
101
|
-
printf ' %s\n' "${errors[@]}"
|
|
102
|
-
echo " help: annotate each exemption element '# until: <live-slug>' or '# permanent: <reason>'"
|
|
103
|
-
exit 1
|
|
104
|
-
fi
|
|
105
|
-
echo "GATE-EXEMPTION-TASKS: clean ($arrays exemption array(s), ${#IS_LIVE[@]} live task slug(s); every element declares until-with-live-task or permanent-with-reason)"
|
|
106
|
-
exit 0
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# graph: couples=scripts/*.sh,kit:*.sh dir=one valve=none tier=precommit
|
|
3
|
-
# install: zero-config
|
|
4
|
-
# spec: gate-sdk/SPEC.md §check-gate-fail-closed — every awk/jq capture in the gate family handles subprocess exit status
|
|
5
|
-
#
|
|
6
|
-
# usage: check-gate-fail-closed.sh [dir...]
|
|
7
|
-
# Scans check-*.sh under each given dir. Default: the consumer gates dir plus
|
|
8
|
-
# each vendored kit's checks/.
|
|
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
|
-
if [[ $# -gt 0 ]]; then
|
|
16
|
-
DIRS=("$@")
|
|
17
|
-
else
|
|
18
|
-
mapfile -t DIRS < <(gate_check_dirs)
|
|
19
|
-
fi
|
|
20
|
-
gates=()
|
|
21
|
-
shopt -s nullglob
|
|
22
|
-
for d in "${DIRS[@]}"; do
|
|
23
|
-
gates+=("$d"/check-*.sh)
|
|
24
|
-
done
|
|
25
|
-
shopt -u nullglob
|
|
26
|
-
[[ ${#gates[@]} -gt 0 ]] || { echo "check-gate-fail-closed: no check-*.sh gates found under: ${DIRS[*]}" >&2; exit 2; }
|
|
27
|
-
|
|
28
|
-
out="$(awk '
|
|
29
|
-
BEGIN { Q = sprintf("%c", 39) }
|
|
30
|
-
function isparser(line) { return (line ~ /(^|[^A-Za-z])(awk|jq)[[:space:]]/) }
|
|
31
|
-
function sat(line) {
|
|
32
|
-
if (line ~ /fail_closed/) return 1
|
|
33
|
-
if (line ~ /=\$\?/) return 1
|
|
34
|
-
if (line ~ /\|\|[[:space:]]*\{/) return 1
|
|
35
|
-
if (line ~ /fail-closed-exempt/) return 1
|
|
36
|
-
return 0
|
|
37
|
-
}
|
|
38
|
-
function nquote(line, n, t) { t = line; n = gsub(Q, "", t); return n }
|
|
39
|
-
function close_if(line) {
|
|
40
|
-
if (line ~ /\)"/ && qc % 2 == 0) {
|
|
41
|
-
inblk = 0
|
|
42
|
-
if (hasparser && !heredoc && !satisfied)
|
|
43
|
-
printf " %s:%d: awk/jq capture branches on output without a fail-closed status check:\n %s\n", FILENAME, blkstart, opentext
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
function scan(line) {
|
|
47
|
-
qc += nquote(line)
|
|
48
|
-
if (isparser(line)) hasparser = 1
|
|
49
|
-
if (sat(line)) satisfied = 1
|
|
50
|
-
if (line ~ /<<</) heredoc = 1
|
|
51
|
-
close_if(line)
|
|
52
|
-
}
|
|
53
|
-
FNR == 1 { inblk = 0; pend = 0; qc = 0 }
|
|
54
|
-
!inblk && /^[[:space:]]*#/ { if ($0 ~ /fail-closed-exempt/) pend = 1; next }
|
|
55
|
-
!inblk && /^[[:space:]]*$/ { pend = 0; next }
|
|
56
|
-
!inblk && /[A-Za-z_][A-Za-z0-9_]*="\$\(/ && $0 !~ /="\$\(\(/ {
|
|
57
|
-
inblk = 1; blkstart = FNR; opentext = $0
|
|
58
|
-
hasparser = 0; satisfied = 0; heredoc = 0; qc = 0
|
|
59
|
-
if (pend) satisfied = 1
|
|
60
|
-
pend = 0
|
|
61
|
-
scan($0)
|
|
62
|
-
next
|
|
63
|
-
}
|
|
64
|
-
inblk { scan($0); next }
|
|
65
|
-
{ pend = 0 }
|
|
66
|
-
' "${gates[@]}")"; st=$?
|
|
67
|
-
fail_closed "$st" check-gate-fail-closed awk
|
|
68
|
-
|
|
69
|
-
if [[ -n "$out" ]]; then
|
|
70
|
-
echo "check-gate-fail-closed: gate(s) capture a parser's output but branch on"
|
|
71
|
-
echo "emptiness without checking the subprocess status (gate-sdk/SPEC.md"
|
|
72
|
-
echo "§Fail-closed contract — a crash would false-green as 'clean'):"
|
|
73
|
-
echo ""
|
|
74
|
-
echo "$out"
|
|
75
|
-
echo ""
|
|
76
|
-
echo " help: capture the status and route it through the shared helper —"
|
|
77
|
-
echo " out=\"\$(awk '…' \"\$FILE\")\"; st=\$?"
|
|
78
|
-
echo " fail_closed \"\$st\" check-<name> awk"
|
|
79
|
-
echo " (source gate-sdk/lib/gate.sh near the top), or annotate a"
|
|
80
|
-
echo " genuinely-safe capture with '# fail-closed-exempt: <reason>'."
|
|
81
|
-
exit 1
|
|
82
|
-
fi
|
|
83
|
-
|
|
84
|
-
echo "GATE-FAIL-CLOSED: clean (every awk/jq capture in the gate family handles subprocess status)"
|
|
85
|
-
exit 0
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# graph: couples=scripts/gates.list,scripts/*.sh,scripts/gate-tests/*,kit:*.sh dir=one valve=none tier=precommit
|
|
3
|
-
# install: zero-config
|
|
4
|
-
# spec: gate-sdk/SPEC.md §check-gate-fixture-coverage — every gates.list member has a fixture pair or a no-fixture opt-out
|
|
5
|
-
#
|
|
6
|
-
# usage: check-gate-fixture-coverage.sh [gates-dir [tests-dir...]]
|
|
7
|
-
# default tests dirs: <gates-dir>/gate-tests + each kit's gate-tests/
|
|
8
|
-
set -uo pipefail
|
|
9
|
-
|
|
10
|
-
SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
11
|
-
# shellcheck source=../lib/gate.sh
|
|
12
|
-
source "$SDK/lib/gate.sh"
|
|
13
|
-
|
|
14
|
-
DIR="${1:-$(gate_sdk_gates_dir)}"
|
|
15
|
-
if [[ $# -gt 1 ]]; then
|
|
16
|
-
TESTS_DIRS=("${@:2}")
|
|
17
|
-
else
|
|
18
|
-
TESTS_DIRS=("${GATE_SDK_TESTS_DIR:-$DIR/gate-tests}")
|
|
19
|
-
while IFS= read -r k; do TESTS_DIRS+=("$k/gate-tests"); done < <(gate_kit_roots)
|
|
20
|
-
fi
|
|
21
|
-
RESOLVE_DIRS=("$DIR")
|
|
22
|
-
while IFS= read -r k; do RESOLVE_DIRS+=("$k/checks"); done < <(gate_kit_roots)
|
|
23
|
-
LIST="$DIR/gates.list"
|
|
24
|
-
[[ -f "$LIST" ]] || { echo "check-gate-fixture-coverage: no registry at $LIST" >&2; exit 2; }
|
|
25
|
-
|
|
26
|
-
members="$(gates_list_members "$LIST")"
|
|
27
|
-
[[ -n "$members" ]] || { echo "check-gate-fixture-coverage: no members parsed from $LIST" >&2; exit 2; }
|
|
28
|
-
|
|
29
|
-
fixture_dir_for() {
|
|
30
|
-
local m="$1" t
|
|
31
|
-
for t in "${TESTS_DIRS[@]}"; do
|
|
32
|
-
[[ -d "$t/$m" ]] && { printf '%s\n' "$t/$m"; return 0; }
|
|
33
|
-
done
|
|
34
|
-
return 1
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
neither=()
|
|
38
|
-
halfpair=()
|
|
39
|
-
fixtured=0
|
|
40
|
-
optout=0
|
|
41
|
-
total=0
|
|
42
|
-
while IFS= read -r m; do
|
|
43
|
-
[[ -n "$m" ]] || continue
|
|
44
|
-
total=$((total + 1))
|
|
45
|
-
if gd="$(fixture_dir_for "$m")"; then
|
|
46
|
-
if [[ -d "$gd/good" && -d "$gd/bad" ]]; then
|
|
47
|
-
fixtured=$((fixtured + 1))
|
|
48
|
-
elif [[ -d "$gd/good" ]]; then
|
|
49
|
-
halfpair+=("$m ($gd/ has good/ but no bad/)")
|
|
50
|
-
else
|
|
51
|
-
halfpair+=("$m ($gd/ has bad/ but no good/)")
|
|
52
|
-
fi
|
|
53
|
-
continue
|
|
54
|
-
fi
|
|
55
|
-
if ! src="$(gate_resolve "$m" "${RESOLVE_DIRS[@]}")"; then
|
|
56
|
-
neither+=("$m (no fixture pair, and source resolves in none of: ${RESOLVE_DIRS[*]})")
|
|
57
|
-
continue
|
|
58
|
-
fi
|
|
59
|
-
if grep -Eq '^# no-fixture:' "$src"; then
|
|
60
|
-
optout=$((optout + 1))
|
|
61
|
-
else
|
|
62
|
-
neither+=("$m (no fixture pair under: ${TESTS_DIRS[*]}; no '# no-fixture:' opt-out)")
|
|
63
|
-
fi
|
|
64
|
-
done <<< "$members"
|
|
65
|
-
|
|
66
|
-
if [[ ${#neither[@]} -gt 0 || ${#halfpair[@]} -gt 0 ]]; then
|
|
67
|
-
if [[ ${#neither[@]} -gt 0 ]]; then
|
|
68
|
-
echo "check-gate-fixture-coverage: gates.list member(s) with neither a fixture pair"
|
|
69
|
-
echo "nor a '# no-fixture:' opt-out (gate-sdk/SPEC.md §Fixture-pair discipline — a"
|
|
70
|
-
echo "gate ships a good/bad fixture pair on write):"
|
|
71
|
-
echo ""
|
|
72
|
-
for m in "${neither[@]}"; do echo " $m"; done
|
|
73
|
-
echo ""
|
|
74
|
-
echo " help: add <tests-dir>/<gate>/{good,bad}/ (run by run-gate-tests.sh), OR"
|
|
75
|
-
echo " a '# no-fixture: <why>' header line for a whole-tree scanner with"
|
|
76
|
-
echo " no synthetic-dir mode (stopgap on a fixture-capable gate -> file"
|
|
77
|
-
echo " a fixture-backfill debt task and list it there)."
|
|
78
|
-
fi
|
|
79
|
-
if [[ ${#halfpair[@]} -gt 0 ]]; then
|
|
80
|
-
[[ ${#neither[@]} -gt 0 ]] && echo ""
|
|
81
|
-
echo "check-gate-fixture-coverage: gates.list member(s) with a half-built fixture dir"
|
|
82
|
-
echo "(a pair needs both good/ and bad/):"
|
|
83
|
-
echo ""
|
|
84
|
-
for m in "${halfpair[@]}"; do echo " $m"; done
|
|
85
|
-
echo ""
|
|
86
|
-
echo " help: add the missing half under <tests-dir>/<gate>/, or remove"
|
|
87
|
-
echo " the partial dir and add a '# no-fixture:' opt-out instead."
|
|
88
|
-
fi
|
|
89
|
-
exit 1
|
|
90
|
-
fi
|
|
91
|
-
|
|
92
|
-
echo "GATE-FIXTURE-COVERAGE: clean ($total members: $fixtured fixtured, $optout opted-out)"
|
|
93
|
-
exit 0
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# graph: couples=scripts/gates.list,scripts/*.sh,kit:*.sh dir=one valve=none tier=precommit
|
|
3
|
-
# install: zero-config
|
|
4
|
-
# spec: gate-sdk/SPEC.md §check-gate-output — every gates.list member emits a machine-keyable success line and a help: remedy
|
|
5
|
-
#
|
|
6
|
-
# usage: check-gate-output.sh [gates-dir]
|
|
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
|
-
DIR="${1:-$(gate_sdk_gates_dir)}"
|
|
14
|
-
LIST="$DIR/gates.list"
|
|
15
|
-
[[ -f "$LIST" ]] || { echo "check-gate-output: no registry at $LIST" >&2; exit 2; }
|
|
16
|
-
|
|
17
|
-
members="$(gates_list_members "$LIST")"
|
|
18
|
-
[[ -n "$members" ]] || { echo "check-gate-output: no members parsed from $LIST" >&2; exit 2; }
|
|
19
|
-
|
|
20
|
-
RESOLVE_DIRS=("$DIR")
|
|
21
|
-
while IFS= read -r k; do RESOLVE_DIRS+=("$k/checks"); done < <(gate_kit_roots)
|
|
22
|
-
|
|
23
|
-
CRATE="$(gate_native_crate)"
|
|
24
|
-
# spec: gate-sdk/SPEC.md §check-gate-output — crate presence is the manifest, never the directory: anything that writes a build artifact under the crate path creates the directory, so a consumer holding only the binary would otherwise be read as carrying the crate
|
|
25
|
-
CRATE_MANIFEST="$CRATE/Cargo.toml"
|
|
26
|
-
|
|
27
|
-
missing=()
|
|
28
|
-
no_help=()
|
|
29
|
-
out_of_reach=()
|
|
30
|
-
total=0
|
|
31
|
-
runtime=0
|
|
32
|
-
while IFS= read -r m; do
|
|
33
|
-
[[ -n "$m" ]] || continue
|
|
34
|
-
total=$((total + 1))
|
|
35
|
-
if ! src="$(gate_resolve "$m" "${RESOLVE_DIRS[@]}")"; then
|
|
36
|
-
missing+=("$m (source resolves in none of: ${RESOLVE_DIRS[*]})")
|
|
37
|
-
continue
|
|
38
|
-
fi
|
|
39
|
-
# spec: gate-sdk/SPEC.md §Output contract — the source-grep is the oracle only
|
|
40
|
-
# for a member no fixture case can reach; every fixtured member is asserted on
|
|
41
|
-
# its real output by the runner (§run-gate-tests), which no substrate escapes
|
|
42
|
-
if ! grep -q '^# no-fixture:' "$src"; then
|
|
43
|
-
runtime=$((runtime + 1))
|
|
44
|
-
continue
|
|
45
|
-
fi
|
|
46
|
-
# spec: gate-sdk/SPEC.md §check-gate-output — corpus and emitter alternation both
|
|
47
|
-
# follow the declaration's substrate: a descriptor cannot hold the strings, and the
|
|
48
|
-
# shell alternation matches nothing in a Rust module, so a fixed one passes vacuously
|
|
49
|
-
corpus="$src"
|
|
50
|
-
emit='(echo|printf)'
|
|
51
|
-
if [[ "$src" == *.gate ]]; then
|
|
52
|
-
corpus="$(gate_native_module "$m")"
|
|
53
|
-
emit='(println!|eprintln!|print!|eprint!|writeln!|write!)'
|
|
54
|
-
if [[ ! -f "$CRATE_MANIFEST" ]]; then
|
|
55
|
-
out_of_reach+=("$m")
|
|
56
|
-
continue
|
|
57
|
-
fi
|
|
58
|
-
if [[ ! -f "$corpus" ]]; then
|
|
59
|
-
missing+=("$m (dispatches to a subcommand with no module at $corpus)")
|
|
60
|
-
continue
|
|
61
|
-
fi
|
|
62
|
-
fi
|
|
63
|
-
if ! grep -Eq "$emit.*: clean" "$corpus"; then
|
|
64
|
-
missing+=("$m (no '<NAME>: clean (…)' success line)")
|
|
65
|
-
fi
|
|
66
|
-
if ! grep -Eq "$emit.*help:" "$corpus"; then
|
|
67
|
-
no_help+=("$m (no 'help:' remedy line on the failure path)")
|
|
68
|
-
fi
|
|
69
|
-
done <<< "$members"
|
|
70
|
-
|
|
71
|
-
if [[ ${#missing[@]} -gt 0 || ${#no_help[@]} -gt 0 ]]; then
|
|
72
|
-
if [[ ${#missing[@]} -gt 0 ]]; then
|
|
73
|
-
echo "check-gate-output: gates.list member(s) with no machine-keyable success line"
|
|
74
|
-
echo "(gate-sdk/SPEC.md §Output contract — success is '^<NAME>: clean (<what>)'):"
|
|
75
|
-
echo ""
|
|
76
|
-
for m in "${missing[@]}"; do echo " $m"; done
|
|
77
|
-
echo ""
|
|
78
|
-
echo " help: emit exactly one success line on the exit-0 path —"
|
|
79
|
-
echo " echo \"<NAME>: clean (<what was checked>)\""
|
|
80
|
-
echo " where <NAME> is the gate's upper-token id (e.g. KIT-README)."
|
|
81
|
-
fi
|
|
82
|
-
if [[ ${#no_help[@]} -gt 0 ]]; then
|
|
83
|
-
[[ ${#missing[@]} -gt 0 ]] && echo ""
|
|
84
|
-
echo "check-gate-output: gates.list member(s) with no 'help:' remedy line"
|
|
85
|
-
echo "(gate-sdk/SPEC.md §Output contract — every failure path names the fix):"
|
|
86
|
-
echo ""
|
|
87
|
-
for m in "${no_help[@]}"; do echo " $m"; done
|
|
88
|
-
echo ""
|
|
89
|
-
echo " help: add a remedy line on the failure path naming the concrete"
|
|
90
|
-
echo " action — echo \" help: <do this to fix it>\" (one per failure class)."
|
|
91
|
-
fi
|
|
92
|
-
exit 1
|
|
93
|
-
fi
|
|
94
|
-
|
|
95
|
-
# spec: gate-sdk/SPEC.md §check-gate-output — an out-of-reach member is named in the
|
|
96
|
-
# success line, never silently dropped from the accounting: a count that quietly shrank
|
|
97
|
-
# is indistinguishable from a member that stopped being checked
|
|
98
|
-
declared=""
|
|
99
|
-
if [[ ${#out_of_reach[@]} -gt 0 ]]; then
|
|
100
|
-
declared=", ${#out_of_reach[@]} declared out of reach with no crate at $CRATE_MANIFEST — ${out_of_reach[*]}"
|
|
101
|
-
fi
|
|
102
|
-
echo "GATE-OUTPUT: clean ($total gates.list member(s): $((total - runtime - ${#out_of_reach[@]})) source-grepped as no-fixture members, $runtime asserted on real output by run-gate-tests$declared)"
|
|
103
|
-
exit 0
|