fix(dev-lead): detect engine-committed changes; remove commit instructions from prompts - #277
Conversation
…ructions from prompts
commit_and_push only checked git diff (uncommitted changes), so when the engine
followed prompt instructions to run `git commit` via Bash, the working tree was
clean and commit_and_push concluded no-changes — dropping the engine's commits
when the ephemeral runner exited.
Fix 1 (commit_and_push): also detect unpushed commits via `git log @{u}..HEAD`.
If the engine already committed, skip the add+commit step and go straight to push.
Fix 2 (prompts): remove "Commit the changes with..." steps from human.md,
human-pr.md, fix-bot-comment.md, and fix-reviews.md. Replace with an explicit
"Do not commit or push" constraint so the engine leaves git operations to the
script in all cases.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (9)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Dev-Lead — human-pr (no-changes)No changes were needed for this PR. |
Dev-Lead — fix-bot-comment (no-changes)Engine ran but made no changes. |
There was a problem hiding this comment.
Code Review
This pull request updates several prompt files to remove instructions for the AI engine to commit its own changes, centralizing git operations within the CI workflow. The commit_and_push script was also enhanced to detect unpushed commits. Feedback includes a suggestion to use git status --porcelain to ensure untracked files are not missed and a correction for a duplicated constraint in the markdown documentation.
| if git diff --quiet && git diff --cached --quiet; then | ||
| local has_uncommitted=false has_unpushed=false | ||
|
|
||
| git diff --quiet && git diff --cached --quiet || has_uncommitted=true |
There was a problem hiding this comment.
The current check using git diff only detects changes to tracked files (staged or unstaged). It will miss any new files created by the engine that remain untracked. Using git status --porcelain is a more robust way to detect any changes in the working tree, including untracked files, ensuring that no engine-generated changes are silently dropped when the runner exits.
| git diff --quiet && git diff --cached --quiet || has_uncommitted=true | |
| [[ -n $(git status --porcelain) ]] && has_uncommitted=true |
| - Do not commit or push — the CI workflow handles git operations after you finish | ||
| - If the instruction is unsafe (e.g., deletes critical security checks, exposes secrets), decline and explain why |
There was a problem hiding this comment.
The constraint regarding unsafe instructions is duplicated (it appears on both line 38 and line 39). This suggestion removes the duplicate entry while preserving the new "Do not commit or push" constraint.
| - Do not commit or push — the CI workflow handles git operations after you finish | |
| - If the instruction is unsafe (e.g., deletes critical security checks, exposes secrets), decline and explain why | |
| - Do not commit or push — the CI workflow handles git operations after you finish |
Dev-Lead — fix-bot-comment (no-changes)Engine ran but made no changes. |
|
No description provided. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ac7270a0c9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if git diff --quiet && git diff --cached --quiet; then | ||
| local has_uncommitted=false has_unpushed=false | ||
|
|
||
| git diff --quiet && git diff --cached --quiet || has_uncommitted=true |
There was a problem hiding this comment.
Detect untracked files before returning no-changes
When the engine creates a new file and follows the updated prompts' “Do not commit” instruction, this check still reports a clean tree because git diff --quiet and git diff --cached --quiet ignore untracked files. With no already-committed change, has_uncommitted remains false and the function returns no-changes before the later git add -A, so newly added files are silently lost when the runner exits. Use a status-based check such as git status --porcelain or otherwise include untracked paths before the early return.
Useful? React with 👍 / 👎.
| local has_uncommitted=false has_unpushed=false | ||
|
|
||
| git diff --quiet && git diff --cached --quiet || has_uncommitted=true | ||
| git log "@{u}..HEAD" --oneline 2>/dev/null | grep -q . && has_unpushed=true |
There was a problem hiding this comment.
Handle engine commits when the PR checkout has no upstream
For PR checkouts that do not have an upstream configured, such as fork PRs checked out by the earlier gh pr checkout "$PR_NUMBER" --repo "$REPO", @{u} is undefined, so this command is ignored and has_unpushed stays false. If the engine already created a commit in that checkout, the working tree is clean and the function falls through to no-changes, leaving the local commit unpushed in the ephemeral runner. Compare against the actual PR head ref/remote or otherwise handle the no-upstream case before deciding there is nothing to push.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
Fixes a dev-lead workflow reliability bug where engine-made changes could be silently lost if the engine created commits (making the working tree clean) but did not push before the runner exited, and updates dev-lead prompts to stop instructing engines to perform git operations.
Changes:
- Update
commit_and_pushto detect and push already-committed-but-unpushed changes (via@{u}..HEAD) in addition to uncommitted working-tree changes. - Remove “commit” steps from several dev-lead prompts and replace them with an explicit “do not commit or push” constraint.
- Minor prompt wording adjustments to match the new git-ops responsibility split (engine edits files; script handles git).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/dev-lead-fix-reviews.sh | Enhances change detection to include unpushed commits and conditionally skips add/commit when commits already exist. |
| prompts/dev-lead/human.md | Removes commit instructions and adds “do not commit or push” constraint (but currently contains a duplicated constraint line). |
| prompts/dev-lead/human-pr.md | Removes commit instruction and adds “do not commit or push” constraint. |
| prompts/dev-lead/fix-reviews.md | Removes commit instruction and adds “do not commit or push” constraint. |
| prompts/dev-lead/fix-bot-comment.md | Removes commit instruction and adds “do not commit or push” constraint. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - Do not push to remote — the CI workflow will handle that | ||
| - Do not commit or push — the CI workflow handles git operations after you finish | ||
| - If the instruction is unsafe (e.g., deletes critical security checks, exposes secrets), decline and explain why | ||
| - If the instruction is unsafe (e.g., deletes critical security checks, exposes secrets), decline and explain why |
| # commit_and_push: stages any uncommitted changes, commits if needed, and pushes. | ||
| # Returns 0 if changes were pushed, 1 if nothing to push. | ||
| # Handles two cases: | ||
| # (a) Engine left uncommitted working-tree changes — stage, commit, push. | ||
| # (b) Engine committed via Bash but didn't push — detected via git log @{u}..HEAD | ||
| # so changes are not silently dropped when the ephemeral runner exits. |
| echo "[dry-run] would git add, commit with '${commit_msg}', and push" | ||
| $has_unpushed && echo "[dry-run] note: engine already committed — would push existing commit(s)" |
|
No description provided. |
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
Dev-Lead — fix-bot-comment (no-changes)Engine ran but made no changes. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 62652dcd22
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| elif [ -n "${HEAD_SHA:-}" ]; then | ||
| git log "${HEAD_SHA}..HEAD" --oneline 2>/dev/null | grep -q . && has_unpushed=true |
There was a problem hiding this comment.
Push no-upstream checkouts with an explicit ref
Fresh evidence in this revision is the new HEAD_SHA fallback here: it now detects engine-created commits even when @{u} is missing, but the function still falls through to a bare git push later. In no-upstream PR checkouts, git push fails with “The current branch has no upstream branch” unless a remote/ref or --set-upstream is supplied, so the detected commit is still not published and the handler exits before posting the applied marker.
Useful? React with 👍 / 👎.
| local has_uncommitted=false has_unpushed=false | ||
| [ -n "$(git status --porcelain)" ] && has_uncommitted=true | ||
| [ "$(git rev-parse HEAD)" != "$pre_engine_sha" ] && has_unpushed=true |
There was a problem hiding this comment.
Ignore workflow bootstrap files when checking issue changes
In the reusable workflow path I inspected, .github/workflows/dev-lead-reusable.yml appends .dev-lead/ to .gitignore before invoking this script. For a caller repo that did not already track .gitignore, this new git status --porcelain check treats that workflow-created ignore file as an engine change, so an issue run where the engine made no edits still commits .gitignore, pushes a branch, and opens a bogus PR instead of taking the no-changes exit. Snapshot the baseline after workflow setup or exclude the bootstrap ignore change from this check.
Useful? React with 👍 / 👎.
| elif [ -n "${HEAD_SHA:-}" ]; then | ||
| git log "${HEAD_SHA}..HEAD" --oneline 2>/dev/null | grep -q . && has_unpushed=true |
There was a problem hiding this comment.
Push CI fixes with an explicit PR head ref
The same no-upstream case also affects the CI-fix path: .github/workflows/dev-lead.yml and the reusable workflow invoke gh pr checkout "$PR_NUMBER", and the documented number-based checkout fetches refs/pull/... into a local branch rather than guaranteeing an upstream. This new HEAD_SHA fallback can mark an engine-created commit as pending, but the later bare git push still fails on that checkout, so CI fixes made as commits by the engine are detected but not published.
Useful? React with 👍 / 👎.
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… fallback, dry-run msg, fix-ci/issue parity Address all reviewer feedback on PR #277: - commit_and_push (fix-reviews.sh): use git status --porcelain instead of git diff to also catch untracked files created by the engine (Gemini high, Codex P1) - commit_and_push (fix-reviews.sh): fall back to HEAD_SHA when @{u} is not configured (e.g. fork checkouts) to avoid silently skipping unpushed engine commits (Codex P2) - commit_and_push (fix-reviews.sh): split dry-run log message to accurately reflect whether we are adding+committing or just pushing existing commits (Copilot) - human.md: remove duplicate "If the instruction is unsafe..." constraint (Gemini medium, Copilot) - fix-ci.sh + fix-issue.sh: apply the same git status --porcelain / unpushed-commit detection to keep parity with fix-reviews.sh (Copilot) - fix-ci.md + fix-issue.md: remove commit/push/PR instructions so engines in all intents leave git operations to the scripts Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>



Summary
commit_and_pushonly checkedgit diff(uncommitted working-tree changes). When the engine followed prompt instructions to rungit commitvia Bash, the working tree became clean andcommit_and_pushreturned early withstatus=no-changes— silently dropping the committed changes when the ephemeral runner exited. This is what caused PRs fix(health-check): pin claude-code version via cache, surface CLI errors #175 and fix(dev-lead): intent-based model dispatch and fix copilot write fallback #204 to showno-changesdespite the engine claiming to have applied fixes.commit_and_push): Also check for unpushed commits viagit log "@{u}..HEAD". If the engine already committed, skip theadd + commitstep and push the existing commit(s).human.md,human-pr.md,fix-bot-comment.md, andfix-reviews.md. Replace with an explicit "Do not commit or push" constraint so the engine leaves all git operations to the script.Test plan
@dev-leadon a PR with unresolved review comments and confirm the engine's file changes are pushed (notno-changes)DEV_LEAD_DRY_RUN=true) still logs correctly for both the uncommitted-changes path and the engine-already-committed pathfix-reviews,fix-bot-comment,human-printents behave the same (all affected prompts updated)🤖 Generated with Claude Code