fix: guard plan sync for draft pull requests#7
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: ProverCoderAI#6
|
Warning Review limit reached
More reviews will be available in 49 minutes and 41 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
✨ 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 |
⏳ Usage Limit ReachedThe automated solution draft was interrupted because the OpenAI Codex usage limit was reached. 📊 Limit Information
🔄 How to ContinueAuto-resume is enabled. The session will automatically resume (with context preserved) when the limit resets. 🤖 Models used:
📎 Execution log uploaded as Gist (178KB)This session was interrupted due to usage limits. The session will automatically resume when the limit resets. |
🚨 Solution Draft FailedThe automated solution draft encountered an error: What you can do
Administrator-only CLI details, if any, are printed in the solver terminal log rather than in this issue comment. 🤖 Models used:
📎 Failure log uploaded as Gist (186KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
ты ничего не реализовал. можешь сделать то что было описано в Issues? |
|
🤖 AI Work Session Started Starting automated work session at 2026-06-10T10:19:03.900Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback. |
Keep captured plan items queued on the upload stack until the pull request is valid (open and ready for review). A draft PR has state "OPEN" but isDraft=true; previously plan-update comments were posted to draft PRs. Now sync queries isDraft, reports a DraftPullRequest status, and leaves items queued so they are not dropped before a valid PR exists. Fixes ProverCoderAI#6
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $2.131578📊 Context and tokens usage:
Total: (3.2K new + 62.4K cache writes + 2.4M cache reads) input tokens, 20.3K output tokens, $2.131578 cost 🤖 Models used:
📎 Log file uploaded as Gist (1325KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🟡 Ready for reviewHive Mind stopped automatic restart because the remaining failed check is an external review quota/credit limit, not a code failure it can fix. Checks not executed:
Action required:
Monitored by hive-mind with --auto-restart-until-mergeable flag. |
This reverts commit 87dd39d.
|
🤖 AI Work Session Completed Work session ended at 2026-06-10T10:28:24.273Z The PR will be converted back to ready for review. This comment marks the end of an AI work session. New comments after this time will be considered as feedback. |
Summary
Fixes #6.
The issue asks that captured plans stay on the local upload stack until the PR is valid, and not be dropped before they were actually uploaded to GitHub. PR #5 already guards closed/merged PRs; this PR extends the same guarantee to draft pull requests.
A draft PR reports
state: "OPEN"fromgh pr viewbut hasisDraft: true. Previouslyplan-to-gittreated any open PR as commentable and posted plan-update comments to draft PRs. Now sync waits until the PR is valid (open and ready for review) before posting, keeping items queued in the meantime — so a plan is never removed from the stack until it has actually been uploaded to a valid PR.Changes
src/github.rs: query theisDraftfield, addSyncStatus::DraftPullRequest, and short-circuit sync for draft PRs (leaving items queued).src/main.rs: printpull request #N is a draft; leaving plan items queued.README.md: document that closed, merged, or still-draft PRs are not commented on.changelog.d/: add a patch changelog fragment.How to reproduce / verify
The fix is covered by two new integration tests that drive the real binary against a fake
ghreturningstate: "OPEN", isDraft: true:hook_leaves_plans_queued_when_pr_is_draft— captured plan stays queued,posted_commentsempty, no comment API call.sync_reports_draft_pr_and_does_not_comment—syncprints the draft message and posts nothing.cargo test cargo fmt --check cargo clippy --all-targets --all-featuresAll tests pass (85 total), formatting and clippy are clean.