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
+3 -1
View File
@@ -356,7 +356,9 @@ describe('opt-in contract (adapted from the fork: NOT registered by default)', (
expect(mentions.length).toBeGreaterThan(0); // the exclusion itself is pinned
for (const line of mentions) {
const t = line.trim();
const allowed = t.startsWith('#') || t.includes('GSTACK_SWEEP_EXCLUDE_SOURCES="verify-gate"');
// The exclusion list may name other user-registered opt-ins beside
// verify-gate (gstack-memorable); it must still start with verify-gate.
const allowed = t.startsWith('#') || /GSTACK_SWEEP_EXCLUDE_SOURCES="verify-gate(,[a-z-]+)*"/.test(t);
expect(allowed).toBe(true);
expect(t).not.toContain('add-event');
}