[Bug]: Preserve operator-owned static OAuth catalogs during reconciliation - #1310
[Bug]: Preserve operator-owned static OAuth catalogs during reconciliation#1310yusoofsh wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughOAuth reconciliation now detects operator-owned static catalogs with ChangesStatic OAuth catalog preservation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Wibias
left a comment
There was a problem hiding this comment.
Verdict: Request changes
The Command Code fix is useful and the diff is small, but this is not safe to merge as-is.
Blocker — liveModels: false is not reliable operator-ownership provenance
isOperatorOwnedStaticCatalog() now treats every provider.liveModels === false as operator-owned and skips all OAuth preset reconciliation.
That breaks Kiro. Kiro is an OAuth provider whose registry preset itself intentionally sets liveModels: false because its CodeWhisperer wire has no compatible live /models endpoint. deriveOAuthProviderConfig() materialises that registry value into the saved provider config. Therefore a normal, untouched Kiro config now looks “operator-owned” and will hit the early continue forever.
Result: existing Kiro users stop receiving future registry updates to its static model list and associated context/reasoning metadata. This directly conflicts with the Kiro preset's purpose: its static catalog is authoritative and must be maintained by OpenCodex as models/capabilities change.
Please distinguish registry-owned false from operator-owned false. At minimum, false cannot mean operator-owned when the current OAuth preset also has liveModels: false. If operators must also be able to freeze/customise Kiro's catalog independently, this needs explicit ownership/provenance rather than overloading the discovery flag.
Contract risk — the guard freezes much more than model discovery
The early continue skips every field in OAUTH_RECONCILE_FIELDS, including context/output limits, input modalities, reasoning maps, noVisionModels, parameter restrictions, etc. Public config semantics describe liveModels as the switch for live catalog discovery; this patch silently turns liveModels: false into an opt-out from future bundled capability maintenance.
That can leave capability metadata stale after upgrades. In particular, stale vision metadata can change whether requests use native vision or the vision sidecar, which has behaviour/cost/privacy implications. I found no direct secret leak or auth bypass in this diff, but freezing these capability facts is too broad without an explicit contract.
Tests needed
Please add coverage for at least:
- a normal Kiro registry-owned
liveModels: falseconfig with stale models/context/reasoning metadata still reconciling to the current preset; - the intended Command Code operator-owned static catalog remaining untouched;
- the intended policy for the other capability fields currently skipped by the early
continue(and whether staledefaultModelhealing should also be skipped).
CI on the current head is green, including the test shards, typecheck, GUI tests, privacy scan and macOS job. I also found no new resource-retention/concurrency issue in the two-file diff. The blocker is semantic/provenance correctness, not CI hygiene.
Verdict: REQUEST CHANGES. Fix the ownership distinction before merge.
Summary
liveModels: false.Verification
bun run test tests/oauth-provider-reconcile.test.ts— 6 passed.bun run typecheck— passed.bun run privacy:scan— passed.git diff --check— passed.bun run testsuite was started through Nub and reached broad coverage, but was stopped after unrelated GUI dependency warnings for missingreactpackages in the checkout; the focused reconciliation test and all relevant reported tests passed.Checklist
Contributor readiness
devcheckout.Summary by CodeRabbit