Conversation
noamtfh
requested review from
Dzejkop,
Guardiola31337,
aurel-fr,
crystalt,
karankurbur,
murph,
paolodamico and
sideround
as code owners
September 9, 2026 21:07
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 85a192e. Configure here.
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.

Summary
TurnkeyManager.reconcile_legacy_sync_factor_useroperation for MCORE-1924 / MCORE-595P256Signerfor the read-and-delete workflow; no private key bytes cross the FFI boundaryThis intentionally replaces the generic signer-backed stamping approach from #438. The use case is one migration cleanup operation, with the backup/recovery workflow kept in Bedrock as Paolo requested.
Testing
git diff --checkcargo fmt/cargo test(Rust toolchain is unavailable in this environment).Note
Medium Risk
Deletes Turnkey users with safeguards (role check, UUID validation), but mistaken targeting or policy gaps could remove the wrong principal; convergent retries reduce duplicate-delete risk.
Overview
Adds a Bedrock-owned
TurnkeyManager.reconcile_legacy_sync_factor_userflow to remove a legacy sync-factor Turnkey user after migration, stamped only by the replacementP256Signer(no private key bytes over FFI).The API client lists users, no-ops if the legacy user is already gone (safe retries after lost responses), refuses non–sync-factor targets and invalid UUIDs, then submits
delete_userswith a fixed activity timestamp for idempotent retries. Failures surface as a new opaqueTurnkeyCleanupError(Failed/Retryable/Pending) so native clients can keep the legacy credential until cleanup succeeds.Unit tests cover happy path, uppercase iOS UUIDs, transient 503 retry, already-absent convergence, wrong user role, and invalid ID without network calls.
Reviewed by Cursor Bugbot for commit 1bf050c. Bugbot is set up for automated code reviews on this repo. Configure here.