Place Formula checkout in Homebrew tap tree - #142
Conversation
Confidence Score: 4/5Not safe to merge until the workflow creates the canonical tap path’s parent directory before moving the checkout. A focused execution reproduced the failing filesystem operation when the tap owner directory is absent and confirmed that creating the parent makes the same operation succeed. Files Needing Attention: .github/workflows/ci.yml needs the destination-parent creation immediately before the tap checkout is moved.
What T-Rex did
|
| echo "Homebrew tap path is already occupied" >&2 | ||
| exit 1 | ||
| fi | ||
| mv "$tap_checkout" "$tap_path" |
There was a problem hiding this comment.
Fresh tap parent directory is missing
On a fresh runner where signed-page/tap has not been installed, brew --repository signed-page/tap returns the prospective path under Library/Taps/signed-page/homebrew-tap without creating Library/Taps/signed-page. This mv therefore fails under set -e with “No such file or directory”, so the tap updater never runs and the release branch is not produced. Create the destination parent before moving the authenticated checkout.
Artifacts
Focused fresh-tap move reproduction script
- The executable reproduction creates a temporary checkout and models Homebrew’s resolved signed-page tap path, comparing the missing-parent and created-parent cases; it demonstrates the required parent creation.
Move fails when the fresh tap parent is absent
- The executed before run reports `parent_exists_before=no`, then `mv` fails with No such file or directory and exits 1; this proves the workflow's current placement step fails at the same filesystem scope.
Move succeeds after creating the tap parent
- The executed after run creates the parent before the same move, then reports `mv_exit=0`, no checkout at the old location, and a directory at the destination; this proves the minimal fix.
Current Homebrew repository command source
- The captured current upstream Homebrew command implementation shows `tap_path` only constructs and echoes the `Library/Taps/<user>/homebrew-<repo>` path; it does not create any directories.
Affected update-tap workflow lines
- The captured numbered workflow excerpt shows the resolved tap path, absent parent creation, and failing `mv` at line 871; this identifies the exact affected location.
Moves the authenticated tap checkout into Homebrew's canonical tap directory before invoking the updater, then leaves a workspace symlink for post-job cleanup. Homebrew therefore recognizes Formula/pdf.rb as signed-page/tap/pdf.\n\nVerified: actionlint .github/workflows/ci.yml; git diff --check.