fix(agents): close the 10 prose BUGS-FOUND items, root quoting and $HOME refusal
Handover: rooted reads, whole-line PROJECT_ROOT read with a one-line pre-paste rule, BDR status filter. plugin-gate: single-quoted templates, unsafe roots printed never run, apply check against the git common dir, $HOME refused (and in profile.sh). Advisor: minimal only from project signals, no extras token, ctx7 wording, print-only plugin remedy. Packs vocabulary in onboard/tour; graphify labels match the trap.
This commit is contained in:
1 parent
a967fd93dc
commit
77041e5360
17 files changed
+192
-98
No files matched your search
@@ -178,6 +178,13 @@ check T26-home-rc "$rc" 0
|
||||
check T26-home-local "$([ -f "$H2/work/.claude/settings.local.json" ] && echo yes)" yes
|
||||
check T26-home-not-root "$([ -e "$H2/.claude" ] && echo leaked)" ""
|
||||
|
||||
# a root that is $HOME (even through a symlink) is refused, rc 2, nothing written
|
||||
H3="$FX/home3"; mkdir -p "$H3"; printf '# h\n' > "$H3/CLAUDE.md"; ln -s "$H3" "$FX/home3-link"
|
||||
out="$(HOME="$FX/home3-link" PX "$H3" set devx 2>&1)"; rc=$?
|
||||
check T27-home-root-rc "$rc" 2
|
||||
check_has T27-home-root-msg "$out" "refusing \$HOME as the project root"
|
||||
check T27-home-root-nothing "$([ -e "$H3/.claude" ] && echo leaked)" ""
|
||||
|
||||
# timing: two jq calls, under 100 ms here (spec target 50 ms, measured in Task 12)
|
||||
t0=$(date +%s%N); P current --plain >/dev/null; t1=$(date +%s%N)
|
||||
ms=$(( (t1 - t0) / 1000000 )); echo "current --plain: ${ms} ms"
|
||||
|
||||
@@ -163,8 +163,8 @@ check SB10-gate-vocab "$(gone lib/plugin-gate.md \
|
||||
'Pre-fetch ctx7|Enable ui-ux-pro-max \(')" 1
|
||||
gate="$(cat "$ROOT/lib/plugin-gate.md")"
|
||||
check SB10-gate-diff "$(has "$gate" 'profile.sh" -C')" 1
|
||||
check SB10-gate-diff2 "$(has "$gate" 'diff "<profile>"')" 1
|
||||
check SB10-gate-root "$(has "$gate" 'rev-parse --show-toplevel')" 1
|
||||
check SB10-gate-diff2 "$(has "$gate" "diff '<profile>'")" 1
|
||||
check SB10-gate-root "$(has "$gate" '--git-common-dir')" 1
|
||||
check SB10-gate-rejected "$(has "$gate" 'rejected')" 1
|
||||
check SB10-gate-quoted "$(gone lib/plugin-gate.md '-C <PROJECT_ROOT>')" 1
|
||||
check SB10-advisor-fullid "$(has "$(cat "$ROOT/agents/plugin-advisor.md")" \
|
||||
|
||||
Reference in new issue
Block a user