Skip to content

[Bug]: flaky passthrough-deferred-tools additional_tools stream case under full-suite load #7655

Closed as not planned

Description

@lidge-jun

Client or integration

Other

Area

Tools / MCP / web search

Summary

tests/responses/passthrough-deferred-tools.test.ts > "registered deferred catalog input items authorize calls > responses stream: Write declared via additional_tools" failed once under a full bun run test:changed run (2001 files, 380s, Bun 1.4.3, macOS arm64) and passes 38/38 in isolation on the same tree and on dev ceef488. The proxy logged upstream failure code=upstream_error and the stub upstream recorded zero requests (expect(upstream.seen).toHaveLength(1) received 0, line 242), so the request never reached the local stub; it looks like a load-sensitive connection/port race in the stub upstream rather than a tool-authorization defect.

Reproduction

  1. On dev ceef488 plus the Kimi pricing change (branch feat/kimi-pricing-and-ci-slim-261024, which only touches registry seeds/price rows), run OCX_TEST_RUNNER_BUN=<bun 1.4.3> bun run test:changed on a loaded machine.
  2. Observe the single failure above; rerun the file alone and it passes.

Version

dev ceef488

Operating system

macOS (arm64), Bun 1.4.3 test runner

Provider and model

stub upstream (test fixture)

Logs or error output

[opencodex] upstream failure code=upstream_error
error: expect(received).toHaveLength(expected)
Expected length: 1
Received length: 0
  at tests/responses/passthrough-deferred-tools.test.ts:242:33
(fail) registered deferred catalog input items authorize calls > responses stream: Write declared via additional_tools [76.02ms]
43390 pass / 110 skip / 1 fail

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

  1. added
    bug
    on Oct 24, 2026
  2. added
    tools
    on Oct 24, 2026
  3. lidge-jun commented on Oct 27, 2026

    @lidge-jun
    OwnerAuthor

    Investigation update: not reproduced. On current dev with Bun 1.4.4, tests/responses/passthrough-deferred-tools.test.ts passed 20/20 runs on Windows and 5/5 on Linux (WSL), each 38 pass / 0 fail / 352 assertions, including runs under parallel CPU load. A forced same-port reuse experiment delivered all 60 requests to the stub. The stub binds port 0 directly and keeps a per-instance request log, which rules out the reservation-gap and shared-log explanations. The original failure (macOS, Bun 1.4.3, full-suite load) has not recurred here; this stays open in case it does.

  4. lidge-jun commented on Oct 28, 2026

    @lidge-jun
    OwnerAuthor

    No recurrence: the case has not failed in any batched dev CI run since 2026-10-23. The nine ci.yml dispatches through 40617484699 show only unrelated failures. The earlier local runs (Windows 20/20, Linux 5/5, including runs under load) and the stub analysis still stand. Leaving this open in case it recurs; a failing run's job link and full test output would be the useful evidence.

  5. lidge-jun commented on Nov 3, 2026

    @lidge-jun
    OwnerAuthor

    Closing as not recurring. Since the last check (run 40617484699), tests/responses/passthrough-deferred-tools.test.ts has not failed in any of the 42 non-PR CI runs from 2026-10-28 to 2026-11-03 (40679924613 through 41627577767: dev batch dispatches, main pushes and the main schedule, across Linux, macOS and Windows shards). The earlier analysis also stands: the stub binds port 0 with a per-instance request log, and repeated local runs under load passed. If it fails again, please reopen with the job link and the full test output.

  6. github-actions commented on Nov 3, 2026

    @github-actions
    Contributor

    Automated translation bookkeeping — detected language: English.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtools

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions