Skip to content

test(messaging): hold live waits for the MCP concurrency bound - #8851

Merged
lidge-jun merged 1 commit into
lidge-jun:devfrom
luvs01:test/mcp-wait-bound-barrier-20261117
Nov 17, 2026
Merged

lidge-jun merged 1 commit into
lidge-jun:devfrom
luvs01:test/mcp-wait-bound-barrier-20261117

Conversation

@luvs01

@luvs01 luvs01 commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Hold each of four logical codex_wait_reply operations at its first reply RPC before asserting that a fifth operation is rejected as busy. Counting completed metadata reads could include repeated snapshots or operations that had already released their slots.
  • Verify four distinct live helpers and four unsettled promises, then disconnect and verify that every wait settles, no additional RPC is issued, and the observed helpers exit.
  • Keep the runtime's four-operation limit, deadlines, and platform guard unchanged. This test-only follow-up addresses the concurrency assertion seen in CI job 133486103455.

Verification

  • bun run typecheck: passed, 2,562 files.
  • bun run structure:check and bun run privacy:scan: passed.
  • Inspected the wait lifecycle and fixture together: the new barrier holds the first reply RPC for each logical wait, and the assertions check that those operations remain pending.
  • Linux CI 43927823740: the updated concurrency/disconnect case executed and passed. The affected test groups completed with 84 passes / 334 assertions and 9 passes / 85 assertions.
  • The CLI MCP suite retains its Windows skip. The full local suite was omitted on the shared Windows host; the affected POSIX runtime checks were executed by Linux CI.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Summary by CodeRabbit

  • Tests
    • Expanded coverage for concurrent MCP waits, verifying that four waits can remain active, additional waits are rejected at the limit, and disconnects settle pending requests.
    • Updated queue test scenarios to keep the initial reply pending until disconnection, covering behavior in both relevant wait modes. These changes strengthen validation of concurrency limits and disconnect handling without changing user-facing functionality.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The MCP wait-concurrency test now blocks four requests at reply RPCs, verifies that a fifth request is rejected while those requests remain active, and checks that disconnect settles all four.

Changes: MCP wait concurrency

Layer / File(s) Summary
Blocked wait concurrency check
tests/helpers/messaging-mcp-queue.ts, tests/cli/cli-message-mcp.test.ts
The fixture holds reply RPCs in the wait-bound barrier mode. The test confirms that four waits remain active, a fifth is rejected, and disconnect settles the pending requests.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related PRs

  • lidge-jun/opencodex#8090: Adds the codex_wait_reply operation and its four-slot concurrency limit, which this test exercises.

Suggested reviewers: hojooonkim

Merge Risk: Minimal · up to 35200

This change only tightens a test for the MCP concurrency limit and does not alter production behavior. It carries little merge risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the test-only change: holding live waits at the MCP concurrency bound. The raw summary confirms the test now holds four waits at their first reply RPC, checks a fifth is rejected, and …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the test-only change: holding live waits at the MCP concurrency bound. The raw summary confirms the test now holds four waits at their first reply RPC, checks a fifth is rejected, and verifies disconnect settles all four. The title matches the main change and is specific enough for a reviewer scanning history.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • 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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 5b864ad and 3520078.

Files selected for processing: 2

  • tests/cli/cli-message-mcp.test.ts
  • tests/helpers/messaging-mcp-queue.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@lidge-jun

Copy link
Copy Markdown
Owner

Maintainer integration into dev under MAINTAINERS.md (not an approving review), 2026-11-17 triage round.

@lidge-jun
lidge-jun merged commit 75d9fc1 into lidge-jun:dev Nov 17, 2026
36 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants