Skip to content

[2026.10.10-beta.5] preserve buffered cleanup uncertainty - #187271

Merged
RomneyDa merged 5 commits into
release/2026.10.10from
backport/exec-beta-20261029
Oct 29, 2026
Merged

RomneyDa merged 5 commits into
release/2026.10.10from
backport/exec-beta-20261029

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

Source and scope

  • Upstream fix: preserve uncertain cleanup in buffered command results #184270, exact source commit: 95adab3; original author: Shakker.
  • Target: release/2026.10.10. Source is on main; actual release code was inspected and the fix is absent (not merely an ancestry check).
  • Independently backported the cohesive source fix, not the aggregate scope-reduction proof commit.
  • Preserve uncertain cleanup errors, canonical identity/cause, captured output, and termination details. Adapt regression placement to the release-local harness; add ordinary nonzero exit coverage.
  • No lockfile, dependency manifest, toolchain, release workflow, or release-validation source changes.

Validation

PASS: node scripts/test-projects.mts src/process/exec-buffered-cleanup.test.ts (5/5) on this exact release base. Covers ordinary/uncertain completed results, buffered output and exit metadata, tagged startup failures, canonical error identity, and cause retention.
NEGATIVE CONTROL: replacing only exec.ts with exact unpatched release-base source produces 2 failures with 3 controls passing; patched bytes restored and verified clean.
PASS: scoped formatting check and git diff --check.
Broader exec/settlement suites were attempted, but are not accepted as green: early attempts failed shared subprocess-worker compilation with unavailable/mismatched local dependencies; corrected broader builds were interrupted before a terminal verdict and remain a gate.
Validation used own local node_modules link directories, release-pinned TypeScript (and fs-safe for rollback), and borrowed installed tools (Vitest 5.0.5); no dependency or toolchain source was changed.

Remaining gates — draft only

  • Real Windows acceptance (Linux injected-denial tests do not replace it).
  • Full independent/context-aware review: unresolved reviewer capacity is not bypassed.
  • Hosted checks and normal release-owner approval.

Not ready for review, merge, or release. No release shipped.

Preserve canonical cleanup uncertainty in buffered command errors while retaining command output and termination status.

Fixes #184237.

Adapt regression placement to the release branch test harness and add ordinary nonzero-exit coverage; preserve only buffered command cleanup semantics.

Upstream-source: 95adab3
(cherry picked from commit 95adab3)

Co-authored-by: RomneyDa <[email protected]>
@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 complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 29, 2026
@clawsweeper

clawsweeper Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Backports canonical cleanup-uncertainty errors while preserving buffered command output and termination details.

Example: A Node command writes stdout 'out' and stderr 'err', then sends itself SIGTERM.

  • Before: The buffered result retains the bytes and SIGTERM but omits the runner's cleanup uncertainty.
  • After: The result also carries CommandProcessCleanupError, with the bytes and SIGTERM preserved.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The production repair is focused and source-correct, with strong upstream evidence, but the backport's declared native acceptance is unfinished and some added mocked coverage duplicates the existing runner regression.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Buffered command consumers cannot distinguish uncertain cleanup from an ordinary command failure through the existing error contract.
Reason: The maintainer-authored backport restores an established lifecycle contract at its shared owner without adding options or changing native cleanup policy.

Merge readiness

✅ Ready for maintainer review

Keep this maintainer-authored draft open: the focused fix is on main but absent from the target release branch, and no introduced correctness defect was found.

Priority: P2
Reviewed head: 7362d299712d62772b74e39be2cbd1866168e722

Before merge

None.

Findings

None.

Tests

  • Low-value test src/process/exec-buffered-cleanup.test.ts: Consolidate the mocked uncertain-startup cause and canonical-identity cases into the existing exec-scope-settlement regression, which already exercises those outcomes through the real runner; retain distinct normal-failure controls.
  • Missing end-to-end proof: Release-head native exec/settlement validation and the explicitly declared real Windows acceptance remain unproven; the upstream Linux capture establishes its original scenario rather than this release environment.
Agent review details

How this fits together

The shared buffered command adapter accepts argv and execution options, delegates process lifecycle to the native runner, and returns captured bytes, status, and errors to core and plugin callers.

flowchart LR
 A[Core and plugin callers] --> B[Buffered command adapter]
 B --> C[Native command runner]
 C --> D[Process lifecycle owner]
 D --> C
 C --> B
 B --> E[Bytes status and canonical error]
Loading

Technical review

Best possible solution:

Retain the focused shared-adapter backport and complete the draft's declared release-branch acceptance before landing.

Do we have a high-confidence way to reproduce the issue?

The target-base mapping demonstrably drops runner-owned cleanup uncertainty, and the original report supplies a real Linux self-SIGTERM reproduction; no target code was executed during this review.

Is this the best way to solve the issue?

The production change is the smallest complete repair: translate both existing runner outcomes at the shared adapter and retain rejected diagnostics as the cause.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2e94b0988ea1; fix evidence: commit 95adab33e610, main fix timestamp 2026-10-26T09:05:51Z.

Provenance checked

  • Buffered result and rejection mapping keeps the original intent (db02a96: Centralize bounded execution and expose a buffered SDK seam while retaining OpenClaw's output and lifecycle contracts.)
  • Cleanup classification keeps the original intent (220578b: Keep command completion separate from evidence that owned work stopped.)
  • Self-signal regression changes intended behavior with a stated reason (db02a96: Protect native signal propagation; the backport retains that assertion and adds the independently reported cleanup classification and captured bytes.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

PR surface

Source +10, Tests +113. Total +123 across 4 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 1 12 2 +10
Tests 3 119 6 +113
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 131 8 +123

Root-cause cluster

Relationship: same_root_cause
Canonical: #184237
Summary: This PR carries the canonical adapter repair to a release branch; the merged main fix does not supersede that branch-specific work.

Members:

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

Labels

Label changes:

  • add P2: The adapter loses a meaningful lifecycle classification, but the evidence establishes neither escaped processes nor actual data loss.
  • add merge-risk: 🚨 compatibility: The SDK-exposed adapter now populates its existing optional error field for uncertain outcomes; the maintainer-authored backport explicitly selects this correction while preserving types, bytes, and termination status.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish 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: The adapter loses a meaningful lifecycle classification, but the evidence establishes neither escaped processes nor actual data loss.
  • merge-risk: 🚨 compatibility: The SDK-exposed adapter now populates its existing optional error field for uncertain outcomes; the maintainer-authored backport explicitly selects this correction while preserving types, bytes, and termination status.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Complete the declared release-head native exec/settlement and real Windows acceptance, preserving output, status, and canonical cleanup classification.
  • Consolidate duplicated mocked startup and identity coverage into the existing runner-boundary regression.

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:30 AM ET / 04:30 UTC.

@RomneyDa
RomneyDa marked this pull request as ready for review October 29, 2026 04:32
@RomneyDa RomneyDa changed the title [backport release/2026.10.10] preserve buffered cleanup uncertainty [2026.10.10-beta.5] preserve buffered cleanup uncertainty Oct 29, 2026
roboclaw-bot and others added 2 commits October 29, 2026 05:19
Retain real runner and spawn exports while overriding process execution seams. Fixes the new closed-mock ratchet entries without changing assertions or baseline allowances.

Co-authored-by: RomneyDa <[email protected]>
@RomneyDa
RomneyDa merged commit 8b2b586 into release/2026.10.10 Oct 29, 2026
124 checks passed
@RomneyDa
RomneyDa deleted the backport/exec-beta-20261029 branch October 29, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: M 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.

3 participants