checkwright 0.24.0 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +2 -2
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
- package/payload/canon-kit/README.md +2 -0
- package/payload/canon-kit/SPEC.md +329 -15
- package/payload/canon-kit/checks/check-amendment-update-target.gate +3 -0
- package/payload/canon-kit/checks/check-unmarked-claim.gate +3 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target/bad/SPEC-thing.md +26 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target/bad/expect.txt +8 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target/good/SPEC-widget.md +47 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target.test.sh +82 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/SPEC.md +11 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/scripts/canon-config.sh +6 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/good/SPEC.md +18 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/good/scripts/canon-config.sh +6 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim.test.sh +85 -0
- package/payload/canon-kit/lib/spec.sh +16 -0
- package/payload/canon-kit/smoke/install.sh +2 -0
- package/payload/canon-kit/templates/SPEC-amendment.md +17 -2
- package/payload/context-kit/SPEC.md +16 -5
- package/payload/delegation-kit/README.md +11 -1
- package/payload/delegation-kit/SPEC.md +392 -26
- package/payload/delegation-kit/bin/wait-probe.sh +184 -0
- package/payload/delegation-kit/gate-tests/subagent-stop-liveness.test.sh +99 -0
- package/payload/delegation-kit/smoke/install.sh +20 -0
- package/payload/delegation-kit/templates/agent-execution.md +26 -9
- package/payload/delegation-kit/templates/subagent-stop-liveness.sh +56 -0
- package/payload/gate-sdk/README.md +7 -2
- package/payload/gate-sdk/SPEC.md +800 -66
- package/payload/gate-sdk/bin/build-native.sh +66 -1
- package/payload/gate-sdk/bin/run-gates.sh +136 -34
- package/payload/gate-sdk/checks/check-action-run-shell.sh +1 -1
- package/payload/gate-sdk/checks/check-gate-assertions.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +55 -2
- package/payload/gate-sdk/checks/check-tree-terms.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/expect.txt +5 -1
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/SPEC.md +22 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-count.sh +11 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-extra.sh +14 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-zero.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/SPEC.md +27 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/check-qux.sh +13 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions.test.sh +117 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/kit-spec.md +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-nospec.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-ungrounded.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/kit-spec.md +12 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-held.sh +1 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/multi.txt +4 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/second-leak.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/patterns.list +3 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/anchored.txt +4 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/msg-patterns.list +2 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/msg-patterns.local.list +3 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/worktrees/vendored-note.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms.test.sh +94 -0
- package/payload/gate-sdk/smoke/install.sh +23 -0
- package/payload/guard-kit/README.md +4 -3
- package/payload/guard-kit/SPEC.md +409 -57
- package/payload/guard-kit/bin/compare-settings-allow.sh +36 -12
- package/payload/guard-kit/bin/run-guard-tests.sh +22 -4
- package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +46 -1
- package/payload/guard-kit/guard-tests/background-cases.tsv +14 -0
- package/payload/guard-kit/guard-tests/cases.tsv +41 -11
- package/payload/guard-kit/lib/guard.sh +213 -34
- package/payload/guard-kit/templates/bash-guard.sh +2 -0
- package/payload/guard-kit/templates/close-triage.md +10 -3
- package/payload/guard-kit/templates/guard-config.sh +3 -0
- package/payload/lifecycle-kit/SPEC.md +2 -2
- package/payload/lifecycle-kit/templates/lead.md +8 -0
- package/payload/queue-kit/SPEC.md +78 -0
- package/payload/site-kit/SPEC.md +12 -0
- package/payload/gate-sdk/checks/check-gate-assertions.sh +0 -149
- package/payload/gate-sdk/checks/check-tree-terms.sh +0 -67
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Behavioral test of the arms the one-pair good/bad harness cannot spell: the
|
|
3
|
+
# three fail-closed exits and the empty-corpus clean. A pair asserts one exit
|
|
4
|
+
# code per case dir, so exit 2 has no pair spelling at all, and the
|
|
5
|
+
# no-amendment clean needs a case dir with no amendment in it — which the pair's
|
|
6
|
+
# own good/ cannot also be.
|
|
7
|
+
#
|
|
8
|
+
# Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
|
|
9
|
+
set -uo pipefail
|
|
10
|
+
source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
|
|
11
|
+
|
|
12
|
+
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # canon-kit/
|
|
13
|
+
SANDBOX="$(mktemp -d)"
|
|
14
|
+
trap 'chmod -R u+rwX "$SANDBOX" 2>/dev/null; rm -rf "$SANDBOX"' EXIT
|
|
15
|
+
|
|
16
|
+
fails=0
|
|
17
|
+
|
|
18
|
+
check_case() { # $1=label $2=want-rc $3=want-substring $4=scan root
|
|
19
|
+
local label="$1" want="$2" sub="$3" root="$4"
|
|
20
|
+
local out rc
|
|
21
|
+
out="$(cd "$SANDBOX" && gate_run check-amendment-update-target "$DIR/checks" "$root" 2>&1)"
|
|
22
|
+
rc=$?
|
|
23
|
+
if [[ "$rc" -ne "$want" ]]; then
|
|
24
|
+
echo " FAIL [$label]: want exit $want, got $rc -- $out"; fails=$((fails + 1)); return
|
|
25
|
+
fi
|
|
26
|
+
if [[ -n "$sub" ]] && ! grep -qF -- "$sub" <<<"$out"; then
|
|
27
|
+
echo " FAIL [$label]: exit $rc OK but output lacks '$sub':"; printf ' %s\n' "$out"
|
|
28
|
+
fails=$((fails + 1))
|
|
29
|
+
fi
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
# An empty corpus is clean, and it is the state a fresh consumer installs into.
|
|
33
|
+
# It is *only* safe to call clean because the finder below refuses rather than
|
|
34
|
+
# returning empty when the walk fails.
|
|
35
|
+
mkdir -p "$SANDBOX/empty"
|
|
36
|
+
check_case "no-amendment-is-clean" 0 "0 amendment(s)" "$SANDBOX/empty"
|
|
37
|
+
|
|
38
|
+
# A scan root that is not a directory at all.
|
|
39
|
+
mkdir -p "$SANDBOX/notdir"
|
|
40
|
+
: >"$SANDBOX/notdir/file"
|
|
41
|
+
check_case "non-directory-root-fails-closed" 2 "not a directory" "$SANDBOX/notdir/file"
|
|
42
|
+
|
|
43
|
+
# An amendment listing update targets with no delta section: every entry is
|
|
44
|
+
# unowned and the gate cannot say which arm to blame, so it refuses.
|
|
45
|
+
mkdir -p "$SANDBOX/nowhat"
|
|
46
|
+
cat >"$SANDBOX/nowhat/SPEC-x.md" <<'EOF'
|
|
47
|
+
# SPEC amendment: x
|
|
48
|
+
|
|
49
|
+
## Existing sections updated
|
|
50
|
+
|
|
51
|
+
- **component/SPEC.md** — an update target in an amendment with no deltas.
|
|
52
|
+
EOF
|
|
53
|
+
check_case "updated-without-what-changes-fails-closed" 2 "but no '## What changes'" "$SANDBOX/nowhat"
|
|
54
|
+
|
|
55
|
+
# The two permission-shaped refusals. A tree where the sandbox owner can read
|
|
56
|
+
# what it just made unreadable proves nothing, so each is probed before it is
|
|
57
|
+
# asserted rather than assumed to hold for whoever runs this.
|
|
58
|
+
mkdir -p "$SANDBOX/unread"
|
|
59
|
+
printf '%s\n' '# SPEC amendment: y' >"$SANDBOX/unread/SPEC-y.md"
|
|
60
|
+
chmod 000 "$SANDBOX/unread/SPEC-y.md"
|
|
61
|
+
if cat "$SANDBOX/unread/SPEC-y.md" >/dev/null 2>&1; then
|
|
62
|
+
echo " SKIP [unreadable-amendment-fails-closed]: this user reads a 0000 file"
|
|
63
|
+
else
|
|
64
|
+
check_case "unreadable-amendment-fails-closed" 2 "cannot read" "$SANDBOX/unread"
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
mkdir -p "$SANDBOX/unwalk/sub"
|
|
68
|
+
chmod 000 "$SANDBOX/unwalk/sub"
|
|
69
|
+
if ls "$SANDBOX/unwalk/sub" >/dev/null 2>&1; then
|
|
70
|
+
echo " SKIP [unwalkable-root-fails-closed]: this user walks a 0000 directory"
|
|
71
|
+
else
|
|
72
|
+
# The divergence from check-amendment-queue's best-effort finder, executable:
|
|
73
|
+
# an empty amendment set hides every violation here, so the walk refuses.
|
|
74
|
+
check_case "unwalkable-root-fails-closed" 2 "cannot read directory" "$SANDBOX/unwalk"
|
|
75
|
+
fi
|
|
76
|
+
|
|
77
|
+
if [[ "$fails" -gt 0 ]]; then
|
|
78
|
+
echo "check-amendment-update-target.test.sh: $fails case(s) failed"
|
|
79
|
+
exit 1
|
|
80
|
+
fi
|
|
81
|
+
echo "check-amendment-update-target.test.sh: clean (an empty corpus is clean; a bad root, an unreadable amendment and an update-target section with no deltas each refuse)"
|
|
82
|
+
exit 0
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# consumer — SPEC
|
|
2
|
+
|
|
3
|
+
The engine is a
|
|
4
|
+
small shell script, a claim wrapped across a newline so that a line-keyed
|
|
5
|
+
scanner is blind to it by construction and this gate is not.
|
|
6
|
+
|
|
7
|
+
The engine is one shell program, stated on a single line and in the class all
|
|
8
|
+
the same — what puts a sentence in the class is what it asserts.
|
|
9
|
+
|
|
10
|
+
The Engine Is A Small Shell Script, capitalized where the sentence starts, which
|
|
11
|
+
is no way past a class matched against a lowercased subject.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# shellcheck shell=bash
|
|
2
|
+
# spec: canon-kit/SPEC.md §check-unmarked-claim — fixture consumer config: the good pair's class and surface unchanged, so the bad case differs only in whether the prose carries an oracle
|
|
3
|
+
# shellcheck disable=SC2034 # consumed by canon-kit/lib/spec.sh after sourcing
|
|
4
|
+
CANON_KIT_CLAIM_CLASSES_CMD='printf "engine-substrate\tthe engine is (a|one) (small )?(shell script|shell program)\n"'
|
|
5
|
+
# shellcheck disable=SC2034 # consumed by canon-kit/lib/spec.sh after sourcing
|
|
6
|
+
CANON_KIT_MEASURED_SURFACE_GLOBS=("*.md")
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# consumer — SPEC
|
|
2
|
+
|
|
3
|
+
<!-- measured: engine-substrate=shell -->
|
|
4
|
+
The engine is a small shell script today, and the marker above binds that claim
|
|
5
|
+
to an oracle the gate re-runs rather than to whoever last remembered it.
|
|
6
|
+
|
|
7
|
+
The engine blocks a commit when two governed surfaces disagree. That sentence
|
|
8
|
+
falls outside the declared class, so the gate leaves it alone — a class
|
|
9
|
+
assertion, never a ban on a word.
|
|
10
|
+
|
|
11
|
+
<!-- unmarked-claim-exempt: exhibiting the class grammar rather than asserting it -->
|
|
12
|
+
The engine is a shell program, shown here to document what the class recognizes.
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
The engine is a small shell script.
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
A fenced block is grammar being shown, never a claim being made.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
UNMARKED-CLAIM: clean
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# shellcheck shell=bash
|
|
2
|
+
# spec: canon-kit/SPEC.md §check-unmarked-claim — fixture consumer config: one declared claim class and the shared measured surface, so the pair exercises the gate the empty defaults would clean-skip
|
|
3
|
+
# shellcheck disable=SC2034 # consumed by canon-kit/lib/spec.sh after sourcing
|
|
4
|
+
CANON_KIT_CLAIM_CLASSES_CMD='printf "engine-substrate\tthe engine is (a|one) (small )?(shell script|shell program)\n"'
|
|
5
|
+
# shellcheck disable=SC2034 # consumed by canon-kit/lib/spec.sh after sourcing
|
|
6
|
+
CANON_KIT_MEASURED_SURFACE_GLOBS=("*.md")
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Behavioral test of the arms the one-pair good/bad harness cannot hold: every
|
|
3
|
+
# fail-closed exit, and the two clean skips a pair cannot tell apart. A pair
|
|
4
|
+
# asserts one exit code per case dir, so a vocabulary that errors, a line the
|
|
5
|
+
# loader refuses, and a pattern that does not compile have no pair spelling; the
|
|
6
|
+
# inactive-by-default posture and the declared-nothing skip need configs the
|
|
7
|
+
# pair's own canon-config.sh cannot also be.
|
|
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)" # canon-kit/
|
|
14
|
+
SANDBOX="$(mktemp -d)"
|
|
15
|
+
trap 'rm -rf "$SANDBOX"' EXIT
|
|
16
|
+
|
|
17
|
+
fails=0
|
|
18
|
+
|
|
19
|
+
cat >"$SANDBOX/SPEC.md" <<'EOF'
|
|
20
|
+
# consumer — SPEC
|
|
21
|
+
|
|
22
|
+
The engine is a small shell script, a claim in the class with no oracle behind
|
|
23
|
+
it.
|
|
24
|
+
EOF
|
|
25
|
+
|
|
26
|
+
emit() { # $1=basename $2=the emitter command
|
|
27
|
+
printf '%s\n' "CANON_KIT_CLAIM_CLASSES_CMD='$2'" 'CANON_KIT_MEASURED_SURFACE_GLOBS=("*.md")' \
|
|
28
|
+
>"$SANDBOX/$1"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
emit ok.sh 'printf "engine-substrate\tthe engine is a small shell script\n"'
|
|
32
|
+
emit err.sh 'exit 3'
|
|
33
|
+
emit notab.sh 'printf "engine-substrate the engine is a small shell script\n"'
|
|
34
|
+
emit badid.sh 'printf "Engine_Substrate\tthe engine is a small shell script\n"'
|
|
35
|
+
emit dup.sh 'printf "engine\tone\nengine\ttwo\n"'
|
|
36
|
+
emit extratab.sh 'printf "engine\tone\ttwo\n"'
|
|
37
|
+
emit uncompilable.sh 'printf "engine\tthe engine is (unclosed\n"'
|
|
38
|
+
emit nothing.sh 'true'
|
|
39
|
+
printf '%s\n' 'CANON_KIT_MEASURED_SURFACE_GLOBS=("*.md")' >"$SANDBOX/off.sh"
|
|
40
|
+
|
|
41
|
+
check_case() { # $1=label $2=want-rc $3=want-substring $4=config
|
|
42
|
+
local label="$1" want="$2" sub="$3" cfg="$4"
|
|
43
|
+
local out rc
|
|
44
|
+
out="$(cd "$SANDBOX" && gate_env CANON_KIT_CONFIG_FILE="$SANDBOX/$cfg" \
|
|
45
|
+
&& gate_run check-unmarked-claim "$DIR/checks" 2>&1)"; rc=$?
|
|
46
|
+
if [[ "$rc" -ne "$want" ]]; then
|
|
47
|
+
echo " FAIL [$label]: want exit $want, got $rc -- $out"; fails=$((fails + 1)); return
|
|
48
|
+
fi
|
|
49
|
+
if [[ -n "$sub" ]] && ! grep -qF -- "$sub" <<<"$out"; then
|
|
50
|
+
echo " FAIL [$label]: exit $rc OK but output lacks '$sub':"; printf ' %s\n' "$out"
|
|
51
|
+
fails=$((fails + 1))
|
|
52
|
+
fi
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
# The configured baseline: with a class declared, the sentence above is red.
|
|
56
|
+
# Every fail-closed case below differs from this one only in the vocabulary, so
|
|
57
|
+
# a case that exits 2 proves the loader refused rather than that nothing matched.
|
|
58
|
+
check_case "declared-class-is-red" 1 "falls in claim class 'engine-substrate'" ok.sh
|
|
59
|
+
|
|
60
|
+
# Arm B, inherited whole from spec_claim_vocabulary: a roster that cannot be
|
|
61
|
+
# read leaves the gate holding no class, and a gate holding no class must not
|
|
62
|
+
# report the clean it did not earn.
|
|
63
|
+
check_case "emitter-error-fails-closed" 2 "exited 3" err.sh
|
|
64
|
+
check_case "no-tab-fails-closed" 2 "line has no tab" notab.sh
|
|
65
|
+
check_case "non-slug-id-fails-closed" 2 "id is not slug-shaped" badid.sh
|
|
66
|
+
check_case "duplicate-id-fails-closed" 2 "duplicate id" dup.sh
|
|
67
|
+
check_case "extra-tab-fails-closed" 2 "extra tab in line" extratab.sh
|
|
68
|
+
|
|
69
|
+
# The pattern is consumer-authored, so an ERE that does not compile is the same
|
|
70
|
+
# unreadable-roster failure one step later, and takes the same exit.
|
|
71
|
+
check_case "uncompilable-ere-fails-closed" 2 "does not compile" uncompilable.sh
|
|
72
|
+
|
|
73
|
+
# The two clean skips a fixture pair cannot tell apart: no vocabulary configured
|
|
74
|
+
# at all, and one configured that declared nothing. Both are green and they are
|
|
75
|
+
# green for different reasons, which is why the command knob is bridged beside
|
|
76
|
+
# the parsed arrays.
|
|
77
|
+
check_case "no-vocabulary-is-clean" 0 "CANON_KIT_CLAIM_CLASSES_CMD unset" off.sh
|
|
78
|
+
check_case "declared-nothing-is-clean" 0 "declared no claim classes" nothing.sh
|
|
79
|
+
|
|
80
|
+
if [[ "$fails" -gt 0 ]]; then
|
|
81
|
+
echo "check-unmarked-claim.test.sh: $fails case(s) failed"
|
|
82
|
+
exit 1
|
|
83
|
+
fi
|
|
84
|
+
echo "check-unmarked-claim.test.sh: clean (every unreadable roster fails closed; an unset and an empty vocabulary are two distinct clean skips)"
|
|
85
|
+
exit 0
|
|
@@ -103,6 +103,8 @@ declare -p CANON_KIT_PAYLOAD_CLAIM_EXCLUDE &>/dev/null || CANON_KIT_PAYLOAD_CLAI
|
|
|
103
103
|
[[ -v CANON_KIT_MEASURED_CLAIMS_CMD ]] || CANON_KIT_MEASURED_CLAIMS_CMD=""
|
|
104
104
|
declare -p CANON_KIT_MEASURED_SURFACE_GLOBS &>/dev/null || CANON_KIT_MEASURED_SURFACE_GLOBS=()
|
|
105
105
|
|
|
106
|
+
[[ -v CANON_KIT_CLAIM_CLASSES_CMD ]] || CANON_KIT_CLAIM_CLASSES_CMD=""
|
|
107
|
+
|
|
106
108
|
declare -p CANON_KIT_COMMENT_MACHINE &>/dev/null || CANON_KIT_COMMENT_MACHINE=()
|
|
107
109
|
declare -p CANON_KIT_COMMENT_REASON &>/dev/null || CANON_KIT_COMMENT_REASON=()
|
|
108
110
|
declare -p CANON_KIT_COMMENT_SURFACE &>/dev/null || CANON_KIT_COMMENT_SURFACE=()
|
|
@@ -542,3 +544,17 @@ if [[ "${GATE_SDK_RESOLVING_KNOB:-}" == CANON_KIT_PAYLOAD_CLAIM_IDS \
|
|
|
542
544
|
done <<<"$_sk_pc"
|
|
543
545
|
unset _sk_pc _sk_c _sk_r
|
|
544
546
|
fi
|
|
547
|
+
|
|
548
|
+
declare -p CANON_KIT_CLAIM_CLASS_IDS &>/dev/null || CANON_KIT_CLAIM_CLASS_IDS=()
|
|
549
|
+
declare -p CANON_KIT_CLAIM_CLASS_PATTERNS &>/dev/null || CANON_KIT_CLAIM_CLASS_PATTERNS=()
|
|
550
|
+
if [[ "${GATE_SDK_RESOLVING_KNOB:-}" == CANON_KIT_CLAIM_CLASS_IDS \
|
|
551
|
+
|| "${GATE_SDK_RESOLVING_KNOB:-}" == CANON_KIT_CLAIM_CLASS_PATTERNS ]] \
|
|
552
|
+
&& [[ -n "$CANON_KIT_CLAIM_CLASSES_CMD" ]]; then
|
|
553
|
+
_sk_cc="$(spec_claim_vocabulary "$CANON_KIT_CLAIM_CLASSES_CMD" CANON_KIT_CLAIM_CLASSES_CMD)" || exit 2
|
|
554
|
+
while IFS=$'\t' read -r _sk_ci _sk_cp; do
|
|
555
|
+
[[ -n "$_sk_ci" ]] || continue
|
|
556
|
+
CANON_KIT_CLAIM_CLASS_IDS+=("$_sk_ci")
|
|
557
|
+
CANON_KIT_CLAIM_CLASS_PATTERNS+=("$_sk_cp")
|
|
558
|
+
done <<<"$_sk_cc"
|
|
559
|
+
unset _sk_cc _sk_ci _sk_cp
|
|
560
|
+
fi
|
|
@@ -8,6 +8,7 @@ SDK="$SMOKE_KIT_ROOT/../gate-sdk" # the vendored gate-sdk beside this kit
|
|
|
8
8
|
cat >> scripts/gates.list <<'EOF'
|
|
9
9
|
# canon-kit (check-surface-duplication omitted — needs a glossary)
|
|
10
10
|
check-amendment-queue
|
|
11
|
+
check-amendment-update-target
|
|
11
12
|
check-spec-dod-singleton
|
|
12
13
|
check-spec-derivable-section
|
|
13
14
|
check-spec-embedded-source
|
|
@@ -29,6 +30,7 @@ check-spec-fence-balance
|
|
|
29
30
|
check-spec-pointer
|
|
30
31
|
check-todo-task-liveness
|
|
31
32
|
check-tracking-claim
|
|
33
|
+
check-unmarked-claim
|
|
32
34
|
EOF
|
|
33
35
|
|
|
34
36
|
# smoke-unregistered: check-surface-duplication — the glossary topology it reads (CANON_KIT_GLOSSARY_FILE, default GLOSSARY.md) is optional and this tree ships none, so its exit 2 is uncorroborated only because the invoking repo lacks the same optional surface, not because the gate is broken
|
|
@@ -18,7 +18,13 @@
|
|
|
18
18
|
## What changes
|
|
19
19
|
|
|
20
20
|
<!-- The delta: new invariants, states, interfaces, error behavior. Each will
|
|
21
|
-
land in its proper canonical-spec section at merge — write it so it can.
|
|
21
|
+
land in its proper canonical-spec section at merge — write it so it can.
|
|
22
|
+
|
|
23
|
+
Each delta is a heading of the form `### (<N>) <title>` — <N> a positive
|
|
24
|
+
integer, no leading zero, numbering from 1, sequential and unique within
|
|
25
|
+
this file. A gap or a repeat means a delta was split or dropped without its
|
|
26
|
+
citations moving. Renumber a delta and you move its citations with it.
|
|
27
|
+
Checked by check-amendment-update-target. -->
|
|
22
28
|
|
|
23
29
|
## Producers and consumers
|
|
24
30
|
|
|
@@ -38,7 +44,16 @@
|
|
|
38
44
|
<!-- Any canonical-spec section describing the prior flow that this change
|
|
39
45
|
touches — updated here, in the amendment, not left to drift. Each entry
|
|
40
46
|
names the delta that owns it; an update target no delta claims reaches
|
|
41
|
-
build as an orphan a batch adopts on its own authority.
|
|
47
|
+
build as an orphan a batch adopts on its own authority.
|
|
48
|
+
|
|
49
|
+
A citation is `delta <N>` or `deltas <N>` (case-insensitive), continuing
|
|
50
|
+
into further integers through commas and/or the word `and` — `(deltas 2, 3)`,
|
|
51
|
+
`(deltas 1 and 4)`; `delta 3's` is the same citation. `all deltas` cites
|
|
52
|
+
every delta this file defines, for a target (a generated mirror, say) that
|
|
53
|
+
goes stale the moment any of them lands. For a target deliberately owned by
|
|
54
|
+
no delta, tag `<!-- update-target-exempt: <reason> -->` on the bullet's first
|
|
55
|
+
line or the one above — the reason is mandatory. Checked by
|
|
56
|
+
check-amendment-update-target. -->
|
|
42
57
|
|
|
43
58
|
<!-- The one sanctioned copy exemption: an amendment may embed a wire-contract
|
|
44
59
|
delta (e.g. a fenced proto block) until merge, because it is the design
|
|
@@ -66,7 +66,7 @@ three are advisory `bin/` tools; none joins `gates.list`.
|
|
|
66
66
|
it — a second adopter's tree carries a TypeScript surface its Rust-only copy
|
|
67
67
|
could not index — not before: an unrequested plugin framework would have
|
|
68
68
|
been scaffolding, and AST/tree-sitter parsing is above the tool's grep-grade
|
|
69
|
-
portability altitude (
|
|
69
|
+
portability altitude (shell over coreutils, Tier one).
|
|
70
70
|
|
|
71
71
|
## The session-context hook (template)
|
|
72
72
|
|
|
@@ -74,7 +74,18 @@ three are advisory `bin/` tools; none joins `gates.list`.
|
|
|
74
74
|
pattern): wired as the harness's session-start hook via
|
|
75
75
|
`templates/settings-sessionstart.json`, it assembles the session brief.
|
|
76
76
|
Every step is guarded and degrades silently — the hook never fails a
|
|
77
|
-
session.
|
|
77
|
+
session.
|
|
78
|
+
|
|
79
|
+
**A `hooks[]` edit arms immediately, and this is the kit set's record of it** —
|
|
80
|
+
true of every hook registration in the settings file, not just this template's:
|
|
81
|
+
the running session and its already-dispatched subagents pick it up with no
|
|
82
|
+
restart and no re-dispatch. Measured rather than assumed, by watching a newly
|
|
83
|
+
registered hook's log fill inside the same session that wrote the registration.
|
|
84
|
+
It bounds what a session-start hook can be relied on for: arming is not the
|
|
85
|
+
same event as the session brief, so a hook wired mid-session runs without ever
|
|
86
|
+
having assembled one.
|
|
87
|
+
|
|
88
|
+
Steps, in order:
|
|
78
89
|
|
|
79
90
|
1. **Queue index** — via queue-kit's `queue-index` arm, reached through the
|
|
80
91
|
battery runner's `--emit` front-end (queue-kit/SPEC.md §The queue-index arm),
|
|
@@ -293,9 +304,9 @@ The constrained members and what forces each:
|
|
|
293
304
|
consumer below it cannot run the battery at all. Recorded here because the
|
|
294
305
|
earlier `4.0` was a fail-open: `env-probe` reported `ok` on a 4.2 box the
|
|
295
306
|
battery would fail with an obscure syntax error.
|
|
296
|
-
- `awk::GNU` — no version floor, one implementation constraint
|
|
297
|
-
|
|
298
|
-
§check-gate-assertions
|
|
307
|
+
- `awk::GNU` — no version floor, one implementation constraint, whose last live
|
|
308
|
+
holder the eighth port cut retired; narrowing the element is filed as
|
|
309
|
+
`interpreter-floor-gawk-residue-empty` (gate-sdk/SPEC.md §check-gate-assertions).
|
|
299
310
|
- `sort::coreutils` — no version floor, one implementation constraint, and one
|
|
300
311
|
member standing for a whole package family: GNU coreutils is forced by
|
|
301
312
|
`realpath --relative-to` and its `-m` form (gate-sdk's shared gate library and
|
|
@@ -59,7 +59,15 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
|
|
|
59
59
|
on a PAUSE verdict and advising otherwise (SPEC §The delegation model).
|
|
60
60
|
Unwired, it is inert.
|
|
61
61
|
|
|
62
|
-
5. Optional —
|
|
62
|
+
5. Optional — wire the turn-end liveness probe: copy
|
|
63
|
+
`templates/subagent-stop-liveness.sh` into your gates dir and register it
|
|
64
|
+
under `SubagentStop` in `.claude/settings.json` (that event takes no matcher).
|
|
65
|
+
It logs one line per subagent turn end saying whether any launch record named
|
|
66
|
+
a live producer, emits no hook JSON and always exits 0 — a probe, not an
|
|
67
|
+
enforcement mechanism (SPEC §The turn-end liveness probe (template)). Unwired,
|
|
68
|
+
it is inert; wiring it is a permission-surface change, so it is yours to make.
|
|
69
|
+
|
|
70
|
+
6. Optional — retune: copy `templates/delegation-config.sh` into your gates dir
|
|
63
71
|
and override the budget thresholds, the gate-file globs, or the meta-layer
|
|
64
72
|
prefixes. Defaults are this repo's single-operator layout.
|
|
65
73
|
|
|
@@ -69,6 +77,8 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
|
|
|
69
77
|
bash delegation-kit/bin/usage-verdict.sh # budget verdict: exit 0 OK/RESET-OK, 1 PAUSE, 2 STALE
|
|
70
78
|
bash delegation-kit/bin/usage-verdict.sh <snapshot> # verdict for an explicit usage.txt (test injection)
|
|
71
79
|
bash delegation-kit/bin/usage-trend.sh # footprint trend over the sample log (needs DELEGATION_KIT_USAGE_HISTORY)
|
|
80
|
+
bash delegation-kit/bin/wait-probe.sh sweep # wait-primitive probe: the harness-uninvolved reproducer (sleeps for its declared sweep)
|
|
81
|
+
bash delegation-kit/bin/wait-probe.sh report # classify the recorded trials and print the verdict
|
|
72
82
|
```
|
|
73
83
|
|
|
74
84
|
With `DELEGATION_KIT_USAGE_HISTORY` set, `usage-verdict` logs one sample per
|