GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id: protocol v1 phase 4 — retention and compaction for the event store (#2036) · Issue #3797 · developing-today/code

id: protocol v1 phase 4 — retention and compaction for the event store (#2036) #3797

New issue
Copy link
New issue
Copy link
Closed
Closed
id: protocol v1 phase 4 — retention and compaction for the event store (#2036)#3797
Copy link
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)epic/id-programReprioritization program epic (2026-11-12)queue/blockedQueue or user escalation statesource/creatorFiled by the new-issue-creator jobstatus/blockedQueue or user escalation statetask/triageQueue packet kind: verify, reproduce, and route this itemwork/assignedQueue worker lifecycle state

Description

@dezren39
dezren39
opened on Nov 1, 2026
Issue body actions

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.

Activity

Next
  1. dezren39
    added
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Nov 1, 2026
  2. developing-today commented on Nov 1, 2026

    @developing-today
    developing-todayBot
    on Nov 1, 2026 – with developing.today
    Contributor
    More actions

    CODE-1536

  3. github-actions
    assigned
    dezren39
    on Nov 1, 2026
  4. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    on Nov 2, 2026
  5. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    🤖 Agent note · state: picked up

    • Agent: OpenChamber scheduled lane (repo-worker-code)
    • Session / ID: queue task 5787 (repo-health-code-pilot)
    • Found via: atomic queue claim
    • Task: Implement per-class event-store retention/compaction for live-class segments, preserving checkpoint residue, fork proofs, and waiting-pool resolution; durable classes remain untouched.
  6. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Nov 2, 2026
  7. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    🤖 Agent note · parked

    • Agent: OpenChamber scheduled lane (repo-worker-code)
    • Session / ID: queue task 5787 (repo-health-code-pilot)
    • Evidence: id: protocol v1 phase 4 — retention and compaction for the event store (#2036) #3797 remains OPEN with no PR; id: protocol v1 phase 1 — session header + segment checkpoint event kind (#2036) #3794 is OPEN and queue-parked, and main does not yet contain the event contract.
    • 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 .
    • Resume: Revalidate id: protocol v1 phase 1 — session header + segment checkpoint event kind (#2036) #3794 and main; proceed once the signed checkpoint event contract lands.
    • Links: id: protocol v1 phase 1 — session header + segment checkpoint event kind (#2036) #3794 · id: protocol v1 phase 4 — retention and compaction for the event store (#2036) #3797
  8. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    🤖 Agent note · parked (clarification)

    • Agent: OpenChamber scheduled lane (repo-worker-code)
    • Session / ID: queue task 5787 (repo-health-code-pilot)
    • Resume: The task is parked until id: protocol v1 phase 1 — session header + segment checkpoint event kind (#2036) #3794 lands the signed session.checkpoint event contract on main. The preserved branch is queue/5787-3797-event-store-retention and the worktree is /home/user/git/fleet/task-5787. No source changes were made.
  9. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    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.

  10. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    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.

  11. 140 remaining items

  12. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), OpenChamber scheduled lane (any-o)
    • Session / ID: task 19369
    • Found via: unfiltered atomic queue claim; lane any-o
    • Fresh state: id: protocol v1 phase 4 — retention and compaction for the event store (#2036) #3797 is OPEN, assigned to dezren39, no hard-stop labels, no open PR references it. Existing note records the exact per-class compaction scope and resume brief.
    • 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.
    • Links: id: protocol v1 phase 4 — retention and compaction for the event store (#2036) #3797 · task 19369
  13. dezren39
    added
    queue/blockedQueue or user escalation state
    status/blockedQueue or user escalation state
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Nov 17, 2026
  14. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    MemberAuthor
    More actions

    🤖 Agent note · blocked — packet defect

    • Agent: queue worker (repo-worker-code), OpenChamber scheduled lane (any-o)
    • Session / ID: task 19369
    • Fresh state: id: protocol v1 phase 4 — retention and compaction for the event store (#2036) #3797 is OPEN; no open PR references it. The existing note already captures the per-class compaction scope and resume conditions.
    • 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.
    • Links: id: protocol v1 phase 4 — retention and compaction for the event store (#2036) #3797 · task 19369
  15. dezren39
    removed their assignment
    on Nov 20, 2026
  16. dezren39 commented on Nov 23, 2026

    @dezren39
    dezren39
    on Nov 23, 2026
    MemberAuthor
    More actions

    🤖 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.
    • Premise check (fresh, 2026-11-23): id: protocol v1 phase 4 — retention and compaction for the event store (#2036) #3797 OPEN; prerequisite id: protocol v1 phase 1 — session header + segment checkpoint event kind (#2036) #3794 CLOSED 2026-11-03; no live claim (latest notes are 2026-11-17 parks); design doc on main.
    • Plan: laptop worktree off main; failing per-class tests first; implementation in pkgs/id/crates/id-events/src/event_store/; PR + merge once verified.
  17. dezren39 commented on Nov 23, 2026

    @dezren39
    dezren39
    on Nov 23, 2026
    MemberAuthor
    More actions

    🤖 Agent note · blocked — platform execution-risk flag (Lane JR, archer)

    • 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.
    • Premise (verified fresh before the flag): id: protocol v1 phase 4 — retention and compaction for the event store (#2036) #3797 OPEN and unimplemented; prerequisite id: protocol v1 phase 1 — session header + segment checkpoint event kind (#2036) #3794 CLOSED 2026-11-03; no live claim (latest prior notes are 2026-11-17 parks). Design: doc/2026-11-01_design_id2036.md §4.6 + rule 8, class table in doc/2026-10-29T10-45-00Z_investigation_ephemeral_live_data_retention §3/§7.
    • 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).
    • What's needed: Drew's plain-words go-ahead for this specific item — the id: protocol v1 phase 4 — retention and compaction for the event store (#2036) #3797 compaction slice in worktree ~/wt-lane-jr-3797 — after which the slice is ready to execute as scoped above.
  18. dezren39 commented on Nov 23, 2026

    @dezren39
    dezren39
    on Nov 23, 2026
    MemberAuthor
    More actions

    🤖 Agent note · takeover claim — Lane YO (archer, sandbox fix lane)

    • Adopting: Lane JR's orphaned claim on id: protocol v1 phase 4 — retention and compaction for the event store (#2036) #3797 (JR claimed 2026-11-23T07:03Z, then hit the platform execution-risk flag at checkout and went silent; hold record 7094037925 carries the prepared scope). Drew approved this item in the 2026-11-23 07:35 CST batch approval of the former flag holds.
    • Ownership check (fresh): issue OPEN, 43/43 comments read count-confirmed; newest comments are JR's claim + hold record — no other active lane claim.
    • Plan: execute JR's prepared scope verbatim in ~/wt-lane-jr-3797: event_store/compaction.rs with CompactionPolicy + EventStore::compact (one write transaction), durable-by-construction class table, compacted residue table, decide_in residue handling, per-class tests. Verify, PR, merge. id: protocol v1 phase 4 — retention and compaction for the event store (#2036) #3797 closes only if its acceptance criteria are fully met.
  19. dezren39
    added 2 commits that reference this issue on Nov 23, 2026

    id-events: retention and compaction for the event store (#3797)

    dedb93f

    Merge pull request #13400 from developing-today/lane-yo-3797

    9e5fd12
  20. dezren39 commented on Nov 23, 2026

    @dezren39
    dezren39
    on Nov 23, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done — Lane YO (takeover of Lane JR's orphaned claim, under Drew's 2026-11-23 07:35 CST batch approval)

    Landed: PR #13400, merge commit 9e5fd127e25c0895523d541a9438867042b87e5f.

    What JR left: the worktree and branch were gone and zero code had been written — nothing was lost. JR's prepared scope (hold record c.7104037925) was complete and was executed as designed, with two deviations, both deliberate:

    1. The residue stores the event's causal edges (backlink + after), not only its ID. The resolution's membership layer and causal order walk those edges; an ID-only residue would silently change verdicts in graphs where a group operation is reachable only through a compacted event's after list. With the edges kept, the resolution computes over exactly the graph it computed before compaction.
    2. One extra eligibility guard: an event carrying a membership action or a device operation never compacts (its effect lives in the group fold, not only in its bytes). This is in addition to JR's guards (durable-by-construction kinds, applied-only, below the retain frontier, never the head, no fork proof for the author, not a proof header, no waiting dependents).

    Acceptance, per the issue's own criteria:

    • Compaction tests per class — 10 new tests in event_store::compaction: durable kinds never compacted even when declared live; only policy-declared kinds compact; checkpoint events retained in a mixed chain; live events compact below the frontier and stay present + applied (idempotent second pass).
    • A compacted store still verifies chains and resolves fork proofs — the forked-author test (proof resolves after another author compacts; the forked author's own events never compact), the reopen test (chains, verdicts, proof, and check_invariants after drop + reopen), and a group-membership test (roster and new messages read through residue edges).
    • Durable-class events are never compacted — by construction in is_durable_kind plus the tests above.
    • Waiting-pool after resolution preserved — an event naming a compacted event in after is still accepted and applies; events with waiting dependents are ineligible; a rival at a compacted position is parked (no fork proof can be written from reclaimed bytes).

    Verification:

    • cargo test -p id-events on the laptop (nix develop in pkgs/id, sccache disabled): 365 passed, 0 failed (355 pre-existing + the 10 new), plus the crate's integration suites.
    • Fleet dispatch re-run at the final commit dedb93f63c9: session fp_5ffc8c4b6c0af43db58565b16a867022 succeeded (run 45202333579, Linux job ✓ 14m3s) — the full id-events suite in the fleet container.
    • cargo check --workspace --all-targets in pkgs/id: exit 0, zero errors.
    • Clippy (repo clippy.toml, pedantic): no findings in any touched file. The workspace clippy run still stops on pre-existing errors untouched by this change (9 expect() in id-store's lib; unwrap() in the append_list_state_machine integration test) — both present on main.
    • First dispatch (run 45195756688) failed on this lane's own compile errors (four test Node literals missing the new field; SeqNum is u32 in this workspace) — fixed and re-verified as above; recorded here rather than hidden.

    Follow-up filed: #13401 — audit prune_behind_cut and range-sync advertisement against compacted residue (both predate compaction and are residue-blind; graceful today, but composing prune with compaction needs a deliberate ruling).

    Closing this issue: its acceptance criteria are fully met by this landing.

  21. dezren39
    closed this as completedon Nov 23, 2026
  22. dezren39
    added a commit that references this issue on Nov 23, 2026

    feat(id-events): LocalEvents::compact — the node's retention seam (#5534

    631e7fd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/idPackage/app: id (pkgs/ or apps/ in this repo)epic/id-programReprioritization program epic (2026-11-12)queue/blockedQueue or user escalation statesource/creatorFiled by the new-issue-creator jobstatus/blockedQueue or user escalation statetask/triageQueue packet kind: verify, reproduce, and route this itemwork/assignedQueue worker lifecycle state

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.