Skip to content

fix: bound retained derived reads - #657

Merged
kevinswiber merged 3 commits into
mainfrom
fix/plan-0158-support-variable-limit
Jul 30, 2026
Merged

fix: bound retained derived reads#657
kevinswiber merged 3 commits into
mainfrom
fix/plan-0158-support-variable-limit

Conversation

@kevinswiber

Copy link
Copy Markdown
Member

Summary

  • replace oversized SQLite bind lists with a connection-local temporary support set
  • publish rebuild progress only after the complete JSON payload is durable
  • document the support-closure and progress-publication state machines
  • add regressions for retained-scale support sets and atomic progress visibility

Validation

  • just check (3,151 passed; 5 skipped)
  • focused derived-access regressions
  • repeated first-start publication stress (10/10)
  • retained-scale /api/revisions exercise on a 102,400-event store

Known performance characteristic

The unfiltered revisions route is now correct at retained scale, but it still hydrates historical events individually and remains expensive. This change deliberately fixes correctness and publication safety without changing response semantics.

Carry large support sets through a connection-local SQLite TEMP table instead of expanding one bind variable per selected event. Preserve removal-before-signature closure and document the ordering and immutability invariants at retained scale.
Write and sync progress metadata under an ignored temporary name before exposing the final JSON publication marker. Prevent concurrent Inspector status reads from classifying a partially written progress row as corrupt derived state.
@kevinswiber
kevinswiber merged commit 783ceea into main Jul 30, 2026
20 checks passed
@kevinswiber
kevinswiber deleted the fix/plan-0158-support-variable-limit branch July 30, 2026 05:59
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