Repository navigation
fix(doctor): repeated no-op OAuth migration prompt and swallowed migration error cause - #123164
Merged
Merged
Conversation
…igration error Two doctor auth-repair UX defects: 1. When only unreferenced legacy Codex OAuth sidecar files remain (no stores with active profiles), doctor prompted 'Migrate legacy Codex OAuth credentials now?' on every interactive run even though the repair loop never touches unreferenced sidecars — answering yes changed nothing, forever. Gate the confirm prompt on actionable stores; unreferenced sidecars stay informational warnings. 2. The shared legacy oauth.json migration failure warning discarded the underlying error (SQLite unreadable, lock contention, source changed), leaving the user with no cause and no next step while the gateway stays blocked. Append the cause like the sibling per-candidate handler does.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
August 13, 2026 11:48
Contributor
Author
|
Merged via squash.
|
masatohoshino
added a commit
to masatohoshino/openclaw
that referenced
this pull request
Aug 14, 2026
…ofile archives maybeMigrateAuthProfileJsonStoresToSqlite discarded the error from resumePendingAuthProfileMigrationArchives entirely, so the warning was always the same generic string regardless of which of 5 distinct causes fired (invalid receipt, target verification failure, lock failure, SQLite failure, corrupt JSON). PR openclaw#123164 fixed the identical defect class in the sibling shared-OAuth catch block 20 lines below in this same function, explicitly modeling the fix on the third, already-correct sibling. This was the unaddressed third catch block in that same family.
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 14, 2026
…igration error (openclaw#123164) Two doctor auth-repair UX defects: 1. When only unreferenced legacy Codex OAuth sidecar files remain (no stores with active profiles), doctor prompted 'Migrate legacy Codex OAuth credentials now?' on every interactive run even though the repair loop never touches unreferenced sidecars — answering yes changed nothing, forever. Gate the confirm prompt on actionable stores; unreferenced sidecars stay informational warnings. 2. The shared legacy oauth.json migration failure warning discarded the underlying error (SQLite unreadable, lock contention, source changed), leaving the user with no cause and no next step while the gateway stays blocked. Append the cause like the sibling per-candidate handler does.
steipete
pushed a commit
that referenced
this pull request
Aug 26, 2026
…ofile archives (#123459) maybeMigrateAuthProfileJsonStoresToSqlite discarded the error from resumePendingAuthProfileMigrationArchives entirely, so the warning was always the same generic string regardless of which of 5 distinct causes fired (invalid receipt, target verification failure, lock failure, SQLite failure, corrupt JSON). PR #123164 fixed the identical defect class in the sibling shared-OAuth catch block 20 lines below in this same function, explicitly modeling the fix on the third, already-correct sibling. This was the unaddressed third catch block in that same family.
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 26, 2026
…ofile archives (openclaw#123459) maybeMigrateAuthProfileJsonStoresToSqlite discarded the error from resumePendingAuthProfileMigrationArchives entirely, so the warning was always the same generic string regardless of which of 5 distinct causes fired (invalid receipt, target verification failure, lock failure, SQLite failure, corrupt JSON). PR openclaw#123164 fixed the identical defect class in the sibling shared-OAuth catch block 20 lines below in this same function, explicitly modeling the fix on the third, already-correct sibling. This was the unaddressed third catch block in that same family.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Fixes two
openclaw doctorauth-repair UX defects that never converge:oauth.jsonmigration failed (unreadable SQLite store, lock contention, changed source), the warning said only "Failed to migrate shared legacy OAuth credentials; the source was left in place." — no cause, no next step, while gateway startup keeps directing the user back todoctor --fix.Why This Change Was Made
The confirm gate in
src/commands/doctor-auth-oauth-sidecar.tscovered the informational unreferenced-sidecar report, not just actionable stores; gating the prompt onstores.length > 0matches what the repair loop can actually do. The swallowed error insrc/commands/doctor-auth-flat-profiles.tsdiverged from its own sibling handler a few lines above (per-candidate failures include${String(err)}); aligning restores one convention.User Impact
Operators with leftover sidecar files stop being nagged with a no-op prompt on every doctor run, and a failing shared-OAuth migration now names its cause so the user can act (fix permissions, retry, re-authenticate).
Evidence
does not prompt when only unreferenced sidecars remainfails pre-fix (confirmAutoFix called) and passes post-fix; existing warning/no-touch expectations unchanged (9 passed).doctor-auth-flat-profiles.test.tsgreen (50 passed).