Follow-ups from the v0.1.0 extraction reviews (final whole-branch review + fix-wave re-review, 2026-07-03). Spec: backant-kairos docs/superpowers/specs/2026-07-03-standalone-memory-mcp-design.md (incl. Amendment). Execution history: backant-kairos .superpowers/sdd/progress.md.
1. Roots-based per-session scoping for HTTP /mcp (the big one)
Today the daemon's HTTP /mcp serves a single global partition (repo="", legacy .index.db) because HTTP MCP sessions carry no cwd. Claude Code was moved to stdio registration (correctly repo-scoped); other-agent HTTP clients still get the global store.
Done when: on session initialize the daemon reads the client's declared roots, opens/caches the matching ns-*.db + repo key per session (fallback: global partition when no roots), covered by tests with two concurrent sessions on different fake roots seeing isolated memories; README/claude-md-section drop the global-partition caveat.
2. BACKANT_MEMORY_SYNC remote sync opt-in (spec D5, deferred)
provision.ts/credentials reader are already in-tree; nothing reads BACKANT_MEMORY_SYNC.
Done when: BACKANT_MEMORY_SYNC=1 + backant credentials → buildMemoryContext runs without forceLocal (embedded replica sync); default stays fully local; README env table updated; test covers the flag gate.
3. Hardening batch (small, one PR)
/digest context cache: Map<string, Promise<MemoryDb>> to close the concurrent-first-request fd leak (src/daemon/http.ts)
- Constant-time bearer compare (
crypto.timingSafeEqual, src/daemon/http.ts)
registerHook idempotency: structural check instead of JSON.stringify().includes() (src/install/hook-registration.ts)
- Supervisor tests: non-ok-status + JSON-parse branches of
siblingIsHealthy; assert log strings (tests/daemon/supervisor.test.ts)
- XML-escape
& in renderPlist interpolations (src/daemon/launchd.ts)
/digest catch: one-line stderr log instead of fully silent (src/daemon/http.ts)
- Fix wrong "cosine ... 0 (parallel vectors)" comments (should be 1) in
tests/daemon/http.test.ts + tests/hooks/session-start-recall.test.ts
install success message says "MCP at http://…" though Claude registration is stdio (src/cli.ts)
Done when: each lands with a covering test where behavior changes; suite green.
4. Prove the release pipeline on the next version
0.1.0 was published locally (registry rejected trust pre-create for a new package). Trusted publisher is now bound (repo backant-io/backant-memory, workflow publish.yml, env release).
Done when: npm version patch && git push --follow-tags && gh release create produces an Actions run that publishes with provenance; badge visible on npmjs.
Constraint
Schema remains FROZEN (SHA-256 pin 33fc94f3d5f6… tested in both repos) until backant-kairos consumes this package — see the paired kairos goal issue.
Follow-ups from the v0.1.0 extraction reviews (final whole-branch review + fix-wave re-review, 2026-07-03). Spec: backant-kairos
docs/superpowers/specs/2026-07-03-standalone-memory-mcp-design.md(incl. Amendment). Execution history: backant-kairos.superpowers/sdd/progress.md.1. Roots-based per-session scoping for HTTP /mcp (the big one)
Today the daemon's HTTP
/mcpserves a single global partition (repo="", legacy.index.db) because HTTP MCP sessions carry no cwd. Claude Code was moved to stdio registration (correctly repo-scoped); other-agent HTTP clients still get the global store.Done when: on session initialize the daemon reads the client's declared roots, opens/caches the matching
ns-*.db+ repo key per session (fallback: global partition when no roots), covered by tests with two concurrent sessions on different fake roots seeing isolated memories; README/claude-md-section drop the global-partition caveat.2. BACKANT_MEMORY_SYNC remote sync opt-in (spec D5, deferred)
provision.ts/credentials reader are already in-tree; nothing readsBACKANT_MEMORY_SYNC.Done when:
BACKANT_MEMORY_SYNC=1+ backant credentials →buildMemoryContextruns withoutforceLocal(embedded replica sync); default stays fully local; README env table updated; test covers the flag gate.3. Hardening batch (small, one PR)
/digestcontext cache:Map<string, Promise<MemoryDb>>to close the concurrent-first-request fd leak (src/daemon/http.ts)crypto.timingSafeEqual,src/daemon/http.ts)registerHookidempotency: structural check instead ofJSON.stringify().includes()(src/install/hook-registration.ts)siblingIsHealthy; assert log strings (tests/daemon/supervisor.test.ts)&inrenderPlistinterpolations (src/daemon/launchd.ts)/digestcatch: one-line stderr log instead of fully silent (src/daemon/http.ts)tests/daemon/http.test.ts+tests/hooks/session-start-recall.test.tsinstallsuccess message says "MCP at http://…" though Claude registration is stdio (src/cli.ts)Done when: each lands with a covering test where behavior changes; suite green.
4. Prove the release pipeline on the next version
0.1.0 was published locally (registry rejected trust pre-create for a new package). Trusted publisher is now bound (repo
backant-io/backant-memory, workflowpublish.yml, envrelease).Done when:
npm version patch && git push --follow-tags && gh release createproduces an Actions run that publishes with provenance; badge visible on npmjs.Constraint
Schema remains FROZEN (SHA-256 pin
33fc94f3d5f6…tested in both repos) until backant-kairos consumes this package — see the paired kairos goal issue.