
How to Use Finalize: Publishing Your Draft PR
Introduction
When all phases of Dev Run complete, a draft PR is created on GitHub. However, this draft PR cannot be merged as-is.
That's where Finalize comes in. Finalize converts a reviewed draft PR into a public PR, making it merge-ready.
Why is this step necessary? It's rooted in DevLoop Runner's design philosophy: human review before production deployment. No matter how capable the AI is, the final call belongs to a human. Finalize is that "human approval gate."
This article covers how Finalize works, the execution steps, a pre-Finalize review checklist, and the merge workflow.
What Is Finalize?
Finalize converts a draft PR created by Dev Run into a "public PR."
Loading diagram...
Draft PR vs. Public PR
| State | Draft PR | Public PR (After Finalize) |
|---|---|---|
| GitHub display | "Draft" label | Normal PR |
| Merge status | Cannot merge | Can merge |
| CI/CD | May run depending on config | Runs normally |
| Review requests | Not sent | Can be requested |
| Purpose | Review AI-generated code | Ready for production |
Dev Run creates draft PRs as a safety measure: "don't make AI-generated code immediately mergeable."
What Finalize Does
When you execute Finalize, the following processes run in order.
1. Commit Cleanup
During Dev Run, AI creates multiple commits across different phases. Finalize organizes these commits into meaningful units.
Before (Pre-Finalize):
abc1234 [Phase 5] Implementation: add dateFormat utility
def5678 [Phase 5] Implementation: fix import path
ghi9012 [Phase 6] Test Implementation: add dateFormat tests
jkl3456 [Phase 7] Testing: fix failing test
mno7890 [Phase 8] Documentation: update README
After (Post-Finalize):
xyz1234 Add dateFormat utility with tests and documentation
Clean commit history makes future git log browsing and bug tracking much easier.
2. PR Publication
The draft PR is converted to a public PR. This enables review requests and merging.
3. PR Description Finalization
The report generated in Dev Run's Phase 9 (Report) is set as the PR description. It includes a summary of changes, test results, and impact scope.
How to Execute Finalize
Steps
- Open the job detail screen in DevLoop Runner
- Confirm Dev Run is complete (evaluation result is PASS or PASS WITH ISSUES)
- Review the PR content (see checklist below)
- Click the "Finalize" button
- Click "Execute" in the confirmation dialog
- Wait for Finalize to complete (usually 1-2 minutes)
- Verify the public PR on GitHub
Conditions for Finalize
| Condition | Description |
|---|---|
| Dev Run is complete | All phases must be finished |
| Evaluation is PASS or PASS WITH ISSUES | FAIL evaluations cannot be finalized |
| Not already finalized | Prevents double execution |
When Evaluation Is FAIL
If the project evaluation is FAIL, Finalize cannot run. You have these options:
- Revise and re-run: Improve the Issue description and start a new Dev Run
- Rollback: Roll back to the problematic phase and re-run
- Manual fix: Manually fix the draft PR's branch, then resume Dev Run
Pre-Finalize Review Checklist
Before executing Finalize, verify the PR content with this checklist.
Code Quality
- Do changes meet the Issue requirements?
- Do they follow coding conventions?
- Is there no unnecessary code (debug logs, TODO comments, etc.)?
- Are there no security concerns (hardcoded secrets, etc.)?
- Is there no negative performance impact?
Tests
- Do all tests pass?
- Is test coverage adequate?
- Are error cases tested, not just happy paths?
- Do test names accurately describe what they test?
Documentation
- Has documentation been updated?
- Does documentation content match the code?
- Are new feature usage instructions included?
Impact Scope
- Are there no unexpected file changes?
- Is existing functionality unaffected?
- Is external API/interface compatibility preserved?
Post-Finalize Merge Workflow
After Finalize completes, follow your normal GitHub PR merge workflow.
Loading diagram...
Choosing a Merge Method
| Method | Benefit | Best For |
|---|---|---|
| Merge Commit | Complete history preserved | When you want detailed change history |
| Squash and Merge | Condensed to 1 commit | When Finalize has already cleaned up commits |
| Rebase and Merge | Linear history | When you want a clean branch integration |
Since Finalize already cleans up commits, Squash and Merge or Merge Commit is suitable in most cases.
Post-Merge Verification
After merging, verify:
- CI/CD pipeline completes successfully
- Deployment proceeds normally (if auto-deploy is configured)
- Production behavior check (if needed)
Finalize FAQ
Q: Can I undo a Finalize?
Finalize itself cannot be undone. However, since the public PR hasn't been merged yet, you can close the PR if needed.
Q: Can I manually modify the draft PR before Finalize?
Yes. You can add manual commits to the draft PR's branch before executing Finalize. Note that manual commits will be included in Finalize's commit cleanup process.
Q: Can a team member run Finalize on my behalf?
Yes. Any team member with repository access can execute Finalize, not just the person who ran Dev Run.
Q: Can I Finalize multiple draft PRs at once?
Each job's Finalize must be executed individually. However, you can Finalize multiple jobs in sequence.
Summary
- Finalize converts draft PRs to public PRs: The final step after Dev Run
- It's a human approval gate: AI-generated code is never auto-merged
- Commit cleanup happens automatically: Multi-phase commits are consolidated cleanly
- Use the review checklist: Check code quality, tests, documentation, and impact scope
- After Finalize, follow your normal merge flow: Verify CI/CD passes, then merge
Finalize is DevLoop Runner's "safety valve." It ensures AI-generated code is thoroughly reviewed and confirmed before reaching production. This process is what makes AI-powered development trustworthy.
Get Started with DevLoop Runner
Auto-generate PRs from GitHub Issues. Let AI accelerate your development.