Skip to content

test(web-search): isolate sticky selection from the header-timeout fixture - #9070

Merged
lidge-jun merged 3 commits into
lidge-jun:devfrom
luvs01:codex/isolate-combo-body-deadline-test
Nov 25, 2026
Merged

lidge-jun merged 3 commits into
lidge-jun:devfrom
luvs01:codex/isolate-combo-body-deadline-test

Conversation

@luvs01

@luvs01 luvs01 commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Use the normal header deadline for the web-search test that checks whether a late body timeout leaves the primary target's sticky success allowance intact. Its 120 ms body deadline, 2 s per-request guard, and required target order stay in place. Assert the second request's recorded provider and HTTP status before checking its response text so the next failure distinguishes initial selection from failover. The dedicated header deadline tests keep their 30 ms setting.

Verification

  • On Windows with Bun 1.4.4, all 29 tests in tests/web-search/web-search-local-deadline-provenance.test.ts passed (160 assertions).
  • In an isolated comparison, the original test passed normally. Giving the healthy second primary response a 60 ms header delay made the original fixture record primary 504 followed by backup 200. With this patch, the same mock recorded primary 200, and the next request went to backup as expected. The committed test has no artificial delay or global clock changes.
  • The failed check on #9068 ended with backup output on the second request. That run did not record its attempt sequence in the failure, so its precise cause is unconfirmed.
  • The repository typecheck (bun check --no-script --noEmit) passed for 2,691 source files. A separate strict check including the test file had the same four pre-existing diagnostics at the timer spy in both revisions and none in the new assertion.
  • Local validation focused on the affected test file. All requests used synthetic providers and an in-process transport. The full repository suite was not run locally.

Checklist

  • Scoped the change to one test fixture and its assertions.
  • The fixture still checks the visible prefix, timeout provenance, absence of target cooldown, and the primary → primary → backup sequence.
  • Reviewed the added diagnostics. They compare fixture provider names and HTTP statuses.

Summary by CodeRabbit

  • Tests
    • Updated coverage for backup body-stall deadline scenarios.
    • Added checks that the next request continues using the primary target and returns its response.

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Nov 23, 2026
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 85074e6 and b4c36c0.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The deadline provenance test adjusts its backup body-stall fixture and verifies that the request after a sticky body deadline uses the primary target and returns “primary answered.”

Changes: Deadline provenance test

Layer / File(s) Summary
Configure and verify sticky body deadlines
tests/web-search/web-search-local-deadline-provenance.test.ts
The fixture omits connectTimeoutMs for backup body stalls while retaining HEADER_MS for other cases. The sticky deadline test checks that the next request records only a successful primary attempt and returns “primary answered.”

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

Change: Other

Merge Risk: Minimal · previous review af875

This change only updates a test fixture and its assertions, so it does not alter product behavior. No actionable merge risk was found.

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 scope (web-search) and the main change: the sticky-selection test now uses a fixture without the header timeout, isolating sticky selection from the header-timeout behavior. T…
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 scope (web-search) and the main change: the sticky-selection test now uses a fixture without the header timeout, isolating sticky selection from the header-timeout behavior. The summary and objectives confirm the fixture change for the sticky body-deadline test, so the title is specific and related to the main change.

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 9e0e298 and af87581.

Files selected for processing: 1

  • tests/web-search/web-search-local-deadline-provenance.test.ts

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

@lidge-jun

Copy link
Copy Markdown
Owner

Maintainer integration into dev (MAINTAINERS.md, maintainer-integration path), under the coordinator's relaxed behind-dev gate.

  • Exact head: b4c36c0eb71c69801e41814ba4deb3035d0070e7.
  • PR checks passing on that head: enforce / enforce-target, ci, test changed, storage policy, api usage, gates, hygiene / hygiene, enforce / resolve-pr, changes, select windows runner, label / label. Skipped jobs are not counted as passing.
  • Relaxed gate: (a) 3 commits behind origin/dev 3ec89d2 (limit 10): PASS. (b) git merge-tree --write-tree 3ec89d2 b4c36c0: clean. (c) dev commits since merge-base 8961476 touch none of this PR's files: yes; shared-class files dev touched: scripts/test-layout/layout-server-inbound.json tests/fixtures/test-layout-expected.json ; shared-class files this PR touches: none (guards below decide when both sides touch a class). (d) temporary local merge b5fe695a3c2dff664ac0c1d1726deb0145747e0a: bun run typecheck exit 0; bun test --timeout 60000 [focused: tests/web-search/web-search-local-deadline-provenance.test.ts] [guards: tests/test-layout.test.ts tests/test-layout-tooling.test.ts tests/ci-workflows/file-size-ratchet.test.ts tests/ci-workflows/skill-ocx.test.ts]: 82 pass 0 fail exit 0; bun run structure:check exit 0: PASS.
  • Independent review (gpt-6.1-terra): APPROVE, no findings. The change keeps the body-timeout, cooldown and primary/primary/backup assertions and adds an attempt-level provider/status assertion; the header-deadline cases keep their 30 ms deadline. This is the flake that failed perf(m365): reuse parsed tool ranges in completed answers #9068's test changed.
  • scripts/ci/assert-mergeable-review.sh --maintainer-integration 9070: OK.

@lidge-jun
lidge-jun merged commit c3aa113 into lidge-jun:dev Nov 25, 2026
27 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