PR #470 follow-ups: stale refusal text, PR-body scope drift, proc.py tidy-ups nf-jonf ← Beads

open priority 2 task unassigned

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

Suggestions from ninefold-reviewer's review of #470 (404e023). All are advisory residuals below the gate floor — #470 is CONVERGED and none of these block it. Unclaimed and unlabelled; pick up at a triage round or fold into a nearby PR.

1. run_presubmit's refusal still names a lookup that was deleted (raised as F7 on the second pass, still open)

tools/pr/merge_pr.py:373-374:

```python raise MergeRefused("presubmit.py not found (looked next to this file and at " "the git toplevel)") ```

Both halves are false at 404e023. presubmit_path() (:231-247) is now a single nflib.repo_root() / "presubmit.py" check — there is no git-toplevel lookup (deleted with the snapshot workaround), and nothing is looked for "next to this file", which is tools/pr/.

Same class as F1 and F5: a message asserting behaviour the code does not have, left behind by a deletion. Low impact — the branch is nearly unreachable, since a successful import nflib implies a real checkout — but it is the only operator-facing sentence on the one path where it fires. Suggested text: presubmit.py not found at the repo root (<path>).

Worth noting that test_presubmit_path_anchors_on_the_LIBRARY_not_cwd (tools/tests/test_merge_pr.py:443) asserts --show-toplevel is absent from presubmit_path's *source*, so it passes while the prose two functions away still describes it. A guard over the refusal strings would close that.

2. The PR body understates the change and its test-plan numbers are stale

#470's body describes only the merge_pr port. It does not mention tools/nflib/proc.py (+167), which is a third of the diff and adds a new public mode (run(tee=True) plus _run_tee) to a library dispatch.py, poll.py and presubmit.py all import. The commit message for 404e023 explains the decision well; the PR body — the durable record — does not carry it.

The Test plan still reads *"27 new tests; 213 total"* against a tree that is now 314. CLAUDE.md: *"When expanding scope mid-review, update the PR title/body so the reviewer sees the new shape."*

Not gated because the substance is reviewed (the tee path is #472 F2/F3) and the commit message records the reasoning — but this PR's own argument is that a wrong entry in the record costs more than the code did.

3. Sub-floor tidy-ups in nflib/proc.py and its tests
4. Watchdog race in _run_tee (noting, not proposing)

If the timer fires in the window between proc.wait() returning and timer.cancel(), a successful run is reported as code=124 with a complete capture. Sub-millisecond window, and the fix (re-check proc.returncode inside _fire) is not obviously worth the complexity. Recorded so it is not re-derived as a finding later.

Dependencies

None.

Comments

No comments.

Add a comment