checkwright 0.21.0 → 0.23.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 +1013 -50
- package/lib/common/digest.sh +18 -0
- package/lib/common/lock.sh +40 -0
- package/lib/common/profile.sh +33 -0
- package/lib/common/recipe.sh +56 -43
- package/lib/diff.sh +64 -0
- package/lib/doctor.sh +81 -7
- package/lib/init.sh +167 -52
- package/lib/uninstall.sh +212 -0
- package/lib/update.sh +34 -0
- package/package.json +2 -2
- package/payload/artifact/targets.list +30 -0
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -0
- package/payload/canon-kit/README.md +2 -0
- package/payload/canon-kit/SPEC.md +666 -59
- package/payload/canon-kit/checks/check-amendment-queue.sh +1 -0
- package/payload/canon-kit/checks/check-comment-tier.gate +3 -0
- package/payload/canon-kit/checks/check-deprecation-task.gate +3 -0
- package/payload/canon-kit/checks/check-docs-cmd.gate +3 -0
- package/payload/canon-kit/checks/check-docs-link-convention.sh +12 -4
- package/payload/canon-kit/checks/check-install-claim.gate +3 -0
- package/payload/canon-kit/checks/check-knob-citation.gate +3 -0
- package/payload/canon-kit/checks/check-knob-default-coupling.sh +1 -0
- package/payload/canon-kit/checks/check-manifest-count.gate +3 -0
- package/payload/canon-kit/checks/check-manifest-temporal.gate +3 -0
- package/payload/canon-kit/checks/check-md-refs.gate +3 -0
- package/payload/canon-kit/checks/check-measured-claim.gate +3 -0
- package/payload/canon-kit/checks/check-payload-claim.gate +3 -0
- package/payload/canon-kit/checks/check-prose-enum.gate +3 -0
- package/payload/canon-kit/checks/check-prose-tells.sh +1 -0
- package/payload/canon-kit/checks/check-spec-derivable-section.gate +3 -0
- package/payload/canon-kit/checks/check-spec-dod-singleton.gate +3 -0
- package/payload/canon-kit/checks/check-spec-embedded-source.sh +1 -0
- package/payload/canon-kit/checks/check-spec-fence-balance.gate +3 -0
- package/payload/canon-kit/checks/check-spec-pointer.gate +3 -0
- package/payload/canon-kit/checks/check-surface-duplication.sh +1 -0
- package/payload/canon-kit/checks/check-todo-task-liveness.gate +3 -0
- package/payload/canon-kit/checks/check-tracking-claim.gate +3 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/.workflow/fixture-state.txt +4 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.gate +4 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.rs +5 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +4 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/templates/bad-tmpl.sh +4 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/.workflow/fixture-state.txt +3 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/expect.txt +1 -1
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.gate +4 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.rs +5 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/templates/good-tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +29 -5
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/.workflow/fixture-state.txt +3 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.gate +2 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.rs +4 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +6 -5
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/.workflow/fixture-state.txt +3 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -1
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.gate +2 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.rs +4 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +6 -5
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +4 -3
- package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/OUTSIDE.md +4 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/docs/index.md +3 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/good/OUTSIDE.md +4 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/good/docs/methodology.md +8 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +94 -0
- package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +2 -2
- package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +4 -0
- package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +32 -8
- package/payload/canon-kit/gate-tests/check-md-refs.test.sh +61 -9
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/SPEC.md +12 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.sh +6 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/good/SPEC.md +23 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.sh +6 -0
- package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +90 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/README.md +15 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/expect.txt +2 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/install.md +19 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/posts/note.md +6 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.sh +8 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/payload-claims.sh +7 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/README.md +15 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/expect.txt +2 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/install.md +20 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/posts/note.md +6 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.sh +8 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/payload-claims.sh +7 -0
- package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +27 -4
- package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +21 -7
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/.workflow/fixture-state.txt +2 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.gate +2 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.rs +4 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +4 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/widget.sh +1 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/.workflow/fixture-state.txt +2 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/expect.txt +1 -1
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.gate +2 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.rs +4 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/widget.sh +1 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/.workflow/fixture-state.txt +3 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.gate +2 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.rs +4 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/.workflow/fixture-state.txt +3 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/expect.txt +1 -1
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.gate +2 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.rs +4 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +1 -2
- package/payload/canon-kit/lib/spec.sh +109 -70
- package/payload/canon-kit/smoke/install.sh +21 -1
- package/payload/canon-kit/templates/SPEC-amendment.md +9 -2
- package/payload/context-kit/README.md +4 -1
- package/payload/context-kit/SPEC.md +166 -9
- package/payload/context-kit/bin/env-probe.sh +19 -6
- package/payload/context-kit/checks/check-brevity.sh +1 -0
- package/payload/context-kit/checks/check-footprint-fresh.sh +1 -0
- package/payload/context-kit/checks/check-memory-off.sh +1 -0
- package/payload/context-kit/checks/check-settings-paths.sh +94 -0
- package/payload/context-kit/checks/check-settings-pins.sh +1 -0
- package/payload/context-kit/gate-tests/check-settings-paths/bad/args +1 -0
- package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +3 -0
- package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +12 -0
- package/payload/context-kit/gate-tests/check-settings-paths/bad/tools/real-tool.sh +4 -0
- package/payload/context-kit/gate-tests/check-settings-paths/good/args +1 -0
- package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +16 -0
- package/payload/context-kit/gate-tests/check-settings-paths/good/tools/real-tool.sh +4 -0
- package/payload/context-kit/index-tests/expected/toolfloor.txt +9 -0
- package/payload/context-kit/index-tests/toolfloor-cases.sh +20 -0
- package/payload/context-kit/lib/toolfloor.sh +15 -4
- package/payload/context-kit/smoke/agents-md.sh +12 -1
- package/payload/context-kit/smoke/install.sh +4 -1
- package/payload/delegation-kit/README.md +3 -3
- package/payload/delegation-kit/SPEC.md +499 -26
- package/payload/delegation-kit/bin/run-dispatch-guard-tests.sh +97 -0
- package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +1 -0
- package/payload/delegation-kit/checks/check-gate-tamper.sh +2 -1
- package/payload/delegation-kit/checks/check-rule-citation.sh +1 -0
- package/payload/delegation-kit/lib/delegation.sh +1 -0
- package/payload/delegation-kit/smoke/install.sh +2 -1
- package/payload/delegation-kit/templates/agent-dispatch-guard.sh +61 -0
- package/payload/delegation-kit/templates/agent-execution.md +127 -12
- package/payload/delegation-kit/templates/delegation-config.sh +4 -0
- package/payload/delegation-kit/templates/dispatch-checklists.md +1 -1
- package/payload/delegation-kit/templates/statusline-usage.sh +23 -1
- package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +30 -0
- package/payload/doctrine-kit/DOCTRINE.md +112 -11
- package/payload/doctrine-kit/README.md +12 -3
- package/payload/doctrine-kit/SPEC.md +163 -11
- package/payload/doctrine-kit/bin/install-doctrine.sh +167 -17
- package/payload/doctrine-kit/checks/check-doctrine-registration.sh +41 -11
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/DOCTRINE.md +3 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/DOCTRINE.md +3 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +82 -2
- package/payload/doctrine-kit/smoke/install.sh +167 -1
- package/payload/drift-kit/README.md +3 -2
- package/payload/drift-kit/SPEC.md +264 -22
- package/payload/drift-kit/bin/kfric.sh +21 -2
- package/payload/drift-kit/bin/stage-economics.sh +157 -3
- package/payload/drift-kit/kpis/kpi-incident-recurrence.sh +42 -0
- package/payload/drift-kit/smoke/install.sh +183 -1
- package/payload/drift-kit/templates/economics.md +9 -0
- package/payload/drift-kit/templates/kpis.list +6 -1
- package/payload/evidence-kit/README.md +20 -6
- package/payload/evidence-kit/SPEC.md +355 -17
- package/payload/evidence-kit/bin/run-validate.sh +51 -9
- package/payload/evidence-kit/checks/check-battery-roster.sh +87 -0
- package/payload/evidence-kit/checks/check-evidence-baseline.sh +1 -0
- package/payload/evidence-kit/checks/check-evidence-manifest.sh +1 -0
- package/payload/evidence-kit/checks/check-producer-liveness.sh +35 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/args +1 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/runner.md +14 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.sh +7 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/args +1 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/runner.md +14 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.sh +7 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +68 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/args +1 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/run-validate.lock +1 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/good/args +1 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/good/expect.txt +2 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/good/run-validate.lock +1 -0
- package/payload/evidence-kit/gate-tests/producer-lock.test.sh +109 -0
- package/payload/evidence-kit/lib/evidence.sh +18 -0
- package/payload/evidence-kit/smoke/install.sh +17 -3
- package/payload/gate-sdk/README.md +17 -1
- package/payload/gate-sdk/SPEC.md +4427 -92
- package/payload/gate-sdk/bin/build-native.sh +38 -0
- package/payload/gate-sdk/bin/enforcement-map.sh +2 -1
- package/payload/gate-sdk/bin/gen-pre-commit.sh +32 -2
- package/payload/gate-sdk/bin/port-blockers.sh +445 -0
- package/payload/gate-sdk/bin/run-consumer-smoke.sh +129 -2
- package/payload/gate-sdk/bin/run-gate-tests.sh +61 -9
- package/payload/gate-sdk/bin/run-gates.sh +37 -2
- package/payload/gate-sdk/bin/upgrade-smoke.sh +55 -7
- package/payload/gate-sdk/checks/check-action-gh-repo.gate +3 -0
- package/payload/gate-sdk/checks/check-action-pinning.gate +3 -0
- package/payload/gate-sdk/checks/check-action-run-shell.sh +4 -1
- package/payload/gate-sdk/checks/check-assertion-strength.gate +3 -0
- package/payload/gate-sdk/checks/check-commit-msg.sh +1 -0
- package/payload/gate-sdk/checks/check-commit-subject.sh +1 -0
- package/payload/gate-sdk/checks/check-core-files.sh +28 -4
- package/payload/gate-sdk/checks/check-crate-arms.sh +61 -0
- package/payload/gate-sdk/checks/check-enforcement-fresh.sh +1 -0
- package/payload/gate-sdk/checks/check-exec-bit.sh +21 -1
- package/payload/gate-sdk/checks/check-gate-assertions.sh +31 -6
- package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +107 -0
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +7 -7
- package/payload/gate-sdk/checks/check-gate-fail-closed.sh +1 -0
- package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +1 -0
- package/payload/gate-sdk/checks/check-gate-output.sh +41 -3
- package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +333 -0
- package/payload/gate-sdk/checks/check-graph.sh +5 -5
- package/payload/gate-sdk/checks/check-hook-exec-bit.sh +1 -0
- package/payload/gate-sdk/checks/check-identity.sh +1 -0
- package/payload/gate-sdk/checks/check-install-disposition.sh +92 -0
- package/payload/gate-sdk/checks/check-kit-enum.sh +1 -0
- package/payload/gate-sdk/checks/check-kit-registration.gate +3 -0
- package/payload/gate-sdk/checks/check-readme-roster.sh +6 -0
- package/payload/gate-sdk/checks/check-reads-couples.sh +71 -21
- package/payload/gate-sdk/checks/check-root-tiering.sh +1 -0
- package/payload/gate-sdk/checks/check-shellcheck.sh +1 -0
- package/payload/gate-sdk/checks/check-smoke-entry-guard.gate +3 -0
- package/payload/gate-sdk/checks/check-template-copy-parity.sh +1 -0
- package/payload/gate-sdk/checks/check-template-registry-parity.gate +3 -0
- package/payload/gate-sdk/checks/check-test-hermetic.gate +3 -0
- package/payload/gate-sdk/checks/check-tree-terms.sh +1 -0
- package/payload/gate-sdk/checks/check-workflow-tiering.sh +2 -1
- package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +16 -1
- package/payload/gate-sdk/gate-tests/check-core-files.test.sh +64 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/Cargo.toml +7 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/src/lib.rs +12 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.sh +2 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/Cargo.toml +7 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/src/lib.rs +11 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.sh +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/kitroot/checks/check-vendored.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/check-ported.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.sh +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gates.list +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stamp.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stub-bin +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/args +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/kitroot/checks/check-vendored.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/check-ported.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.sh +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gates.list +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stamp.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stub-bin +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +81 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +3 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +3 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/gates/check-sample.sh +3 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-native-sample.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-sample.sh +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/expect.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/gates.list +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/Cargo.toml +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/src/gates/native_sample.rs +7 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/check-native-sample.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/check-sample.sh +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/gates.list +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/native/Cargo.toml +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/native/src/gates/native_sample.rs +11 -0
- package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +111 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/conservation.md +7 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +12 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/impl/gate.rs +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/kitroot/check-orphan.rs +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/publish.yml +15 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.gate +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/stub-bin +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/targets.list +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/args +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/conservation.md +8 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +7 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/impl/gate.rs +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/kitroot/check-other.rs +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/publish.yml +15 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-ported.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/stub-bin +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/targets.list +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +184 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-alpha.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-delta.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-epsilon.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/smoke/install.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/args +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/installer/lib/common/recipe.sh +9 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-alpha.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-beta.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-gamma.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/smoke/install.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/args +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/installer/lib/common/recipe.sh +10 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +6 -5
- package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +139 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/templates/widgets.list +4 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-one.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-two.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/args +4 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/templates/widgets.list +4 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-one.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-two.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/args +8 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/rules.list +5 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/table.tsv +4 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +2 -3
- package/payload/gate-sdk/gate-tests/lib-declaration.test.sh +4 -4
- package/payload/gate-sdk/gate-tests/lib-gate.test.sh +151 -1
- package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +73 -0
- package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +144 -0
- package/payload/gate-sdk/lib/consumer-smoke.sh +41 -4
- package/payload/gate-sdk/lib/gate.sh +208 -9
- package/payload/gate-sdk/lib/inject.sh +46 -1
- package/payload/gate-sdk/lib/test-hermetic.sh +26 -0
- package/payload/gate-sdk/smoke/install.sh +61 -1
- package/payload/guard-kit/README.md +18 -14
- package/payload/guard-kit/SPEC.md +366 -72
- package/payload/guard-kit/bin/compare-settings-allow.sh +40 -7
- package/payload/guard-kit/bin/run-guard-tests.sh +1 -0
- package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +64 -0
- package/payload/guard-kit/gate-tests/guard-read-path.test.sh +52 -0
- package/payload/guard-kit/guard-tests/cases.tsv +49 -7
- package/payload/guard-kit/lib/guard.sh +277 -54
- package/payload/guard-kit/templates/close-triage.md +38 -10
- package/payload/guard-kit/templates/guard-config.sh +3 -0
- package/payload/guard-kit/templates/settings-hooks.json +7 -1
- package/payload/lifecycle-kit/README.md +12 -1
- package/payload/lifecycle-kit/SPEC.md +991 -41
- package/payload/lifecycle-kit/bin/cite-survey.sh +81 -0
- package/payload/lifecycle-kit/bin/enter-stage.sh +139 -13
- package/payload/lifecycle-kit/bin/file-gap.sh +60 -2
- package/payload/lifecycle-kit/bin/file-survey.sh +69 -0
- package/payload/lifecycle-kit/checks/check-close-surfaces.sh +1 -0
- package/payload/lifecycle-kit/checks/check-gap-inbox-neutrality.gate +3 -0
- package/payload/lifecycle-kit/checks/check-lesson-disposition.gate +3 -0
- package/payload/lifecycle-kit/checks/check-lifecycle-registration.gate +3 -0
- package/payload/lifecycle-kit/checks/check-merge-attrs.gate +3 -0
- package/payload/lifecycle-kit/checks/check-scratch-citation.gate +3 -0
- package/payload/lifecycle-kit/checks/check-shim-restatement.gate +3 -0
- package/payload/lifecycle-kit/checks/check-skill-binding.gate +3 -0
- package/payload/lifecycle-kit/checks/check-stage-entry.sh +1 -0
- package/payload/lifecycle-kit/checks/check-stage-evidence.gate +3 -0
- package/payload/lifecycle-kit/checks/check-stage-skill-coverage.gate +3 -0
- package/payload/lifecycle-kit/checks/check-survey-record.gate +3 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +1 -2
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/expect.txt +3 -0
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/gap-inbox.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/gap-inbox.md +4 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs/bad/.gitattributes +1 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs/good/.gitattributes +1 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +3 -3
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.sh +4 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/surfaces/queue.md +13 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.sh +4 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/surfaces/queue.md +31 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +9 -5
- package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/expect.txt +4 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/record.md +18 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/good/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/good/record.md +13 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +83 -0
- package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +122 -0
- package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +142 -0
- package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +102 -0
- package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +100 -0
- package/payload/lifecycle-kit/lib/stages.sh +12 -2
- package/payload/lifecycle-kit/smoke/install.sh +83 -4
- package/payload/lifecycle-kit/templates/consult.md +73 -0
- package/payload/lifecycle-kit/templates/lead.md +139 -7
- package/payload/lifecycle-kit/templates/stages/align.md +12 -0
- package/payload/lifecycle-kit/templates/stages/build.md +8 -0
- package/payload/lifecycle-kit/templates/stages/close.md +45 -5
- package/payload/lifecycle-kit/templates/stages/scope.md +42 -3
- package/payload/lifecycle-kit/templates/stages/spec.md +13 -1
- package/payload/lifecycle-kit/templates/stages/validate.md +8 -0
- package/payload/lifecycle-kit/templates/workflow-state-guard.sh +29 -0
- package/payload/queue-kit/README.md +6 -1
- package/payload/queue-kit/SPEC.md +350 -6
- package/payload/queue-kit/bin/queue-counts.sh +35 -0
- package/payload/queue-kit/bin/queue-edges.sh +78 -0
- package/payload/queue-kit/checks/check-queue-entry-budget.gate +3 -0
- package/payload/queue-kit/checks/check-queue-hygiene.gate +3 -0
- package/payload/queue-kit/checks/check-queue-prose-precondition.sh +1 -0
- package/payload/queue-kit/checks/check-queue-sections.gate +3 -0
- package/payload/queue-kit/checks/check-queue-slug-liveness.gate +3 -0
- package/payload/queue-kit/checks/check-queue-wrap.gate +3 -0
- package/payload/queue-kit/checks/check-roadmap-fresh.sh +1 -0
- package/payload/queue-kit/checks/check-tag-lead-line.gate +3 -0
- package/payload/queue-kit/checks/check-task-conservation.gate +4 -0
- package/payload/queue-kit/checks/check-task-names.gate +3 -0
- package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +5 -0
- package/payload/queue-kit/gate-tests/queue-counts.test.sh +116 -0
- package/payload/queue-kit/gate-tests/queue-edges.test.sh +130 -0
- package/payload/queue-kit/gate-tests/queue-lib-parity.test.sh +215 -0
- package/payload/queue-kit/lib/queue.sh +4 -19
- package/payload/queue-kit/smoke/install.sh +4 -1
- package/payload/queue-kit/templates/TASK-QUEUE.md +3 -0
- package/payload/site-kit/SPEC.md +64 -27
- package/payload/site-kit/checks/check-docs-cname-parity.sh +1 -0
- package/payload/site-kit/checks/check-docs-render-fidelity.sh +1 -0
- package/payload/site-kit/smoke/install.sh +9 -1
- package/profiles.list +36 -8
- package/payload/canon-kit/checks/check-comment-tier.sh +0 -211
- package/payload/canon-kit/checks/check-deprecation-task.sh +0 -90
- package/payload/canon-kit/checks/check-docs-cmd.sh +0 -153
- package/payload/canon-kit/checks/check-install-claim.sh +0 -146
- package/payload/canon-kit/checks/check-knob-citation.sh +0 -117
- package/payload/canon-kit/checks/check-manifest-count.sh +0 -46
- package/payload/canon-kit/checks/check-manifest-temporal.sh +0 -83
- package/payload/canon-kit/checks/check-md-refs.sh +0 -128
- package/payload/canon-kit/checks/check-prose-enum.sh +0 -115
- package/payload/canon-kit/checks/check-spec-derivable-section.sh +0 -69
- package/payload/canon-kit/checks/check-spec-dod-singleton.sh +0 -45
- package/payload/canon-kit/checks/check-spec-fence-balance.sh +0 -42
- package/payload/canon-kit/checks/check-spec-pointer.sh +0 -180
- package/payload/canon-kit/checks/check-todo-task-liveness.sh +0 -80
- package/payload/canon-kit/checks/check-tracking-claim.sh +0 -136
- package/payload/gate-sdk/checks/check-action-gh-repo.sh +0 -321
- package/payload/gate-sdk/checks/check-action-pinning.sh +0 -55
- package/payload/gate-sdk/checks/check-assertion-strength.sh +0 -134
- package/payload/gate-sdk/checks/check-kit-registration.sh +0 -68
- package/payload/gate-sdk/checks/check-smoke-entry-guard.sh +0 -53
- package/payload/gate-sdk/checks/check-test-hermetic.sh +0 -119
- package/payload/lifecycle-kit/checks/check-lesson-disposition.sh +0 -98
- package/payload/lifecycle-kit/checks/check-lifecycle-registration.sh +0 -54
- package/payload/lifecycle-kit/checks/check-merge-attrs.sh +0 -69
- package/payload/lifecycle-kit/checks/check-shim-restatement.sh +0 -97
- package/payload/lifecycle-kit/checks/check-skill-binding.sh +0 -59
- package/payload/lifecycle-kit/checks/check-stage-evidence.sh +0 -81
- package/payload/lifecycle-kit/checks/check-stage-skill-coverage.sh +0 -47
- package/payload/queue-kit/checks/check-queue-entry-budget.sh +0 -104
- package/payload/queue-kit/checks/check-queue-hygiene.sh +0 -81
- package/payload/queue-kit/checks/check-queue-sections.sh +0 -44
- package/payload/queue-kit/checks/check-queue-slug-liveness.sh +0 -63
- package/payload/queue-kit/checks/check-queue-wrap.sh +0 -56
- package/payload/queue-kit/checks/check-tag-lead-line.sh +0 -70
- package/payload/queue-kit/checks/check-task-conservation.sh +0 -50
- package/payload/queue-kit/checks/check-task-names.sh +0 -128
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# graph: couples=kit:smoke/install.sh,kit:smoke/violation.sh dir=one valve=none tier=precommit
|
|
2
|
+
# install: on-surface
|
|
3
|
+
# spec: gate-sdk/SPEC.md §check-smoke-entry-guard — every mutating smoke script (install.sh, violation.sh) carries the ${SMOKE_KIT_ROOT:?} entry-point guard so a bare run refuses instead of mutating the caller's tree
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=*/templates/*.sh,scripts/*.sh dir=bi valve=none tier=precommit
|
|
3
|
+
# install: on-surface
|
|
3
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
|
|
4
5
|
#
|
|
5
6
|
# usage: check-template-copy-parity.sh [root]
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# graph: couples=kit:templates/*.list,kit:*/*.sh dir=bi valve=none tier=precommit
|
|
2
|
+
# install: on-surface
|
|
3
|
+
# spec: gate-sdk/SPEC.md §check-template-registry-parity — a kit's shipped `.list` registry template names exactly the artifacts of its sibling directory, both directions
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# graph: couples=kit:gate-tests/*.test.sh,kit:smoke/install.sh,kit:smoke/violation.sh dir=one valve=none tier=precommit
|
|
2
|
+
# install: on-surface
|
|
3
|
+
# spec: gate-sdk/SPEC.md §check-test-hermetic — two assertions (A) every bespoke gate-tests/*.test.sh sources lib/test-hermetic.sh or carries a `# hermetic-exempt:` marker; (B) a credential-managing smoke script pins every own-kit bin call ("$SMOKE_KIT_ROOT/bin/*") to a *_CRED_FILE path so it cannot resolve the ambient ~/.claude credential
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=scripts/msg-patterns.list dir=one valve=none tier=precommit trigger=*
|
|
3
|
+
# install: zero-config
|
|
3
4
|
# spec: gate-sdk/SPEC.md §check-tree-terms — no tracked file matches the banned-pattern set (the tracked-files half of the leak guard; the pattern files and their templates are self-exempt)
|
|
4
5
|
#
|
|
5
6
|
# usage: check-tree-terms.sh [scan-root] [pattern-file...]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=.workflow/*,.gitignore dir=one valve=none tier=precommit
|
|
3
|
+
# install: on-surface
|
|
3
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
|
|
4
5
|
#
|
|
5
6
|
# usage: check-workflow-tiering.sh [scan-root] (default '.')
|
|
@@ -14,7 +15,7 @@ ROOT="${1:-.}"
|
|
|
14
15
|
git -C "$ROOT" rev-parse --git-dir >/dev/null 2>&1 || {
|
|
15
16
|
echo "check-workflow-tiering: $ROOT is not a git repository — the tracked/ignored partition is unreadable" >&2; exit 2; }
|
|
16
17
|
|
|
17
|
-
WF="$
|
|
18
|
+
WF="$GATE_SDK_WORKFLOW_DIR"
|
|
18
19
|
[[ -d "$ROOT/$WF" ]] || {
|
|
19
20
|
echo "check-workflow-tiering: workflow directory not found: $ROOT/$WF" >&2; exit 2; }
|
|
20
21
|
|
|
@@ -53,6 +53,21 @@ check_case indicator ' - run: |2
|
|
|
53
53
|
# C — a YAML alias as the run: value. No anchor resolution is attempted.
|
|
54
54
|
check_case alias ' - run: *setup' 2 "a YAML alias as the run: value (run: *setup)"
|
|
55
55
|
|
|
56
|
+
# C2 — the anchor half of the same rule. This fell through every refusal arm and
|
|
57
|
+
# landed on the plain-scalar counter, so an anchored body was reported skipped and
|
|
58
|
+
# never linted: a silent fail-open in the gate whose whole job is linting this
|
|
59
|
+
# shell. The body below is ShellCheck-dirty, so a regression here reads as clean.
|
|
60
|
+
check_case anchor ' - run: &setup |
|
|
61
|
+
echo "$undefined_var"
|
|
62
|
+
unused=1' 2 "a YAML anchor on the run: value (run: &setup |)"
|
|
63
|
+
|
|
64
|
+
# C3 — an anchor on a plain scalar refuses too: the anchor is what we cannot
|
|
65
|
+
# resolve, independent of the scalar style it decorates.
|
|
66
|
+
check_case anchor_plain ' - run: &setup echo hi' 2 "a YAML anchor on the run: value (run: &setup echo hi)"
|
|
67
|
+
|
|
68
|
+
# C4 — a quoted value merely beginning with & is an ordinary string, not an anchor.
|
|
69
|
+
check_case anchor_quoted ' - run: "echo && echo"' 0 "0 run: block(s) linted"
|
|
70
|
+
|
|
56
71
|
# D — an unbalanced GitHub expression on a body line: substituting it would mangle
|
|
57
72
|
# the fragment, so the line is refused rather than linted wrong.
|
|
58
73
|
check_case unbalanced ' - run: |
|
|
@@ -84,5 +99,5 @@ if [[ "$fails" -gt 0 ]]; then
|
|
|
84
99
|
echo "check-action-run-shell.test: $fails assertion(s) failed"
|
|
85
100
|
exit 1
|
|
86
101
|
fi
|
|
87
|
-
echo "check-action-run-shell.test: ok (folded scalars, an explicit indentation indicator, a YAML alias and an unbalanced GitHub expression each refuse at exit 2 naming the construct; |- and |+ extract normally; a refusable construct outside the Actions-shape subject is skipped and counted rather than refused)"
|
|
102
|
+
echo "check-action-run-shell.test: ok (folded scalars, an explicit indentation indicator, a YAML alias, a YAML anchor on either scalar style and an unbalanced GitHub expression each refuse at exit 2 naming the construct; |- and |+ extract normally; a quoted value merely starting with & is not an anchor; a refusable construct outside the Actions-shape subject is skipped and counted rather than refused)"
|
|
88
103
|
exit 0
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: gate-sdk/SPEC.md §check-core-files — a kit: manifest line derives one path per kit root, so a root missing that path reds without any manifest edit; a kit: token carrying a wildcard is refused fail-closed because this reader requires each expanded path to exist, which is a different invariant from the glob match a couples= field performs. This lives in the bespoke unit lane rather than the good/+bad/ pair because the fixture runner reads exit 2 as a harness error and runs each case with the fixture dir as cwd, so neither the refusal nor the expansion is expressible there.
|
|
3
|
+
set -uo pipefail
|
|
4
|
+
source "$(dirname "${BASH_SOURCE[0]}")/../lib/test-hermetic.sh"
|
|
5
|
+
|
|
6
|
+
ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
7
|
+
GATE="$ROOT/gate-sdk/checks/check-core-files.sh"
|
|
8
|
+
[[ -x "$GATE" ]] || { echo "check-core-files.test: gate not found: $GATE"; exit 2; }
|
|
9
|
+
|
|
10
|
+
sb="$(mktemp -d)"
|
|
11
|
+
trap 'rm -rf "$sb"' EXIT
|
|
12
|
+
|
|
13
|
+
git -C "$sb" init -q
|
|
14
|
+
git -C "$sb" config user.email t@example.invalid
|
|
15
|
+
git -C "$sb" config user.name t
|
|
16
|
+
mkdir -p "$sb/alpha-kit" "$sb/beta-kit"
|
|
17
|
+
printf 'a\n' > "$sb/alpha-kit/SPEC.md"
|
|
18
|
+
printf 'b\n' > "$sb/beta-kit/SPEC.md"
|
|
19
|
+
printf 'r\n' > "$sb/plain.txt"
|
|
20
|
+
git -C "$sb" add -A
|
|
21
|
+
git -C "$sb" commit -qm seed
|
|
22
|
+
|
|
23
|
+
fails=0
|
|
24
|
+
run() { ( cd "$sb" && GATE_SDK_KIT_DIRS="alpha-kit beta-kit" bash "$GATE" "$1" 2>&1 ); }
|
|
25
|
+
|
|
26
|
+
# A kit: line expands to one path per root; every expansion exists, so the gate is clean
|
|
27
|
+
# and its count proves the derivation ran (2 derived + 1 hand line).
|
|
28
|
+
printf 'kit:SPEC.md\nplain.txt\n' > "$sb/good.list"
|
|
29
|
+
out="$(run good.list)"; rc=$?
|
|
30
|
+
[[ "$rc" -eq 0 ]] || { echo "FAIL [expand-clean]: expected exit 0, got $rc: $out"; fails=$((fails + 1)); }
|
|
31
|
+
grep -qF '3 manifest path(s)' <<<"$out" || { echo "FAIL [expand-count]: expected 3 expanded paths: $out"; fails=$((fails + 1)); }
|
|
32
|
+
|
|
33
|
+
# A new root with no SPEC.md reds without any manifest edit — the property Delta 2 exists for.
|
|
34
|
+
mkdir -p "$sb/gamma-kit"
|
|
35
|
+
printf 'g\n' > "$sb/gamma-kit/other.md"
|
|
36
|
+
git -C "$sb" add -A
|
|
37
|
+
git -C "$sb" commit -qm gamma
|
|
38
|
+
out="$( cd "$sb" && GATE_SDK_KIT_DIRS="alpha-kit beta-kit gamma-kit" bash "$GATE" good.list 2>&1 )"; rc=$?
|
|
39
|
+
[[ "$rc" -eq 1 ]] || { echo "FAIL [new-root-reds]: expected exit 1, got $rc: $out"; fails=$((fails + 1)); }
|
|
40
|
+
grep -qF 'missing: gamma-kit/SPEC.md' <<<"$out" || { echo "FAIL [new-root-names]: $out"; fails=$((fails + 1)); }
|
|
41
|
+
|
|
42
|
+
# An untracked expansion reds on the tracked half of the invariant, not just existence.
|
|
43
|
+
printf 'u\n' > "$sb/gamma-kit/SPEC.md"
|
|
44
|
+
out="$( cd "$sb" && GATE_SDK_KIT_DIRS="alpha-kit beta-kit gamma-kit" bash "$GATE" good.list 2>&1 )"; rc=$?
|
|
45
|
+
[[ "$rc" -eq 1 ]] || { echo "FAIL [untracked-reds]: expected exit 1, got $rc: $out"; fails=$((fails + 1)); }
|
|
46
|
+
grep -qF 'untracked: gamma-kit/SPEC.md' <<<"$out" || { echo "FAIL [untracked-names]: $out"; fails=$((fails + 1)); }
|
|
47
|
+
|
|
48
|
+
# A wildcard is refused fail-closed: this reader cannot express "some file matches".
|
|
49
|
+
for tok in 'kit:checks/*.sh' 'kit:SPEC?.md' 'kit:[ab].md'; do
|
|
50
|
+
printf '%s\n' "$tok" > "$sb/wild.list"
|
|
51
|
+
out="$(run wild.list)"; rc=$?
|
|
52
|
+
[[ "$rc" -eq 2 ]] || { echo "FAIL [wildcard-refused $tok]: expected exit 2, got $rc: $out"; fails=$((fails + 1)); }
|
|
53
|
+
grep -qF 'carries a wildcard' <<<"$out" || { echo "FAIL [wildcard-message $tok]: $out"; fails=$((fails + 1)); }
|
|
54
|
+
done
|
|
55
|
+
|
|
56
|
+
# Backward compatibility: a manifest with no kit: line behaves exactly as before.
|
|
57
|
+
printf 'plain.txt\n' > "$sb/plainonly.list"
|
|
58
|
+
out="$(run plainonly.list)"; rc=$?
|
|
59
|
+
[[ "$rc" -eq 0 ]] || { echo "FAIL [no-token-unchanged]: expected exit 0, got $rc: $out"; fails=$((fails + 1)); }
|
|
60
|
+
grep -qF '1 manifest path(s)' <<<"$out" || { echo "FAIL [no-token-count]: $out"; fails=$((fails + 1)); }
|
|
61
|
+
|
|
62
|
+
[[ "$fails" -eq 0 ]] || { echo "check-core-files.test: $fails assertion(s) failed"; exit 1; }
|
|
63
|
+
echo "check-core-files.test: clean (kit: expands per root and reds on a root missing the path or leaving it untracked; a wildcard token is refused fail-closed; a token-free manifest is unchanged)"
|
|
64
|
+
exit 0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
GATE-ASSERTIONS: clean (2 enumerated contract(s) coupled)
|
|
1
|
+
GATE-ASSERTIONS: clean (2 of 2 enumerated contract(s) coupled)
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
the gate binary was not built from the source now in the tree
|
|
2
|
+
reports source stamp 7b30e5148d6ca2f09e1b84ff2d5c7a6033819e4c
|
|
3
|
+
stamp.txt hashes to 4f1c2a90bb7e5d3168ac04e2f5b7391dd0c6a812
|
|
4
|
+
2 descriptor(s) dispatch to that binary: check-ported check-vendored
|
|
5
|
+
help: rebuild it
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4f1c2a90bb7e5d3168ac04e2f5b7391dd0c6a812
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# A binary built from a source state this fixture tree no longer carries: its baked
|
|
3
|
+
# stamp is not stamp.txt's. The near-miss this case must not collapse into is the
|
|
4
|
+
# zero-descriptor tree, which exits 0 — so a red here can only be the stamp mismatch.
|
|
5
|
+
[[ "${1:-}" == --source-stamp ]] && { echo 7b30e5148d6ca2f09e1b84ff2d5c7a6033819e4c; exit 0; }
|
|
6
|
+
exit 2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4f1c2a90bb7e5d3168ac04e2f5b7391dd0c6a812
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# A binary built from the source the fixture tree carries: its baked stamp is the
|
|
3
|
+
# one stamp.txt reports, so the gate must reach the comparison and find them equal.
|
|
4
|
+
[[ "${1:-}" == --source-stamp ]] && { echo 4f1c2a90bb7e5d3168ac04e2f5b7391dd0c6a812; exit 0; }
|
|
5
|
+
exit 2
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Behavioral test of checks/check-gate-binary-fresh.sh over the configurations the
|
|
3
|
+
# good/+bad/ pair cannot hold: the pair is one invocation each and both are
|
|
4
|
+
# "descriptors present, binary readable". These are the load-bearing predicate's
|
|
5
|
+
# own boundary — a descriptor on disk is a declaration, a registered member
|
|
6
|
+
# resolving to one is a dispatch — plus the two no-dispatch configurations this
|
|
7
|
+
# repo's battery and the consumer smoke used to be the only oracles for.
|
|
8
|
+
#
|
|
9
|
+
# Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
|
|
10
|
+
set -uo pipefail
|
|
11
|
+
source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
|
|
12
|
+
|
|
13
|
+
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # gate-sdk/
|
|
14
|
+
GATE="$DIR/checks/check-gate-binary-fresh.sh"
|
|
15
|
+
SANDBOX="$(mktemp -d)"
|
|
16
|
+
trap 'rm -rf "$SANDBOX"' EXIT
|
|
17
|
+
|
|
18
|
+
fails=0
|
|
19
|
+
STAMP=4f1c2a90bb7e5d3168ac04e2f5b7391dd0c6a812
|
|
20
|
+
|
|
21
|
+
# One sandbox shape, re-pointed per case: a gates dir, a kit resolve dir, a stub
|
|
22
|
+
# binary whose baked stamp matches stamp.txt, and a registry the case rewrites.
|
|
23
|
+
mkdir -p "$SANDBOX/scripts" "$SANDBOX/kitroot/checks"
|
|
24
|
+
printf '%s\n' "$STAMP" > "$SANDBOX/stamp.txt"
|
|
25
|
+
cat > "$SANDBOX/stub-bin" <<EOF
|
|
26
|
+
#!/usr/bin/env bash
|
|
27
|
+
[[ "\${1:-}" == --source-stamp ]] && { echo $STAMP; exit 0; }
|
|
28
|
+
exit 2
|
|
29
|
+
EOF
|
|
30
|
+
chmod +x "$SANDBOX/stub-bin"
|
|
31
|
+
DESC='# graph: couples=docs/*.md dir=one valve=none tier=precommit
|
|
32
|
+
# spec: gate-sdk/SPEC.md §check-gate-binary-fresh — fixture descriptor'
|
|
33
|
+
|
|
34
|
+
run() { # run <bin> ; registry + descriptors are already in place
|
|
35
|
+
( cd "$SANDBOX" && env GATE_SDK_KIT_DIRS=kitroot GATE_SDK_NATIVE_BIN="$1" \
|
|
36
|
+
GATE_SDK_NATIVE_CRATE=crate "$GATE" scripts stamp.txt 2>&1 )
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
expect() { # expect <label> <want-rc> <substring> <got-rc> <output>
|
|
40
|
+
if [[ "$4" -ne "$2" ]]; then
|
|
41
|
+
echo " FAIL [$1]: want exit $2, got $4 -- $5"; fails=$((fails + 1))
|
|
42
|
+
elif ! grep -qF -- "$3" <<<"$5"; then
|
|
43
|
+
echo " FAIL [$1]: exit $2 but output lacks '$3': $5"; fails=$((fails + 1))
|
|
44
|
+
fi
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
# --- zero descriptors: clean, and the report says zero of each ---
|
|
48
|
+
printf 'check-shell\n' > "$SANDBOX/scripts/gates.list"
|
|
49
|
+
printf '#!/usr/bin/env bash\n' > "$SANDBOX/scripts/check-shell.sh"
|
|
50
|
+
out="$(run ./stub-bin)"; rc=$?
|
|
51
|
+
expect zero-descriptors 0 '0 .gate descriptor(s)' "$rc" "$out"
|
|
52
|
+
expect zero-descriptors-dispatch 0 '0 dispatched to by a live member' "$rc" "$out"
|
|
53
|
+
|
|
54
|
+
# --- descriptors present, none dispatching: clean, and the two counts differ ---
|
|
55
|
+
# The configuration every vendored tree is in after the first cohort lands: the
|
|
56
|
+
# descriptors ship with the kit root, no consumer registry names them, and no
|
|
57
|
+
# binary exists. Reading a descriptor's presence as a dispatch reds all of them.
|
|
58
|
+
printf '%s\n' "$DESC" > "$SANDBOX/scripts/check-ported.gate"
|
|
59
|
+
printf '%s\n' "$DESC" > "$SANDBOX/kitroot/checks/check-vendored.gate"
|
|
60
|
+
out="$(run ./nonexistent-bin)"; rc=$?
|
|
61
|
+
expect present-none-dispatching 0 '2 .gate descriptor(s)' "$rc" "$out"
|
|
62
|
+
expect present-none-dispatching-count 0 '0 dispatched to by a live member' "$rc" "$out"
|
|
63
|
+
|
|
64
|
+
# --- the near miss: a registered member resolves to a descriptor, no binary ---
|
|
65
|
+
# Exit 2, never 0: this is the state the corrected predicate must still fail
|
|
66
|
+
# closed on, and the one way a too-loose predicate passes its own good/ case.
|
|
67
|
+
printf 'check-shell\ncheck-ported\n' > "$SANDBOX/scripts/gates.list"
|
|
68
|
+
out="$(run ./nonexistent-bin)"; rc=$?
|
|
69
|
+
expect registered-no-binary 2 'registered member(s) dispatch to it' "$rc" "$out"
|
|
70
|
+
|
|
71
|
+
# --- absent registry: cannot verify, so exit 2 rather than a clean report ---
|
|
72
|
+
rm -f "$SANDBOX/scripts/gates.list"
|
|
73
|
+
out="$(run ./stub-bin)"; rc=$?
|
|
74
|
+
expect absent-registry 2 'no gate registry at' "$rc" "$out"
|
|
75
|
+
|
|
76
|
+
if [[ "$fails" -gt 0 ]]; then
|
|
77
|
+
echo "check-gate-binary-fresh.test.sh: $fails case(s) failed"
|
|
78
|
+
exit 1
|
|
79
|
+
fi
|
|
80
|
+
echo "check-gate-binary-fresh.test.sh: clean (load-bearing predicate: zero descriptors, descriptors with none dispatching, a registered dispatch with no binary, and an absent registry — 6 assertions over 4 cases)"
|
|
81
|
+
exit 0
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## New Features
|
|
4
4
|
|
|
5
|
-
- **some-other-task** — live, but nothing points at it.
|
|
5
|
+
- **some-other-task** — live, but nothing points at it. Its body bolds
|
|
6
|
+
**emphasis** the way real entry prose does, and a token scan reads that
|
|
7
|
+
emphasis as a live slug.
|
|
6
8
|
|
|
7
9
|
## Done
|
|
8
10
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# Fixture gate (scanned as text, never executed): one exemption's `# until:`
|
|
3
|
-
# resolves only to Done,
|
|
3
|
+
# resolves only to Done, one carries no disposition, and one points at a bold
|
|
4
|
+
# token in body prose that was never a task — all three must be REJECTED.
|
|
4
5
|
set -uo pipefail
|
|
5
6
|
|
|
6
7
|
# exception-list: surfaces excused from the sample scan
|
|
7
8
|
EXEMPT=(
|
|
8
9
|
"surface-a" # until: retired-task
|
|
9
10
|
"surface-b"
|
|
11
|
+
"surface-c" # until: emphasis
|
|
10
12
|
)
|
|
11
13
|
echo "SAMPLE: clean (${#EXEMPT[@]} exemptions)"
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# graph: couples=TASK-QUEUE.md dir=one valve=none tier=precommit
|
|
2
|
+
# no-fixture: fixture descriptor (scanned as text): a .gate-dispatched no-fixture member whose implementation module emits neither contract line
|
|
3
|
+
# spec: gate-sdk/SPEC.md §check-gate-output — the corpus follows the rule to the implementation module
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
+
# no-fixture: a fixture-less member, so the static source-grep is its only output-contract oracle
|
|
2
3
|
# Fixture gate (scanned as text): passes silently with no machine-keyable success
|
|
3
4
|
# line — a reader cannot tell "passed" from "did nothing".
|
|
4
5
|
exit 0
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Fixture module (scanned as text, never compiled): passes silently with no
|
|
2
|
+
// machine-keyable success line and no help: remedy. The descriptor beside it carries
|
|
3
|
+
// the '# no-fixture:' opt-out, so a reader that stopped at the descriptor — or kept the
|
|
4
|
+
// shell emitter alternation, which matches nothing here — would report clean.
|
|
5
|
+
pub fn run() -> i32 {
|
|
6
|
+
0
|
|
7
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# graph: couples=TASK-QUEUE.md dir=one valve=none tier=precommit
|
|
2
|
+
# no-fixture: fixture descriptor (scanned as text): a .gate-dispatched no-fixture member, whose output contract lives in its implementation module rather than in this file
|
|
3
|
+
# spec: gate-sdk/SPEC.md §check-gate-output — the corpus follows the rule to the implementation module
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Fixture module (scanned as text, never compiled): the implementation half of a
|
|
2
|
+
// .gate-dispatched no-fixture member, emitting a conforming machine-keyable success
|
|
3
|
+
// line and a help: remedy in the Rust idiom — check-gate-output must ACCEPT.
|
|
4
|
+
pub fn run() -> i32 {
|
|
5
|
+
if false {
|
|
6
|
+
println!(" help: nothing to fix in the fixture");
|
|
7
|
+
return 1;
|
|
8
|
+
}
|
|
9
|
+
println!("NATIVE-SAMPLE: clean (nothing to check in the fixture)");
|
|
10
|
+
0
|
|
11
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Direct unit test of check-gate-output's out-of-reach branch — the one verdict its
|
|
3
|
+
# fixture pair cannot hold. Both cases of that pair ship a crate dir (they must: the
|
|
4
|
+
# pair's whole job is proving the module-grep arm accepts and rejects), so neither can
|
|
5
|
+
# also stand up the tree where the crate is absent. That tree is not hypothetical: it
|
|
6
|
+
# is every consumer, because native/ is not a kit root and the payload vendors kit
|
|
7
|
+
# roots only, so a vendored .gate member's implementation module is never delivered.
|
|
8
|
+
# It also holds the two trees that decide what "the crate is absent" means: one carrying
|
|
9
|
+
# the binary at its default path under the crate directory (out of reach), and one
|
|
10
|
+
# carrying a manifest but no gates module at all (red).
|
|
11
|
+
#
|
|
12
|
+
# Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
|
|
13
|
+
set -uo pipefail
|
|
14
|
+
source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
|
|
15
|
+
|
|
16
|
+
SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
17
|
+
GATE="$SDK/checks/check-gate-output.sh"
|
|
18
|
+
|
|
19
|
+
fails=0
|
|
20
|
+
TMP="$(mktemp -d)"
|
|
21
|
+
trap 'rm -rf "$TMP"' EXIT
|
|
22
|
+
|
|
23
|
+
# A consumer-shaped tree: the descriptor vendors, the crate does not exist.
|
|
24
|
+
mkdir -p "$TMP/consumer"
|
|
25
|
+
printf 'check-vendored-sample\n' > "$TMP/consumer/gates.list"
|
|
26
|
+
cat > "$TMP/consumer/check-vendored-sample.gate" <<'EOF'
|
|
27
|
+
# graph: couples=TASK-QUEUE.md dir=one valve=none tier=precommit
|
|
28
|
+
# no-fixture: a .gate-dispatched no-fixture member whose implementation module this tree does not carry
|
|
29
|
+
# spec: gate-sdk/SPEC.md §check-gate-output — the out-of-reach branch
|
|
30
|
+
EOF
|
|
31
|
+
|
|
32
|
+
out="$(cd "$TMP/consumer" && GATE_SDK_KIT_DIRS="$SDK" bash "$GATE" . 2>&1)"; rc=$?
|
|
33
|
+
if [[ "$rc" -ne 0 ]]; then
|
|
34
|
+
echo " FAIL: a member whose crate is absent reddened (exit $rc) — every consumer's battery"
|
|
35
|
+
printf ' %s\n' "$out"
|
|
36
|
+
fails=$((fails + 1))
|
|
37
|
+
fi
|
|
38
|
+
if ! grep -q 'declared out of reach' <<<"$out"; then
|
|
39
|
+
echo " FAIL: the omission was not declared in the success line — a silently shrinking count"
|
|
40
|
+
printf ' %s\n' "$out"
|
|
41
|
+
fails=$((fails + 1))
|
|
42
|
+
fi
|
|
43
|
+
if ! grep -q 'check-vendored-sample' <<<"$out"; then
|
|
44
|
+
echo " FAIL: the out-of-reach member was not named, so the declaration says nothing"
|
|
45
|
+
printf ' %s\n' "$out"
|
|
46
|
+
fails=$((fails + 1))
|
|
47
|
+
fi
|
|
48
|
+
if ! grep -q '0 source-grepped as no-fixture members' <<<"$out"; then
|
|
49
|
+
echo " FAIL: an out-of-reach member was still counted as source-grepped"
|
|
50
|
+
printf ' %s\n' "$out"
|
|
51
|
+
fails=$((fails + 1))
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
# spec: gate-sdk/SPEC.md §check-gate-output — the regression case for "why the manifest
|
|
55
|
+
# and not the directory": a consumer that holds only the gate binary still has a native/
|
|
56
|
+
# directory, because GATE_SDK_NATIVE_BIN defaults inside the crate path. Under a
|
|
57
|
+
# directory-presence probe this tree reddened and no consumer could clear it.
|
|
58
|
+
cp -R "$TMP/consumer" "$TMP/binonly"
|
|
59
|
+
mkdir -p "$TMP/binonly/native/target/release"
|
|
60
|
+
: > "$TMP/binonly/native/target/release/checkwright-gates"
|
|
61
|
+
out="$(cd "$TMP/binonly" && GATE_SDK_KIT_DIRS="$SDK" bash "$GATE" . 2>&1)"; rc=$?
|
|
62
|
+
if [[ "$rc" -ne 0 ]]; then
|
|
63
|
+
echo " FAIL: a tree holding only the binary reddened (exit $rc) — the crate path is where"
|
|
64
|
+
echo " the artifact lands, so directory presence is not crate presence"
|
|
65
|
+
printf ' %s\n' "$out"
|
|
66
|
+
fails=$((fails + 1))
|
|
67
|
+
fi
|
|
68
|
+
if ! grep -q 'declared out of reach' <<<"$out"; then
|
|
69
|
+
echo " FAIL: the binary-only tree was not declared out of reach"
|
|
70
|
+
printf ' %s\n' "$out"
|
|
71
|
+
fails=$((fails + 1))
|
|
72
|
+
fi
|
|
73
|
+
|
|
74
|
+
# The same tree WITH a crate present and the module missing is the half-landed port,
|
|
75
|
+
# and it must red — this is what keeps the branch above from being an escape hatch.
|
|
76
|
+
cp -R "$TMP/consumer" "$TMP/upstream"
|
|
77
|
+
mkdir -p "$TMP/upstream/native/src/gates"
|
|
78
|
+
printf '[package]\nname = "checkwright-gates"\n' > "$TMP/upstream/native/Cargo.toml"
|
|
79
|
+
out="$(cd "$TMP/upstream" && GATE_SDK_KIT_DIRS="$SDK" bash "$GATE" . 2>&1)"; rc=$?
|
|
80
|
+
if [[ "$rc" -ne 1 ]]; then
|
|
81
|
+
echo " FAIL: a crate present with no module for a dispatching member did not red (exit $rc)"
|
|
82
|
+
printf ' %s\n' "$out"
|
|
83
|
+
fails=$((fails + 1))
|
|
84
|
+
fi
|
|
85
|
+
if ! grep -q 'no module at native/src/gates/vendored_sample.rs' <<<"$out"; then
|
|
86
|
+
echo " FAIL: the red did not name the module path the name convention derives"
|
|
87
|
+
printf ' %s\n' "$out"
|
|
88
|
+
fails=$((fails + 1))
|
|
89
|
+
fi
|
|
90
|
+
|
|
91
|
+
# spec: gate-sdk/SPEC.md §check-gate-output — "why not the gates module directory either":
|
|
92
|
+
# a crate whose gates module is gone entirely must stay red rather than going quietly out
|
|
93
|
+
# of reach. This is the case a src/gates/ probe would have converted into a false green,
|
|
94
|
+
# so it is asserted rather than left to the SPEC's argument.
|
|
95
|
+
cp -R "$TMP/consumer" "$TMP/gutted"
|
|
96
|
+
mkdir -p "$TMP/gutted/native"
|
|
97
|
+
printf '[package]\nname = "checkwright-gates"\n' > "$TMP/gutted/native/Cargo.toml"
|
|
98
|
+
out="$(cd "$TMP/gutted" && GATE_SDK_KIT_DIRS="$SDK" bash "$GATE" . 2>&1)"; rc=$?
|
|
99
|
+
if [[ "$rc" -ne 1 ]]; then
|
|
100
|
+
echo " FAIL: a crate whose gates module is absent did not red (exit $rc) — crate presence"
|
|
101
|
+
echo " must not be inferred from the module set it happens to carry"
|
|
102
|
+
printf ' %s\n' "$out"
|
|
103
|
+
fails=$((fails + 1))
|
|
104
|
+
fi
|
|
105
|
+
|
|
106
|
+
if [[ "$fails" -gt 0 ]]; then
|
|
107
|
+
echo "check-gate-output.test: $fails assertion(s) failed"
|
|
108
|
+
exit 1
|
|
109
|
+
fi
|
|
110
|
+
echo "check-gate-output.test: ok (out-of-reach declared, binary-only out of reach, missing-module red, gutted-crate red)"
|
|
111
|
+
exit 0
|