Draft PRs are unreachable: Draft is never set, so the draft merge-blocker and Draft phrase are dead #613

Closed
opened 2026-09-15 23:05:26 +00:00 by crueber · 1 comment
Owner

Evidence (live field test + static read)

  • internal/pulls/service.go:422 hardcodes Draft: false at PR creation; no UpdatePR field, route, SDK method, or UI control ever sets Draft=true (verified by repo-wide grep — the only Draft=true write in non-test code is releases).
  • The merge machine still handles draft (mergeState draft → button disabled, tooltip draft PRs cannot merge; mergeabilityDisplay maps draft → Draft pull request) and the server presumably refuses draft merges — but no draft PR can ever exist through UI or API, so the blocked-draft case in #600 cannot be exercised and the Draft phrase is unreachable.

What's requested (user's call)

Either (a) implement draft PRs (open-as-draft / mark-ready transitions, UI + API + docs), or (b) remove the dead draft handling (machine branch, tooltip, phrase mapping, and any server draft gate) so untestable states don't linger. Recommend (a) only if draft workflow is wanted for v1; otherwise (b) keeps the machine honest. Note the choice.

Acceptance criteria

  • Either draft PRs can be created/flipped through UI+API with tests, or no draft-specific merge/UI code remains (grep Draft in pulls/MergeBox/pull-state.js comes back empty outside history).
## Evidence (live field test + static read) - internal/pulls/service.go:422 hardcodes Draft: false at PR creation; no UpdatePR field, route, SDK method, or UI control ever sets Draft=true (verified by repo-wide grep — the only Draft=true write in non-test code is releases). - The merge machine still handles draft (mergeState draft → button disabled, tooltip draft PRs cannot merge; mergeabilityDisplay maps draft → Draft pull request) and the server presumably refuses draft merges — but no draft PR can ever exist through UI or API, so the blocked-draft case in #600 cannot be exercised and the Draft phrase is unreachable. ## What's requested (user's call) Either (a) implement draft PRs (open-as-draft / mark-ready transitions, UI + API + docs), or (b) remove the dead draft handling (machine branch, tooltip, phrase mapping, and any server draft gate) so untestable states don't linger. Recommend (a) only if draft workflow is wanted for v1; otherwise (b) keeps the machine honest. Note the choice. ## Acceptance criteria - [ ] Either draft PRs can be created/flipped through UI+API with tests, or no draft-specific merge/UI code remains (grep Draft in pulls/MergeBox/pull-state.js comes back empty outside history).
crueber added this to the v1 milestone 2026-09-15 23:05:26 +00:00
Author
Owner

Implemented (option a) by #616 (merged): open-as-draft + mark-ready/convert-to-draft (author-or-triage, draft_changed events + fan-out, merged-terminal 409); merge refuses drafts pre-publish; PullNew checkbox + role-gated toggle + Draft badge; SDK draft key; docs amended. Verified: pulls 96.1% cover, -race green, 1590 web unit green (smoke excluded, pre-existing), vite/esbuild green, independent review APPROVE. Note: TestGetPRHeadDrift flake reproduced on clean main too — filing separately as pre-existing.

Implemented (option a) by #616 (merged): open-as-draft + mark-ready/convert-to-draft (author-or-triage, draft_changed events + fan-out, merged-terminal 409); merge refuses drafts pre-publish; PullNew checkbox + role-gated toggle + Draft badge; SDK draft key; docs amended. Verified: pulls 96.1% cover, -race green, 1590 web unit green (smoke excluded, pre-existing), vite/esbuild green, independent review APPROVE. Note: TestGetPRHeadDrift flake reproduced on clean main too — filing separately as pre-existing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
crueber/walhub#613
No description provided.