fj pr merge: report the SPECIFIC non-mergeable reason for all cases (not a bare 405) #160

Open
opened 2026-06-15 00:27:02 +00:00 by stephen · 0 comments
Owner

Problem

fj pr merge returns an undifferentiated HTTP 405 Method Not Allowed for EVERY reason a PR cannot be merged. During the 2026-06-15 incident drain this single opaque error masked at least four distinct causes and cost ~30min of misdiagnosis. fj#159 covers the merge-conflict case specifically; this is the umbrella ask to handle ALL cases.

Cases that all currently return the same bare 405 (each should give a clear, distinct, actionable message)

  1. Merge conflicts with base (see fj#159). -> 'PR #N has merge conflicts with ; rebase/resolve first.'
  2. Branch out of date (block_on_outdated). -> 'PR #N is behind ; run fj pr update-branch / rebase, wait for CI, retry.'
  3. Disabled merge style (e.g. repo allows squash-only, --style merge/rebase rejected). -> 'merge style "merge" is not enabled for this repo; allowed: squash.'
  4. Required status checks not satisfied (a required context missing/pending/red even if other checks are green). -> 'required check "" is not green (state: missing/pending/failed).'
  5. Required approvals not met / dismissed-on-update. -> 'PR #N needs N approving review(s); has M.'
  6. Branch protection / insufficient permission / draft / WIP. -> name the specific blocker.

Ask

  • On merge failure, fetch + print the PR's mergeability detail (mergeable flag, conflict indicator, required-check states, required-approval count, allowed merge styles) and emit a specific actionable message + nonzero distinct exit hint.
  • Surface the same in fj pr view / fj pr checks (a 'Mergeable: yes/no ()' line) so it is visible without attempting a merge.

Evidence (2026-06-15, rasterstate/paragon)

#449 405 = merge conflicts (web UI revealed it; fj silent). Earlier 405s in the same session were block_on_outdated and (suspected) required-check-context mismatches - all indistinguishable. Related: fj#103 (run logs need browser), fj#158 (assignee-edit), fj#159 (conflict message).

## Problem `fj pr merge` returns an undifferentiated `HTTP 405 Method Not Allowed` for EVERY reason a PR cannot be merged. During the 2026-06-15 incident drain this single opaque error masked at least four distinct causes and cost ~30min of misdiagnosis. fj#159 covers the merge-conflict case specifically; this is the umbrella ask to handle ALL cases. ## Cases that all currently return the same bare 405 (each should give a clear, distinct, actionable message) 1. **Merge conflicts with base** (see fj#159). -> 'PR #N has merge conflicts with <base>; rebase/resolve first.' 2. **Branch out of date** (block_on_outdated). -> 'PR #N is behind <base>; run fj pr update-branch / rebase, wait for CI, retry.' 3. **Disabled merge style** (e.g. repo allows squash-only, `--style merge`/`rebase` rejected). -> 'merge style "merge" is not enabled for this repo; allowed: squash.' 4. **Required status checks not satisfied** (a required context missing/pending/red even if other checks are green). -> 'required check "<ctx>" is not green (state: missing/pending/failed).' 5. **Required approvals not met / dismissed-on-update.** -> 'PR #N needs N approving review(s); has M.' 6. **Branch protection / insufficient permission / draft / WIP.** -> name the specific blocker. ## Ask - On merge failure, fetch + print the PR's mergeability detail (mergeable flag, conflict indicator, required-check states, required-approval count, allowed merge styles) and emit a specific actionable message + nonzero distinct exit hint. - Surface the same in `fj pr view` / `fj pr checks` (a 'Mergeable: yes/no (<reason>)' line) so it is visible without attempting a merge. ## Evidence (2026-06-15, rasterstate/paragon) #449 405 = merge conflicts (web UI revealed it; fj silent). Earlier 405s in the same session were block_on_outdated and (suspected) required-check-context mismatches - all indistinguishable. Related: fj#103 (run logs need browser), fj#158 (assignee-edit), fj#159 (conflict message).
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
rasterstate/fj#160
No description provided.