checkwright 0.21.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1013 -50
- package/lib/common/digest.sh +18 -0
- package/lib/common/lock.sh +40 -0
- package/lib/common/profile.sh +33 -0
- package/lib/common/recipe.sh +56 -43
- package/lib/diff.sh +64 -0
- package/lib/doctor.sh +81 -7
- package/lib/init.sh +167 -52
- package/lib/uninstall.sh +212 -0
- package/lib/update.sh +34 -0
- package/package.json +2 -2
- package/payload/artifact/targets.list +30 -0
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -0
- package/payload/canon-kit/README.md +2 -0
- package/payload/canon-kit/SPEC.md +666 -59
- package/payload/canon-kit/checks/check-amendment-queue.sh +1 -0
- package/payload/canon-kit/checks/check-comment-tier.gate +3 -0
- package/payload/canon-kit/checks/check-deprecation-task.gate +3 -0
- package/payload/canon-kit/checks/check-docs-cmd.gate +3 -0
- package/payload/canon-kit/checks/check-docs-link-convention.sh +12 -4
- package/payload/canon-kit/checks/check-install-claim.gate +3 -0
- package/payload/canon-kit/checks/check-knob-citation.gate +3 -0
- package/payload/canon-kit/checks/check-knob-default-coupling.sh +1 -0
- package/payload/canon-kit/checks/check-manifest-count.gate +3 -0
- package/payload/canon-kit/checks/check-manifest-temporal.gate +3 -0
- package/payload/canon-kit/checks/check-md-refs.gate +3 -0
- package/payload/canon-kit/checks/check-measured-claim.gate +3 -0
- package/payload/canon-kit/checks/check-payload-claim.gate +3 -0
- package/payload/canon-kit/checks/check-prose-enum.gate +3 -0
- package/payload/canon-kit/checks/check-prose-tells.sh +1 -0
- package/payload/canon-kit/checks/check-spec-derivable-section.gate +3 -0
- package/payload/canon-kit/checks/check-spec-dod-singleton.gate +3 -0
- package/payload/canon-kit/checks/check-spec-embedded-source.sh +1 -0
- package/payload/canon-kit/checks/check-spec-fence-balance.gate +3 -0
- package/payload/canon-kit/checks/check-spec-pointer.gate +3 -0
- package/payload/canon-kit/checks/check-surface-duplication.sh +1 -0
- package/payload/canon-kit/checks/check-todo-task-liveness.gate +3 -0
- package/payload/canon-kit/checks/check-tracking-claim.gate +3 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/.workflow/fixture-state.txt +4 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.gate +4 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.rs +5 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +4 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/templates/bad-tmpl.sh +4 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/.workflow/fixture-state.txt +3 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/expect.txt +1 -1
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.gate +4 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.rs +5 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/templates/good-tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +29 -5
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/.workflow/fixture-state.txt +3 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.gate +2 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.rs +4 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +6 -5
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/.workflow/fixture-state.txt +3 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -1
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.gate +2 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.rs +4 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +6 -5
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +4 -3
- package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/OUTSIDE.md +4 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/docs/index.md +3 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/good/OUTSIDE.md +4 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/good/docs/methodology.md +8 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +94 -0
- package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +2 -2
- package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +4 -0
- package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +32 -8
- package/payload/canon-kit/gate-tests/check-md-refs.test.sh +61 -9
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/SPEC.md +12 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.sh +6 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/good/SPEC.md +23 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.sh +6 -0
- package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +90 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/README.md +15 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/expect.txt +2 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/install.md +19 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/posts/note.md +6 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.sh +8 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/payload-claims.sh +7 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/README.md +15 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/expect.txt +2 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/install.md +20 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/posts/note.md +6 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.sh +8 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/payload-claims.sh +7 -0
- package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +27 -4
- package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +21 -7
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/.workflow/fixture-state.txt +2 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.gate +2 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.rs +4 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +4 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/widget.sh +1 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/.workflow/fixture-state.txt +2 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/expect.txt +1 -1
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.gate +2 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.rs +4 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/widget.sh +1 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/.workflow/fixture-state.txt +3 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.gate +2 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.rs +4 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/.workflow/fixture-state.txt +3 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/expect.txt +1 -1
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.gate +2 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.rs +4 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +1 -2
- package/payload/canon-kit/lib/spec.sh +109 -70
- package/payload/canon-kit/smoke/install.sh +21 -1
- package/payload/canon-kit/templates/SPEC-amendment.md +9 -2
- package/payload/context-kit/README.md +4 -1
- package/payload/context-kit/SPEC.md +166 -9
- package/payload/context-kit/bin/env-probe.sh +19 -6
- package/payload/context-kit/checks/check-brevity.sh +1 -0
- package/payload/context-kit/checks/check-footprint-fresh.sh +1 -0
- package/payload/context-kit/checks/check-memory-off.sh +1 -0
- package/payload/context-kit/checks/check-settings-paths.sh +94 -0
- package/payload/context-kit/checks/check-settings-pins.sh +1 -0
- package/payload/context-kit/gate-tests/check-settings-paths/bad/args +1 -0
- package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +3 -0
- package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +12 -0
- package/payload/context-kit/gate-tests/check-settings-paths/bad/tools/real-tool.sh +4 -0
- package/payload/context-kit/gate-tests/check-settings-paths/good/args +1 -0
- package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +16 -0
- package/payload/context-kit/gate-tests/check-settings-paths/good/tools/real-tool.sh +4 -0
- package/payload/context-kit/index-tests/expected/toolfloor.txt +9 -0
- package/payload/context-kit/index-tests/toolfloor-cases.sh +20 -0
- package/payload/context-kit/lib/toolfloor.sh +15 -4
- package/payload/context-kit/smoke/agents-md.sh +12 -1
- package/payload/context-kit/smoke/install.sh +4 -1
- package/payload/delegation-kit/README.md +3 -3
- package/payload/delegation-kit/SPEC.md +499 -26
- package/payload/delegation-kit/bin/run-dispatch-guard-tests.sh +97 -0
- package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +1 -0
- package/payload/delegation-kit/checks/check-gate-tamper.sh +2 -1
- package/payload/delegation-kit/checks/check-rule-citation.sh +1 -0
- package/payload/delegation-kit/lib/delegation.sh +1 -0
- package/payload/delegation-kit/smoke/install.sh +2 -1
- package/payload/delegation-kit/templates/agent-dispatch-guard.sh +61 -0
- package/payload/delegation-kit/templates/agent-execution.md +127 -12
- package/payload/delegation-kit/templates/delegation-config.sh +4 -0
- package/payload/delegation-kit/templates/dispatch-checklists.md +1 -1
- package/payload/delegation-kit/templates/statusline-usage.sh +23 -1
- package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +30 -0
- package/payload/doctrine-kit/DOCTRINE.md +112 -11
- package/payload/doctrine-kit/README.md +12 -3
- package/payload/doctrine-kit/SPEC.md +163 -11
- package/payload/doctrine-kit/bin/install-doctrine.sh +167 -17
- package/payload/doctrine-kit/checks/check-doctrine-registration.sh +41 -11
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/DOCTRINE.md +3 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/DOCTRINE.md +3 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +82 -2
- package/payload/doctrine-kit/smoke/install.sh +167 -1
- package/payload/drift-kit/README.md +3 -2
- package/payload/drift-kit/SPEC.md +264 -22
- package/payload/drift-kit/bin/kfric.sh +21 -2
- package/payload/drift-kit/bin/stage-economics.sh +157 -3
- package/payload/drift-kit/kpis/kpi-incident-recurrence.sh +42 -0
- package/payload/drift-kit/smoke/install.sh +183 -1
- package/payload/drift-kit/templates/economics.md +9 -0
- package/payload/drift-kit/templates/kpis.list +6 -1
- package/payload/evidence-kit/README.md +20 -6
- package/payload/evidence-kit/SPEC.md +355 -17
- package/payload/evidence-kit/bin/run-validate.sh +51 -9
- package/payload/evidence-kit/checks/check-battery-roster.sh +87 -0
- package/payload/evidence-kit/checks/check-evidence-baseline.sh +1 -0
- package/payload/evidence-kit/checks/check-evidence-manifest.sh +1 -0
- package/payload/evidence-kit/checks/check-producer-liveness.sh +35 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/args +1 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/runner.md +14 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.sh +7 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/args +1 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/runner.md +14 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.sh +7 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +68 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/args +1 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/run-validate.lock +1 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/good/args +1 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/good/expect.txt +2 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/good/run-validate.lock +1 -0
- package/payload/evidence-kit/gate-tests/producer-lock.test.sh +109 -0
- package/payload/evidence-kit/lib/evidence.sh +18 -0
- package/payload/evidence-kit/smoke/install.sh +17 -3
- package/payload/gate-sdk/README.md +17 -1
- package/payload/gate-sdk/SPEC.md +4427 -92
- package/payload/gate-sdk/bin/build-native.sh +38 -0
- package/payload/gate-sdk/bin/enforcement-map.sh +2 -1
- package/payload/gate-sdk/bin/gen-pre-commit.sh +32 -2
- package/payload/gate-sdk/bin/port-blockers.sh +445 -0
- package/payload/gate-sdk/bin/run-consumer-smoke.sh +129 -2
- package/payload/gate-sdk/bin/run-gate-tests.sh +61 -9
- package/payload/gate-sdk/bin/run-gates.sh +37 -2
- package/payload/gate-sdk/bin/upgrade-smoke.sh +55 -7
- package/payload/gate-sdk/checks/check-action-gh-repo.gate +3 -0
- package/payload/gate-sdk/checks/check-action-pinning.gate +3 -0
- package/payload/gate-sdk/checks/check-action-run-shell.sh +4 -1
- package/payload/gate-sdk/checks/check-assertion-strength.gate +3 -0
- package/payload/gate-sdk/checks/check-commit-msg.sh +1 -0
- package/payload/gate-sdk/checks/check-commit-subject.sh +1 -0
- package/payload/gate-sdk/checks/check-core-files.sh +28 -4
- package/payload/gate-sdk/checks/check-crate-arms.sh +61 -0
- package/payload/gate-sdk/checks/check-enforcement-fresh.sh +1 -0
- package/payload/gate-sdk/checks/check-exec-bit.sh +21 -1
- package/payload/gate-sdk/checks/check-gate-assertions.sh +31 -6
- package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +107 -0
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +7 -7
- package/payload/gate-sdk/checks/check-gate-fail-closed.sh +1 -0
- package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +1 -0
- package/payload/gate-sdk/checks/check-gate-output.sh +41 -3
- package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +333 -0
- package/payload/gate-sdk/checks/check-graph.sh +5 -5
- package/payload/gate-sdk/checks/check-hook-exec-bit.sh +1 -0
- package/payload/gate-sdk/checks/check-identity.sh +1 -0
- package/payload/gate-sdk/checks/check-install-disposition.sh +92 -0
- package/payload/gate-sdk/checks/check-kit-enum.sh +1 -0
- package/payload/gate-sdk/checks/check-kit-registration.gate +3 -0
- package/payload/gate-sdk/checks/check-readme-roster.sh +6 -0
- package/payload/gate-sdk/checks/check-reads-couples.sh +71 -21
- package/payload/gate-sdk/checks/check-root-tiering.sh +1 -0
- package/payload/gate-sdk/checks/check-shellcheck.sh +1 -0
- package/payload/gate-sdk/checks/check-smoke-entry-guard.gate +3 -0
- package/payload/gate-sdk/checks/check-template-copy-parity.sh +1 -0
- package/payload/gate-sdk/checks/check-template-registry-parity.gate +3 -0
- package/payload/gate-sdk/checks/check-test-hermetic.gate +3 -0
- package/payload/gate-sdk/checks/check-tree-terms.sh +1 -0
- package/payload/gate-sdk/checks/check-workflow-tiering.sh +2 -1
- package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +16 -1
- package/payload/gate-sdk/gate-tests/check-core-files.test.sh +64 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/Cargo.toml +7 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/src/lib.rs +12 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.sh +2 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/Cargo.toml +7 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/src/lib.rs +11 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.sh +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/kitroot/checks/check-vendored.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/check-ported.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.sh +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gates.list +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stamp.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stub-bin +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/args +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/kitroot/checks/check-vendored.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/check-ported.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.sh +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gates.list +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stamp.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stub-bin +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +81 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +3 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +3 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/gates/check-sample.sh +3 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-native-sample.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-sample.sh +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/expect.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/gates.list +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/Cargo.toml +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/src/gates/native_sample.rs +7 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/check-native-sample.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/check-sample.sh +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/gates.list +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/native/Cargo.toml +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/native/src/gates/native_sample.rs +11 -0
- package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +111 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/conservation.md +7 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +12 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/impl/gate.rs +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/kitroot/check-orphan.rs +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/publish.yml +15 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.gate +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/stub-bin +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/targets.list +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/args +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/conservation.md +8 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +7 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/impl/gate.rs +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/kitroot/check-other.rs +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/publish.yml +15 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-ported.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/stub-bin +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/targets.list +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +184 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-alpha.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-delta.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-epsilon.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/smoke/install.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/args +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/installer/lib/common/recipe.sh +9 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-alpha.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-beta.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-gamma.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/smoke/install.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/args +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/installer/lib/common/recipe.sh +10 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +6 -5
- package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +139 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/templates/widgets.list +4 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-one.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-two.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/args +4 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/templates/widgets.list +4 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-one.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-two.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/args +8 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/rules.list +5 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/table.tsv +4 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +2 -3
- package/payload/gate-sdk/gate-tests/lib-declaration.test.sh +4 -4
- package/payload/gate-sdk/gate-tests/lib-gate.test.sh +151 -1
- package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +73 -0
- package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +144 -0
- package/payload/gate-sdk/lib/consumer-smoke.sh +41 -4
- package/payload/gate-sdk/lib/gate.sh +208 -9
- package/payload/gate-sdk/lib/inject.sh +46 -1
- package/payload/gate-sdk/lib/test-hermetic.sh +26 -0
- package/payload/gate-sdk/smoke/install.sh +61 -1
- package/payload/guard-kit/README.md +18 -14
- package/payload/guard-kit/SPEC.md +366 -72
- package/payload/guard-kit/bin/compare-settings-allow.sh +40 -7
- package/payload/guard-kit/bin/run-guard-tests.sh +1 -0
- package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +64 -0
- package/payload/guard-kit/gate-tests/guard-read-path.test.sh +52 -0
- package/payload/guard-kit/guard-tests/cases.tsv +49 -7
- package/payload/guard-kit/lib/guard.sh +277 -54
- package/payload/guard-kit/templates/close-triage.md +38 -10
- package/payload/guard-kit/templates/guard-config.sh +3 -0
- package/payload/guard-kit/templates/settings-hooks.json +7 -1
- package/payload/lifecycle-kit/README.md +12 -1
- package/payload/lifecycle-kit/SPEC.md +991 -41
- package/payload/lifecycle-kit/bin/cite-survey.sh +81 -0
- package/payload/lifecycle-kit/bin/enter-stage.sh +139 -13
- package/payload/lifecycle-kit/bin/file-gap.sh +60 -2
- package/payload/lifecycle-kit/bin/file-survey.sh +69 -0
- package/payload/lifecycle-kit/checks/check-close-surfaces.sh +1 -0
- package/payload/lifecycle-kit/checks/check-gap-inbox-neutrality.gate +3 -0
- package/payload/lifecycle-kit/checks/check-lesson-disposition.gate +3 -0
- package/payload/lifecycle-kit/checks/check-lifecycle-registration.gate +3 -0
- package/payload/lifecycle-kit/checks/check-merge-attrs.gate +3 -0
- package/payload/lifecycle-kit/checks/check-scratch-citation.gate +3 -0
- package/payload/lifecycle-kit/checks/check-shim-restatement.gate +3 -0
- package/payload/lifecycle-kit/checks/check-skill-binding.gate +3 -0
- package/payload/lifecycle-kit/checks/check-stage-entry.sh +1 -0
- package/payload/lifecycle-kit/checks/check-stage-evidence.gate +3 -0
- package/payload/lifecycle-kit/checks/check-stage-skill-coverage.gate +3 -0
- package/payload/lifecycle-kit/checks/check-survey-record.gate +3 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +1 -2
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/expect.txt +3 -0
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/gap-inbox.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/gap-inbox.md +4 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs/bad/.gitattributes +1 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs/good/.gitattributes +1 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +3 -3
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.sh +4 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/surfaces/queue.md +13 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.sh +4 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/surfaces/queue.md +31 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +9 -5
- package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/expect.txt +4 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/record.md +18 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/good/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/good/record.md +13 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +83 -0
- package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +122 -0
- package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +142 -0
- package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +102 -0
- package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +100 -0
- package/payload/lifecycle-kit/lib/stages.sh +12 -2
- package/payload/lifecycle-kit/smoke/install.sh +83 -4
- package/payload/lifecycle-kit/templates/consult.md +73 -0
- package/payload/lifecycle-kit/templates/lead.md +139 -7
- package/payload/lifecycle-kit/templates/stages/align.md +12 -0
- package/payload/lifecycle-kit/templates/stages/build.md +8 -0
- package/payload/lifecycle-kit/templates/stages/close.md +45 -5
- package/payload/lifecycle-kit/templates/stages/scope.md +42 -3
- package/payload/lifecycle-kit/templates/stages/spec.md +13 -1
- package/payload/lifecycle-kit/templates/stages/validate.md +8 -0
- package/payload/lifecycle-kit/templates/workflow-state-guard.sh +29 -0
- package/payload/queue-kit/README.md +6 -1
- package/payload/queue-kit/SPEC.md +350 -6
- package/payload/queue-kit/bin/queue-counts.sh +35 -0
- package/payload/queue-kit/bin/queue-edges.sh +78 -0
- package/payload/queue-kit/checks/check-queue-entry-budget.gate +3 -0
- package/payload/queue-kit/checks/check-queue-hygiene.gate +3 -0
- package/payload/queue-kit/checks/check-queue-prose-precondition.sh +1 -0
- package/payload/queue-kit/checks/check-queue-sections.gate +3 -0
- package/payload/queue-kit/checks/check-queue-slug-liveness.gate +3 -0
- package/payload/queue-kit/checks/check-queue-wrap.gate +3 -0
- package/payload/queue-kit/checks/check-roadmap-fresh.sh +1 -0
- package/payload/queue-kit/checks/check-tag-lead-line.gate +3 -0
- package/payload/queue-kit/checks/check-task-conservation.gate +4 -0
- package/payload/queue-kit/checks/check-task-names.gate +3 -0
- package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +5 -0
- package/payload/queue-kit/gate-tests/queue-counts.test.sh +116 -0
- package/payload/queue-kit/gate-tests/queue-edges.test.sh +130 -0
- package/payload/queue-kit/gate-tests/queue-lib-parity.test.sh +215 -0
- package/payload/queue-kit/lib/queue.sh +4 -19
- package/payload/queue-kit/smoke/install.sh +4 -1
- package/payload/queue-kit/templates/TASK-QUEUE.md +3 -0
- package/payload/site-kit/SPEC.md +64 -27
- package/payload/site-kit/checks/check-docs-cname-parity.sh +1 -0
- package/payload/site-kit/checks/check-docs-render-fidelity.sh +1 -0
- package/payload/site-kit/smoke/install.sh +9 -1
- package/profiles.list +36 -8
- package/payload/canon-kit/checks/check-comment-tier.sh +0 -211
- package/payload/canon-kit/checks/check-deprecation-task.sh +0 -90
- package/payload/canon-kit/checks/check-docs-cmd.sh +0 -153
- package/payload/canon-kit/checks/check-install-claim.sh +0 -146
- package/payload/canon-kit/checks/check-knob-citation.sh +0 -117
- package/payload/canon-kit/checks/check-manifest-count.sh +0 -46
- package/payload/canon-kit/checks/check-manifest-temporal.sh +0 -83
- package/payload/canon-kit/checks/check-md-refs.sh +0 -128
- package/payload/canon-kit/checks/check-prose-enum.sh +0 -115
- package/payload/canon-kit/checks/check-spec-derivable-section.sh +0 -69
- package/payload/canon-kit/checks/check-spec-dod-singleton.sh +0 -45
- package/payload/canon-kit/checks/check-spec-fence-balance.sh +0 -42
- package/payload/canon-kit/checks/check-spec-pointer.sh +0 -180
- package/payload/canon-kit/checks/check-todo-task-liveness.sh +0 -80
- package/payload/canon-kit/checks/check-tracking-claim.sh +0 -136
- package/payload/gate-sdk/checks/check-action-gh-repo.sh +0 -321
- package/payload/gate-sdk/checks/check-action-pinning.sh +0 -55
- package/payload/gate-sdk/checks/check-assertion-strength.sh +0 -134
- package/payload/gate-sdk/checks/check-kit-registration.sh +0 -68
- package/payload/gate-sdk/checks/check-smoke-entry-guard.sh +0 -53
- package/payload/gate-sdk/checks/check-test-hermetic.sh +0 -119
- package/payload/lifecycle-kit/checks/check-lesson-disposition.sh +0 -98
- package/payload/lifecycle-kit/checks/check-lifecycle-registration.sh +0 -54
- package/payload/lifecycle-kit/checks/check-merge-attrs.sh +0 -69
- package/payload/lifecycle-kit/checks/check-shim-restatement.sh +0 -97
- package/payload/lifecycle-kit/checks/check-skill-binding.sh +0 -59
- package/payload/lifecycle-kit/checks/check-stage-evidence.sh +0 -81
- package/payload/lifecycle-kit/checks/check-stage-skill-coverage.sh +0 -47
- package/payload/queue-kit/checks/check-queue-entry-budget.sh +0 -104
- package/payload/queue-kit/checks/check-queue-hygiene.sh +0 -81
- package/payload/queue-kit/checks/check-queue-sections.sh +0 -44
- package/payload/queue-kit/checks/check-queue-slug-liveness.sh +0 -63
- package/payload/queue-kit/checks/check-queue-wrap.sh +0 -56
- package/payload/queue-kit/checks/check-tag-lead-line.sh +0 -70
- package/payload/queue-kit/checks/check-task-conservation.sh +0 -50
- package/payload/queue-kit/checks/check-task-names.sh +0 -128
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Behavioral test of bin/queue-counts.sh: the emitted section set is the
|
|
3
|
+
# *configured* task sections in configured order — not a fixed four — and the
|
|
4
|
+
# count is the top-level entry, the unit bin/queue-index.sh lists. The
|
|
5
|
+
# icebox-unset case is the discriminating one: a hardcoded implementation passes
|
|
6
|
+
# a run against this repo's own config and fails only here. queue-counts is a
|
|
7
|
+
# tool, not a gate, so it has no good/bad pair; this drives it directly.
|
|
8
|
+
#
|
|
9
|
+
# Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
|
|
10
|
+
set -uo pipefail
|
|
11
|
+
source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
|
|
12
|
+
|
|
13
|
+
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # queue-kit/
|
|
14
|
+
BIN="$DIR/bin/queue-counts.sh"
|
|
15
|
+
SANDBOX="$(mktemp -d)"
|
|
16
|
+
trap 'rm -rf "$SANDBOX"' EXIT
|
|
17
|
+
: >"$SANDBOX/empty-config.sh"
|
|
18
|
+
export QUEUE_KIT_CONFIG_FILE="$SANDBOX/empty-config.sh"
|
|
19
|
+
|
|
20
|
+
fails=0
|
|
21
|
+
checks=0
|
|
22
|
+
|
|
23
|
+
eq() { # $1=label $2=got $3=want
|
|
24
|
+
checks=$((checks + 1))
|
|
25
|
+
[[ "$2" == "$3" ]] || { echo " FAIL [$1]: got '$2', want '$3'"; fails=$((fails + 1)); }
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
cat >"$SANDBOX/TASK-QUEUE.md" <<'EOF'
|
|
29
|
+
# TASK-QUEUE.md
|
|
30
|
+
|
|
31
|
+
## Iteration: demo
|
|
32
|
+
|
|
33
|
+
## New Features
|
|
34
|
+
|
|
35
|
+
- **feat-a** — do a thing.
|
|
36
|
+
- **not-an-entry** — an indented bullet is body, not a second entry.
|
|
37
|
+
- **feat-b** — do another.
|
|
38
|
+
|
|
39
|
+
## Technical Debt
|
|
40
|
+
|
|
41
|
+
## Deferred
|
|
42
|
+
|
|
43
|
+
- **defer-a** — later.
|
|
44
|
+
|
|
45
|
+
## Chill
|
|
46
|
+
|
|
47
|
+
- **chill-a** — much later.
|
|
48
|
+
|
|
49
|
+
## Done
|
|
50
|
+
|
|
51
|
+
- done-a
|
|
52
|
+
- **done-b** — a Done entry shaped like an active one, to prove Done is out.
|
|
53
|
+
|
|
54
|
+
## Lessons Learned
|
|
55
|
+
|
|
56
|
+
- **l1** [attend] — a lesson is not a task section.
|
|
57
|
+
EOF
|
|
58
|
+
|
|
59
|
+
# (a) with an icebox configured: the four configured task sections, in order,
|
|
60
|
+
# with Done and Lessons excluded and the indented bullet not counted.
|
|
61
|
+
out="$(QUEUE_KIT_ICEBOX_SECTION=Chill bash "$BIN" "$SANDBOX/TASK-QUEUE.md")"
|
|
62
|
+
eq "icebox-set" "$(tr '\t' '=' <<<"$out" | paste -sd, -)" \
|
|
63
|
+
'New Features=2,Technical Debt=0,Deferred=1,Chill=1'
|
|
64
|
+
|
|
65
|
+
# (b) the discriminating case: no icebox configured -> three lines, and the
|
|
66
|
+
# section that is no longer a task section contributes nothing.
|
|
67
|
+
out="$(bash "$BIN" "$SANDBOX/TASK-QUEUE.md")"
|
|
68
|
+
eq "icebox-unset" "$(tr '\t' '=' <<<"$out" | paste -sd, -)" \
|
|
69
|
+
'New Features=2,Technical Debt=0,Deferred=1'
|
|
70
|
+
|
|
71
|
+
# (c) renamed sections come back renamed — the tool resolves, never enumerates.
|
|
72
|
+
cat >"$SANDBOX/renamed-config.sh" <<'EOF'
|
|
73
|
+
QUEUE_KIT_ACTIVE_SECTIONS=("Work")
|
|
74
|
+
QUEUE_KIT_DEFERRED_SECTION="Someday"
|
|
75
|
+
QUEUE_KIT_ICEBOX_SECTION=""
|
|
76
|
+
EOF
|
|
77
|
+
cat >"$SANDBOX/renamed.md" <<'EOF'
|
|
78
|
+
## Work
|
|
79
|
+
|
|
80
|
+
- **w1** — one.
|
|
81
|
+
|
|
82
|
+
## Someday
|
|
83
|
+
|
|
84
|
+
- **s1** — two.
|
|
85
|
+
- **s2** — three.
|
|
86
|
+
|
|
87
|
+
## Done
|
|
88
|
+
|
|
89
|
+
- **d1** — not counted.
|
|
90
|
+
EOF
|
|
91
|
+
out="$(QUEUE_KIT_CONFIG_FILE="$SANDBOX/renamed-config.sh" bash "$BIN" "$SANDBOX/renamed.md")"
|
|
92
|
+
eq "renamed" "$(tr '\t' '=' <<<"$out" | paste -sd, -)" 'Work=1,Someday=2'
|
|
93
|
+
|
|
94
|
+
# (d) over a queue whose bullets are all top-level, the total agrees with
|
|
95
|
+
# queue_live_slugs — the two readers must not disagree about one queue's size.
|
|
96
|
+
# The fixture is the renamed one deliberately: the main fixture's indented
|
|
97
|
+
# decoy is an entry to queue_live_slugs' grammar and a body bullet to this
|
|
98
|
+
# tool's, a latent divergence between two *existing* readers that this test
|
|
99
|
+
# must not silently adopt as agreement.
|
|
100
|
+
lib_total="$(QUEUE_KIT_CONFIG_FILE="$SANDBOX/renamed-config.sh" bash -c \
|
|
101
|
+
'source "$1/lib/queue.sh"; queue_live_slugs "$2" | wc -l' _ "$DIR" "$SANDBOX/renamed.md")"
|
|
102
|
+
counts_total="$(QUEUE_KIT_CONFIG_FILE="$SANDBOX/renamed-config.sh" bash "$BIN" "$SANDBOX/renamed.md" \
|
|
103
|
+
| awk -F'\t' '{ n += $2 } END { print n + 0 }')"
|
|
104
|
+
eq "agrees-with-queue_live_slugs" "$counts_total" "$lib_total"
|
|
105
|
+
|
|
106
|
+
# (e) a missing queue file is exit 2, never an empty clean answer.
|
|
107
|
+
checks=$((checks + 1))
|
|
108
|
+
( bash "$BIN" "$SANDBOX/nope.md" >/dev/null 2>&1 )
|
|
109
|
+
[[ "$?" -eq 2 ]] || { echo " FAIL [missing-file]: expected exit 2"; fails=$((fails + 1)); }
|
|
110
|
+
|
|
111
|
+
if [[ "$fails" -gt 0 ]]; then
|
|
112
|
+
echo "queue-counts.test: $fails of $checks assertion(s) failed"
|
|
113
|
+
exit 1
|
|
114
|
+
fi
|
|
115
|
+
echo "queue-counts.test: ok ($checks assertions; configured task sections resolved, icebox derived, Done excluded, entry unit agrees with queue_live_slugs)"
|
|
116
|
+
exit 0
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Behavioral test of bin/queue-edges.sh: the citation grammar's four rules
|
|
3
|
+
# (live-set resolution, unresolved token is not an error, no self-citation,
|
|
4
|
+
# [blocked-by:] counts), the verbatim citing line, nearest-preceding-bullet
|
|
5
|
+
# attribution, and --inbound's silence-means-no-edges contract. queue-edges is a
|
|
6
|
+
# tool, not a gate, so it has no good/bad pair; this drives it directly. The
|
|
7
|
+
# repo's own corpus carries no live [blocked-by:] tag, so that path exists here
|
|
8
|
+
# or nowhere. Config is isolated via QUEUE_KIT_CONFIG_FILE so the repo's
|
|
9
|
+
# queue-config.sh does not leak in.
|
|
10
|
+
#
|
|
11
|
+
# Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
|
|
12
|
+
set -uo pipefail
|
|
13
|
+
source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
|
|
14
|
+
|
|
15
|
+
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # queue-kit/
|
|
16
|
+
EDGES="$DIR/bin/queue-edges.sh"
|
|
17
|
+
SANDBOX="$(mktemp -d)"
|
|
18
|
+
trap 'rm -rf "$SANDBOX"' EXIT
|
|
19
|
+
: >"$SANDBOX/empty-config.sh"
|
|
20
|
+
export QUEUE_KIT_CONFIG_FILE="$SANDBOX/empty-config.sh"
|
|
21
|
+
|
|
22
|
+
fails=0
|
|
23
|
+
checks=0
|
|
24
|
+
|
|
25
|
+
want() { # $1=label $2=output $3=substring-that-must-be-present
|
|
26
|
+
checks=$((checks + 1))
|
|
27
|
+
grep -qF -- "$3" <<<"$2" || { echo " FAIL [$1]: output lacks '$3':"; printf ' %s\n' "$2"; fails=$((fails + 1)); }
|
|
28
|
+
}
|
|
29
|
+
absent() { # $1=label $2=output $3=substring-that-must-be-absent
|
|
30
|
+
checks=$((checks + 1))
|
|
31
|
+
grep -qF -- "$3" <<<"$2" && { echo " FAIL [$1]: output should not contain '$3':"; printf ' %s\n' "$2"; fails=$((fails + 1)); } || true
|
|
32
|
+
}
|
|
33
|
+
rc_is() { # $1=label $2=actual-rc $3=expected-rc
|
|
34
|
+
checks=$((checks + 1))
|
|
35
|
+
[[ "$2" == "$3" ]] || { echo " FAIL [$1]: exit $2, want $3"; fails=$((fails + 1)); }
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
cat >"$SANDBOX/TASK-QUEUE.md" <<'EOF'
|
|
39
|
+
# TASK-QUEUE.md
|
|
40
|
+
|
|
41
|
+
## Iteration: demo
|
|
42
|
+
|
|
43
|
+
## New Features
|
|
44
|
+
|
|
45
|
+
- **feat-a** — a feature citing `feat-b` on its lead line.
|
|
46
|
+
**Relation to `feat-b`:** this one subsumes it entirely.
|
|
47
|
+
It also mentions `landed-thing`, which is not a live slug, and `feat-a`.
|
|
48
|
+
- **feat-a-sub** — a sub-task.
|
|
49
|
+
It cites `def-a` in its own name.
|
|
50
|
+
|
|
51
|
+
- **feat-b** [blocked-by: def-a] — blocked, so it cites its blocker.
|
|
52
|
+
|
|
53
|
+
## Technical Debt
|
|
54
|
+
|
|
55
|
+
- **debt-a** — an entry nobody cites.
|
|
56
|
+
It mentions `feat-b` once more.
|
|
57
|
+
|
|
58
|
+
## Deferred
|
|
59
|
+
|
|
60
|
+
- **def-a** — a deferred entry is a live target.
|
|
61
|
+
|
|
62
|
+
## Done
|
|
63
|
+
|
|
64
|
+
- done-slug
|
|
65
|
+
|
|
66
|
+
## Lessons Learned
|
|
67
|
+
EOF
|
|
68
|
+
|
|
69
|
+
Q="$SANDBOX/TASK-QUEUE.md"
|
|
70
|
+
|
|
71
|
+
# Default listing: grouped by target, in queue order, with per-target counts.
|
|
72
|
+
out="$(bash "$EDGES" "$Q")"
|
|
73
|
+
want "count-feat-b" "$out" "feat-b (2 inbound)"
|
|
74
|
+
want "count-def-a" "$out" "def-a (2 inbound)"
|
|
75
|
+
|
|
76
|
+
# The citing line is carried verbatim, which is what supplies the relation's kind.
|
|
77
|
+
want "verbatim-kind" "$out" "**Relation to \`feat-b\`:** this one subsumes it entirely."
|
|
78
|
+
|
|
79
|
+
# Rule: an unresolved token is not an edge and not an error (exit 0, no mention).
|
|
80
|
+
rc=0; bash "$EDGES" "$Q" >/dev/null 2>&1 || rc=$?
|
|
81
|
+
rc_is "unresolved-rc" "$rc" 0
|
|
82
|
+
absent "unresolved-token" "$out" "landed-thing ("
|
|
83
|
+
|
|
84
|
+
# Rule: self-citation is not an edge -- feat-a cites only feat-b and never itself.
|
|
85
|
+
absent "no-self-target" "$out" "feat-a ("
|
|
86
|
+
|
|
87
|
+
# Rule: a done slug is not live, so it is never a target.
|
|
88
|
+
absent "done-not-live" "$out" "done-slug ("
|
|
89
|
+
|
|
90
|
+
# Rule: [blocked-by: <slug>] is an edge -- feat-b's tag cites def-a.
|
|
91
|
+
out_defa="$(bash "$EDGES" --inbound def-a "$Q")"
|
|
92
|
+
want "blocked-by-edge" "$out_defa" "feat-b"
|
|
93
|
+
want "blocked-by-line" "$out_defa" "[blocked-by: def-a]"
|
|
94
|
+
|
|
95
|
+
# Attribution is to the nearest preceding slug bullet: the sub-task cites in its
|
|
96
|
+
# own name, not its parent's.
|
|
97
|
+
want "subtask-cites" "$out_defa" "feat-a-sub"
|
|
98
|
+
absent "parent-not-credited" "$out_defa" " feat-a "
|
|
99
|
+
|
|
100
|
+
# A lead line yields its [blocked-by:] tag alone, never its prose: feat-a's lead
|
|
101
|
+
# line names feat-b, but only the body citation and debt-a's are edges.
|
|
102
|
+
out_featb="$(bash "$EDGES" --inbound feat-b "$Q")"
|
|
103
|
+
want "body-citation" "$out_featb" "subsumes it entirely"
|
|
104
|
+
want "other-citer" "$out_featb" "debt-a"
|
|
105
|
+
absent "lead-line-prose" "$out_featb" "a feature citing"
|
|
106
|
+
|
|
107
|
+
# --inbound on a live slug with no inbound edges: empty output, exit 0. Silence
|
|
108
|
+
# means "no inbound edges" -- so a dead slug must exit 1 instead, never print
|
|
109
|
+
# nothing.
|
|
110
|
+
rc=0; out_none="$(bash "$EDGES" --inbound debt-a "$Q" 2>/dev/null)" || rc=$?
|
|
111
|
+
rc_is "live-no-edges-rc" "$rc" 0
|
|
112
|
+
checks=$((checks + 1))
|
|
113
|
+
[[ -z "$out_none" ]] || { echo " FAIL [live-no-edges-empty]: want empty, got: $out_none"; fails=$((fails + 1)); }
|
|
114
|
+
|
|
115
|
+
rc=0; err="$(bash "$EDGES" --inbound no-such-slug "$Q" 2>&1 >/dev/null)" || rc=$?
|
|
116
|
+
rc_is "dead-slug-rc" "$rc" 1
|
|
117
|
+
want "dead-slug-msg" "$err" "not a live slug: no-such-slug"
|
|
118
|
+
|
|
119
|
+
# The tool mutates nothing.
|
|
120
|
+
before="$(cksum <"$Q")"
|
|
121
|
+
bash "$EDGES" "$Q" >/dev/null 2>&1
|
|
122
|
+
checks=$((checks + 1))
|
|
123
|
+
[[ "$(cksum <"$Q")" == "$before" ]] || { echo " FAIL [no-mutation]: the queue file changed"; fails=$((fails + 1)); }
|
|
124
|
+
|
|
125
|
+
if [[ "$fails" -gt 0 ]]; then
|
|
126
|
+
echo "queue-edges.test.sh: $fails case(s) failed"
|
|
127
|
+
exit 1
|
|
128
|
+
fi
|
|
129
|
+
echo "queue-edges.test.sh: clean (grammar: live-set resolution, unresolved token, self-citation, blocked-by, done-not-live; verbatim line; sub-task attribution; lead-line prose excluded; --inbound empty vs dead slug; no mutation; $checks checks)"
|
|
130
|
+
exit 0
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Cross-implementation parity for the one derivation queue-kit holds twice: the
|
|
3
|
+
# shell library queue-kit/lib/queue.sh and its compiled counterpart in
|
|
4
|
+
# native/src/queue.rs. Seven live consumers still source the library, so the
|
|
5
|
+
# duplication is permanent and gets criterion 6's machine-held disposition rather
|
|
6
|
+
# than the deletion disposition a ported primitive takes
|
|
7
|
+
# (gate-sdk/SPEC.md §The port-candidate criteria, criterion 6).
|
|
8
|
+
#
|
|
9
|
+
# The two sides share no representation — the shell derives ERE strings and an
|
|
10
|
+
# array, the crate derives a Sections value and free predicates — so what is
|
|
11
|
+
# compared is *classification* over one canned corpus, never the derived literals
|
|
12
|
+
# (queue-kit/SPEC.md §The queue format). A against B directly, with no committed
|
|
13
|
+
# expected file: a maintained golden would be a third copy to drift, and the
|
|
14
|
+
# failure this exists to catch is one side edited without the other.
|
|
15
|
+
#
|
|
16
|
+
# Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
|
|
17
|
+
set -uo pipefail
|
|
18
|
+
source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
|
|
19
|
+
# shellcheck source=../../gate-sdk/lib/gate.sh
|
|
20
|
+
source "$GATE_SDK_TEST_LIB_DIR/gate.sh"
|
|
21
|
+
|
|
22
|
+
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # queue-kit/
|
|
23
|
+
SANDBOX="$(mktemp -d)"
|
|
24
|
+
trap 'rm -rf "$SANDBOX"' EXIT
|
|
25
|
+
|
|
26
|
+
fails=0
|
|
27
|
+
checks=0
|
|
28
|
+
|
|
29
|
+
# spec: gate-sdk/SPEC.md §check-gate-binary-fresh — a declaration is not a dispatch: a
|
|
30
|
+
# consumer on an uncovered platform vendors the shell library with no artifact behind it, and
|
|
31
|
+
# a parity assertion there would be vacuous rather than true. The skip is declared on the
|
|
32
|
+
# clean line, in the shape the port's omitted-member roster uses, so a reader can tell "no
|
|
33
|
+
# binary here" from "parity holds". A binary that is *present* and refuses the arm is a stale
|
|
34
|
+
# binary rather than an absent one, so it fails here and check-gate-binary-fresh names it.
|
|
35
|
+
BIN="$(gate_native_bin)"
|
|
36
|
+
if [[ ! -x "$BIN" ]]; then
|
|
37
|
+
echo "queue-lib-parity.test: ok (0 assertions; skipped — no gate binary at $BIN, so nothing dispatches to the compiled twin)"
|
|
38
|
+
exit 0
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
# The corpus lives here rather than in a directory beside this runner because
|
|
42
|
+
# run-gate-tests.sh globs <tests-dir>/*/ as fixture *pairs*: a corpus directory
|
|
43
|
+
# there is a harness error, not a fixture. It exercises every branch each side
|
|
44
|
+
# has — a bold lead-in in each task section, a lessons line, a bare-slug done
|
|
45
|
+
# bullet, and a bullet in a section that is none of these — and it is driven
|
|
46
|
+
# twice, with the icebox configured and unconfigured, because the icebox
|
|
47
|
+
# matchers degrade to the empty string rather than to "every section".
|
|
48
|
+
cat >"$SANDBOX/TASK-QUEUE.md" <<'EOF'
|
|
49
|
+
# TASK-QUEUE.md
|
|
50
|
+
|
|
51
|
+
## Iteration: parity-corpus
|
|
52
|
+
|
|
53
|
+
## New Features
|
|
54
|
+
|
|
55
|
+
- **feat-a** — a bold lead-in in the first active section.
|
|
56
|
+
- **sub-a** — an indented sub-task carries the same grammar.
|
|
57
|
+
|
|
58
|
+
## Technical Debt
|
|
59
|
+
|
|
60
|
+
- **debt-a** — a bold lead-in in the second active section.
|
|
61
|
+
|
|
62
|
+
## Deferred
|
|
63
|
+
|
|
64
|
+
- **defer-a** — a bold lead-in in the deferred section.
|
|
65
|
+
|
|
66
|
+
## Chill
|
|
67
|
+
|
|
68
|
+
- **chill-a** — a bold lead-in in the section the icebox knob names.
|
|
69
|
+
|
|
70
|
+
## Done
|
|
71
|
+
|
|
72
|
+
- done-a
|
|
73
|
+
- **done-b** — a Done entry wearing an active entry's shape.
|
|
74
|
+
|
|
75
|
+
## Lessons Learned
|
|
76
|
+
|
|
77
|
+
- **l1** [attend] — the lessons heading is fixed spelling, no knob.
|
|
78
|
+
|
|
79
|
+
## Appendix
|
|
80
|
+
|
|
81
|
+
- **appendix-a** — a bullet in a section that is none of the above.
|
|
82
|
+
EOF
|
|
83
|
+
|
|
84
|
+
cat >"$SANDBOX/icebox-config.sh" <<'EOF'
|
|
85
|
+
QUEUE_KIT_ICEBOX_SECTION="Chill"
|
|
86
|
+
EOF
|
|
87
|
+
: >"$SANDBOX/no-icebox-config.sh"
|
|
88
|
+
|
|
89
|
+
# The shell side's answer is what a consumer gets when it applies the library's
|
|
90
|
+
# exported globals — the same awk the bin/ scripts run, including the explicit
|
|
91
|
+
# `iceboxre != ""` guard an unset icebox knob requires (queue-kit/SPEC.md
|
|
92
|
+
# §The icebox tier). An unguarded `$0 ~ ""` matches every line in awk, which is
|
|
93
|
+
# exactly the degradation-to-"every section" the guard exists to stop.
|
|
94
|
+
cat >"$SANDBOX/classify.awk" <<'EOF'
|
|
95
|
+
function add(v, w) { return v (v == "" ? "" : ",") w }
|
|
96
|
+
{
|
|
97
|
+
v = ""
|
|
98
|
+
if ($0 ~ sectre) v = add(v, "section")
|
|
99
|
+
if ($0 ~ activere) v = add(v, "active")
|
|
100
|
+
if ($0 ~ deferredre) v = add(v, "deferred")
|
|
101
|
+
if (iceboxre != "" && $0 ~ iceboxre) v = add(v, "icebox")
|
|
102
|
+
if ($0 ~ taskre) v = add(v, "task")
|
|
103
|
+
if ($0 ~ lessonsre) v = add(v, "lessons")
|
|
104
|
+
b = "-"
|
|
105
|
+
if ($0 ~ /^[[:space:]]*-[[:space:]]+\*\*[a-z0-9][a-z0-9-]*\*\*/) {
|
|
106
|
+
match($0, /\*\*[a-z0-9][a-z0-9-]*\*\*/)
|
|
107
|
+
b = substr($0, RSTART + 2, RLENGTH - 4)
|
|
108
|
+
}
|
|
109
|
+
if (v == "" && b == "-") next
|
|
110
|
+
printf "line\t%d\t%s\t%s\n", NR, (v == "" ? "-" : v), b
|
|
111
|
+
}
|
|
112
|
+
EOF
|
|
113
|
+
|
|
114
|
+
shell_side() { # $1=config file $2=queue file
|
|
115
|
+
(
|
|
116
|
+
export QUEUE_KIT_CONFIG_FILE="$1"
|
|
117
|
+
# shellcheck source=../lib/queue.sh
|
|
118
|
+
source "$DIR/lib/queue.sh"
|
|
119
|
+
printf 'task-sections'
|
|
120
|
+
printf '\t%s' "${QUEUE_TASK_SECTIONS[@]}"
|
|
121
|
+
printf '\n'
|
|
122
|
+
awk -v sectre="$QUEUE_SECTION_RE" -v activere="$QUEUE_ACTIVE_RE" \
|
|
123
|
+
-v deferredre="$QUEUE_DEFERRED_RE" -v iceboxre="$QUEUE_ICEBOX_RE" \
|
|
124
|
+
-v taskre="$QUEUE_TASK_RE" -v lessonsre="$QUEUE_LESSONS_RE" \
|
|
125
|
+
-f "$SANDBOX/classify.awk" "$2"
|
|
126
|
+
queue_live_slugs "$2" | awk '{ print "live\t" $0 }'
|
|
127
|
+
)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
# The compiled side is reached through the resolved command rather than a path,
|
|
131
|
+
# and every knob it reads crosses the config bridge as a resolved value exactly
|
|
132
|
+
# as a dispatched gate's does (gate-sdk/SPEC.md §lib/gate.sh): the values are
|
|
133
|
+
# taken from the shell library that computed them, so no default is duplicated
|
|
134
|
+
# and the seam this arm crosses is the one every gate already crosses.
|
|
135
|
+
native_side() { # $1=config file $2=queue file
|
|
136
|
+
(
|
|
137
|
+
export QUEUE_KIT_CONFIG_FILE="$1"
|
|
138
|
+
# shellcheck source=../lib/queue.sh
|
|
139
|
+
source "$DIR/lib/queue.sh"
|
|
140
|
+
local IFS=$'\t'
|
|
141
|
+
env "GATE_SDK_KNOB_QUEUE_KIT_ACTIVE_SECTIONS=${QUEUE_KIT_ACTIVE_SECTIONS[*]}" \
|
|
142
|
+
"GATE_SDK_KNOB_QUEUE_KIT_DEFERRED_SECTION=$QUEUE_KIT_DEFERRED_SECTION" \
|
|
143
|
+
"GATE_SDK_KNOB_QUEUE_KIT_ICEBOX_SECTION=$QUEUE_KIT_ICEBOX_SECTION" \
|
|
144
|
+
"$BIN" --queue-parity "$2"
|
|
145
|
+
)
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
compare() { # $1=label $2=config file
|
|
149
|
+
local a b arc brc
|
|
150
|
+
checks=$((checks + 1))
|
|
151
|
+
a="$(shell_side "$2" "$SANDBOX/TASK-QUEUE.md")"; arc=$?
|
|
152
|
+
b="$(native_side "$2" "$SANDBOX/TASK-QUEUE.md")"; brc=$?
|
|
153
|
+
if [[ "$arc" -ne 0 || "$brc" -ne 0 ]]; then
|
|
154
|
+
echo " FAIL [$1]: a side could not report (shell exit $arc, binary exit $brc)"
|
|
155
|
+
fails=$((fails + 1))
|
|
156
|
+
return
|
|
157
|
+
fi
|
|
158
|
+
if [[ -z "$a" ]]; then
|
|
159
|
+
echo " FAIL [$1]: the shell side classified nothing — a vacuous agreement, not a parity hold"
|
|
160
|
+
fails=$((fails + 1))
|
|
161
|
+
return
|
|
162
|
+
fi
|
|
163
|
+
if [[ "$a" != "$b" ]]; then
|
|
164
|
+
echo " FAIL [$1]: the two implementations disagree about the same queue file:"
|
|
165
|
+
diff <(printf '%s\n' "$a") <(printf '%s\n' "$b") | sed 's/^/ /'
|
|
166
|
+
fails=$((fails + 1))
|
|
167
|
+
fi
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
compare "icebox-configured" "$SANDBOX/icebox-config.sh"
|
|
171
|
+
compare "icebox-unconfigured" "$SANDBOX/no-icebox-config.sh"
|
|
172
|
+
|
|
173
|
+
# The corpus must actually reach the branches the comparison is bought for: an
|
|
174
|
+
# agreement over a corpus that classifies nothing is the vacuity this unit exists
|
|
175
|
+
# to end, arriving one layer up. Each of these is read off the shell side, the
|
|
176
|
+
# one that owns the globals under obligation.
|
|
177
|
+
corpus="$(shell_side "$SANDBOX/icebox-config.sh" "$SANDBOX/TASK-QUEUE.md")"
|
|
178
|
+
T=$'\t'
|
|
179
|
+
have() { # $1=label $2=grep -E pattern
|
|
180
|
+
checks=$((checks + 1))
|
|
181
|
+
grep -qE "$2" <<<"$corpus" || {
|
|
182
|
+
echo " FAIL [$1]: the corpus no longer exercises this branch"
|
|
183
|
+
fails=$((fails + 1))
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
have "corpus-active" "^line${T}[0-9]+${T}section,active,task${T}-$"
|
|
187
|
+
have "corpus-deferred" "^line${T}[0-9]+${T}section,deferred,task${T}-$"
|
|
188
|
+
have "corpus-icebox" "^line${T}[0-9]+${T}section,icebox,task${T}-$"
|
|
189
|
+
have "corpus-lessons" "^line${T}[0-9]+${T}section,lessons${T}-$"
|
|
190
|
+
have "corpus-plain" "^line${T}[0-9]+${T}section${T}-$"
|
|
191
|
+
have "corpus-bullet" "^line${T}[0-9]+${T}-${T}feat-a$"
|
|
192
|
+
have "corpus-done" "^line${T}[0-9]+${T}-${T}done-b$"
|
|
193
|
+
have "corpus-live" "^live${T}chill-a$"
|
|
194
|
+
|
|
195
|
+
# The discriminating case for the icebox degradation: unconfigured, the icebox
|
|
196
|
+
# section must classify as a plain section on both sides — never as every line.
|
|
197
|
+
corpus_off="$(shell_side "$SANDBOX/no-icebox-config.sh" "$SANDBOX/TASK-QUEUE.md")"
|
|
198
|
+
lack() { # $1=label $2=grep -E pattern $3=what the hit would mean
|
|
199
|
+
checks=$((checks + 1))
|
|
200
|
+
if grep -qE "$2" <<<"$corpus_off"; then
|
|
201
|
+
echo " FAIL [$1]: $3"
|
|
202
|
+
fails=$((fails + 1))
|
|
203
|
+
fi
|
|
204
|
+
}
|
|
205
|
+
lack "icebox-degrades-class" "^line${T}[0-9]+${T}[a-z,]*icebox" \
|
|
206
|
+
"an unconfigured icebox still classified a line as icebox"
|
|
207
|
+
lack "icebox-degrades-task" "^live${T}chill-a$" \
|
|
208
|
+
"an unconfigured icebox left its section a live task section"
|
|
209
|
+
|
|
210
|
+
if [[ "$fails" -gt 0 ]]; then
|
|
211
|
+
echo "queue-lib-parity.test: $fails of $checks assertion(s) failed"
|
|
212
|
+
exit 1
|
|
213
|
+
fi
|
|
214
|
+
echo "queue-lib-parity.test: ok ($checks assertions; one helper and seven globals held to the compiled twin over one corpus, icebox configured and not)"
|
|
215
|
+
exit 0
|
|
@@ -74,14 +74,12 @@ QUEUE_DEFERRED_RE="^## ${QUEUE_KIT_DEFERRED_SECTION}[[:space:]]*$"
|
|
|
74
74
|
# spec: queue-kit/SPEC.md §The icebox tier — an unset knob leaves a regex nothing can match, so every icebox reader degrades to "no icebox" rather than to "every section"
|
|
75
75
|
# shellcheck disable=SC2034 # consumed by sourcing gates, never within this lib
|
|
76
76
|
QUEUE_ICEBOX_RE="${QUEUE_KIT_ICEBOX_SECTION:+^## ${QUEUE_KIT_ICEBOX_SECTION}[[:space:]]*$}"
|
|
77
|
-
#
|
|
78
|
-
|
|
79
|
-
_qk_task_sections=("${QUEUE_KIT_ACTIVE_SECTIONS[@]}" "$QUEUE_KIT_DEFERRED_SECTION")
|
|
77
|
+
# spec: queue-kit/SPEC.md §lib/queue.sh — the task-section set in configured order, the one composition the task regex and every per-section reader share
|
|
78
|
+
QUEUE_TASK_SECTIONS=("${QUEUE_KIT_ACTIVE_SECTIONS[@]}" "$QUEUE_KIT_DEFERRED_SECTION")
|
|
80
79
|
# spec: queue-kit/SPEC.md §The icebox tier — the icebox is a *live* task section: joining the shared task regex is what makes eviction a conserved move and carries slug uniqueness, blocker resolution, the living-prose contract and the lead-line guard onto the tier with no gate edit
|
|
81
|
-
[[ -n "$QUEUE_KIT_ICEBOX_SECTION" ]] &&
|
|
80
|
+
[[ -n "$QUEUE_KIT_ICEBOX_SECTION" ]] && QUEUE_TASK_SECTIONS+=("$QUEUE_KIT_ICEBOX_SECTION")
|
|
82
81
|
# shellcheck disable=SC2034 # consumed by sourcing gates, never within this lib
|
|
83
|
-
QUEUE_TASK_RE="^## ($(queue_alt "${
|
|
84
|
-
unset _qk_task_sections
|
|
82
|
+
QUEUE_TASK_RE="^## ($(queue_alt "${QUEUE_TASK_SECTIONS[@]}"))[[:space:]]*$"
|
|
85
83
|
# shellcheck disable=SC2034 # consumed by sourcing gates, never within this lib
|
|
86
84
|
QUEUE_SECTION_RE="^## "
|
|
87
85
|
# spec: queue-kit/SPEC.md §The tag algebra — the Lessons heading is fixed spelling (a required-sections default), read by queue-index + check-tag-lead-line; no knob
|
|
@@ -99,19 +97,6 @@ queue_live_slugs() {
|
|
|
99
97
|
' "$1"
|
|
100
98
|
}
|
|
101
99
|
|
|
102
|
-
queue_done_slugs() {
|
|
103
|
-
awk -v donere="$QUEUE_DONE_RE" -v sectre="$QUEUE_SECTION_RE" '
|
|
104
|
-
$0 ~ donere { ind = 1; next }
|
|
105
|
-
$0 ~ sectre { ind = 0 }
|
|
106
|
-
ind && $0 ~ /^[[:space:]]*-[[:space:]]+[a-z0-9][a-z0-9-]*[[:space:]]*$/ {
|
|
107
|
-
line = $0
|
|
108
|
-
sub(/^[[:space:]]*-[[:space:]]+/, "", line)
|
|
109
|
-
sub(/[[:space:]]*$/, "", line)
|
|
110
|
-
print line
|
|
111
|
-
}
|
|
112
|
-
' "$1"
|
|
113
|
-
}
|
|
114
|
-
|
|
115
100
|
# spec: queue-kit/SPEC.md §bin/roadmap.sh — the one [roadmap:] + roadmap-summary: parse, shared by the emitter and check-roadmap-fresh so the two never disagree on what an entry claims. One TSV line per live entry carrying either, in queue order: <tag-count> <raw-field> <slug> <declaration-count> <summary>. The summary is the entry's roadmap-summary: declaration verbatim — a whitelist, so unmarked body prose never reaches the page.
|
|
116
101
|
queue_roadmap_entries() {
|
|
117
102
|
awk -v taskre="$QUEUE_TASK_RE" -v sectre="$QUEUE_SECTION_RE" '
|
|
@@ -14,9 +14,12 @@ check-task-names
|
|
|
14
14
|
check-task-conservation
|
|
15
15
|
check-queue-prose-precondition
|
|
16
16
|
check-roadmap-fresh
|
|
17
|
+
check-queue-entry-budget
|
|
18
|
+
check-queue-sections
|
|
19
|
+
check-queue-slug-liveness
|
|
17
20
|
EOF
|
|
18
21
|
|
|
19
22
|
cp "$SMOKE_KIT_ROOT/templates/TASK-QUEUE.md" TASK-QUEUE.md
|
|
20
23
|
|
|
21
24
|
bash "$SDK/bin/gen-pre-commit.sh" --write >/dev/null
|
|
22
|
-
bash "$SDK/checks/check-graph.sh" --emit >
|
|
25
|
+
bash "$SDK/checks/check-graph.sh" --emit > scripts/CHECK-GRAPH.html
|
|
@@ -35,6 +35,9 @@
|
|
|
35
35
|
### Someday
|
|
36
36
|
|
|
37
37
|
- **example-deferred** — a design-pending entry. [design-pending]
|
|
38
|
+
**Cost while deferred:** what staying parked costs — a red gate, a stale
|
|
39
|
+
doc, a foregone lever — stated so a later scope can weigh it against the
|
|
40
|
+
work of landing it.
|
|
38
41
|
|
|
39
42
|
## Done
|
|
40
43
|
|
package/payload/site-kit/SPEC.md
CHANGED
|
@@ -65,6 +65,14 @@ told to load but cannot find. Knobs:
|
|
|
65
65
|
`SITE_KIT_RENDERER_BATCH` is empty: one of the gate's two renderer contracts,
|
|
66
66
|
and the fallback of the pair. A consumer whose Pages stack differs points this
|
|
67
67
|
at its own renderer; an unresolvable one fails the gate closed.
|
|
68
|
+
**Its value is also a port blocker, and repointing it moves one.** The first
|
|
69
|
+
element of whatever this knob holds is an external program
|
|
70
|
+
`check-docs-render-fidelity` requires, which is what gate-sdk's criterion 7
|
|
71
|
+
screens for and what `gate-sdk/bin/port-blockers.sh` derives by resolving this
|
|
72
|
+
knob (gate-sdk/SPEC.md §port-blockers). The dependency is spelled nowhere in the
|
|
73
|
+
gate's own source, so it is recorded here, where the knob lives: a consumer who
|
|
74
|
+
points this at a renderer their payload already carries removes that blocker,
|
|
75
|
+
and one who points it at a heavier toolchain deepens it.
|
|
68
76
|
- `SITE_KIT_RENDERER_BATCH` — array, **optional**: a command rendering N
|
|
69
77
|
documents over one stream, `NUL`-terminated in both directions and
|
|
70
78
|
count-preserving, the framing specified in §check-docs-render-fidelity. Setting
|
|
@@ -289,21 +297,32 @@ line) landed then, and this assertion mechanizes the channel. The good/bad
|
|
|
289
297
|
fixture pair exercises the span-corruption symptom (a bad page whose severed span
|
|
290
298
|
leaks a stray backtick and a raw placeholder tag, a good page whose faithful code
|
|
291
299
|
spans render clean) alongside the fence/heading case. Because that bad page would
|
|
292
|
-
red on its fence run alone,
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
300
|
+
red on its fence run alone, every assertion the pair cannot isolate carries a
|
|
301
|
+
hermetic unit test of its own, named here rather than described:
|
|
302
|
+
`check-docs-render-fidelity-span.test.sh`,
|
|
303
|
+
`check-docs-render-fidelity-table.test.sh`,
|
|
304
|
+
`check-docs-render-fidelity-foreign.test.sh` and
|
|
305
|
+
`check-docs-render-fidelity-batch.test.sh`.
|
|
306
|
+
|
|
307
|
+
The span test runs a page with no fence, no surplus heading and no table, whose
|
|
308
|
+
only defect is the severed span: it reds span-only and clears in the
|
|
309
|
+
doubled-backtick form, so a widening that reds nothing new cannot pass. The table
|
|
310
|
+
test is that same shape — a collapsed table reds table-only, a trailing blank
|
|
311
|
+
clears. The foreign test holds the SVG/MathML exemption to its *scope*: a page
|
|
312
|
+
carrying inline `<svg>` clears, because the exemption follows the subtree by
|
|
313
|
+
open/close depth rather than a name list, while a bare `<path>` outside any
|
|
314
|
+
`<svg>` still reds — and that second half is what keeps the first from passing
|
|
315
|
+
under a blanket widening, which would clear the good page at the cost of the
|
|
316
|
+
placeholder tokens the assertion exists for. The batch test exists because the
|
|
317
|
+
good/bad pair sets no renderer knob, so it already runs the batch path and cannot
|
|
318
|
+
by itself distinguish that path from the fallback; it asserts that the kit's two
|
|
319
|
+
renderer defaults render a corpus byte-identically, that a pinned
|
|
320
|
+
`SITE_KIT_RENDERER` suppresses the batch default, that the batch path and the
|
|
321
|
+
per-document fallback return the same verdict on the same pages, and that a wrong
|
|
322
|
+
document count and an unresolvable batch command each exit 2. The count case uses
|
|
323
|
+
a stub that always emits two documents, so it passes the two-document probe and is
|
|
324
|
+
caught only by the corpus count — a stub the probe already rejected would never
|
|
325
|
+
reach the assertion under test.
|
|
307
326
|
The positional form `check-docs-render-fidelity.sh [docs-dir] [config-file]`
|
|
308
327
|
lets a fixture point the docs dir and renderer knobs at a synthetic tree without
|
|
309
328
|
touching consumer config. `precommit` tier, coupling the docs tree.
|
|
@@ -365,6 +384,21 @@ recovery closes it. The `ALT_DOMAIN` value is a bare hostname, never a `://`
|
|
|
365
384
|
literal, so it does not itself trip the parity gate. A `# enforce:` marker rides
|
|
366
385
|
the template so that, once copied, an enforcement map projects it as a monitor.
|
|
367
386
|
|
|
387
|
+
**The arm roster is a floor, not a ceiling, and "copied verbatim" describes the
|
|
388
|
+
distribution model rather than forbidding an edit.** The copy is the consumer's
|
|
389
|
+
file: nothing syncs it back, and no gate couples the two, so a consumer may add
|
|
390
|
+
arms of its own. Which side of the seam an arm belongs on follows from what it
|
|
391
|
+
asserts. An arm implementing an invariant this kit ships belongs in the template,
|
|
392
|
+
where every consumer inherits it. An arm implementing a **consumer-local**
|
|
393
|
+
invariant belongs in that consumer's copy and must stay out of the template —
|
|
394
|
+
copied into a tree that never declared the convention it derives from, it would
|
|
395
|
+
assert something no kit ships and no consumer agreed to, which is dead config
|
|
396
|
+
that reads as coverage. An arm cannot be truer than the declaration it composes,
|
|
397
|
+
so it lives at the widest tier that declaration is true for. A consumer-local
|
|
398
|
+
arm becomes template material only if its underlying declaration becomes kit
|
|
399
|
+
mechanism — and then it arrives as an optional arm on the existing
|
|
400
|
+
set-the-env-or-delete-the-arm pattern, the way the release-note knobs already do.
|
|
401
|
+
|
|
368
402
|
The workflow's `permissions:` block is an **allowlist, not an addition** — every
|
|
369
403
|
scope it omits is `none` — so reading the tag list and the Release bodies needs
|
|
370
404
|
`contents: read` declared beside `issues: write`, and the probe step needs its own
|
|
@@ -501,18 +535,21 @@ Deliberately uncapped and unknobbed: a "newest N only" bound would stop probing
|
|
|
501
535
|
exactly the old releases where this class of defect has actually been found.
|
|
502
536
|
|
|
503
537
|
The kit's `smoke/install.sh` installs the template verbatim into the scratch tree
|
|
504
|
-
as governed surface
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
action pins, its `gh` repository
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
538
|
+
as governed surface, and registers the gates that read it. The scratch battery is
|
|
539
|
+
the union of what each kit's `smoke/install.sh` registers; this kit contributes
|
|
540
|
+
`check-docs-cname-parity` and — because it writes the only Actions-shaped surface
|
|
541
|
+
any install writes — the gates that lint a workflow's Actions shape:
|
|
542
|
+
`check-action-pinning`, `check-action-run-shell`, `check-action-gh-repo`.
|
|
543
|
+
`check-tree-terms` reads the installed file too, for tree terms. So a template
|
|
544
|
+
regression in the workflow's bash, its action pins, or its `gh` repository
|
|
545
|
+
context reds the smoke rather than surfacing at a consumer.
|
|
546
|
+
|
|
547
|
+
Those four qualify under the registration accounting's predicate — a gate earns a
|
|
548
|
+
scratch-battery slot when it reads a surface the install writes — because this
|
|
549
|
+
install writes the workflow they lint. The predicate binds every kit and is owned
|
|
550
|
+
by gate-sdk/SPEC.md §Consumer smoke, which also rules on the omissions: what this
|
|
551
|
+
kit leaves unregistered is decided by the accounting's probe, not by a judgment
|
|
552
|
+
recorded here.
|
|
516
553
|
|
|
517
554
|
## Out of scope
|
|
518
555
|
|