Repository navigation
fix(nodes): preserve screen output on write failure - #117973
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 8:12 AM ET / 12:12 UTC. ClawSweeper reviewWhat this changesThe PR moves the CLI media-output helper to a shared CLI boundary and uses it for node screen base64 output so failed writes preserve an existing destination file. Merge readinessThis PR remains necessary: current Priority: P0 Review scores
Verification
How this fits togetherNode screen capture returns base64 media from a paired node to either the CLI or the agent nodes tool. Both paths reach the shared screen-file writer, which publishes the requested output path for the operator or model to use next. flowchart LR
A[Paired node screen capture] --> B[Base64 media payload]
B --> C[CLI or agent nodes tool]
C --> D[Shared screen file writer]
D --> E[Sibling temporary file]
E --> F[Atomic destination replacement]
F --> G[Saved recording or snapshot]
Decision needed
Why: The implementation and exact-head proof are strong, but the Before merge
Agent review detailsSecurityNone. PR surfaceSource +7, Tests +55, Docs +1. Total +63 across 7 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the shared atomic publication path after an exact-head/current-main merge refresh, retaining one mode-preserving sibling-temp owner for generated CLI media and node screen outputs. Do we have a high-confidence way to reproduce the issue? Yes. The linked report provides a deterministic built-artifact failure path, and current-main source confirms the direct final-path Is this the best way to solve the issue? Yes. Moving the existing atomic publication owner to the shared CLI media boundary fixes both screen output callers without introducing a parallel node-specific publication policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8206bf1f858c. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Land-ready proof for exact head Root cause: the shared node-media base64 writer decoded a valid paired-node payload and called Provenance (clear): git history traces the raw final-path writer to Canonical repair: the existing atomic CLI media publisher moved from the infer-capability subdirectory to Proof:
Scope: 7 files; production |
|
Merged via squash.
|
* fix(nodes): publish screen output atomically Closes openclaw#117970 * fix(nodes): keep output schema unchanged
Closes #117970
What Problem This Solves
Fixes an issue where users replacing an existing node screen recording or snapshot through CLI
--outor agent-tooloutPathcould lose the original file when the final filesystem write failed. The command/tool reported failure after the destination had already been truncated or partially replaced.Why This Change Was Made
The shared node-media base64 writer now publishes through the same sibling-temp atomic owner used by generated CLI media. The owner moved from the infer-capability subdirectory to the shared CLI media boundary so image, video, TTS, node CLI, and node agent-tool callers keep one mode, cleanup, and final-rename policy. Existing missing-parent behavior remains unchanged.
No Gateway RPC, node protocol, capture format, workspace guard, config, storage, or provider behavior changes.
User Impact
Failed
nodes screen record --outand agent nodes-toolscreen_record/screen_snapshotoutput writes leave an existing destination unchanged. Successful writes still return the requested path and complete media bytes while preserving an existing destination mode.Evidence
85e409452982c7a74589a86ef22115a39c456b6f: a deterministic zero-file-size write failure exited 1 and truncatedexisting-screento zero bytes.tbx_01kz138pxg81d1yyzb7hhe1hcr, run https://github.com/openclaw/openclaw/actions/runs/30745551646:nodes-camera, the agent nodes tool, and the full CLI node-media command path.check:changedpassed, including production/test typechecks, all core and Control UI lint shards, media/database guards, dead-code scans, and zero runtime import cycles.0640; injected write failure exited 1 while preservingexisting-screen, mode0640, and no sibling temp.875e5611ec2587d1e87cf795d4b32e004e6f53e1on Blacksmith Testboxtbx_01kz15mc6f6rb6rsqnnseefrm6, run https://github.com/openclaw/openclaw/actions/runs/30746971236: remoteHEADand clean tree verified before the full build passed, including all 149 public Plugin SDK subpaths and the production Control UI build.git diff --checkpassed.Production delta: +13/-6 (net +7). Tests: +57/-2. Docs: +1/-0. The production growth is the shared writer call; the prior atomic publisher was moved rather than duplicated.
AI-assisted: yes. No agent transcript attached by user preference.