thumb/05-agent-binary #100
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
prskr/tools!100
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "thumb/05-agent-binary"
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?
Review 34 caught a real regression in the previous commit's fix, plus three doc-accuracy gaps: - Medium: defer peer.Close(), registered after defer lg.Close(), ran LIFO — peer.Close() first, lg.Close() second — tearing the RPC transport down before the logger's final flush could use it. The doc's own "lg.Close() flushes the last batch" promise was silently defeated for the RPC half. Fixed by combining both into a single deferred closure with lg.Close() called before peer.Close() inside it, making the order an explicit decision instead of an accident of defer registration order. peer is now a var assigned after NewAgent succeeds so the same closure, registered once at the top, covers both the NewAgent-failure path (peer stays nil) and the success path. - Low: "one mechanism wearing different hats" overstated what stdin EOF and SIGHUP actually do — neither runs a peer.Close() call on this side. Reframed: only ctx cancellation and the ping watchdog converge on peer.Close(); stdin EOF unblocks Wait() directly and SIGHUP bypasses Go entirely. - Low: "[SIGHUP] tears down the process ... regardless of Go-level handling" is wrong — SIGHUP is catchable, and main's signal.NotifyContext could register it. Reworded to state the actual dependency: free as long as SIGHUP isn't in that signal set, since Go's default disposition for it terminates the process. - Low: item 3's ctx-cancellation goroutine had a stated placement constraint ("right after peer exists") that the canonical Run snippet — the one place that exists specifically to pin down ordering — didn't show, and its trailing comment read as "no ctx handling here" instead. Added the goroutine to the snippet and reworded the comment. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.