checkwright 0.20.0 → 0.22.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 +385 -19
- package/lib/common/digest.sh +18 -0
- package/lib/common/lock.sh +11 -0
- package/lib/common/recipe.sh +8 -11
- package/lib/doctor.sh +49 -0
- package/lib/init.sh +152 -29
- 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 +1 -0
- package/payload/canon-kit/SPEC.md +281 -26
- package/payload/canon-kit/checks/check-comment-tier.sh +7 -2
- package/payload/canon-kit/checks/check-docs-link-convention.sh +11 -4
- package/payload/canon-kit/checks/check-md-refs.sh +22 -9
- package/payload/canon-kit/checks/check-payload-claim.sh +133 -0
- package/payload/canon-kit/checks/check-prose-enum.sh +1 -1
- package/payload/canon-kit/checks/check-spec-pointer.sh +15 -4
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
- package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +26 -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-manifest-count.test.sh +5 -3
- 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 +24 -1
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +1 -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/widget.sh +1 -0
- package/payload/canon-kit/lib/spec.sh +22 -12
- package/payload/canon-kit/smoke/install.sh +20 -1
- package/payload/canon-kit/templates/SPEC-amendment.md +5 -1
- package/payload/context-kit/SPEC.md +38 -7
- package/payload/context-kit/lib/toolfloor.sh +1 -1
- package/payload/context-kit/smoke/install.sh +3 -1
- package/payload/delegation-kit/README.md +2 -1
- package/payload/delegation-kit/SPEC.md +590 -48
- package/payload/delegation-kit/bin/run-dispatch-guard-tests.sh +97 -0
- package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +61 -0
- package/payload/delegation-kit/checks/check-gate-tamper.sh +1 -1
- package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/bad/agents/silent.md +7 -0
- package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/bad/args +1 -0
- package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/bad/expect.txt +1 -0
- package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/agents/explicit-cheap.md +7 -0
- package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/agents/explicit-inherit.md +8 -0
- package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/args +1 -0
- package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/expect.txt +1 -0
- package/payload/delegation-kit/lib/delegation.sh +3 -0
- package/payload/delegation-kit/smoke/install.sh +3 -1
- package/payload/delegation-kit/templates/agent-dispatch-guard.sh +61 -0
- package/payload/delegation-kit/templates/agent-execution.md +171 -15
- package/payload/delegation-kit/templates/delegation-config.sh +4 -0
- package/payload/delegation-kit/templates/dispatch-checklists.md +1 -1
- package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +30 -0
- package/payload/doctrine-kit/DOCTRINE.md +27 -0
- package/payload/doctrine-kit/README.md +5 -0
- package/payload/doctrine-kit/SPEC.md +62 -3
- package/payload/doctrine-kit/bin/install-doctrine.sh +84 -4
- package/payload/doctrine-kit/smoke/install.sh +77 -1
- package/payload/drift-kit/README.md +3 -2
- package/payload/drift-kit/SPEC.md +253 -20
- 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 +155 -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 +86 -0
- package/payload/evidence-kit/checks/check-producer-liveness.sh +34 -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 +4 -1
- package/payload/gate-sdk/SPEC.md +1955 -79
- package/payload/gate-sdk/bin/gen-pre-commit.sh +13 -3
- package/payload/gate-sdk/bin/run-consumer-smoke.sh +121 -1
- package/payload/gate-sdk/bin/run-gate-tests.sh +40 -9
- package/payload/gate-sdk/bin/run-gates.sh +32 -3
- package/payload/gate-sdk/bin/upgrade-smoke.sh +3 -3
- package/payload/gate-sdk/checks/check-action-gh-repo.gate +2 -0
- package/payload/gate-sdk/checks/check-action-pinning.gate +2 -0
- package/payload/gate-sdk/checks/check-action-run-shell.sh +3 -1
- package/payload/gate-sdk/checks/check-core-files.sh +27 -4
- package/payload/gate-sdk/checks/check-exec-bit.sh +20 -1
- package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +106 -0
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +6 -7
- package/payload/gate-sdk/checks/check-gate-output.sh +9 -1
- package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +302 -0
- package/payload/gate-sdk/checks/check-graph.sh +7 -8
- package/payload/gate-sdk/checks/check-readme-roster.sh +5 -0
- package/payload/gate-sdk/checks/check-reads-couples.sh +73 -22
- package/payload/gate-sdk/checks/check-template-registry-parity.sh +81 -0
- package/payload/gate-sdk/checks/check-tree-terms.sh +11 -7
- 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-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-sample.sh +1 -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-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 +123 -0
- 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/lib-declaration.test.sh +4 -4
- package/payload/gate-sdk/gate-tests/lib-gate.test.sh +41 -1
- package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +144 -0
- package/payload/gate-sdk/lib/consumer-smoke.sh +26 -1
- package/payload/gate-sdk/lib/gate.sh +104 -13
- package/payload/gate-sdk/lib/inject.sh +21 -1
- package/payload/gate-sdk/smoke/install.sh +19 -1
- package/payload/guard-kit/README.md +4 -3
- package/payload/guard-kit/SPEC.md +88 -10
- package/payload/guard-kit/bin/compare-settings-allow.sh +40 -7
- package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +64 -0
- package/payload/guard-kit/lib/guard.sh +1 -0
- package/payload/guard-kit/templates/close-triage.md +35 -7
- package/payload/guard-kit/templates/guard-config.sh +3 -0
- package/payload/lifecycle-kit/README.md +1 -0
- package/payload/lifecycle-kit/SPEC.md +589 -33
- package/payload/lifecycle-kit/bin/enter-stage.sh +13 -3
- package/payload/lifecycle-kit/bin/file-gap.sh +42 -1
- package/payload/lifecycle-kit/bin/file-survey.sh +50 -0
- package/payload/lifecycle-kit/checks/check-merge-attrs.sh +1 -1
- package/payload/lifecycle-kit/checks/check-skill-binding.sh +1 -1
- package/payload/lifecycle-kit/checks/check-survey-record.sh +102 -0
- 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 +1 -0
- 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 +84 -0
- package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +94 -0
- package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +102 -0
- package/payload/lifecycle-kit/lib/stages.sh +8 -2
- package/payload/lifecycle-kit/smoke/install.sh +17 -1
- package/payload/lifecycle-kit/templates/consult.md +73 -0
- package/payload/lifecycle-kit/templates/lead.md +141 -10
- 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 +25 -4
- package/payload/lifecycle-kit/templates/stages/scope.md +34 -0
- package/payload/lifecycle-kit/templates/stages/spec.md +8 -0
- package/payload/lifecycle-kit/templates/stages/validate.md +8 -0
- package/payload/queue-kit/README.md +4 -1
- package/payload/queue-kit/SPEC.md +230 -6
- package/payload/queue-kit/bin/queue-edges.sh +78 -0
- package/payload/queue-kit/checks/check-queue-entry-budget.sh +5 -3
- package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +5 -0
- package/payload/queue-kit/gate-tests/queue-edges.test.sh +130 -0
- 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 +135 -29
- package/payload/site-kit/checks/check-docs-render-fidelity.sh +100 -27
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-batch.test.sh +158 -0
- package/payload/site-kit/lib/site.sh +16 -2
- package/payload/site-kit/smoke/install.sh +9 -1
- package/payload/gate-sdk/checks/check-action-gh-repo.sh +0 -321
- package/payload/gate-sdk/checks/check-action-pinning.sh +0 -55
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: gate-sdk/SPEC.md §check-core-files — a kit: manifest line derives one path per kit root, so a root missing that path reds without any manifest edit; a kit: token carrying a wildcard is refused fail-closed because this reader requires each expanded path to exist, which is a different invariant from the glob match a couples= field performs. This lives in the bespoke unit lane rather than the good/+bad/ pair because the fixture runner reads exit 2 as a harness error and runs each case with the fixture dir as cwd, so neither the refusal nor the expansion is expressible there.
|
|
3
|
+
set -uo pipefail
|
|
4
|
+
source "$(dirname "${BASH_SOURCE[0]}")/../lib/test-hermetic.sh"
|
|
5
|
+
|
|
6
|
+
ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
7
|
+
GATE="$ROOT/gate-sdk/checks/check-core-files.sh"
|
|
8
|
+
[[ -x "$GATE" ]] || { echo "check-core-files.test: gate not found: $GATE"; exit 2; }
|
|
9
|
+
|
|
10
|
+
sb="$(mktemp -d)"
|
|
11
|
+
trap 'rm -rf "$sb"' EXIT
|
|
12
|
+
|
|
13
|
+
git -C "$sb" init -q
|
|
14
|
+
git -C "$sb" config user.email t@example.invalid
|
|
15
|
+
git -C "$sb" config user.name t
|
|
16
|
+
mkdir -p "$sb/alpha-kit" "$sb/beta-kit"
|
|
17
|
+
printf 'a\n' > "$sb/alpha-kit/SPEC.md"
|
|
18
|
+
printf 'b\n' > "$sb/beta-kit/SPEC.md"
|
|
19
|
+
printf 'r\n' > "$sb/plain.txt"
|
|
20
|
+
git -C "$sb" add -A
|
|
21
|
+
git -C "$sb" commit -qm seed
|
|
22
|
+
|
|
23
|
+
fails=0
|
|
24
|
+
run() { ( cd "$sb" && GATE_SDK_KIT_DIRS="alpha-kit beta-kit" bash "$GATE" "$1" 2>&1 ); }
|
|
25
|
+
|
|
26
|
+
# A kit: line expands to one path per root; every expansion exists, so the gate is clean
|
|
27
|
+
# and its count proves the derivation ran (2 derived + 1 hand line).
|
|
28
|
+
printf 'kit:SPEC.md\nplain.txt\n' > "$sb/good.list"
|
|
29
|
+
out="$(run good.list)"; rc=$?
|
|
30
|
+
[[ "$rc" -eq 0 ]] || { echo "FAIL [expand-clean]: expected exit 0, got $rc: $out"; fails=$((fails + 1)); }
|
|
31
|
+
grep -qF '3 manifest path(s)' <<<"$out" || { echo "FAIL [expand-count]: expected 3 expanded paths: $out"; fails=$((fails + 1)); }
|
|
32
|
+
|
|
33
|
+
# A new root with no SPEC.md reds without any manifest edit — the property Delta 2 exists for.
|
|
34
|
+
mkdir -p "$sb/gamma-kit"
|
|
35
|
+
printf 'g\n' > "$sb/gamma-kit/other.md"
|
|
36
|
+
git -C "$sb" add -A
|
|
37
|
+
git -C "$sb" commit -qm gamma
|
|
38
|
+
out="$( cd "$sb" && GATE_SDK_KIT_DIRS="alpha-kit beta-kit gamma-kit" bash "$GATE" good.list 2>&1 )"; rc=$?
|
|
39
|
+
[[ "$rc" -eq 1 ]] || { echo "FAIL [new-root-reds]: expected exit 1, got $rc: $out"; fails=$((fails + 1)); }
|
|
40
|
+
grep -qF 'missing: gamma-kit/SPEC.md' <<<"$out" || { echo "FAIL [new-root-names]: $out"; fails=$((fails + 1)); }
|
|
41
|
+
|
|
42
|
+
# An untracked expansion reds on the tracked half of the invariant, not just existence.
|
|
43
|
+
printf 'u\n' > "$sb/gamma-kit/SPEC.md"
|
|
44
|
+
out="$( cd "$sb" && GATE_SDK_KIT_DIRS="alpha-kit beta-kit gamma-kit" bash "$GATE" good.list 2>&1 )"; rc=$?
|
|
45
|
+
[[ "$rc" -eq 1 ]] || { echo "FAIL [untracked-reds]: expected exit 1, got $rc: $out"; fails=$((fails + 1)); }
|
|
46
|
+
grep -qF 'untracked: gamma-kit/SPEC.md' <<<"$out" || { echo "FAIL [untracked-names]: $out"; fails=$((fails + 1)); }
|
|
47
|
+
|
|
48
|
+
# A wildcard is refused fail-closed: this reader cannot express "some file matches".
|
|
49
|
+
for tok in 'kit:checks/*.sh' 'kit:SPEC?.md' 'kit:[ab].md'; do
|
|
50
|
+
printf '%s\n' "$tok" > "$sb/wild.list"
|
|
51
|
+
out="$(run wild.list)"; rc=$?
|
|
52
|
+
[[ "$rc" -eq 2 ]] || { echo "FAIL [wildcard-refused $tok]: expected exit 2, got $rc: $out"; fails=$((fails + 1)); }
|
|
53
|
+
grep -qF 'carries a wildcard' <<<"$out" || { echo "FAIL [wildcard-message $tok]: $out"; fails=$((fails + 1)); }
|
|
54
|
+
done
|
|
55
|
+
|
|
56
|
+
# Backward compatibility: a manifest with no kit: line behaves exactly as before.
|
|
57
|
+
printf 'plain.txt\n' > "$sb/plainonly.list"
|
|
58
|
+
out="$(run plainonly.list)"; rc=$?
|
|
59
|
+
[[ "$rc" -eq 0 ]] || { echo "FAIL [no-token-unchanged]: expected exit 0, got $rc: $out"; fails=$((fails + 1)); }
|
|
60
|
+
grep -qF '1 manifest path(s)' <<<"$out" || { echo "FAIL [no-token-count]: $out"; fails=$((fails + 1)); }
|
|
61
|
+
|
|
62
|
+
[[ "$fails" -eq 0 ]] || { echo "check-core-files.test: $fails assertion(s) failed"; exit 1; }
|
|
63
|
+
echo "check-core-files.test: clean (kit: expands per root and reds on a root missing the path or leaving it untracked; a wildcard token is refused fail-closed; a token-free manifest is unchanged)"
|
|
64
|
+
exit 0
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
the gate binary was not built from the source now in the tree
|
|
2
|
+
reports source stamp 7b30e5148d6ca2f09e1b84ff2d5c7a6033819e4c
|
|
3
|
+
stamp.txt hashes to 4f1c2a90bb7e5d3168ac04e2f5b7391dd0c6a812
|
|
4
|
+
2 descriptor(s) dispatch to that binary: check-ported check-vendored
|
|
5
|
+
help: rebuild it
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4f1c2a90bb7e5d3168ac04e2f5b7391dd0c6a812
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# A binary built from a source state this fixture tree no longer carries: its baked
|
|
3
|
+
# stamp is not stamp.txt's. The near-miss this case must not collapse into is the
|
|
4
|
+
# zero-descriptor tree, which exits 0 — so a red here can only be the stamp mismatch.
|
|
5
|
+
[[ "${1:-}" == --source-stamp ]] && { echo 7b30e5148d6ca2f09e1b84ff2d5c7a6033819e4c; exit 0; }
|
|
6
|
+
exit 2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4f1c2a90bb7e5d3168ac04e2f5b7391dd0c6a812
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# A binary built from the source the fixture tree carries: its baked stamp is the
|
|
3
|
+
# one stamp.txt reports, so the gate must reach the comparison and find them equal.
|
|
4
|
+
[[ "${1:-}" == --source-stamp ]] && { echo 4f1c2a90bb7e5d3168ac04e2f5b7391dd0c6a812; exit 0; }
|
|
5
|
+
exit 2
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Behavioral test of checks/check-gate-binary-fresh.sh over the configurations the
|
|
3
|
+
# good/+bad/ pair cannot hold: the pair is one invocation each and both are
|
|
4
|
+
# "descriptors present, binary readable". These are the load-bearing predicate's
|
|
5
|
+
# own boundary — a descriptor on disk is a declaration, a registered member
|
|
6
|
+
# resolving to one is a dispatch — plus the two no-dispatch configurations this
|
|
7
|
+
# repo's battery and the consumer smoke used to be the only oracles for.
|
|
8
|
+
#
|
|
9
|
+
# Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
|
|
10
|
+
set -uo pipefail
|
|
11
|
+
source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
|
|
12
|
+
|
|
13
|
+
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # gate-sdk/
|
|
14
|
+
GATE="$DIR/checks/check-gate-binary-fresh.sh"
|
|
15
|
+
SANDBOX="$(mktemp -d)"
|
|
16
|
+
trap 'rm -rf "$SANDBOX"' EXIT
|
|
17
|
+
|
|
18
|
+
fails=0
|
|
19
|
+
STAMP=4f1c2a90bb7e5d3168ac04e2f5b7391dd0c6a812
|
|
20
|
+
|
|
21
|
+
# One sandbox shape, re-pointed per case: a gates dir, a kit resolve dir, a stub
|
|
22
|
+
# binary whose baked stamp matches stamp.txt, and a registry the case rewrites.
|
|
23
|
+
mkdir -p "$SANDBOX/scripts" "$SANDBOX/kitroot/checks"
|
|
24
|
+
printf '%s\n' "$STAMP" > "$SANDBOX/stamp.txt"
|
|
25
|
+
cat > "$SANDBOX/stub-bin" <<EOF
|
|
26
|
+
#!/usr/bin/env bash
|
|
27
|
+
[[ "\${1:-}" == --source-stamp ]] && { echo $STAMP; exit 0; }
|
|
28
|
+
exit 2
|
|
29
|
+
EOF
|
|
30
|
+
chmod +x "$SANDBOX/stub-bin"
|
|
31
|
+
DESC='# graph: couples=docs/*.md dir=one valve=none tier=precommit
|
|
32
|
+
# spec: gate-sdk/SPEC.md §check-gate-binary-fresh — fixture descriptor'
|
|
33
|
+
|
|
34
|
+
run() { # run <bin> ; registry + descriptors are already in place
|
|
35
|
+
( cd "$SANDBOX" && env GATE_SDK_KIT_DIRS=kitroot GATE_SDK_NATIVE_BIN="$1" \
|
|
36
|
+
GATE_SDK_NATIVE_CRATE=crate "$GATE" scripts stamp.txt 2>&1 )
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
expect() { # expect <label> <want-rc> <substring> <got-rc> <output>
|
|
40
|
+
if [[ "$4" -ne "$2" ]]; then
|
|
41
|
+
echo " FAIL [$1]: want exit $2, got $4 -- $5"; fails=$((fails + 1))
|
|
42
|
+
elif ! grep -qF -- "$3" <<<"$5"; then
|
|
43
|
+
echo " FAIL [$1]: exit $2 but output lacks '$3': $5"; fails=$((fails + 1))
|
|
44
|
+
fi
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
# --- zero descriptors: clean, and the report says zero of each ---
|
|
48
|
+
printf 'check-shell\n' > "$SANDBOX/scripts/gates.list"
|
|
49
|
+
printf '#!/usr/bin/env bash\n' > "$SANDBOX/scripts/check-shell.sh"
|
|
50
|
+
out="$(run ./stub-bin)"; rc=$?
|
|
51
|
+
expect zero-descriptors 0 '0 .gate descriptor(s)' "$rc" "$out"
|
|
52
|
+
expect zero-descriptors-dispatch 0 '0 dispatched to by a live member' "$rc" "$out"
|
|
53
|
+
|
|
54
|
+
# --- descriptors present, none dispatching: clean, and the two counts differ ---
|
|
55
|
+
# The configuration every vendored tree is in after the first cohort lands: the
|
|
56
|
+
# descriptors ship with the kit root, no consumer registry names them, and no
|
|
57
|
+
# binary exists. Reading a descriptor's presence as a dispatch reds all of them.
|
|
58
|
+
printf '%s\n' "$DESC" > "$SANDBOX/scripts/check-ported.gate"
|
|
59
|
+
printf '%s\n' "$DESC" > "$SANDBOX/kitroot/checks/check-vendored.gate"
|
|
60
|
+
out="$(run ./nonexistent-bin)"; rc=$?
|
|
61
|
+
expect present-none-dispatching 0 '2 .gate descriptor(s)' "$rc" "$out"
|
|
62
|
+
expect present-none-dispatching-count 0 '0 dispatched to by a live member' "$rc" "$out"
|
|
63
|
+
|
|
64
|
+
# --- the near miss: a registered member resolves to a descriptor, no binary ---
|
|
65
|
+
# Exit 2, never 0: this is the state the corrected predicate must still fail
|
|
66
|
+
# closed on, and the one way a too-loose predicate passes its own good/ case.
|
|
67
|
+
printf 'check-shell\ncheck-ported\n' > "$SANDBOX/scripts/gates.list"
|
|
68
|
+
out="$(run ./nonexistent-bin)"; rc=$?
|
|
69
|
+
expect registered-no-binary 2 'registered member(s) dispatch to it' "$rc" "$out"
|
|
70
|
+
|
|
71
|
+
# --- absent registry: cannot verify, so exit 2 rather than a clean report ---
|
|
72
|
+
rm -f "$SANDBOX/scripts/gates.list"
|
|
73
|
+
out="$(run ./stub-bin)"; rc=$?
|
|
74
|
+
expect absent-registry 2 'no gate registry at' "$rc" "$out"
|
|
75
|
+
|
|
76
|
+
if [[ "$fails" -gt 0 ]]; then
|
|
77
|
+
echo "check-gate-binary-fresh.test.sh: $fails case(s) failed"
|
|
78
|
+
exit 1
|
|
79
|
+
fi
|
|
80
|
+
echo "check-gate-binary-fresh.test.sh: clean (load-bearing predicate: zero descriptors, descriptors with none dispatching, a registered dispatch with no binary, and an absent registry — 6 assertions over 4 cases)"
|
|
81
|
+
exit 0
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## New Features
|
|
4
4
|
|
|
5
|
-
- **some-other-task** — live, but nothing points at it.
|
|
5
|
+
- **some-other-task** — live, but nothing points at it. Its body bolds
|
|
6
|
+
**emphasis** the way real entry prose does, and a token scan reads that
|
|
7
|
+
emphasis as a live slug.
|
|
6
8
|
|
|
7
9
|
## Done
|
|
8
10
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# Fixture gate (scanned as text, never executed): one exemption's `# until:`
|
|
3
|
-
# resolves only to Done,
|
|
3
|
+
# resolves only to Done, one carries no disposition, and one points at a bold
|
|
4
|
+
# token in body prose that was never a task — all three must be REJECTED.
|
|
4
5
|
set -uo pipefail
|
|
5
6
|
|
|
6
7
|
# exception-list: surfaces excused from the sample scan
|
|
7
8
|
EXEMPT=(
|
|
8
9
|
"surface-a" # until: retired-task
|
|
9
10
|
"surface-b"
|
|
11
|
+
"surface-c" # until: emphasis
|
|
10
12
|
)
|
|
11
13
|
echo "SAMPLE: clean (${#EXEMPT[@]} exemptions)"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
+
# no-fixture: a fixture-less member, so the static source-grep is its only output-contract oracle
|
|
2
3
|
# Fixture gate (scanned as text): passes silently with no machine-keyable success
|
|
3
4
|
# line — a reader cannot tell "passed" from "did nothing".
|
|
4
5
|
exit 0
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
ambiguous dispatch
|
|
2
|
+
descriptor names no subcommand
|
|
3
|
+
subcommand nothing declares
|
|
4
|
+
no reference-only disposition
|
|
5
|
+
no recorded disposition: check-alpha
|
|
6
|
+
manifest-class annotation in implementation source
|
|
7
|
+
implementation sibling in the vendoring set: kitroot/check-orphan.rs
|
|
8
|
+
crate root inside the vendoring set: kitroot/native
|
|
9
|
+
malformed target triple: 'notatriple'
|
|
10
|
+
matrix declaration not roster-derived: publish.yml
|
|
11
|
+
digest recomputed: job 'build'
|
|
12
|
+
digest computed by a consumer: job 'release'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Hermetic fixture: a publish workflow spelling its platform set by hand and
|
|
2
|
+
# computing one digest twice, plus a pure-consumer job re-deriving another.
|
|
3
|
+
jobs:
|
|
4
|
+
build:
|
|
5
|
+
strategy:
|
|
6
|
+
matrix:
|
|
7
|
+
target: x86_64-unknown-linux-gnu
|
|
8
|
+
steps:
|
|
9
|
+
- run: sha256sum "$binary" > "$binary.sha256"
|
|
10
|
+
- run: sha256sum "$binary" > "$binary.sha256"
|
|
11
|
+
- uses: actions/upload-artifact@0000000000000000000000000000000000000000
|
|
12
|
+
release:
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/download-artifact@0000000000000000000000000000000000000000
|
|
15
|
+
- run: sha256sum "$tarball" > "$tarball.sha256"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# graph: couples=docs/*.md dir=one valve=none tier=precommit
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# graph: couples=docs/*.md dir=one valve=none tier=precommit
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
GATE-SUBSTRATE-PARITY: clean
|
|
2
|
+
1 descriptor(s) in parity with the 2-subcommand roster, 1 reference-only
|
|
3
|
+
1 substrate-sensitive member(s) all dispositioned
|
|
4
|
+
1 implementation source(s) free of manifest-class annotation
|
|
5
|
+
1 kit root(s) scanned for an implementation sibling, crate root crate outside every kit root
|
|
6
|
+
target roster read at targets.list with 1 well-formed target(s)
|
|
7
|
+
publish workflow read at publish.yml, 1 matrix declaration(s) roster-derived across 2 job(s) with one producer per digest
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Hermetic fixture: a publish workflow whose matrix is roster-derived and whose
|
|
2
|
+
# digests have one producer each. Not a runnable workflow — only the shape
|
|
3
|
+
# assertion F reads.
|
|
4
|
+
jobs:
|
|
5
|
+
build:
|
|
6
|
+
strategy:
|
|
7
|
+
matrix:
|
|
8
|
+
include: ${{ fromJSON(needs.roster.outputs.legs) }}
|
|
9
|
+
steps:
|
|
10
|
+
- run: sha256sum "$binary" > "$binary.sha256"
|
|
11
|
+
- uses: actions/upload-artifact@0000000000000000000000000000000000000000
|
|
12
|
+
release:
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/download-artifact@0000000000000000000000000000000000000000
|
|
15
|
+
- run: sha256sum -c "$binary.sha256"
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Behavioral test of checks/check-gate-substrate-parity.sh over the descriptor
|
|
3
|
+
# configurations the good/+bad/ pair cannot hold — it is one invocation each, both
|
|
4
|
+
# "descriptors and a binary". Two of these were previously assigned to live trees
|
|
5
|
+
# (this repo's battery, the consumer smoke) and are held here instead, so they stay
|
|
6
|
+
# reachable whatever those trees happen to be; the third is the corrected
|
|
7
|
+
# load-bearing predicate's own subject.
|
|
8
|
+
#
|
|
9
|
+
# Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
|
|
10
|
+
set -uo pipefail
|
|
11
|
+
source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
|
|
12
|
+
|
|
13
|
+
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # gate-sdk/
|
|
14
|
+
GATE="$DIR/checks/check-gate-substrate-parity.sh"
|
|
15
|
+
SANDBOX="$(mktemp -d)"
|
|
16
|
+
trap 'rm -rf "$SANDBOX"' EXIT
|
|
17
|
+
|
|
18
|
+
fails=0
|
|
19
|
+
mkdir -p "$SANDBOX/scripts" "$SANDBOX/kitroot/checks"
|
|
20
|
+
printf '#!/usr/bin/env bash\n# graph: couples=docs/*.md dir=one valve=none tier=precommit\necho "ALPHA: clean (stub)"\n' \
|
|
21
|
+
> "$SANDBOX/scripts/check-alpha.sh"
|
|
22
|
+
cat > "$SANDBOX/conservation.md" <<'EOF'
|
|
23
|
+
## Meta-gate conservation for the binary substrate
|
|
24
|
+
|
|
25
|
+
| Subcommand | Disposition |
|
|
26
|
+
|---|---|
|
|
27
|
+
| `check-reference` | Reference-only — carried by the binary with no descriptor. |
|
|
28
|
+
|
|
29
|
+
## Next section
|
|
30
|
+
EOF
|
|
31
|
+
cat > "$SANDBOX/stub-bin" <<'EOF'
|
|
32
|
+
#!/usr/bin/env bash
|
|
33
|
+
[[ "${1:-}" == --list ]] && { echo check-reference; exit 0; }
|
|
34
|
+
exit 2
|
|
35
|
+
EOF
|
|
36
|
+
# A binary carrying the fixture's descriptors too, for the cases where one dispatches.
|
|
37
|
+
cat > "$SANDBOX/stub-bin-full" <<'EOF'
|
|
38
|
+
#!/usr/bin/env bash
|
|
39
|
+
[[ "${1:-}" == --list ]] && { echo check-ported; echo check-vendored; echo check-reference; exit 0; }
|
|
40
|
+
exit 2
|
|
41
|
+
EOF
|
|
42
|
+
chmod +x "$SANDBOX/stub-bin" "$SANDBOX/stub-bin-full"
|
|
43
|
+
DESC='# graph: couples=docs/*.md dir=one valve=none tier=precommit
|
|
44
|
+
# spec: gate-sdk/SPEC.md §check-gate-substrate-parity — fixture descriptor'
|
|
45
|
+
|
|
46
|
+
run() { # run <bin>
|
|
47
|
+
( cd "$SANDBOX" && env GATE_SDK_KIT_DIRS=kitroot GATE_SDK_NATIVE_BIN="$1" \
|
|
48
|
+
GATE_SDK_NATIVE_CRATE=crate GATE_SDK_NATIVE_SRC=impl \
|
|
49
|
+
"$GATE" scripts conservation.md 2>&1 )
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
expect() { # expect <label> <want-rc> <substring> <got-rc> <output>
|
|
53
|
+
if [[ "$4" -ne "$2" ]]; then
|
|
54
|
+
echo " FAIL [$1]: want exit $2, got $4 -- $5"; fails=$((fails + 1))
|
|
55
|
+
elif ! grep -qF -- "$3" <<<"$5"; then
|
|
56
|
+
echo " FAIL [$1]: exit $2 but output lacks '$3': $5"; fails=$((fails + 1))
|
|
57
|
+
fi
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
# --- no descriptors, binary present: the roster half is the only live half ---
|
|
61
|
+
# The post-revert tree. Assertion B still compares both directions, so the
|
|
62
|
+
# reference-only allowance is what keeps the binary's subcommand from reading as
|
|
63
|
+
# a stranded implementation — the half a descriptor-count guard would blank out.
|
|
64
|
+
printf 'check-alpha\n' > "$SANDBOX/scripts/gates.list"
|
|
65
|
+
out="$(run ./stub-bin)"; rc=$?
|
|
66
|
+
expect no-desc-binary 0 '0 descriptor(s) in parity with the 1-subcommand roster, 1 reference-only' "$rc" "$out"
|
|
67
|
+
|
|
68
|
+
# --- no descriptors, no binary: clean, and it says why the roster went unread ---
|
|
69
|
+
out="$(run ./nonexistent-bin)"; rc=$?
|
|
70
|
+
expect no-desc-no-binary 0 'no binary at ./nonexistent-bin so no subcommand roster to compare' "$rc" "$out"
|
|
71
|
+
|
|
72
|
+
# --- descriptors present, none dispatching, no binary, no target roster ---
|
|
73
|
+
# Every vendored tree after the first cohort lands. Two arms ride the corrected
|
|
74
|
+
# predicate and both must stay quiet here: assertion B's fail-closed arm, and
|
|
75
|
+
# assertion F's missing-roster arm (a consumer receives kit roots, never the crate,
|
|
76
|
+
# so its roster is absent by construction).
|
|
77
|
+
printf '%s\n' "$DESC" > "$SANDBOX/kitroot/checks/check-vendored.gate"
|
|
78
|
+
printf '%s\n' "$DESC" > "$SANDBOX/scripts/check-ported.gate"
|
|
79
|
+
out="$(run ./nonexistent-bin)"; rc=$?
|
|
80
|
+
expect desc-none-dispatching 0 '1 member(s) with one declaration each, 0 of them dispatching to the binary' "$rc" "$out"
|
|
81
|
+
if grep -qF 'no target roster' <<<"$out"; then
|
|
82
|
+
echo " FAIL [desc-none-dispatching-roster]: assertion F red on a declaration nothing dispatches to: $out"
|
|
83
|
+
fails=$((fails + 1))
|
|
84
|
+
fi
|
|
85
|
+
|
|
86
|
+
# --- the near miss: a registered member resolves to a descriptor, no binary ---
|
|
87
|
+
# Exit 2, never 0 — the one way a too-loose predicate passes its own good/ case.
|
|
88
|
+
printf 'check-alpha\ncheck-ported\n' > "$SANDBOX/scripts/gates.list"
|
|
89
|
+
out="$(run ./nonexistent-bin)"; rc=$?
|
|
90
|
+
expect registered-no-binary 2 'registered member(s) dispatch to it' "$rc" "$out"
|
|
91
|
+
|
|
92
|
+
# --- a consumer that received a binary: dispatching, no roster, no crate source ---
|
|
93
|
+
# The vendored-tree shape the consumer smoke is in. Assertion F's missing-roster arm
|
|
94
|
+
# must stay quiet: declaring platform support is the publishing tree's act, and a
|
|
95
|
+
# consumer receives kit roots and an artifact but never the crate.
|
|
96
|
+
out="$(run ./stub-bin-full)"; rc=$?
|
|
97
|
+
expect consumer-with-binary 0 '2 descriptor(s) in parity with the 3-subcommand roster, 1 reference-only' "$rc" "$out"
|
|
98
|
+
if grep -qF 'no target roster' <<<"$out"; then
|
|
99
|
+
echo " FAIL [consumer-with-binary-roster]: assertion F red in a tree that builds nothing: $out"
|
|
100
|
+
fails=$((fails + 1))
|
|
101
|
+
fi
|
|
102
|
+
|
|
103
|
+
# --- the counterpart: a publishing tree dispatching with no roster still reds ---
|
|
104
|
+
# Same configuration but the crate's source is tracked here, which is what makes the
|
|
105
|
+
# tree the one that asserts platform support. Source, not directory presence: build
|
|
106
|
+
# output under the crate root must not read as a publisher.
|
|
107
|
+
PUB="$SANDBOX/pub"
|
|
108
|
+
mkdir -p "$PUB/crate"
|
|
109
|
+
cp -R "$SANDBOX/scripts" "$SANDBOX/kitroot" "$SANDBOX/conservation.md" "$SANDBOX/stub-bin-full" "$PUB/"
|
|
110
|
+
git -C "$PUB" init -q
|
|
111
|
+
printf 'fn main() {}\n' > "$PUB/crate/main.src"
|
|
112
|
+
git -C "$PUB" add crate/main.src
|
|
113
|
+
out="$( cd "$PUB" && env GATE_SDK_KIT_DIRS=kitroot GATE_SDK_NATIVE_BIN=./stub-bin-full \
|
|
114
|
+
GATE_SDK_NATIVE_CRATE=crate GATE_SDK_NATIVE_SRC=impl \
|
|
115
|
+
"$GATE" scripts conservation.md 2>&1 )"; rc=$?
|
|
116
|
+
expect publishing-tree-no-roster 1 'no target roster' "$rc" "$out"
|
|
117
|
+
|
|
118
|
+
if [[ "$fails" -gt 0 ]]; then
|
|
119
|
+
echo "check-gate-substrate-parity.test.sh: $fails case(s) failed"
|
|
120
|
+
exit 1
|
|
121
|
+
fi
|
|
122
|
+
echo "check-gate-substrate-parity.test.sh: clean (descriptor configurations: none with a binary, none without, present-but-none-dispatching with neither binary nor roster, a registered dispatch with no binary, a consumer dispatching to a placed binary with no crate, and the publishing counterpart that still reds — 8 assertions over 6 cases)"
|
|
123
|
+
exit 0
|