mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-13 08:29:04 +02:00
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:
co-authored by
Claude Fable 5.1
parent
05b97dbe6d
commit
6aa9cd9e35
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user