checkwright 0.23.0 → 0.25.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 +175 -13
- package/lib/common/lock.sh +7 -0
- package/lib/common/recipe.sh +1 -1
- package/lib/diff.sh +2 -0
- package/lib/init.sh +40 -16
- package/lib/uninstall.sh +2 -0
- package/package.json +2 -2
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
- package/payload/canon-kit/README.md +2 -0
- package/payload/canon-kit/SPEC.md +454 -28
- package/payload/canon-kit/checks/check-amendment-queue.gate +3 -0
- package/payload/canon-kit/checks/check-amendment-update-target.gate +3 -0
- package/payload/canon-kit/checks/check-docs-link-convention.gate +3 -0
- package/payload/canon-kit/checks/check-knob-default-coupling.gate +3 -0
- package/payload/canon-kit/checks/check-prose-tells.gate +3 -0
- package/payload/canon-kit/checks/check-spec-embedded-source.gate +3 -0
- package/payload/canon-kit/checks/check-unmarked-claim.gate +3 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/SPEC-orphan.md +6 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +7 -2
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +8 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target/bad/SPEC-thing.md +26 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target/bad/expect.txt +8 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target/good/SPEC-widget.md +47 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target.test.sh +82 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.sh +3 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +4 -4
- package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +2 -2
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/SPEC-wire.md +18 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/expect.txt +3 -1
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/widget.proto +13 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC-wire.md +22 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC.md +17 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/widget.proto +13 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/SPEC.md +11 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/scripts/canon-config.sh +6 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/good/SPEC.md +18 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/good/scripts/canon-config.sh +6 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim.test.sh +85 -0
- package/payload/canon-kit/lib/spec.sh +16 -0
- package/payload/canon-kit/smoke/install.sh +3 -1
- package/payload/canon-kit/templates/SPEC-amendment.md +17 -2
- package/payload/context-kit/README.md +6 -4
- package/payload/context-kit/SPEC.md +256 -76
- package/payload/context-kit/bin/always-loaded.sh +5 -21
- package/payload/context-kit/bin/env-probe.sh +2 -17
- package/payload/context-kit/checks/check-brevity.gate +3 -0
- package/payload/context-kit/checks/check-footprint-fresh.gate +3 -0
- package/payload/context-kit/checks/check-memory-off.gate +3 -0
- package/payload/context-kit/checks/check-settings-paths.gate +3 -0
- package/payload/context-kit/checks/check-settings-pins.gate +3 -0
- package/payload/context-kit/gate-tests/check-brevity.test.sh +3 -2
- package/payload/context-kit/gate-tests/check-memory-off/bad/scripts/context-config.sh +4 -0
- package/payload/context-kit/gate-tests/check-memory-off/good/scripts/context-config.sh +4 -0
- package/payload/context-kit/gate-tests/check-memory-off.test.sh +18 -4
- package/payload/context-kit/gate-tests/check-settings-pins.test.sh +70 -0
- package/payload/context-kit/index-tests/expected/toolfloor.txt +5 -5
- package/payload/context-kit/index-tests/toolfloor-cases.sh +5 -5
- package/payload/context-kit/lib/context.sh +56 -0
- package/payload/context-kit/lib/toolfloor.sh +1 -1
- package/payload/context-kit/smoke/agents-md.sh +16 -4
- package/payload/context-kit/smoke/install.sh +3 -2
- package/payload/context-kit/templates/session-context.sh +5 -5
- package/payload/delegation-kit/README.md +11 -1
- package/payload/delegation-kit/SPEC.md +652 -11
- package/payload/delegation-kit/bin/wait-probe.sh +184 -0
- package/payload/delegation-kit/checks/check-agent-tier-explicit.gate +3 -0
- package/payload/delegation-kit/checks/check-gate-tamper.gate +3 -0
- package/payload/delegation-kit/checks/check-rule-citation.gate +3 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/added-exemptions +5 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/expect.txt +2 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +108 -0
- package/payload/delegation-kit/gate-tests/subagent-stop-liveness.test.sh +99 -0
- package/payload/delegation-kit/smoke/install.sh +21 -1
- package/payload/delegation-kit/templates/agent-execution.md +88 -4
- package/payload/delegation-kit/templates/subagent-stop-liveness.sh +56 -0
- package/payload/doctrine-kit/SPEC.md +1 -1
- package/payload/doctrine-kit/checks/check-doctrine-registration.gate +3 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +2 -3
- package/payload/doctrine-kit/smoke/install.sh +17 -4
- package/payload/drift-kit/README.md +2 -2
- package/payload/drift-kit/SPEC.md +71 -7
- package/payload/drift-kit/bin/stage-economics.sh +1 -1
- package/payload/drift-kit/lib/drift.sh +43 -0
- package/payload/drift-kit/smoke/install.sh +21 -14
- package/payload/evidence-kit/README.md +3 -1
- package/payload/evidence-kit/SPEC.md +160 -19
- package/payload/evidence-kit/checks/check-battery-roster.gate +3 -0
- package/payload/evidence-kit/checks/check-evidence-baseline.gate +3 -0
- package/payload/evidence-kit/checks/check-evidence-manifest.gate +3 -0
- package/payload/evidence-kit/checks/check-producer-liveness.sh +42 -2
- package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +4 -3
- package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +8 -5
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/WORKFLOW-STATE.txt +1 -1
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/scripts/evidence-config.sh +9 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/WORKFLOW-STATE.txt +1 -1
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/scripts/evidence-config.sh +9 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +6 -4
- package/payload/evidence-kit/gate-tests/producer-lock.test.sh +42 -1
- package/payload/evidence-kit/lib/evidence.sh +2 -0
- package/payload/evidence-kit/smoke/install.sh +1 -1
- package/payload/gate-sdk/README.md +17 -9
- package/payload/gate-sdk/SPEC.md +4680 -295
- package/payload/gate-sdk/bin/build-native.sh +66 -1
- package/payload/gate-sdk/bin/install-hooks.sh +14 -2
- package/payload/gate-sdk/bin/port-blockers.sh +37 -9
- package/payload/gate-sdk/bin/run-gate-tests.sh +1 -2
- package/payload/gate-sdk/bin/run-gates.sh +137 -13
- package/payload/gate-sdk/bin/upgrade-smoke.sh +21 -16
- package/payload/gate-sdk/checks/check-action-run-shell.sh +2 -1
- package/payload/gate-sdk/checks/check-commit-msg.gate +3 -0
- package/payload/gate-sdk/checks/check-commit-subject.gate +3 -0
- package/payload/gate-sdk/checks/check-core-files.gate +3 -0
- package/payload/gate-sdk/checks/check-crate-arms.sh +1 -0
- package/payload/gate-sdk/checks/check-enforcement-fresh.gate +3 -0
- package/payload/gate-sdk/checks/check-exec-bit.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-assertions.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-binary-fresh.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-fail-closed.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-fixture-coverage.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-output.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +132 -15
- package/payload/gate-sdk/checks/check-graph.gate +3 -0
- package/payload/gate-sdk/checks/check-hook-exec-bit.gate +3 -0
- package/payload/gate-sdk/checks/check-identity.gate +3 -0
- package/payload/gate-sdk/checks/check-install-disposition.sh +1 -0
- package/payload/gate-sdk/checks/check-kit-enum.gate +3 -0
- package/payload/gate-sdk/checks/check-readme-roster.gate +3 -0
- package/payload/gate-sdk/checks/check-reads-couples.gate +3 -0
- package/payload/gate-sdk/checks/check-root-tiering.gate +3 -0
- package/payload/gate-sdk/checks/check-shellcheck.sh +1 -0
- package/payload/gate-sdk/checks/check-template-copy-parity.gate +3 -0
- package/payload/gate-sdk/checks/check-tree-terms.gate +3 -0
- package/payload/gate-sdk/checks/check-workflow-tiering.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +17 -12
- package/payload/gate-sdk/gate-tests/check-core-files.test.sh +4 -5
- package/payload/gate-sdk/gate-tests/check-exec-bit/bad/dump.txt +2 -1
- package/payload/gate-sdk/gate-tests/check-exec-bit/bad/expect.txt +2 -1
- package/payload/gate-sdk/gate-tests/check-exec-bit/good/dump.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +3 -4
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/expect.txt +5 -1
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/SPEC.md +22 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-count.sh +11 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-extra.sh +14 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-zero.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/SPEC.md +27 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/check-qux.sh +13 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions.test.sh +117 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +26 -4
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/args +6 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored-descriptor.gate +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored.sh +14 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-descriptor.gate +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-held.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/args +8 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored-descriptor.gate +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored.sh +14 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-descriptor.gate +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-held.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks.test.sh +77 -0
- package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +4 -5
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/kit-spec.md +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-bare.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-both.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-heldtwice.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-nospec.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-twice.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-ungrounded.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +2 -1
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/kit-spec.md +12 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-held.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +49 -4
- package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +15 -5
- package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +12 -0
- package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-example-gate.md +27 -5
- package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-second-gate.md +12 -0
- package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +5 -4
- package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +14 -12
- package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +43 -17
- package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +190 -0
- package/payload/gate-sdk/gate-tests/check-identity/bad/gh-hosts.yml +9 -0
- package/payload/gate-sdk/gate-tests/check-identity/bad/identity.conf +4 -2
- package/payload/gate-sdk/gate-tests/check-identity/bad/scripts/gate-sdk-config.sh +10 -0
- package/payload/gate-sdk/gate-tests/check-identity/good/gh-hosts.yml +11 -0
- package/payload/gate-sdk/gate-tests/check-identity/good/identity.conf +5 -1
- package/payload/gate-sdk/gate-tests/check-identity/good/scripts/gate-sdk-config.sh +10 -0
- package/payload/gate-sdk/gate-tests/check-identity.test.sh +114 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/bad/check-native-sample.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/bad/gates.list +4 -1
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/check-native-sample.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/gates.list +5 -2
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/args +3 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/README.md +15 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-one.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-two.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/expect.txt +3 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +3 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/README.md +13 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/checks/check-delta-one.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/README.md +14 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-one.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-two.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +87 -89
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/agent-budget-guard.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity.test.sh +56 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/multi.txt +4 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/second-leak.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/patterns.list +3 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/anchored.txt +4 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/msg-patterns.list +2 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/msg-patterns.local.list +3 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/worktrees/vendored-note.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms.test.sh +94 -0
- package/payload/gate-sdk/gate-tests/declaration-lib-parity.test.sh +211 -0
- package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +16 -15
- package/payload/gate-sdk/gate-tests/lib-gate.test.sh +94 -1
- package/payload/gate-sdk/lib/gate.sh +232 -25
- package/payload/gate-sdk/smoke/install.sh +28 -1
- package/payload/guard-kit/README.md +4 -3
- package/payload/guard-kit/SPEC.md +578 -47
- package/payload/guard-kit/bin/compare-settings-allow.sh +36 -12
- package/payload/guard-kit/bin/run-guard-tests.sh +27 -4
- package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +46 -1
- package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +105 -0
- package/payload/guard-kit/guard-tests/background-cases.tsv +14 -0
- package/payload/guard-kit/guard-tests/cases.tsv +67 -9
- package/payload/guard-kit/lib/guard.sh +361 -18
- package/payload/guard-kit/templates/bash-guard.sh +2 -0
- package/payload/guard-kit/templates/close-triage.md +10 -3
- package/payload/guard-kit/templates/guard-config.sh +3 -0
- package/payload/lifecycle-kit/README.md +3 -2
- package/payload/lifecycle-kit/SPEC.md +509 -77
- package/payload/lifecycle-kit/bin/enter-stage.sh +72 -33
- package/payload/lifecycle-kit/bin/file-gap.sh +2 -2
- package/payload/lifecycle-kit/checks/check-close-surfaces.gate +3 -0
- package/payload/lifecycle-kit/checks/check-stage-entry.gate +3 -0
- package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +4 -4
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +1 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/bad/.workflow/WORKFLOW-STATE.txt +3 -3
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/good/.workflow/WORKFLOW-STATE.txt +3 -3
- package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +22 -22
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/bad/.workflow/WORKFLOW-STATE.txt +2 -2
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/good/.workflow/WORKFLOW-STATE.txt +2 -2
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +120 -10
- package/payload/lifecycle-kit/gate-tests/gap-inbox-route.test.sh +123 -0
- package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +11 -11
- package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +16 -5
- package/payload/lifecycle-kit/lib/stages.sh +5 -0
- package/payload/lifecycle-kit/smoke/install.sh +29 -15
- package/payload/lifecycle-kit/templates/lead.md +32 -0
- package/payload/lifecycle-kit/templates/stages/align.md +20 -2
- package/payload/lifecycle-kit/templates/stages/build.md +3 -3
- package/payload/lifecycle-kit/templates/stages/close.md +20 -6
- package/payload/lifecycle-kit/templates/stages/scope.md +20 -1
- package/payload/lifecycle-kit/templates/stages/spec.md +1 -1
- package/payload/lifecycle-kit/templates/stages/validate.md +1 -1
- package/payload/lifecycle-kit/templates/workflow-state-guard.sh +1 -1
- package/payload/queue-kit/README.md +10 -10
- package/payload/queue-kit/SPEC.md +379 -84
- package/payload/queue-kit/bin/queue-counts.sh +1 -1
- package/payload/queue-kit/checks/check-queue-entry-budget.gate +1 -1
- package/payload/queue-kit/checks/check-queue-prose-precondition.gate +3 -0
- package/payload/queue-kit/checks/check-roadmap-fresh.gate +3 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +15 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +2 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +7 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/expect.txt +4 -0
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/expect.txt +1 -1
- package/payload/queue-kit/gate-tests/queue-counts.test.sh +1 -1
- package/payload/queue-kit/gate-tests/queue-index.test.sh +55 -119
- package/payload/queue-kit/gate-tests/roadmap.test.sh +22 -12
- package/payload/queue-kit/lib/queue.sh +0 -49
- package/payload/queue-kit/smoke/install.sh +1 -1
- package/payload/site-kit/SPEC.md +41 -2
- package/payload/site-kit/checks/check-docs-cname-parity.gate +3 -0
- package/payload/site-kit/checks/check-docs-render-fidelity.sh +1 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +5 -4
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +6 -5
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/checks/check-sample.gate +3 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/expect.txt +1 -1
- package/payload/site-kit/smoke/install.sh +1 -1
- package/payload/canon-kit/checks/check-amendment-queue.sh +0 -117
- package/payload/canon-kit/checks/check-docs-link-convention.sh +0 -79
- package/payload/canon-kit/checks/check-knob-default-coupling.sh +0 -240
- package/payload/canon-kit/checks/check-prose-tells.sh +0 -208
- package/payload/canon-kit/checks/check-spec-embedded-source.sh +0 -134
- package/payload/context-kit/bin/footprint.sh +0 -144
- package/payload/context-kit/checks/check-brevity.sh +0 -124
- package/payload/context-kit/checks/check-footprint-fresh.sh +0 -39
- package/payload/context-kit/checks/check-memory-off.sh +0 -113
- package/payload/context-kit/checks/check-settings-paths.sh +0 -94
- package/payload/context-kit/checks/check-settings-pins.sh +0 -111
- package/payload/context-kit/gate-tests/check-memory-off/bad/args +0 -1
- package/payload/context-kit/gate-tests/check-memory-off/good/args +0 -1
- package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +0 -62
- package/payload/delegation-kit/checks/check-gate-tamper.sh +0 -140
- package/payload/delegation-kit/checks/check-rule-citation.sh +0 -77
- package/payload/doctrine-kit/checks/check-doctrine-registration.sh +0 -246
- package/payload/drift-kit/bin/trajectory.sh +0 -242
- package/payload/evidence-kit/checks/check-battery-roster.sh +0 -87
- package/payload/evidence-kit/checks/check-evidence-baseline.sh +0 -104
- package/payload/evidence-kit/checks/check-evidence-manifest.sh +0 -105
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/args +0 -3
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/args +0 -3
- package/payload/gate-sdk/bin/enforcement-map.sh +0 -273
- package/payload/gate-sdk/checks/check-commit-msg.sh +0 -51
- package/payload/gate-sdk/checks/check-commit-subject.sh +0 -44
- package/payload/gate-sdk/checks/check-core-files.sh +0 -76
- package/payload/gate-sdk/checks/check-enforcement-fresh.sh +0 -38
- package/payload/gate-sdk/checks/check-exec-bit.sh +0 -96
- package/payload/gate-sdk/checks/check-gate-assertions.sh +0 -148
- package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +0 -107
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +0 -106
- package/payload/gate-sdk/checks/check-gate-fail-closed.sh +0 -85
- package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +0 -93
- package/payload/gate-sdk/checks/check-gate-output.sh +0 -103
- package/payload/gate-sdk/checks/check-graph.sh +0 -632
- package/payload/gate-sdk/checks/check-hook-exec-bit.sh +0 -46
- package/payload/gate-sdk/checks/check-identity.sh +0 -135
- package/payload/gate-sdk/checks/check-kit-enum.sh +0 -95
- package/payload/gate-sdk/checks/check-readme-roster.sh +0 -108
- package/payload/gate-sdk/checks/check-reads-couples.sh +0 -200
- package/payload/gate-sdk/checks/check-root-tiering.sh +0 -67
- package/payload/gate-sdk/checks/check-template-copy-parity.sh +0 -127
- package/payload/gate-sdk/checks/check-tree-terms.sh +0 -66
- package/payload/gate-sdk/checks/check-workflow-tiering.sh +0 -85
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/args +0 -1
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/args +0 -1
- package/payload/gate-sdk/gate-tests/check-identity/bad/args +0 -1
- package/payload/gate-sdk/gate-tests/check-identity/good/args +0 -1
- package/payload/lifecycle-kit/bin/close-surfaces.sh +0 -94
- package/payload/lifecycle-kit/checks/check-close-surfaces.sh +0 -64
- package/payload/lifecycle-kit/checks/check-stage-entry.sh +0 -198
- package/payload/queue-kit/bin/queue-index.sh +0 -182
- package/payload/queue-kit/bin/roadmap.sh +0 -76
- package/payload/queue-kit/checks/check-queue-prose-precondition.sh +0 -64
- package/payload/queue-kit/checks/check-roadmap-fresh.sh +0 -111
- package/payload/site-kit/checks/check-docs-cname-parity.sh +0 -81
- /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/{gates → scripts}/check-sample.sh +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/{gates → scripts}/check-sample.sh +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{check-gamma.sh → scripts/check-gamma.sh} +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gates.list → scripts/gates.list} +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{check-beta.sh → scripts/check-beta.sh} +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gates.list → scripts/gates.list} +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/{site-config.sh → scripts/site-config.sh} +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/CNAME +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/index.md +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/docs → docs}/posts/2026-01-01-legacy.md +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/pkg → pkg}/gate-tests/fixture.md +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{site-config.sh → scripts/site-config.sh} +0 -0
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
# SPEC-example-gate — amendment fixture (bad)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
failure that motivated
|
|
5
|
-
|
|
6
|
-
the manifest into a real gate.
|
|
3
|
+
Every finding assertion G can raise, one manifest per group — the recurring
|
|
4
|
+
failure that motivated it being the legacy tokens in the second: `dir=` and
|
|
5
|
+
`valve=` carried `mono`/`no-fixture`, values that were never legal, undetected
|
|
6
|
+
until build re-typed the manifest into a real gate.
|
|
7
7
|
|
|
8
8
|
## Definition of Done
|
|
9
9
|
|
|
10
|
-
- [ ] `check-
|
|
10
|
+
- [ ] `check-bare-gate.sh` carries no required key and one token that is not a
|
|
11
|
+
key at all (`# graph: mode=partial bogus=1`).
|
|
12
|
+
- [ ] `check-example-gate.sh` carries the legacy tokens
|
|
11
13
|
(`# graph: couples=gate-tests,check-*.sh dir=mono valve=no-fixture tier=precommit`);
|
|
12
14
|
registered in `gates.list`.
|
|
15
|
+
|
|
16
|
+
The remaining two are fenced, so the fenced extraction path reds as well as the
|
|
17
|
+
inline one:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
# graph: couples= dir=one valve=none tier=postcommit gen=auto
|
|
21
|
+
# graph: couples=docs/[a].md trigger=docs/(x).md dir=one valve=none tier=precommit
|
|
22
|
+
```
|
|
@@ -1 +1,13 @@
|
|
|
1
|
+
missing required key 'couples='
|
|
2
|
+
missing required key 'dir='
|
|
3
|
+
missing required key 'valve='
|
|
4
|
+
missing required key 'tier='
|
|
5
|
+
unknown manifest key/token 'bogus=1'
|
|
1
6
|
dir= must be bi|one (got 'mono')
|
|
7
|
+
valve= must be none|PROPOSED (got 'no-fixture')
|
|
8
|
+
tier= must be precommit|align-only|commit-msg (got 'postcommit')
|
|
9
|
+
mode= must be staged|whole-tree (got 'partial')
|
|
10
|
+
gen= must be manual (got 'auto')
|
|
11
|
+
couples= is empty
|
|
12
|
+
couples token 'docs/[a].md' is not a syntactically valid glob/path
|
|
13
|
+
trigger token 'docs/(x).md' is not a syntactically valid glob/path
|
|
@@ -1,17 +1,39 @@
|
|
|
1
1
|
# SPEC-example-gate — amendment fixture (good)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
required keys
|
|
5
|
-
|
|
3
|
+
Every shape assertion G must accept, one per branch it can clear: the four
|
|
4
|
+
required keys alone, the full seven-key form with every optional value legal, a
|
|
5
|
+
`kit:<glob>` couples token, a `*` trigger, two manifests on one line, a manifest
|
|
6
|
+
inside a non-`proto` fence, a `# graph:` span carrying no manifest key at all,
|
|
7
|
+
and the two spans the extractor must not read as manifests in the first place.
|
|
6
8
|
|
|
7
9
|
## Definition of Done
|
|
8
10
|
|
|
9
11
|
- [ ] `check-example-gate.sh` carries its manifest
|
|
10
12
|
(`# graph: couples=TASK-QUEUE.md,*/SPEC.md dir=one valve=none tier=precommit`);
|
|
11
|
-
registered in `gates.list`.
|
|
13
|
+
registered in `gates.list`. The `*/SPEC.md` surface may be design-ahead —
|
|
14
|
+
existence is not required, only glob syntax.
|
|
15
|
+
- [ ] `check-two-gate.sh` (`# graph: couples=docs/two.md dir=one valve=none tier=precommit`) and `check-three-gate.sh` (`# graph: couples=docs/three.md dir=bi valve=PROPOSED tier=align-only`) land together — two manifests on one line, and the second must be validated as well as the first.
|
|
16
|
+
- [ ] `check-full-gate.sh` carries every optional key at a legal value
|
|
17
|
+
(`# graph: couples=kit:checks/*.sh,scripts/gates.list trigger=* dir=bi valve=PROPOSED tier=commit-msg mode=whole-tree gen=manual`) —
|
|
18
|
+
the `kit:` prefix validates on its glob part, and a `*` trigger is exempt
|
|
19
|
+
from token validation because it covers every surface.
|
|
20
|
+
|
|
21
|
+
A manifest inside a fenced block whose language is not `proto` is live design
|
|
22
|
+
text and is validated:
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
# graph: couples=scripts/gen.sh dir=one valve=none tier=precommit mode=staged
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
A `# graph:` span naming no key at all is a cross-reference, not a manifest, and
|
|
29
|
+
assertion G returns without a finding:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
# graph: see check-example-gate.sh above for the manifest this gate will carry
|
|
33
|
+
```
|
|
12
34
|
|
|
13
35
|
A prose mention of the `# graph:` concept, with `couples=` named separately, is
|
|
14
|
-
not a manifest and must not be
|
|
36
|
+
not a manifest and must not be extracted at all.
|
|
15
37
|
|
|
16
38
|
```proto
|
|
17
39
|
// A `# graph: couples=bogus dir=mono` line inside a proto fence is illustrative
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# SPEC-second-gate — amendment fixture (good, second file)
|
|
2
|
+
|
|
3
|
+
A second amendment in the same tree, so the walk assertion G runs is proved to
|
|
4
|
+
read every `SPEC-*.md` it finds rather than the first one only.
|
|
5
|
+
|
|
6
|
+
## Definition of Done
|
|
7
|
+
|
|
8
|
+
- [ ] `check-second-gate.sh` carries its manifest:
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
# graph: couples=docs/second.md,kit:templates/*.md trigger=docs/*.md,kit:templates/*.md dir=one valve=none tier=align-only
|
|
12
|
+
```
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Direct unit test of check-graph
|
|
2
|
+
# Direct unit test of check-graph's render-cap assertion (assertion I) via the
|
|
3
3
|
# hermetic --cap-only mode — the good/bad pair stays the themeless --amend-only
|
|
4
4
|
# case, so the emit-side cap needs its own test: an emitted graph with more edges
|
|
5
5
|
# than the page's declared maxEdges reds (Mermaid would paint an error graphic
|
|
@@ -13,17 +13,18 @@ set -uo pipefail
|
|
|
13
13
|
source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
|
|
14
14
|
|
|
15
15
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # gate-sdk/
|
|
16
|
-
|
|
16
|
+
CHECKS="$DIR/checks"
|
|
17
17
|
|
|
18
18
|
fails=0
|
|
19
19
|
|
|
20
20
|
# the emitted edge count the assertion measures against, from the real registry
|
|
21
|
-
edge_n="$(grep -cE '(<-->|-->)\|"' <<<"$("$
|
|
21
|
+
edge_n="$(grep -cE '(<-->|-->)\|"' <<<"$(bash "$DIR/bin/run-gates.sh" --emit graph)")"
|
|
22
22
|
[[ "$edge_n" -gt 1 ]] \
|
|
23
23
|
|| { echo " FAIL: expected the emitted graph to carry edges, counted $edge_n"; fails=$((fails + 1)); }
|
|
24
24
|
|
|
25
25
|
run() { # run() <knob> -> sets rc/out
|
|
26
|
-
out="$(GATE_SDK_GRAPH_MAX_EDGES="$1"
|
|
26
|
+
out="$(gate_env GATE_SDK_GRAPH_MAX_EDGES="$1" \
|
|
27
|
+
&& gate_run check-graph "$CHECKS" --cap-only 2>&1)"; rc=$?
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
# --- a cap below the edge count reds, naming the count and the cap -------------
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Direct unit test of check-graph
|
|
2
|
+
# Direct unit test of check-graph's external-ref assertion (assertion H) via
|
|
3
3
|
# the hermetic --refs-only mode — the good/bad pair stays the themeless
|
|
4
4
|
# --amend-only case, so the emit-side ref allowlist needs its own test: a theme
|
|
5
5
|
# chrome link that matches no allowed prefix reds, the same link allowlisted via
|
|
6
6
|
# GATE_SDK_GRAPH_EXTERNAL_REFS clears, and the kit-seeded mermaid import is always
|
|
7
7
|
# allowed even under an empty knob. An empty GATE_SDK_CONFIG_FILE isolates the
|
|
8
|
-
# test from this repo's persistent config (which sets the knob).
|
|
8
|
+
# test from this repo's persistent config (which sets the knob). The chrome link
|
|
9
|
+
# is injected through a GATE_SDK_GRAPH_THEME_DIR part file: this test is not
|
|
10
|
+
# theme-neutral, so it carries the same migration the theme test does.
|
|
9
11
|
#
|
|
10
12
|
# Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
|
|
11
13
|
set -uo pipefail
|
|
12
14
|
source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
|
|
13
15
|
|
|
14
16
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # gate-sdk/
|
|
15
|
-
|
|
17
|
+
CHECKS="$DIR/checks"
|
|
16
18
|
|
|
17
19
|
fails=0
|
|
18
20
|
tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT
|
|
@@ -20,30 +22,30 @@ tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT
|
|
|
20
22
|
: > "$tmp/empty-config.sh" # neutralize the repo's gate-sdk-config.sh
|
|
21
23
|
EXT="https://third-party.example/widget.js"
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
THEME
|
|
25
|
+
mkdir -p "$tmp/theme"
|
|
26
|
+
printf ' <a href="%s">third-party</a>\n' "$EXT" > "$tmp/theme/footer.html"
|
|
26
27
|
|
|
27
|
-
run() { # run() <config> <theme> <knob> -> sets rc/out
|
|
28
|
-
out="$(GATE_SDK_CONFIG_FILE="$1"
|
|
29
|
-
|
|
28
|
+
run() { # run() <config> <theme-dir> <knob> -> sets rc/out
|
|
29
|
+
out="$(gate_env GATE_SDK_CONFIG_FILE="$1" GATE_SDK_GRAPH_THEME_DIR="$2" \
|
|
30
|
+
GATE_SDK_GRAPH_EXTERNAL_REFS="$3" \
|
|
31
|
+
&& gate_run check-graph "$CHECKS" --refs-only 2>&1)"
|
|
30
32
|
rc=$?
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
# --- an un-allowlisted theme chrome link reds --------------------------------
|
|
34
|
-
run "$tmp/empty-config.sh" "$tmp/theme
|
|
36
|
+
run "$tmp/empty-config.sh" "$tmp/theme" ""
|
|
35
37
|
[[ "$rc" -eq 1 ]] \
|
|
36
38
|
|| { echo " FAIL: un-allowlisted ref expected exit 1, got $rc: $out"; fails=$((fails + 1)); }
|
|
37
39
|
grep -qF -- "$EXT" <<<"$out" \
|
|
38
40
|
|| { echo " FAIL: red output does not name the offending ref '$EXT': $out"; fails=$((fails + 1)); }
|
|
39
41
|
|
|
40
42
|
# --- the same link, allowlisted by the knob, clears --------------------------
|
|
41
|
-
run "$tmp/empty-config.sh" "$tmp/theme
|
|
43
|
+
run "$tmp/empty-config.sh" "$tmp/theme" "https://third-party.example"
|
|
42
44
|
[[ "$rc" -eq 0 ]] \
|
|
43
45
|
|| { echo " FAIL: knob-allowlisted ref expected exit 0, got $rc: $out"; fails=$((fails + 1)); }
|
|
44
46
|
|
|
45
47
|
# --- the seeded mermaid import alone is allowed under an empty knob -----------
|
|
46
|
-
run "$tmp/empty-config.sh" "$tmp/absent
|
|
48
|
+
run "$tmp/empty-config.sh" "$tmp/absent" ""
|
|
47
49
|
[[ "$rc" -eq 0 ]] \
|
|
48
50
|
|| { echo " FAIL: seeded-mermaid-only emit expected exit 0, got $rc: $out"; fails=$((fails + 1)); }
|
|
49
51
|
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Direct unit test of check-graph
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
2
|
+
# Direct unit test of check-graph's theme seam (GATE_SDK_GRAPH_THEME_DIR and its
|
|
3
|
+
# three verbatim part files) — the good/bad pair stays the themeless case
|
|
4
|
+
# (--amend-only), so the emit-side theme seam needs its own test: a theme's
|
|
5
|
+
# injected markers provably land in the emission, an absent theme falls back
|
|
6
|
+
# byte-identically (no markers), both paths are deterministic (the byte-compare
|
|
7
|
+
# assertion E relies on it), the kit body survives theming, and the RETIRED
|
|
8
|
+
# sourced-function seam refuses loudly rather than silently dropping a theme.
|
|
8
9
|
#
|
|
9
10
|
# Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
|
|
10
11
|
set -uo pipefail
|
|
11
12
|
source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
|
|
12
13
|
|
|
13
14
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # gate-sdk/
|
|
14
|
-
|
|
15
|
+
CHECKS="$DIR/checks"
|
|
15
16
|
|
|
16
17
|
fails=0
|
|
17
18
|
tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT
|
|
@@ -20,14 +21,20 @@ CSS_MARKER='THEME-CSS-MARKER-Xyzzy1'
|
|
|
20
21
|
HDR_MARKER='theme-header-marker-Xyzzy2'
|
|
21
22
|
FTR_MARKER='theme-footer-marker-Xyzzy3'
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
# the part-file contract: at most three optional files, each inlined byte verbatim
|
|
25
|
+
mkdir -p "$tmp/theme"
|
|
26
|
+
printf ' /* %s */\n' "$CSS_MARKER" > "$tmp/theme/theme.css"
|
|
27
|
+
printf ' <div id="%s"></div>\n' "$HDR_MARKER" > "$tmp/theme/header.html"
|
|
28
|
+
printf ' <div id="%s"></div>\n' "$FTR_MARKER" > "$tmp/theme/footer.html"
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
# spec: gate-sdk/SPEC.md §The non-gate arm — the emitter is a binary arm, so it is reached through
|
|
31
|
+
# the front-end that resolves its bridged knobs, never as a mode of the gate
|
|
32
|
+
emit() { # emit() <theme-dir> -> the emission under that theme directory
|
|
33
|
+
gate_env GATE_SDK_GRAPH_THEME_DIR="$1" && bash "$DIR/bin/run-gates.sh" --emit graph
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
themed="$(emit "$tmp/theme")"
|
|
37
|
+
bare="$(emit "$tmp/absent")"
|
|
31
38
|
|
|
32
39
|
# --- the injected markers provably land in the themed emission -----------------
|
|
33
40
|
for m in "$CSS_MARKER" "$HDR_MARKER" "$FTR_MARKER"; do
|
|
@@ -42,10 +49,10 @@ for m in "$CSS_MARKER" "$HDR_MARKER" "$FTR_MARKER"; do
|
|
|
42
49
|
done
|
|
43
50
|
|
|
44
51
|
# --- both paths are deterministic (assertion E's byte-compare depends on it) ---
|
|
45
|
-
themed2="$(
|
|
52
|
+
themed2="$(emit "$tmp/theme")"
|
|
46
53
|
[[ "$themed" == "$themed2" ]] \
|
|
47
54
|
|| { echo " FAIL: themed --emit is not byte-deterministic across runs"; fails=$((fails + 1)); }
|
|
48
|
-
bare2="$(
|
|
55
|
+
bare2="$(emit "$tmp/absent")"
|
|
49
56
|
[[ "$bare" == "$bare2" ]] \
|
|
50
57
|
|| { echo " FAIL: themeless --emit is not byte-deterministic across runs"; fails=$((fails + 1)); }
|
|
51
58
|
|
|
@@ -55,9 +62,28 @@ for anchor in 'graph LR' 'class="mermaid viewport"'; do
|
|
|
55
62
|
|| { echo " FAIL: themed --emit dropped kit body anchor '$anchor'"; fails=$((fails + 1)); }
|
|
56
63
|
done
|
|
57
64
|
|
|
65
|
+
# --- the retired sourced-function seam refuses, naming the migration ----------
|
|
66
|
+
# A themed consumer that silently lost its theme would produce an artifact the
|
|
67
|
+
# byte-compare cannot tell from a legitimate theme edit, so the failure would be
|
|
68
|
+
# invisible in a green battery — what the tripwire exists to refuse.
|
|
69
|
+
: > "$tmp/graph-theme.sh"
|
|
70
|
+
out="$(gate_env GATE_SDK_GRAPH_THEME="$tmp/graph-theme.sh" \
|
|
71
|
+
&& gate_run check-graph "$CHECKS" 2>&1)"; rc=$?
|
|
72
|
+
[[ "$rc" -eq 2 ]] \
|
|
73
|
+
|| { echo " FAIL: the retired GATE_SDK_GRAPH_THEME seam expected exit 2, got $rc: $out"; fails=$((fails + 1)); }
|
|
74
|
+
grep -qF 'GATE_SDK_GRAPH_THEME_DIR' <<<"$out" \
|
|
75
|
+
|| { echo " FAIL: the retired-seam refusal does not name the migration: $out"; fails=$((fails + 1)); }
|
|
76
|
+
|
|
77
|
+
# the same refusal from the file's mere presence in the gates dir, no env set
|
|
78
|
+
sb="$tmp/sandbox"; mkdir -p "$sb/scripts"
|
|
79
|
+
: > "$sb/scripts/graph-theme.sh"
|
|
80
|
+
out="$( cd "$sb" && gate_run check-graph "$CHECKS" 2>&1 )"; rc=$?
|
|
81
|
+
[[ "$rc" -eq 2 ]] \
|
|
82
|
+
|| { echo " FAIL: a stale <gates-dir>/graph-theme.sh expected exit 2, got $rc: $out"; fails=$((fails + 1)); }
|
|
83
|
+
|
|
58
84
|
if [[ "$fails" -gt 0 ]]; then
|
|
59
85
|
echo "check-graph-theme.test: $fails assertion(s) failed"
|
|
60
86
|
exit 1
|
|
61
87
|
fi
|
|
62
|
-
echo "check-graph-theme.test: ok (
|
|
88
|
+
echo "check-graph-theme.test: ok (part files land; absent-theme fallback; determinism; body preserved; retired seam refuses)"
|
|
63
89
|
exit 0
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Behavioral test of check-graph's whole-registry path — assertions A (manifest
|
|
3
|
+
# well-formedness), B (couples<->trigger parity), C (the cycle-valve rule),
|
|
4
|
+
# D (pre-commit + commit-msg hook freshness), E (graph-artifact freshness) and
|
|
5
|
+
# F (emitted asset hrefs resolve). None is reachable from the good/bad pair: the
|
|
6
|
+
# pair's cwd is a case dir and a `good/` case must exit 0, while D and E always
|
|
7
|
+
# run on the full path — D's `gen-pre-commit.sh --emit` cds to
|
|
8
|
+
# `git rev-parse --show-toplevel`, so satisfying it from a case dir would need a
|
|
9
|
+
# committed byte-copy of the real repo's generated hook inside gate-tests/.
|
|
10
|
+
# So the corpus is a mini-consumer tree built here and thrown away: the port
|
|
11
|
+
# cannot add or remove a file in it, which is the property criterion 4 asks of a
|
|
12
|
+
# gate-source auditor's oracle (gate-sdk/SPEC.md §The port-candidate criteria).
|
|
13
|
+
#
|
|
14
|
+
# The tree carries both declaration spellings (a `.sh` member and a `.gate` one),
|
|
15
|
+
# all four of assertion B's coverage branches, and all three cycle-valve branches.
|
|
16
|
+
#
|
|
17
|
+
# Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
|
|
18
|
+
set -uo pipefail
|
|
19
|
+
source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
|
|
20
|
+
|
|
21
|
+
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # gate-sdk/
|
|
22
|
+
CHECKS="$DIR/checks"
|
|
23
|
+
GEN="$DIR/bin/gen-pre-commit.sh"
|
|
24
|
+
|
|
25
|
+
SANDBOX="$(mktemp -d)"
|
|
26
|
+
trap 'rm -rf "$SANDBOX"' EXIT
|
|
27
|
+
repo="$SANDBOX/repo"
|
|
28
|
+
fails=0
|
|
29
|
+
rc=0
|
|
30
|
+
out=""
|
|
31
|
+
|
|
32
|
+
# the mini-consumer's own kit set, so member resolution and the emitted hook stay
|
|
33
|
+
# inside the sandbox instead of reaching this repo's kits
|
|
34
|
+
export GATE_SDK_KIT_DIRS="$repo"
|
|
35
|
+
|
|
36
|
+
member() { # member() <name> <manifest> — a `.sh` declaration in the sandbox registry
|
|
37
|
+
printf '#!/usr/bin/env bash\n# graph: %s\necho "X: clean (nothing)"\n' "$2" \
|
|
38
|
+
>"$repo/scripts/$1.sh"
|
|
39
|
+
chmod +x "$repo/scripts/$1.sh"
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
seed() {
|
|
43
|
+
rm -rf "$repo"
|
|
44
|
+
mkdir -p "$repo/scripts"
|
|
45
|
+
git -C "$repo" init -q
|
|
46
|
+
cat >"$repo/scripts/gates.list" <<'LIST'
|
|
47
|
+
check-alpha
|
|
48
|
+
check-beta
|
|
49
|
+
check-gamma
|
|
50
|
+
check-delta
|
|
51
|
+
check-epsilon
|
|
52
|
+
LIST
|
|
53
|
+
# B branch 2 (exact token) and branch 4 (a `*.<ext>` trigger over a globbed couple)
|
|
54
|
+
member check-alpha 'couples=scripts/gates.list,scripts/*.sh trigger=scripts/gates.list,*.sh dir=one valve=none tier=precommit'
|
|
55
|
+
# B branch 1 (a `*` trigger covers everything); tier=commit-msg drives D's second hook
|
|
56
|
+
member check-beta 'couples=docs/site.md trigger=* dir=one valve=none tier=commit-msg'
|
|
57
|
+
# C branch 1: a dir=bi member spanning a leading and a lagging surface takes PROPOSED
|
|
58
|
+
member check-gamma 'couples=SPEC.md,scripts/*.sh dir=bi valve=PROPOSED tier=precommit'
|
|
59
|
+
# the `.gate` declaration spelling, so assertion A resolves and reads a
|
|
60
|
+
# descriptor's manifest; tier=align-only keeps it out of both hooks, so the
|
|
61
|
+
# sandbox needs no binary to generate them. C branch 2: a leading surface with
|
|
62
|
+
# no lagging one takes either valve
|
|
63
|
+
printf '# graph: %s\n' 'couples=SPEC.md dir=bi valve=none tier=align-only' \
|
|
64
|
+
>"$repo/scripts/check-delta.gate"
|
|
65
|
+
# B branch 3 (a literal couple read against the trigger as a bash pattern)
|
|
66
|
+
# and C branch 3 (no leading surface — valve must be none)
|
|
67
|
+
member check-epsilon 'couples=docs/site.md trigger=docs/*.md dir=bi valve=none tier=precommit'
|
|
68
|
+
cat >"$repo/scripts/graph-vocab.sh" <<'VOCAB'
|
|
69
|
+
GRAPH_VOCAB=('scripts/gates.list' 'scripts/*.sh' '*.sh' 'docs/site.md' 'docs/*.md' 'SPEC.md')
|
|
70
|
+
GRAPH_LEADING=('SPEC.md')
|
|
71
|
+
GRAPH_LAGGING=('scripts/*.sh')
|
|
72
|
+
GRAPH_LAYERS=('surfaces:governed surfaces')
|
|
73
|
+
VOCAB
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
regen() { # regen() -> rewrite both hooks and the graph artifact from the manifests
|
|
77
|
+
( cd "$repo" && bash "$GEN" --write >/dev/null 2>&1 ) || return 1
|
|
78
|
+
( cd "$repo" && bash "$DIR/bin/run-gates.sh" --emit graph >scripts/CHECK-GRAPH.html 2>/dev/null ) || return 1
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
run() { # run() -> the full whole-registry gate over the sandbox; sets rc/out
|
|
82
|
+
out="$( cd "$repo" && gate_run check-graph "$CHECKS" 2>&1 )"; rc=$?
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
want_red() { # want_red() <label> <substring>
|
|
86
|
+
if [[ "$rc" -ne 1 ]]; then
|
|
87
|
+
echo " FAIL [$1]: want exit 1, got $rc -- $out"; fails=$((fails + 1))
|
|
88
|
+
elif ! grep -qF -- "$2" <<<"$out"; then
|
|
89
|
+
echo " FAIL [$1]: exit 1 but output lacks '$2' -- $out"; fails=$((fails + 1))
|
|
90
|
+
fi
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
want_green() { # want_green() <label>
|
|
94
|
+
if [[ "$rc" -ne 0 ]]; then
|
|
95
|
+
echo " FAIL [$1]: want exit 0, got $rc -- $out"; fails=$((fails + 1))
|
|
96
|
+
elif ! grep -qF 'CHECK-GRAPH: clean' <<<"$out"; then
|
|
97
|
+
echo " FAIL [$1]: exit 0 but output lacks the clean line -- $out"; fails=$((fails + 1))
|
|
98
|
+
fi
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
# --- baseline: five members, both spellings, every B and C branch, clean --------
|
|
102
|
+
seed
|
|
103
|
+
regen || { echo " FAIL [baseline]: could not generate the sandbox hooks/artifact"; fails=$((fails + 1)); }
|
|
104
|
+
run; want_green baseline
|
|
105
|
+
|
|
106
|
+
# --- assertion A: manifest well-formedness -------------------------------------
|
|
107
|
+
seed
|
|
108
|
+
member check-alpha 'couples=scripts/gates.list trigger=* dir=one valve=none tier=precommit bogus=1'
|
|
109
|
+
regen || true; run
|
|
110
|
+
want_red a-unknown-key "unknown manifest key 'bogus=1'"
|
|
111
|
+
|
|
112
|
+
seed
|
|
113
|
+
member check-alpha 'couples=scripts/gates.list trigger=* dir=mono valve=none tier=precommit'
|
|
114
|
+
regen || true; run
|
|
115
|
+
want_red a-enum "dir= must be bi|one (got 'mono')"
|
|
116
|
+
|
|
117
|
+
seed
|
|
118
|
+
printf 'check-zeta\n' >>"$repo/scripts/gates.list"
|
|
119
|
+
regen || true; run
|
|
120
|
+
want_red a-unresolved "check-zeta is in gates.list but resolves in none of"
|
|
121
|
+
|
|
122
|
+
seed
|
|
123
|
+
member check-alpha 'couples=scripts/gates.list,lib/x.rs trigger=* dir=one valve=none tier=precommit'
|
|
124
|
+
regen || true; run
|
|
125
|
+
want_red a-vocab "couples surface 'lib/x.rs' not in the declared GRAPH_VOCAB"
|
|
126
|
+
|
|
127
|
+
# --- assertion B: a couple no trigger glob would fire on ------------------------
|
|
128
|
+
seed
|
|
129
|
+
member check-epsilon 'couples=docs/site.md trigger=scripts/*.sh dir=bi valve=none tier=precommit'
|
|
130
|
+
regen || true; run
|
|
131
|
+
want_red b-parity "PARITY: check-epsilon couples 'docs/site.md' but its trigger"
|
|
132
|
+
|
|
133
|
+
# --- assertion C: the two reds the three branches leave -------------------------
|
|
134
|
+
seed
|
|
135
|
+
member check-gamma 'couples=SPEC.md,scripts/*.sh dir=bi valve=none tier=precommit'
|
|
136
|
+
regen || true; run
|
|
137
|
+
want_red c-cycle-needs-valve "check-gamma is a design<->code bi cycle"
|
|
138
|
+
|
|
139
|
+
seed
|
|
140
|
+
member check-epsilon 'couples=docs/site.md trigger=docs/*.md dir=bi valve=PROPOSED tier=precommit'
|
|
141
|
+
regen || true; run
|
|
142
|
+
want_red c-no-leading "check-epsilon is a dir=bi bijection with no leading design surface"
|
|
143
|
+
|
|
144
|
+
# --- assertion D: both generated hooks -----------------------------------------
|
|
145
|
+
seed; regen || true
|
|
146
|
+
printf '# hand-edited\n' >>"$repo/scripts/git-hooks/pre-commit"
|
|
147
|
+
run; want_red d-hook-stale "scripts/git-hooks/pre-commit is stale"
|
|
148
|
+
|
|
149
|
+
seed; regen || true
|
|
150
|
+
rm -f "$repo/scripts/git-hooks/pre-commit"
|
|
151
|
+
run; want_red d-hook-absent "scripts/git-hooks/pre-commit does not exist"
|
|
152
|
+
|
|
153
|
+
seed; regen || true
|
|
154
|
+
printf '# hand-edited\n' >>"$repo/scripts/git-hooks/commit-msg"
|
|
155
|
+
run; want_red d-msg-hook-stale "scripts/git-hooks/commit-msg is stale"
|
|
156
|
+
|
|
157
|
+
# --- assertion E: the graph artifact -------------------------------------------
|
|
158
|
+
seed; regen || true
|
|
159
|
+
printf '<!-- hand-edited -->\n' >>"$repo/scripts/CHECK-GRAPH.html"
|
|
160
|
+
run; want_red e-artifact-stale "scripts/CHECK-GRAPH.html is stale"
|
|
161
|
+
|
|
162
|
+
seed; regen || true
|
|
163
|
+
rm -f "$repo/scripts/CHECK-GRAPH.html"
|
|
164
|
+
run; want_red e-artifact-absent "scripts/CHECK-GRAPH.html does not exist"
|
|
165
|
+
|
|
166
|
+
# --- assertion F: an emitted local asset href that resolves, and one that does not
|
|
167
|
+
# The kit's own emission carries no local href/src at all (its one external
|
|
168
|
+
# reference is the mermaid CDN import, which this assertion's scan excludes), so
|
|
169
|
+
# the failure path is only reachable through a theme — the shortcut the assertion
|
|
170
|
+
# exists to refuse, a chrome fragment linking an asset beside the site rather than
|
|
171
|
+
# inlining it. The injection is a GATE_SDK_GRAPH_THEME_DIR part file, inlined byte
|
|
172
|
+
# verbatim at the point after <body> the retired graph_theme_header() fed.
|
|
173
|
+
seed
|
|
174
|
+
mkdir -p "$repo/theme"
|
|
175
|
+
printf ' <img src="chrome-logo.png" alt="">\n' >"$repo/theme/header.html"
|
|
176
|
+
export GATE_SDK_GRAPH_THEME_DIR="$repo/theme"
|
|
177
|
+
regen || true; run
|
|
178
|
+
want_red f-asset-href "emitted asset 'chrome-logo.png' does not resolve to a file under scripts/"
|
|
179
|
+
|
|
180
|
+
: >"$repo/scripts/chrome-logo.png"
|
|
181
|
+
regen || true; run
|
|
182
|
+
want_green f-asset-href-resolves
|
|
183
|
+
unset GATE_SDK_GRAPH_THEME_DIR
|
|
184
|
+
|
|
185
|
+
if [[ "$fails" -gt 0 ]]; then
|
|
186
|
+
echo "check-graph-tree.test: $fails case(s) failed"
|
|
187
|
+
exit 1
|
|
188
|
+
fi
|
|
189
|
+
echo "check-graph-tree.test: ok (constructed consumer tree: A/B/C/D/E/F, both declaration spellings, 4 parity branches, 3 cycle-valve branches, 15 cases)"
|
|
190
|
+
exit 0
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
# fixture manifest — the clone below commits under the wrong email,
|
|
2
|
-
#
|
|
1
|
+
# fixture manifest — the clone below commits under the wrong email, the 'work'
|
|
2
|
+
# remote the manifest expects is not configured in the clone at all, and the
|
|
3
|
+
# GitHub CLI's persisted active account is not the one named here.
|
|
3
4
|
email dev@example.com
|
|
4
5
|
remote-host work github-work
|
|
6
|
+
gh-account example-dev
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# spec: gate-sdk/SPEC.md §check-identity — the case reaches the rule through the
|
|
2
|
+
# actual-source knobs, which is what makes the pair a parity oracle for the live arm
|
|
3
|
+
# rather than for a fixture-only second code path.
|
|
4
|
+
GATE_SDK_IDENTITY_FILE="identity.conf"
|
|
5
|
+
GATE_SDK_GIT_EMAIL_FILE="git-config-email"
|
|
6
|
+
GATE_SDK_GIT_REMOTES_FILE="git-remotes"
|
|
7
|
+
# spec: gate-sdk/SPEC.md §check-identity — the account kind's actual is the CLI's
|
|
8
|
+
# persisted hosts file, and the case pins it: left to derive, the case would read
|
|
9
|
+
# the operator's real config and stop being hermetic.
|
|
10
|
+
GATE_SDK_GH_HOSTS_FILE="gh-hosts.yml"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# injected GitHub CLI hosts file. The `users` map enumerates the accounts
|
|
2
|
+
# available on this machine and is written first; the active account is the
|
|
3
|
+
# `user` key at the block's own indent, which is what the manifest matches.
|
|
4
|
+
github.com:
|
|
5
|
+
users:
|
|
6
|
+
example-dev:
|
|
7
|
+
oauth_token: fixture-token
|
|
8
|
+
user:
|
|
9
|
+
oauth_token: fixture-token
|
|
10
|
+
git_protocol: ssh
|
|
11
|
+
user: example-dev
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
# fixture manifest —
|
|
1
|
+
# fixture manifest — all three expectations match the injected clone identity
|
|
2
|
+
# and the injected GitHub CLI hosts file below.
|
|
2
3
|
email dev@example.com
|
|
3
4
|
|
|
4
5
|
# comment and blank lines are ignored; the SSH host alias is matched as-is.
|
|
5
6
|
remote-host origin github.com
|
|
7
|
+
|
|
8
|
+
# the CLI's persisted active account for the configured host, matched exactly.
|
|
9
|
+
gh-account example-dev
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# spec: gate-sdk/SPEC.md §check-identity — the case reaches the rule through the
|
|
2
|
+
# actual-source knobs, which is what makes the pair a parity oracle for the live arm
|
|
3
|
+
# rather than for a fixture-only second code path.
|
|
4
|
+
GATE_SDK_IDENTITY_FILE="identity.conf"
|
|
5
|
+
GATE_SDK_GIT_EMAIL_FILE="git-config-email"
|
|
6
|
+
GATE_SDK_GIT_REMOTES_FILE="git-remotes"
|
|
7
|
+
# spec: gate-sdk/SPEC.md §check-identity — the account kind's actual is the CLI's
|
|
8
|
+
# persisted hosts file, and the case pins it: left to derive, the case would read
|
|
9
|
+
# the operator's real config and stop being hermetic.
|
|
10
|
+
GATE_SDK_GH_HOSTS_FILE="gh-hosts.yml"
|