Skip to content

fix: guard plan sync for draft pull requests#7

Open
konard wants to merge 3 commits into
ProverCoderAI:mainfrom
konard:issue-6-9b8d4b256f20
Open

fix: guard plan sync for draft pull requests#7
konard wants to merge 3 commits into
ProverCoderAI:mainfrom
konard:issue-6-9b8d4b256f20

Conversation

@konard

@konard konard commented Jun 9, 2026

Copy link
Copy Markdown

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" from gh pr view but has isDraft: true. Previously plan-to-git treated 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 the isDraft field, add SyncStatus::DraftPullRequest, and short-circuit sync for draft PRs (leaving items queued).
  • src/main.rs: print pull 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 gh returning state: "OPEN", isDraft: true:

  • hook_leaves_plans_queued_when_pr_is_draft — captured plan stays queued, posted_comments empty, no comment API call.
  • sync_reports_draft_pr_and_does_not_commentsync prints the draft message and posts nothing.
cargo test
cargo fmt --check
cargo clippy --all-targets --all-features

All tests pass (85 total), formatting and clippy are clean.

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: ProverCoderAI#6
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@konard, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2cb68e29-439d-419d-aa34-d225e4926241

📥 Commits

Reviewing files that changed from the base of the PR and between 06fe8bd and 2e29caf.

📒 Files selected for processing (5)
  • README.md
  • changelog.d/20260610_000000_guard_plan_sync_draft_prs.md
  • src/github.rs
  • src/main.rs
  • tests/integration/cli.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@konard

konard commented Jun 9, 2026

Copy link
Copy Markdown
Author

⏳ Usage Limit Reached

The automated solution draft was interrupted because the OpenAI Codex usage limit was reached.

📊 Limit Information

  • Tool: OpenAI Codex
  • Limit Type: Usage limit exceeded
  • Reset Time: in 1d 3h 58m (Jun 11, 12:27 AM UTC)
  • Session ID: 019eae12-4211-7293-8f9e-030c2a593dbd

🔄 How to Continue

Auto-resume is enabled. The session will automatically resume (with context preserved) when the limit resets.

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.5
  • Model: GPT-5.5 (gpt-5.5)

📎 Execution log uploaded as Gist (178KB)


This session was interrupted due to usage limits. The session will automatically resume when the limit resets.

@konard

konard commented Jun 9, 2026

Copy link
Copy Markdown
Author

🚨 Solution Draft Failed

The automated solution draft encountered an error:

The solver stopped while continuing pull request #7.

Reason: Auto-continue failed

What you can do

  • Resolve the repository, account, permissions, or environment problem described above, then rerun the solver.
  • If this requires elevated Hive Mind access, ask a Hive Mind administrator to handle the specific failure described above.

Administrator-only CLI details, if any, are printed in the solver terminal log rather than in this issue comment.

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.5
  • Model: GPT-5.5 (gpt-5.5)

📎 Failure log uploaded as Gist (186KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@skulidropek

Copy link
Copy Markdown
Member

ты ничего не реализовал. можешь сделать то что было описано в Issues?

@konard

konard commented Jun 10, 2026

Copy link
Copy Markdown
Author

🤖 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
@konard konard changed the title [WIP] Надо изучить а не пропадает ли план если PR не открывался то он не убирает ли его из стека? fix: guard plan sync for draft pull requests Jun 10, 2026
@konard konard marked this pull request as ready for review June 10, 2026 10:24
@konard

konard commented Jun 10, 2026

Copy link
Copy Markdown
Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost: $2.131578

📊 Context and tokens usage:

  • 75.4K / 1M (8%) input tokens, 20.3K / 128K (16%) output tokens

Total: (3.2K new + 62.4K cache writes + 2.4M cache reads) input tokens, 20.3K output tokens, $2.131578 cost

🤖 Models used:

  • Tool: Anthropic Claude Code
  • Requested: opus
  • Model: Claude Opus 4.8 (claude-opus-4-8)

📎 Log file uploaded as Gist (1325KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard

konard commented Jun 10, 2026

Copy link
Copy Markdown
Author

🟡 Ready for review

Hive 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:

  • CodeRabbit — Insufficient review credits

Action required:

  • Restore the external review credits/rate limit and rerun the review, or decide manually whether this PR can proceed.
  • No new AI session was started for this blocker.

Monitored by hive-mind with --auto-restart-until-mergeable flag.

@konard

konard commented Jun 10, 2026

Copy link
Copy Markdown
Author

🤖 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants