checkwright 0.38.0 → 0.39.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/package.json +2 -2
- package/payload/artifact/aarch64-apple-darwin/checkwright-gates +0 -0
- package/payload/artifact/aarch64-apple-darwin/checkwright-gates.sha256 +1 -1
- package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe +0 -0
- package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -1
- package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates +0 -0
- package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
- package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates +0 -0
- package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates.sha256 +1 -1
- package/payload/artifact/x86_64-apple-darwin/checkwright-gates +0 -0
- package/payload/artifact/x86_64-apple-darwin/checkwright-gates.sha256 +1 -1
- package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe +0 -0
- package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -1
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
- package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates +0 -0
- package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates.sha256 +1 -1
- package/payload/canon-kit/gate-tests/check-amendment-queue.test.sh +3 -3
- package/payload/canon-kit/gate-tests/check-amendment-update-target.test.sh +3 -3
- package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +2 -2
- package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +3 -3
- package/payload/canon-kit/gate-tests/check-prose-bounds.test.sh +1 -1
- package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +2 -2
- package/payload/canon-kit/gate-tests/check-provenance-seam/good/TASK-QUEUE.md +4 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/good/widget-toolkit/SPEC.md +1 -1
- package/payload/canon-kit/gate-tests/check-todo-task-liveness.test.sh +1 -1
- package/payload/canon-kit/gate-tests/check-unmarked-claim.test.sh +7 -7
- package/payload/context-kit/gate-tests/check-surface-ratchet.test.sh +7 -6
- package/payload/delegation-kit/README.md +1 -1
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +2 -2
- package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +2 -2
- package/payload/evidence-kit/gate-tests/pre-hook.test.sh +5 -5
- package/payload/evidence-kit/gate-tests/producer-lock.test.sh +7 -7
- package/payload/evidence-kit/gate-tests/statement-store.test.sh +5 -5
- package/payload/evidence-kit/gate-tests/verify-gate-run-strict.test.sh +5 -4
- package/payload/gate-sdk/README.md +7 -0
- package/payload/gate-sdk/bin/build-native.sh +5 -4
- package/payload/gate-sdk/bin/run-gates.ps1 +8 -7
- package/payload/gate-sdk/bin/run-gates.sh +10 -8
- package/payload/gate-sdk/checks/check-binary-strings.gate +4 -0
- package/payload/gate-sdk/checks/check-exec-write.gate +4 -0
- package/payload/gate-sdk/checks/check-migration-guard.gate +4 -0
- package/payload/gate-sdk/checks/check-path-names.gate +4 -0
- package/payload/gate-sdk/checks/check-pipefail-readers.gate +4 -0
- package/payload/gate-sdk/checks/check-script-preflight.gate +4 -0
- package/payload/gate-sdk/checks/check-site-count.gate +4 -0
- package/payload/gate-sdk/checks/check-tree-terms.gate +1 -1
- package/payload/gate-sdk/gate-tests/binary-only-recipe.test.sh +2 -2
- package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +11 -11
- package/payload/gate-sdk/gate-tests/check-binary-strings/bad/expect.txt +4 -0
- package/payload/gate-sdk/gate-tests/check-binary-strings/bad/out/app.elf +0 -0
- package/payload/gate-sdk/gate-tests/check-binary-strings/bad/out/notes.bin +0 -0
- package/payload/gate-sdk/gate-tests/check-binary-strings/bad/scripts/gate-sdk-config.knobs +3 -0
- package/payload/gate-sdk/gate-tests/check-binary-strings/bad/shapes.list +2 -0
- package/payload/gate-sdk/gate-tests/check-binary-strings/bad/terms.list +2 -0
- package/payload/gate-sdk/gate-tests/check-binary-strings/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-binary-strings/good/out/app.elf +0 -0
- package/payload/gate-sdk/gate-tests/check-binary-strings/good/scripts/gate-sdk-config.knobs +3 -0
- package/payload/gate-sdk/gate-tests/check-binary-strings/good/shapes.list +2 -0
- package/payload/gate-sdk/gate-tests/check-binary-strings/good/terms.list +4 -0
- package/payload/gate-sdk/gate-tests/check-binary-strings.test.sh +74 -0
- package/payload/gate-sdk/gate-tests/check-exec-write/bad/expect.txt +13 -0
- package/payload/gate-sdk/gate-tests/check-exec-write/bad/scripts/gate-sdk-config.knobs +2 -0
- package/payload/gate-sdk/gate-tests/check-exec-write/bad/src/caller.rs +5 -0
- package/payload/gate-sdk/gate-tests/check-exec-write/bad/src/helper.rs +5 -0
- package/payload/gate-sdk/gate-tests/check-exec-write/bad/src/sites.rs +19 -0
- package/payload/gate-sdk/gate-tests/check-exec-write/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-exec-write/good/scripts/gate-sdk-config.knobs +2 -0
- package/payload/gate-sdk/gate-tests/check-exec-write/good/src/helper.rs +5 -0
- package/payload/gate-sdk/gate-tests/check-exec-write/good/src/main.rs +15 -0
- package/payload/gate-sdk/gate-tests/check-exec-write.test.sh +69 -0
- package/payload/gate-sdk/gate-tests/check-identity.test.sh +2 -2
- package/payload/gate-sdk/gate-tests/check-migration-guard/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-migration-guard/bad/base/0001_init.sql +1 -0
- package/payload/gate-sdk/gate-tests/check-migration-guard/bad/base/0002_orders.sql +1 -0
- package/payload/gate-sdk/gate-tests/check-migration-guard/bad/base/0003_audit.sql +1 -0
- package/payload/gate-sdk/gate-tests/check-migration-guard/bad/destructive.list +4 -0
- package/payload/gate-sdk/gate-tests/check-migration-guard/bad/expect.txt +7 -0
- package/payload/gate-sdk/gate-tests/check-migration-guard/bad/migrations/0001_init.sql +1 -0
- package/payload/gate-sdk/gate-tests/check-migration-guard/bad/migrations/0002_late.sql +1 -0
- package/payload/gate-sdk/gate-tests/check-migration-guard/bad/migrations/0003_audit_log.sql +1 -0
- package/payload/gate-sdk/gate-tests/check-migration-guard/bad/migrations/0004_prune.sql +3 -0
- package/payload/gate-sdk/gate-tests/check-migration-guard/bad/scripts/gate-sdk-config.knobs +2 -0
- package/payload/gate-sdk/gate-tests/check-migration-guard/good/args +2 -0
- package/payload/gate-sdk/gate-tests/check-migration-guard/good/base/0001_init.sql +1 -0
- package/payload/gate-sdk/gate-tests/check-migration-guard/good/base/0002_legacy.sql +1 -0
- package/payload/gate-sdk/gate-tests/check-migration-guard/good/destructive.list +4 -0
- package/payload/gate-sdk/gate-tests/check-migration-guard/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-migration-guard/good/migrations/0001_init.sql +1 -0
- package/payload/gate-sdk/gate-tests/check-migration-guard/good/migrations/0002_legacy.sql +1 -0
- package/payload/gate-sdk/gate-tests/check-migration-guard/good/migrations/0003_retire_legacy.sql +6 -0
- package/payload/gate-sdk/gate-tests/check-migration-guard/good/scripts/gate-sdk-config.knobs +2 -0
- package/payload/gate-sdk/gate-tests/check-migration-guard.test.sh +136 -0
- package/payload/gate-sdk/gate-tests/check-path-names/bad/expect.txt +6 -0
- package/payload/gate-sdk/gate-tests/check-path-names/bad/scripts/gate-sdk-config.knobs +1 -0
- package/payload/gate-sdk/gate-tests/check-path-names/bad/terms.list +3 -0
- package/payload/gate-sdk/gate-tests/check-path-names/bad/tree/ZePhYr.md +1 -0
- package/payload/gate-sdk/gate-tests/check-path-names/bad/tree/foo/a.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-path-names/bad/tree/foo/zephyr.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-path-names/bad/tree/foo-cli.sh +1 -0
- package/payload/gate-sdk/gate-tests/check-path-names/bad/tree/foo.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-path-names/bad/tree/foo_x.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-path-names/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-path-names/good/scripts/gate-sdk-config.knobs +1 -0
- package/payload/gate-sdk/gate-tests/check-path-names/good/terms.list +1 -0
- package/payload/gate-sdk/gate-tests/check-path-names/good/tree/foobar.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-path-names/good/tree/food/a.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-path-names/good/tree/xfoo.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-path-names.test.sh +66 -0
- package/payload/gate-sdk/gate-tests/check-pipefail-readers/bad/baseline.tsv +4 -0
- package/payload/gate-sdk/gate-tests/check-pipefail-readers/bad/expect.txt +17 -0
- package/payload/gate-sdk/gate-tests/check-pipefail-readers/bad/scripts/gate-sdk-config.knobs +2 -0
- package/payload/gate-sdk/gate-tests/check-pipefail-readers/bad/tree/over.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-pipefail-readers/bad/tree/readers.sh +16 -0
- package/payload/gate-sdk/gate-tests/check-pipefail-readers/bad/tree/shared-lib.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-pipefail-readers/bad/tree/stale.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-pipefail-readers/good/baseline.tsv +2 -0
- package/payload/gate-sdk/gate-tests/check-pipefail-readers/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-pipefail-readers/good/scripts/gate-sdk-config.knobs +2 -0
- package/payload/gate-sdk/gate-tests/check-pipefail-readers/good/tree/clean.sh +17 -0
- package/payload/gate-sdk/gate-tests/check-pipefail-readers/good/tree/lib/baselined-lib.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-pipefail-readers/good/tree/no-pipefail.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-pipefail-readers.test.sh +114 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor.test.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-script-preflight/bad/expect.txt +10 -0
- package/payload/gate-sdk/gate-tests/check-script-preflight/bad/rules.list +23 -0
- package/payload/gate-sdk/gate-tests/check-script-preflight/bad/scripts/gate-sdk-config.knobs +2 -0
- package/payload/gate-sdk/gate-tests/check-script-preflight/bad/tree/submit-job.sh +13 -0
- package/payload/gate-sdk/gate-tests/check-script-preflight/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-script-preflight/good/rules.list +23 -0
- package/payload/gate-sdk/gate-tests/check-script-preflight/good/scripts/gate-sdk-config.knobs +2 -0
- package/payload/gate-sdk/gate-tests/check-script-preflight/good/tree/submit-job.sh +17 -0
- package/payload/gate-sdk/gate-tests/check-script-preflight.test.sh +110 -0
- package/payload/gate-sdk/gate-tests/check-site-count/bad/expect.txt +4 -0
- package/payload/gate-sdk/gate-tests/check-site-count/bad/rules.list +5 -0
- package/payload/gate-sdk/gate-tests/check-site-count/bad/scripts/gate-sdk-config.knobs +1 -0
- package/payload/gate-sdk/gate-tests/check-site-count/bad/sites.tsv +3 -0
- package/payload/gate-sdk/gate-tests/check-site-count/bad/tree/new.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-site-count/bad/tree/over.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-site-count/bad/tree/under.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-site-count/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-site-count/good/rules.list +5 -0
- package/payload/gate-sdk/gate-tests/check-site-count/good/scripts/gate-sdk-config.knobs +1 -0
- package/payload/gate-sdk/gate-tests/check-site-count/good/sites.tsv +2 -0
- package/payload/gate-sdk/gate-tests/check-site-count/good/tree/blob.bin +0 -0
- package/payload/gate-sdk/gate-tests/check-site-count/good/tree/pinned.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-site-count/good/tree/plain.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-site-count/good/tree/tests/helper.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-site-count.test.sh +90 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/expect.txt +11 -8
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/patterns.list +4 -1
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/scripts/gate-sdk-config.knobs +1 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/terms.list +4 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/terms.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/scripts/gate-sdk-config.knobs +1 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/rosters/terms.list +2 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/words.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms.test.sh +36 -16
- package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +5 -6
- package/payload/gate-sdk/gate-tests/lib-gate.test.sh +8 -8
- package/payload/gate-sdk/gate-tests/native-git-hooks.test.sh +7 -7
- package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +4 -4
- package/payload/gate-sdk/gate-tests/run-for-path.test.sh +3 -3
- package/payload/gate-sdk/gate-tests/run-gates-linked-worktree.test.sh +6 -6
- package/payload/gate-sdk/gate-tests/run-json.test.sh +52 -0
- package/payload/gate-sdk/gate-tests/verdict-store.test.sh +99 -0
- package/payload/gate-sdk/lib/gate.sh +12 -9
- package/payload/gate-sdk/lib/test-hermetic.sh +2 -2
- package/payload/gate-sdk/templates/check-skeleton.sh +2 -1
- package/payload/gate-sdk/templates/migration-destructive.list +10 -0
- package/payload/gate-sdk/templates/script-rules.list +39 -0
- package/payload/gate-sdk/templates/strings-shapes.list +15 -0
- package/payload/guard-kit/gate-tests/consumer-rules.test.sh +5 -5
- package/payload/guard-kit/gate-tests/door-binding-corpus.test.sh +2 -2
- package/payload/lifecycle-kit/gate-tests/boundary-worktree-refusal.test.sh +1 -1
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry.test.sh +1 -1
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +3 -3
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +1 -1
- package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +2 -2
- package/payload/lifecycle-kit/gate-tests/lead-journal-open.test.sh +18 -2
- package/payload/lifecycle-kit/gate-tests/peer-channel.test.sh +35 -6
- package/payload/lifecycle-kit/gate-tests/preflight-valve.test.sh +4 -4
- package/payload/lifecycle-kit/templates/consult.md +1 -1
- package/payload/lifecycle-kit/templates/stages/scope.md +1 -1
- package/payload/queue-kit/README.md +1 -1
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness.test.sh +2 -2
- package/payload/queue-kit/gate-tests/check-task-conservation.test.sh +4 -4
- package/payload/site-kit/gate-tests/check-docs-liquid-parse-parser.test.sh +4 -4
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-batch.test.sh +9 -9
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"checkwright-pwsh": "bin/checkwright.ps1"
|
|
5
5
|
},
|
|
6
6
|
"checkwright": {
|
|
7
|
-
"commit": "
|
|
7
|
+
"commit": "892e3205c56b5fc4d86189219d1d774a74fd1b06",
|
|
8
8
|
"spec_base_url": "https://checkwright.dev"
|
|
9
9
|
},
|
|
10
10
|
"description": "Reproducible checks that catch unsupported claims in coding-agent delivery before merge: a task marked done with no recorded test run, a skipped lifecycle stage, a spec naming a file the tree lacks. They prove the evidence a claim rests on exists, not that the code is correct.",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"type": "git",
|
|
31
31
|
"url": "git+https://github.com/checkwright/checkwright.git"
|
|
32
32
|
},
|
|
33
|
-
"version": "0.
|
|
33
|
+
"version": "0.39.0"
|
|
34
34
|
}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
86e0016a79259df3d8d4858427c6cffc2b2019f8acd8303432cd2fb00fd1407e checkwright-gates
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
6a1c469eff394cd85836f6f7fb54229d745ae2e1f5bba34ffa3cf1b903147e3c *checkwright-gates.exe
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4a549a4b73980ad9e5dfdbaf2d50bbafd54a11f76cb9c894b24ffbfce1e55e13 checkwright-gates
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
bfe700ee5b61391413ffc1413296c47f59bc574cb1139e658d8badb12eafc1b1 checkwright-gates
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
0397efb3d03bd967a535896b23c5f7dcb4350fcccaa205a581dc8231b07fbd94 checkwright-gates
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ad05dc0ad3a1d300192d3eb21d3c7bdf16fb02fed998a0cddfcf5631120735a7 *checkwright-gates.exe
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2079dd8e6489b397d0de8f5b67a27b0816e0a468e5d63af42fd8c62fc7232be1 checkwright-gates
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
f4b996865880fc42a5683cac7c8e7eddd44fff6b106925991c0e7537a689080b checkwright-gates
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# spec: canon-kit/SPEC.md §check-amendment-queue — the absent-queue clean and the wrong-kind refusal,
|
|
3
|
-
# arms the pair cannot spell: its good/ holds a queue, and exit
|
|
3
|
+
# arms the pair cannot spell: its good/ holds a queue, and exit 3 has no pair spelling
|
|
4
4
|
#
|
|
5
5
|
# Run by the --run-gate-tests arm (any <tests-dir>/*.test.sh; must exit 0).
|
|
6
6
|
set -uo pipefail
|
|
@@ -29,11 +29,11 @@ check_case() { # $1=label $2=want-rc $3=want-substring $4=queue path
|
|
|
29
29
|
check_case "absent-queue-is-not-applicable" 0 "clean (not applicable: no queue file at" "$SANDBOX/TASK-QUEUE.md"
|
|
30
30
|
|
|
31
31
|
mkdir -p "$SANDBOX/dirqueue"
|
|
32
|
-
check_case "non-file-queue-fails-closed"
|
|
32
|
+
check_case "non-file-queue-fails-closed" 3 "not a file" "$SANDBOX/dirqueue"
|
|
33
33
|
|
|
34
34
|
ln -s "$SANDBOX/gone.md" "$SANDBOX/danglingqueue" 2>/dev/null
|
|
35
35
|
if [[ -L "$SANDBOX/danglingqueue" ]]; then
|
|
36
|
-
check_case "dangling-link-queue-fails-closed"
|
|
36
|
+
check_case "dangling-link-queue-fails-closed" 3 "not a file" "$SANDBOX/danglingqueue"
|
|
37
37
|
fi
|
|
38
38
|
|
|
39
39
|
if [[ "$fails" -gt 0 ]]; then
|
|
@@ -50,7 +50,7 @@ cat >"$SANDBOX/nowhat/SPEC-x.md" <<'EOF'
|
|
|
50
50
|
|
|
51
51
|
- **component/SPEC.md** — an update target in an amendment with no deltas.
|
|
52
52
|
EOF
|
|
53
|
-
check_case "updated-without-what-changes-fails-closed"
|
|
53
|
+
check_case "updated-without-what-changes-fails-closed" 3 "but no '## What changes'" "$SANDBOX/nowhat"
|
|
54
54
|
|
|
55
55
|
# The two permission-shaped refusals. A tree where the sandbox owner can read
|
|
56
56
|
# what it just made unreadable proves nothing, so each is probed before it is
|
|
@@ -61,7 +61,7 @@ chmod 000 "$SANDBOX/unread/SPEC-y.md"
|
|
|
61
61
|
if cat "$SANDBOX/unread/SPEC-y.md" >/dev/null 2>&1; then
|
|
62
62
|
echo " SKIP [unreadable-amendment-fails-closed]: this user reads a 0000 file"
|
|
63
63
|
else
|
|
64
|
-
check_case "unreadable-amendment-fails-closed"
|
|
64
|
+
check_case "unreadable-amendment-fails-closed" 3 "cannot read" "$SANDBOX/unread"
|
|
65
65
|
fi
|
|
66
66
|
|
|
67
67
|
mkdir -p "$SANDBOX/unwalk/sub"
|
|
@@ -71,7 +71,7 @@ if ls "$SANDBOX/unwalk/sub" >/dev/null 2>&1; then
|
|
|
71
71
|
else
|
|
72
72
|
# The divergence from check-amendment-queue's best-effort finder, executable:
|
|
73
73
|
# an empty amendment set hides every violation here, so the walk refuses.
|
|
74
|
-
check_case "unwalkable-root-fails-closed"
|
|
74
|
+
check_case "unwalkable-root-fails-closed" 3 "cannot read directory" "$SANDBOX/unwalk"
|
|
75
75
|
fi
|
|
76
76
|
|
|
77
77
|
if [[ "$fails" -gt 0 ]]; then
|
|
@@ -93,9 +93,9 @@ fi
|
|
|
93
93
|
check_case "queue-absent-not-applicable" 0 "clean (not applicable: no queue file at" \
|
|
94
94
|
CANON_KIT_KNOB_FILE="$SANDBOX/cfg.knobs" CANON_KIT_QUEUE_FILE="$SANDBOX/nope.md"
|
|
95
95
|
|
|
96
|
-
# A queue path naming anything but a file is a fail-closed harness error (exit
|
|
96
|
+
# A queue path naming anything but a file is a fail-closed harness error (exit 3).
|
|
97
97
|
mkdir -p "$SANDBOX/dirqueue"
|
|
98
|
-
check_case "queue-non-file-fail-closed"
|
|
98
|
+
check_case "queue-non-file-fail-closed" 3 "not a file" \
|
|
99
99
|
CANON_KIT_KNOB_FILE="$SANDBOX/cfg.knobs" CANON_KIT_QUEUE_FILE="$SANDBOX/dirqueue"
|
|
100
100
|
|
|
101
101
|
if [[ "$fails" -gt 0 ]]; then
|
|
@@ -53,7 +53,7 @@ cat >"$SANDBOX/SPEC.md" <<'EOF'
|
|
|
53
53
|
<!-- measured: gate-tally=7 -->
|
|
54
54
|
The registry holds 7 gates today.
|
|
55
55
|
EOF
|
|
56
|
-
check_case "unknown-key-fails-closed"
|
|
56
|
+
check_case "unknown-key-fails-closed" 3 "key 'gate-tally' is absent from the emitter's roster" cfg.knobs
|
|
57
57
|
|
|
58
58
|
# The authoring contract arm C prices: a bound claim carrying more than one
|
|
59
59
|
# distinct cardinal is ambiguous, and the gate refuses to guess which one the
|
|
@@ -64,7 +64,7 @@ cat >"$SANDBOX/SPEC.md" <<'EOF'
|
|
|
64
64
|
<!-- measured: gate-total=7 -->
|
|
65
65
|
The registry holds 7 gates across 3 kits today.
|
|
66
66
|
EOF
|
|
67
|
-
check_case "ambiguous-claim-fails-closed"
|
|
67
|
+
check_case "ambiguous-claim-fails-closed" 3 "2 distinct cardinals" cfg.knobs
|
|
68
68
|
|
|
69
69
|
# A marker that does not parse is an authoring error, never a site to skip: a
|
|
70
70
|
# skipped malformed marker is an unchecked claim that looks checked.
|
|
@@ -74,7 +74,7 @@ cat >"$SANDBOX/SPEC.md" <<'EOF'
|
|
|
74
74
|
<!-- measured: gate-total -->
|
|
75
75
|
The registry holds 7 gates today.
|
|
76
76
|
EOF
|
|
77
|
-
check_case "malformed-marker-fails-closed"
|
|
77
|
+
check_case "malformed-marker-fails-closed" 3 "marker does not parse" cfg.knobs
|
|
78
78
|
|
|
79
79
|
# Inactive by default: with no oracle command the gate has nothing to check a
|
|
80
80
|
# marker against, and reports clean rather than reddening every marker in a
|
|
@@ -81,7 +81,7 @@ check_case "below" 1 "lower the row to '2 a.md'" "$out" "$rc"
|
|
|
81
81
|
|
|
82
82
|
ceiling "2 a.md" "1 b.md" "1 b.md"
|
|
83
83
|
out="$(run)"; rc=$?
|
|
84
|
-
check_case "duplicate-row"
|
|
84
|
+
check_case "duplicate-row" 3 "a second row for 'b.md'" "$out" "$rc"
|
|
85
85
|
|
|
86
86
|
rm -f "$SANDBOX/ceiling.txt"
|
|
87
87
|
out="$(run)"; rc=$?
|
|
@@ -44,14 +44,14 @@ CANON_KIT_ENUM_SETS_CMD[] = bash
|
|
|
44
44
|
CANON_KIT_ENUM_SETS_CMD[] = -c
|
|
45
45
|
CANON_KIT_ENUM_SETS_CMD[] = echo hi; exit 4
|
|
46
46
|
EOF
|
|
47
|
-
check_case "cmd-error-fail-closed"
|
|
47
|
+
check_case "cmd-error-fail-closed" 3 "" CANON_KIT_KNOB_FILE="$SANDBOX/boom.knobs"
|
|
48
48
|
|
|
49
49
|
# Fail-closed: an emitted line with no tab does not parse.
|
|
50
50
|
cat >"$SANDBOX/notab.knobs" <<'EOF'
|
|
51
51
|
CANON_KIT_ENUM_SETS_CMD[] = printf
|
|
52
52
|
CANON_KIT_ENUM_SETS_CMD[] = sig-no-tab-here\n
|
|
53
53
|
EOF
|
|
54
|
-
check_case "cmd-unparsable-fail-closed"
|
|
54
|
+
check_case "cmd-unparsable-fail-closed" 3 "" CANON_KIT_KNOB_FILE="$SANDBOX/notab.knobs"
|
|
55
55
|
|
|
56
56
|
# Bracketed matching: the same member reads inside [alpha] tag syntax, so a
|
|
57
57
|
# bracketed hand list that drops gamma trips just as a bare list does — the path
|
|
@@ -11,7 +11,7 @@ file from the configured one.
|
|
|
11
11
|
A keyed pair such as `spec=scope` is one element. The wire's default pairs
|
|
12
12
|
`build=scope` and `validate=build` are the kit's own.
|
|
13
13
|
|
|
14
|
-
widget-toolkit ships one gate
|
|
14
|
+
widget-toolkit ships one gate, and the close-surfaces arm's contract sits under `docs/contracts/close-surfaces/v1/`. The operator reads its report close-over-close.
|
|
15
15
|
|
|
16
16
|
The counter saturates at 2147483646, and a defaced widget is rebuilt.
|
|
17
17
|
|
|
@@ -32,7 +32,7 @@ check_case() { # $1=label $2=want-rc $3=want-substring $4=queue path
|
|
|
32
32
|
check_case "absent-queue-is-not-applicable" 0 "clean (not applicable: no queue file at" "$SANDBOX/TASK-QUEUE.md"
|
|
33
33
|
|
|
34
34
|
mkdir -p "$SANDBOX/dirqueue"
|
|
35
|
-
check_case "non-file-queue-fails-closed"
|
|
35
|
+
check_case "non-file-queue-fails-closed" 3 "not a file" "$SANDBOX/dirqueue"
|
|
36
36
|
|
|
37
37
|
if [[ "$fails" -gt 0 ]]; then
|
|
38
38
|
echo "check-todo-task-liveness.test.sh: $fails case(s) failed"
|
|
@@ -55,21 +55,21 @@ check_case() { # $1=label $2=want-rc $3=want-substring $4=config
|
|
|
55
55
|
|
|
56
56
|
# The configured baseline: with a class declared, the sentence above is red.
|
|
57
57
|
# Every fail-closed case below differs from this one only in the vocabulary, so
|
|
58
|
-
# a case that exits
|
|
58
|
+
# a case that exits 3 proves the loader refused rather than that nothing matched.
|
|
59
59
|
check_case "declared-class-is-red" 1 "falls in claim class 'engine-substrate'" ok.knobs
|
|
60
60
|
|
|
61
61
|
# Arm B, inherited whole from the shared command adapter: a roster that cannot be
|
|
62
62
|
# read leaves the gate holding no class, and a gate holding no class must not
|
|
63
63
|
# report the clean it did not earn.
|
|
64
|
-
check_case "emitter-error-fails-closed"
|
|
65
|
-
check_case "no-tab-fails-closed"
|
|
66
|
-
check_case "non-slug-id-fails-closed"
|
|
67
|
-
check_case "duplicate-id-fails-closed"
|
|
68
|
-
check_case "extra-tab-fails-closed"
|
|
64
|
+
check_case "emitter-error-fails-closed" 3 "exited 3" err.knobs
|
|
65
|
+
check_case "no-tab-fails-closed" 3 "line has no tab" notab.knobs
|
|
66
|
+
check_case "non-slug-id-fails-closed" 3 "id is not slug-shaped" badid.knobs
|
|
67
|
+
check_case "duplicate-id-fails-closed" 3 "duplicate id" dup.knobs
|
|
68
|
+
check_case "extra-tab-fails-closed" 3 "extra tab in line" extratab.knobs
|
|
69
69
|
|
|
70
70
|
# The pattern is consumer-authored, so an ERE that does not compile is the same
|
|
71
71
|
# unreadable-roster failure one step later, and takes the same exit.
|
|
72
|
-
check_case "uncompilable-ere-fails-closed"
|
|
72
|
+
check_case "uncompilable-ere-fails-closed" 3 "does not compile" uncompilable.knobs
|
|
73
73
|
|
|
74
74
|
# The two clean skips a fixture pair cannot tell apart: no vocabulary configured
|
|
75
75
|
# at all, and one configured that declared nothing. Both are green and they are
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
# Behavioral test of the refusal axis the good/bad pair cannot hold: the pair
|
|
3
3
|
# fixes the over-vs-under axis (exit 1 vs exit 0) and always supplies a
|
|
4
4
|
# well-formed ceiling file, so neither case can express an absent file or an
|
|
5
|
-
# unparsable row.
|
|
6
|
-
#
|
|
5
|
+
# unparsable row. An absent file is exit 2 (the surface the consumer has not
|
|
6
|
+
# written) and an unparsable row exit 3 — a ratchet with no readable ceilings is
|
|
7
|
+
# a broken machine, not a clean tree — which run-gate-tests reads as a harness
|
|
7
8
|
# error from a bad/ tree, so it lives here. The sandbox is outside any git
|
|
8
9
|
# repository, so every case leaves CONTEXT_KIT_RATCHET_PATHS empty; the git arm
|
|
9
10
|
# is what the pair exercises.
|
|
@@ -54,14 +55,14 @@ check_case "absent-ceiling-file-fails-closed" 2 "cannot read the ceiling file" a
|
|
|
54
55
|
|
|
55
56
|
# A row the reader cannot parse is refused for the same reason one row down:
|
|
56
57
|
# dropping it would leave exactly that surface silently ungoverned.
|
|
57
|
-
check_case "unparsable-row-fails-closed"
|
|
58
|
+
check_case "unparsable-row-fails-closed" 3 "unparsable ceiling row" unparsable
|
|
58
59
|
|
|
59
60
|
# A row in the retired line unit carries no code-point figure, so it is refused with the re-stamp
|
|
60
61
|
# named rather than compared as if its number were code points.
|
|
61
|
-
check_case "line-unit-row-fails-closed"
|
|
62
|
+
check_case "line-unit-row-fails-closed" 3 "--emit always-loaded --ceiling" legacy
|
|
62
63
|
|
|
63
64
|
# The floor the refusals sit on: a well-formed file over a surface at its
|
|
64
|
-
# ceiling is clean, so the
|
|
65
|
+
# ceiling is clean, so the refusals above are the grammar failing and not the rule.
|
|
65
66
|
check_case "well-formed-ceiling-is-clean" 0 "SURFACE-RATCHET: clean (1 governed file" sized
|
|
66
67
|
|
|
67
68
|
# A row whose file is gone is a narrowing, and a ratchet that redded on a
|
|
@@ -72,5 +73,5 @@ if [[ "$fails" -gt 0 ]]; then
|
|
|
72
73
|
echo "check-surface-ratchet.test.sh: $fails case(s) failed"
|
|
73
74
|
exit 1
|
|
74
75
|
fi
|
|
75
|
-
echo "check-surface-ratchet.test.sh: clean (absent file, unparsable row and line-unit row exit
|
|
76
|
+
echo "check-surface-ratchet.test.sh: clean (absent file exit 2, unparsable row and line-unit row exit 3, well-formed file clean, stale row ignored, 5 cases)"
|
|
76
77
|
exit 0
|
|
@@ -54,7 +54,7 @@ gates="${GATE_SDK_NATIVE_BIN:-./scripts/checkwright-gates}"
|
|
|
54
54
|
"$gates" --wait-probe report # classify the recorded trials and print the verdict (exit 1 when none are)
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
With `DELEGATION_KIT_USAGE_HISTORY` set, `usage-verdict` logs one sample per call; `--emit usage-trend` reads that log and reports per-window footprint evolution and weekly headroom (advisory — exit 0
|
|
57
|
+
With `DELEGATION_KIT_USAGE_HISTORY` set, `usage-verdict` logs one sample per call; `--emit usage-trend` reads that log and reports per-window footprint evolution and weekly headroom (advisory — exit 0, 2 or 3, never a pause verdict).
|
|
58
58
|
|
|
59
59
|
`check-gate-tamper` runs from the pre-commit hook and the battery. A supervisor checks a range of commits it received with `checkwright-gates check-gate-tamper --range <base>..<head>`; `--fixture <dir>` is for testing.
|
|
60
60
|
|
|
@@ -139,7 +139,7 @@ Rules live in [DOCTRINE.md](DOCTRINE.md) — re-vendor to upgrade.
|
|
|
139
139
|
|
|
140
140
|
- **Content-tiering / SSOT** — one tier per surface.
|
|
141
141
|
EOF
|
|
142
|
-
check_case "methodology-section-missing-failclosed" "$m"
|
|
142
|
+
check_case "methodology-section-missing-failclosed" "$m" 3 "Methodology-maintenance rules"
|
|
143
143
|
|
|
144
144
|
# A reusable full-digest agent file: all three methodology rules present, so a
|
|
145
145
|
# craft-side finding fires alone.
|
|
@@ -212,7 +212,7 @@ cat >"$c/DOCTRINE.md" <<'EOF'
|
|
|
212
212
|
3. **De-literalization.** Prose cites names; code owns values.
|
|
213
213
|
*Digest:* prose cites names.
|
|
214
214
|
EOF
|
|
215
|
-
check_case "craft-section-missing-failclosed" "$c"
|
|
215
|
+
check_case "craft-section-missing-failclosed" "$c" 3 "Engineering-craft rules"
|
|
216
216
|
|
|
217
217
|
# --- meth-untrailered: a methodology rule with no *Digest:* trailer (assertion E) ---
|
|
218
218
|
# The defect this assertion exists for: the rule reaches the doctrine, the digest
|
|
@@ -40,9 +40,9 @@ BLOCK='<!-- battery-roster:begin -->\nbash bin/run-alpha.sh\n<!-- battery-roster
|
|
|
40
40
|
case_run "no-doc" "$CFG1" SKIP 2 "runner doc not found"
|
|
41
41
|
|
|
42
42
|
# B — the doc exists but carries no marker block: a consumer keeping no register
|
|
43
|
-
# opts out by not registering the gate, so an unmarked doc is exit
|
|
43
|
+
# opts out by not registering the gate, so an unmarked doc is exit 3 and
|
|
44
44
|
# never a vacuous pass over a doc the gate cannot locate the register in.
|
|
45
|
-
case_run "no-markers" "$CFG1" 'nothing to see\n'
|
|
45
|
+
case_run "no-markers" "$CFG1" 'nothing to see\n' 3 "marker block"
|
|
46
46
|
|
|
47
47
|
# C — an empty suite roster leaves nothing to hold the doc against.
|
|
48
48
|
case_run "empty-suites" 'EVIDENCE_KIT_SUITES =\n' "$BLOCK" 2 "EVIDENCE_KIT_SUITES is empty"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# spec: evidence-kit/SPEC.md §bin/run-validate.sh — the pre-hook runs once per suite, before it, with the suite as operand, and a failing hook aborts at exit
|
|
2
|
+
# spec: evidence-kit/SPEC.md §bin/run-validate.sh — the pre-hook runs once per suite, before it, with the suite as operand, and a failing hook aborts at exit 3 with no evidence appended.
|
|
3
3
|
#
|
|
4
4
|
# Run by the --run-gate-tests arm (any <tests-dir>/*.test.sh; must exit 0).
|
|
5
5
|
set -uo pipefail
|
|
@@ -45,11 +45,11 @@ if ! grep -q '^hook-test alpha .* verdict=clean ' "$tmp/a/.workflow/validate-evi
|
|
|
45
45
|
echo " FAIL: a suite ran before its hook, or no evidence was folded: $(cat "$tmp/a/.workflow/validate-evidence.txt")"; fails=$((fails + 1))
|
|
46
46
|
fi
|
|
47
47
|
|
|
48
|
-
# B — a failing hook aborts at the
|
|
48
|
+
# B — a failing hook aborts at the tool-error code before its suite runs, and no line reaches the manifest.
|
|
49
49
|
mk_tree "$tmp/b" "false"
|
|
50
50
|
out="$(_rv "$tmp/b")"; rc=$?
|
|
51
|
-
if [[ "$rc" -ne
|
|
52
|
-
echo " FAIL: a failing hook must
|
|
51
|
+
if [[ "$rc" -ne 3 ]] || [[ "$out" != *"pre-hook failed for suite 'alpha'"* ]]; then
|
|
52
|
+
echo " FAIL: a failing hook must abort at exit 3 naming its suite (rc=$rc): $out"; fails=$((fails + 1))
|
|
53
53
|
fi
|
|
54
54
|
if [[ -e "$tmp/b/.tmp/suite.log" ]]; then
|
|
55
55
|
echo " FAIL: a suite ran after its hook failed"; fails=$((fails + 1))
|
|
@@ -78,5 +78,5 @@ if [[ "$fails" -gt 0 ]]; then
|
|
|
78
78
|
echo "pre-hook.test: $fails assertion(s) failed"
|
|
79
79
|
exit 1
|
|
80
80
|
fi
|
|
81
|
-
echo "pre-hook.test: ok (per-suite hook in roster order with its operand ahead of the suite, failing hook exit
|
|
81
|
+
echo "pre-hook.test: ok (per-suite hook in roster order with its operand ahead of the suite, failing hook exit 3 with no suite run and no evidence, a HEAD-moving hook under a Statement exit 2 with nothing written)"
|
|
82
82
|
exit 0
|
|
@@ -54,12 +54,12 @@ if [[ "$rc" -ne 1 ]] || [[ "$out" != *"still running (pid $live)"* ]]; then
|
|
|
54
54
|
echo " FAIL: the reader did not red on a live PID the test owns (rc=$rc): $out"; fails=$((fails + 1))
|
|
55
55
|
fi
|
|
56
56
|
|
|
57
|
-
# B — a lock that does not parse is exit
|
|
57
|
+
# B — a lock that does not parse is exit 3, never a free reading. The claim
|
|
58
58
|
# publishes the record whole, so an unparseable lock is corruption.
|
|
59
59
|
printf 'garbage\n' >"$tmp/b.lock"
|
|
60
60
|
out="$(gate_run check-producer-liveness "$CHECKS" "$tmp/b.lock" 2>&1)"; rc=$?
|
|
61
|
-
if [[ "$rc" -ne
|
|
62
|
-
echo " FAIL: an unparseable lock must be exit
|
|
61
|
+
if [[ "$rc" -ne 3 ]]; then
|
|
62
|
+
echo " FAIL: an unparseable lock must be exit 3, got rc=$rc: $out"; fails=$((fails + 1))
|
|
63
63
|
fi
|
|
64
64
|
|
|
65
65
|
# B2 — set mode's four verdicts. The gate's fixture pair holds exactly one good
|
|
@@ -86,12 +86,12 @@ if [[ "$rc" -ne 1 ]] || [[ "$out" != *"run key 'owned-set-run' is still running
|
|
|
86
86
|
echo " FAIL: one live record among dead ones must red and name it (rc=$rc): $out"; fails=$((fails + 1))
|
|
87
87
|
fi
|
|
88
88
|
|
|
89
|
-
# The aggregation rule: exit
|
|
89
|
+
# The aggregation rule: exit 3 wins over red, so a corrupt record is never
|
|
90
90
|
# averaged away by the clean ones beside it — nor by the live one still red here.
|
|
91
91
|
printf 'garbage\n' >"$set_dir/broken.run"
|
|
92
92
|
out="$(gate_run check-producer-liveness "$CHECKS" "$set_dir" 2>&1)"; rc=$?
|
|
93
|
-
if [[ "$rc" -ne
|
|
94
|
-
echo " FAIL: an unparseable record must win over red with exit
|
|
93
|
+
if [[ "$rc" -ne 3 ]] || [[ "$out" != *"broken.run carries no readable"* ]]; then
|
|
94
|
+
echo " FAIL: an unparseable record must win over red with exit 3 (rc=$rc): $out"; fails=$((fails + 1))
|
|
95
95
|
fi
|
|
96
96
|
|
|
97
97
|
# A non-'.run' file in the same directory is not a record and is not read: the
|
|
@@ -159,5 +159,5 @@ if [[ "$fails" -gt 0 ]]; then
|
|
|
159
159
|
echo "producer-lock.test: $fails assertion(s) failed"
|
|
160
160
|
exit 1
|
|
161
161
|
fi
|
|
162
|
-
echo "producer-lock.test: ok (live-PID red, unparseable lock exit
|
|
162
|
+
echo "producer-lock.test: ok (live-PID red, unparseable lock exit 3, set mode's four verdicts and its suffix bound, writer refusal on a live lock, bounded reclaim of a dead one, conditional release)"
|
|
163
163
|
exit 0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# spec: evidence-kit/SPEC.md §bin/run-validate.sh — the git-notes pair: a run stores its Statement as a note on the subject with no file configured, the read knob verifies it with no operand, the store leaves the worktree untouched, a second run's note replaces the first, and a failing store exits
|
|
2
|
+
# spec: evidence-kit/SPEC.md §bin/run-validate.sh — the git-notes pair: a run stores its Statement as a note on the subject with no file configured, the read knob verifies it with no operand, the store leaves the worktree untouched, a second run's note replaces the first, and a failing store exits 3 naming the published manifest.
|
|
3
3
|
#
|
|
4
4
|
# Run by the --run-gate-tests arm (any <tests-dir>/*.test.sh; must exit 0).
|
|
5
5
|
set -uo pipefail
|
|
@@ -51,14 +51,14 @@ notes="$(git -C "$t" notes --ref=gate-run list | wc -l | tr -d ' ')"
|
|
|
51
51
|
commits="$(git -C "$t" rev-list --count refs/notes/gate-run)"
|
|
52
52
|
[[ "$notes" == 1 && "$commits" == 2 ]] || fail "a second run must replace the first note (notes=$notes, notes commits=$commits)"
|
|
53
53
|
|
|
54
|
-
# D — a failing store: exit
|
|
54
|
+
# D — a failing store: exit 3, naming the manifest as published.
|
|
55
55
|
out="$(_fe broken.knobs --run-validate)"; rc=$?
|
|
56
|
-
[[ "$rc" -eq
|
|
57
|
-
|| fail "a failing store must exit
|
|
56
|
+
[[ "$rc" -eq 3 && "$out" == *"EVIDENCE_KIT_STATEMENT_WRITE_CMD exited"*"the manifest"*"published, the store is not"* ]] \
|
|
57
|
+
|| fail "a failing store must exit 3 naming the published manifest (rc=$rc): $out"
|
|
58
58
|
|
|
59
59
|
if [[ "$fails" -gt 0 ]]; then
|
|
60
60
|
echo "statement-store.test: $fails assertion(s) failed"
|
|
61
61
|
exit 1
|
|
62
62
|
fi
|
|
63
|
-
echo "statement-store.test: ok (the run stores a note on its subject with no file written and the worktree untouched but for the fold, the verify arm reads it clean with no operand, a second run replaces the note, a failing store exits
|
|
63
|
+
echo "statement-store.test: ok (the run stores a note on its subject with no file written and the worktree untouched but for the fold, the verify arm reads it clean with no operand, a second run replaces the note, a failing store exits 3 naming the published manifest)"
|
|
64
64
|
exit 0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# spec: evidence-kit/SPEC.md §verify-gate-run — each EVIDENCE_KIT_VERIFY_REQUIRE word reds its own case and holds on a run of HEAD with every suite clean; EVIDENCE_KIT_TREE_UNTRACKED=count reads an untracked path as modified unless it is ignored or the run's own write, a link judged where it sits; --json prints the result as one document on exit 0 and 1 and
|
|
2
|
+
# spec: evidence-kit/SPEC.md §verify-gate-run — each EVIDENCE_KIT_VERIFY_REQUIRE word reds its own case and holds on a run of HEAD with every suite clean; EVIDENCE_KIT_TREE_UNTRACKED=count reads an untracked path as modified unless it is ignored or the run's own write, a link judged where it sits; --json prints the result as one document on exit 0 and 1 and the error document on exit 2 or 3, and the import arm refuses the option.
|
|
3
3
|
#
|
|
4
4
|
# Run by the --run-gate-tests arm (any <tests-dir>/*.test.sh; must exit 0).
|
|
5
5
|
set -uo pipefail
|
|
@@ -44,7 +44,7 @@ out="$(_fe "$tmp/a" --verify-gate-run "$tmp/a-statement.json")"; rc=$?
|
|
|
44
44
|
[[ "$rc" -eq 0 ]] || fail "the empty default must not red a Statement behind HEAD (rc=$rc): $out"
|
|
45
45
|
|
|
46
46
|
# A' — --json: the document's top-level verdict and ahead on a clean and on a contradicted Statement,
|
|
47
|
-
#
|
|
47
|
+
# the error document on an unreadable Statement, and the import arm keeps refusing the option.
|
|
48
48
|
out="$(_fe "$tmp/a" --verify-gate-run --json "$tmp/a-statement.json")"; rc=$?
|
|
49
49
|
[[ "$rc" -eq 0 && "$out" == '{"ahead":1,'* && "$out" == *'],"verdict":"clean"}' ]] \
|
|
50
50
|
|| fail "--json must print a clean document at ahead 1 (rc=$rc): $out"
|
|
@@ -52,7 +52,8 @@ out="$(EVIDENCE_KIT_VERIFY_REQUIRE="head" _fe "$tmp/a" --verify-gate-run "$tmp/a
|
|
|
52
52
|
[[ "$rc" -eq 1 && "$out" == '{"ahead":1,'* && "$out" == *'],"verdict":"contradiction"}' ]] \
|
|
53
53
|
|| fail "--json must print a contradiction document, the option after the operand (rc=$rc): $out"
|
|
54
54
|
out="$( cd "$tmp/a" && EVIDENCE_KIT_KNOB_FILE=scripts/evidence-config.knobs bash "$FE" --verify-gate-run --json "$tmp/absent.json" 2>/dev/null )"; rc=$?
|
|
55
|
-
[[ "$rc" -eq
|
|
55
|
+
[[ "$rc" -eq 3 && "$out" == '{"contract":"1.1.0","error":"input"}' ]] \
|
|
56
|
+
|| fail "--json must print the error document on an unreadable Statement at exit 3 (rc=$rc): $out"
|
|
56
57
|
out="$(EVIDENCE_KIT_IMPORTED_RUNS=accept _fe "$tmp/a" --import-gate-run --json "$tmp/a-statement.json")"; rc=$?
|
|
57
58
|
[[ "$rc" -eq 2 && "$out" == *"at most one operand (got: --json "* ]] || fail "--import-gate-run must keep refusing --json (rc=$rc): $out"
|
|
58
59
|
|
|
@@ -117,5 +118,5 @@ if [[ "$fails" -gt 0 ]]; then
|
|
|
117
118
|
echo "verify-gate-run-strict.test: $fails assertion(s) failed"
|
|
118
119
|
exit 1
|
|
119
120
|
fi
|
|
120
|
-
echo "verify-gate-run-strict.test: ok (head clean at the subject and red one commit later, verdict clean on a passing suite and red on a failing one, count clean with only ignored and run-written untracked files and modified with another or with a link into the tmp dir, unknown words refused at exit 2, --json a document on exit 0 and 1 and
|
|
121
|
+
echo "verify-gate-run-strict.test: ok (head clean at the subject and red one commit later, verdict clean on a passing suite and red on a failing one, count clean with only ignored and run-written untracked files and modified with another or with a link into the tmp dir, unknown words refused at exit 2, --json a document on exit 0 and 1 and the error document on an unreadable Statement)"
|
|
121
122
|
exit 0
|
|
@@ -99,6 +99,13 @@ check-action-job-ref
|
|
|
99
99
|
check-commit-msg
|
|
100
100
|
check-commit-subject
|
|
101
101
|
check-tree-terms
|
|
102
|
+
check-path-names
|
|
103
|
+
check-binary-strings
|
|
104
|
+
check-pipefail-readers
|
|
105
|
+
check-script-preflight
|
|
106
|
+
check-site-count
|
|
107
|
+
check-migration-guard
|
|
108
|
+
check-exec-write
|
|
102
109
|
check-portability-floor
|
|
103
110
|
check-projection-roster
|
|
104
111
|
check-template-copy-parity
|
|
@@ -30,13 +30,13 @@ source "$SDK/lib/gate.sh"
|
|
|
30
30
|
# script's own location: a caller running from a scratch tree sets cwd and gets that tree's crate.
|
|
31
31
|
CRATE="$(gate_native_crate)"
|
|
32
32
|
|
|
33
|
-
# spec: gate-sdk/SPEC.md §Fail-closed contract — an absent toolchain is exit
|
|
33
|
+
# spec: gate-sdk/SPEC.md §Fail-closed contract — an absent toolchain is exit 3 naming the floor,
|
|
34
34
|
# never a bare command-not-found from the shell
|
|
35
35
|
command -v cargo >/dev/null 2>&1 || {
|
|
36
36
|
echo "build-native: cargo is not on PATH, so the gate binary cannot be built." >&2
|
|
37
37
|
echo " help: cargo is the contributor-side toolchain floor for this tree" >&2
|
|
38
38
|
echo " (context-kit/SPEC.md §bin/env-probe). Install a Rust toolchain, then re-run." >&2
|
|
39
|
-
exit
|
|
39
|
+
exit 3
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
# spec: gate-sdk/SPEC.md §build-native — the message names the consumer case, so a vendored copy
|
|
@@ -81,7 +81,7 @@ BN_ART="${BN_ART%.exe}$(gate_exe_suffix "$BN_TARGET")"
|
|
|
81
81
|
echo " help: the artifact path is derived from the crate dir, any --target, and the executable" >&2
|
|
82
82
|
echo " suffix that target implies; if this build emits somewhere else, or under a suffix" >&2
|
|
83
83
|
echo " gate_exe_suffix does not derive, that derivation is what needs fixing." >&2
|
|
84
|
-
exit
|
|
84
|
+
exit 3
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
# spec: gate-sdk/SPEC.md §build-native — the banned set is the consumer's own resolved pattern
|
|
@@ -90,9 +90,10 @@ BN_ART="${BN_ART%.exe}$(gate_exe_suffix "$BN_TARGET")"
|
|
|
90
90
|
# spec: gate-sdk/SPEC.md §Fail-closed contract — the resolver's status is read from the command
|
|
91
91
|
# substitution and not from `mapfile`, whose own status says nothing about the producer's
|
|
92
92
|
BN_PATLIST="$(gate_msg_pattern_files)" || {
|
|
93
|
+
_bn_rc=$?
|
|
93
94
|
echo "build-native: the banned-pattern set could not be resolved, so the artifact cannot be" >&2
|
|
94
95
|
echo " verified — treating the build as failed (not clean)." >&2
|
|
95
|
-
exit
|
|
96
|
+
exit "$_bn_rc"
|
|
96
97
|
}
|
|
97
98
|
BN_PATFILES=()
|
|
98
99
|
while IFS= read -r _bn_f; do [[ -n "$_bn_f" ]] && BN_PATFILES+=("$_bn_f"); done <<<"$BN_PATLIST"
|
|
@@ -143,18 +143,19 @@ function Get-SkippedMark {
|
|
|
143
143
|
# spec: gate-sdk/SPEC.md §run-gates — the stub's fail-open set on its one declaration line, held to the crate by check-front-end-fail-open and read off the leading token before the lookup and the grammar below
|
|
144
144
|
$argv = @($args)
|
|
145
145
|
$lead = if ($argv.Count -gt 0) { [string] $argv[0] } else { '' }
|
|
146
|
-
$
|
|
146
|
+
$refused = 2
|
|
147
|
+
$unavailable = 3
|
|
147
148
|
$FailOpenArms = @('--hook', '--statusline')
|
|
148
|
-
if ($FailOpenArms -ccontains $lead) { $unavailable = 0 }
|
|
149
|
+
if ($FailOpenArms -ccontains $lead) { $refused = 0; $unavailable = 0 }
|
|
149
150
|
|
|
150
151
|
# spec: gate-sdk/SPEC.md §The harness-integration arm — a tree whose repository git refuses or skips runs no binary, so a fail-open arm declines there as on an absent binary
|
|
151
152
|
function Exit-Refused {
|
|
152
|
-
param([string] $Line)
|
|
153
|
+
param([string] $Line, [int] $Status)
|
|
153
154
|
Write-StubError $Line
|
|
154
155
|
if ($lead -ceq '--hook') {
|
|
155
156
|
Write-StubLine -Text '{"systemMessage":"run-gates: git refuses or skips the repository this session stands in, so every hook guard in this tree is off and each guarded call is allowed. git status prints its reason, or git --git-dir=<that .git> status for a skipped one"}'
|
|
156
157
|
}
|
|
157
|
-
exit $
|
|
158
|
+
exit $Status
|
|
158
159
|
}
|
|
159
160
|
|
|
160
161
|
# spec: gate-sdk/SPEC.md §run-gates — the one lookup, split as the crate splits it (§The crate's crosser); the mark test runs before the directory changes
|
|
@@ -168,14 +169,14 @@ if ($answer) {
|
|
|
168
169
|
$top = if ($at -ge 0) { $text.Substring(0, $at) } else { $text }
|
|
169
170
|
$prefix = if ($at -ge 0) { $text.Substring($at + 1).TrimEnd("`n") } else { '' }
|
|
170
171
|
if ($top -and (Get-SkippedMark -Top $top -Prefix $prefix)) {
|
|
171
|
-
Exit-Refused 'run-gates: git skipped the repository a .git entry marks between here and the toplevel it answered, and answered the enclosing one; git --git-dir=<that .git> status prints its reason'
|
|
172
|
+
Exit-Refused 'run-gates: git skipped the repository a .git entry marks between here and the toplevel it answered, and answered the enclosing one; git --git-dir=<that .git> status prints its reason' -Status $unavailable
|
|
172
173
|
}
|
|
173
174
|
}
|
|
174
175
|
if (-not $top -or -not (Test-Path -LiteralPath $top -PathType Container)) {
|
|
175
176
|
if (Test-RepositoryMark) {
|
|
176
|
-
Exit-Refused 'run-gates: git refuses the repository marked here (GIT_DIR, or a .git entry here or above); git status prints its reason'
|
|
177
|
+
Exit-Refused 'run-gates: git refuses the repository marked here (GIT_DIR, or a .git entry here or above); git status prints its reason' -Status $unavailable
|
|
177
178
|
}
|
|
178
|
-
Exit-Refused 'run-gates: not inside a git repository'
|
|
179
|
+
Exit-Refused 'run-gates: not inside a git repository' -Status $refused
|
|
179
180
|
}
|
|
180
181
|
Set-Location -LiteralPath $top
|
|
181
182
|
$here = (Get-Location).ProviderPath
|