You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
id: protocol v1 phase 4 — retention and compaction for the event store (#2036) #3797
Phase 4 of the #2036 protocol v1 synthesis, from the #2034 investigation (§7): pkgs/id event_store today keeps every verified event forever (event_store/mod.rs:4-23 — no TTL/compaction/GC). Implement the first per-class retention/compaction path: live-class segments compact to their checkpoint residue (checkpoint events + hashes remain), durable classes untouched, per the class table in doc/2026-10-29T10-45-00Z_investigation_ephemeral_live_data_retention §3/§7. Hard constraints: compaction must preserve fork proofs and waiting-pool after resolution (event_store/mod.rs:12-22). Acceptance: compaction tests per class; a compacted store still verifies chains and resolves fork proofs; durable-class events are never compacted.
Disposition: Parked 30 minutes before implementation. The requested checkpoint residue format and class-aware compaction depend on id: protocol v1 phase 1 — session header + segment checkpoint event kind (#2036) #3794; implementing against the current free-form kind field would invent the wire/storage contract and risk conflicting with phase 1. No source changes; resume on branch in .
agent-note:v1 — holder: repo-worker-code (OpenChamber scheduled lane), at 2026-11-02T13:45:04Z. event: parked; task: 5787; queue: repo-health-code-pilot. Blocked on #3794's signed session.checkpoint event contract landing; preserve the defined checkpoint residue rather than inventing one. Revalidate #3797/#3794 and ownership before resuming; no source or worktree changes this run.
agent-note:v1 — triage (queue task 18266, openchamber scheduled lane code-g)
Verdict: still open and unimplemented. Fresh check of origin/main: pkgs/id/src has no event-store retention or compaction path (the only "compact"/"retention" hits are unrelated: Compact theme layout, currency compact_hash, timestamp formatting). Acceptance is not met.
This is real implementation work in pkgs/id (per-class compaction with fork-proof and waiting-pool after preservation), not a bounded triage fix, so I did not start it here. No follow-on packet was enqueued. Needs a scoped implement packet from the owner, after the 37-comment design thread is reconciled.
agent-note:v1
lane: repo-worker-code (openchamber-scheduled-lane code-j)
state: parked
Fresh state 2026-11-17: #3797 OPEN; the design doc doc/2026-10-29T10-45-00Z_investigation_ephemeral_live_data_retention is on origin/main. The fix is a per-class compaction path in pkgs/id/crates/id-events/src/event_store/mod.rs. It must preserve fork proofs and waiting-pool after resolution and never compact durable-class events. That needs a fresh worktree, failing per-class tests first, and CI, so it cannot be finished safely in this run. Parked with a resume brief for the next launch.
Next: resolve the task packet mismatch: this claim is typed small_fix but its acceptance is triage-only; block if the completion contract again requires implementation evidence.
Blocker: packet kind small_fix conflicts with triage-only acceptance; completion requires fix evidence (merged PR, commit, or verified closure).
Required correction: reclassify as triage or revise the acceptance to match the implementation work. Queue task blocked as packet_defect; no code changed.
🤖 Agent note · claimed — Lane JR (archer, sandbox fix lane)
Task: implement the first per-class retention/compaction path for the id event store (id: design: ID messaging/relay protocol v1 #2036 phase 4): live-class segments compact to checkpoint residue, durable classes untouched, fork proofs and waiting-pool after resolution preserved.
What happened: the laptop worktree for this item was created (~/wt-lane-jr-3797, branch lane-jr-3797, off origin/main a189f9ff178), but the exec result carrying the checkout came back flagged by the platform execution-risk check. Per the standing rule from the prior holds (fleet#89, code#10367, code#12977, code#8472 plugin.disabledTools), I did not read files into execution, run git/build/test commands inside the checkout, or edit anything. Drew's standing clone approval does not clear a per-item flag.
Prepared scope, ready to execute verbatim on approval (worked out from the store's current code, not yet written):
New event_store/compaction.rs in id-events: a CompactionPolicy (caller-declared live-class kinds + per-author retain_recent frontier) and EventStore::compact, running in one write transaction (atomic or no change).
Class table per id: investigate: ephemeral live data vs the chained event graph — retention and intermittent signing #2034 §3: durable by construction — group.*, document.*, tag.*, note.*, attestation.*, idset.*, device.*, media.*, identity, issuer.rotation, chat.anchor.v1, and session.checkpoint (design §4.6: checkpoint events are never deleted) can never be compacted, even if a policy names them live. Only policy-declared non-durable kinds (e.g. chat.message.v1, world.move) are eligible; unknown kinds are retained (fail-closed).
An eligible event is compacted only when it is applied, below the author's retain frontier, not the author's applied head, not named in proof_ids/proof_headers, not a dependency in waiting_by_dep, and its author holds no fork proof at all (a later fork below an existing point needs the stored bytes).
Residue: the event's events/bodies/groups rows are removed; its hashes row stays (that is what "checkpoint events + hashes remain" means mechanically — after resolution reads hashes), and a new lazily-gained compacted table (position → event ID, TAG_FOLD precedent, no format bump) records the residue.
decide_in learns the residue, mirroring the existing proof-header pattern ("present but never stored"): a rival arriving at a compacted position is parked (no fork proof can be written from dropped bytes, and the position is never overwritten); a backlink naming the compacted predecessor counts as linked.
Tests per class: durable kind never compacted (even when policy-declared live), live kind compacted below the frontier and retained inside it, checkpoint events retained even when declared live; a forked author's proof still resolves after another author compacts; an event naming a compacted event in after is still accepted (dependency resolution preserved); the author's next event still verifies and applies after compaction; reopen-the-store re-verification of all of the above.
Key code evidence for the shape: decide_in (ingest.rs) decides forks and backlinks from stored_at bytes, so bytes may only be dropped where the residue rules above hold; presence is hashes ∪ proof_ids (present_in, ingest.rs).
Activity
developing-today commentedon Nov 1, 2026
CODE-1536
dezren39 commentedon Nov 2, 2026
🤖 Agent note · state: picked up
dezren39 commentedon Nov 2, 2026
🤖 Agent note · parked
dezren39 commentedon Nov 2, 2026
🤖 Agent note · parked (clarification)
dezren39 commentedon Nov 2, 2026
agent-note:v1 — holder: repo-worker-code (OpenChamber scheduled lane), at 2026-11-02T13:44:59Z. event: picked-up; task: 5787; queue: repo-health-code-pilot.
dezren39 commentedon Nov 2, 2026
agent-note:v1 — holder: repo-worker-code (OpenChamber scheduled lane), at 2026-11-02T13:45:04Z. event: parked; task: 5787; queue: repo-health-code-pilot. Blocked on #3794's signed session.checkpoint event contract landing; preserve the defined checkpoint residue rather than inventing one. Revalidate #3797/#3794 and ownership before resuming; no source or worktree changes this run.
134 remaining items
dezren39 commentedon Nov 17, 2026
agent-note:v1 — triage (queue task 18266, openchamber scheduled lane code-g)
Verdict: still open and unimplemented. Fresh check of origin/main:
pkgs/id/srchas no event-store retention or compaction path (the only "compact"/"retention" hits are unrelated: Compact theme layout, currency compact_hash, timestamp formatting). Acceptance is not met.This is real implementation work in
pkgs/id(per-class compaction with fork-proof and waiting-poolafterpreservation), not a bounded triage fix, so I did not start it here. No follow-on packet was enqueued. Needs a scoped implement packet from the owner, after the 37-comment design thread is reconciled.dezren39 commentedon Nov 17, 2026
agent-note:v1
lane: repo-worker-code (openchamber-scheduled-lane code-j)
state: parked
Fresh state 2026-11-17: #3797 OPEN; the design doc doc/2026-10-29T10-45-00Z_investigation_ephemeral_live_data_retention is on origin/main. The fix is a per-class compaction path in pkgs/id/crates/id-events/src/event_store/mod.rs. It must preserve fork proofs and waiting-pool after resolution and never compact durable-class events. That needs a fresh worktree, failing per-class tests first, and CI, so it cannot be finished safely in this run. Parked with a resume brief for the next launch.
dezren39 commentedon Nov 17, 2026
🤖 Agent note · picked up
repo-worker-code), OpenChamber scheduled lane (any-o)any-osmall_fixbut its acceptance is triage-only; block if the completion contract again requires implementation evidence.dezren39 commentedon Nov 17, 2026
🤖 Agent note · blocked — packet defect
repo-worker-code), OpenChamber scheduled lane (any-o)small_fixconflicts with triage-only acceptance; completion requires fix evidence (merged PR, commit, or verified closure).packet_defect; no code changed.dezren39 commentedon Nov 23, 2026
🤖 Agent note · claimed — Lane JR (archer, sandbox fix lane)
afterresolution preserved.pkgs/id/crates/id-events/src/event_store/; PR + merge once verified.dezren39 commentedon Nov 23, 2026
🤖 Agent note · blocked — platform execution-risk flag (Lane JR, archer)
~/wt-lane-jr-3797, branchlane-jr-3797, off origin/maina189f9ff178), but the exec result carrying the checkout came back flagged by the platform execution-risk check. Per the standing rule from the prior holds (fleet#89, code#10367, code#12977, code#8472plugin.disabledTools), I did not read files into execution, run git/build/test commands inside the checkout, or edit anything. Drew's standing clone approval does not clear a per-item flag.doc/2026-11-01_design_id2036.md§4.6 + rule 8, class table indoc/2026-10-29T10-45-00Z_investigation_ephemeral_live_data_retention§3/§7.event_store/compaction.rsin id-events: aCompactionPolicy(caller-declared live-class kinds + per-authorretain_recentfrontier) andEventStore::compact, running in one write transaction (atomic or no change).group.*,document.*,tag.*,note.*,attestation.*,idset.*,device.*,media.*,identity,issuer.rotation,chat.anchor.v1, andsession.checkpoint(design §4.6: checkpoint events are never deleted) can never be compacted, even if a policy names them live. Only policy-declared non-durable kinds (e.g.chat.message.v1,world.move) are eligible; unknown kinds are retained (fail-closed).proof_ids/proof_headers, not a dependency inwaiting_by_dep, and its author holds no fork proof at all (a later fork below an existing point needs the stored bytes).events/bodies/groupsrows are removed; itshashesrow stays (that is what "checkpoint events + hashes remain" means mechanically —afterresolution readshashes), and a new lazily-gainedcompactedtable (position → event ID, TAG_FOLD precedent, no format bump) records the residue.decide_inlearns the residue, mirroring the existing proof-header pattern ("present but never stored"): a rival arriving at a compacted position is parked (no fork proof can be written from dropped bytes, and the position is never overwritten); a backlink naming the compacted predecessor counts as linked.afteris still accepted (dependency resolution preserved); the author's next event still verifies and applies after compaction; reopen-the-store re-verification of all of the above.decide_in(ingest.rs) decides forks and backlinks fromstored_atbytes, so bytes may only be dropped where the residue rules above hold; presence ishashes∪proof_ids(present_in, ingest.rs).~/wt-lane-jr-3797— after which the slice is ready to execute as scoped above.