dotfiles-autoupdate: run the ssh rewrite before the gantry CLI refresh - #133
dotfiles-autoupdate: run the ssh rewrite before the gantry CLI refresh#133DJRHails wants to merge 2 commits into
Conversation
ensure_gantry_cli_fresh clones the private DJRHails/gantry repo over https and relies on ensure_github_ssh_rewrite's insteadOf to authenticate on keyed hosts — but it ran first. A keyed host whose ~/.gitconfig.github-ssh include-file is missing (exactly the migration case the rewrite step exists for, including the run that pulls the commit moving the rewrite out of the tracked gitconfig) hit an unauthenticated clone, logged 'gantry: FAILED', and only converged a day late. Reorder the calls and state the ordering constraint in the function's comment. Post-merge review finding (F1) from PR #131.
DJRHails
left a comment
There was a problem hiding this comment.
Automated review — direct single-pass (7-line follow-up delta from PR #131's post-merge review; no agent fan-out). The reorder itself checks out: ensure_github_ssh_rewrite only reads ~/.ssh/config and writes ~/.gitconfig.github-ssh, so it has no dependency on the gantry step, and it still runs after update_dotfiles so a freshly-pulled include directive is honored the same day. One finding posted inline; its thread is resolved as the fix lands.
F1 (P2, test gap): the ssh-rewrite-before-gantry-clone ordering this PR fixes was enforced only by a comment; a future shuffle of the call list would regress it silently and pass every existing check. Add a behavior test to tests/dotfiles-autoupdate.test.sh: a uv stub records whether ~/.gitconfig.github-ssh existed when 'uv tool install' fired, stub_curl serves the gantry /health version, and a keyed host asserts the rewrite was in place at clone time. Verified the test catches the regression: reverting the call order fails it with [missing], restoring passes. Quality pipeline: autoupdate + link-symlinks suites pass, bash -n and shellcheck clean on both touched scripts.
Review SummaryDirect single-pass review (7-line follow-up delta from PR #131's post-merge review — no agent fan-out). The reorder is verified correct: Findings
Verification
Commit47de79e — Verdict: approve |
Follow-up to #131 (already merged), fixing the one finding from its post-merge review.
ensure_gantry_cli_freshclones the privateDJRHails/gantryrepo overgit+httpsand — per its own comment — relies on theinsteadOfrewrite thatensure_github_ssh_rewritewrites, yet it ran before that step. On a keyed host whose~/.gitconfig.github-sshinclude-file is missing (exactly the migration case the rewrite step exists for, including the very run whoseupdate_dotfilespulls the commit that moved the rewrite out of the tracked gitconfig), a drifted install hit an unauthenticated clone, loggedgantry: FAILED, and only converged a day late.One-line reorder of the call sequence, plus the ordering constraint stated in the function's comment so a future shuffle doesn't silently regress it.
ensure_github_ssh_rewritehas no dependency in the other direction.Verified:
bash -n,shellcheckclean,shfmtclean on the touched lines, all pre-commit hooks passed.via gantry