Conversation
Add an opt-in SQLite-backed session-binding and processed-event store so ACP sessions survive harness restarts and duplicate relay event IDs produce one reply. Bindings store IDs and timestamps only. Testing: - cargo test -p buzz-acp session_store -- --nocapture - cargo test -p buzz-acp pool -- --nocapture - cargo test -p buzz-acp - cargo fmt --all --check - cargo clippy -p buzz-acp --all-targets -- -D warnings Signed-off-by: Kelcee Lari <kelcee.lari@gmail.com>
Address Fable PAN3-R1..R3 on the durable session store: worker-scoped binding keys, git-origin MCP env on session/load, and delete bindings on for-cause invalidate while keeping restart payload on AgentExited. Signed-off-by: Kelcee Lari <kelcee.lari@gmail.com>
Address Fable r2 PAN3-R1/R2: idle SwitchModel now removes channel bindings, and a fresh session/new retires every worker key for that channel before save_binding. Signed-off-by: Kelcee Lari <kelcee.lari@gmail.com>
Author
Pantheon / PAN-3 — merge assistance requestThis PR is the complete implementation for Linear PAN-3 (durable opt-in
Could a maintainer please review + merge (squash OK), or advise the preferred contributor path? Thanks — Syntropic/Pantheon integration is serial-blocked on this landing. |
Author
Follow-up: CI is waiting on maintainer workflow approvalRe-checked head
For first-time contributors from forks, GitHub often holds Actions until a maintainer clicks Approve and run workflows. After CI is green, a maintainer merge (squash OK) unblocks Pantheon PAN-3. Local verification already green: |
mfethe1
added a commit
to mfethe1/buzz
that referenced
this pull request
Aug 24, 2026
…hardening) Cleaned integration branch, not a raw PR head: - base: block#6682 SQLite/WAL store + durable processed_events dedupe - ported: block#6088 owner-only 0600/0700 perms + repair-on-open - 2 new regression tests assert file MODE (negative control: 7/2 fail without) Source branch: integration/session-store (based on origin/main f6e6617)
mfethe1
added a commit
to mfethe1/buzz
that referenced
this pull request
Sep 2, 2026
…WAL + processed_events) Base chosen over block#6088 on verified grounds: - block#6682 merges clean vs origin/main (merge-tree rc=0); block#6088 conflicts (rc=1) - block#6682 durably dedupes relay events (processed_events table); block#6088 leaves duplicate-after-restart unguarded (queue.rs untouched) - block#6682 has worker-slot keying (ContextKey::for_worker); block#6088 has a flat channel->session map with no worker discriminator Upstream base: f6e6617. PR head: c11e582 Signed-off-by: Michael Fethe <mfethe1@gmail.com>
mfethe1
pushed a commit
to mfethe1/buzz
that referenced
this pull request
Sep 2, 2026
…ed from block#6088) block#6682 opens the SQLite store with a bare Connection::open, leaving the DB at the process umask (commonly 0644 = world-readable). Bindings are not secrets but they name channels, agent pubkeys and workspace paths. Ported block#6088's permission discipline onto block#6682's SQLite base: - store directory created 0700 - database created 0600 BEFORE SQLite opens it, so its bytes are never briefly world-readable (SQLite derives -wal/-shm modes from the main file) - an existing loose-permission store is REPAIRED on open, so the fix reaches deployments created before this landed Two regression tests assert the MODE, not the content. block#6682's shipped session_store_file_contains_ids_only passes even when the file is world-readable, so it cannot catch this class of regression. Negative control: removing the hardening fails exactly these 2 tests (7 pass / 2 fail); restoring returns 9/9. Upstream base: f6e6617 block#6682 head: c11e582 block#6088 reference: session_store.rs:324 (0o600), :350 (0o700), :520-521 (test) Signed-off-by: Michael Fethe <mfethe1@gmail.com>
mfethe1
added a commit
to mfethe1/buzz
that referenced
this pull request
Sep 2, 2026
…hardening) Cleaned integration branch, not a raw PR head: - base: block#6682 SQLite/WAL store + durable processed_events dedupe - ported: block#6088 owner-only 0600/0700 perms + repair-on-open - 2 new regression tests assert file MODE (negative control: 7/2 fail without) Source branch: integration/session-store (based on origin/main f6e6617) Signed-off-by: Michael Fethe <mfethe1@gmail.com>
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
Adds an opt-in SQLite session-binding and processed-event store to
buzz-acpso a stored ACP session can survive harness restart, duplicate relay event IDs produce one reply, and invalid bindings are discarded instead of silently forking history.Default remains in-memory. Set
--session-store PATHorBUZZ_ACP_SESSION_STOREto enable. The store holds IDs and timestamps only.Closes PAN-3.
Why
Session maps lived only in memory. A restart always called
session/newand forked history. Event dedupe was also in-memory, so a re-REQ after restart could prompt twice.What landed
Branch
feat/PAN-3-session-storeon pinnedmain0720f5380ce8a6c050afac159f8462c06cd51ab5.Commits (DCO-signed):
5b3fdcd5bfeat(acp): add durable session binding storea18e48d13fix(acp): scope session bindings per worker and harden restorec11e582ecfix(acp): drop bindings on idle model switch and retire sibling keysHEAD:
c11e582ec17293f0036f4363e1b26d2fdde86c71Diff: 10 files, +2374 / -39,
crates/buzz-acpplus mechanical rootCargo.lock.New:
crates/buzz-acp/src/session_store.rscrates/buzz-acp/src/session_store/sqlite.rscrates/buzz-acp/tests/session_store_restart.rsChanged:
config.rs,acp.rs,pool.rs,lib.rs,queue.rs,Cargo.toml.Behavior:
session/loadonly when the adapter advertisesloadSession. Failure or missing capability deletes the binding and warns, then creates a fresh session.Verification
Independent gate:
cargo test -p buzz-acp session_store,cargo test -p buzz-acp pool,cargo test -p buzz-acp,cargo fmt --all --check,cargo clippy -p buzz-acp --all-targets -- -D warningsall exit 0 at 2026-08-24T10:17:02Z.This is a generic upstreamable seam. Hosts must pass a stable store path; Desktop/gateway launcher wiring is out of scope.