feat(graphify): usage rules print from session-start only where a graph exists
This commit is contained in:
1 parent
4bbb3c58d4
commit
de6e51ce7a
3 files changed
+38
-11
No files matched your search
@@ -56,5 +56,21 @@ for i in $(seq 1 300); do echo "# $i" > "$d/doc$i.md"; done
|
||||
git -C "$d" add -A; git -C "$d" commit -q -m docs
|
||||
check T9-non-code-not-counted "$(gate "$d")" silent
|
||||
|
||||
# ── session-start prints the usage rules only where a graph exists
|
||||
# (BDR-125 phase 1: the body left CLAUDE.global.md) ──
|
||||
SS="$(cd "$(dirname "$0")/../.." && pwd)/hooks/session-start.sh"
|
||||
banner() { (cd "$1" && SESSION_START_OFFLINE=1 bash "$SS" </dev/null 2>/dev/null); }
|
||||
d=$(mkrepo ss 1)
|
||||
out=$(banner "$d")
|
||||
check S1-banner-control "$(grep -c 'Claude Code config' <<<"$out")" 1
|
||||
check S1b-no-graph-silent "$(grep -c 'graphify query' <<<"$out")" 0
|
||||
mkdir -p "$d/graphify-out" "$d/app/sub"; echo '{}' > "$d/graphify-out/graph.json"
|
||||
out=$(banner "$d")
|
||||
check S2-graph-prints "$(grep -c 'graphify query' <<<"$out")" 1
|
||||
check S2b-update-rule "$(grep -c 'graphify update \.' <<<"$out")" 1
|
||||
check S3-from-subdir "$(banner "$d/app/sub" | grep -c 'graphify query')" 1
|
||||
out=$(banner "$WORK/plain")
|
||||
check S4-not-a-repo "$(grep -c 'graphify query' <<<"$out")/$(grep -c 'Claude Code config' <<<"$out")" 0/1
|
||||
|
||||
echo "PASS=$pass FAIL=$fail"
|
||||
[ "$fail" -eq 0 ]
|
||||
Reference in new issue
Block a user