fix(setup): --no-team sweep keeps the opt-in gstack-memorable hook

`./setup --no-team` finishes its teardown with `prune-stale --all`, which
removes every KNOWN_HOOKS item. The Memorable bridge hook is a
user-registered opt-in unrelated to team mode, exactly like verify-gate,
so it joins the sweep exclusion list. The verify-gate pin now accepts the
comma-extended list; a schema-aware case proves the exclusion keeps both
opt-ins (tagged or tag-stripped) while the uninstall sweep still removes
them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-09-08 17:53:57 +00:00
co-authored by Claude Fable 5.1
parent 05b97dbe6d
commit 6aa9cd9e35
3 changed files with 33 additions and 5 deletions
+4 -4
View File
@@ -3010,10 +3010,10 @@ if [ "$NO_TEAM_MODE" -eq 1 ] && [ -x "$SETTINGS_HOOK" ]; then
"$SETTINGS_HOOK" remove-source --source plan-tune-cathedral >/dev/null || true
"$SETTINGS_HOOK" remove-source --source auq-error-fallback >/dev/null || true
"$SETTINGS_HOOK" remove-source --source gstack-timeline-stop >/dev/null || true
# verify-gate is a user-registered opt-in unrelated to team mode -- turning
# team mode off must not delete it (uninstall still sweeps it, correctly,
# because there the binary itself is being removed).
GSTACK_SWEEP_EXCLUDE_SOURCES="verify-gate" "$SETTINGS_HOOK" prune-stale --all >/dev/null || true
# verify-gate and gstack-memorable are user-registered opt-ins unrelated to
# team mode -- turning team mode off must not delete them (uninstall still
# sweeps both, correctly, because there the binaries themselves are removed).
GSTACK_SWEEP_EXCLUDE_SOURCES="verify-gate,gstack-memorable" "$SETTINGS_HOOK" prune-stale --all >/dev/null || true
fi
# ─── Redact pre-push guard consent (#1946) ───────────────────────────────────