Persist refused refresh-token suppression - #465
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Existing managers can classify the new signed-out tombstone as a generic retryable error, and callback documentation is outdated.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Persists signed-out state when rejected refresh credentials cannot be deleted.
Changes:
- Replaces refused credentials with an empty record.
- Clears cached mail after replacement.
- Tests cross-manager suppression and subsequent login.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
| File | Description |
|---|---|
internal/auth/auth.go |
Adds durable refused-token suppression. |
internal/auth/auth_test.go |
Tests replacement, cache clearing, and login recovery. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
cefd317 to
0a8bc15
Compare
0a8bc15 to
8f3f7f5
Compare
8f3f7f5 to
c5323cb
Compare
Dismissed the prior approval because Cursor Security Agent was present but still not terminal after the 8-minute wait. Human review is needed; no reviewers were assigned.




What changed
Validation
make testmake lintThis is stacked on #464 so each authentication change can be reviewed separately.
Basecamp card
Summary by cubic
Persists suppression of a refused refresh token across processes when the keyring won't delete the dead credential. Previously a failed delete left the token on disk, so another command or process loaded and re-sent it. Now the refused credential is replaced with a signed-out record, and a later successful login overwrites that record normally. Replacing the credential also clears cached mail so it doesn't outlive the credential that fetched it.
Written for commit c5323cb. Summary will update on new commits.