Add make preflight as the one definition of "safe to commit" - #51
Merged
Conversation
home/bin.Darwin/code and subl were tracked symlinks pointing directly into /Applications/*.app -- a snapshot of an `ln -s` that can only ever be valid on the one machine that had the app installed at commit time, and dangles as a broken symlink everywhere else (including any CI runner). Every other entry in home/bin.Darwin is a plain executable script; these two were the only symlinks in the directory. Both target paths are still the canonical ones per each vendor's own docs -- the fix is capturing them as scripts that check for the app and exec it, rather than as a symlink baked into git. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
test and the check-* targets were duplicated between the Makefile and ci.yml by hand, and had already drifted: check-symlinks was defined but never run by CI at all. preflight runs test plus every check-* target in one place, and ci.yml now just calls it -- a new check-* target is covered by both without a second edit to the workflow. check-symlinks can only join preflight/CI now that the prior commit removed the two /Applications-pointing symlinks it was tripping on. Resolves #40
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.
Resolves #40
Problem
The list of things to run before committing exists only inside the CI workflow, and it's already incomplete:
check-symlinksis defined in the Makefile but was never actually run by CI.Motivation
The Makefile's
check-*targets andci.yml's step list are two separate definitions of "checked" that already drifted once, and are about to drift again — an open PR adds a fifthcheck-*target and, without this change, would need a second hand-edit toci.ymlto avoid landing orphaned from CI the same waycheck-symlinksdid.Proposed Solution
Added
make preflight(testplus everycheck-*target) as the single definition, and reducedci.ymlto environment setup +make preflight+ the temp-$HOMEdeploy apply/audit smoke step (kept separate since it exercises the deploy mechanism against real state rather than checking committed content). A newcheck-*target is now picked up by both without touching the workflow.Folding
check-symlinksin surfaced a real gap:home/bin.Darwin/codeandsublwere committed symlinks pointing straight into/Applications/*.app, which can only resolve on the one machine that had those exact apps installed — never true on a CI runner. Replaced both with small scripts that check for the app andexecit. Both target paths are still the canonical ones per VS Code's and Sublime Text's own docs; the fix is capturing them as scripts rather than as a symlink baked into git, matching every other entry in that directory (already plain scripts, not symlinks).Also updated
CLAUDE.md's Commands section to documentmake preflightand note the deploy-smoke-test scoping.Feedback
The
code/sublconversion is bundled in here rather than split into its own PR — it was a necessary enabler forcheck-symlinksto safely joinpreflight/CI, not scope creep, but worth a second opinion on whether that call was right. I could only verifycheck-editorconfigand the macOS leg of CI by inspection (noeditorconfig-checkeror Mac available in this sandbox) — worth a close look on the macOS runner once CI runs.