Repository navigation
Approver remove: pass the id after -- so a dash-leading id isn't read as a flag - #11
Merged
Merged
Conversation
… as a flag Approver ids are base64url (a random passkey credential id, or a SHA-256 of the iOS app key), so about 1 in 64 starts with "-". `keyflap approver remove -Xyz…` then fails as an unknown option. The console's "Remove one" phone action hit this for real users, and approver.test.ts hit it at random, which is what turned macOS CI on main red on Nov 13 (expected exit 0, got 2). The console now builds `approver remove -- ID`, the tests do the same, and new tests pin both the parse and the console path with ids that start with a dash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 and why
Before: about 1 in 64 phone approvers couldn't be removed from the console. Approver ids are base64url, so some start with
-, andkeyflap approver remove -Xyz…failed as an unknown flag. The same thing madeapprover.test.tsfail at random, which is what turned macOS CI red on main on Nov 13 (expected 2 to be +0on the native approver remove; the run's id happened to start with a dash).After: the console's "Remove one" phone action runs
approver remove -- ID, so any id works. The approver tests pass ids after--too, so they no longer depend on luck.How: one-line change in
packages/cli/src/console/menu.ts. New tests pin the parse (-abcis a usage error,-- -abcparses) and the console path (a dash-leading id, and one that looks like--data-dir, both come through as the id). The console test fails without the menu change. Agent ids (UUIDs) and password ids (pw_…) can't start with a dash, so only approvers needed it.Checklist
pnpm checkpasses.check:staticis clean and the touched suites pass. The full unit run in my container showed 9 failures (8 insimple-install-shell.test.ts, 1 inkeystore.test.ts), the same 9 on unmodified main there; they come from running as root, not from this change. CI is the real check.pass-cli, never third-party sites or real vaults.docs/IMPLEMENTATION_NOTES.md(none).Generated by Claude Code