Skip to content

fix(test): gateway rig setUp redials a worker whose first dial failed - #2099

Merged
V3RON merged 3 commits into
mainfrom
bug/2097
Dec 3, 2026
Merged

V3RON merged 3 commits into
mainfrom
bug/2097

Conversation

@V3RON

@V3RON V3RON commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2097

Status

Implement: fix done Review: fix-check at a92a139, passed Hardware: n/a Gate: not run
Next: finish the PR body, then the gate
Ledger:

  • R1, code, fixed. Evidence: untilRead moved fake clocks mid-test and broke delayed-dial tests at gateway-front-reconnect.test.ts:412-436 and :271-305. Impacts: behavior and test-logic. Fix a92a139ae: untilRead takes redial = false, and only setUp passes true (test-gateway.ts:345, :361). Verified by the code lens at a92a139ae. With true removed at :345, the flaky: gateway-handover.test.ts B10 open test sees no connected worker within 10 s on the Windows unit job #2097 repro fails with expected undefined to be 'connected'. As committed, it passes. gateway-rig-redial 1/1, gateway-front-reconnect 19/19, gateway-handover 12/12, gateway-front-restart 7/7 and gateway-front 18/18 passed.
    State: {"issue":2097,"branch":"bug/2097","pr":2099,"last":"62477f776d89","done":"review","mode":"fix","built":1,"audited":true,"assessment":"complete","rounds":["1:e92308ad3a6e49fb4022a1cc0df65317e4eb1068","fix-check:review:a92a139aefe813cc1ec4fc8c2aed4a341d738743"],"round":"fix-check","commit":"a92a139aefe813cc1ec4fc8c2aed4a341d738743","checkedBase":"b2dd634ee44eaac6a0558014f590127bc72efd86","reviewBase":"b2dd634ee44eaac6a0558014f590127bc72efd86","lenses":1,"findings":"/var/folders/tb/j39z273s5kn7lb9tz1dhk8l00000gn/T/review-2099.T80zie/findings.json"}

Assumptions

none

Done when

  • The worker is connected within 10 s, and the test passes on every run — src/agent-device/gateway-rig-redial.test.ts refuses a worker's first uplink dial and passes; with the untilRead redial clock advance removed it fails with the CI error expected undefined to be 'connected' (probed in audit and fix-check)

Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 1 blocking, 1 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 1. Tokens: 1.4M.
Runs: 9. Cost USD: 1.5414. Agent seconds: 917.

Assessment: complete

Written by an agent.

@coderabbitai

coderabbitai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 44 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: a81be394-714b-483f-b94e-75354bf1625a
Commits

Reviewing files that changed from the base of the PR and between b2dd634 and a92a139.

Files selected for processing: 2

  • src/agent-device/gateway-rig-redial.test.ts
  • src/agent-device/test-gateway.ts
  • 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

@V3RON

V3RON commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: e92308a
Round fix-check: a92a139 review

Runs: 9. Cost USD: 1.5414. Agent seconds: 917.
Tokens input 138, output 34950, cache read 1630315, cache write 217655.
- build implementer: claude-sonnet-5-5 74 s $0.1097
- audit implementer: claude-sonnet-5-5 45 s $0.0797
- review 1 reviewer: claude-sonnet-5-5 228 s $0.0859
- review 1 spec: claude-sonnet-5-5 10 s $0.0544
- review 1 code behaviour: claude-opus-5-5 170 s $0.6322
- review 1 claims: claude-sonnet-5-5 18 s $0.0665
- fix 1 implementer: claude-sonnet-5-5 53 s $0.0936
- review fix-check reviewer: claude-sonnet-5-5 188 s $0.0828
- review fix-check code behavior: claude-opus-5-5 131 s $0.3366
Finding outcomes: {"fixed":1}. Classes: {"testing 5":1}.
{"findings":[{"id":"R1","role":"code","class":"testing 5","outcome":"fixed","fix":"a92a139ae","path":"src/agent-device/test-gateway.ts:361","round":"1","detail":"shared wait moves unrelated fake clocks"}]}

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review December 3, 2026 20:38
@V3RON
V3RON merged commit 9280021 into main Dec 3, 2026
81 checks passed
@V3RON
V3RON deleted the bug/2097 branch December 3, 2026 20:46
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.

flaky: gateway-handover.test.ts B10 open test sees no connected worker within 10 s on the Windows unit job

1 participant