Repository navigation
docs(git-workflow): wait for CI and fix code-caused check failures - #138
Conversation
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
|
||
| After every push, wait for the PR's checks before handling review findings or reporting. | ||
|
|
||
| 1. Run `gh pr checks <n> --watch --fail-fast` in the background and wait for its completion |
There was a problem hiding this comment.
P2: Running gh pr checks <n> --watch --fail-fast right after a push can exit before the new head commit has any check runs registered. Depending on the gh version, it either errors with "no checks reported on the '' branch" or exits non-zero right away. Since step 2 treats any completion as "on failure", a lane can misread this as a CI failure (and then likely an "Undetermined" LANE-BLOCKED). Consider saying to wait until checks for the pushed head SHA appear (or to rerun the watch if it reports no checks) before treating a non-zero exit as a failure.
| locally, push, and return to step 1. | ||
| - External (AI review usage limit, GitHub or runner outage, network): do not change the work. | ||
| If a retry can help, run `gh run rerun <run-id> --failed` once; otherwise stop with | ||
| `LANE-BLOCKED: <check name and reason>`. |
There was a problem hiding this comment.
P3: The External branch doesn't say what happens after gh run rerun <run-id> --failed. Unlike the Code-caused branch, it has no "return to step 1", and it doesn't say that a second failure of the rerun ends in LANE-BLOCKED. Also, this section applies to every delivery, not only herdr lanes, so a non-lane session is told to emit a LANE-* marker. Suggestion: "…once and return to step 1; if it fails again, stop with LANE-BLOCKED: … (outside a lane, report the reason to the user)."
Review summaryThis PR only changes documentation (
The allowed-command rules already cover 🤖 Generated with Claude Code |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
| - Code-caused (test, lint, format, type check, Nix build or check): fix it, run the same check | ||
| locally, push, and return to step 1. | ||
| - External (AI review usage limit, GitHub or runner outage, network): do not change the work. | ||
| If a retry can help, run `gh run rerun <run-id> --failed` once and return to step 1; if the | ||
| check fails again or a retry cannot help, stop and report the check name and reason. | ||
| - Undetermined: do not guess a fix; stop and report the check name and reason. |
There was a problem hiding this comment.
P1: a review check that fails on findings has no category here, so the lane stops instead of fixing.
claude-review and codex-review are both CI checks under all-green. This review job returns a blocking_findings count, which suggests the check fails when a P0 or P1 finding is raised. I couldn't open the pinned reusable workflow to confirm this.
If the check does fail on findings, this happens:
gh pr checks --watch --fail-fastexits on the review failure.- The cause is not code-caused (test/lint/format/type/Nix) and not external, so it lands in Undetermined.
- The lane stops with
LANE-BLOCKEDbefore it reaches "Review on GitHub" steps 2–3, which say to read and fix every finding. - Step 1 (line 92) also requires waiting until
all-greenpasses. With blocking findings it never passes, so the review loop can't start.
Suggested fix: add a category for review checks: "failed because of findings → go to Review on GitHub step 2". Also change line 92 to "until all checks finish" rather than "until all-green passes".
Review summary1 finding (P1). This PR only changes
The rest looks fine: the |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
| [reusable-workflows README](https://github.com/furedea/reusable-workflows#readme). | ||
|
|
||
| 1. After pushing, wait for `all-green`. | ||
| 1. After pushing, [wait for CI](#wait-for-ci) until every check has finished; failures that are review findings are |
There was a problem hiding this comment.
P2: This says to wait "until every check has finished", but the Wait for CI procedure it points to uses gh pr checks <n> --watch --fail-fast. That command exits on the first failure, and a review check failing because it raised findings is a normal failure here. So the watch can return while codex-review or other checks are still running, and step 3 sends the agent straight back to this section. Nothing tells the agent to keep waiting for the remaining checks, so it can read findings while one reviewer is still running and then report early. Consider adding a line that says: after a review-findings failure, run gh pr checks <n> --watch without --fail-fast until every check has finished. A related gap: the aggregate all-green check fails whenever any check fails and fits none of the step 3 categories, so it could be classed as "Undetermined" and lead to an unneeded LANE-BLOCKED.
Review summaryThis PR only changes docs: it adds a Wait for CI section to Findings:
No blocking issues. 🤖 Generated with Claude Code |
…ify all-green Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Review summary: I found nothing that should block this PR. It only changes docs ( |
…ishes Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Review summaryI found no blocking issues. This PR only changes documentation (
Findings: P0 0 · P1 0 · P2 0 · P3 0 |
…eck names Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
| After every push, wait for the PR's checks before handling review findings or reporting. | ||
|
|
||
| 1. Print the pushed commit with `git rev-parse HEAD`, then find its CI run with | ||
| `gh run list --commit <sha>`, writing the literal SHA (a shell variable triggers a confirmation | ||
| prompt); the run exists from push time, possibly `queued`. If none is listed, wait briefly and look again, up to a fixed | ||
| bound (for example 2 minutes). If none appears within it, the workflow did not trigger: stop and | ||
| report instead of waiting forever. | ||
| 2. Wait for each relevant run with `gh run watch <run-id> --exit-status` as one blocking background | ||
| command and take its completion notification. Do not poll: one blocking command, or one bounded | ||
| wait for the run to appear, is fine; repeated manual checks across turns are not. | ||
| 3. When the runs have finished, confirm the repository's required check (`all-green` where it | ||
| exists) with `gh pr checks <n> --required`. |
There was a problem hiding this comment.
P2: This section says "After every push" and isn't limited to particular repositories, but it assumes the repo has a CI workflow and at least one required check. Step 1 tells the agent to stop and report when no run shows up within the bound. In a repo that has no Actions workflow for PRs, every push will end in a stop (or LANE-BLOCKED for a lane). Step 3 has a similar gap: if a repo has no required checks configured, gh pr checks <n> --required prints "no required checks reported" and exits non-zero. The agent can read that exit code as a failed check, and since no failing check fits any bucket in step 5 it ends up as "Undetermined" and stops. Consider saying what to do when the repo has no CI or no required checks (for example, skip this section, or fall back to gh pr checks <n>).
Review summaryReviewed the new Wait for CI section in
Other things I checked:
|
…g to wait for Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Review summaryNo blocking findings. This PR changes only docs (
The PR adds no executable behavior, so no tests are needed. Blocking findings (P0/P1): 0 |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Review summaryNo P0–P3 findings. This PR only changes docs (
🤖 Generated with Claude Code |
概要
lane が PR を出したあとの CI チェックの扱いを
git-workflowの delivery 手順に追加した.delivery.mdに「Wait for CI」節を追加:push 後にgh run list --commit <sha>で CI run を探し(上限付きで待つ),gh run watch <run-id> --exit-statusを裏で実行して通知を待つ(ポーリングしない).完了後gh pr checks <n> --requiredで必須チェックを確認するgh pr checks <n>で失敗チェックを特定し,gh run view <run-id> --log-failedでログを読むLANE-BLOCKED.判別できない場合も推測で直さずLANE-BLOCKEDherdr-delegationのLANE-READY/LANE-BLOCKEDの条件は既存の記述(required checks green かつ未対応の指摘なし,それ以外は理由付きLANE-BLOCKED)と矛盾しないため変更していない.Closes #136
計画コメント: #136 (comment)
検証
uv run --with pytest python -m pytest tests/hooks/test_allowed_command.py:265 passed(gh pr checks,gh run view|rerunは既存ルールで許可される)計画からの逸脱
なし.
🤖 Generated with Claude Code