Skip to content

fix(catalog): preserve uncapped native maximum context windows - #7130

Merged
lidge-jun merged 5 commits into
devfrom
fix/7075-native-context-max
Oct 15, 2026
Merged

lidge-jun merged 5 commits into
devfrom
fix/7075-native-context-max

Conversation

@lidge-jun

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

Copy link
Copy Markdown
Owner

Summary

  • Preserve native OpenAI max_context_window when no configured hard limit narrows it: Astra keeps its 872,000 maximum alongside the 272,000 default. Share configured-limit validation and precedence between native accessors and catalog normalization, including preserved native rows without static metadata.
  • Keep per-model window > provider-window precedence, the provider cap as a ceiling, and existing effective-context/max-input/compaction budgets. Blame points to 07e6aeb41a, which added per-model window support; that invariant stays covered.
  • Preserve advertised maxima through strict normalization of retained account-selector native rows; ordinary routed rows still clamp to their effective window. Align discovery, build, restore, convergence and sync regression expectations with the corrected contract.
  • Add regression coverage and document the existing per-model option for the commenter's 500k/300k example. No GUI or configuration-schema expansion.

Closes #7075

Verification

  • bun run typecheck — passed.

  • bun test tests/codex-integration/catalog-native-max-context.test.ts — reproduced 16 failures before the fix; 26 passed after it.

  • bun test tests/codex-integration/catalog-native-max-context.test.ts tests/codex-integration/native-model-toggle.test.ts tests/codex-integration/codex-catalog.test.ts tests/providers/auto-compact-budget.test.ts — 408 passed, 0 failed. Updated existing assertions that encoded the erroneous maximum; compaction assertions remain unchanged.

  • bun test tests/test-layout.test.ts tests/test-layout-tooling.test.ts tests/ci-workflows/file-size-ratchet.test.ts — 36 passed, 0 failed.

  • bun run structure:check — passed after keeping the catalog doc within its existing budget.

  • bun run privacy:scan — passed.

  • cd docs-site && bun install --frozen-lockfile and bun run build — passed; 577 pages and 81,200 internal links checked.

  • bun run test:changed — attempted but executed no tests: queued for five minutes behind another worktree's user-scoped test lock (reported owner pid 48122), then stopped this lane's waiting command to avoid leaving a latent run. no lock bypass or other lane's processes were touched.

  • Resource exception: the full bun run test suite was deliberately not run because bundle-triage lanes share one 16-core machine. Focused regressions cover the changed behavior; broader Ubuntu coverage is left to PR CI. No macOS/Windows workflows dispatched.

  • Independent review round 1 (2f73663d4): bun run typecheck, bun run structure:check, bun run privacy:scan, and git diff --check passed.

  • Independent mutation proof: restoring both original source files from 7640a942b made bun test tests/codex-integration/catalog-native-max-context.test.ts fail 16/26 cases; restoring the fix passed 26/26. Before the selector-normalization fix, the corrected retained-selector integration assertion and new strict-normalization regression failed (2 failures / 48 cases); all four new normalization cases now pass, including unmarked, malformed and explicitly routed negatives.

  • Focused validation covered 621 tests across 16 files with every file passing in its final state. The combined command below passed 620 tests; one temporary review edit to an explicitly capped discovery expectation failed and was reverted. Re-running bun test tests/claude-integration/claude-models-discovery.test.ts passed all 13 cases. The other 15 files were unchanged after their successful results and were not rerun.

bun test tests/codex-integration/catalog-native-max-context.test.ts tests/codex-integration/configured-native-models.test.ts tests/codex-integration/gpt6-native-rows.test.ts tests/codex-integration/discovered-native-models.test.ts tests/codex-integration/gpt61-sol-rows.test.ts tests/codex-integration/codex-catalog-sync-hardening.test.ts tests/codex-integration/codex-convergence-account-selectors.test.ts tests/codex-integration/codex-catalog-restore.test.ts tests/claude-integration/claude-models-discovery.test.ts tests/codex-integration/native-model-toggle.test.ts tests/codex-integration/codex-catalog.test.ts tests/providers/auto-compact-budget.test.ts tests/test-layout.test.ts tests/test-layout-tooling.test.ts tests/ci-workflows/file-size-ratchet.test.ts tests/lab/core-lab-boundary.test.ts
  • Independent review did not run the full suite or test:changed, as requested for the shared machine. Broader coverage remains with Ubuntu PR CI; no platform workflows were dispatched. Draft state is preserved.
  • External contract checked against OpenAI's Codex configuration reference: active context-window and automatic-compaction settings are separate. Native capacity numbers remain based on the repository's pinned native metadata, separate from OpenAI API capacities; no live account-capacity probe was performed.

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. No security-boundary changes.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Oct 15, 2026
GOAT and others added 4 commits October 15, 2026 16:48
# Conflicts:
#	scripts/test-layout/layout.json
#	tests/fixtures/test-layout-expected.json
# Conflicts:
#	scripts/test-layout/layout.json
# Conflicts:
#	scripts/test-layout/layout.json
#	tests/fixtures/test-layout-expected.json
@lidge-jun

Copy link
Copy Markdown
Owner Author

Maintainer integration into dev (MAINTAINERS.md dev maintainer-integration policy; batch integration authorized by @lidge-jun on 2026-10-15).

  • Head: 566a933673451db6112a0099889f42d028c88533 (tree 0f3f8210919234687f62172f0c322e0c8a756086) = this branch merged with origin/dev 359d31b26c.
  • Exact-head evidence: GitHub-hosted Actions for this account have not been assigning runners since 2026-10-15 13:30 UTC, so by owner decision the evidence is a full bun run test (Bun 1.4.3 test runner, root and GUI dependencies installed, GUI built) of this exact tree on a maintainer host (macOS arm64): exit 1, 9 min, 4 failing test(s), each also failing in the same host's baseline run of dev 60bf4c7 (environment-only): a secondary ensure parent preserves shared Grok, Codex and Claude agent bytes, connected Desktop uses hub IDs across a cold restart (stored profile=false), live audio readiness and bounded closure > native open and non-readiness events cannot cla, update stops the running proxy before replacing files > npm launcher restarts the stopped .
  • Local gates on the same tree: bun run typecheck, file-size ratchet, test-layout and structure:check.
  • Hosted CI checks for this head may still be queued; they are not claimed as evidence.

@lidge-jun
lidge-jun marked this pull request as ready for review October 15, 2026 18:06
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner October 15, 2026 18:06
@lidge-jun
lidge-jun merged commit ccb9191 into dev Oct 15, 2026
3 of 4 checks passed
@lidge-jun
lidge-jun deleted the fix/7075-native-context-max branch October 15, 2026 18:06
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 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-15T18:09:01.855823Z 566a933 Draft marked ready
ℹ️ 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.

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.

1 participant