Skip to content

fix(desktop): reject duplicate in-flight CDP IDs - #5086

Open
liuxiaocs7 wants to merge 1 commit into
apache:mainfrom
liuxiaocs7:fix/reject-duplicate-cdp-command-ids
Open

fix(desktop): reject duplicate in-flight CDP IDs#5086
liuxiaocs7 wants to merge 1 commit into
apache:mainfrom
liuxiaocs7:fix/reject-duplicate-cdp-command-ids

Conversation

@liuxiaocs7

Copy link
Copy Markdown
Member

Summary

Reject a duplicate CDP command ID while the original command is still in flight on the same WebSocket connection. This prevents the duplicate from overwriting the original pending entry, while preserving valid distinct IDs across sessions and allowing reuse after completion.

Fixes #5085

Verification

  • npm run lint
  • npm run format:check
  • npm run build
  • npm run typecheck
  • npx knip --workspace apps/desktop
  • npx knip --workspace packages/ui
  • node --test apps/desktop/dist/main/__tests__/cdp-bridge.test.js (21 passed)

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: OpenAI Codex diagnosed the race, implemented the guard and regression test, ran verification, and prepared this pull request under the contributor's direction.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

Prevent a second command on the same WebSocket from overwriting the pending entry for an active CDP command ID. Keep session routing intact and cover duplicate rejection, distinct IDs, and post-completion reuse.

Fixes apache#5085

Generated-by: OpenAI Codex
@github-actions github-actions Bot added the effort/S Under 100 readable lines label Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/S Under 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reject duplicate in-flight CDP command IDs on one connection

1 participant