Skip to content

test(catalog): pin the custom-provider reasoning-summary opt-in (#1100) - #1274

Merged
lidge-jun merged 1 commit into
devfrom
codex/260808-1100-custom-optin-contract
Aug 8, 2026
Merged

test(catalog): pin the custom-provider reasoning-summary opt-in (#1100)#1274
lidge-jun merged 1 commit into
devfrom
codex/260808-1100-custom-optin-contract

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary

Pins the custom-provider half of the #1100 reasoning-summary contract, so PR #1119 can be closed without losing regression coverage.

The landed #1100 tests cover the built-in registry rows. They do not reach the custom-provider route, where an explicit modelSupportsReasoningSummaries opt-in has to survive the routed strip. Both existing custom-provider tests call buildCatalogEntries(null, ...), which takes the fallback branch and never runs normalizeRoutedCatalogEntry — so an ordering regression in the template path was invisible to every existing test.

That survival is ordering-dependent: normalizeRoutedCatalogEntry deletes the flag and applyCatalogModelMetadata restores it. Reverse them and every opted-in routed provider silently stops receiving reasoning.effort from Codex while the picker keeps advertising the ladder — the original #1100 symptom.

Three tests: the opt-in survives the template path, an absent opt-in stays conservative rather than claiming OpenAI-only summary delivery for an arbitrary endpoint, and the no-template fallback reaches the same answer by a different route (kept explicit so unifying the two construction paths is a visible change).

Supersedes the test portion of #1119, whose branch is ~1,800 commits behind dev. Authored originally there; preserved via Co-authored-by.

Verification

  • bun test tests/codex-catalog.test.ts — 132 pass / 0 fail
  • bun run typecheck — clean
  • Ablation: swapping normalizeRoutedCatalogEntry and applyCatalogModelMetadata fails the new opt-in test plus the landed built-in test (6 pass / 2 fail); reverting restores 8 pass / 0 fail

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.

Summary by CodeRabbit

  • Tests
    • Added regression coverage for reasoning-effort metadata across routed custom providers.
    • Verified that explicit reasoning-summary settings are preserved when supported.
    • Confirmed conservative behavior when summary support is not explicitly enabled.
    • Covered fallback behavior when no template is available.

The landed #1100 coverage pins the built-in registry rows. It does not
reach the custom-provider route, where an explicit
modelSupportsReasoningSummaries opt-in has to survive the routed strip.

That survival is ordering-dependent: normalizeRoutedCatalogEntry deletes
the flag and applyCatalogModelMetadata restores it, so the opt-in only
works because the latter runs second (src/codex/catalog/sync.ts:266-269).
Nothing pinned that order for a custom provider, and reversing it would
silently stop every opted-in routed provider from receiving
reasoning.effort from Codex while the effort ladder still advertised in
the picker.

Three tests: the opt-in survives the template path, an absent opt-in
stays conservative rather than claiming OpenAI-only summary delivery for
an arbitrary endpoint, and the no-template fallback reaches the same
answer by a different route - kept explicit so unifying the two
construction paths is a visible change.

Verified by ablation: swapping the two calls fails the first test plus
the landed built-in test, and passes all three again once reverted.
tests/codex-catalog.test.ts is 132 pass / 0 fail; typecheck clean.

Supersedes the test portion of #1119, which asserted the same contract
from a branch 1,800+ commits behind dev.

Co-authored-by: bitkyc08-arch <bitkyc08@gmail.com>
@github-actions

github-actions Bot commented Aug 8, 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 Aug 8, 2026
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: cdca7479-a3de-41ab-a0f8-2d52b1e0a58c

📥 Commits

Reviewing files that changed from the base of the PR and between 517f446 and 8bde6c4.

📒 Files selected for processing (1)
  • tests/codex-catalog.test.ts

📝 Walkthrough

Walkthrough

The pull request adds three regression tests for reasoning-summary metadata on custom routed models. The tests cover explicit opt-in preservation, conservative disabling without opt-in, and no-template fallback behavior.

Changes

Routed reasoning metadata

Layer / File(s) Summary
Reasoning metadata regression tests
tests/codex-catalog.test.ts
Lines 2391–2426 verify that explicit summary support preserves the effort ladder and supports_reasoning_summaries: true. Lines 2428–2449 verify conservative disabling without opt-in. Lines 2451–2471 verify opt-in preservation in the no-template fallback.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: wibias, ingwannu

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the regression tests for custom-provider reasoning-summary opt-in behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/260808-1100-custom-optin-contract

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.

@lidge-jun
lidge-jun merged commit c95c069 into dev Aug 8, 2026
24 checks passed
@Wibias
Wibias deleted the codex/260808-1100-custom-optin-contract branch August 9, 2026 05:29
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.

1 participant