feat(ws): X3 — postPull hooks on ws sync (spec 11) - #69
Merged
Conversation
Adds a `macos` job on `macos-14` (arm64) so the darwin/arm64 RUNTIME target — not just the Linux-lane cross-compile — actually builds and passes its daemon-free tests on real hardware. Hosted macOS runners have no Docker, so the integration/e2e (daemon) steps stay on the ubuntu `ci` lane; this lane runs the CGO-free build, the `-race` unit suite, and a binary preflight (`version` + `--help`). Invoked via `go` directly rather than `make` (hosted macOS ships BSD make; the Makefile uses GNU features). Self-verifying: the job's result on this PR confirms the macОS target is green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`ws sync` now runs each project's `postPull` hooks when a fast-forward pull actually advances HEAD — the "I pulled new code, re-run setup" trigger. - `git.Head` (rev-parse HEAD) detects whether the pull moved the worktree; the SHA change IS the trigger, so no state ledger is needed (postPull runs exactly once per pulled revision; re-syncing with no new commits is a no-op). - Hooks come from each project's devstack.yaml; the full model is loaded best-effort, so an uncloned sibling degrades to git-only sync (with a [note]), never a hard failure. `--no-hooks` skips them. - Host hooks run in the repo dir; compose-exec hooks target the project stack if its generated compose exists. Default onFailure is `warn` so a broken setup hook can't trap a sync; an explicit `onFailure: abort` surfaces as a repo failure in the summary. Unit-tested: `git.Head` tracks commits; `runPostPull` executes host hooks in the repo dir, propagates an abort, and defaults to warn. Remaining X3: firstRun hooks (blocked on the provision phase's scope_key). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
ws syncruns each project'spostPullhooks when a fast-forward pull advancesHEAD— the "pulled new code, re-run setup" trigger (spec 11).How
git.Head(rev-parse HEAD) detects whether the pull moved the worktree. The SHA change is the trigger, so no state ledger is needed — postPull runs exactly once per pulled revision; re-syncing with no new commits is a no-op.devstack.yaml; the model is loaded best-effort, so an uncloned sibling degrades to git-only sync (with a[note]), never a hard failure.--no-hooksskips them.onFailureis warn (a broken setup hook can't trap a sync); explicitonFailure: abortsurfaces as a repo failure.Tests
git.Headtracks commits across a new commit;runPostPullexecutes a host hook in the repo dir, propagates anabort, and defaults towarn.make cigreen.Scope
Remaining X3:
firstRunhooks (blocked on the provision phase'sscope_key).🤖 Generated with Claude Code