Skip to content

feat(codex): publish verified routed service tiers - #1521

Draft
Yuxin-Qiao wants to merge 3 commits into
lidge-jun:devfrom
Yuxin-Qiao:codex/fix-1436-service-tier
Draft

feat(codex): publish verified routed service tiers#1521
Yuxin-Qiao wants to merge 3 commits into
lidge-jun:devfrom
Yuxin-Qiao:codex/fix-1436-service-tier

Conversation

@Yuxin-Qiao

@Yuxin-Qiao Yuxin-Qiao commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Refs #1436
Refs #1504
Refs #1512

Verification

  • bun test --isolate --max-concurrency 1 tests/service-tier-capability.test.ts tests/openai-chat-hardening.test.ts tests/responses-parser.test.ts tests/codex-catalog.test.ts tests/route-decision-trace.test.ts tests/routing-profile.test.ts tests/routing-profile-editor-data.test.ts — 309 passed, 0 failed, 1167 assertions before the management-boundary split.
  • After the split: service-tier validation/DTO projection plus persistence tests passed; related catalog/runtime/Chat tests 229 passed, 0 failed, 876 assertions.
  • bun run typecheck — passed after the split.
  • bun run privacy:scan — passed after the split.
  • git diff --check — passed.
  • GitHub hygiene, target, label, and resolve checks — passed on the current head.
  • A repository-wide bun run test result is not claimed; the suite contains current baseline/environment failures unrelated to this focused change.
  • The complete management-provider validation file still has unrelated local DNS-fixture failures for existing fake hosts; the new capability management tests pass.
  • No GUI files changed.

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; maintainer review is still requested for the management API change.
  • Local CI is green.
  • Branch is on the latest dev commit.
  • Correct Codex and CodeRabbit findings are fixed.
  • Ready-for-review confirmation is present.

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • 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.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 2caab6a0-1dea-4ebc-8df4-96582202d81b

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

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 added the intake: hygiene-blocked Deterministic PR hygiene checks failed label Aug 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Deterministic hygiene checks failed.

  • unsponsored_surface — This changes an authentication, workflow, release-automation, or dependency surface. MAINTAINERS.md requires security review for these; ask a maintainer to apply maintainer-sponsored once they have reviewed it. Paths: src/server/auth-cors.ts.

@github-actions github-actions Bot added the enhancement New feature or request label Aug 12, 2026
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

⏳ DRAFT

  • review readiness checklist open (1/4 boxes ticked).

What to do

  • Tick all four boxes in the PR description once you're done (currently 1/4).

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.

1/4 boxes ticked.

This PR stays in draft until every box above is ticked.

@Yuxin-Qiao

Copy link
Copy Markdown
Contributor Author

The implementation and focused verification are green. The only blocked gate is the repository security-boundary rule because this PR touches src/server/auth-cors.ts for provider-management validation and the public provider DTO. This does not change request authentication, CORS admission, credentials, or secret handling. Please review this narrow change and apply the maintainer-sponsored label if acceptable; I am intentionally leaving the PR as a draft.

@Yuxin-Qiao

Copy link
Copy Markdown
Contributor Author

Rebased onto current dev@d5824814853eea68ceb4417403b22000a935cef8; new head is e12d917015c2. Post-rebase local proof is green: typecheck; service-tier/Chat 55 tests; catalog/registry 210 tests; router/policy 27 tests; focused management test 1 test; privacy scan; docs build (265 pages); and diff check. The remaining blocked checks are the repository security sponsorship gate for src/server/auth-cors.ts (provider-management validation/public DTO only). Please review this narrow boundary change and apply maintainer-sponsored if acceptable; I am intentionally keeping the PR Draft.

@Yuxin-Qiao
Yuxin-Qiao force-pushed the codex/fix-1436-service-tier branch from e12d917 to 15e1734 Compare August 12, 2026 08:55
@Yuxin-Qiao

Copy link
Copy Markdown
Contributor Author

Rebased and force-with-lease pushed onto current dev@cbbfdd8773e68a5dc2391ddeb32f33a225373c1a; new head is 15e1734. Fresh local proof: capability/catalog/runtime focused suite 309/309, 1167 assertions; typecheck, privacy scan, and diff check passed. The only remaining repository gate is maintainer sponsorship for the narrow provider-management validation/public DTO change in src/server/auth-cors.ts; I am leaving the PR Draft and will not bypass that security-boundary rule.

@github-actions github-actions Bot removed the intake: hygiene-blocked Deterministic PR hygiene checks failed label Aug 12, 2026
@Yuxin-Qiao

Copy link
Copy Markdown
Contributor Author

The security-boundary gate is now addressed by a real scope split, not by weakening validation: commit moves the new service-tier validation and public DTO projection into , removes the two additions from , and keeps POST/PATCH validation plus projection behavior intact. The diff no longer changes the protected auth-cors file. Fresh proof after the split: capability management projection/validation and persistence tests pass; related catalog/runtime/Chat tests 229/229; typecheck, privacy scan, and diff check pass. Please let hygiene/enforce-target rerun and review the new management-only module.

@Yuxin-Qiao

Copy link
Copy Markdown
Contributor Author

The security-boundary gate is now addressed by a real scope split, not by weakening validation: commit 5224f1a3ff38 moves the new service-tier validation and public DTO projection into src/server/management/provider-capability-config.ts, removes the two additions from src/server/auth-cors.ts, and keeps POST/PATCH validation plus /api/config projection behavior intact. The diff no longer changes the protected auth-cors file.

Fresh proof after the split: capability management projection/validation and persistence tests pass; related catalog/runtime/Chat tests 229/229; typecheck, privacy scan, and diff check pass. Please let hygiene/enforce-target rerun and review the new management-only module.

@Ingwannu

Copy link
Copy Markdown
Owner

Initial maintainer review on exact head 5224f1a3ff38e1686c45516ade57ec42b89235af.

The scope split out of auth-cors.ts is the right direction, and the core design is more coherent than landing #1512 alone: one exact provider/model capability decision controls catalog Fast metadata, global Fast injection, caller-selected tier preservation, and unsupported-tier stripping. Exact model IDs remain provider-scoped, and provider-level false remains fail-closed.

I am keeping this draft pending deeper review and executed exact-head CI. Please do not merge yet. The next review must verify at least these boundaries:

  • an unclassified route preserves an explicit caller tier but never receives global Fast injection or catalog Fast metadata;
  • model adapter overrides cannot publish Fast for a non-OpenAI-compatible wire;
  • provider-level false cannot be reopened by an exact-model true;
  • management PATCH merge/clear behavior cannot leak a capability across providers or inherited object keys;
  • combo intersection and custom-model projection use the same exact resolved model identity;
  • a selected Fast tier cannot be advertised without being forwarded by the eventual adapter.

If those checks hold on current dev and full CI is green, this is the preferred integration candidate and #1512 should close as superseded. No maintainer sponsorship label is needed now that the protected auth/CORS file is no longer changed.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants