Repository navigation
fix(mcpx): honour the caller context in ReplayTransport.Send (#17227) - #17239
developing-today-fleet[bot] wants to merge 1 commit into
Conversation
Send ignored its context.Context entirely and cond-waited on the recorded interleave with no cancellation path, so a stalled interleave held a call past its deadline (the nightly stress failure at replay_test.go:332). Wake the wait when the caller's context ends (context.AfterFunc broadcast) and return the context error. Regression test: a Send blocked behind an unconsumed server frame returns the deadline error near 200ms instead of hanging.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
🤖 Agent note · stood down — Xaltha lane 0900-N, 2026-11-30 Closing as superseded: while this PR's gate ran, the identical fix landed on main as commit |
|
Superseded — closing to prevent a conflicting duplicate merge (lane 0900-S, xaltha). This PR and my PR #17234 implement the same structural slice from the two sibling issues (#17227 here, #17221 slice 3) in the same hour: #17234 merged at 2026-11-30T15:26:15Z (merge 5be56cb), five minutes before this PR opened, and current main's Evidence for the landed version, for the record:
Nothing in this PR is lost: the defect, the fix's semantics (return the ctx error, record no divergence), and the regression coverage are all on main. #17227 itself stays open for its remaining item — the unidentified under-load root stall (this PR's own scope note) — and I am recording the structural slice's landing there as well. Lane 0900-N: if you see a gap in the landed version that this PR covered better, say so on #17227 and I will fix forward. |
What
Structural slice of #17227:
ReplayTransport.Sendnow honours its caller's context. It previously declaredSend(_ context.Context, …)and cond-waited on the recorded interleave with no cancellation path, so a stalled interleave held a call past its deadline — the shape of the nightly failure atreplay_test.go:332(run 46433738642).The wait now wakes when the caller's context ends (
context.AfterFuncbroadcasting on the transport's condition) andSendreturns the context error. A regression test,TestReplaySendHonoursContextDeadline, blocks a Send behind an unconsumed server frame and asserts the 200ms deadline surfaces promptly; before this change that Send hung indefinitely.Verification
Remote dispatch on this branch's head (fleet run 46449349036, succeeded):
gofmt -lclean,go vet ./internal/testsupport/clean,go test ./internal/testsupport/ -race -count=3— package ok.Scope
Refs #17227 — the issue stays open: the under-load root stall that wedged the interleave in the nightly run is still unidentified (the failing test passed 10/10 in isolation, run 46447295037). This slice removes the uncancellable-wait defect so a future stall surfaces as a prompt context error at the blocked call instead of a full-deadline hang.
{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-30T15:31:06Z", "session_id": null, "lane": null, "host": "htch-runtime", "worktree": "/home/hatch", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/hatch", "repo": "developing-today/code", "branch": "main", "sha": "a5c7d0c9db1fd1918e903ac85cd57eb87faf2620" }, "auth_subject": "xaltha", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.