Repository navigation
[2026.9.36] fix(node): backport upload cancellation guard to extended stable - #187280
Conversation
Backport the bounded node-worker upload snapshot fix and regression test from upstream #162567. Recheck cancellation after the awaited staged-file open, before constructing a ReadStream, and retain awaited handle disposal. Only src/node-host/node-worker-upload-snapshot.ts and its regression test are selected from the upstream aggregate; no delegated-completion changes are included. This fixes the AbortError exposed by #186177 CI in unchanged extended-stable code. (cherry picked from commit 4f0541e) Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: e79397d1-66dd-4264-970e-19793c20805e
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesRecheck upload cancellation after opening a staged file, before constructing its read stream. Example: An upload of source.bin is cancelled while its staged file is opening.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored backport repairs a cancellation race still present on extended-stable; no actionable correctness or security defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe node-host transfer client freezes changed workspace files, streams their bytes into an HTTP reconciliation request, and retains temporary files until request handling and cleanup settle. flowchart TD
A[Workspace files] --> B[Upload snapshot]
B --> C[Open staged file]
C --> D[Recheck cancellation]
D --> E[Stream into HTTP request]
D --> F[Reject and dispose handle]
E --> G[Settle request and clean snapshot]
F --> G
Technical reviewBest possible solution: Land the exact upstream cancellation repair in the existing extended-stable snapshot owner through normal branch gates. Do we have a high-confidence way to reproduce the issue? The release-base source permits cancellation across the awaited open before stream construction; the author reports the controlled regression failing on that base and passing after repair, and this review executed no target code. Is this the best way to solve the issue? The additional check closes the asynchronous cancellation gap at its existing owner while preserving disposal, transport settlement, and error propagation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 54818f9e6756. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +1, Tests +61. Total +62 across 2 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 29, 2026, 12:41 AM ET / 04:41 UTC. |
Summary
Backport only the two-path upload-snapshot cancellation fix and regression from upstream #162567 (4f0541e), preserving Peter Steinberger's authorship. Recheck cancellation after the awaited staged-file open, before creating a ReadStream; retain awaited disposal and the original cancellation reason.
Target: extended-stable/2026.9.33. Current stable release/2026.10.8 and beta release/2026.10.10 already contain this fix; main retains it in the inlined transfer client. No duplicate backports to those lines.
Validation
Inherited local failures and remaining scope
Hosted CI is green; wider local transfer tests are not fully green. Encoding and snapshot tests pass, but the two TLS fingerprint assertions and upload diagnostic-metadata assertion also fail on unmodified release base e93b50a. The same three failures reproduce on CI's Node 24.22.1, so changing the Node major version is not a remedy. Passing hosted CI does not erase those retained observations.
The lifetime rejection case was isolated in a fresh process: it hits its existing 120000ms test deadline on the fixed tree (Node 26.12.1), and on an exact unmodified e93b50a source tree (Node 24.22.1; command exits 1 after 150.70s). The wider fixed-tree Node 24 run reproduces that timeout and subsequent spy-recursion/early-success failure. Its contaminated continuation was stopped and the receipt retained. This establishes an inherited lifetime failure, not its complete root cause or a passing suite; no retries, weakened assertions, longer deadlines, or suppressions were added. Baseline source substitutions were restored and both checkouts are clean.
This addresses unchanged release-base code exposed by CI run 40814073274 / job 123251371948; it does not modify #186177. After this fix lands, #186177 must consume the updated extended-stable base before fresh validation. A local conflict-free merge-tree calculation combining its current 550e329 head with this exact fix changes only these same two files (+62/-0), producing tree e22216df500bdf86fbd81f966d8bc6b95b0cc510; no branch or PR was modified by that calculation.
The scoped review does not clear the earlier aggregate-review capacity refusal. No full release validation, merge, release approval or package publication is claimed. Maintainer disposition remains separate from the successful CI and no-findings review.