fix(stokowski): make the before_run hook best-effort - #287
Merged
Merged
Conversation
The glean workflow's hook ran `git rebase origin/main || git rebase --abort`. On a dirty worktree the rebase refuses to start, and the abort then exits 128 because no rebase is in progress, so every dispatch in that workspace failed. EXT-68 retried it every 5 minutes until the orchestrator was stopped. The other three workflows used `set -eu`, which the Bash standard forbids, and left a half-finished rebase behind when it hit a conflict. All four now share one hook: skip the rebase when fetch or status fails or the tree is dirty, abort a failed rebase, and fail only when that abort fails. Also resolve leftover merge-conflict markers in the opus workflow's after_create hook, which made the file invalid YAML. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The root RepoTasks project depends on req, and it has no alias that fetches deps. In a fresh clone, `mix setup` therefore ran without its dependencies. Every after_create hook now runs `mix deps.get` at the top level before `mix setup`. Also correct the repository layout note in CLAUDE.md, which described the root project as having no deps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The repository layout described the root RepoTasks project as having no deps. It depends on req, so a fresh clone needs `mix deps.get` at the top level as well as in app/. (The previous commit's message mentioned this change, but the edit did not reach that commit.) Co-Authored-By: Claude Opus 5.5 <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.
Problem
EXT-68 stayed in
implementafter its run succeeded. One of the causes was thebefore_runhook inworkflow.glean.yaml:On a dirty worktree,
git rebaserefuses to start.git rebase --abortthen exits 128 ("no rebase in progress"), so the hook failed on every dispatch in that workspace. The orchestrator retried it every 5 minutes until it was stopped. The duplicate-worker bug that let this block a finished stage is fixed in bougyman/stokowski#13.The other three workflow files skipped the rebase on a dirty tree. But they used
set -eu, which the Bash standard forbids, and they left a half-finished rebase behind when the rebase hit a conflict.Changes
workflow.glean.yaml,workflow.opus.yaml,workflow.codex.yamlandworkflow.claude.yamlnow share onebefore_runhook:git fetchorgit statusfails, or when the worktree is dirty.workflow.opus.yaml: resolve leftover merge-conflict markers inafter_create, which made the file invalid YAML. Themainside (cd app && mix deps.get) is kept, becausemix setupdoes not fetch the app's dependencies.after_createhooks now runmix deps.getat the top level beforemix setup. The rootRepoTasksproject depends onreqand has no alias that fetches deps, so a fresh clone ranmix setupwithout them.AGENTS.md(whichCLAUDE.mdlinks to): the repository layout note no longer says the root project has no deps.Verification
before_runvalues are identical./bin/shagainst a scratch repo:.git/rebase-mergeleft, exit 0.credo --strictclean.🤖 Generated with Claude Code