Skip to content

fix(cli): stop the concurrent credentials test failing under load - #621

Draft
PiquelChips wants to merge 1 commit into
mainfrom
fix/credentials-test-under-load
Draft

PiquelChips wants to merge 1 commit into
mainfrom
fix/credentials-test-under-load

Conversation

@PiquelChips

Copy link
Copy Markdown
Member

What and why

concurrent_credential_updates_preserve_every_login starts 16 threads that update the same credentials file at once. Each waits at most LOCK_WAIT (30 seconds) for the lock. On a heavily loaded machine, all 16 synced writes can take minutes, so the threads still waiting give up with "locked by another piquelctl" and the test panics.

Test builds now wait up to an hour (cfg!(test)). The test still proves that concurrent updates never lose a login, but it no longer depends on how fast the machine is. The CLI's real 30-second wait is unchanged.

Fixes PQD-164

Proof, at load 70–110: on main 5 of 10 runs failed. With this change 10 of 10 passed, taking 13–91 s. With the lock skipped in update_at, 3 of 3 runs failed with left: 1, right: 16.

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

@PiquelChips
PiquelChips force-pushed the fix/credentials-test-under-load branch from 46779b7 to 030e0c5 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