fix(secrets): support macOS Keychain across worktrees and SSH#152
Open
lmwnshn wants to merge 1 commit into
Open
fix(secrets): support macOS Keychain across worktrees and SSH#152lmwnshn wants to merge 1 commit into
lmwnshn wants to merge 1 commit into
Conversation
akrentsel
reviewed
Jul 20, 2026
akrentsel
left a comment
Collaborator
There was a problem hiding this comment.
this seems reasonable overall to me, thanks for catching this class of problem
| serde_json::from_slice(&plaintext).map_err(Into::into) | ||
| } | ||
|
|
||
| pub(crate) fn verify_key_access(&self) -> Result<()> { |
Collaborator
There was a problem hiding this comment.
this probe silently provisions a key if it doesn't exist – is that intentional? seems like a side-effect that could have unexpected consequences?
perhaps there should be a key_provider.try_get_key that is read only?
| is_exo_checkout() { | ||
| local dir="$1" | ||
| [[ -d "$dir/.git" && -f "$dir/exo.sh" ]] | ||
| # In linked Git worktrees, .git is a file rather than a directory. |
Collaborator
There was a problem hiding this comment.
Thanks for this fix – I wan't working with worktrees in my workflow so didn't run into this.
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.
Fixes keychain issues across the environments I work in (ssh and codex desktop's worktrees).
Problems:
setup.sh: in a worktree,.gitis a file and not a folder, so detecting a git checkout should use-einstead of-d.setup.shwould encounter keychain/codesign issues in trying to store the API key. The two main issues were (1) worktrees colliding over the keychain accountroot.to_string_lossy().to_string() -> .exo/exoharness, and (2) when run over ssh, the GUI keychain prompt doesn't pop up.Fixed by:
.gitwith-einstead of-d.AI use: PR contents mostly generated with 5.6 Sol, though I've been actively getting it to rewrite some of its stupider decisions. I'm not particularly fond of macOS permissions, feel free to provide feedback/make edits.