@cratis/pi 7.119.0 → 7.119.1
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.
|
@@ -98,16 +98,16 @@ if [ "$SELFTEST" = 1 ]; then
|
|
|
98
98
|
chk "fresh worktree kept" '[ -d "$t/wt-fresh" ]'
|
|
99
99
|
chk "fresh branch kept" 'git rev-parse -q --verify refs/heads/fresh >/dev/null'
|
|
100
100
|
chk "main kept" 'git rev-parse -q --verify refs/heads/main >/dev/null'
|
|
101
|
-
chk "report names the removal" '
|
|
101
|
+
chk "report names the removal" 'grep -q "removed worktree" <<<"$out"'
|
|
102
102
|
chk "work records kept" '[ -f "$t/wt-records/.ai-work/.handoff" ]'
|
|
103
103
|
chk "work records branch kept" 'git rev-parse -q --verify refs/heads/records >/dev/null'
|
|
104
|
-
chk "work records reason reported" '
|
|
104
|
+
chk "work records reason reported" 'grep -Fq "has untracked work records (.ai-work/)" <<<"$out"'
|
|
105
105
|
chk "empty work records removed" '[ ! -d "$t/wt-empty-records" ]'
|
|
106
106
|
chk "locked worktree kept" '[ -d "$t/wt-locked" ]'
|
|
107
107
|
chk "locked branch kept" 'git rev-parse -q --verify refs/heads/locked >/dev/null'
|
|
108
|
-
chk "locked reason reported" '
|
|
108
|
+
chk "locked reason reported" 'grep -Fq "worktree $t/wt-locked (locked): locked" <<<"$out"'
|
|
109
109
|
chk "locked detached kept" '[ -d "$t/wt-locked-detached" ]'
|
|
110
|
-
chk "locked detached reported" '
|
|
110
|
+
chk "locked detached reported" 'grep -Fq "worktree $t/wt-locked-detached (detached): locked" <<<"$out"'
|
|
111
111
|
out=$(printf '%s' '{"hook_event_name":"SessionStart"}' | "$self" --no-fetch --include-work-records --hook 2>&1) || { echo "FAIL: hook exit $?"; echo "$out"; exit 1; }
|
|
112
112
|
chk "hook ignores opt-in" '[ -f "$t/wt-records/.ai-work/.handoff" ]'
|
|
113
113
|
out=$("$self" --no-fetch --include-work-records 2>&1) || { echo "FAIL: opt-in exit $?"; echo "$out"; exit 1; }
|
|
@@ -32,7 +32,8 @@ while IFS= read -r slice; do
|
|
|
32
32
|
done <<EOF
|
|
33
33
|
$changed
|
|
34
34
|
EOF
|
|
35
|
-
|
|
35
|
+
# A here-string, never `printf … | grep -q`: under `pipefail` the early-exiting `grep -q` can SIGPIPE `printf`.
|
|
36
|
+
if LC_ALL=C grep -Fxq "$anchor" <<<"$changed"; then
|
|
36
37
|
spec_paths="$(printf '%s\n' "$paths" | CRATIS_SLICE="$slice/" awk '
|
|
37
38
|
index($0, ENVIRON["CRATIS_SLICE"]) == 1 && /\/when_[^\/]+(\/|\.cs$)/ { print }
|
|
38
39
|
')"
|
|
@@ -270,9 +270,9 @@ AWK
|
|
|
270
270
|
|
|
271
271
|
if [[ "$self_test" == 1 ]]; then
|
|
272
272
|
flags="$(grep '^FLAG' "$tmp/out.txt" 2>/dev/null || true)"
|
|
273
|
-
|
|
273
|
+
grep -q $'\tReactorSideEffect\t' <<<"$flags" \
|
|
274
274
|
|| { printf 'ai-corpus type-references self-test: FAILED - the seeded ReactorSideEffect fabrication was not flagged\n' >&2; exit 1; }
|
|
275
|
-
if
|
|
275
|
+
if grep -qE $'\t(EventForEventSourceId|IReactor|ReactorSideEffectFailure)\t' <<<"$flags"; then
|
|
276
276
|
printf 'ai-corpus type-references self-test: FAILED - a real Cratis type was flagged as unresolved\n' >&2; exit 1
|
|
277
277
|
fi
|
|
278
278
|
printf 'ai-corpus type-references self-test: passed - the seeded fabrication is named and the real types stay silent\n' >&2
|