Skip to content

[2026.9.36] fix(node): backport upload cancellation guard to extended stable - #187280

Merged
RomneyDa merged 2 commits into
extended-stable/2026.9.33from
openclaw/swift-shell
Oct 29, 2026
Merged

RomneyDa merged 2 commits into
extended-stable/2026.9.33from
openclaw/swift-shell

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

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

  • Deterministic upstream regression fails on both e93b50a and fix(release): consolidate applicable backports for 2026.9.36 #186177 head 550e329 with an uncaught ABORT_ERR.
  • Fixed snapshot suite: 5/5 tests passed with no unhandled errors, including on CI's Node 24.22.1. The added regression body took 4ms in the latest Node 24 run.
  • Two changed files pass formatting and git diff --check.
  • Stable patch-id exactly matches the selected two upstream paths: 7d016a7d960a8a6a469504e78fb73f93effd01fe.
  • Canonical restricted review: scoped-clean at P0/P1 for commit 1a4ce08, one pass with 284642 prompt bytes, effective model openai/gpt-6.1-sol.
  • The managed publisher added an empty publication commit 97920ad. Its tree and PR test-merge tree exactly equal the reviewed tree cad037e29cc4e7c42fe16ba3f705765c2dd32dd3; the original authored backport remains its parent. The final PR diff is exactly 2 files, +62/-0. All 15 canonical source-context hashes remain intact.
  • Ordinary hosted CI run 40818329346 completed successfully on exact head 97920ad, including openclaw/ci-gate. No failed jobs required retry or repair.
  • ClawSweeper reviewed that exact head on October 29, 2026 at 04:41 UTC: findings=0, review-state=ready, ready for maintainer review. This is a bot comment verdict, not a submitted GitHub approval. It notes that no shipped node-host end-to-end cancellation trace was supplied; the deterministic owner-level regression is not represented as that trace.

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.

steipete and others added 2 commits October 29, 2026 04:09
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
@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@RomneyDa
RomneyDa changed the base branch from main to extended-stable/2026.9.33 October 29, 2026 04:15
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord channel: googlechat Channel integration: googlechat channel: matrix Channel integration: matrix channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: tlon Channel integration: tlon app: android App: android app: ios App: ios app: macos App: macos gateway Gateway runtime security Security documentation docker Docker and sandbox tooling channel: feishu Channel integration: feishu channel: irc extensions: acpx extensions: anthropic extensions: codex extensions: tts-local-cli plugin: azure-speech Azure Speech plugin plugin: file-transfer extensions: amazon-bedrock extensions: anthropic-vertex extensions: admin-http-rpc extensions: meta Extension: meta app: linux labels Oct 29, 2026
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Recheck 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.

  • Before: Stream construction can emit an unhandled ABORT_ERR.
  • After: The operation rejects with the original cancellation reason and awaits file-handle disposal.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, correct upstream backport with useful deterministic owner-level regression evidence.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor-proof gate; its supplied evidence exercises the real snapshot owner and filesystem with a controlled open delay, rather than a shipped transfer entry point.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Cancelling a node workspace upload while its staged file opens can produce an unhandled AbortError.
Reason: The maintainer-authored backport restores established cancellation behavior on an affected supported branch without adding product surface.

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
Reviewed head: 97920ad0521764bc04f78002015e5bc3faaf7c52

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No supplied shipped node-host transfer trace demonstrates cancellation during staged-file open and subsequent request cleanup.
Agent review details

How this fits together

The 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
Loading

Technical review

Best 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

  • Snapshot streaming and awaited cleanup keeps the original intent (6a1bac3: Retain frozen upload bytes until HTTP response handling, writer cancellation, and request cleanup settle.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 6a1bac3 adds src/node-host/node-worker-upload-snapshot.ts:90 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6a1bac354e4b; files: src/node-host/node-worker-upload-snapshot.ts)

PR surface

Source +1, Tests +61. Total +62 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 1 0 +1
Tests 1 61 0 +61
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 62 0 +62

Root-cause cluster

Relationship: same_root_cause
Canonical: #162567
Summary: This PR backports the upstream upload-open cancellation repair to a separate maintenance line.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add P2: A bounded upload cancellation race remains on the maintenance branch, without evidence of an emergency or widespread outage.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: A bounded upload cancellation race remains on the maintenance branch, without evidence of an emergency or widespread outage.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 29, 2026, 12:41 AM ET / 04:41 UTC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants