fix: serialize pre-push hook to avoid dist/ race#218
Merged
Conversation
The parallel pre-push commands raced: 'just check' (via check:packed-package) and 'just build' both rebuild packages/ghost/dist while 'just test' runs CLI tests against dist/bin.js, failing flakily. Run 'just ci' (check, test, build in order) instead.
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.
Category: infrastructure
User Impact: Contributors no longer hit flaky pre-push failures caused by parallel hook commands racing on build output.
Problem: The pre-push hook ran
check,test, andbuildwithparallel: true. Bothjust check(viacheck:packed-package) andjust buildrebuildpackages/ghost/distwhilejust testruns CLI tests againstdist/bin.js, so pushes failed flakily on tests that pass in isolation. This bit during the docs pass in #216, which had to push with--no-verify.Solution: Replace the three parallel commands with one serial
just ci(check → test → build, already defined in the justfile), with a comment explaining why serial is deliberate.Validation:
git push: pre-push hook ran the serializedjust ciend to end and passed (this branch's own push)Changeset: not needed — repo hook config only; nothing ships through
@design-intelligence/ghost.Ghost Review:
ghost check/ghost review: not run — no fingerprint-claimed surface touched.File changes
lefthook.yml
Pre-push: drop
parallel: trueand the three separate commands; runjust ciserially. Comment documents the dist/ race so nobody re-parallelizes it later.Screenshots/Demos: N/A