You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
task finish is refused by gh pr merge's client-side BLOCKED check even when the caller holds the ruleset bypass GitHub would honour #392
gh codecrew task finish <ref> (v2.1.0) passed every gate in --dry-run ("bypass actor: not applicable") and then failed in the live run with gh pr merge's client-side refusal:
codecrew: gh pr: X Pull request radiusred/tradedesk-marketdata#88 is not mergeable: the base branch policy prohibits the merge.
To have the pull request merged after all the requirements have been met, add the `--auto` flag.
To use administrator privileges to immediately merge the pull request, add the `--admin` flag.
The PR was approved and its CI green; mergeStateStatus was BLOCKED because an org-level ruleset (require-lint) names a required status check ("Lint commit messages") that this repository has no workflow for. The caller was the implementer App, which is that ruleset's Integration bypass actor. gh pr merge never asked GitHub: it reads BLOCKED and refuses locally. Earlier the same day, for housekeeping PRs in the same state, gh api -X PUT repos/{owner}/{repo}/pulls/{n}/merge -f merge_method=rebase -f sha=… under the same App token merged cleanly — GitHub evaluated the bypass and allowed it.
So task finish has a gap between its own gates (which all passed, correctly) and the merge call it makes: the CLI's client-side policy check is stricter than GitHub's, and the only flags it offers past it are --admin (which the protocol forbids a crew identity) and --auto.
Proposed
task finish merges through the REST merge endpoint (or gh pr merge only when mergeStateStatus is CLEAN), so GitHub decides, and a ruleset bypass the caller legitimately holds is honoured. The dry run's "bypass actor" gate could also report when the caller holds a ruleset bypass that the merge will rely on, so it is visible in the record.
Adopted by#395 — this issue is delivered as that task, and gh codecrew task finish closes it when the task's pull request merges (SPEC §4). The PR needs no Closes line for it.
Activity
davison commentedon Oct 10, 2026
Adopted by #395 — this issue is delivered as that task, and
gh codecrew task finishcloses it when the task's pull request merges (SPEC §4). The PR needs noClosesline for it.fix(cli): task finish asks github to merge and notes the branch polic…
fix(cli): task finish asks github to merge and notes the branch polic…
radiusred-cody commentedon Oct 10, 2026
Closed by
gh codecrew task finish 395: adopted by #395 and delivered by #405, merged as 16f1f0d.fix(cli): task finish asks github to merge and notes the branch polic…