Skip to content

Make session inventory work-bounded with indexed pagination #587

Description

@JAORMX

Part of #583. Depends on the bounded legacy reader; should consume v2 headers when available.

Problem

Session pagination bounds response size, not storage work. Each page re-enumerates, decodes, sorts, and filters the full store under a global mutex. The client then fetches every page.

Acceptance criteria

  • Add a derivative, rebuildable metadata catalog containing inventory-safe fields only.
  • Keyset pages perform work proportional to page size and never decode transcript histories.
  • Opaque cursors bind ordering, filters, and catalog generation; stale cursors fail explicitly.
  • External/shared-directory changes are detected or generation-validated.
  • Narrow locking so inventory for one session cannot block save/load/event append for another; preserve same-family ordering.
  • Startup stale-session reconciliation consumes the cheap metadata path, is cancellable, and cannot gate the first interactive inventory request.
  • Define and meet benchmark budgets using an 807-row/12-GB-equivalent fixture.
  • Unsupported/corrupt catalog state degrades honestly and rebuildably.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions