Skip to content

fix(codex-catalog): preserve native fallback without catalog - #1374

Merged
Wibias merged 1 commit into
lidge-jun:devfrom
luvs01:agent/fix-native-model-fallback
Aug 9, 2026
Merged

fix(codex-catalog): preserve native fallback without catalog#1374
Wibias merged 1 commit into
lidge-jun:devfrom
luvs01:agent/fix-native-model-fallback

Conversation

@luvs01

@luvs01 luvs01 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Separate genuine catalog-derived native slugs from documented picker additions.
  • Restore the full NATIVE_OPENAI_MODELS fallback when no live, account-bound, or on-disk catalog is available.
  • Keep documented additions visible in management pickers, and add a deterministic missing-custom-catalog regression.

Verification

  • Bun 1.3.14: bun test tests/codex-catalog-sync-hardening.test.ts --test-name-pattern 'native model fallback' — 1 passed.
  • Bun 1.3.14: bun test tests/claude-models-discovery.test.ts --test-name-pattern 'Codex discovery restores account rows' — 1 passed.
  • bun run typecheck — passed.
  • bun run privacy:scan — passed.
  • git diff --check HEAD^ HEAD — passed.
  • The complete codex-catalog-sync-hardening file was attempted once but was not green in this Windows environment (5 passed / 15 unrelated catalog or environment assertions failed), so it is not claimed as passing evidence.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • No documentation change is required for this internal fallback correction.
  • The branch is based on the latest dev.

Review readiness checklist

  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Summary by CodeRabbit

  • Bug Fixes

    • Improved native model availability when catalog data is missing or predates documented models.
    • Ensured documented native models remain available across catalog and picker listings.
  • Tests

    • Added regression coverage for fallback behavior when the configured catalog file is unavailable.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The native slug lookup now separates raw catalog data from documented additions. A regression test verifies that missing catalog data still exposes the built-in native model list and picker model.

Changes

Catalog native slug resolution

Layer / File(s) Summary
Slug resolution and fallback validation
src/codex/catalog/metadata.ts, tests/codex-catalog-sync-hardening.test.ts
nativeOpenAiSlugs() uses the raw catalogNativeSlugs() helper. listCatalogNativeSlugs() appends documented native additions. The test verifies built-in fallback models when the configured catalog is missing.

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

Possibly related PRs

Suggested reviewers: wibias, lidge-jun, ingwannu

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: preserving native model fallback behavior when no catalog is available.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Aug 9, 2026
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

✅ READY

  • all PR quality gates passed; the review readiness checklist is complete.

Review readiness checklist

  • ✅ All CI tests are green on my local testing.
  • ✅ I pushed my PR to the latest dev commit.
  • ✅ I resolved all correct Codex and CodeRabbit findings.
  • ✅ My PR is ready for review.

4/4 boxes ticked.

This pull request is already Ready for Review.
The review-ready label marks this PR as ready; review automation runs independently. If no CodeRabbit review appears, comment @coderabbitai review to request one.
Maintainers: @lidge-jun @Ingwannu @Wibias

@luvs01
luvs01 force-pushed the agent/fix-native-model-fallback branch from 7a14857 to 77070f4 Compare August 9, 2026 19:04

Wibias commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Please rebase this PR onto the latest dev (e8ce2b93dd3ef8074d96dee407704c5dc06e2699) before merge, then rerun the exact-head CI checks.

@luvs01
luvs01 force-pushed the agent/fix-native-model-fallback branch from 77070f4 to 164094b Compare August 9, 2026 22:31
@Wibias
Wibias marked this pull request as ready for review August 9, 2026 22:51
@github-actions
github-actions Bot marked this pull request as draft August 9, 2026 22:52
@github-actions
github-actions Bot marked this pull request as ready for review August 9, 2026 22:52
@Wibias
Wibias merged commit ddbc016 into lidge-jun:dev Aug 9, 2026
32 of 35 checks passed

Wibias commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Thanks @luvs01 — this is a clean, focused fix. The separation between genuine catalog-derived native slugs and documented picker additions restores the intended static native fallback without disturbing picker behavior, and the missing-catalog regression covers the failure mode nicely. Appreciate the careful rebase and validation work here. 🙌

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

Labels

bug Something isn't working review-ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants