Skip to content

Document catalog credential-removal convergence as rebuild-only - #972

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-5446-catalog-removal-convergence
Sep 13, 2026
Merged

Document catalog credential-removal convergence as rebuild-only#972
TheGreatAxios merged 2 commits into
mainfrom
cl-5446-catalog-removal-convergence

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

Credential-removal convergence for the model catalog is rebuild-only, documented at the reconcile funnel (mergeOAuthCatalog in src/config/index.ts) with a regression test pinning the behavior.

Decision: document restart-only, not a disabled flag

Disable proved structurally wrong here, so per the brief I took the document path:

  • No disabled state exists on ProviderCatalogEntry, ProviderSettings, or the ModelCatalogOption rows the picker consumes.
  • Adding one end-to-end is invasive: a new in-memory flag plus persistence stripping (it must never leak into settings.json via providerCatalogToSettings), plus threading through the catalog-to-picker mapping and the product-host boundary — with no removal event to drive it. There is no logout/disconnect surface and no auth-store watcher; refresh runs on connect, prefetch, and startup, so even a perfect flag would only converge on the next rebuild.
  • The disable-not-delete rationale already holds structurally: every rebuild re-projects settings-file providers verbatim, so manual rows are never deleted, and OAuth rows are ephemeral projections stripped before persistence, so dropping one on logout loses nothing and re-auth restores it on the next rebuild.

Operational model: removal takes effect on the next rebuild (restart, provider connect, or model prefetch), not live. No behavior changed; no docs touched, so PR #265 doc accuracy is intact.

Verification

  • bun test src/config.test.ts -t "catalog credential-removal convergence" — 2 pass, 0 fail (exit 0)
  • bun run check (lint + typecheck + build + projects-dir guard + full suite) — exit 0; 7133 pass, 0 fail across 488 files

Fixes CL-5446

@linear-code

linear-code Bot commented Sep 13, 2026

Copy link
Copy Markdown

CL-5446

@TheGreatAxios

Copy link
Copy Markdown
Collaborator Author

Audit: NEEDS-WORK (overbroad "never deleted") + merge note

Finding: "Manual rows are never deleted — settings-file providers are re-projected verbatim" overstates the invariant: #973's bare-row dedupe in this same function (mergeOAuthCatalog) drops a legacy bare codex/xai settings row once that family has a live credential-backed profile. The comment should carve out that exception — settings-file rows are re-projected verbatim except the bare-row dedupe, i.e. derived credential rows win over the legacy bare settings row. I will push that reword to this branch.

Merge note: this PR and #973 touch adjacent hunks of src/config/index.ts around mergeOAuthCatalog (this one adds the comment block above it; #973 reworks its signature and body). Land #973 first, then rebase this branch before merge.

Every catalog rebuild derives rows from the current settings file plus the live credential stores, so removal converges on the next rebuild and manual rows are never deleted. A disabled flag has no home and no removal event to drive it.
The legacy bare codex/xai settings row is dropped once its family has a live credential-backed profile (CL-5606), so settings rows are verbatim except for that dedupe.
@TheGreatAxios
TheGreatAxios force-pushed the cl-5446-catalog-removal-convergence branch from b084026 to 132006f Compare September 13, 2026 05:39
@TheGreatAxios
TheGreatAxios merged commit 5c7acf0 into main Sep 13, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant