Repository navigation
feat: implement issue #1473 — [Fleet Monitor] petry-projects/.github-private — .github/workflows/auto-rebase.yml - #1476
Conversation
…private — .github/workflows/auto-rebase.yml
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
🤖 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 · |
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
There was a problem hiding this comment.
Code Review
This pull request introduces an integration test script (test_auto_rebase_retry_no_action_resolution.py) to ensure that the auto-rebase retry workflow remains resilient during GitHub action-resolution outages by verifying it does not depend on marketplace actions, uses the correct script, and has the necessary permissions. The reviewer suggested improving the defensive validation and error handling when parsing the workflow YAML file to raise clearer diagnostic errors.
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe retry workflow no longer uses checkout or marketplace actions. It downloads the retry script with ChangesAuto-rebase retry resilience
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant RetryJob
participant GitHubContentsAPI
participant TemporaryScript
RetryJob->>GitHubContentsAPI: Request retry script with gh api
GitHubContentsAPI-->>RetryJob: Return script contents
RetryJob->>TemporaryScript: Write and execute downloaded script
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/dev-lead/integration/test_auto_rebase_retry_no_action_resolution.py`:
- Around line 76-84: Strengthen the validation around RETRY_SCRIPT in the test’s
run-body inspection so it requires an actual gh api contents-endpoint download
with raw output written to a file, followed by execution of that downloaded
file. Reject steps that only mention or echo the script, while preserving the
guard that the retry job uses the tested script for action-resolution
resilience.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 6dde0d8e-ca1c-4733-a3d5-7265e822c9e2
📒 Files selected for processing (3)
.github/workflows/auto-rebase-retry.yml.github/workflows/test-dev-lead.ymltests/dev-lead/integration/test_auto_rebase_retry_no_action_resolution.py
|
@coderabbitai resolve |
Dev-Lead — fix-reviews (applied)Changes committed and pushed. |
✅ Action performedComments resolved and changes approved. |
Auto-dismissed (#617): coderabbitai[bot] CHANGES_REQUESTED on a superseded commit. The bot re-reviews the new head automatically — a valid concern will return as a fresh review.
Dev-Lead — waiting on PR blockers (intent: review-changes)PR: #1476 |
|
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. |
Dev-Lead — review-changes (applied)Changes committed and pushed. |
|
CI checks on this PR are still running. Once they complete, re-mention Posted by the donpetry-bot PR-review cascade. |
Dev-Lead — review-changes (applied)Changes committed and pushed. |
Dependency Advisory
Risk Legend
DetailsAll dependency changes appear low-risk. No action required. The only changes here are housekeeping: the committed |
|
|
CI checks on this PR are still running. Once they complete, re-mention Posted by the donpetry-bot PR-review cascade. |
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 81c756cb0624b999e0b4c30b3a5d9e3e9807fadb
Review mode: triage-approved (single reviewer)
Summary
Makes the Auto-rebase retry handler resilient to GitHub action-resolution outages by removing its only marketplace-action dependency (actions/checkout) and self-fetching scripts/auto-rebase-retry.sh from the default branch via the gh REST contents API. Adds a regression-guard CI job/test enforcing zero uses: steps and the required permissions, and removes accidentally-committed node_modules/bats (the bulk of the 5,919 deletions).
Linked issue analysis
Closes #1473 (Fleet Monitor DEGRADED alert on auto-rebase.yml, 33.3% failure rate). Root cause was substantively addressed: the failed run stemmed from a transient 503 in the action-resolution service, and the retry handler itself hung resolving actions/checkout during the same outage. The fix removes that dependency entirely, so the self-heal path no longer shares the failure mode it heals. A new CI check (auto-rebase-retry-resilience, green on this PR) guards against regression.
Findings
- Security: no new concerns. The fetched script comes from this repo's default branch via authenticated API — trust-equivalent to the checkout it replaces (workflow_run handlers already run from the default branch). Job permissions are minimal and explicit (actions: write, contents: read); workflow_run event data is passed via env vars, not interpolated into shell. The new test job pins actions/checkout to the same SHA already used repo-wide.
- Scope: auto-rebase-retry.yml is a documented repo-specific workflow (AGENTS.md exception), not a frozen thin caller stub; caller-stub-freeze and stub-structure checks passed.
- Prior bot review threads (3, all on substring-matching heuristics in the new test) are resolved; the test now verifies explicit fetch-and-execute. CodeRabbit approved.
- Non-blocking nit: package-lock.json "name" churns pr-1447 → pr-1476, indicating the lockfile is regenerated from ephemeral agent workdir names.
- Secret scan: run_secret_scanning MCP tool unavailable in this environment; gitleaks CI check is green.
CI status
All substantive checks green: actionlint, ShellCheck, CodeQL (actions + python), gitleaks, SonarCloud, unit tests, bats, agent-shield, dependency-audit, and the new auto-rebase-retry-resilience guard. Three CANCELLED entries (dev-lead / dispatch, dev-lead / ci-relay, review / review) are superseded agent-orchestration runs, not code-quality gates; the current dispatcher (pr-auto-review / check-and-dispatch) succeeded.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.
|
Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-08-07T10:37:20Z. |
…p of engine.sh + 3 more (#1485) (#1487) * fix: restore trunk scripts to single-definition state (#1485) Surgical deduplication of the corrupted scripts documented in #1485: - scripts/engine.sh: restored to 79fc05d (last clean, 1583 lines). Verified zero content loss: every unique line on corrupted main exists in the clean version; the only main-side extras were 6 stale lines from the retired LSP pilot era carried in by duplicate blocks. - scripts/dev-lead-fix-reviews.sh: 2798 -> 1339 lines. Kept the head (unique logic), one canonical copy of each of the 9 functions that had been duplicated 3-6x, and the executable tail. Canonical variant adjudications: post_reviews_rate_limited keeps the copy with the dev-lead rate-limit-ack idempotency marker on all three ack sites (the shadowed-in variant had dropped one marker line in conflict resolution); commit_and_push keeps the newest-feature copy (#1340 no-op guard, #1311 push_no_clobber, human/human-pr intents). - scripts/dev-lead-fix-ci.sh: removed byte-identical duplicate post_exhaustion definition (present since 2026-06-23). - scripts/post-pr-review.sh: removed byte-identical duplicate mark_prior_agent_items_obsolete definition (back to its clean-era 303 lines). - package.json / package-lock.json: removed. Orphaned remnants of the #1292 bats vendoring; the node_modules tree itself was already removed by #1476, CI installs bats via apt-get, and no workflow consumes these manifests. Verified: duplicate-definition sweep over scripts/*.sh returns empty; bash -n passes on all touched files; no function name defined on corrupted main is absent from the restored files (pure-duplication corruption, no unique symbols lost). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…private — .github/workflows/auto-rebase.yml (#1476) * feat: implement issue #1473 — [Fleet Monitor] petry-projects/.github-private — .github/workflows/auto-rebase.yml * fix(reviews): address review comments [skip ci-relay] * chore: dev-lead update (review-changes) [skip ci-relay] * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…private — .github/workflows/auto-rebase.yml (#1476) * feat: implement issue #1473 — [Fleet Monitor] petry-projects/.github-private — .github/workflows/auto-rebase.yml * fix(reviews): address review comments [skip ci-relay] * chore: dev-lead update (review-changes) [skip ci-relay] * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…p of engine.sh + 3 more (#1485) (#1487) * fix: restore trunk scripts to single-definition state (#1485) Surgical deduplication of the corrupted scripts documented in #1485: - scripts/engine.sh: restored to 79fc05d (last clean, 1583 lines). Verified zero content loss: every unique line on corrupted main exists in the clean version; the only main-side extras were 6 stale lines from the retired LSP pilot era carried in by duplicate blocks. - scripts/dev-lead-fix-reviews.sh: 2798 -> 1339 lines. Kept the head (unique logic), one canonical copy of each of the 9 functions that had been duplicated 3-6x, and the executable tail. Canonical variant adjudications: post_reviews_rate_limited keeps the copy with the dev-lead rate-limit-ack idempotency marker on all three ack sites (the shadowed-in variant had dropped one marker line in conflict resolution); commit_and_push keeps the newest-feature copy (#1340 no-op guard, #1311 push_no_clobber, human/human-pr intents). - scripts/dev-lead-fix-ci.sh: removed byte-identical duplicate post_exhaustion definition (present since 2026-06-23). - scripts/post-pr-review.sh: removed byte-identical duplicate mark_prior_agent_items_obsolete definition (back to its clean-era 303 lines). - package.json / package-lock.json: removed. Orphaned remnants of the #1292 bats vendoring; the node_modules tree itself was already removed by #1476, CI installs bats via apt-get, and no workflow consumes these manifests. Verified: duplicate-definition sweep over scripts/*.sh returns empty; bash -n passes on all touched files; no function name defined on corrupted main is absent from the restored files (pure-duplication corruption, no unique symbols lost). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>



User description
Closes #1473
Implemented by dev-lead agent. Please review.
CodeAnt-AI Description
Keep Auto-rebase retries running during GitHub action-resolution outages
What Changed
Impact
✅ Auto-rebase self-healing during action-resolution outages✅ Fewer cancelled retry jobs✅ Failed Auto-rebase runs can retry without checkout💡 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.
Summary by CodeRabbit
Reliability
Tests