Repository navigation
fix(browser): keep the node file name in saved proxy downloads - #139559
Conversation
|
🦞👀 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. |
|
Codex review: needs real behavior proof before merge. Reviewed September 5, 2026, 10:32 PM ET / September 6, 2026, 02:32 UTC. ClawSweeper reviewWhat this changesPreserves browser-node filenames in locally saved downloads and images using the existing media store, with regression coverage for filename recovery and unchanged file contents. Merge readiness⛔ Blocked before merge - 2 items remain This remains a useful, focused fix: current main still discards the node filename, and no introduced correctness defect was found. The updated body describes real before/after runs, but does not include the observable output requested in the previous review. Priority: P2 Review scores
Verification
How this fits togetherBrowser nodes return file contents and paths to the Gateway. The browser plugin validates these results, saves the files in local media storage, and replaces remote paths with local paths used by downstream consumers. flowchart LR
A[Browser node files] --> B[Validate file envelope]
B --> C[Decode and enforce size limits]
C --> D[Sanitize filename and save media]
D --> E[Replace remote result paths]
E --> F[Local files and attachment consumers]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +1, Tests +23. Total +24 across 2 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep filename preservation at the browser persistence boundary and reuse the existing media naming, sanitization, and reader contracts. Do we have a high-confidence way to reproduce the issue? Yes, from source: a named browser-node file reaches saveMediaBuffer without originalFilename on current main and necessarily receives a UUID-only ID. No runtime reproduction was executed in this review. Is this the best way to solve the issue? Yes. Passing the validated node path to the existing optional argument repairs the missing information at its owner without duplicating filename logic or changing website-supplied metadata. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6c55a99226ed. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Pass the validated node filename to the existing media store. Keep website filename metadata separate and cover safe filename recovery, byte preservation, and local path isolation.
4957c4e to
105e3f6
Compare
|
landpr-approve-unrelated-red |
|
Thanks @ruel225! Proof: A real browser-node download through the Gateway now retains a safe node-side filename and identical bytes. All eight independent acceptance clauses passed, including screenshots, annotated snapshots, empty files, path isolation, and limits. The PR body includes redacted runtime output.
The exact-head local review passed with no findings or security concerns. CI run 34006491665, attempt 1, had one failed child: check-additional-boundaries. Its Landed through the guarded, authorized unrelated-CI exception. No failing check was weakened, and no unrelated source was changed. Existing stored files remain unchanged. Downstream display proof used the explicitly labeled synthetic attachment consumer, not an external channel or the full Control UI. |
* origin/main: fix(ci): rebalance services test roots below the memory bound (openclaw#139645) fix(backup): exclude shared workspace files from state-only archives (openclaw#139598) fix(config): preserve plugin secret references in Settings saves (openclaw#139536) fix(ui): retain real-Gateway browser proof across reruns (openclaw#134274) fix(browser): preserve node filenames in proxy media (openclaw#139559) fix(qa): give hot-reload maintenance proofs their own budgets (openclaw#139580) fix(streaming): preserve assistant items and settled output (openclaw#139507) fix(android): reconnect secondary gateways after rapid lifecycle changes (openclaw#139319) fix(gateway): restart inside a marker-less LaunchAgent no longer kills its caller (openclaw#139628)
* commit 'ef5972108dc690725717613cb0c1bdaaf910c8de': fix(browser): preserve node filenames in proxy media (#139559) fix(qa): give hot-reload maintenance proofs their own budgets (#139580) fix(streaming): preserve assistant items and settled output (#139507) fix(android): reconnect secondary gateways after rapid lifecycle changes (#139319) fix(gateway): restart inside a marker-less LaunchAgent no longer kills its caller (#139628)
Pass validated browser-node paths to the existing media-store filename argument. Preserve safe recoverable node basenames, file bytes, limits, and local result paths while keeping website filename metadata separate. Verified through a running browser node and Gateway, focused regression coverage, and independent acceptance. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Fixes #139557.
The Gateway discarded the validated node-side filename when saving files returned by a browser node. Downloads, screenshots, and annotated snapshots therefore became UUID-only media files even when a node filename was available.
Why This Change Was Made
Pass the validated path as the media store's existing
originalFilenameargument. The store extracts and sanitizes the basename, resolves the extension, and writes its normal<name>---<uuid>.<ext>identifier. No new parser, storage format, or migration is added.User Impact
Browser-node files retain a safe, recoverable node-side name. Website
suggestedFilenameremains separate metadata: an automatic download can already have a generated node prefix, and an explicit output filename can differ from the website suggestion. This change preserves the node name within the existing store's filename bounds.Evidence
4da5d447f695, running browser node → Gateway: a named 39-byte PDF was saved with a UUID-only basename. Node and saved-byte hashes matched.105e3f63aa55, same real route: explicit and automatic downloads retain safe node names; saved bytes match; returned paths point to Gateway media files. Empty downloads, screenshots, and annotated snapshot images also pass.CI run 34006491665 reports an unrelated services test-group limit failure: #139592 added the test file that raised that group from 720 to 721 roots. Its parent diff and exact CI merge tree confirm the cause; this PR leaves the count unchanged. Landing still requires the complete CI result and guarded review.
AI-assisted repair and verification. Original contribution by @ruel225.
Redacted browser-node download output
These are captured browser.request results and matching filesystem observations. Only private path prefixes, the fixture URL, and browser target identities are redacted. The baseline requested
quarterly-report.pdf; the candidate deliberately requestedcandidate-quarterly.pdfwhile keeping the website suggestion unchanged.Before (
4da5d447f695):{ "browserResult": { "ok": true, "download": { "url": "<fixture-download-url>", "suggestedFilename": "quarterly-report.pdf", "path": "<gateway-browser-media>/92a94425-1c4e-46c3-bccd-989b0a082b92.pdf" } }, "nodeFile": { "name": "quarterly-report.pdf", "path": "<node-downloads>/quarterly-report.pdf", "size": 39, "sha256": "4547e8c1e1654e67682c5f483017313fd02ab51081e5d5e5da40b24ab2d40485" }, "gatewayFile": { "name": "92a94425-1c4e-46c3-bccd-989b0a082b92.pdf", "path": "<gateway-browser-media>/92a94425-1c4e-46c3-bccd-989b0a082b92.pdf", "size": 39, "sha256": "4547e8c1e1654e67682c5f483017313fd02ab51081e5d5e5da40b24ab2d40485" } }After (
105e3f63aa55):{ "browserResult": { "ok": true, "download": { "url": "<fixture-download-url>", "suggestedFilename": "quarterly-report.pdf", "path": "<gateway-browser-media>/candidate-quarterly---8518a609-06c4-48b7-9756-77bddb1b4f0b.pdf" } }, "nodeFile": { "name": "candidate-quarterly.pdf", "path": "<node-downloads>/candidate-quarterly.pdf", "size": 39, "sha256": "4547e8c1e1654e67682c5f483017313fd02ab51081e5d5e5da40b24ab2d40485" }, "gatewayFile": { "name": "candidate-quarterly---8518a609-06c4-48b7-9756-77bddb1b4f0b.pdf", "path": "<gateway-browser-media>/candidate-quarterly---8518a609-06c4-48b7-9756-77bddb1b4f0b.pdf", "size": 39, "sha256": "4547e8c1e1654e67682c5f483017313fd02ab51081e5d5e5da40b24ab2d40485" } }