Repository navigation
fix(client): report a store that cannot repair reopened rounds at start - #208
Merged
gregpriday merged 4 commits intoNov 19, 2026
Merged
Conversation
- A reopened row a 0.8.0 bridge left with no deadline, on a store without processedEventsOfType
- Check a store without processedEventsOfType in place, before any event of the pass is applied - Mark a store with no reopened question as reconciled; audit one whose reopened questions cannot be searched - Report not_supported on the bridge's error listener while any such question is open, before start() returns - Document what a custom store needs for the 0.9.0 repair in the README, the integration spec and the interface
…ore that cannot be read - Share one promise for the missing-history check instead of taking the inbox lock, so start() waits for the check alone - Make the check's audit best effort, and report a store read failure on the error listener - Cover a single start, a start beside a held pass, a failed read, and the fixtures each test names - Say in the docs that a new bridge repairs the rows, and when the bridge looks
- A caller the store reaches during the check joins it instead of starting a second one - Say the bridge looks as it starts or first applies events
gregpriday
deleted the
bugfix/issue-189-reopen-repair-is-skipped-for-stores
branch
November 19, 2026 14:05
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A 0.8.0 bridge kept the earlier round's deadline when it applied a reopen. 0.9.0 repairs those rows from verified history, but only through the optional
LocalStore.processedEventsOfType, and a store without it skipped the repair silently. A question asked with no deadline and reopened under 0.8.0 with a finite one then keeps a stalenull, and the relay's genuine expiry is refused asexpiry-without-deadline. Daintree'sDaintreeLocalStoredoes not implement the method.Without verified history the bridge cannot recover the signed deadline itself: an unsigned relay expiry must not close a round on the relay's word alone. So this takes the issue's second branch. The integrator is told at start, and the docs say what a custom store needs.
Resolves #189
Changes
Inboxchecks a store withoutprocessedEventsOfTypebefore a pass applies any event. It used to mark the repair done in memory.rounds-reconciled, as a searched store would be, so fresh installs are never warned.rounds.unreconciled/store-without-historyand leaves the store unmarked. The repair then runs on the first bridge whose store implements the method.BridgeError('not_supported')naming the method onbridge.on('error'), once per bridge. A store read failure during the check is reported there too, and the check runs again a minute later.DecisionsBridge.start()waits for that check before the socket, polling or pump start, so the error has fired by the timestart()returns. A second concurrentstart()also waits for it. The check is one shared promise, not the inbox lock, sostart()never waits behind a pass blocked on a terminal write. Stores that have the method still start the background repair from the first event pass.applyExpiredis unchanged. A guard that refuses expiries of unrepaired rounds was considered and left out. On a store without the method, rounds reopened by 0.9.0 itself look the same as legacy ones, so the guard would refuse their genuine expiries after a restart.packages/client/README.md,docs/daintree-integration-spec.md(section 7) and theLocalStoreJSDoc now say:processedEventsOfTypemust return;start(),catchUp()orsync();Testing
packages/client/tests/expiry-rounds.test.tshas eight new tests for a store without the method. The first five failed ondevelopbefore the fix.start()returns, and a concurrent secondstart()waits for it, with one report in total.start()resolves while an inbox pass is held on a hanging directory lookup. This test times out if the check takes the inbox lock again.restarthelper now takes the bridge's live clock, so a copy of the test env no longer freezes time.expiry-rounds,expiry,store.prettier --checkon the changed files. No type check ran: the repo has no changed-files type check.Known and left open