A call whose connection drops is asked again of the strip-owner that comes back (AGT-88) #5
Loading…
Reference in a new issue
No description provided.
Delete branch "redial-on-drop"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Work package: AGT-88
A call to strip-owner now survives strip-owner restarting under it, as each of its own releases does. Before, the connection dropped and the call failed at once ("strip-owner didn't answer wait: ... forcibly closed by the remote host"), which ended four
pull-request watchruns on 2026-11-29.Removed
CallFor's inline send-and-read, andWaitWake's andHold's own copies of it.Added (
redial.go, one place for every caller)dial: sends the request and reads the answer. If the connection drops before the answer (EOF, reset or "forcibly closed", aborted, broken pipe;dropped, with Windows' Winsock and overlapped-I/O codes indrop_windows.go), it dials again, starting strip-owner the wayconnectalready does (throughrecords.Find, at Medium integrity only), and asks again. It keeps trying forRestartWithin(2 minutes) after the first drop, then fails with an error that names that limit.mark,wait,wake,landing,conversation,pr,ci). Also the writes whose repeat is a no-op:noteupserts the PR's row;landmarks the PR once and claims it only if nobody owns it, and strip-owner's handed queue is a map;ownclaims only an unowned PR;remote-waitadds the session to the PR's waiters once;accountkeeps only a newer reading. Andchanged,check-hold, andhold(a hold lasts as long as its connection, so it ended with the one that dropped).give(the giver no longer owns it, so a repeat is refused),save(a compare-and-swap: a repeat is refused as stale and its caller would apply its change again),ask(each one is a new row),approval(it would file a second request with Nelson),rerun(it would run CI or a release again), andstop(the drop is the stop). These fail with an error saying the connection dropped after the request went, so whether it took effect is unknown.waitasked again is sent asmarkfor its repo, and ends with the new process's count. A restarted strip-owner counts events from zero, so the old seq means nothing to it, and events may have come in while nobody was listening. Ending the wait makes the caller (pull-request watch, work-item-management wait) read again and wait from a fresh mark. Sending the old seq again could match the new count by chance and sleep through the event the watch was waiting for.Hold: a goroutine watches the hold's connection. If it drops while the caller still holds, the goroutine holds again on the new strip-owner.releaselets go of whichever connection holds at that moment.WaitWakegoes throughdialwith no deadline, so a pr-wake hook waits again after a restart.redial_test.go, a fake strip-owner on a socket of the test's own). Each of the first six fails on main:givethat drops is reported and heard exactly once;RestartWithinwith an error naming it, not before;Left alone
connect, its 5-second wait, and who may start strip-owner), theCallTimeout/CallFortimeout on each answer, the in-processUseLocalpath, and the wire format.Callers (pr, pull-request, strip-owner, strip, tmux-strip, claude-pane, work-item-management) get this by taking up the release. agent-tools' own
recordscopy, which at-home-tools still builds into the strip-owner, tmux-strip, claude-pane and work-item-management it ships, gets the same change in a separate PR.