Skip to content

Redesign post-compaction ledger rebuild without a compaction hook #73

Description

@frap129

Question

The v1 compaction flow (experimental.session.compacting → rebuild Working-context paths + delivery-ledger identity) has no v2 hook equivalent. Redesign it on v2 primitives:

  • Candidate sources: events (session.next.compaction.started/delta/ended, session.compacted) and ctx.session.context({ sessionID }) reads at dispatch time.
  • Chosen posture (decided during charting): degraded-then-healed — after compaction, durable rules may re-append once while the ledger rebuilds lazily; document as known beta limitation.
  • Deliver: (1) pick the mechanism (event listener vs lazy rebuild at context-hook time), (2) implement ledger rebuild + Working-context projection from v2 message shapes, (3) update src/session/ modules (message-extraction, working-context) to parse v2 message/part shapes, (4) note the limitation in README + map when done.

Activity

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

Metadata

Metadata

Assignees

Labels

v2Part of the opencode v2 migration effortwayfinder:taskWork required to unblock a wayfinding decision

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions