fix: prove reused integration branches#25
Conversation
mberman84
left a comment
There was a problem hiding this comment.
Requesting changes for a reused-PR state transition bug, plus a required rebase. This head conflicts with current main; after preserving main's tests, two existing integration tests also need their mocked API sequences updated for the new ancestry calls. Please rebase, keep all current integration coverage, convert reused PRs back to draft when replay introduces a conflict, and add the reverse ready-to-draft regression. GitHub CI is still action_required; re-request review on the updated head.
| f"draft={'true' if conflict else 'false'}", | ||
| ) | ||
| number = int(pull["number"]) | ||
| if reused_existing_pull and conflict is None and pull.get("draft"): |
There was a problem hiding this comment.
This handles only draft-to-ready. If resetting a reused integration branch onto a newer base introduces a conflict, an existing non-draft PR remains marked ready even though the marker describes a partial batch. Convert the reused PR back to draft whenever conflict is non-null before publishing the new marker, and add a ready-to-draft replay test.
6c0ab91 to
2f844c3
Compare
|
Addressed the review feedback in the updated head. Reused integration PRs now convert back to draft with Verification: |
Read existing integration refs before replaying merges, reset stale safe branches back to the computed base, and record already-contained heads only after ancestry proof. Add regression coverage for stale bases, mismatched markers, idempotent reruns, and draft recovery. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2f844c3 to
e83c765
Compare
mberman84
left a comment
There was a problem hiding this comment.
Re-reviewed after a full semantic rebase and concurrency redesign. Integration candidates are now staged uniquely, immutably sealed, atomically published, and safely recoverable without shared-branch resets. Full suite: 241 passed, 3 skipped, 202 subtests; Ruff clean; final structured autoreview clean.
Summary
This replaces the earlier force-reset approach with immutable staging and seal ownership, avoiding branch-clobber races while retaining retry recovery.
Closes #19
Verification