Skip to content

fix(patterns): add early-push detection to pr-codex-bot#390

Merged
RyderFreeman4Logos merged 1 commit intomainfrom
fix/pr-codex-bot-push-guard
Mar 10, 2026
Merged

fix(patterns): add early-push detection to pr-codex-bot#390
RyderFreeman4Logos merged 1 commit intomainfrom
fix/pr-codex-bot-push-guard

Conversation

@RyderFreeman4Logos
Copy link
Owner

Summary

  • Add early-push detection guard to pr-codex-bot Step 4 that warns when branch was already pushed before review
  • Change push command to --force-with-lease to ensure reviewed code overwrites any pre-pushed unreviewed code
  • Add explicit FORBIDDEN prerequisite in SKILL.md about pushing before invoking the skill

Context

The pr-codex-bot pattern enforces review-before-push via a REVIEW_COMPLETED precondition gate in Step 4. However, the orchestrator could push the branch before invoking the skill, bypassing this ordering. This fix adds runtime detection and documentation.

Test plan

  • weave compile passes for modified pattern
  • All 2453 unit tests + 16 E2E tests pass
  • Pattern/skill documentation synchronized

Closes #387

🤖 Generated with Claude Code

…ot (#387)

Add defensive guard to pr-codex-bot Step 4 that detects when the feature
branch was already pushed to remote before the skill ran, and warns that
unreviewed code may have been exposed. Changed push from plain `git push`
to `git push --force-with-lease` so the reviewed code always reaches the
remote.

Also added explicit FORBIDDEN note in SKILL.md prerequisites: pushing
before invoking the skill violates the review-before-push ordering.

Closes #387

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@RyderFreeman4Logos RyderFreeman4Logos merged commit b1fc6b8 into main Mar 10, 2026
3 of 6 checks passed
@RyderFreeman4Logos RyderFreeman4Logos deleted the fix/pr-codex-bot-push-guard branch March 10, 2026 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pr-codex-bot: enforce review-before-push ordering

1 participant