Skip to content

fix(cli): stop the account changes test timing out under load - #626

Draft
PiquelChips wants to merge 1 commit into
mainfrom
fix/account-changes-test-timeout
Draft

PiquelChips wants to merge 1 commit into
mainfrom
fix/account-changes-test-timeout

Conversation

@PiquelChips

Copy link
Copy Markdown
Member

What and why

account_changes_resolve_usernames_to_typed_requests failed under load because of its fake server, not because of the CLI's 2-second --timeout. account update syncs the renamed login to disk with two fsyncs. On a busy disk this took longer than the server's 10-second ACCEPT_TIMEOUT, so the server stopped listening and the next command (account delete) got "Connection refused".

The update now gets a fake server of its own, and the other changes go to one started after it, so the fsync no longer falls inside any server's accept window. The test checks the same requests and the same saved login. The harness, its ACCEPT_TIMEOUT fail-fast and the 2-second timeout are unchanged. The 2-second timeout never fired in about 150 runs at load 60–100.

Fixes PQD-168

Proof: on main under disk load (dd with fsync) at load 70, 15 of 24 runs failed, all with "accept timeout after 2 of 14" and Connection refused. With this change, 24 of 24 passed in the same setup, plus 25 of 25 at load 92–96 (slowest 22 s). With an 11-second sleep added after update, main fails the same way and this change passes.

Checklist

  • The feature reaches each surface in AGENTS.md it applies to,
    documentation included, with its reverse states. (Test-only change; no surface applies.)

Note

Written by Claude Opus 5.5 in Claude Code (via T3 Code)

@coderabbitai

coderabbitai Bot commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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.

Share

`account update` syncs the renamed login to disk. On a busy disk that
can take longer than the fake server's 10-second accept timeout, so the
server stopped listening and the next command got "Connection refused".
The update now gets a server of its own, and the other changes use one
started after it.
@PiquelChips
PiquelChips force-pushed the fix/account-changes-test-timeout branch from 43790d3 to 2f2b0da Compare November 22, 2026 22:12
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