PR #830 follow-ups: dev.py pr residuals nf-zms ← Beads

open priority 2 task unassigned

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

Suggestions from ninefold-reviewer's review of #830. None of these blocked that PR — all sit below the gate's severity floor. Unclaimed and unlabelled; take them or close this.

1. _link_parent writes the parent PR's whole body backtools/nflib/devcli.py:846. It reads body, then PATCHes body + "Stacked under this: #n". That is #398's read-modify-write shape against a body a human may be editing in the same window, and #815 has just replaced the board's version of it with a compare-and-swap verb. Exposure here is far narrower — one PR, one session, a window of milliseconds, and GitHub keeps an edit history — and it already refuses to write when the read failed, which is the important half. But it is the same shape in the same tier, and a naming the race beside it (or a re-read-and-compare) would keep the two consistent.

2. _next_branch strips any trailing -<digits>, not only its owntools/nflib/devcli.py:637. re.sub(r"-\d+$", "", branch) is right for feat/x-2feat/x-3 and wrong for a branch legitimately named after a number. Two live examples from the last 60 branches in this repo:

Nothing is destroyed (the candidate is collision-checked against local and origin/* refs), but the child loses the identifier a human reads the branch by, and the stack stops looking like a stack. One fix: only strip when the suffix was minted by this function — e.g. strip only if <stem> itself exists as a ref.

3. compose_body writes a contradiction when --base main is passed while stackedtools/nflib/devcli.py:765. The stacked line is keyed on parent is not None, while the sentence it emits is about base != TRUNK:

> ⚠ Stacked on #877 — this PR's base is main, not main.

Either key the sentence on base != TRUNK too, or say something true for that combination (the PR really is not stacked on #877 in the base sense — verb_pr already prints a about exactly that case two steps earlier).

Dependencies

None.

Comments

No comments.

Add a comment