Skip to content

test(claude): give native passthrough success paths the internal header deadline - #7951

Merged
lidge-jun merged 1 commit into
devfrom
fix/native-passthrough-header-deadline
Oct 29, 2026
Merged

lidge-jun merged 1 commit into
devfrom
fix/native-passthrough-header-deadline

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

tests/claude-integration/claude-native-passthrough.test.ts gave every case a 250ms upstream header deadline through cfg() (connectTimeoutMs: 250). Only one case needs it: an upstream that never sends headers logs the header timeout as the reason. Every success-path case returned 504 whenever the local mock upstream took longer than 250ms to answer under load. It surfaced as Native force/picker alias … preserves native passthrough on both Messages endpoints (Expected 200, Received 504) in #7884's full-suite test changed job (run 40827330816), and in a local run during the #7913 merge. #7946 had already worked around the same deadline for the stall and byte-cap fixtures, on Windows only.

This makes INTERNAL_DEADLINE_MS the fixture default. The header-timeout case now asks for 250ms explicitly through nativeFailureRow's existing overrides parameter, and the Windows-only override from #7946 is removed because the default now covers it. No assertion or product code changes, and the header-timeout case still asserts the 504 and its diagnostic.

Verification

Windows x64, OCX_TEST_NO_QUEUE=1:

  • Red, with the mock upstream temporarily answering after 300ms to simulate a loaded fixture (probe only, not committed): the 4 Native force/picker alias cases fail with Received: 504.
  • Same probe with this change: 4 pass / 0 fail.
  • Full file with this change: 72 pass / 0 fail, including an upstream that never sends headers logs the header timeout as the reason.
  • bun run typecheck: exit 0. tests/ci-workflows/file-size-ratchet.test.ts: pass.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed. N/A: test fixture only.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. N/A: no product code changes.

Summary by CodeRabbit

  • Tests
    • Updated integration-test timeout settings to use a consistent default across platforms. The header-timeout scenario continues to use a short, explicitly configured deadline. These adjustments affect test behavior only; no end-user-facing changes are included in this release.

…er deadline

cfg() applied a 250ms header deadline to every case, so slow local fixture answers became 504s in loaded full-suite runs. Only the header-timeout case now asks for 250ms.
@lidge-jun lidge-jun added the bug Something isn't working label Oct 29, 2026
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner October 29, 2026 06:30
@lidge-jun lidge-jun added the bug Something isn't working label Oct 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T06:32:47.746062Z eccc623 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 26224ad and eccc623.

Files selected for processing: 1
  • tests/claude-integration/claude-native-passthrough.test.ts

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

Walkthrough

The Claude integration tests now use INTERNAL_DEADLINE_MS as the default connection timeout. The header-timeout test sets a 250 ms deadline explicitly. The stalled-stream helper uses the same default on Windows and other platforms.

Changes: Claude integration-test timeout updates

Layer / File(s) Summary
Integration-test timeout defaults and overrides
tests/claude-integration/claude-native-passthrough.test.ts
The cfg default changes to INTERNAL_DEADLINE_MS. The header-timeout test sets a 250 ms deadline explicitly. The stalled-stream helper removes its Windows-only timeout override.

Priority: Low

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other

Suggested reviewers: ingwannu

Merge Risk: Minimal · up to eccc6

The timeout changes preserve the intended success, header-timeout, and body-stall test contracts, so the PR is mergeable.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title accurately describes the main change: applying the internal header deadline to native passthrough success paths in the Claude integration tests.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • 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

Comment @coderabbitai help to get the list of available commands.

@Ingwannu Ingwannu left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the complete one-file diff at eccc62393f00b4f5df37f817aa64cd98f5f4ec5b against the concrete #7884 failure (native-picker success response received 504 at line 261).

Using the existing INTERNAL_DEADLINE_MS for successful loopback fixtures, while passing connectTimeoutMs: 250 explicitly to the never-headers case, preserves the short-deadline negative control. Removing the now-redundant Windows-only stall override is consistent with that shared default. No routing/status assertions or product deadlines change.

The PR reports a Windows 300ms delayed-answer red/green probe (4 fail -> 4 pass), full-file 72 pass and type/size checks. Those are author-run receipts; I have not independently run this candidate or native Windows. This COMMENT records the source-level match to the observed failure, not passing CI on #7884 or approval to rerun/merge either PR. Keep the exact-head required checks and remaining review threads as the readiness boundary; #7884 remains blocked until its failure is actually resolved on a validated head.

@lidge-jun
lidge-jun merged commit 8131535 into dev Oct 29, 2026
34 of 36 checks passed
@lidge-jun
lidge-jun deleted the fix/native-passthrough-header-deadline branch October 29, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants