You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(account): let the list-migrate PC look at its clock only when the test moves it - #4863
server/account/list-migrate.contract.test.ts "a removal of a key the device handed over from that could not be kept is tried again, not skipped with the rest of its chain" failed on loaded runners: the check that the failed removal was still pending saw it already done.
The fixture moves the PC's clocks by hand (testTime, and settle calls list.tick()), but ListFollow still looked at the real clock every LIST_TICK_MS (5 s) with setInterval. When a test ran past 5 s, that real tick retried the removal between the test's pull() and its assertion.
createServer now takes accountListTickMs (like accountListMemberWaitMs beside it), passed to ListFollow as tickMs. 0 starts no interval, so only the test's settle looks at the clock. The list-migrate fixture sets it to 0. Production keeps LIST_TICK_MS. start() now guards on a started flag instead of the timer, since with tickMs: 0 there is no timer.
Evidence
Before (origin/main):
CI-like runner-image runs on old-desktop (integration with 4 shards beside the 4 browser groups): failed in 2 of 5 integration runs, each time after the test had run past 5 s (5494 ms, 5588 ms).
Focused and slowed (4 processes pinned to one CPU, --rerun-each 6): 2 of 24 failed with the same assertion. 8 processes pinned to one CPU, --rerun-each 4: 1 of 32 failed.
After (this branch):
8 processes pinned to one CPU, --rerun-each 4 (same run times, up to 5.2 s): 32 of 32 passed.
4 processes pinned to one CPU, --rerun-each 8: 32 of 32 passed.
The whole file 30 times: 30 of 30 runs, 33 pass / 0 fail each. server/account/list-follow.test.ts passes too.
Validation
Focused: the commands above.
bun run check fast in the CI runner image (herdr-ci-runner:local, uid 1001) on old-desktop: workflow syntax, generated types and themes, typecheck and build ok; unit 28829 pass, 1 fail. The one failure is server/account/device-journal.test.ts "G15: unanswered notice cap stops new list admissions without trimming open notices" timing out at ~32 s on that loaded host; it failed the same way on the other flake-fix branch and this PR does not touch it.
…e test moves it
The list-migrate fixture moves the PC's clocks by hand, but the account
list still looked at the real clock every five seconds. On a loaded
runner a test ran past five seconds, the real tick retried the removal
the test had just made fail, and the check that it was still pending
failed (2 of 5 CI-like integration rounds). createServer takes
accountListTickMs, passed to ListFollow as tickMs; 0 leaves the looks to
the test's settle, as the fixture already does.
Auto incremental reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
New Features
Account-list monitoring can now use a configurable refresh interval, or run without interval-based polling.
Bug Fixes
Improved monitoring reliability by preventing duplicate starts, including when interval polling is disabled. This helps keep account-list updates consistent across different server configurations.
ListFollow now supports a configurable clock-check interval and prevents duplicate starts independently of its timer. createServer exposes the interval setting, and the account-in-use contract test disables clock polling.
ListFollow tracks whether it has started. It uses the configured tickMs or LIST_TICK_MS, and skips interval creation when the selected value is nonpositive.
Server configuration and test setup server/index.ts, server/account/list-migrate.contract.test.ts
createServer forwards the optional accountListTickMs setting as tickMs. The accountInUse test sets the account-list tick interval to zero.
devswha/ovis#4594: Adds the PC-side signed-list follower that this change configures.
Merge Risk: Minimal · previous review 08a42
This change makes a flaky account-list migration test deterministic by letting the test disable real-clock polling. Production behavior is unchanged because the new option defaults to the existing five-second interval. Merge risk is minimal.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: a test-only fix in list-migrate so the ListFollow clock is only checked when the test moves it. It matches the changeset (tickMs option, accountListTickMs in createSer…
Description check
The description follows the template. It has a What section that explains the problem (real-clock retry during the test), the fix (accountListTickMs, tickMs, started flag), and a Validation section li…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: a test-only fix in list-migrate so the ListFollow clock is only checked when the test moves it. It matches the changeset (tickMs option, accountListTickMs in createServer, and the fixture set to 0). The title is specific and single-sentence.
Full details: Description check
Explanation
The description follows the template. It has a What section that explains the problem (real-clock retry during the test), the fix (accountListTickMs, tickMs, started flag), and a Validation section listing focused runs, the fast check command with its results, the one unrelated failure, and the browser tests that were not run. It does not link an issue, which the template asks for on feature changes; this is a flake fix, so that is a minor gap. The Change section also does not say why the started flag is needed in terms of the default path. The author describes the behavior and evidence clearly.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between 2c00789 and 08a4263.
Files selected for processing: 3
server/account/list-follow.ts
server/account/list-migrate.contract.test.ts
server/index.ts
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 1 remain after this review.
Merged through pr-merge at head 6691dc0ce. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit said it did not review (a limit or a skip) since this head.
Reviews on this head: omo gate (omo-native-code-reviewer) CLEAR and Codex adversarial (gpt-6.2-sol-fast, xhigh) CLEAR with LOW notes only; CodeRabbit reviewed it with no actionable comments. Merged by lane flake-sweep-1127 on the Dori lead's word.
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
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.
What
server/account/list-migrate.contract.test.ts"a removal of a key the device handed over from that could not be kept is tried again, not skipped with the rest of its chain" failed on loaded runners: the check that the failed removal was still pending saw it already done.The fixture moves the PC's clocks by hand (
testTime, andsettlecallslist.tick()), butListFollowstill looked at the real clock everyLIST_TICK_MS(5 s) withsetInterval. When a test ran past 5 s, that real tick retried the removal between the test'spull()and its assertion.createServernow takesaccountListTickMs(likeaccountListMemberWaitMsbeside it), passed toListFollowastickMs.0starts no interval, so only the test'ssettlelooks at the clock. The list-migrate fixture sets it to0. Production keepsLIST_TICK_MS.start()now guards on astartedflag instead of the timer, since withtickMs: 0there is no timer.Evidence
Before (origin/main):
--rerun-each 6): 2 of 24 failed with the same assertion. 8 processes pinned to one CPU,--rerun-each 4: 1 of 32 failed.After (this branch):
--rerun-each 4(same run times, up to 5.2 s): 32 of 32 passed.--rerun-each 8: 32 of 32 passed.server/account/list-follow.test.tspasses too.Validation
bun run check fastin the CI runner image (herdr-ci-runner:local, uid 1001) on old-desktop: workflow syntax, generated types and themes, typecheck and build ok; unit 28829 pass, 1 fail. The one failure isserver/account/device-journal.test.ts"G15: unanswered notice cap stops new list admissions without trimming open notices" timing out at ~32 s on that loaded host; it failed the same way on the other flake-fix branch and this PR does not touch it.