Repository navigation
feat(mecated): add native MCP custody reset - #1991
Conversation
|
I think the recovery path is worth having, but I wouldn't merge this yet. Right now the operator can follow the documented steps and still be stuck.
There are a few destructive-boundary issues I'd want fixed first:
The UX also needs a pass. "Custody" makes sense in the implementation, but I don't know what On coverage: the interruption test manually constructs each supposed crash state with private helpers ( Finally, this adds a destructive command and persisted |
cde2dc0 to
9bac3bd
Compare
|
@JAORMX Thanks for the detailed review. I pushed the fixes in Automated keyring tests still use a fake. I did not run native OS keychain/credential-service qualification, and marked it pending in the PR description rather than claiming it passed. Focused tests and |
9bac3bd to
4260c18
Compare
Add `mecated mcp reset-local-credentials` to recover obsolete or mismatched native MCP credential state without removing profile settings or revoking upstream OAuth registrations. The attended command confirms the affected profiles and records reset progress so interrupted resets can resume. Protect shared file keys and revalidate the selected settings scope before deletion. Create fresh custody through the explicit login or add flows. Co-authored-by: Mecatl <noreply@mecatl.dev>
4260c18 to
371134d
Compare
Summary
Provide an attended recovery path for obsolete, missing, or mismatched native MCP credential state.
mecated mcp reset-local-credentials NAME [--file PATH]confirms every affected native profile sharing the selected root, keeps their settings, and retires local sign-in credentials through a durable reset marker so interrupted resets can resume. It preserves legacykey_envcustody, upstream OAuth registrations, and file keys used by another root. Explicit login or add creates fresh custody afterward.Login errors for reset-recoverable custody identify the recovery command and retain the selected profile's settings source. Reset fails closed if its settings scope changes during confirmation or a shared file-key owner cannot be verified.
Fixes #1922
Development stage
Acceptance plans are not used as implementation contracts under the current project process. This change adds no engine API or protobuf contract.
Changes
mcp reset-local-credentialsCLI command and list it in top-level and MCP help.Verification
go test ./internal/adapter/mcpcredential ./internal/cliconfigandgo test ./cmd/mecated -run '^(TestMCP|TestDirectMCPOnboarding)'.task site:buildpassed.task lintreports G703 in the untouchedenvironment/microvm/launch_ownership_darwin.go:754.task docsreports 22 broken links and 0 broken anchors across the workspace.task testdid not finish within the 600-second timeout.Special notes for reviewers
The
reset-local-credentialscommand name replaces the earlier implementation-oriented name. The reset never revokes upstream registrations. Please review the pending manual OS-keyring qualification before merge.