fix(cdp): guard stale reconnect completions#1106
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
…output On macOS-22 CI, the in-process test harness intermittently captures a prior worker's leaked console.error block into stdout. JSON.parse on the raw stdout then throws "Unexpected token 'c', ' console.er'" and the revoke/rotate tests fail. Add an `extractJsonArray` helper that scans stdout line-by-line for the single line that begins with '[' and parses as a JSON array — the CLI only ever emits one such line — and use it in the `list --json`, `revoke`, and `rotate` tests. Resolves the macOS-22 failure on PR #1106.
Merge rationale (automated review pass)Intent. Post-merge hardening for #95: prevents a stale Why this is correct, not just plausible.
Collateral test fix. CI. 9/9 build-and-test jobs green across Risk. Low. Change is bounded to Merging now. |
Progress / Review status
Auto-refreshed 2026-05-13 — owner comments cleaned up to reduce review noise.
fix/pr95-stale-reconnect-main→mainb9f8a1d— Merge branch 'main' into fix/pr95-stale-reconnect-mainOwner comment cleanup: 0 issue + 0 inline review comments deleted. Outstanding feedback from automated/external reviewers above is unchanged.
Summary
connect()/connectInternal()completions cannot overwrite a newerforceReconnect()browser.Validation
npm ci(prepare build passed)npm run buildnpm run lint(passes with existing warnings insrc/core/perception/image-features.ts)npm test -- --runTestsByPath tests/src/cdp-connect-coalescing.test.ts --runInBand(14/14 passed)Notes
npm test -- --runInBandwas attempted locally but exceeded the 10 minute runner limit and exposed unrelated existing failures/timeouts intests/tools/computer.test.tsandtests/hints/hint-engine.test.ts; this PR does not touch those areas.