Skip to content

fix(ci): exclude draft PRs from conflict fixer - #8631

Merged
ericksoa merged 1 commit into
mainfrom
fix/conflict-fixer-skip-drafts
Aug 8, 2026
Merged

ericksoa merged 1 commit into
mainfrom
fix/conflict-fixer-skip-drafts

Conversation

@ericksoa

@ericksoa ericksoa commented Aug 8, 2026 •

Copy link
Copy Markdown
Member

Summary

Draft pull requests are no longer eligible for automatic conflict-resolution commits. Publication also rechecks draft state so a pull request that becomes a draft after discovery cannot be updated.

Changes

  • Exclude draft pull requests during conflict-fixer discovery.
  • Reject publication when the live pull request is a draft.
  • Cover both the normal exclusion and discovery-to-publication race.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: This only changes internal conflict-fixer automation.
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification:
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: no-docs-needed
  • Evidence: The change only excludes draft pull requests from internal conflict-fixer discovery and revalidates draft state before publication. No public CLI, API, configuration, supported workflow, documentation page, or code sample changed. Changed error text, terminology, test titles, structure, and voice were reviewed.
  • Agent: Codex Desktop

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run validate:pr passed after refreshing origin/main when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — vitest run --project integration test/pr-merge-conflict-fixer.test.ts (13 passed)
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result:
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Pre-commit and commit-msg hooks passed. The local pre-push TypeScript gate could not resolve generated dist/ modules in the fresh worktree; the focused suite above passed against the committed head.


Signed-off-by: Aaron Erickson [email protected]

Summary by CodeRabbit

  • Bug Fixes
    • Draft pull requests are now excluded from conflict-resolution selection.
    • Draft pull requests can no longer have resolution changes published.
    • Pull request publication status is checked before proceeding.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: bda11444-f9df-483d-872a-2fa8e0badfaf

📥 Commits

Reviewing files that changed from the base of the PR and between 36db1f4 and 58c94c2.

📒 Files selected for processing (3)
  • test/pr-merge-conflict-fixer.test.ts
  • tools/pr-merge-conflict-fixer/discover.mts
  • tools/pr-merge-conflict-fixer/publish.mts

📝 Walkthrough

Walkthrough

The conflict fixer now tracks pull-request draft status. Draft pull requests are excluded during discovery and rejected during publication validation. Tests cover default fixture values, draft conflict filtering, and publication after a pull request becomes a draft.

Changes

Draft pull request handling

Layer / File(s) Summary
Draft discovery filtering
tools/pr-merge-conflict-fixer/discover.mts, test/pr-merge-conflict-fixer.test.ts
PullRequest includes draft. Same-repository draft pull requests are excluded from conflict selection.
Draft publication validation
tools/pr-merge-conflict-fixer/publish.mts, test/pr-merge-conflict-fixer.test.ts
LivePullRequest includes draft. validatePublicationState rejects draft pull requests, with test coverage for the state change.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: apurvvkumaria, aasthajh

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes excluding draft pull requests from the conflict fixer.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/conflict-fixer-skip-drafts

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

@github-code-quality

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit 58c94c2 in the fix/conflict-fixer-s... branch remains at 96%, unchanged from commit 36db1f4 in the main branch.

@ericksoa
ericksoa merged commit 87f27ae into main Aug 8, 2026
57 of 61 checks passed
@ericksoa
ericksoa deleted the fix/conflict-fixer-skip-drafts branch August 8, 2026 21:21
@github-actions

github-actions Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / low confidence
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions
Status: Partial review preserved 0 canonical finding(s) and 1 terminology decision(s) before the advisor stopped.

Model lanes

  • GPT-5.6 Terra (primary): Failed after a partial review · low confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Failed

Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests.

1 semantic terminology decision

Terminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.

  • established — draft at tools/pr-merge-conflict-fixer/discover.mts:65: Use draft for the GitHub pull-request state.

E2E guidance

Advisory only. A maintainer can dispatch the default E2E suite against this exact revision.

Recommended E2E: None

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

@wscurran wscurran added chore Build, CI, dependency, or tooling maintenance area: ci CI workflows, checks, release automation, or GitHub Actions labels Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions chore Build, CI, dependency, or tooling maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants