Skip to content

Keep paired library summaries consistent across overlapping refreshes - #357

Merged
bliatun-code merged 1 commit into
mainfrom
codex/order-host-summaries
Dec 1, 2026
Merged

bliatun-code merged 1 commit into
mainfrom
codex/order-host-summaries

Conversation

@bliatun-code

Copy link
Copy Markdown
Owner

Change

Paired clients now reserve a local sequence number before requesting a Host library summary. Successful responses advance the ordinary summary and the Dashboard stock projection independently. An older response that arrives last returns the saved result for its view. Hosts with second-resolution timestamps and older Hosts without Dashboard stock use the same ordering.

Saving the payload, its capture time and the publication sequence is one SQLite transaction. A later request that fails or is still outstanding does not block an earlier successful refresh. Switching targets clears the sequence metadata along with the offline copies.

Verification

  • npm run verify
  • npm run check:public-readiness
  • Database regressions cover equal timestamps, out-of-order completion, legacy Dashboard responses, rollback after a failed cache write and target replacement.
  • A loopback Host test checks both the returned rows and the offline copy, including an A–B–A switch while the response is in flight.

@bliatun-code
bliatun-code merged commit 51c866d into main Dec 1, 2026
10 checks passed
@bliatun-code
bliatun-code deleted the codex/order-host-summaries branch December 1, 2026 21:40
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