Skip to content

[2026.10.9] preserve buffered cleanup uncertainty - #187272

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

RomneyDa merged 5 commits into
release/2026.10.9from
backport/exec-stable-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.8. 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.

shakkernerd and others added 2 commits October 27, 2026 13:12
Passive macOS Gateway stops now preserve an absent current-profile service definition without invoking uninstall, while explicit low-level ghost recovery remains available.

Release adaptation: the 2026.10.8 backport of #180390 removed the absent-plist
guard from GatewayLaunchAgentManager's disable path without main's follow-up,
so every passive stop with no LaunchAgent plist ran `openclaw gateway uninstall`
(mac validation: GatewayProcessManagerTests "pause preserves unretainable
services" [absent]). Stable has no migration-pending custody or `.authority`
wrapper, so the guard checks `custody.definition.plist` directly. Mac-only
post-tag fix; npm, Docker and Linux bytes are unaffected.

(cherry picked from commit cb10ec4)
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 clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. 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

Preserve native cleanup uncertainty in buffered command errors while retaining captured output and termination details.

Example: A Node command writes stdout "out" and stderr "err", then terminates itself with SIGTERM.

  • Before: The buffered result retains the bytes and SIGTERM but omits the runner's cleanup-uncertain classification.
  • After: The same result also contains a canonical CommandProcessCleanupError.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused production repair matches proven upstream behavior, but release-specific execution evidence remains limited and some startup tests duplicate stronger coverage.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; upstream supplies actual Linux Gateway diagnostic and successful-audio output, while this release head records only mocked adapter execution and its baseline control.
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 callers cannot reliably recognize cleanup uncertainty through the existing error contract.
Reason: The maintainer-authored backport restores an existing lifecycle contract using the same focused repair already accepted upstream.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored backport fixes a verified release-branch defect, and its production changes match the merged upstream repair; no definite production correctness finding was identified.

Priority: P2
Reviewed head: dc00d7dacf405cc3670f64762c7795bccedb7229

Before merge

None.

Findings

None.

Tests

  • Low-value test src/process/exec-buffered-cleanup.test.ts: Remove the startup rejection and canonical-identity cases at lines 43–68: they manually supply failure metadata and duplicate the same assertions through the real runner and broker fixture in exec-scope-settlement.test.ts.
  • Missing end-to-end proof: The release-head native exec/settlement suites lack a completed verdict, and the explicitly required real Windows acceptance is not supplied.
Agent review details

How this fits together

The buffered process adapter converts native runner outcomes into byte buffers, exit metadata, and errors consumed by core and plugin command callers.

flowchart LR
  A[Core and plugin callers] --> B[Buffered command adapter]
  B --> C[Native command runner]
  C --> D[Spawn and termination owners]
  D --> E[Child process]
  C --> F[Output and cleanup outcome]
  F --> B
Loading

Technical review

Best possible solution:

Retain the existing native cleanup owner and propagate its uncertainty through the buffered adapter's existing error contract.

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

The release source visibly drops runner cleanup metadata, and the upstream report demonstrates the native self-SIGTERM trigger; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The production patch fixes the adapter boundary directly, reuses existing canonical classification, and preserves native cleanup policy, error identity, causes, and output.

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 mapping keeps the original intent (db02a96: The bounded-command consolidation established one canonical execution wrapper while preserving output, cancellation, and process-tree ownership.)
  • Self-signal result expectation and cleanup error propagation changes intended behavior with a stated reason (fix: preserve uncertain cleanup in buffered command results #184270: The upstream repair explicitly corrects the previous omission of native uncertainty while preserving signal metadata, captured bytes, canonical identity, and original causes.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

  • Pinned backport matches upstream production repair: The introduced production hunks reproduce the upstream resolved-result classification and rejected-error wrapping, preserving canonical errors and original causes. (src/process/exec.ts:366, dc00d7dacf40)
  • Released adapter still omits cleanup uncertainty: The v2026.10.8 source and release base omit cleanup classification on resolved results and return rejected command errors without canonical uncertainty wrapping. (src/process/exec.ts:359, dc2523e5a5c7)
  • Upstream repair and runtime evidence: fix: preserve uncertain cleanup in buffered command results #184270 merged the same adapter repair and records an authenticated Linux Gateway tts.convert comparison: cleanup uncertainty reaches the CLI response, while a successful control preserves the expected WAV bytes. (src/process/exec.ts:369, 95adab33e610)
  • Draft explicitly retains validation gates: The current body reports a passing mocked adapter suite with a failing baseline control, but broader exec/settlement runs have no terminal verdict; native Windows acceptance remains required, and the author explicitly pauses readiness. (dc00d7dacf40)
  • Existing ownership and public contract: The process-runtime SDK already exports runCommandBuffered, and exec-result.ts already owns canonical cleanup errors and recorded failure outcomes; this repair adds no parallel policy owner or API. (src/plugin-sdk/process-runtime.ts:11, dc00d7dacf40)
  • Feature history and inspection limit: History identifies the bounded-command consolidation and later lifecycle work, while current-main blame attributes the repaired mapping to Shakker; older exec-result.ts content inspection encountered unavailable blob 42e32728dcf888bc88ff8c3dcc20ae6e1a766453. (src/process/exec.ts:369, 2e94b0988ea1)

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: #184270
Summary: This PR backports the merged main-branch repair to an affected release branch, so the upstream merge does not supersede its release-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 release adapter loses an authoritative cleanup fact, with a demonstrated upstream reproduction but no established data-loss incident or urgent workflow outage.
  • add merge-risk: 🚨 compatibility: The public buffered-command helper now populates error for cleanup-uncertain results; this is the explicitly intended behavior of the maintainer-authored backport and merged upstream repair.
  • 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: The release adapter loses an authoritative cleanup fact, with a demonstrated upstream reproduction but no established data-loss incident or urgent workflow outage.
  • merge-risk: 🚨 compatibility: The public buffered-command helper now populates error for cleanup-uncertain results; this is the explicitly intended behavior of the maintainer-authored backport and merged upstream repair.
  • 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.

Rank-up moves

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

  • Complete the release-local native suites and recorded Windows acceptance gate.
  • Remove the duplicated mocked startup cases while retaining the broker-boundary regressions.

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 base branch from release/2026.10.8 to release/2026.10.9 October 29, 2026 05:08
@openclaw-barnacle openclaw-barnacle Bot added the app: macos App: macos label Oct 29, 2026
@RomneyDa RomneyDa changed the title [backport release/2026.10.8] preserve buffered cleanup uncertainty [2026.10.9] preserve buffered cleanup uncertainty Oct 29, 2026
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 99e58bb into release/2026.10.9 Oct 29, 2026
124 checks passed
@RomneyDa
RomneyDa deleted the backport/exec-stable-20261029 branch October 29, 2026 05:57
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: 🦐 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.

3 participants