Twinned from https://github.com/cfsh/ninefold/issues/1167 by tools/beads/import_github.py's reconcile pass.
Suggestions from ninefold-reviewer's review of #1160
Found while reviewing #1160 (design 011 T8-import's --repo-wide bd import), unrelated to that PR's own diff — noting it here rather than blocking that PR on it.
The bug. tools/web_frontend/server.py's _handle_issue_new (POST /issue/new, ~line 1279):
new_id = bd.create(title, type=issue_type, priority=priority, labels=labels, body=body)
nflib.bd.Bd.create() (both the real class and FakeBd) has no body parameter — only body_file: str | None, which expects a path to a file containing the body text, not the text itself. This call raises TypeError: create() got an unexpected keyword argument 'body' on every submission of the web UI's 'file a new issue' form.
This predates #1160 — that PR didn't touch server.py, though its own summary said the --title fix (positional argv to --title <value>) applies 'to every bd.create() caller in the tree... plus web_frontend/server.py's issue-creation path.' That part is narrowly true (the --title mechanism is shared), but it doesn't make this caller work — it's broken for this separate, pre-existing reason both before and after #1160.
Suggested fix. Either add a body: str | None parameter to Bd.create() that writes to a temp file internally (mirroring how import_github.py's callers already do it by hand), or have _handle_issue_new write body to a temp file itself and pass body_file=.
Test plan. A test that actually calls _handle_issue_new (or the underlying bd.create(..., body=...) call) against FakeBd would have caught this — worth adding as a regression test alongside the fix.
None.
Not reproducible against current code — closing as stale.
The
Bdat tools/web_frontend/server.py's_handle_issue_newcall site (line ~1538,bd = Bd()) resolves to server.py's own localBdclass (defined line 145), notnflib.bd.Bd. That local class is deliberately self-contained (see its docstring: "Deliberately notnflib.bd.Bdeither ... this file needs to run standalone off aredeploy.py-style copy"), and itscreate()(line 224) already has abody: str | None = Noneparameter that goes over--stdin, exactly the shape this issue's "suggested fix" asks for. It landed in #1097 (commit bd048775, 2026-08-18), before #1160 was even opened.So
bd.create(title, type=issue_type, priority=priority, labels=labels, body=body)is a valid call against the class actually in scope there — no TypeError.server_test.py'sBdShowCreateCommentTests.test_create_passes_type_priority_labels_and_the_body_over_stdinalready exercises this exact call shape and passes.The finding's premise (that this call reaches
nflib.bd.Bd.create(), which has nobodyparam) doesn't hold — that class is never imported into this file. Looks like the reviewer conflated the twoBdclasses.