checkwright 0.22.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 +687 -90
- package/lib/common/lock.sh +38 -9
- package/lib/common/profile.sh +33 -0
- package/lib/common/recipe.sh +49 -33
- package/lib/diff.sh +64 -0
- package/lib/doctor.sh +67 -42
- package/lib/init.sh +23 -31
- package/lib/uninstall.sh +212 -0
- package/lib/update.sh +34 -0
- package/package.json +2 -2
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
- package/payload/canon-kit/README.md +1 -0
- package/payload/canon-kit/SPEC.md +410 -58
- 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 +1 -0
- 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/templates/good-tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +3 -2
- 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-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 +27 -5
- 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-prose-enum.test.sh +3 -3
- 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 +3 -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/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-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 +91 -62
- package/payload/canon-kit/smoke/install.sh +1 -0
- package/payload/canon-kit/templates/SPEC-amendment.md +4 -1
- package/payload/context-kit/README.md +4 -1
- package/payload/context-kit/SPEC.md +143 -10
- 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 +1 -0
- package/payload/delegation-kit/README.md +3 -3
- package/payload/delegation-kit/SPEC.md +116 -13
- package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +1 -0
- package/payload/delegation-kit/checks/check-gate-tamper.sh +1 -0
- package/payload/delegation-kit/checks/check-rule-citation.sh +1 -0
- package/payload/delegation-kit/templates/agent-execution.md +38 -14
- package/payload/delegation-kit/templates/statusline-usage.sh +23 -1
- package/payload/doctrine-kit/DOCTRINE.md +86 -12
- package/payload/doctrine-kit/README.md +7 -3
- package/payload/doctrine-kit/SPEC.md +102 -9
- package/payload/doctrine-kit/bin/install-doctrine.sh +83 -13
- 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 +90 -0
- package/payload/drift-kit/SPEC.md +13 -4
- package/payload/drift-kit/bin/kfric.sh +21 -2
- package/payload/drift-kit/smoke/install.sh +28 -0
- package/payload/evidence-kit/checks/check-battery-roster.sh +1 -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 +1 -0
- package/payload/gate-sdk/README.md +13 -0
- package/payload/gate-sdk/SPEC.md +2611 -151
- 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 +23 -3
- package/payload/gate-sdk/bin/port-blockers.sh +445 -0
- package/payload/gate-sdk/bin/run-consumer-smoke.sh +8 -1
- package/payload/gate-sdk/bin/run-gate-tests.sh +26 -5
- package/payload/gate-sdk/bin/run-gates.sh +8 -2
- package/payload/gate-sdk/bin/upgrade-smoke.sh +52 -4
- package/payload/gate-sdk/checks/check-action-gh-repo.gate +1 -0
- package/payload/gate-sdk/checks/check-action-pinning.gate +1 -0
- package/payload/gate-sdk/checks/check-action-run-shell.sh +1 -0
- 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 +1 -0
- 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 +1 -0
- package/payload/gate-sdk/checks/check-gate-assertions.sh +31 -6
- package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +2 -1
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +1 -0
- 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 +33 -3
- package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +36 -5
- package/payload/gate-sdk/checks/check-graph.sh +1 -0
- 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 +1 -0
- package/payload/gate-sdk/checks/check-reads-couples.sh +3 -2
- 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-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-output/bad/check-native-sample.gate +3 -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/expect.txt +1 -1
- 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/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +65 -4
- 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-test-hermetic-smoke.test.sh +2 -3
- package/payload/gate-sdk/gate-tests/lib-gate.test.sh +111 -1
- package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +73 -0
- package/payload/gate-sdk/lib/consumer-smoke.sh +24 -12
- package/payload/gate-sdk/lib/gate.sh +135 -11
- package/payload/gate-sdk/lib/inject.sh +25 -0
- package/payload/gate-sdk/lib/test-hermetic.sh +26 -0
- package/payload/gate-sdk/smoke/install.sh +42 -0
- package/payload/guard-kit/README.md +14 -11
- package/payload/guard-kit/SPEC.md +278 -62
- package/payload/guard-kit/bin/run-guard-tests.sh +1 -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 +276 -54
- package/payload/guard-kit/templates/close-triage.md +5 -5
- package/payload/guard-kit/templates/settings-hooks.json +7 -1
- package/payload/lifecycle-kit/README.md +11 -1
- package/payload/lifecycle-kit/SPEC.md +441 -37
- package/payload/lifecycle-kit/bin/cite-survey.sh +81 -0
- package/payload/lifecycle-kit/bin/enter-stage.sh +126 -10
- package/payload/lifecycle-kit/bin/file-gap.sh +27 -10
- package/payload/lifecycle-kit/bin/file-survey.sh +21 -2
- 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.test.sh +2 -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.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +54 -26
- package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +142 -0
- package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +100 -0
- package/payload/lifecycle-kit/lib/stages.sh +4 -0
- package/payload/lifecycle-kit/smoke/install.sh +67 -4
- package/payload/lifecycle-kit/templates/lead.md +36 -0
- package/payload/lifecycle-kit/templates/stages/close.md +30 -11
- package/payload/lifecycle-kit/templates/stages/scope.md +9 -4
- package/payload/lifecycle-kit/templates/stages/spec.md +5 -1
- package/payload/lifecycle-kit/templates/workflow-state-guard.sh +29 -0
- package/payload/queue-kit/README.md +3 -1
- package/payload/queue-kit/SPEC.md +123 -3
- package/payload/queue-kit/bin/queue-counts.sh +35 -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/queue-counts.test.sh +116 -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/site-kit/SPEC.md +23 -0
- 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/profiles.list +36 -8
- package/payload/canon-kit/checks/check-comment-tier.sh +0 -216
- 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-payload-claim.sh +0 -133
- 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 -187
- 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-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-template-registry-parity.sh +0 -81
- 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/lifecycle-kit/checks/check-survey-record.sh +0 -102
- package/payload/queue-kit/checks/check-queue-entry-budget.sh +0 -106
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# spec: gate-sdk/SPEC.md §upgrade-smoke — the two-phase upgrade proof on the consumer-smoke mechanics; the 'upgrade' validate suite each validate stage re-runs, and (TO=HEAD, the default) the standing pre-release assertion that the working tree upgrades cleanly from the last tag. Harness-less: bare bash + git, never the network.
|
|
2
|
+
# spec: gate-sdk/SPEC.md §upgrade-smoke — the two-phase upgrade proof on the consumer-smoke mechanics; the 'upgrade' validate suite each validate stage re-runs, and (TO=HEAD, the default) the standing pre-release assertion that the working tree upgrades cleanly from the last tag. Each phase runs its own ref's gate binary, built from a detached worktree at that ref. Harness-less: bare bash + git + cargo, never the network.
|
|
3
3
|
set -uo pipefail
|
|
4
4
|
|
|
5
5
|
SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
@@ -32,7 +32,15 @@ BASE="$(cd "$BASE" && pwd)"
|
|
|
32
32
|
export TMPDIR="$BASE" # csmoke_vendor_and_install mktemps the consumer under TMPDIR — pin it to the knob
|
|
33
33
|
WORK="$(mktemp -d "$BASE/upgrade-smoke.XXXXXX")" || exit 2
|
|
34
34
|
SCRATCH="" # csmoke_vendor_and_install sets this to the consumer dir
|
|
35
|
-
|
|
35
|
+
# spec: gate-sdk/SPEC.md §upgrade-smoke — a per-ref worktree outlives the run if the trap does not take it, and the repo's worktree-prune mechanism should not have to collect after a validate suite
|
|
36
|
+
WORKTREES=()
|
|
37
|
+
cleanup() {
|
|
38
|
+
local w
|
|
39
|
+
for w in "${WORKTREES[@]+"${WORKTREES[@]}"}"; do
|
|
40
|
+
git -C "$REPO" worktree remove --force "$w" >/dev/null 2>&1
|
|
41
|
+
done
|
|
42
|
+
rm -rf "$WORK" "$SCRATCH"
|
|
43
|
+
}
|
|
36
44
|
trap cleanup EXIT
|
|
37
45
|
|
|
38
46
|
FROM_TREE="$WORK/from"; TO_TREE="$WORK/to"
|
|
@@ -58,8 +66,41 @@ mapfile -t toroots < <(kit_dirs_in "$TO_TREE")
|
|
|
58
66
|
[[ ${#fromroots[@]} -gt 0 ]] || { echo "upgrade-smoke: no vendorable kits at FROM ($FROM)" >&2; exit 2; }
|
|
59
67
|
[[ ${#toroots[@]} -gt 0 ]] || { echo "upgrade-smoke: no vendorable kits at TO ($TO)" >&2; exit 2; }
|
|
60
68
|
|
|
61
|
-
# spec: gate-sdk/SPEC.md §upgrade-smoke —
|
|
62
|
-
|
|
69
|
+
# spec: gate-sdk/SPEC.md §upgrade-smoke — a ref's binary is built from a detached worktree at that ref, never from the archive tree its kits come from: native/build.rs stamps its source with `git ls-files` and panics outside a checkout, so an archive build dies in the build script and reads as a broken tag. The build lands in the worktree's own native/target/, which is already under the scratch base — so the host's build output is untouched and gate_native_bin's relative path still resolves against the checkout this names
|
|
70
|
+
REF_TREE=""
|
|
71
|
+
ref_binary_tree() { # $1 = ref, $2 = phase label -> sets REF_TREE to a checkout whose native/ is built
|
|
72
|
+
local ref="$1" label="$2" wt out
|
|
73
|
+
REF_TREE=""
|
|
74
|
+
command -v cargo >/dev/null 2>&1 || {
|
|
75
|
+
echo "upgrade-smoke: FAIL(env) — the $label ref ($ref) dispatches gate(s) to the binary and cargo is not on PATH; this suite builds one binary per ref" >&2
|
|
76
|
+
return 2
|
|
77
|
+
}
|
|
78
|
+
wt="$WORK/checkout-$label"
|
|
79
|
+
git -C "$REPO" worktree add --detach -q "$wt" "$ref" >/dev/null 2>&1 || {
|
|
80
|
+
echo "upgrade-smoke: FAIL(env) — could not add a detached worktree at the $label ref ($ref)" >&2
|
|
81
|
+
return 2
|
|
82
|
+
}
|
|
83
|
+
WORKTREES+=("$wt")
|
|
84
|
+
# spec: gate-sdk/SPEC.md §upgrade-smoke — a ref dispatching to a binary it carries no crate for is a tag fact, and the one thing this must not do is fall back to the host's binary, which is the present behavior wearing a fallback's clothes
|
|
85
|
+
[[ -d "$wt/native" ]] || {
|
|
86
|
+
echo "upgrade-smoke: FAIL(env) — the $label ref ($ref) dispatches gate(s) to the binary and carries no crate to build one from; a broken tag, not an upgrade finding" >&2
|
|
87
|
+
return 2
|
|
88
|
+
}
|
|
89
|
+
out="$( cd "$wt/native" && cargo build --release 2>&1 )" || {
|
|
90
|
+
echo "upgrade-smoke: FAIL(env) — the $label ref ($ref) will not build its gate binary under this toolchain; an environment or tag fact, never an upgrade finding" >&2
|
|
91
|
+
printf '%s\n' "$out" >&2
|
|
92
|
+
return 2
|
|
93
|
+
}
|
|
94
|
+
REF_TREE="$wt"
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
# spec: gate-sdk/SPEC.md §upgrade-smoke — step 1: vendor + install + baseline at FROM via the shared scratch-consumer builder, paired with FROM's own binary so phase 1's claim is about FROM alone, then run the battery (a red FROM baseline is a broken tag: exit 2, not an upgrade finding)
|
|
98
|
+
FROM_BIN=""
|
|
99
|
+
if [[ "$(csmoke_gate_descriptors "${fromroots[@]}")" -gt 0 ]]; then
|
|
100
|
+
ref_binary_tree "$FROM" from || exit 2
|
|
101
|
+
FROM_BIN="$REF_TREE"
|
|
102
|
+
fi
|
|
103
|
+
csmoke_vendor_and_install "$FROM_BIN" "${fromroots[@]}" \
|
|
63
104
|
|| { echo "upgrade-smoke: vendoring the FROM baseline ($FROM) failed — a broken tag, not an upgrade finding" >&2; exit 2; }
|
|
64
105
|
CONS="$SCRATCH"
|
|
65
106
|
|
|
@@ -81,6 +122,13 @@ for r in "${toroots[@]}"; do
|
|
|
81
122
|
done
|
|
82
123
|
for r in "${fromroots[@]}"; do kitname_seen["$(basename "$r")"]=1; done
|
|
83
124
|
|
|
125
|
+
# spec: gate-sdk/SPEC.md §upgrade-smoke — the binary is re-placed in the same motion that swaps the kit directories, because that swap is the upgrade transition: phase B's claim — TO's shell against TO's binary — then holds by construction rather than by the host tree happening to be TO
|
|
126
|
+
if [[ "$(csmoke_gate_descriptors "${toroots[@]}")" -gt 0 ]]; then
|
|
127
|
+
ref_binary_tree "$TO" to || exit 2
|
|
128
|
+
csmoke_place_binary "$REF_TREE" "${toroots[@]}" \
|
|
129
|
+
|| { echo "upgrade-smoke: FAIL(env) — could not place TO ($TO)'s gate binary in the scratch consumer" >&2; exit 2; }
|
|
130
|
+
fi
|
|
131
|
+
|
|
84
132
|
( cd "$CONS" && bash gate-sdk/bin/gen-pre-commit.sh --write >/dev/null ) \
|
|
85
133
|
|| { echo "upgrade-smoke: phase A gen-pre-commit failed at TO ($TO)" >&2; exit 2; }
|
|
86
134
|
( cd "$CONS" && bash gate-sdk/checks/check-graph.sh --emit > scripts/CHECK-GRAPH.html ) \
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
# graph: couples=.github/workflows/*.yml,.github/workflows/*.yaml,.github/ISSUE_TEMPLATE/*.yml,docs/_config.yml,kit:templates/*.yml,kit:templates/*.yaml dir=one valve=none tier=precommit
|
|
2
|
+
# install: on-surface
|
|
2
3
|
# spec: gate-sdk/SPEC.md §check-action-gh-repo — a job whose run: bodies invoke gh establishes a repository context: a checkout before the first call, GH_REPO in scope, or --repo on every call
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
# graph: couples=.github/workflows/*.yml,.github/workflows/*.yaml,.github/ISSUE_TEMPLATE/*.yml,docs/_config.yml,kit:templates/*.yml,kit:templates/*.yaml dir=one valve=none tier=precommit
|
|
2
|
+
# install: on-surface
|
|
2
3
|
# spec: gate-sdk/SPEC.md §check-action-pinning — every `uses:` ref in a scanned YAML file is immutable: a full 40-hex commit SHA, or a repo-local ./ path git pins at checkout
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=.github/workflows/*.yml,.github/workflows/*.yaml,.github/ISSUE_TEMPLATE/*.yml,docs/_config.yml,kit:templates/*.yml,kit:templates/*.yaml dir=one valve=none tier=precommit
|
|
3
|
+
# install: on-surface
|
|
3
4
|
# spec: gate-sdk/SPEC.md §check-action-run-shell — every GitHub Actions `run:` literal block scalar in an Actions-shaped YAML file is ShellCheck-clean at -S warning under the dialect the step actually runs
|
|
4
5
|
#
|
|
5
6
|
# usage: check-action-run-shell.sh [scan-root]
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# graph: couples=kit:smoke/*.sh,kit:gate-tests/*.test.sh,kit:bin/*.sh dir=one valve=none tier=precommit
|
|
2
|
+
# install: on-surface
|
|
3
|
+
# spec: gate-sdk/SPEC.md §check-assertion-strength — a guard over a call to a script whose declared `# exit:` header binds a verdict token to one non-zero code must not name that token in its failure message while comparing no status to that token's code
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=scripts/msg-patterns.list dir=one valve=none tier=commit-msg
|
|
3
|
+
# install: zero-config
|
|
3
4
|
# spec: gate-sdk/SPEC.md §check-commit-msg — the commit message matches no banned pattern (the leak guard for the message surface the pre-commit hook never sees)
|
|
4
5
|
#
|
|
5
6
|
# usage: check-commit-msg.sh <message-file> [pattern-file...]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=gate-sdk/lib/gate.sh dir=one valve=none tier=commit-msg
|
|
3
|
+
# install: on-surface
|
|
3
4
|
# spec: gate-sdk/SPEC.md §check-commit-subject — the subject line parses as <type>(<scope>)?!?: <summary> with <type> in the shared roster, or matches a git-generated carve-out (the parse guarantee under trajectory.sh's feat/debt column)
|
|
4
5
|
#
|
|
5
6
|
# usage: check-commit-subject.sh <message-file>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=scripts/core-files.list,kit:SPEC.md,kit:README.md dir=one valve=none tier=precommit
|
|
3
|
+
# install: on-surface
|
|
3
4
|
# spec: gate-sdk/SPEC.md §check-core-files — every path in the core-files manifest exists in the worktree and is tracked
|
|
4
5
|
#
|
|
5
6
|
# usage: check-core-files.sh [manifest]
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# graph: couples=native/Cargo.toml,native/build.rs,native/src/*.rs,native/src/gates/*.rs dir=one valve=none tier=precommit
|
|
3
|
+
# install: never
|
|
4
|
+
# spec: gate-sdk/SPEC.md §check-crate-arms — the crate's lint and test arms run at commit time, so a battery that passes cannot coexist with a CI that fails on them
|
|
5
|
+
#
|
|
6
|
+
# usage: check-crate-arms.sh
|
|
7
|
+
# The crate comes from GATE_SDK_NATIVE_CRATE and the build scratch from
|
|
8
|
+
# GATE_SDK_CARGO_TARGET_DIR; there are no positional arguments.
|
|
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
|
+
CRATE="$(gate_native_crate)"
|
|
16
|
+
TARGET_DIR="${GATE_SDK_CARGO_TARGET_DIR:-$CRATE/target}"
|
|
17
|
+
|
|
18
|
+
# spec: gate-sdk/SPEC.md §check-crate-arms — the predicate is the crate's presence, never
|
|
19
|
+
# cargo's: a consumer tree is missing the corpus, not the toolchain, and a gate with no
|
|
20
|
+
# corpus reports clean rather than declaring a skip
|
|
21
|
+
[[ -f "$CRATE/Cargo.toml" ]] || {
|
|
22
|
+
echo "CRATE-ARMS: clean (no crate at $CRATE — $CRATE/Cargo.toml is absent, so there is no corpus to lint or test)"
|
|
23
|
+
exit 0
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
# spec: gate-sdk/SPEC.md §Fail-closed contract — a crate with no toolchain to check it is
|
|
27
|
+
# "cannot verify", which must not share an exit code with "verified clean"
|
|
28
|
+
command -v cargo >/dev/null 2>&1 || {
|
|
29
|
+
echo "check-crate-arms: cargo is not on PATH but a crate is present at $CRATE — the check could not run; treating as failure (not clean)" >&2
|
|
30
|
+
echo " help: cargo is the contributor-side toolchain floor for a tree carrying the crate" >&2
|
|
31
|
+
echo " (context-kit/SPEC.md §bin/env-probe). Install a Rust toolchain, then re-run." >&2
|
|
32
|
+
exit 2
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
fail=0
|
|
36
|
+
|
|
37
|
+
# spec: gate-sdk/SPEC.md §check-crate-arms — both arms run even when the first fails, so one
|
|
38
|
+
# commit-time report carries what CI would have said in two
|
|
39
|
+
lint="$(cargo clippy --release --manifest-path "$CRATE/Cargo.toml" --target-dir "$TARGET_DIR" --all-targets -- -D warnings 2>&1)"; st=$?
|
|
40
|
+
if [[ "$st" -ne 0 ]]; then
|
|
41
|
+
echo "check-crate-arms: cargo clippy failed (exit $st) on $CRATE:"
|
|
42
|
+
echo "$lint"
|
|
43
|
+
fail=1
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
unit="$(cargo test --release --manifest-path "$CRATE/Cargo.toml" --target-dir "$TARGET_DIR" 2>&1)"; st=$?
|
|
47
|
+
if [[ "$st" -ne 0 ]]; then
|
|
48
|
+
echo "check-crate-arms: cargo test failed (exit $st) on $CRATE:"
|
|
49
|
+
echo "$unit"
|
|
50
|
+
fail=1
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
if [[ "$fail" -ne 0 ]]; then
|
|
54
|
+
echo " help: fix the finding above. These are the arms CI runs, and this gate is now their"
|
|
55
|
+
echo " only spelling — the battery plus bash gate-sdk/bin/build-native.sh is the whole"
|
|
56
|
+
echo " commit-time obligation, and neither discharges the other."
|
|
57
|
+
exit 1
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
echo "CRATE-ARMS: clean (cargo clippy --all-targets at -D warnings and cargo test, both --release over $CRATE, build scratch $TARGET_DIR)"
|
|
61
|
+
exit 0
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=docs/enforcement.md,scripts/gates.list,scripts/*.sh,kit:*.sh,scripts/kpis.list,.claude/settings.json,.github/workflows/*.yml dir=one valve=none tier=precommit
|
|
3
|
+
# install: on-surface
|
|
3
4
|
# spec: gate-sdk/SPEC.md §check-enforcement-fresh — docs/enforcement.md is the byte-fresh projection of enforcement-map.sh --emit
|
|
4
5
|
#
|
|
5
6
|
# usage: check-enforcement-fresh.sh [projection-file] [emit-file]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=kit:checks/*.sh,kit:kpis/*.sh,kit:bin/*.sh,scripts/check-*.sh,scripts/kpi-*.sh dir=one valve=none tier=precommit
|
|
3
|
+
# install: on-surface
|
|
3
4
|
# spec: gate-sdk/SPEC.md §check-exec-bit — every tracked *.sh matching an exec-glob carries git index mode 100755, or a by-path-invoked kit script degrades silently to a skipped check / failed plugin in a fresh clone
|
|
4
5
|
#
|
|
5
6
|
# usage: check-exec-bit.sh [ls-files-dump]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# graph: couples=kit:SPEC.md,scripts/*.sh,kit:*.sh dir=bi valve=none tier=align-only
|
|
2
|
+
# graph: couples=kit:SPEC.md,scripts/*.sh,kit:*.sh,native/src/gates/*.rs dir=bi valve=none tier=align-only
|
|
3
|
+
# install: zero-config
|
|
3
4
|
# spec: gate-sdk/SPEC.md §check-gate-assertions — couple each §<gate> enumerated-assertion span+count to the gate code's `# assertion` markers
|
|
4
5
|
#
|
|
5
6
|
# usage: check-gate-assertions.sh [spec [scripts-dir]] (defaults: kit SPEC.md set; kit checks/ dirs)
|
|
@@ -61,17 +62,30 @@ extract_contracts() { awk '
|
|
|
61
62
|
}
|
|
62
63
|
' "$1"; }
|
|
63
64
|
|
|
65
|
+
# spec: gate-sdk/SPEC.md §check-gate-assertions — a `.gate`-declared member carries its rule in
|
|
66
|
+
# the implementation module, so the markers are looked for there: the same follow-the-rule-to-the-
|
|
67
|
+
# module resolution §check-gate-output already owns, arriving here with the kit-roots cohort
|
|
68
|
+
# spec: gate-sdk/SPEC.md §check-gate-assertions — crate presence is the manifest, never the directory, for the reason §check-gate-output states: a build artifact creates the directory. Exit 3 means the member declares a compiled rule this tree does not carry — a vendored consumer's normal state, since no consumer receives the crate — and is skipped-and-counted rather than red, because a marker set that is not in the tree is not one this gate can assert over.
|
|
69
|
+
CRATE_MANIFEST="$(gate_native_crate)/Cargo.toml"
|
|
64
70
|
resolve_gate_file() {
|
|
65
71
|
if [[ -n "$SCRIPTS_DIR" ]]; then
|
|
66
72
|
[[ -f "$SCRIPTS_DIR/$1.sh" ]] && { printf '%s\n' "$SCRIPTS_DIR/$1.sh"; return 0; }
|
|
67
73
|
return 1
|
|
68
74
|
fi
|
|
69
75
|
local -a dirs
|
|
76
|
+
local decl
|
|
70
77
|
mapfile -t dirs < <(gate_check_dirs)
|
|
71
|
-
gate_resolve "$1" "${dirs[@]}"
|
|
78
|
+
decl="$(gate_resolve "$1" "${dirs[@]}")" || return 1
|
|
79
|
+
if [[ "$decl" == *.gate ]]; then
|
|
80
|
+
[[ -f "$CRATE_MANIFEST" ]] || return 3
|
|
81
|
+
decl="$(gate_native_module "$1")"
|
|
82
|
+
fi
|
|
83
|
+
[[ -f "$decl" ]] || return 1
|
|
84
|
+
printf '%s\n' "$decl"
|
|
72
85
|
}
|
|
73
86
|
|
|
74
87
|
findings=()
|
|
88
|
+
out_of_reach=()
|
|
75
89
|
coupled=0
|
|
76
90
|
for spec in "${SPECS[@]}"; do
|
|
77
91
|
contracts="$(extract_contracts "$spec")"; st=$?
|
|
@@ -86,13 +100,20 @@ for spec in "${SPECS[@]}"; do
|
|
|
86
100
|
findings+=("$spec §$gate: count-word says $n but the (X) span enumerates $lcount label(s) [$labels] — the contract is internally inconsistent")
|
|
87
101
|
fi
|
|
88
102
|
|
|
89
|
-
|
|
103
|
+
file="$(resolve_gate_file "$gate")"; rst=$?
|
|
104
|
+
if [[ "$rst" -eq 3 ]]; then
|
|
105
|
+
out_of_reach+=("$gate")
|
|
106
|
+
continue
|
|
107
|
+
fi
|
|
108
|
+
if [[ "$rst" -ne 0 ]]; then
|
|
90
109
|
findings+=("$spec §$gate: enumerated contract but no gate code resolves for '$gate' (heading must name the script)")
|
|
91
110
|
continue
|
|
92
111
|
fi
|
|
93
112
|
|
|
94
|
-
|
|
95
|
-
|
|
113
|
+
# spec: gate-sdk/SPEC.md §check-gate-assertions — the comment leader is the substrate's,
|
|
114
|
+
# so both spellings are read: a marker is a code marker either way
|
|
115
|
+
markers="$(grep -oE '(#|//)[[:space:]]*assertion[[:space:]]+[A-Za-z0-9]+:' "$file" \
|
|
116
|
+
| sed -E 's/^.*assertion[[:space:]]+([A-Za-z0-9]+):$/\1/' | sort -u | paste -sd, -)"
|
|
96
117
|
|
|
97
118
|
if [[ -z "$markers" ]]; then
|
|
98
119
|
findings+=("$spec §$gate: contract enumerates [$labels] but $file carries zero \`# assertion\` markers (retrofit obligation)")
|
|
@@ -119,5 +140,9 @@ if [[ ${#findings[@]} -gt 0 ]]; then
|
|
|
119
140
|
exit 1
|
|
120
141
|
fi
|
|
121
142
|
|
|
122
|
-
|
|
143
|
+
declared=""
|
|
144
|
+
if [[ ${#out_of_reach[@]} -gt 0 ]]; then
|
|
145
|
+
declared=", ${#out_of_reach[@]} declared out of reach with no crate at $CRATE_MANIFEST — ${out_of_reach[*]}"
|
|
146
|
+
fi
|
|
147
|
+
echo "GATE-ASSERTIONS: clean ($((coupled - ${#out_of_reach[@]})) of $coupled enumerated contract(s) coupled$declared)"
|
|
123
148
|
exit 0
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=kit:checks/*.gate,scripts/gates.list,native/* dir=one valve=none tier=precommit
|
|
3
|
+
# install: never
|
|
3
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
|
|
4
5
|
#
|
|
5
6
|
# usage: check-gate-binary-fresh.sh [gates-dir] [tree-stamp-file]
|
|
@@ -16,7 +17,7 @@ STAMP_FILE="${2:-}"
|
|
|
16
17
|
LIST="$GATES_DIR/gates.list"
|
|
17
18
|
BIN="$(gate_native_bin)"
|
|
18
19
|
CRATE="$(gate_native_crate)"
|
|
19
|
-
REBUILD="
|
|
20
|
+
REBUILD="bash gate-sdk/bin/build-native.sh"
|
|
20
21
|
|
|
21
22
|
RESOLVE_DIRS=("$GATES_DIR")
|
|
22
23
|
while IFS= read -r k; do RESOLVE_DIRS+=("$k/checks"); done < <(gate_kit_roots_rel)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=scripts/*.sh,kit:*.sh,TASK-QUEUE.md dir=one valve=none tier=precommit
|
|
3
|
+
# install: zero-config
|
|
3
4
|
# spec: gate-sdk/SPEC.md §check-gate-exemption-tasks — every exception-list element carries a live until: task or permanent: reason
|
|
4
5
|
#
|
|
5
6
|
# usage: check-gate-exemption-tasks.sh [queue-file [dir...]]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=scripts/*.sh,kit:*.sh dir=one valve=none tier=precommit
|
|
3
|
+
# install: zero-config
|
|
3
4
|
# spec: gate-sdk/SPEC.md §check-gate-fail-closed — every awk/jq capture in the gate family handles subprocess exit status
|
|
4
5
|
#
|
|
5
6
|
# usage: check-gate-fail-closed.sh [dir...]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=scripts/gates.list,scripts/*.sh,scripts/gate-tests/*,kit:*.sh dir=one valve=none tier=precommit
|
|
3
|
+
# install: zero-config
|
|
3
4
|
# spec: gate-sdk/SPEC.md §check-gate-fixture-coverage — every gates.list member has a fixture pair or a no-fixture opt-out
|
|
4
5
|
#
|
|
5
6
|
# usage: check-gate-fixture-coverage.sh [gates-dir [tests-dir...]]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=scripts/gates.list,scripts/*.sh,kit:*.sh dir=one valve=none tier=precommit
|
|
3
|
+
# install: zero-config
|
|
3
4
|
# spec: gate-sdk/SPEC.md §check-gate-output — every gates.list member emits a machine-keyable success line and a help: remedy
|
|
4
5
|
#
|
|
5
6
|
# usage: check-gate-output.sh [gates-dir]
|
|
@@ -19,8 +20,13 @@ members="$(gates_list_members "$LIST")"
|
|
|
19
20
|
RESOLVE_DIRS=("$DIR")
|
|
20
21
|
while IFS= read -r k; do RESOLVE_DIRS+=("$k/checks"); done < <(gate_kit_roots)
|
|
21
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
|
+
|
|
22
27
|
missing=()
|
|
23
28
|
no_help=()
|
|
29
|
+
out_of_reach=()
|
|
24
30
|
total=0
|
|
25
31
|
runtime=0
|
|
26
32
|
while IFS= read -r m; do
|
|
@@ -37,10 +43,27 @@ while IFS= read -r m; do
|
|
|
37
43
|
runtime=$((runtime + 1))
|
|
38
44
|
continue
|
|
39
45
|
fi
|
|
40
|
-
|
|
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
|
|
41
64
|
missing+=("$m (no '<NAME>: clean (…)' success line)")
|
|
42
65
|
fi
|
|
43
|
-
if ! grep -Eq
|
|
66
|
+
if ! grep -Eq "$emit.*help:" "$corpus"; then
|
|
44
67
|
no_help+=("$m (no 'help:' remedy line on the failure path)")
|
|
45
68
|
fi
|
|
46
69
|
done <<< "$members"
|
|
@@ -69,5 +92,12 @@ if [[ ${#missing[@]} -gt 0 || ${#no_help[@]} -gt 0 ]]; then
|
|
|
69
92
|
exit 1
|
|
70
93
|
fi
|
|
71
94
|
|
|
72
|
-
|
|
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)"
|
|
73
103
|
exit 0
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=scripts/gates.list,kit:checks/*,gate-sdk/SPEC.md,native/*,.github/workflows/publish.yml dir=one valve=none tier=precommit
|
|
3
|
+
# install: on-surface
|
|
3
4
|
# spec: gate-sdk/SPEC.md §check-gate-substrate-parity — one declaration per member, descriptor/subcommand parity both ways, a recorded disposition for every substrate-sensitive member, no implementation source inside the vendoring set, and one owner for the target roster the artifact path derives from
|
|
4
5
|
#
|
|
5
6
|
# usage: check-gate-substrate-parity.sh [gates-dir] [conservation-doc]
|
|
@@ -22,7 +23,14 @@ mapfile -t MEMBERS < <(gates_list_members "$LIST")
|
|
|
22
23
|
[[ ${#MEMBERS[@]} -gt 0 ]] || { echo "check-gate-substrate-parity: $LIST names no gates" >&2; exit 2; }
|
|
23
24
|
|
|
24
25
|
RESOLVE_DIRS=("$GATES_DIR")
|
|
25
|
-
|
|
26
|
+
# spec: gate-sdk/SPEC.md §check-gate-substrate-parity — assertion B's roster half scopes to the
|
|
27
|
+
# kits this tree vendored, so the same walk that builds the resolve dirs records their names
|
|
28
|
+
KIT_NAMES=()
|
|
29
|
+
while IFS= read -r k; do
|
|
30
|
+
RESOLVE_DIRS+=("$k/checks")
|
|
31
|
+
k="${k%/}"
|
|
32
|
+
KIT_NAMES+=("${k##*/}")
|
|
33
|
+
done < <(gate_kit_roots_rel)
|
|
26
34
|
|
|
27
35
|
# spec: gate-sdk/SPEC.md §Meta-gate conservation for the binary substrate — the one
|
|
28
36
|
# disposition surface, read by assertion B's reference-only allowance and assertion C
|
|
@@ -81,11 +89,17 @@ BIN="$(gate_native_bin)"
|
|
|
81
89
|
subcommands=()
|
|
82
90
|
refonly=0
|
|
83
91
|
roster_read=0
|
|
92
|
+
in_scope=0
|
|
93
|
+
out_of_scope=0
|
|
94
|
+
# spec: gate-sdk/SPEC.md §check-gate-substrate-parity — the fallback state is printed as its own
|
|
95
|
+
# word: a binary predating the owner column cannot answer which kit owns a subcommand, and the
|
|
96
|
+
# honest verdict there is today's unrestricted equality, declared rather than assumed
|
|
97
|
+
owner_state=scoped
|
|
84
98
|
# spec: gate-sdk/SPEC.md §check-gate-substrate-parity — the fail-closed arm is on the corrected
|
|
85
99
|
# predicate: descriptors nothing registered dispatches to leave the binary not load-bearing
|
|
86
100
|
if [[ "$dispatching" -gt 0 && ! -x "$BIN" ]]; then
|
|
87
101
|
echo "check-gate-substrate-parity: $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
|
|
88
|
-
echo " help: build it —
|
|
102
|
+
echo " help: build it — bash gate-sdk/bin/build-native.sh" >&2
|
|
89
103
|
exit 2
|
|
90
104
|
fi
|
|
91
105
|
# spec: gate-sdk/SPEC.md §check-gate-substrate-parity — the roster half is gated on a
|
|
@@ -94,12 +108,29 @@ if [[ -x "$BIN" ]]; then
|
|
|
94
108
|
roster_read=1
|
|
95
109
|
listing="$("$BIN" --list)"; st=$?
|
|
96
110
|
fail_closed "$st" check-gate-substrate-parity "$BIN --list"
|
|
97
|
-
mapfile -t
|
|
111
|
+
mapfile -t rows < <(printf '%s\n' "$listing" | grep -v '^$' | sort -u)
|
|
112
|
+
# spec: gate-sdk/SPEC.md §check-gate-substrate-parity — `<subcommand>\t<owning-kit>`; one
|
|
113
|
+
# row without the column drops the whole roster to the unrestricted equality, because a
|
|
114
|
+
# partly-scoped roster would speak for kits it could not place
|
|
115
|
+
owners=()
|
|
116
|
+
for row in "${rows[@]+"${rows[@]}"}"; do
|
|
117
|
+
subcommands+=("${row%%$'\t'*}")
|
|
118
|
+
if [[ "$row" == *$'\t'* ]]; then owners+=("${row#*$'\t'}"); else owners+=(""); owner_state=unavailable; fi
|
|
119
|
+
done
|
|
98
120
|
for g in "${DESCRIPTORS[@]+"${DESCRIPTORS[@]}"}"; do
|
|
99
121
|
printf '%s\n' "${subcommands[@]}" | grep -qx -- "$g" \
|
|
100
122
|
|| findings+=("descriptor names no subcommand: $g.gate declares a gate the binary does not carry")
|
|
101
123
|
done
|
|
102
|
-
|
|
124
|
+
# spec: gate-sdk/SPEC.md §check-gate-substrate-parity — the roster half speaks only for the
|
|
125
|
+
# kits this tree vendored: a subcommand whose owning kit is absent is neither dead code nor
|
|
126
|
+
# a half-finished port, it is out of scope, and it is counted rather than dropped silently
|
|
127
|
+
for i in "${!subcommands[@]}"; do
|
|
128
|
+
s="${subcommands[$i]}"
|
|
129
|
+
if [[ "$owner_state" == scoped ]] && ! printf '%s\n' "${KIT_NAMES[@]+"${KIT_NAMES[@]}"}" | grep -qx -- "${owners[$i]}"; then
|
|
130
|
+
out_of_scope=$((out_of_scope + 1))
|
|
131
|
+
continue
|
|
132
|
+
fi
|
|
133
|
+
in_scope=$((in_scope + 1))
|
|
103
134
|
printf '%s\n' "${DESCRIPTORS[@]+"${DESCRIPTORS[@]}"}" | grep -qx -- "$s" && continue
|
|
104
135
|
if grep -F -- "\`$s\`" <<<"$section" | grep -qi -- 'reference-only'; then
|
|
105
136
|
refonly=$((refonly + 1))
|
|
@@ -294,7 +325,7 @@ if [[ ${#findings[@]} -gt 0 ]]; then
|
|
|
294
325
|
fi
|
|
295
326
|
|
|
296
327
|
if [[ "$roster_read" == 1 ]]; then
|
|
297
|
-
roster="${#DESCRIPTORS[@]} descriptor(s) in parity with the ${#subcommands[@]}-subcommand roster, $refonly reference-only"
|
|
328
|
+
roster="${#DESCRIPTORS[@]} descriptor(s) in parity with the ${#subcommands[@]}-subcommand roster ($in_scope in scope, $out_of_scope owned by a kit this tree did not vendor, owner column $owner_state), $refonly reference-only"
|
|
298
329
|
else
|
|
299
330
|
roster="${#DESCRIPTORS[@]} descriptor(s), no binary at $BIN so no subcommand roster to compare"
|
|
300
331
|
fi
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=scripts/gates.list,scripts/*.sh,kit:*.sh,scripts/git-hooks/pre-commit,scripts/CHECK-GRAPH.html,docs/check-graph.html,SPEC-*.md,*/SPEC-*.md dir=one valve=none tier=precommit
|
|
3
|
+
# install: zero-config
|
|
3
4
|
# spec: gate-sdk/SPEC.md §check-graph — manifest well-formedness, trigger parity, cycle valves, artifact drift, and amendment-body manifest validation (assertion G)
|
|
4
5
|
set -uo pipefail
|
|
5
6
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=scripts/git-hooks/* dir=one valve=none tier=precommit
|
|
3
|
+
# install: on-surface
|
|
3
4
|
# spec: gate-sdk/SPEC.md §check-hook-exec-bit — every tracked file in the hooks dir carries index mode 100755, or a fresh clone silently skips a non-executable hook
|
|
4
5
|
#
|
|
5
6
|
# usage: check-hook-exec-bit.sh [hooks-dir]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=scripts/identity.conf dir=one valve=none tier=precommit
|
|
3
|
+
# install: on-surface
|
|
3
4
|
# spec: gate-sdk/SPEC.md §check-identity — every expectation in the identity manifest matches this clone's local git identity
|
|
4
5
|
#
|
|
5
6
|
# usage: check-identity.sh [--fixture <dir>] [manifest]
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# graph: couples=kit:checks/check-*.sh,kit:checks/check-*.gate,kit:smoke/install.sh,installer/lib/common/recipe.sh dir=one valve=none tier=precommit
|
|
3
|
+
# install: zero-config
|
|
4
|
+
# spec: gate-sdk/SPEC.md §check-install-disposition — every shipped gate declares one install disposition, every zero-config gate is registrable in its kit's smoke, and the installer keeps no second copy of the roster
|
|
5
|
+
#
|
|
6
|
+
# usage: check-install-disposition.sh [root]
|
|
7
|
+
# bare: sweep gate_kit_roots against the git toplevel; root: resolve relative
|
|
8
|
+
# kit roots against a fixture tree (the case dir's gate-sdk-config.sh names them).
|
|
9
|
+
set -uo pipefail
|
|
10
|
+
|
|
11
|
+
SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
12
|
+
# shellcheck source=../lib/gate.sh
|
|
13
|
+
source "$SDK/lib/gate.sh"
|
|
14
|
+
|
|
15
|
+
ROOT="${1:-}"
|
|
16
|
+
if [[ -z "$ROOT" ]]; then
|
|
17
|
+
ROOT="$(git rev-parse --show-toplevel 2>/dev/null)" \
|
|
18
|
+
|| { echo "check-install-disposition: not a git repository and no root argument" >&2; exit 2; }
|
|
19
|
+
fi
|
|
20
|
+
[[ -d "$ROOT" ]] || { echo "check-install-disposition: root not found: $ROOT" >&2; exit 2; }
|
|
21
|
+
|
|
22
|
+
# spec: gate-sdk/SPEC.md §The install disposition — the vocabulary is closed, so an unrecognised value is a finding rather than a pass-through: it names install-time reachability and nothing else
|
|
23
|
+
VOCAB='zero-config|on-surface|never'
|
|
24
|
+
RECIPE="installer/lib/common/recipe.sh"
|
|
25
|
+
|
|
26
|
+
mapfile -t KIT_ROOTS < <(gate_kit_roots)
|
|
27
|
+
[[ ${#KIT_ROOTS[@]} -gt 0 ]] || { echo "check-install-disposition: no kit roots enumerated" >&2; exit 2; }
|
|
28
|
+
|
|
29
|
+
findings=()
|
|
30
|
+
declared=0
|
|
31
|
+
zeroconf=0
|
|
32
|
+
for r in "${KIT_ROOTS[@]}"; do
|
|
33
|
+
r="${r%/}"
|
|
34
|
+
abs="$r"
|
|
35
|
+
[[ "$abs" == /* ]] || abs="$ROOT/$r"
|
|
36
|
+
kit="${r##*/}"
|
|
37
|
+
[[ -d "$abs/checks" ]] || continue
|
|
38
|
+
smoke="$abs/smoke/install.sh"
|
|
39
|
+
shopt -s nullglob
|
|
40
|
+
for f in "$abs"/checks/check-*.sh "$abs"/checks/check-*.gate; do
|
|
41
|
+
name="${f##*/}"; name="${name%.*}"
|
|
42
|
+
[[ -r "$f" ]] || { echo "check-install-disposition: unreadable gate header: $kit/checks/${f##*/}" >&2; exit 2; }
|
|
43
|
+
mapfile -t lines < <(grep '^# install:' "$f")
|
|
44
|
+
if [[ ${#lines[@]} -ne 1 ]]; then
|
|
45
|
+
findings+=("$kit/checks/${f##*/}: ${#lines[@]} '# install:' line(s) where a gate declares exactly one")
|
|
46
|
+
continue
|
|
47
|
+
fi
|
|
48
|
+
value="$(awk 'sub(/^# install:[[:space:]]+/, "") { print $1; exit }' "$f")"; st=$?
|
|
49
|
+
fail_closed "$st" check-install-disposition awk
|
|
50
|
+
if [[ ! "$value" =~ ^($VOCAB)$ ]]; then
|
|
51
|
+
findings+=("$kit/checks/${f##*/}: install disposition '${value:-<empty>}' is outside the closed vocabulary")
|
|
52
|
+
continue
|
|
53
|
+
fi
|
|
54
|
+
declared=$((declared + 1))
|
|
55
|
+
[[ "$value" == zero-config ]] || continue
|
|
56
|
+
zeroconf=$((zeroconf + 1))
|
|
57
|
+
# spec: gate-sdk/SPEC.md §check-install-disposition — the direction is the census's finding made mechanical: the smoke's tree is a superset of the tree init makes, so a gate the installer registers must be registrable there too. The converse is deliberately not asserted
|
|
58
|
+
if [[ ! -f "$smoke" ]]; then
|
|
59
|
+
findings+=("$kit/checks/${f##*/}: declares zero-config where $kit ships no smoke/install.sh to register it")
|
|
60
|
+
elif ! grep -qxF "$name" "$smoke"; then
|
|
61
|
+
findings+=("$kit/checks/${f##*/}: declares zero-config but $kit/smoke/install.sh does not register it")
|
|
62
|
+
fi
|
|
63
|
+
done
|
|
64
|
+
shopt -u nullglob
|
|
65
|
+
done
|
|
66
|
+
[[ "$declared" -gt 0 || ${#findings[@]} -gt 0 ]] \
|
|
67
|
+
|| { echo "check-install-disposition: kit roots enumerated but no gate found under any checks/" >&2; exit 2; }
|
|
68
|
+
|
|
69
|
+
# spec: gate-sdk/SPEC.md §check-install-disposition — assertion C holds the de-literalization going forward rather than only at the commit that lands it; the file is absent in a vendored consumer, which has no installer, so its absence is a skip and never a finding. A §-prefixed occurrence is a spec-section citation rather than a roster member and is stripped before the match: a section reference registers nothing, which is the only thing this assertion is about
|
|
70
|
+
recipe_checked=no
|
|
71
|
+
if [[ -f "$ROOT/$RECIPE" ]]; then
|
|
72
|
+
recipe_checked=yes
|
|
73
|
+
literals="$(awk '{ l=$0; gsub(/§[A-Za-z0-9_-]+/, "", l); if (l ~ /check-[a-z0-9]+(-[a-z0-9]+)*/) print FNR }' "$ROOT/$RECIPE")"; st=$?
|
|
74
|
+
fail_closed "$st" check-install-disposition awk
|
|
75
|
+
while IFS= read -r hit; do
|
|
76
|
+
[[ -n "$hit" ]] || continue
|
|
77
|
+
findings+=("$RECIPE:$hit: literal gate name — the roster is derived from each gate's declaration, never listed here")
|
|
78
|
+
done <<<"$literals"
|
|
79
|
+
fi
|
|
80
|
+
|
|
81
|
+
if [[ ${#findings[@]} -gt 0 ]]; then
|
|
82
|
+
echo "check-install-disposition: install-disposition finding(s):"
|
|
83
|
+
for f in "${findings[@]}"; do echo " $f"; done
|
|
84
|
+
echo " help: give every gate exactly one '# install: <$VOCAB>' line beside its"
|
|
85
|
+
echo " '# graph:' directive; register each zero-config gate in its kit's"
|
|
86
|
+
echo " smoke/install.sh; and keep $RECIPE free of literal"
|
|
87
|
+
echo " gate names — it derives the roster (gate-sdk/SPEC.md §The install disposition)."
|
|
88
|
+
exit 1
|
|
89
|
+
fi
|
|
90
|
+
|
|
91
|
+
echo "INSTALL-DISPOSITION: clean ($declared gate(s) declared, $zeroconf zero-config and registrable in their kit's smoke; recipe de-literalization checked: $recipe_checked)"
|
|
92
|
+
exit 0
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=scripts/gates.list,kit:checks/*.sh dir=one valve=none tier=precommit
|
|
3
|
+
# install: on-surface
|
|
3
4
|
# spec: gate-sdk/SPEC.md §check-kit-enum — a literal hand list of >=2 kit roots sharing a glob must name every kit root with matching tracked files; the fix is the kit:<glob> token, not a longer list
|
|
4
5
|
#
|
|
5
6
|
# usage: check-kit-enum.sh [gates-dir]
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# graph: couples=README.md,kit:gate-tests/* dir=one valve=none tier=precommit
|
|
2
|
+
# install: on-surface
|
|
3
|
+
# spec: gate-sdk/SPEC.md §check-kit-registration — every gate_kit_roots kit is registered in the human-facing docs: a registry-doc row linking into each root, and a fixture-runner line for each root that ships gate-tests
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=kit:README.md,kit:checks/* dir=bi valve=none tier=precommit
|
|
3
|
+
# install: on-surface
|
|
3
4
|
# spec: gate-sdk/SPEC.md §check-readme-roster — every kit README's gate-roster marker block holds name-set parity with the kit's shipped checks/ basenames, both directions
|
|
4
5
|
#
|
|
5
6
|
# usage: check-readme-roster.sh [root]
|