fix(openai): exclude user-owned alias overlays from canonical seed validation (rebase of #3121) - #3189
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
✅ Deterministic PR hygiene checks passed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 821b3c9f94
ℹ️ 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".
| // DNS validation above awaits. Re-read the live row so a dedicated alias write that | ||
| // completed during that wait remains authoritative instead of being overwritten by the | ||
| // older ownership snapshot used to admit this POST. | ||
| restorePersistedAliasOverlays(prov, config.providers[name]); |
There was a problem hiding this comment.
Revalidate restored aliases against the edited catalog
When a full provider POST changes provider.models, this restores the old modelAliases only after validation, so an alias can now collide with a newly added native model ID. The dedicated alias route would reject that collision, while sanitizeAliasesForLoad in src/config.ts:2106-2113 deletes it on the next restart, causing the supposedly preserved alias to disappear. Validate the restored overlays against the resulting provider catalog before saving, or reject the provider edit when it invalidates an existing alias.
AGENTS.md reference: src/AGENTS.md:L10-L10
Useful? React with 👍 / 👎.
리뷰 · 우선순위 66 / 80지금 고치는 문제는 간단합니다. 전용 alias API( 이 PR은 테스트는 이미 랜딩된 코드라 머지 여부를 다시 물을 필요는 없습니다. 남은 정리만 보면 됩니다. CI rollup에서
메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
Summary
Maintainer rebase of #3121 by @Flowershangfromthebranches onto current
dev— all three commits cherry-picked with author credit preserved, no conflicts.Canonical seed validation was rejecting provider writes because it counted user-owned alias overlays as if they were canonical entries. An operator who had added their own alias could no longer save unrelated provider changes. The overlays are now excluded from canonical seed validation, and alias API ownership is preserved across provider writes rather than being flattened into the seed.
Verification
Exact head
821b3c9f9:bun test ./tests/management-provider-validation.test.ts— 91 pass, 0 fail, 600 expect() calls. The diff adds 265 lines to that file, so most of that count is the author's own new coverage.Full-suite and typecheck coverage is left to CI on this exact head.
Checklist
dev