Repository navigation
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Code Review
This pull request introduces shadow-mode total PR-output suppression by adding a new helper script scripts/lib/shadow-suppress.sh and integrating it into the dev-lead lanes. When shadow mode is active, the scripts force a dry-run state (DEV_LEAD_DRY_RUN=true) to prevent any PR or issue output from escaping, routing it to a log file instead. Unit tests have been added to verify the suppression behavior. Feedback suggests using $BATS_TEST_TMPDIR instead of mktemp in the BATS tests to ensure automatic per-test isolation and cleanup.
Dev-Lead — waiting on PR blockers (intent: review-changes)PR: #1730 |
|
Note @don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically. |
|
No description provided. |
|
No description provided. |
Dev-Lead — review-changes (applied)Changes committed and pushed. |
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
|
Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-09-08T12:52:06Z. |
|
Auto-rebase failed — merge conflict — this branch has conflicts with dev-lead will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention. To resolve manually instead: |
|
Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-09-08T13:06:53Z. |
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
Superseded by automated re-review at
|
|
Auto-rebase failed — merge conflict — this branch has conflicts with dev-lead will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention. To resolve manually instead: |
|
Auto-rebase failed — merge conflict — this branch has conflicts with dev-lead will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention. To resolve manually instead: |
|
Auto-rebase failed — merge conflict — this branch has conflicts with dev-lead will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention. To resolve manually instead: |
|
Auto-rebase failed — merge conflict — this branch has conflicts with dev-lead will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention. To resolve manually instead: |
|
Auto-rebase failed — merge conflict — this branch has conflicts with dev-lead will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention. To resolve manually instead: |
| # ALL PR/issue output when active. Sourced from the caller's shadow_mode | ||
| # input (default false ⇒ today's behaviour). Nothing sets it yet. | ||
| DEV_LEAD_SHADOW_MODE: ${{ inputs.shadow_mode }} | ||
| SHADOW_OUTPUT_FILE: /tmp/dev-lead-shadow-output-${{ github.run_id }}.txt |
There was a problem hiding this comment.
SHADOW_OUTPUT_FILE is set unconditionally in the job env: even when inputs.shadow_mode is false. Because the handlers (scripts/dev-lead-fix-ci.sh:285, scripts/dev-lead-fix-issue.sh:636, scripts/dev-lead-fix-reviews.sh:346) branch on if [ -n "$capture_file" ] rather than if shadow_mode_active, every normal non-shadow run writes /tmp/dev-lead-shadow-output-<run_id>.txt and pipes run_writer_with_fallback ... | tee -a "$capture_file".
Running run_writer_with_fallback on the left side of a pipeline executes it in a subshell, discarding any shell state mutated inside run_writer_with_fallback (such as _ENGINE_EXHAUSTED_REASON across fix-ci retry cycles).
| fi | ||
|
|
||
| if [ "$DEV_LEAD_DRY_RUN" = "true" ]; then | ||
| if [ "$DEV_LEAD_DRY_RUN" = "true" ] && ! shadow_mode_active; then |
There was a problem hiding this comment.
Adding && ! shadow_mode_active here bypasses the only DEV_LEAD_DRY_RUN guard in scripts/dev-lead-fix-issue.sh.
Nothing after run_writer_with_fallback checks DEV_LEAD_DRY_RUN or shadow_mode_active: when DEV_LEAD_SHADOW_MODE=true, execution proceeds through admission_gate_allows, run_writer_with_fallback (which calls handle_engine_failure and posts comments/labels on the live issue if the engine fails), git push --set-upstream origin "$branch", gh pr create, label edits, and post_completion_claim on the live repository. This also breaks the new test @test "fix-issue: shadow on (normal run) → no PR create, no comment, exits 0" in tests/dev-lead/unit/test_fix_issue.bats:1461.
| prompt_file=$(build_prompt) | ||
|
|
||
| if [ "${DEV_LEAD_DRY_RUN:-false}" = "true" ]; then | ||
| if [ "${DEV_LEAD_DRY_RUN:-false}" = "true" ] && ! shadow_mode_active; then |
There was a problem hiding this comment.
Bypassing the dry-run early exit when shadow_mode_active is true causes a shadow run to enter the while [ "$cycle" -le "$MAX_CI_CYCLES" ] loop (line 280), where git commit and git push run unconditionally without checking DEV_LEAD_DRY_RUN or shadow_mode_active, pushing shadow commits directly to the live PR branch. In addition, hold_auto_merge (called just before build_prompt in main) disables auto-merge on the live PR because it is not gated on DEV_LEAD_DRY_RUN or shadow_mode_active.
| DEV_LEAD_DRY_RUN="${DEV_LEAD_DRY_RUN:-false}" | ||
| # In shadow mode, force the already-tested dry-run "post nothing" path so no PR | ||
| # output escapes. Must run before the budget/hold/dispatch posting sites below. | ||
| shadow_apply_suppression |
There was a problem hiding this comment.
Calling shadow_apply_suppression at line 77 sets DEV_LEAD_DRY_RUN="true" before the worktree checkout block (if [ "${DEV_LEAD_DRY_RUN:-false}" = "false" ] && [ -n "${PR_NUMBER:-}" ]; then ... checkout_pr_in_worktree ...), so a shadow run skips checking out the PR branch into a worktree. Then at line 329 (if [ "$DEV_LEAD_DRY_RUN" = "true" ] && ! shadow_mode_active), build_and_run bypasses the dry-run return and invokes run_writer_with_fallback inside the agent checkout (combsmith/.github-private) instead of the target PR worktree (and for INTENT_TYPE=rebase, the prompt instructs the engine itself to git push --force, which is not blocked by DEV_LEAD_DRY_RUN).
|
Auto-rebase failed — merge conflict — this branch has conflicts with dev-lead will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention. To resolve manually instead: |
|
Auto-rebase failed — merge conflict — this branch has conflicts with dev-lead will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention. To resolve manually instead: |
|
Auto-rebase failed — merge conflict — this branch has conflicts with dev-lead will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention. To resolve manually instead: |
|
Auto-rebase failed — merge conflict — this branch has conflicts with dev-lead will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention. To resolve manually instead: |
User description
Closes #1713
Implemented by dev-lead agent. Please review.
Summary by CodeRabbit
New Features
donpetry-botaccount.Tests
CodeAnt-AI Description
Add fail-closed shadow mode that suppresses PR and issue changes
What Changed
Impact
✅ No PR or issue changes during shadow runs✅ Invalid shadow settings cannot post externally✅ Suppressed results remain available for review💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.
Problem
See the linked issue.
Risk
Medium — changes GitHub Actions workflow behavior, which is exercised only post-merge; verify via the affected workflow runs.
Test plan
Tests added/updated:
tests/dev-lead/unit/test_fix_issue.bats,tests/dev-lead/unit/test_shadow_suppress.bats. Verification:bash scripts/dev-lead-lint.sh(shellcheck --severity=warning) ran pre-commit; the bats suite runs in CI.Rollback
Revert this PR. No non-revertible side effects (no tags, migrations, or external state).
Monitoring
Watch the affected workflow run(s) in the Actions tab and this PR's Lint check for regressions.