fix(#2294): make EnsureProvider idempotent via delete-and-recreate - #10
fix(#2294): make EnsureProvider idempotent via delete-and-recreate#10guyoron1 wants to merge 8 commits into
Conversation
…recreate Mirrors upstream fullsend-ai#2296.
|
/fs quality |
|
🤖 Finished Review · ✅ Success · Started 2:41 PM UTC · Completed 2:51 PM UTC |
ReviewReason: stale-head The review agent reviewed commit Previous runReviewReason: stale-head The review agent reviewed commit Previous run (2)ReviewReason: stale-head The review agent reviewed commit |
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 2:52 PM UTC · Completed 3:02 PM UTC |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 3:04 PM UTC · Completed 3:15 PM UTC |
|
/fs-review |
QualityFlow Pipeline Summary
Test Output
Issue: GH-10 Generated by QualityFlow |
|
Closing — QF infrastructure updated on main, will re-create with improved pipeline. |
EnsureProvider called
openshell provider createand treated any error as a hard failure. When a provider already existed from a prior run, the AlreadyExists error blocked subsequent runs, requiring manual cleanup between iterations.Now when the create command fails with AlreadyExists, the function deletes the existing provider and recreates it with current credentials. This makes the function truly idempotent (matching the "Ensure" naming convention used by EnsureGateway and the Provider.Provision() interface contract) while also ensuring credentials are never stale across runs.
Also extracted a redactSecrets helper to reduce duplication in error formatting paths.
Closes fullsend-ai#2294
Mirrored from upstream PR #2296