Skip to content

test(provider): expect the 300 s Altimate Base header timeout set by #1260 - #1265

Open
anandgupta42 wants to merge 1 commit into
mainfrom
fix/provider-test-header-timeout-300s
Open

test(provider): expect the 300 s Altimate Base header timeout set by #1260#1265
anandgupta42 wants to merge 1 commit into
mainfrom
fix/provider-test-header-timeout-300s

Conversation

@anandgupta42

@anandgupta42 anandgupta42 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #1264

Type of change

  • Bug fix (test)

What does this PR do?

main's TypeScript job has failed since #1260 on one assertion in test/provider/provider.test.ts: the Altimate Base provider contract test still expects the openai loader's 10 s header timeout, while #1260 deliberately raised it to FREE_TIER_HEADER_TIMEOUT_DEFAULT = 300_000 (env-overridable via ALTIMATE_BASE_HEADER_TIMEOUT_MS) because the gateway can queue for capacity, cold-start, or reason before flushing headers. The assertion now expects 300_000 and its comment explains why the value is not OpenAI's default. One-line behavioural test change; no source change.

How did you verify your code works?

  • Read the failing job on main (run 34200104372): the only TypeScript failure is this assertion (Expected: 10000 Received: 300000); the other failures are the dbt-tools E2E ones fixed by fix(ci): validate cached dbt e2e environments; pin the uv venv to the system Python #1258.
  • Confirmed src/provider/provider.ts on main sets headerTimeout: freeTierHeaderTimeout() with default 300_000 and no env override in the test.
  • Not run locally against main's tree: this session's worktree is on another branch. The PR's own TypeScript job is the check.

Committed through the GitHub API from a fetched copy of main's test file.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

🤖 Generated with Claude Code


Note

Low Risk
Test-only change that documents and asserts existing provider timeout behavior; no runtime impact.

Overview
Fixes a TypeScript CI failure on main by aligning the Altimate Base provider contract test with behavior introduced in #1260. The assertion on base.options.headerTimeout now expects 300_000 ms (5 minutes) instead of the OpenAI loader’s 10 s default.

The updated comment documents why: Altimate Base can wait on queueing, cold start, or reasoning before response headers, so the default matches the SSE chunk watchdog and remains overridable via ALTIMATE_BASE_HEADER_TIMEOUT_MS. No production code changes—only the test expectation and comment.

Reviewed by Cursor Bugbot for commit bf18b8b. Bugbot is set up for automated code reviews on this repo. Configure here.


Summary by cubic

Fixes the failing TypeScript job on main by updating the Altimate Base provider contract test to expect the 300-second header timeout introduced in #1260, replacing the previous 10-second default assertion.

Written for commit bf18b8b. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Increased the default header timeout for the Altimate Base hosted model contract to five minutes, improving support for slower server-sent event responses.
    • Added support for overriding this timeout with the ALTIMATE_BASE_HEADER_TIMEOUT_MS environment variable.

…1260

#1260 raised FREE_TIER_HEADER_TIMEOUT_DEFAULT to 300_000 (the SSE chunk
watchdog's 5 minutes, env-overridable) because the gateway can queue,
cold-start or reason before flushing headers, but left the provider contract
test asserting OpenAI's 10_000. main's TypeScript job has been red since.

Closes #1264

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@cursor

cursor Bot commented Sep 8, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_f1df395d-6c7a-4d7b-88eb-ab1bc0bcd3db)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 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-09-08T08:02:47.001154Z bf18b8b 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.

@anandgupta42

Copy link
Copy Markdown
Contributor Author

Verified locally after all: applied the same one-line change on a checkout that contains main's provider.ts (#1260 merged), and test/provider/provider.test.ts passes: 88 pass, 0 fail. The PR body's "not run locally" line is superseded by this.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: fe4ba944-a107-45d9-ac3e-c56f6f1d0621

📥 Commits

Reviewing files that changed from the base of the PR and between 1388850 and bf18b8b.

📒 Files selected for processing (1)
  • packages/opencode/test/provider/provider.test.ts

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The provider test now expects Altimate Base’s five-minute header timeout. Its comment identifies the SSE watchdog default and the ALTIMATE_BASE_HEADER_TIMEOUT_MS override.

Changes

Provider contract validation

Layer / File(s) Summary
Align timeout assertion
packages/opencode/test/provider/provider.test.ts
The test expects base.options.headerTimeout to equal 300_000 and documents the SSE watchdog default and environment override.

Priority: ➖ Normal — Impact reflects medium issue severity.

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

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to bf18b

This updates the Altimate Base provider contract test to match its five-minute header timeout without changing runtime behavior. No merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the provider test update and the expected 300-second Altimate Base header timeout.
Description check ✅ Passed The description includes the issue, change type, implementation details, verification context, and checklist. The verification text conflicts with the checked local-testing item, but the description i…
Linked Issues check ✅ Passed The PR satisfies issue #1264 by updating the assertion from 10_000 to 300_000 and documenting the reason for the longer Altimate Base timeout.
Out of Scope Changes check ✅ Passed The changes are limited to the provider contract test assertion and its explanatory comment. No unrelated or production-code changes are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch fix/provider-test-header-timeout-300s
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/provider-test-header-timeout-300s

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

A rabbit checks the timeout line
Five minutes now makes the contract shine
The watchdog keeps its steady beat
An environment switch stays neat
Green tests hop along the route

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

@kilo-code-bot

kilo-code-bot Bot commented Sep 8, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • packages/opencode/test/provider/provider.test.ts

Reviewed by deepseek-v4-pro · Input: 26.8K · Output: 2K · Cached: 169.1K

Review guidance: REVIEW.md from base branch main

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bf18b8bba2

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// Base can queue for capacity, cold-start, or reason before flushing headers, so #1260
// set FREE_TIER_HEADER_TIMEOUT_DEFAULT to the SSE chunk watchdog's 5 minutes (env
// ALTIMATE_BASE_HEADER_TIMEOUT_MS overrides it; not set in this test).
expect(base.options.headerTimeout).toBe(300_000)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Isolate the default-timeout assertion from the environment

When the test runner inherits ALTIMATE_BASE_HEADER_TIMEOUT_MS (for example, a developer or CI job sets it to 600000 or off), freeTierHeaderTimeout() returns that override and this assertion fails even though the provider is behaving correctly. The comment only states that the variable is not set by this test; it does not remove the value captured from process.env. Clear the key from the instance's Env before calling Provider.list() so this test deterministically verifies the default.

Useful? React with 👍 / 👎.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 1 file

Re-trigger cubic

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: TypeScript red on main — provider test still expects the pre-#1260 10 s Altimate Base header timeout

1 participant