Twinned from https://github.com/cfsh/ninefold/issues/731 by tools/beads/import_github.py's reconcile pass.
Filed unclaimed by nf-dev-probe-gate on wrap-up — the first session to reach this path since the call was introduced, as far as I can tell.
./tools/pr/wrap_up.py --remove did the removals, then crashed on the branch-cleanup step and exited 1:
``` ✓ removed worktree /root/nf/devs/probe-gate-f5 ✓ removed worktree /root/nf/devs/probe-gate ✓ pruned stale worktree registrations ⚠ kept local branch feat/per-platform-baseline — could not ask GitHub whether a PR merged it (TypeError: Gh.pr_list() got an unexpected keyword argument 'head') ```
nflib/sessions.py calls pr_list(..., head=...) at two sites — :979 and :1438 — and nflib/gh.py:171 has no such parameter:
```python def pr_list(self, fields, *, state="open", base=None, author=None, limit=100) ```
The comment at sessions.py:975 explains why head= is wanted, and it is right: *"head= rather than filtering a page of recent PRs: a merged branch's PR can be arbitrarily far back"*. So the intent is sound and the argument was simply never added to Gh.pr_list — gh pr list --head <branch> is the flag it wants.
:1438 is a second, untried site. Whatever calls that path will hit the same TypeError.feat/per-platform-baseline) *was* merged — #716, merge commit 0511e33 — so the fallback cost is one stale local branch on a box whose worktree is now gone.Add head: str | None = None to Gh.pr_list and append --head <branch> when set. Two lines, plus a test — ⚠️ and the test matters here, because both call sites are on paths that only run at wrap-up, which is exactly why this shipped: nothing exercises wrap_up.py --remove end-to-end, and a TypeError in a rarely-run arm is invisible until someone wraps.
Related: #635/#638 (board vs reality), #684 (the wrap-up predicate).
None.
No comments.