Skip to content

fix(reporting): materialize paged status walks - #2032

Open
rachitm022 wants to merge 1 commit into
nextfrom
claude/issue-27247-status-snapshot-per-page
Open

rachitm022 wants to merge 1 commit into
nextfrom
claude/issue-27247-status-snapshot-per-page

Conversation

@rachitm022

Copy link
Copy Markdown
Collaborator

Why

Each outward reporting-status page rebuilt every ledger table for the account before applying its cursor. A 740-record account therefore repeated the same unpaged database work eight times and could exhaust the caller's ledger-walk budget.

What changed

  • Materialize the ordered status projection once on page 1 and serve continuation pages from bounded ordinal slices.
  • Add an optional status-walk participant implemented by the memory and PostgreSQL stores; third-party stores retain the full-snapshot path.
  • Persist PostgreSQL walk headers and ordinal records through migration 0012, with snapshot fencing, bounded TTL, and lock-safe cleanup.
  • Bump the reporting storage contract to 5 and document the future storage package release requirement.
  • Preserve ordering, cursor behavior, node budgets, the 100-issue cap, pre-change cursors, and byte-for-byte memory/PostgreSQL parity.

Verification

  • make lint
  • make typecheck-all
  • make test: 23,561 passed, 3,338 skipped, 10 deselected, 1 xfailed; six host-incompatible interop checks fail locally on macOS because they require Linux /etc/os-release or /proc
  • Focused status, cursor, contract, and public API tests: 62 passed
  • Docker-free PostgreSQL walk and migration tests: 15 passed
  • 740-record SQL-tracing regression verifies seven continuation reads of at most 100 ordinals and no unpaged ledger snapshot reads

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant