| name | plan-review-rerun-cli-drift-and-git-contention |
| description | Recover iterative plan-review work when provider CLI wrappers drift, fresh reviews expose stale governance text, and active git pre-push processes make committing unsafe. |
| version | 1.0.0 |
| category | workspace-hub-learned |
| tags | ["planning","adversarial-review","codex","gemini","governance","git-contention"] |
Plan Review Rerun: CLI Drift + Governance Hygiene + Git Contention
Use this when hardening a status:plan-review issue through repeated adversarial review waves, especially when provider dispatch partially fails or another agent/process is actively using git.
Trigger conditions
- A plan has old review waves (
r2, r3, etc.) and new review findings against newer text.
- Provider fanout returns
UNAVAILABLE due CLI syntax drift, not a substantive review.
- A fresh review identifies stale plan metadata, stale issue-status claims, or stale approval-artifact wording.
git add, git status, git commit, or git push are blocked by active pre-push/git processes or .git/index.lock.
Workflow
-
Revalidate live state before editing.
gh issue view <issue> --json labels,state,comments,url
- Read the plan header,
## Adversarial Review Summary, and docs/plans/README.md row.
- Check local approval marker only after live labels:
.planning/plan-approved/<issue>.md.
-
Treat provider wrapper failure as a tool problem, not review signal.
- Current Codex CLI may reject
codex exec --no-interactive with rc=2.
- If
plan-review-fanout.sh emits UNAVAILABLE (codex CLI failed ... unexpected argument '--no-interactive'), rerun Codex without --no-interactive or record Codex as unavailable.
- Do not count an UNAVAILABLE artifact as approval.
-
Patch the actual plan blockers from substantive providers.
- Example: if Gemini says tests install a dependency directly and bypass
pyproject.toml, change the plan to reinstall from project metadata (uv pip install --python <venv>/bin/python -e .) rather than pip install package.
- If adding a dependency absent from
uv.lock, prefer bare uv lock plus diff inspection over uv lock --upgrade-package <pkg>.
- If TDD-red tests might fail at collection time, require imports inside test functions so each intended test fails for the expected reason.
- If a plan requires creating a follow-up issue, include that GitHub action in the explicit scope boundary.
- For TOML/structured config edits, require TOML-aware edits or exact existing-array patches that preserve syntax.
-
Patch governance hygiene in the same pass.
- Header status/revision should match current reality (
draft v4, plan-review, etc.).
- Evidence should state the current live issue label, not historical
status:plan-approved drift after rollback.
- Acceptance criteria should require fresh current-draft review artifacts, not stale
-r3.md or old self-review artifacts.
- Risks should explain any earlier approval drift as resolved if the issue is now correctly back in
status:plan-review.
-
Re-review narrowly before broader rerun.
- Use a delegated or independent reviewer for a fast governance-hygiene review after patches.
GitHub progress comment template
#<issue> plan-redraft/re-review progress update.
Review results:
- Codex: UNAVAILABLE because <tool failure>. No substantive signal.
- Gemini/other: <VERDICT> with blockers: ...
Plan patches applied locally:
- ...
Follow-up review:
- <reviewer> returned <VERDICT> for governance hygiene.
Current landing status:
- Local files are patched, but not committed/pushed because <active git/pre-push process>. Avoiding git contention.
Local artifacts prepared for commit once git clears:
- <paths>
Pitfalls
- Do not downgrade a plan to approved just because a prior self-review returned APPROVE; stale self-review artifacts do not satisfy a fresh current-draft review requirement.
- Do not let
UNAVAILABLE Codex/Gemini artifacts hide the need for real cross-provider review.
- Do not run direct
pip install <missing-dep> as the green proof for a dependency-declaration fix; it can bypass the project metadata and mask the core bug.
- Do not force-remove
.git/index.lock while another agent's pre-push hook or git process is still active.