Repository navigation
Conversation
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Dumbris
approved these changes
Oct 26, 2026
Dumbris
left a comment
Member
There was a problem hiding this comment.
Verified: the PR test fails on main for the reason described and passes on this branch merged with main; race tests for the touched packages and CI lint (bare and server tags) are clean. Also built and tested together with the rest of this batch, independently reviewed, and cross-reviewed with a second model.
Member
|
Merged. Thank you, @rudycelekli! Deleting a secret that was already removed from the keyring no longer fails forever or marks the keyring unavailable. |
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.
Bug
KeyringProvider.Deletetreats every error fromkeyring.Deleteas a keyring failure, includingkeyring.ErrNotFound. When the entry was already removed outside mcpproxy (Keychain Access,security delete-generic-password, Seahorse, Credential Manager), it returns beforeremoveFromRegistry, so the name stays in the registry andListkeeps showing it. Every later delete hits the same error.It also calls
markUnavailable(), so for the rest of the process every keyringStore/Deleteshort-circuits withErrKeyringUnavailable, even though the keyring just answered fine.Trigger
foothrough the UI ormcpproxy secrets set.mcpproxy/fooitem in Keychain Access.DELETE /api/v1/secrets/foo. It returns500 failed to delete secret foo from keyring: secret not found in keyringon every retry,foostays listed, and further secret writes fail as "keyring unavailable".Fix
Treat
keyring.ErrNotFoundfrom the delete as success: the keyring answered and the entry is already gone. So the provider is not marked unavailable and execution continues toremoveFromRegistry. Other errors behave as before.IsAvailablealready uses the same convention, whereErrNotFoundmeans "available, no secret".Test
TestKeyringProvider_Delete_AlreadyGoneCleansRegistryuses the existingwithKeyringMocksseam, withDeletereturningErrNotFound. It asserts thatDeletereturns nil, the registry dropsfoo,Listreturns onlybar, and the provider is not marked unavailable.Commands run
CGO_ENABLED=0 go test -count=1 ./internal/secret: okgit stashofkeyring_provider.go),-run AlreadyGonefails withDelete of an already-removed secret: failed to delete secret foo from keyring: secret not found in keyring.gofmt -lon the edited files: no output