fix: reuse provider auth lookup facts#85499
Conversation
|
Codex review: needs maintainer review before merge. Latest ClawSweeper review: 2026-05-22 21:59 UTC / May 22, 2026, 5:59 PM ET. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. at source level. Current main shows the model-listing provider-auth compute path reuses env lookup facts but still broadly reaches synthetic-auth plugin discovery; I did not run the live gateway CPU profile. PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Keep the prepared lookup design, but merge only after maintainers accept the manifest syntheticAuthRefs cold-discovery contract and the focused validation as enough upgrade proof. Do we have a high-confidence way to reproduce the issue? Yes at source level. Current main shows the model-listing provider-auth compute path reuses env lookup facts but still broadly reaches synthetic-auth plugin discovery; I did not run the live gateway CPU profile. Is this the best way to solve the issue? Yes, if maintainers accept syntheticAuthRefs as the cold-discovery contract. The patch moves lookup facts earlier and preserves fallback for incomplete metadata or configured providers, and I did not find a narrower concrete code repair. Label justifications:
Acceptance criteria:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 7e16a50c7eac. |
|
ClawSweeper PR egg ✨ Hatched: 🌱 uncommon Clockwork Review Wisp Hatch commandComment Hatchability rules:
Rarity: 🌱 uncommon. What is this egg doing here?
|
50538c7 to
de2fab6
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
de2fab6 to
211ad4d
Compare
|
Self-review (READY FOR /prepare-pr). What it does
Fallbacks preserved
Verification
Non-blocking
Changelog: |
dadcae4 to
8d65a37
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
* fix: reuse provider auth lookup facts * test: update model auth mocks * fix: scope synthetic auth registry lookup
* fix: reuse provider auth lookup facts * test: update model auth mocks * fix: scope synthetic auth registry lookup
* fix: reuse provider auth lookup facts * test: update model auth mocks * fix: scope synthetic auth registry lookup
* fix: reuse provider auth lookup facts * test: update model auth mocks * fix: scope synthetic auth registry lookup
* fix: reuse provider auth lookup facts * test: update model auth mocks * fix: scope synthetic auth registry lookup
* fix: reuse provider auth lookup facts * test: update model auth mocks * fix: scope synthetic auth registry lookup
* fix: reuse provider auth lookup facts * test: update model auth mocks * fix: scope synthetic auth registry lookup
* fix: reuse provider auth lookup facts * test: update model auth mocks * fix: scope synthetic auth registry lookup
* fix: reuse provider auth lookup facts * test: update model auth mocks * fix: scope synthetic auth registry lookup
* fix: reuse provider auth lookup facts * test: update model auth mocks * fix: scope synthetic auth registry lookup
* fix: reuse provider auth lookup facts * test: update model auth mocks * fix: scope synthetic auth registry lookup
before:
after:
Summary
Verification
node scripts/run-vitest.mjs src/agents/model-provider-auth.test.ts src/agents/model-auth.test.ts src/agents/model-auth.profiles.test.ts src/plugins/provider-runtime.synthetic-auth-discovery.test.ts src/plugins/synthetic-auth.runtime.test.ts src/plugins/bundled-plugin-metadata.test.ts extensions/lmstudio/index.test.tspnpm tsgo:coregit diff --checkAUTOREVIEW_AUTO_TESTS=0 .agents/skills/autoreview/scripts/autoreview --mode localReal behavior proof
Behavior addressed: Gateway/model-listing auth checks no longer repeatedly rediscover broad provider plugin/runtime metadata for providers that cannot satisfy plugin-owned synthetic auth.
Real environment tested: Local macOS source checkout.
Exact steps or command run after this patch: The focused Vitest command,
pnpm tsgo:core,git diff --check, and autoreview command listed above.Evidence after fix: Focused tests passed: 10 files, 281 tests. Typecheck and diff check passed. Autoreview reported no accepted/actionable findings.
Observed result after fix: Provider auth lookup facts are prepared once per checker/warm scope and reused through the loop while synthetic-auth fallback remains available when metadata is incomplete.
What was not tested: A live gateway CPU repro/profile was not rerun after the patch.