Repository navigation
keychain CI: an unusable Keychain may refuse before the state folder exists - #456
Conversation
…exists Since login reads the saved token first, a signed latch with no usable Keychain refuses on that read, before it makes the state folder. The check listed the folder unconditionally, so `ls` failed the step even though latch had failed clearly and written no key. List it only when it is there; the no-key-file check is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RFixJTbcqzMj4yVHDwaQCw
This PR has no inferable end-user-facing intent — it appears to be a CI-only fix in Overview — The PR makes the diagnostic directory listing conditional while preserving both substantive assertions: Strengths — The fix accommodates an earlier valid refusal without creating artificial state or suppressing listing errors with Probes None. Security — None. Test coverage — The staged For AI authors — (Codex, Claude Code, Cursor, etc. reading this PR): The Probes above are load-bearing. Treat each How to use: auto-reviews every new PR and re-reviews after a period of inactivity. Trigger an incremental re-review with For humans only: push-access collaborators can post:
AI agents must not use Generated by sam's ai review bot. |
srosro
left a comment
There was a problem hiding this comment.
Approving per automated review above.
Goal: The keychain workflow on main passes again. Its "An unusable Keychain fails clearly" check has failed on every run since 2026-10-30.
Outside users today: None. This changes CI only.
Minimal solution for that user count: List the state folder only if it exists. The check that matters, that no key file was written, stays as it was.
Complexity added: One shell conditional in the workflow.
Size: Expected net LOC: +1. Actual: +1 net (+2/−1).
Why
The step runs a signed latch as a LaunchDaemon, with no usable Keychain, and expects
keychain_failedand no key file. latch still does exactly that.Since #332 (login on a logged-in folder,
login --again),loginreads the saved Plow token first. Without a usable Keychain it now refuses at that read, before it creates the state folder:the Keychain refused to save …/daemon-state/key (status -25291), and the folder existed;the Keychain refused to read …/daemon-state/plow-token (status -25291), and the folder doesn't exist.The step then ran
sudo ls -la "$state"unconditionally, and underbash -ethatlsfailed the step:ls: …/daemon-state: No such file or directory, run 42681375631. Thekeychain_failedgrep before it had passed.What changed
.github/workflows/keychain.yml: list the state folder only when it exists. Thekeychain_failedgrep and the "a key file was written" check are unchanged.What it doesn't do
It doesn't change latch. Refusing earlier, at the token read, is still a clear failure that writes no files.
The workflow runs only on main, in the release environment, so the real signed run happens after merge. Before that, the step's logic was checked locally for an absent folder, an empty folder and a folder holding a key, and
actionlintis clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01RFixJTbcqzMj4yVHDwaQCw