mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-16 13:03:31 +08:00
The local main sync exposed a flaky WsBridge integration test during coverage: the client-side open event could resolve before the test's server-side connection array observed the connection. The test now waits for the server connection event before sending messages through the captured socket, preserving the FIFO behavior assertion without changing production bridge logic. Constraint: Worktree validation must cover the latest local main commit before merging back Rejected: Retry the full quality gate without a code change | the same timing race can recur and hide real merge readiness Confidence: high Scope-risk: narrow Directive: Keep WsBridge integration tests synchronized on server-side connection readiness before using captured sockets Tested: bun test adapters/common/__tests__/ws-bridge.test.ts Tested: bun test --coverage --coverage-reporter=lcov --coverage-reporter=text --coverage-dir /tmp/cc-haha-adapters-coverage adapters