Skip to content

Fix HTTP replay settlement and cancellation with unobserved trailers - #3857

Merged
vigoo merged 15 commits into
mainfrom
fix/http-replay-tail-main
Sep 11, 2026
Merged

vigoo merged 15 commits into
mainfrom
fix/http-replay-tail-main

Conversation

@vigoo

@vigoo vigoo commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Fix

Resolves GOL-485

Markerless HTTP trailers completion waits for the recorded replay tail to finish, but its active background-task token prevents invocation settlement from returning to consume the remaining history. Park only the passive replay-progress notification after the owned cursor transaction completes. Queued/running cursor transactions and marker-bearing delivery barriers stay active.

A second real cancellation case requires acknowledging the cancelled body after durable body/span finalization but before the markerless trailers wait. Otherwise the guest cannot return to advance the replay tail. Recorded delivery ordering remains intact.

Real before/after evidence

  • Original unchanged Go HTTP replay test: 120.003s timeout → 2.852s pass, preserving 0-a / 1-b.
  • Rust raw-P3 ignored-trailers reproducer: 120.004s timeout → 1.264s pass.
  • Rust pending-read cancellation against naturally stalled HTTP with ignored trailers: parking alone times out after 120.008s → acknowledgement fix passes in 1.360s.

Both Rust cases verify the same markerless parent End before invocation finish, two restarts, exactly one network request, one disposition marker per child, and no marker for unobserved trailers. No artificial host gate is used. No Go SDK or Go test registration is included.

Validation

  • Six final non-Go HTTP tests passed, including consumed trailers, cancellation, byte-preserving marker-bearing replay and discarded chunks.
  • 185 concurrent/replay/tail/delivery unit tests passed, including queued/reentered cursor activity, error/drop balance and marker gates.
  • Executor/test-utils all-targets Clippy with warnings denied passed; executor/fixture formatting and diff checks passed.
  • Original Go test temporarily registered against the final host passed; temporary wiring removed, then all six non-Go HTTP checks rerun cleanly.

Depends on #3855, whose clock commit is included so CI tests the validated combination. Merge #3855 first; its changes then drop out of this PR's diff. The HTTP delta is two commits touching ten files and contains no snapshot changes. Broad CI remains to be verified.

Investigation: https://ampcode.com/threads/T-01a08615-324b-76fb-883a-9fa3472a5e3a

@vigoo
vigoo requested a review from a team September 10, 2026 10:36
@netlify

netlify Bot commented Sep 10, 2026

Copy link
Copy Markdown

Deploy Preview for golemcloud canceled.

Name Link
🔨 Latest commit 0591fe4
🔍 Latest deploy log https://app.netlify.com/projects/golemcloud/deploys/6aa42d9be5a7570008994eea

@vigoo
vigoo merged commit c480cfb into main Sep 11, 2026
67 checks passed
@vigoo
vigoo deleted the fix/http-replay-tail-main branch September 11, 2026 17:02
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants