Repository navigation
Conversation
(cherry picked from commit 6bd5d47)
Two things the first cut got wrong. Memorable's own installer registers the same UserPromptSubmit hook, under its own name and outside gstack's table. `memorable start`, `memorable setup` and `memorable install-hooks` all do it, and that is the documented way to install the CLI, so on most machines it is already there before gstack is asked. Registering ours beside it ran the same command twice on every prompt: context injected twice, and the session captured twice against the user's own extraction allowance. `enable` now looks for it and refuses, naming the entry and the file it lives in; `status` says who registered it rather than reporting none. Matched on the command rather than on a tag, for the reason the hook table already gives: Claude Code rewrites settings and private tags do not survive it. The removal instruction says to delete the entry by hand because Memorable has no command that removes its own hook. `uninstall-hooks` is not a command in 0.5.18; it answers "unknown command". The README said "Memorable, not gstack, owns the captured data and any network access", which answers the question by pointing away from it. It now carries a per-command table of exactly what leaves the machine, in the shape the adopted gbrain section uses, and it is explicit that the hook makes no network call of its own, that every row is the third-party CLI acting under its own consent, and that `gstack-egress` will therefore not show any of it. Under it, the split between what gstack pin-tests (the gating and the wiring) and what is Memorable's claim (storage, sending, and what disable and forget erase). The CHANGELOG entry is removed. This file has never carried an [Unreleased] heading; every entry is a version and a date, written at release. The text is in the pull request for whoever cuts the next one. Three tests added: enable refuses and touches neither consent nor settings when Memorable already holds the hook, status names that registration, and a foreign UserPromptSubmit hook is not mistaken for Memorable's. (cherry picked from commit e0899af)
README carries the section and the egress table; this is the page it links to
for anyone who wants the whole thing. Same shape as docs/gbrain-sync.md, which
is the closest thing in the repo: an optional integration whose interesting
questions are all about what leaves the machine and how to turn it off.
What it covers that the README cannot at that length: that the hook sees every
Claude Code prompt rather than only the ones a skill produced; that capture is
a separate consent from this bridge, so turning the bridge off does not turn
capture off; what to do when Memorable has already registered the hook itself,
which is the common case because its own installer does it; and why the hook
has no loud failure path.
The egress table is repeated here rather than linked, because the sentence it
is answering ("what does this send") is the one somebody arrives on this page
already asking.
Co-authored-by: Advaiyt Sane <[email protected]>
Co-authored-by: Nikhil Krishnaswamy <[email protected]>
(cherry picked from commit 5c108cc)
remove-source used to inspect only entries still carrying the _gstack_source tag. Claude Code strips that tag when it rewrites settings.json, so an off switch built on remove-source alone silently no-oped on exactly the entries it was written for. Removal is now driven by KNOWN_HOOKS identity for the requested source (tagged or not), keeps the tagged-single-item legacy-stray rule, never touches another source's items, and leaves entries with nothing of ours byte-identical. list-items is the read-only view of the same identity table: one JSON string literal per matching hook command, filters (--owned-by, --command-regex as a JavaScript RegExp) applied inside the JS, empty stdout for no match, and the mutating verbs' exit codes (1 usage, 3 unparseable settings, 4 unexpected shape) so callers can decide mutations from its output without parsing raw command strings. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ct-and-preserve) The gstack-side gate for the Memorable UserPromptSubmit bridge. `on` lets a Claude Code hook hand every prompt to a third-party binary, so the key follows the codex_reviews rule: an invalid value is rejected and the stored value kept, never coerced in either direction. Registered in all four places gstack-config keeps in sync (annotated header, DEFAULTS table, the set validator, and both enumeration loops). Memorable's own capture consent (`memorable enable`) is a separate thing gstack never sets. Co-Authored-By: Claude Fable 5.1 <[email protected]>
… HIGH-tier pre-scan, fail-closed receipt, trust envelope; runExternal in spawn-bin The PR's hook exec'd the vendor binary with the full environment and passed its stdout to Claude verbatim. It is now the house pattern: a fail-open bash shim over a .ts twin that (1) gates on the memorable_recall consent key, (2) skips repos whose trust policy is deny or read-only, (3) scans the prompt (raw bytes and decoded string leaves) and refuses to hand over a HIGH-tier credential shape, (4) writes a fail-closed egress receipt naming the local executable it ran, (5) spawns the vendor in its own process group with an allowlisted environment and group-kills it on timeout, (6) accepts only a string additionalContext back, caps it at 8 KiB on a UTF-8 boundary and wraps it in the trust envelope, and (7) records an `output-written` outcome after the stdout write completes. One deadline clock (4.5 s) undercuts Claude Code's 5 s kill and bounds both ledger writes through the new lockBudgetMs option on writeReceipt/writeOutcome (default unchanged). spawn-bin gains runExternal for external executables (detached group, stderr drained, stdin EPIPE handled, stdout capped, win32 refused). The wiring test pins the sink fail-closed and sweeps hosts/. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…out 5, identity-based status, verified disable, lifecycle lock enable used to bake the hook path from whatever tree the CLI ran in and to run the vendor's own `memorable enable` (its consent for storing AND uploading session traces) before registering anything. It now resolves the canonical install like setup does and refuses when that install does not carry this bridge (version and hook-twin check), registers through the canonical hook manager with --timeout 5, records gstack's own consent in memorable_recall, never executes the vendor, and restores the captured prior state if consent cannot be recorded. disable flips the gate first, removes the entry by identity (tag or no tag), verifies both states and reports partial failure instead of a blended success. status reads only: resolution path, gate, registration by identity (gstack / vendor-own / both / unknown), mismatch lines, receipt count, recent hook errors. enable and disable serialise under a lock with stale takeover. Windows is refused (TODOS.md D21). Exit codes mirror the hook manager (3/4/5). Co-Authored-By: Claude Fable 5.1 <[email protected]>
`./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 <[email protected]>
…nest kept config The identity sweep already removed the Memorable bridge hook as an unnamed stray. It now has a named arm like every other source, so the summary says what went, and says plainly that Memorable's own consent (if the user granted it) is theirs to revoke. Under --keep-state the kept config is set memorable_recall=off so it never claims a hook that is gone. The canonical-paths pins cover the sixth KNOWN_HOOKS row and the new uninstall source. Co-Authored-By: Claude Fable 5.1 <[email protected]>
`gstack-egress grants` promises every standing consent in force with the command that revokes it. The Memorable bridge's memorable_recall key is one, so it gets a row: off by default, granted only when `gstack-memorable enable` set it, revoked by `gstack-memorable disable`. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…cy pointer; PROJECT_STRUCTURE The README section becomes one row in the Standalone binaries table (the shape every other binary uses) plus a Docs-table row and one Privacy bullet saying that optional third-party bridges are off by default and receipted. The guide now separates the two consents, says what gstack hands to the vendor binary and what the receipt can and cannot attest, attributes every statement about the vendor's network activity to the vendor, describes the hook manager accurately (identity via KNOWN_HOOKS, list-items vs list-sources, rollback is whole-file), states the Claude Code hot-reload behaviour, adds a troubleshooting runbook, and keeps the contributors' credit in the CHANGELOG idiom. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Filed from the CEO and eng reviews of the bridge fix-up: the generic third-party hook seam, Windows support (deferred whole), the envelope kind parameter, a vendor payload-minimization contract, a latency and timeout revisit, resolver and canonical-root consolidation, a non-interactive MEDIUM-tier redaction policy for hooks, and adopting list-items at setup's plan-tune check. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ects When both filters are given, an item must satisfy both: owned by the requested source AND matching the pattern. Before, the regex branch skipped every owned row, so the combination could never match. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…epping Under pipefail, piping the probe straight into grep -q let a non-zero probe exit mask the match, so a hook manager without list-items was sometimes reported as compatible. Capture the output, then grep. Co-Authored-By: Claude Fable 5.1 <[email protected]>
… every KNOWN_HOOKS source) - settings-hook: identity removal pinned for each source in KNOWN_HOOKS; list-items unknown flag and combined --owned-by/--command-regex - gstack-memorable: enable/disable failure paths (lock give-up exit 5 with the test-only lock timeout override, consent-write failures guarded by canRevokeWrites, canonical-version mismatch, no-bun status) - hook: non-object JSON, missing cwd, non-ASCII bytes, held-open stdin, shim without bun, stripControl, resolveVendor, runExternal ENOENT - egress-receipt: lockBudgetMs 0 and writeOutcome on garbage input - uninstall: no memorable entry present reports nothing removed Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ndex lineColAt walked the input from offset 0 for every finding, so a match-dense input (a pasted log full of emails and IPs) cost O(findings x bytes): 128 KiB took ~400 ms and 900 KiB tens of seconds. The line starts are now indexed once per scan, on the first finding, and each finding is a binary search. Co-Authored-By: Claude Fable 5.1 <[email protected]>
The policy script spawn was fixed at 10 s, more than twice the memorable hook's whole budget. Callers on their own deadline pass what they can afford; a timeout reads as unreadable and polarity stays the caller's. Co-Authored-By: Claude Fable 5.1 <[email protected]>
… errors advisory - A vendor that exits 0 but leaves a background child holding its pipes was held to the deadline, group-killed and reported as a timeout with its answer dropped. 'exit' now starts a short stdout drain, then resolves with the real exit code and kills whatever still holds the group. - EPIPE on the child's stdin (it answered before reading a large input) is reported as stdinError, separate from error, so a delivered answer is not classified as a spawn failure. - Stdio streams are destroyed and the child unref'd on resolve so a straggler cannot pin the hook process; tail/grace/drain sizes are named constants. Co-Authored-By: Claude Fable 5.1 <[email protected]>
- Vendor failures are logged even with empty stderr (a silently hanging vendor taxed every prompt invisibly); the stderr tail is withheld when the redaction engine finds a credential or PII shape in it; hook-errors.log is created 0600. - Trust-policy veto fails closed when git cannot run or answer in time (it read as 'no remote' before); the policy script spawn is bounded by the hook's clock; a payload cwd that is not a directory falls back. - Each secret scan is admitted by the deadline clock (the engine's cost grows with match density); stdin is decoded once. - The pre-spawn gate re-check logs a config failure instead of swallowing it; an incomplete stdin read is named as such, not as 'not JSON'. - Carriage returns are stripped with the other controls. - The vendor env allowlist adds the standard proxy, TLS and XDG variables so a vendor behind a corporate proxy or private CA still reaches its service. - A stdin EPIPE on a delivered answer is recorded in the outcome, not treated as a spawn error. - Stage caps and the truncation marker are named constants; a test-only GSTACK_MEMORABLE_TEST_BUDGET_MS can shorten (never widen) the budget. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…t messages - A contender that looked between the holder's mkdir and its ts write read a missing ts as 0, called the lock stale and reclaimed it; staleness now comes from the lock directory's own mtime (the settings-hook idiom). - The ensure-event failure is no longer labelled 'warning'; the consent-write rollback message says what was actually kept; a removal that left no entry is reported on stdout, not as an error; receipts are counted from the filtered JSON array, not a formatting artefact; the resolution order and lock tuning are named once. Co-Authored-By: Claude Fable 5.1 <[email protected]>
gstack-config resolves its root through GSTACK_STATE_ROOT/GSTACK_HOME, which can differ from the STATE_DIR uninstall removes; a full uninstall could leave memorable_recall=on in a config that survived. Flipped only when currently on. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Nonce-scoped orphan checks (the system-wide ps grep could see another shard's sleeper); exit-with-lingering-grandchild; advisory stdin EPIPE; withheld stderr; vendor timeout logged with empty stderr; CR stripping; budget seam; rate-limit expiry and 0600 log; unreadable policy store fails closed; file-as-cwd fallback; mtime-based lock staleness and the mkdir gap. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…follow-ups Co-Authored-By: Claude Fable 5.1 <[email protected]>
- Trust-policy lookup fails closed on any git failure that is not 'no such remote' or 'not a git repository' (a corrupt or unreadable .git/config and dubious ownership exit 128 and used to read as 'no remote'). - pickAdditionalContext takes the first complete top-level JSON object, so a vendor whose background helper appends a line to stdout (or prints a banner first) does not lose its answer. - The hook-errors.log rate limiter keys on a stable string (a vendor's timestamped stderr no longer defeats it); the log is chmod 0600 on every append because sibling hooks create the same file without a mode. - Scan admission is sized by payload bytes (scan() is uninterruptible). - The receipt payload class is a stable token; the prose moved to the docs. - Header, constants and comments match the behaviour (silent skips vs logged refusals; HIGH/MEDIUM withholding; STAGE_CAP_MS scope; runExternal in the spawn-bin header; the ledger lock budget doc). Co-Authored-By: Claude Fable 5.1 <[email protected]>
… match behaviour Two contenders that both saw a stale lock could both reclaim it with rm -rf; the settings-hook idiom (mv to a private name, exactly one winner) is used instead. The hook-manager fallback comment now says every verb falls back. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Policy lookup outcomes (plain dir, repo without policy, corrupt .git/config fails closed); repoPolicyTier timeoutMs; line/col at line starts, after blank lines, CRLF and first char; tolerant first-JSON-object parsing; keyed rate limit; uninstall never creates a config just to say off and flips consent in a GSTACK_STATE_ROOT outside the removed state dir. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…; D21/D24 anchors Co-Authored-By: Claude Fable 5.1 <[email protected]>
…g banners - The bash shim runs bun as a job and forwards SIGTERM/SIGINT/SIGHUP (bash holds a signal until a foreground child exits); the .ts kills the in-flight vendor's process group on the way out (runExternal exposes the group kill through onSpawn), so a hook the host terminates cannot leave the vendor running with the prompt on its stdin. - The tolerant stdout parser tries every complete top-level object (bounded) and takes the first carrying a string additionalContext, so a banner with braces or quotes, or a progress object, no longer costs the answer. - git runs with LC_ALL=C and the not-a-repository check is anchored to the start of its message: a localized git or a repository path containing the phrase can no longer flip the lookup. - The rate limiter remembers up to 32 live keys, so alternating failures cost two lines, not one per prompt. - Unicode format characters (bidi overrides, zero-width spaces) are stripped from vendor text at egress; the zero-width joiner stays for emoji. - A killed child (timeout, ENOBUFS) resolves on exit without the stdout drain, and the post-kill grace is 100 ms, so the timeout outcome fits the reserve. - The ledger size warning, which the host discards from an exit-0 hook's stderr, is logged where status looks. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…; disable runs without gstack-config; status shows ledger size Co-Authored-By: Claude Fable 5.1 <[email protected]>
…and format characters; non-reclaimable stale lock gives up; ledger line in status Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…din, stays alive) Under parallel shard load a child that merely exits fast raced the write and the EPIPE was not always observed; closing the read end first makes it so. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…External - Nothing in the vendor's process group outlives the call: the group is killed on every resolve, the clean 'close' path included (a helper the vendor forked with redirected stdio ran on unsupervised before). - A child that already exited when the deadline fires keeps its result; the deadline only ends the drain instead of rewriting a completed exit as a timeout. - The decoded-leaf scan reports when its node/depth bound cut the walk short and the hook refuses the hand-off as unscanned; object keys are scanned too. - git for the trust-policy lookup runs without inherited GIT_* selectors (GIT_DIR, GIT_WORK_TREE, GIT_CONFIG_*), so it inspects the session's repository and no other; a host cancellation kills that git as well. - An unmatched brace in a vendor banner no longer hides the answer after it. - The stderr tail is scanned whole before it is cropped for the log, so a credential's prefix cannot be cropped away from its secret half. - The vendor override reads an empty GSTACK_MEMORABLE_BIN as unset, exactly as bin/gstack-memorable does, so enable checks the binary the hook runs. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…and the owner's liveness; status reports a failed receipt query as unknown Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ager and name a failed revocation Co-Authored-By: Claude Fable 5.1 <[email protected]>
…not bypass the deny, unmatched-brace banner, whole-tail scan, empty-override parity, uninstall revocation without the hook manager Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ook removal, faster redaction line/col CHANGELOG entry for the Memorable workflow-memory bridge (opt-in, off by default, Claude Code only), the identity-aware remove-source and read-only list-items in the hook manager, the memorable-recall egress sink, runExternal, lockBudgetMs, and the binary-search line/col index in the redaction engine. No migration. Contributed by @AdvaiytSane and @NIkhil-cmd-cmd (#2831). Co-Authored-By: Claude Fable 5.1 <[email protected]>
…d; pin the invariant instead A delivered answer is never reclassified as a spawn error; when the EPIPE is observed it is reported as stdinError. Whether it is observed before the child's exit resolves the call is not something the test can force. Co-Authored-By: Claude Fable 5.1 <[email protected]>
CLAUDE.md and ARCHITECTURE.md enumerate the receipt sinks that refuse to send when the ledger cannot be written; the Memorable bridge's per-prompt hand-off is pinned fail-closed in test/egress-receipt-wiring.test.ts but was missing from both lists. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
😎 This pull request was merged. |
Contributor
E2E Evals: ✅ PASS0/0 tests passed | $0 total cost | reconcile exit: 0
Fail-closed reconciliationSliced lane: diff-selected gate census via scripts/test-paid-shards.ts (planner → 6 executors → fail-closed report) |
…s; scanner-proof key fixture - The consent-write-failure tests make the state dir read-only, which also blocked the bridge lock directory (exit 5 before the path under test); the locks dir is pre-created so only the consent write fails. - The unreadable-store test leaves a 0600 directory behind (the policy script chmods the store path); cleanup restores the search bit and the suite's afterEach reopens directories before removing. - The AWS-key-shaped fixture is built by concatenation, as every sibling test does, so the CI credential gate does not read it as a live key. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ck cannot be created Co-Authored-By: Claude Fable 5.1 <[email protected]>
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Supersedes #2831 (the fork PR from Memorable's engineers). Their three commits are cherry-picked with authorship preserved; everything after them brings the bridge up to gstack's spec as decided in
/plan-ceo-reviewand/plan-eng-review(four Codex outside-voice passes, 41 of 45 points adopted), then hardened by the/shipreview army, two adversarial passes, and a Codex structured review. Closing #2831 with a comment is left to the maintainer.The bridge (opt-in, default off, Claude Code only)
bin/gstack-memorable enable | disable | status: registers gstack's UserPromptSubmit hook at the stable install path (timeout 5), verifies the stable install carries this bridge first, refuses when Memorable's own installer already registered its hook, records gstack's own consent keymemorable_recall, and never runsmemorable enable(the vendor's consent is the user's to grant).disableflips the key off first, removes by identity, verifies both.statusnever executes the vendor. One lifecycle transition at a time (mkdir lock, mtime staleness, inode-checked atomic reclaim, owner liveness). Exit codes mirror the hook manager (1, 3, 4, 5).hosts/claude/hooks/memorable-user-prompt-hook(bash shim, forwards SIGTERM to bun) +memorable-user-prompt-hook.ts: one 4.5 s deadline clock; 1 MiB stdin cap; gate check viagstack-config; trust-policy veto by session cwd (fail-closed on any lookup failure, git run without inheritedGIT_*, English messages, anchored match); HIGH-tier redaction pre-scan on raw bytes and decoded leaves (keys included; walk exhaustion refuses); vendor resolution with bash/TS parity; pre-spawn gate re-check; egress receipt before the spawn (fail-closed,lockBudgetMsfrom the clock, hostlocal:<executable>);runExternalwith an allowlisted env (identity, locale, temp, proxy/TLS/XDG,MEMORABLE*); only a stringadditionalContextaccepted (tolerant first-object parse), control and Unicode format characters stripped, 8 KiB UTF-8-safe cap, trust envelope; outcomeexit:0 output-written bytes=N gstack_ms=Nafter the awaited stdout write; rate-limited, keyed, 0600hook-errors.log; stderr tail withheld when the engine finds a HIGH/MEDIUM shape. Windows refused (no process groups).memorable_recallconfig key (reject-and-preserve),gstack-egress grantsrow,memorable-recallsink (fail-closed polarity in the wiring test;hosts/swept)../setup --no-teamkeeps the hook;gstack-uninstallremoves it by name and revokes the key wherever gstack's config lives, hook manager present or not.docs/memorable-workflow-memory.md(two consents, what gstack hands over and can attest, vendor claims attributed, runbook), README row + Docs row + privacy pointer, PROJECT_STRUCTURE.Hook manager (every gstack hook benefits)
gstack-settings-hook remove-sourceis identity-aware: removes the source's items whether or not Claude Code stripped the_gstack_sourcetag; other sources untouched; entries with nothing of ours byte-identical. Pinned for everyKNOWN_HOOKSsource.list-items --event E [--owned-by S] [--command-regex RE]: one JSON string literal per matching command, identity from the table, exit 3/4 fail-closed, filters intersect.Shared libraries
lib/redact-engine.ts: line/col by binary search over a lazily built line index. 256 KiB log-like prompt: 1,573 ms → 65 ms; 512 KiB: 6,182 ms → 126 ms (this box, main vs branch).lib/egress-receipt.ts: optionallockBudgetMsonwriteReceipt/writeOutcome(default unchanged, validated).lib/gbrain-repo-policy-client.ts:repoPolicyTier(url, env, timeoutMs).hosts/claude/hooks/spawn-bin.ts:runExternal(own process group killed on every resolve, resolve on exit with a stdout drain, deadline never rewrites a completed exit, stdout cap, drained stderr tail, stdin errors kept advisory,onSpawnkill handle, win32 refused).Follow-ups filed in TODOS.md: mediation seam for a second third-party hook, Windows support (D21), envelope
kind, payload-minimization ask to the vendor, latency measurement, resolver consolidation (D24), MEDIUM-tier hook policy,list-itemsat setup, one state-root rule for the bridge's stores, shared hook logging helper.Test Coverage
Coverage audit (Step 7, before generation): 95/135 paths (70%). The gap was closed with generated tests; the remove-source identity change is pinned for every source in the hook table (IRON RULE regression).
Tests: +133 new test cases across 13 test files (+1,900 lines). All bridge-related files green locally (5 passes of the flaky-prone cases, nonce-scoped orphan checks).
Pre-Landing Review
Review army (testing, maintainability, security, performance, simplification, red team) ran three cycles; the loop hit the 3-cycle bound with cycle 3 still applying fixes (each cycle found new defects in the previous cycle's fix code, none reappearing), so the outside-model passes below served as the final read.
list-itemstwice; prose-grepping the hook manager's output; shared hook logging helper filed; duplicated test scaffold; disable mismatch branch). Critical fixes: vendor timeout with empty stderr never logged;runExternalwaited oncloseso a vendor that exited but left a helper holding pipes read as a timeout; redaction scan superlinear in match density;repoPolicyTier10 s spawn outside the hook clock; system-widepsgrep in the orphan test.LC_ALL=Cand anchored not-a-repo check; multi-key rate limiter; format-character stripping; stale-lock take-over falls through to the give-up;disablewithoutgstack-config; ledger size instatus. Investigate-only, documented: vendor runs in the session cwd (by design); state-root precedence differs across libs (filed).Fix-First decisions were taken autonomously (spawned-style run in a Conductor workspace, no human in the loop); every skip is listed above.
Design Review
No frontend files changed — design review skipped.
Eval Results
bun run eval:bg(diff-selected;hosts/claude/hooks/**andbin/gstack-configare touchfile deps of the plan-tune-cathedral E2E tests): 50 pass, 408 skip, 0 fail. Log:~/.gstack-dev/eval-runs/evals-gstack-kingstown-20260909-023537-121877.log.Adversarial Review
Cross-model synthesis: agreed by more than one source and fixed: close-vs-exit containment gap, GIT env/locale weaknesses in the policy lookup, brace-bearing banners, lock reclaim races, uninstall revocation placement, empty-override parity. Unique to Claude structured review: redaction scan cost,
repoPolicyTiertimeout, stderr withholding. Unique to Codex: walk-exhaustion refusal, whole-tail scan before crop, setsid boundary.Plan Completion
Plan:
~/.claude/plans/system-instruction-you-are-working-eager-hopcroft.md(approved). Step 8 audit: 45 of 50 checklist items complete at audit time; the 3 PARTIAL items were closed during the ship (per-source remove-source regression for every KNOWN_HOOKS source; list-items combined filters; gbrain backend note and settings-rewrite race in the doc). Deferred by decision:enabledecomposition into ≤5-branch helpers (structure only; behaviour covered), and the plan's pre-ship manual acceptance run with the real memorable-cli (AD15), which needs a maintainer's Mac and a Memorable account: not performed here, so the PR does not claim the end-to-end recall loop was observed live. Plan said v1.82.0.0; shipped as v1.83.0.0 because #2832 and #2835 already claim v1.82.0.0 and v1.82.1.0.Verification Results
Skipped: no server-backed verification section in the plan; behaviour is pinned by the free suite.
TODOS
No TODO items completed in this PR. Ten follow-ups filed under "Memorable bridge follow-ups".
Documentation
CLAUDE.md: added the Memorable bridge's per-promptmemorable-recallhand-off to the enumerated fail-closed egress sinks (brain-sync, memory-ingest, gbrain-sync, telemetry, ngrok tunnels, mcp-verify, supabase-provision), matching the polarity pinned intest/egress-receipt-wiring.test.ts.ARCHITECTURE.md: same addition in the "Egress receipt ledger" section, with a link todocs/memorable-workflow-memory.md.docs/PROJECT_STRUCTURE.md(new hook + bin),docs/memorable-workflow-memory.md(new guide, reachable from README),agents-digest/gstack-AGENTS.md(v1.83.0.0 header). VERSION v1.83.0.0 matches the top CHANGELOG entry and package.json.Documentation Debt
gstack-settings-hook list-itemshas reference coverage (CHANGELOG, one example in the Memorable guide) but no explanation of when a caller should prefer it overlist-sourcesoutside that guide (explanation quadrant).runExternal(hosts/claude/hooks/spawn-bin.ts),lockBudgetMsonwriteReceipt/writeOutcome, and therepoPolicyTierspawn timeout are documented only in CHANGELOG; contributor-facing how-to for writing a hook that runs a third-party executable would fill the how-to quadrant./document-generatecan fill both.Consider the
docs-debtlabel.Test plan
bun run test: 9,116 tests across 90 files (6 shards), 25 failing, all pre-existing (evidence ledgerlabel=tests, log~/.gstack/projects/garrytan-gstack/logs/2026-09-09T04-01-00-151Z-tests-740176-3e71206a.log). The 25 failing cases are pre-existing and environmental, identical on pristineorigin/mainin this sandbox (team-mode 15, session-update-autostash 7, handoff 3:git commitrefusing in the sandbox and no headed browser); none touch files this branch changed.test/memorable-user-prompt-hook.test.ts(59),test/gstack-memorable.test.ts(37+),test/gstack-settings-hook-schema-aware.test.ts,test/uninstall.test.ts,test/egress-receipt*.test.ts,test/redact-engine*.test.ts,test/gbrain-repo-policy-client.test.ts,test/hooks-windows-paths.test.ts,test/verify-gate.test.ts,test/setup-hook-canonical-paths.test.ts,test/gstack-egress-cli.test.ts,test/gstack-config-memorable-key.test.ts: all green.northwind-traders.comaddresses), the project's regression corpus.memorable-cli(login, enable,gstack-memorable enable, a repeated task): not run in this environment.🤖 Generated with Claude Code
Open workspace in Conductor