FakeGh.api routes inline comments on an exact suffix, so every real call falls through to the default nf-8d5 ← Beads

open priority 2 task unassigned

Twinned from https://github.com/cfsh/ninefold/issues/725 by tools/beads/import_github.py's reconcile pass.

Filed unclaimed and unlabelled from a strategic-uplift window, working #702. Backlog.

nflib.fakes.FakeGh.api() routes the inline-comment read on an exact suffix (tools/nflib/fakes.py:268):

```python if "/pulls/" in path and path.endswith("/comments"): ```

Every real caller passes a query string, so the suffix never matches:

```python >>> p = 'repos/cfsh/ninefold/pulls/7/comments?per_page=100' >>> p.endswith('/comments') False ```

The call falls through to return default, which callers pass as []. A test that seeds inline comments into the fake and asserts something about them gets an empty list and passes by reading nothing — the "tests assert nothing" class this repo files under #542/#481/#482.

The linked-issue read is worse: repos/{repo}/issues/{ref}/comments?per_page=100 (dispatch.py:1331) has no branch at all in the fake, so the whole linked_refs trigger path (#340 — comments on a linked issue are trigger activity) cannot be exercised through the shared fake.

Scope, stated honestly

⚠️ No test currently passes vacuously because of this, and I checked rather than assuming:

So this is a trap for the next person, not a live wrong result. It is worth filing because the failure mode is silent and the correct-looking code is the buggy one: you seed a fixture, write the assertion, it goes green, and nothing indicates the fixture was never read.

Shapes

Related: #340 (the linked-issue trigger this makes untestable), #713 (where I hit it), #542/#481/#482 (the assert-nothing class).

Dependencies

None.

Comments

No comments.

Add a comment