Repository navigation
feat(gateway): let operators disable client file and image uploads - #158567
Conversation
Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 3de937bd-f1f9-4710-b319-7c1137141175
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
|
Codex review: blocked before merge. Reviewed September 27, 2026, 9:16 PM ET / September 28, 2026, 01:16 UTC (Revision 20). ClawSweeper reviewWhat this changesAdds a default-enabled Gateway setting that hides Control UI upload actions and rejects new client file and image input across supported Gateway, HTTP, skill, and Workboard paths. Merge readiness⛔ Blocked before merge - 6 items remain Keep open. Current main does not offer this operator control, and the branch has credible behavior proof with no verified correctness finding. Its operator-facing policy scope and UI budget still need an independent maintainer decision. Priority: P2 Review scores
Verification
How this fits togetherClients send text and media through the Control UI and Gateway APIs. Gateway policy checks new media input before handlers deliver messages or commit bytes to storage. flowchart LR
A[Operator upload setting] --> C[Gateway upload policy]
B[UI and API requests] --> C
C --> D{New client bytes?}
D -->|Disabled| E[Reject request]
D -->|Allowed| F[Handler and final write guard]
F --> G[Message or storage]
Decision needed
Why: The documented scope cannot control arbitrary trusted plugin writes, and the PR's account of budget approval does not independently settle either operator-facing tradeoff. Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
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: Ship one Gateway-owned client-upload policy with live final-effect checks, a clearly approved trusted-plugin contract, and an accepted UI startup budget. Do we have a high-confidence way to reproduce the issue? Not applicable: this adds an operator capability rather than repairing a reported failure. Current main lacks the setting; the branch provides source, final-write, and Control UI evidence for the proposed behavior. Is this the best way to solve the issue? Yes for supported Gateway input: centralized admission and final-write checks preserve text requests and accepted receipts. The trusted-plugin coverage and UI budget remain owner choices. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 72b76842012f. LabelsLabel changes: No label changes. Label 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 (19 earlier review cycles; latest 8 shown)
|
Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 8ecc08aa-73bd-4250-9fe9-56656141d80a
Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: c71e19b5-761c-4340-b91e-2ffcf5863b11
Preserve main filesystem admission and asynchronous Control UI reads while retaining live upload policy guards. Regenerate config documentation from the merged schema. Co-authored-by: steipete <[email protected]>
Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 54e8020d-028f-4979-9227-6e5a98bde26d
Observe the real keyboard-triggered header action with a pass-through spy and join its promise before checking the existing Undo toast. Keep all target, draft, navigation and Undo assertions, without replacing implementation or changing timeouts. Co-authored-by: steipete <[email protected]>
Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 3bc2883f-ba75-4b4b-96c3-c97487509461
Regenerate the exact common-leaf expectation for gateway.uploads.enabled, which the approved feature already declares common. Preserve production tiers and the complete exact-set assertion. Co-authored-by: steipete <[email protected]>
Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 852353c8-d836-48df-9129-5051bab52261
|
Merged via squash.
|
50 upstream commits, including the gateway switch for client file and image uploads (openclaw#158567) and cleanup passes over infra, scripts, channel core and agent tools. No file outside the generated set changed on both sides. Two conflicts, both generated: docs/.generated/config-baseline.counts.json and docs/.generated/config-baseline.sha256. openclaw#158567 adds gateway.uploads and gateway.uploads.enabled, so core goes from 2462 to 2464. This branch keeps channel at 3788 and plugin stays at 4350. Both files came from upstream and were regenerated. build:docker ran in a separate detached checkout of this commit outside the nested node_modules install. Regenerating there changed those two files and nothing else, giving the predicted counts, the upstream core hash, this branch's channel hash and a new combined hash. The three generated-file checks pass there. No test this branch added or changed was deleted upstream in this range. Feishu: 106 files and 1854 tests in the extension project, 17 files and 312 tests in the database-workers project. The forwarder test and the routing guards pass, 1931 tests. tsgo:core, tsgo:extensions, tsgo:extensions:test, tsgo:test:root, the line-cap, max-lines and assertion-safety ratchets against upstream/main, oxlint and oxfmt on the 43 changed code files all pass.
…penclaw#158567) Add a default-enabled, hot-applied Gateway switch for client file and image uploads, reflected in the Control UI. Enforce the policy at final input-write boundaries while preserving text, drafts, trusted internal/generated media, and authorized accepted request receipts. Retain existing skill support files by exact revision. Closes openclaw#158556 Worked on by: - @steipete Work session: https://team.openclaw.ai/chat/roboclaw/dashboard/722174dd-3af0-4d0c-b6e9-d9fbe6101472 Co-authored-by: steipete <[email protected]>
Share route decoding, attachment retention, gallery preparation, transient identity encoding, override copying, and extension classification. Remove duplicate admission/schema mirrors and obsolete supported-browser fallbacks. Both Lit and Solid paths remain; no rendering change is intended. No config, protocol, persisted shape, dependency, or public SDK change. Best-effort tradeoffs accepted - Malformed internal native requests (#140988): all callers are typed and native hosts validate at the effect; their error replaces the renderer mirror. - Worker replacement during an identity query (#140484): added for synthetic autoreview interleavings, not a human incident. Return false; normal worker announcements and foreground recovery observe the next active worker. - Native readiness changing between synchronous checks (#140484/#109719): rely on queued events. A broken native event can require another worker event or reload; camera readiness retains its existing five-second error deadline. - Overlapping application-root health reporters (#152638): startup mounts one root. Unsupported overlapping roots are last-publication-wins; the actual reported health/status feature and native trusted-document checks remain. - Polling after stop (#139704): its sole owner retires eligibility first. Scheduling now uses that owner admission, not a separate read-only generation. - Resetting an observer without retiring its connection (#116887): no production caller does this. Canonical connection epochs remain the sole retirement owner; unsupported direct live-scope reset no longer fences an old response separately. - Upload policy changing during local reads (#158567): decoded/hash work can finish. Draft publication and every upload request retain live policy checks. - Missing supported browser primitives (#105240/#151388/#100024/#102745): unsupported runtimes error instead of code-point initials, skipped input yield, wall-clock timing, or approximate microtask paint. The human progress-card fix in #151386 keeps its browser yield and durable FIFO handoff unchanged. - URL APIs disappearing after URL creation (#100024/#149330): supported browsers keep paired APIs. An unsupported replaced global can throw during cleanup; undefined URLs, creation fallback, cancellation and release ordering remain. - Malformed internal MCP calls bypassing AppBridge (#161747): may throw. The SDK still rejects malformed wire blocks before dispatch, proved over real in-memory App/AppBridge transport. UI content, authority, confirmation and custody policy remain. The introducing PR cites no human incident for the second mirror. Production: +176/-394, net -218 lines across 21 eligible old files. Tests: +30. Focused owner/sibling tests, targeted types/lint/format, lint-suppression and independent P0-P2 review pass. Import edges are unchanged; runtime/Madge cycle proof remains zero. Whole-tree Knip timed out at existing limits; heavy gallery renderer runs did not reach assertions, while its owning controller suite passed.
* refactor(apple): simplify old shared and macOS bookkeeping Replace redundant generations with existing cancellation or actual owner identity, consolidate parallel fallback/policy paths, and remove test-only forwarding layers. Preserve authority, FIFO, durable state, resource bounds, public protocol/config shapes, signing, permissions, and visible rendering. Reuse canonical session-key normalization for Voice Wake delivery selection: opaque Signal group IDs remain case-sensitive and main aliases are not added. Use canonical IP-literal policy for discovery labels and remote CLI validation. Best-effort tradeoffs accepted - Palette generation (#159350): synthetic direct completions bypassed the sole cancellation-owning caller; unsupported future callers can show stale results until the next search. Current cancellation/request/agent checks remain. - Link preview generation (#160710): synthetic URL replacement without caller cancellation is outside the SwiftUI task lifecycle; a late cosmetic result can remain until the next refresh. Network/SSRF checks and bounded caches remain. - Sidebar preview generation (#147197): same-request overlapping cache reads can finish out of order; no linked human failure report, and a later refresh replaces the cosmetic projection. Owner/request checks remain. - Source-preview producer revision (#148906): duplicate of exact task cancellation, with no human failure report. Consumer revision and authenticated resource authority remain. - Mermaid generations (#135470/#135746): feature stress fixtures, no linked human race report. Exact subscriber cancellation and job/WebView identity retain the same admission; no extra failure accepted. - Camera JPEG UUID (#107879): duplicates exact task cancellation; #107804 was a human feature request, not a generation-specific incident. Captured session/agent/route and attachment admission remain. - Discovery generation (#145435): speculative queued callbacks, no linked human incident. A stopped browser may publish one late discovery projection; next discovery/refresh repairs it. Connection authority remains separate. - FSEvents generation (#145453): synthetic stop/restart fixtures, no linked human incident. An old callback after restart may cause one extra refresh; serial lifecycle ownership and pending-work cancellation remain. - Menu generations (#139688): feature-local late-result fixtures, no linked human incident. Exact task cancellation replaces duplicate tokens; drain-before-disconnect and real consumer/window authority remain. - Cron generation (#131466/#137502): #138209 cut every load over to one cancel-and-drain chain. No direct concurrent load caller remains; cancellation and physical source leases stay checked after awaits. - WebChat visibility acknowledgement/retry (#113634/#137089): synthetic timeout/reconnect interleavings, no linked human incident. A timed-out visibility update is best effort until the next transition/reconnect; FIFO and live socket leases remain. - WebChat cleanup UUID (#113634/#137089): retain one bounded completed Task handle per live connection instead of matching cleanup tokens. Completion releases captures; replacement/retirement removes the handle. - Child-exit polling (#145437): synthetic missed-notification coverage, no linked human report. A lost OS exit notification may wait for the existing deadline; final non-reaping liveness/status checks and cleanup remain. - Realtime iterator borrowing trap (#156772): every real consumer awaits its own iterator sequentially. Unsupported concurrent next calls no longer get a custom custody protocol; bounded stream/cancellation/socket checks remain. - Receipt projection admission (#161745): both real callers already match receipt and row identity immediately before synchronous projection. Those effect checks remain; no unsupported internal caller is defended twice. - Recap attribution heuristics (#112188/#113084): synthetic guard matrix, no linked human race report. Missing initial rows or very late unrelated completion may supply a cosmetic footer; per-session freshness, failed-turn handling and settled results remain. - PortGuardian per-write schema scans (#110527): synthetic live-handle version advance, no linked human incident. Concurrent external schema upgrades are best effort until reopen; initial admission, migration locks, receipts, transactions and durability remain. - Unread queue counter (#110019): actual Task equality replaces the duplicate integer token. Exact-tail reclamation, bounded bookkeeping, FIFO and route authority remain unchanged. Review dispositions: the claimed Task compilation failure is disproved by the selected SDK's Equatable conformance and native builds. Repeated receipt identity admission is unnecessary at its internal projector because both real callers retain it immediately before projection. Per-write schema revalidation was declined under the explicit best-effort policy above. Proof and scope Net production reduction: 369 lines (148 added, 517 deleted), excluding tests. Fresh seven-day census permits all substantive production edits; the only recent caller change is the unavoidable one-line fallback-to-parse rename. Shared Swift build passed. Final focused shared tests passed 396 cases in six suites (6.683s execution), Watch decoder tests passed five cases (0.003s), and isolated whole-owner native tests passed 16 cases. macOS SwiftPM compiled all products and the test bundle. Final macOS and iOS/Watch xcodebuild builds passed (89.60s and 120.87s wall), without signing changes or app launches. Canonical Apple lint/format checks passed; the initial iOS format failure in WatchCommands was ours and corrected, with no gate weakened. Lint-suppression tests passed 3/3 (14.09s wall). Earlier runtime cycles and Madge each reported 0; the TypeScript graph is unchanged. Native localization stayed at 4476 entries. The 45 original packaging/elevation timeout cases passed one focused retry (94.79s wall), with no assertion/budget change and no claim of a diagnosed fix. Known gaps: seven issues remained in the earlier ChatStreamReplayTests narration=false package cases; causality/current-main attribution is unproven. App-hosted macOS tests were not executed on the operator desktop. No hosted CI or PR was started: the explicit BELOW-500 rule requires a branch-only handoff. * refactor(ui): consolidate old UI owners and validation Share route decoding, attachment retention, gallery preparation, transient identity encoding, override copying, and extension classification. Remove duplicate admission/schema mirrors and obsolete supported-browser fallbacks. Both Lit and Solid paths remain; no rendering change is intended. No config, protocol, persisted shape, dependency, or public SDK change. Best-effort tradeoffs accepted - Malformed internal native requests (#140988): all callers are typed and native hosts validate at the effect; their error replaces the renderer mirror. - Worker replacement during an identity query (#140484): added for synthetic autoreview interleavings, not a human incident. Return false; normal worker announcements and foreground recovery observe the next active worker. - Native readiness changing between synchronous checks (#140484/#109719): rely on queued events. A broken native event can require another worker event or reload; camera readiness retains its existing five-second error deadline. - Overlapping application-root health reporters (#152638): startup mounts one root. Unsupported overlapping roots are last-publication-wins; the actual reported health/status feature and native trusted-document checks remain. - Polling after stop (#139704): its sole owner retires eligibility first. Scheduling now uses that owner admission, not a separate read-only generation. - Resetting an observer without retiring its connection (#116887): no production caller does this. Canonical connection epochs remain the sole retirement owner; unsupported direct live-scope reset no longer fences an old response separately. - Upload policy changing during local reads (#158567): decoded/hash work can finish. Draft publication and every upload request retain live policy checks. - Missing supported browser primitives (#105240/#151388/#100024/#102745): unsupported runtimes error instead of code-point initials, skipped input yield, wall-clock timing, or approximate microtask paint. The human progress-card fix in #151386 keeps its browser yield and durable FIFO handoff unchanged. - URL APIs disappearing after URL creation (#100024/#149330): supported browsers keep paired APIs. An unsupported replaced global can throw during cleanup; undefined URLs, creation fallback, cancellation and release ordering remain. - Malformed internal MCP calls bypassing AppBridge (#161747): may throw. The SDK still rejects malformed wire blocks before dispatch, proved over real in-memory App/AppBridge transport. UI content, authority, confirmation and custody policy remain. The introducing PR cites no human incident for the second mirror. Production: +176/-394, net -218 lines across 21 eligible old files. Tests: +30. Focused owner/sibling tests, targeted types/lint/format, lint-suppression and independent P0-P2 review pass. Import edges are unchanged; runtime/Madge cycle proof remains zero. Whole-tree Knip timed out at existing limits; heavy gallery renderer runs did not reach assertions, while its owning controller suite passed. * refactor(ui): remove obsolete Fetch capability branch The supported Control UI browser floor includes Fetch. Start attachment metadata reads directly rather than leaving an unsupported runtime in a permanent checking state. Best-effort tradeoffs accepted - Missing global Fetch: the guard originated in #64104, whose feature report cites no human missing-Fetch incident. An unsupported runtime that replaces Fetch now reaches the existing rejected-request/unavailable path. Metadata validation, auth/tickets, allow POST, cancellation, resource admission, expiry and bounded retry remain unchanged. No intended rendering change. Unchanged lifecycle baseline: 21/21, 25.09 s. Final lifecycle and attachment siblings: 50/50, 14.77 s. UI types, typed lint, formatting and lint-suppression checks pass. This cut removes five production lines including formatter reflow, bringing the lane to 223 net production lines removed. Fresh independent P0-P2 review is scoped-clean with no actionable findings. * fix(ui): use global frame scheduling APIs Preserve double-frame paint timing and cancellation without requiring a Window object in renderer-free hosts that supply the standard global APIs. The existing access suite reproduces seven unhandled errors before this fix and passes on main; all 130 affected cases plus 262 timing/state/send sibling cases now pass without test changes.
…#170823) * refactor(apple): simplify old shared and macOS bookkeeping Replace redundant generations with existing cancellation or actual owner identity, consolidate parallel fallback/policy paths, and remove test-only forwarding layers. Preserve authority, FIFO, durable state, resource bounds, public protocol/config shapes, signing, permissions, and visible rendering. Reuse canonical session-key normalization for Voice Wake delivery selection: opaque Signal group IDs remain case-sensitive and main aliases are not added. Use canonical IP-literal policy for discovery labels and remote CLI validation. Best-effort tradeoffs accepted - Palette generation (openclaw#159350): synthetic direct completions bypassed the sole cancellation-owning caller; unsupported future callers can show stale results until the next search. Current cancellation/request/agent checks remain. - Link preview generation (openclaw#160710): synthetic URL replacement without caller cancellation is outside the SwiftUI task lifecycle; a late cosmetic result can remain until the next refresh. Network/SSRF checks and bounded caches remain. - Sidebar preview generation (openclaw#147197): same-request overlapping cache reads can finish out of order; no linked human failure report, and a later refresh replaces the cosmetic projection. Owner/request checks remain. - Source-preview producer revision (openclaw#148906): duplicate of exact task cancellation, with no human failure report. Consumer revision and authenticated resource authority remain. - Mermaid generations (openclaw#135470/openclaw#135746): feature stress fixtures, no linked human race report. Exact subscriber cancellation and job/WebView identity retain the same admission; no extra failure accepted. - Camera JPEG UUID (openclaw#107879): duplicates exact task cancellation; openclaw#107804 was a human feature request, not a generation-specific incident. Captured session/agent/route and attachment admission remain. - Discovery generation (openclaw#145435): speculative queued callbacks, no linked human incident. A stopped browser may publish one late discovery projection; next discovery/refresh repairs it. Connection authority remains separate. - FSEvents generation (openclaw#145453): synthetic stop/restart fixtures, no linked human incident. An old callback after restart may cause one extra refresh; serial lifecycle ownership and pending-work cancellation remain. - Menu generations (openclaw#139688): feature-local late-result fixtures, no linked human incident. Exact task cancellation replaces duplicate tokens; drain-before-disconnect and real consumer/window authority remain. - Cron generation (openclaw#131466/openclaw#137502): openclaw#138209 cut every load over to one cancel-and-drain chain. No direct concurrent load caller remains; cancellation and physical source leases stay checked after awaits. - WebChat visibility acknowledgement/retry (openclaw#113634/openclaw#137089): synthetic timeout/reconnect interleavings, no linked human incident. A timed-out visibility update is best effort until the next transition/reconnect; FIFO and live socket leases remain. - WebChat cleanup UUID (openclaw#113634/openclaw#137089): retain one bounded completed Task handle per live connection instead of matching cleanup tokens. Completion releases captures; replacement/retirement removes the handle. - Child-exit polling (openclaw#145437): synthetic missed-notification coverage, no linked human report. A lost OS exit notification may wait for the existing deadline; final non-reaping liveness/status checks and cleanup remain. - Realtime iterator borrowing trap (openclaw#156772): every real consumer awaits its own iterator sequentially. Unsupported concurrent next calls no longer get a custom custody protocol; bounded stream/cancellation/socket checks remain. - Receipt projection admission (openclaw#161745): both real callers already match receipt and row identity immediately before synchronous projection. Those effect checks remain; no unsupported internal caller is defended twice. - Recap attribution heuristics (openclaw#112188/openclaw#113084): synthetic guard matrix, no linked human race report. Missing initial rows or very late unrelated completion may supply a cosmetic footer; per-session freshness, failed-turn handling and settled results remain. - PortGuardian per-write schema scans (openclaw#110527): synthetic live-handle version advance, no linked human incident. Concurrent external schema upgrades are best effort until reopen; initial admission, migration locks, receipts, transactions and durability remain. - Unread queue counter (openclaw#110019): actual Task equality replaces the duplicate integer token. Exact-tail reclamation, bounded bookkeeping, FIFO and route authority remain unchanged. Review dispositions: the claimed Task compilation failure is disproved by the selected SDK's Equatable conformance and native builds. Repeated receipt identity admission is unnecessary at its internal projector because both real callers retain it immediately before projection. Per-write schema revalidation was declined under the explicit best-effort policy above. Proof and scope Net production reduction: 369 lines (148 added, 517 deleted), excluding tests. Fresh seven-day census permits all substantive production edits; the only recent caller change is the unavoidable one-line fallback-to-parse rename. Shared Swift build passed. Final focused shared tests passed 396 cases in six suites (6.683s execution), Watch decoder tests passed five cases (0.003s), and isolated whole-owner native tests passed 16 cases. macOS SwiftPM compiled all products and the test bundle. Final macOS and iOS/Watch xcodebuild builds passed (89.60s and 120.87s wall), without signing changes or app launches. Canonical Apple lint/format checks passed; the initial iOS format failure in WatchCommands was ours and corrected, with no gate weakened. Lint-suppression tests passed 3/3 (14.09s wall). Earlier runtime cycles and Madge each reported 0; the TypeScript graph is unchanged. Native localization stayed at 4476 entries. The 45 original packaging/elevation timeout cases passed one focused retry (94.79s wall), with no assertion/budget change and no claim of a diagnosed fix. Known gaps: seven issues remained in the earlier ChatStreamReplayTests narration=false package cases; causality/current-main attribution is unproven. App-hosted macOS tests were not executed on the operator desktop. No hosted CI or PR was started: the explicit BELOW-500 rule requires a branch-only handoff. * refactor(ui): consolidate old UI owners and validation Share route decoding, attachment retention, gallery preparation, transient identity encoding, override copying, and extension classification. Remove duplicate admission/schema mirrors and obsolete supported-browser fallbacks. Both Lit and Solid paths remain; no rendering change is intended. No config, protocol, persisted shape, dependency, or public SDK change. Best-effort tradeoffs accepted - Malformed internal native requests (openclaw#140988): all callers are typed and native hosts validate at the effect; their error replaces the renderer mirror. - Worker replacement during an identity query (openclaw#140484): added for synthetic autoreview interleavings, not a human incident. Return false; normal worker announcements and foreground recovery observe the next active worker. - Native readiness changing between synchronous checks (openclaw#140484/openclaw#109719): rely on queued events. A broken native event can require another worker event or reload; camera readiness retains its existing five-second error deadline. - Overlapping application-root health reporters (openclaw#152638): startup mounts one root. Unsupported overlapping roots are last-publication-wins; the actual reported health/status feature and native trusted-document checks remain. - Polling after stop (openclaw#139704): its sole owner retires eligibility first. Scheduling now uses that owner admission, not a separate read-only generation. - Resetting an observer without retiring its connection (openclaw#116887): no production caller does this. Canonical connection epochs remain the sole retirement owner; unsupported direct live-scope reset no longer fences an old response separately. - Upload policy changing during local reads (openclaw#158567): decoded/hash work can finish. Draft publication and every upload request retain live policy checks. - Missing supported browser primitives (openclaw#105240/openclaw#151388/openclaw#100024/openclaw#102745): unsupported runtimes error instead of code-point initials, skipped input yield, wall-clock timing, or approximate microtask paint. The human progress-card fix in openclaw#151386 keeps its browser yield and durable FIFO handoff unchanged. - URL APIs disappearing after URL creation (openclaw#100024/openclaw#149330): supported browsers keep paired APIs. An unsupported replaced global can throw during cleanup; undefined URLs, creation fallback, cancellation and release ordering remain. - Malformed internal MCP calls bypassing AppBridge (openclaw#161747): may throw. The SDK still rejects malformed wire blocks before dispatch, proved over real in-memory App/AppBridge transport. UI content, authority, confirmation and custody policy remain. The introducing PR cites no human incident for the second mirror. Production: +176/-394, net -218 lines across 21 eligible old files. Tests: +30. Focused owner/sibling tests, targeted types/lint/format, lint-suppression and independent P0-P2 review pass. Import edges are unchanged; runtime/Madge cycle proof remains zero. Whole-tree Knip timed out at existing limits; heavy gallery renderer runs did not reach assertions, while its owning controller suite passed. * refactor(ui): remove obsolete Fetch capability branch The supported Control UI browser floor includes Fetch. Start attachment metadata reads directly rather than leaving an unsupported runtime in a permanent checking state. Best-effort tradeoffs accepted - Missing global Fetch: the guard originated in openclaw#64104, whose feature report cites no human missing-Fetch incident. An unsupported runtime that replaces Fetch now reaches the existing rejected-request/unavailable path. Metadata validation, auth/tickets, allow POST, cancellation, resource admission, expiry and bounded retry remain unchanged. No intended rendering change. Unchanged lifecycle baseline: 21/21, 25.09 s. Final lifecycle and attachment siblings: 50/50, 14.77 s. UI types, typed lint, formatting and lint-suppression checks pass. This cut removes five production lines including formatter reflow, bringing the lane to 223 net production lines removed. Fresh independent P0-P2 review is scoped-clean with no actionable findings. * fix(ui): use global frame scheduling APIs Preserve double-frame paint timing and cancellation without requiring a Window object in renderer-free hosts that supply the standard global APIs. The existing access suite reproduces seven unhandled errors before this fix and passes on main; all 130 affected cases plus 262 timing/state/send sibling cases now pass without test changes.
Closes #158556
What Problem This Solves
Gateway operators need a way to disable client file and image uploads without disabling normal text conversations.
User Impact
Set
gateway.uploads.enabledtofalseto hide Control UI upload controls and reject client upload requests at the Gateway. It defaults totrueand hot-applies without restarting. Existing attachment drafts remain recoverable; text-only messages still work.{ "gateway": { "uploads": { "enabled": false } } }This governs client uploads, not agent filesystem permissions or incoming channel media. Downloads, existing media and agent-generated output retain existing policies. Trusted third-party tools writing their own client bytes must use the documented optional final-write callback; this is not a filesystem or DLP sandbox. No stored-data migration is required.
Why This Change Was Made
The Gateway owns the switch and rejects direct API uploads, not just browser controls. Live policy checks reach proposal/library storage and Workboard's final publication. Text-only skill edits retain existing support files by exact revision instead of re-uploading or discarding them.
Evidence
Config-help snapshot follow-up: the feature already intentionally declares
gateway.uploads.enabledas a common setting, but the exact curated-common-leaf snapshot omitted it. CI run36363112254and the local captured config plan both reproduced the same single mismatch. Regenerating the named snapshot adds only that one sorted leaf; production visibility, schema, test enumeration, and the exact-set assertion are unchanged. This aligns expected output with the authorized feature, not an exception to the test.Archive-shortcut fixture follow-up (test only): the real keyboard action already returns an async header-action promise after its lazy import, archive workflow, and Undo toast. The fixture now observes that real call with a pass-through spy, asserts its exact target, and awaits its completion before the unchanged toast, durable-ID patch, draft, navigation, and Undo checks. No production behavior, mock implementation, timeout, isolation setting, or assertion was weakened.
The original hosted run
36360979826failed this first toast assertion (zero calls; 1.838s), while the rest of its 225-file shard recorded 3,663 passes and 3 skips. The failure did not reproduce in the unchanged local file (24 cases / 4.77s) or valid captured-plan replay (3,667 cases / 91.99s). A cold import outlasting the incidental 1-second poll is a plausible mechanism, but the exact hosted cause remains uncertain; a stale mock identity was not independently excluded. The retained toast assertion would still expose a settled action with no expected toast.The first local shard attempt had four browser-start failures caused by an overlong process-only temporary path, not archive assertions. Restoring the browser runner’s ordinary short OS temporary paths made the unchanged full plan pass; those failed startup attempts are not counted as passing proof. The earlier auto-merge request was retired through native recovery before this repair. Replacement landing must satisfy the native completed-evidence recovery gates.
Prior conflict-only refresh: merged main
da04ae795c8dc24b000916161aadbb2e9f352cd2to resolve the sole conflicted generated config-documentation hash. The upload source patch is unchanged acrosssrc,ui,extensions, andpackages(stable patch IDdd92e1517bf266745ee8093c6bc45467b1e362ce); the only intersecting paths were the generated hash, existing assertion-baseline shrink, and Gateway documentation. Canonical config regeneration/check, document formatting, and diff checks pass. The freshly composed UI build passes in 17.59s, with 372,295 / 372,347 B startup JavaScript, 50,488 / 51,200 B startup CSS, and 204.9 / 215.0 KiB largest ordinary JavaScript. No budget or source-code exception was added. The prior full-build, runtime and independent-review evidence below is retained rather than rerun or relabeled as new-head execution. ClawSweeper revision 17 completed the precedingcb337ed1e180head at 23:58:58 UTC with no code or security findings; its policy/budget items retain their documented owner dispositions.Prior main reconciliation: incorporates main
d038d1dbbfcf3ed5010912301a7d6c406003d231, preserving both histories and the retired Tasks cutover. The only textual conflicts were the generated config-doc hash/counts; those were regenerated through the owning command. The UI boot manifest was regenerated from ready routes. A composed router line-cap violation was fixed by consolidating the repeated exact-handler-identity/policy decision in the existing core-handler owner; both router fences and their ordering remain unchanged. No cap, timeout, assertion, or policy exception was added.b459eb600f23restart-status fixture and6ad6f1fbe846maintenance-error-cause fixture, without changing production recovery or restoring Task state. The captured original restart plan failed 4 cases / passed 923; the corrected PR plan passes 927 cases in 126.75s. Main proof passes 1,143 cases with 14 existing skips in 132.62s. Focused restart cost: 27 cases / 48.11s; maintenance: 15 cases / 17.73s.idempotentSessionCreate, whose identity/authority and replay checks precede the inner handler. The real-router accepted-retry test covers this ordering. The concern is rejected on that source and behavior evidence, not relabeled a clean review. Final scoped source review: both the immutable main-composition audit and the final two-file consolidation audit found no P0–P2 regression; the latter verified exact handler identity, both fence positions, complete helper replacement, and preserved lazy handler loading.The first local runtime invocation used two nonexistent file selectors and executed no cases; only the corrected selection is counted. An overlapping build was stopped by its compiler namespace guard when the test runner created metadata. The serialized rerun retains that guard; the earlier build and interrupted static tail are not passing evidence. Enforced published-head CI, exact-head local review, and the native recent-ClawSweeper completion check remain separate landing gates.
Earlier implementation and verification evidence
Upstream CI fixture follow-up (test only): adopts the exact correction already landed in
14ef6ab47832(#159819). Main had retired thetaskIdartifact selector from both the schema and resolver, but one topology assertion still supplied it. Supported run/session authorization and topology checks remain intact; production code and test timeouts are unchanged. The original captured PR plan reproduces 1 failure / 919 passes / 1 existing skip in 179.26s. With the canonical fix, the complete 69-selector plan passes 1,020 cases with 1 existing skip in 287.32s, including the isolated leg. The independent main proof passes 1,053 cases with 14 existing skips in 291.97s; the focused file, Gateway-methods types, lint, formatting, and scoped independent review pass. Initial local Doctor timeouts were isolated to ambient Gateway-auth inputs: unchanged tests pass after removing those inputs only from the test subprocess. Stored credentials, product code, and test timeouts were unchanged. Current-head hosted CI and review are still required.Receipt-safe disabling: accepted chat, session creation, send, and message-action requests keep their authorized cached or in-flight receipts after hot-disable. Fresh input still returns
FORBIDDEN / UPLOADS_DISABLEDbefore new byte effects. The canonical receipt owners make that distinction; exact handler identity limits router deferral, and overrides retain both fences. Outbound route validation precedes replay, while binding publication and new work follow input admission. A refused request neither caches a denial nor pins a route; re-enabling it uses the current account default. Existing caller, session, runtime, cancellation, final-write, and handoff checks remain intact.Main reconciliation: the candidate preserves the published branch and main
e3f3c15ebfehistories, including main's Task runtime removal. Old CI's schema-probe failure is superseded by main's1664e4cf262/af9e273f634reverts; the obsolete local test correction was not published. Main'sc4e67604df4dremoves the exact unused iOS import reported by the old scan. Local static validation found a stale media-test callback; this candidate incorporates the exact already-landed three-fixture repair0b6f02faae3(#159836), whose 16 focused cases pass in 79.43s. Fresh published-head CI remains required; these are not rerun claims for the old failed/cancelled jobs.Build and approved budget: the main-composed full package build passes in 459.07s. Its separate asset check passes: startup JavaScript 371,645 / 372,347 B, startup CSS 50,359 / 51,200 B, largest ordinary JavaScript 204.1 / 215.0 KiB. Canonical boot-manifest regeneration was used; no packing or budget exception was added. The existing @steipete-approved 371,771 B baseline and 512/64 B allowances remain unchanged. CSS remains above the advisory target. The later receipt repair changes backend admission and tests, not UI source; exact-head CI owns final published-artifact validation.
Before — uploads enabled
After — uploads disabled
Earlier implementation proof and measured costs
Current-main reconciliation and receipt recovery: merged
ac4c248d7789while preserving both histories and the existing admission owner. Caller/runtime authority is separate from upload input policy. Stop receipts survive a concurrent disable, and the canonicalagentRPC reconciles an authorized cached receipt before admitting new bytes; overridden handlers retain the router fence. A fresh idempotency key still returnsFORBIDDEN / UPLOADS_DISABLED, with no files, inference or leftover reservation. The Stop-plus-disable case fails before repair (15.92s); the real-router retry also reproduces the prior denial (34.41s). The repaired three-file lifecycle/receipt selection passes 431 cases in 161.56s; final router/upload-policy checks pass 45 cases in 33.66s. The final nine-case real-writer file alone passes in 22.65s. The current-main composition also passed 421 cases across 5 files in 190.41s, including presence and skills flows. Both bundled browser files pass 8 cases in 27.35s after boot regrouping.The full package build passed in 351.14s. Its separate performance check exposed a 99-byte ordinary-chunk excess; canonical ready
/newand/chatboot-manifest regeneration fixed it without changing packing constants or raising any budget. On committed candidate89f5025563b, startup JavaScript is 371,616 / 372,347 B, startup CSS 50,359 / 51,200 B, and the largest ordinary JavaScript chunk is 214.9 / 215.0 KiB; all enforced asset budgets pass. CSS remains above its advisory target. Composition with current mainb8894086496eis conflict-free; this is local composition proof, not hosted CI success.Current-main static validation passed core, all 25 core-test graphs, UI, plugins, plugin tests and script types; ratchets, formatting, metadata and dead exports also passed. The whole-core lint run found only the unchanged main 701-line projection file, repaired with the exact already-landed simplification from
54c0ae69cb8(#159473). Fresh scoped lint passes 181 core/UI/package files, 7 Workboard files and the performance script; style, schema, architecture and authorization guard tails pass. Subsequent receipt changes have fresh core/Gateway types, lint, line-cap checks and zero-cycle Madge analysis. The monolithic changed-check is not relabeled all-green: its valid prefix plus these corrected tail checks supply the evidence. Full current-candidate independent P0–P2 review is scoped-clean; the final mechanical request-fact reuse also passes its router tests and lint. New published-head CI remains required.Stop during attachment preparation: replay the existing terminal Stop/timeout receipt instead of returning an attachment error after the reservation ends. Settlement stays with the existing agent-deduplication lifecycle; storage admission and cleanup remain intact. The existing attachment-setup tests reproduced 2 failures before repair (41.63s); the added real-handler/filesystem Stop regression also failed on the original code (17.77s). The complete recorded 67-file Gateway-methods plan now passes 1,685 cases in 292.82s with a process-only non-Git temp root. After placing settlement in its lifecycle owner, the final real-writer policy/Stop suite passes all 8 cases in 38.80s, and the attachment-setup selection passes 4 cases in 13.56s (382 intentionally unselected). Independent P0–P2 review is scoped-clean. The complete five-file changed-check gate passes, including core plus all 25 core-test type graphs, lint, ratchets, dead exports and architecture/auth guards; separate Madge analysis reports zero cycles. New-head hosted gates are not yet claimed. One intervening compilation attempt executed no cases because newly written local proof metadata changed the compiler namespace; the frozen replay above is the valid run.
Steering fixture correction (tests only): CI36308777797 exposed3 failures because the directive-test helper advertised unguarded V1 while upload-bearing, source-bound steering requires V2. Both production adapters already register V2 (
attempt-stream-prepare.ts:478–527,run-attempt-active-turn.ts:529–569); the registry deliberately rejects source-bound V1. CI reported3failures/1283passes; the ordinary64-file leg of the recorded67-file plan reproduced those3 plus a separate local temp-root Git-marker failure (4failures/1282passes190.34s). The steering file alone reproduces3failures/222passes52.63s. Its default fixture now uses V2 and invokes the supplied guard immediately before mock-queue handoff, in the existing sibling support module. All225 test cases retain their assertions and timeouts; explicit legacy cases remain unchanged. All225cases pass23.37s; ratchets, formatting, lint and Gateway-methods types pass; independent P0-P2 review is scoped-clean. The first corrected full-plan replay passed all steering cases but retained the separate touched-files environment failure (1failure/1285passes186.08s). The shared local temp root has a pre-existing empty.gitmarker, violating that test’s non-checkout premise; it was not removed or modified. With a process-only verified non-Git temp root, all10 touched-file cases pass11.52s. The clean-temp replay passed the ordinary 64-file/1,286-case leg, then exposed the agent Stop/timeout attachment defect in the isolated leg. The repair and complete 67-file passing replay are recorded above. The steering change itself remains test-only; fresh CI remains required.Custom plugin final-write guard: a plugin explicitly persisting client bytes now checks live upload policy regardless of its tool name. Whole-request and inherited RPC checks retain their captured classification so text-only tools stay available; trusted internal RPC remains exempt. A tiny custom plugin fixture exercises real loopback HTTP/RPC dispatch, the production plugin-context resolver, and native fs-safe
Root.writeadmission (the tool catalog is injected, not a full plugin-loader/production-traffic test). On prior code, both initially-disabled and late-disabled requests returned200 and overwrote an existing file;3 enabled/internal/text controls passed (21.87s wall). Repaired full HTTP suite:66cases pass35.52s, about3.4s test time with most wall spent compiling workers. Four authority/context/Workboard sibling files:79cases pass25.40s. Ratchets, formatting, lint, core and Gateway-root types pass; incremental P0-P2 review is scoped-clean.Cancellation follow-up: preserve the original abort reason before checking composed attachment admission. CI36307185176 failed the existing unsandboxed-cancellation case (1failure/823passes in the66-file ordinary Gateway-methods shard); replaying its captured70-file plan reproduces that failure in173.95s, and the file alone reproduces1failure/11passes in44.80s. The one-line repair passes all19 cancellation/upload-policy cases in67.17s, with unchanged assertions and awaited abandoned-file cleanup. It preserves ordinary staging-error and explicit RPC-abort precedence. Targeted lint, core and Gateway-methods types pass; incremental P0-P2 review is scoped-clean. The complete captured70-file Gateway-methods plan now passes896cases in194.71s, including its isolated-project cases. No test expectations changed.
Avatar settlement follow-up: if an inline avatar has already been written while uploads are enabled, finish its matching config projection instead of returning a denial with an unreported durable write. Creation keeps delegated/recovery authority live; update keeps workspace authority live. Input that has not yet been published is still denied after hot-disable, including bootstrap-only creation. Three real-writer settlement cases fail on the prior implementation (7 controls pass;46.99s wall); all10 policy cases pass after repair (51.81s wall). This includes remote write acknowledgment and unchanged-identity/no-publication controls. The file uses one state fixture and real native identity/config writers; mocking those writers would miss this partial-write defect. Most wall cost is compiled-worker preparation (34.56s in the green run); test time is about11s. Incremental independent review is scoped-clean through P2. Owning sibling tests passed37 cases (13 existing skips); they also exposed a missing pre-call authority assertion from the earlier final-hook change. Restoring that assertion alongside the native final-write hook makes the final43 creation-unit +10 policy cases pass in46.49s combined. The full selected six-file changed-check run completed successfully, including all25 core-test type graphs and its architecture/auth guards. The subsequent one-line cancellation repair has separate targeted checks above. Exact-head hosted gates remain required.
CI repair: run36306180497 exposed a main-composition callback shadow and a type-only chat-admission import cycle. Both are corrected without changing runtime behavior; targeted lint, full architecture check (including Madge) and core typecheck pass. The failed/cancelled run is not passing evidence.
Prior main reconciliation: merged
a66d75f96795while preserving both histories. The only manual conflict resolution was canonical regeneration of the config-documentation hash. All runtime files auto-merged, including upstream delegated-media custody. With current locked dependencies, 215 cases across 8 affected files pass in123.15s; config-baseline validation, core types and the Control UI build pass. Earlier broader checks below remain retained evidence; new-head CI is still required.Current repair: input-only policy reaches the final filesystem, SQLite or transport admission for chat/agent/session/companion media, outbound buffers, inline avatars, terminal uploads, staged skill archives and installation, and HTTP/plugin tools. Classification survives hydration. Accepted results and compensating cleanup remain intact. Plugin tool context gains an optional SQL-safe
assertInputCommitAllowed; no schema, stored-format, retention or transaction-model change.d2dc4030b2f, HTTP tool → in-process Gateway → archive storage returned success and committed a new SQLite upload row after hot-disable. The repaired path returns 403 and leaves rows unchanged. Original-code avatar, inbound/outbound, terminal, skill-install and media-publication regressions also fail at the intended boundary; repaired owner cases pass.retainFilesfor unchanged support files rather than retransmitting their bytes. Earlier actual Control UI/mock-Gateway E2E verified hot policy refresh, hidden file/photo/camera controls, preserved drafts and text-only sending. It is not live production-traffic proof.Validation before the mechanical main refresh: all planned changed-scope checks passed across the main run and targeted failure replays: core and all test type graphs, extension types, core/extension lint, ratchets, dead exports, SDK boundaries and architecture/auth guards. Final fixture replay passed 42 cases, including all 7 browser cases, in63.00s. Independent review completed with 11 reports: old-index observations are resolved by the staged repaired tree; four context-dependent concerns were checked against complete callers. No actionable current-tree finding remains from that review; it is not described as scoped-clean. New-head CI and ClawSweeper review remain required.
Performance approval: @steipete approved the paired startup baseline/cap 370,756→371,771 B (+0.27%) on September 27. The existing 512 B growth and 64 B variance allowances remain unchanged. The reconciled committed build measures 371,616 / 372,347 B startup JavaScript. Startup CSS is 50,359 B, below its 51,200 B hard ceiling but above the advisory target. No new budget exception.
Current CI investigation: run36308009045 on12c2655e0cb failed
native-subagent-monitor.rotated-parent.test.ts(finishes-after-registration) withTask registry read identity requires preparation:1failed/325passed/1skipped across11files127.31s. The implicated test, monitor/history-recovery, SDK task-runtime and task-reader files are unchanged against the incorporated main base. The captured11-file owner plan passes326cases with1existing skip locally in87.20s, then the isolated file passes22cases in63.66s. The failure did not reproduce. Source inspection found a retained prepared task-read path, but no safe demonstrated repair was established; no Codex/task-reader source, assertions, retries or timeouts were changed. Local replay is not the hosted runtime environment and is not proof of a fix. The original failure remains recorded, and the new head still requires enforced CI.Historical proof and limits: previously published proposal/library/Workboard final-effect fixes were verified through real handlers and filesystem/SQLite writers; 223 Workboard cases and the proposal/library owner regressions passed. Reconciliation preserved current-main identity, attachment-read and request-lifecycle ownership. The earlier UI shard 3 had four 5px desktop-overflow failures, reproduced once in isolation; they are not claimed fixed by this change. Published-head CI later failed the skills-library request-shape assertion now corrected by the 7-case browser replay. On published head
2b78910f608a, CI36309927348 passed all three UI checks and all nine browser-E2E shards, including shard 3; this is observed passing evidence, not a diagnosed fix for the historical overflow. The same run failed the Gateway agent attachment cases repaired above and cancelled sibling jobs. Exact-head CI still owns final validation. Cancelled and skipped jobs are not passes.Focused late-effect test costs
Seconds, retained single-worker file measurements; wall includes compiler/cache, imports and teardown. Subsequent grouped fixture replays are stated above.
src/unless noted)Negative-control wall: avatar25.44s, inbound23.17s, outbound25.97s, archive-install9.68s, nested SQLite9.97s, buffer/stream publication8.01s, Workboard tool storage10.15s. Failures were inspected for their intended effect; unsuccessful fixture/compilation attempts are excluded. Native lifecycle cleanup and shared suite fixtures are retained. New-head CI seconds will be recorded after the run exists.
Historical measurements
Retained from earlier published revisions; cancelled/failed CI jobs below are not passing evidence for the new head.
Measured changed-test costs
Seconds. Unit commands ran serially as
pnpm test <file> --maxWorkers=1; the browser E2E used the supported bundled UI runner. Wall includes launcher, worker compilation/cache, imports, and teardown. Case time sums reported Vitest milliseconds, not a percentage conversion. Existing suite-level fixtures remain shared; no new per-test Gateway boots. Two plugin-page files contain fixture-type-only changes, no new cases. First ready CI run 36210733555: bundled-protocol job failed after218s (protocol step141s); fail-fast cancelled the rest. Control UI performance passed in135s and UI E2E shard9/9 passed in216s. UI unit shards were cancelled after245s each; those are not passing results. Repaired-head CI remains required. The additional proposal-upload suite has19 passing cases, ~1.5s execution and12.68s warm command wall; its136-case sibling replay took64.20s.Updated changed-test costs (seconds)
src/gateway/server-methods/skills-library.test.tsextensions/workboard/src/gateway.test.tsui/src/app/app-host.test.tsui/src/app/app-host.chat-metadata.test.tsui/src/app/app-shell-gateway.test.tsEach measured with
pnpm test <file> --maxWorkers=1; wall includes loading/compilation. Full local Node UI shard2:161.44s; shard 3:156.57s, including the reported geometry failures. CI run36213313574 failed the missing-config fixtures; bundled protocol passed207s, UI1/3 passed313s, failed UI2/3 and3/3 jobs319s/324s. These are job elapsed times, not isolated test cost. New-head CI is required.Worked on by
Work sessions
View the OpenClaw team session