Repository navigation
fix(webchat): stage offloaded images for file tools - #168537
Conversation
|
🦞👀 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. |
|
Proof: head f3eb7f752c9c633f5bc69de71cd5638a7b2af5e5 Regression: src/gateway/server-methods/chat-send-user-turn.test.ts
|
|
Codex review: needs maintainer review before merge. What this changesThe PR makes large WebChat image uploads available to workspace file tools while preserving one native vision input. Example: Upload a 3,147,780-byte PNG through WebChat and ask the agent to inspect it with a workspace tool.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR repairs the remaining offloaded-image staging gap on current main, with relevant runtime proof and no actionable findings. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway attachment preparation supplies managed media facts to the existing workspace staging owner; prompt preparation reconciles those staged files with transcript image references before vision hydration. flowchart LR
A[WebChat upload] --> B[Gateway attachment preparation]
B --> C[Managed media store]
C --> D[Inbound media staging]
D --> E[Workspace file tools]
C --> F[Native vision hydration]
D --> F
Technical reviewBest possible solution: Land the focused repair through the normal gates, retaining the existing staging owner and filesystem checks. Do we have a high-confidence way to reproduce the issue? Current-main source exposes the missing staging handoff for an above-threshold upload to a vision-capable model; supplied baseline Gateway output demonstrates the missing workspace file, without this review executing target code. Is this the best way to solve the issue? The repair addresses the producer’s missing handoff and uses canonical staged-reference resolution instead of teaching file tools to guess an image_0 mapping. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 524ed78c04c6. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +30, Tests +206. Total +236 across 5 files. Added test files: 0. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (6 earlier review cycles)
Reviewed October 13, 2026, 12:44 AM ET / 04:44 UTC (Revision 7). |
Vision-capable WebChat uploads above the inline threshold were saved in the media store but never handed to the existing staging owner, so file tools saw image_0 instead of the stored file.
f3eb7f7 to
1d7ce4c
Compare
|
Live proof for head Commands: The proof script called the real attachment parser, Previous CI failure on That race is fixed on current main by waiting until dispatch is entered. This head includes that test, and the local rerun passed. Stdout: {
"head": "1d7ce4cccba26cef57efa773b96fa8a0c1667306",
"thresholdBytes": 2000000,
"offloaded": {
"inputBytes": 2100000,
"imageOrder": ["offloaded"],
"storedPath": "<temp>/media/inbound/photo---8e37922b-6f58-4890-8fd2-43b0cb030942.png",
"storedSha256": "d06adbdb280b38de0c38da71d7202d9bd668df9ec2cd673b9b7ca16c91411fc7",
"inputSha256": "d06adbdb280b38de0c38da71d7202d9bd668df9ec2cd673b9b7ca16c91411fc7",
"bytesMatchStore": true,
"vision": {
"managedPaths": ["<temp>/media/inbound/photo---8e37922b-6f58-4890-8fd2-43b0cb030942.png"],
"managedHydrationSuppressed": [true],
"managedHydrateCount": 0,
"promptMediaCount": 1,
"promptHydrateCount": 1,
"inlinePromptImageCount": 0,
"visionInputs": 1,
"containsImage0": false
},
"fileTool": {
"requestedPath": "<temp>/media/inbound/photo---8e37922b-6f58-4890-8fd2-43b0cb030942.png",
"cwd": "<temp>/workspace",
"content": [
{"type": "text", "text": "Read image file [image/png]"},
{"type": "image", "mimeType": "image/png", "dataBytes": 2100000}
]
},
"sandbox": {
"enabled": true,
"mode": "all",
"stagedPath": "media/inbound/openclaw-staged-bd7ce8d3-53bb-45f1-82f6-6071eac038e8/input-photo---8e37922b-6f58-4890-8fd2-43b0cb030942.png",
"stagedSha256": "d06adbdb280b38de0c38da71d7202d9bd668df9ec2cd673b9b7ca16c91411fc7",
"bytesMatchStore": true,
"fileTool": {
"requestedPath": "media/inbound/openclaw-staged-bd7ce8d3-53bb-45f1-82f6-6071eac038e8/input-photo---8e37922b-6f58-4890-8fd2-43b0cb030942.png",
"cwd": "<temp>/sandboxes/workspace-33270f1e3aec5da22aaa4d517c1d94e3",
"content": [
{"type": "text", "text": "Read image file [image/png]"},
{"type": "image", "mimeType": "image/png", "dataBytes": 2100000}
]
},
"image0": {
"error": "File not found: <temp>/sandboxes/workspace-33270f1e3aec5da22aaa4d517c1d94e3/image_0."
}
}
},
"inline": {
"inputBytes": 68,
"imageOrder": ["inline"],
"managedPath": "<temp>/media/inbound/dot---6dadd448-7c70-4747-8c27-1525ad17da50.png",
"ctxPaths": ["<temp>/media/inbound/dot---6dadd448-7c70-4747-8c27-1525ad17da50.png"],
"vision": {
"managedPaths": ["<temp>/media/inbound/dot---6dadd448-7c70-4747-8c27-1525ad17da50.png"],
"managedHydrationSuppressed": [true],
"managedHydrateCount": 0,
"promptMediaCount": 0,
"promptHydrateCount": 0,
"inlinePromptImageCount": 1,
"visionInputs": 1,
"containsImage0": false
},
"pluginBoundCount": 1,
"fileTool": {
"requestedPath": "<temp>/media/inbound/dot---6dadd448-7c70-4747-8c27-1525ad17da50.png",
"content": [
{"type": "text", "text": "Read image file [image/png]"},
{"type": "image", "mimeType": "image/png", "dataBytes": 68}
]
}
},
"prestaged": {
"pluginBoundCount": 0,
"ctxPaths": ["<temp>/already-staged/attachment-1.png"],
"keptPrestagedPath": true,
"ctxHydrateCount": 1,
"fileTool": {
"requestedPath": "<temp>/already-staged/attachment-1.png",
"content": [
{"type": "text", "text": "Read image file [image/png]"},
{"type": "image", "mimeType": "image/png", "dataBytes": 68}
]
}
}
} |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Follow-up proof on the same head Command: Result: The call used Stdout:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Sandbox vision was following the media URI from the transcript snapshot, which is not a file inside the sandbox. Use the staged workspace path as the single vision input.
|
Running Gateway proof on head Docker was not usable here ( Stdout excerpt: The first provider request contained one |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Typecheck and lint failed because MediaImageRef was imported and never read.
|
CI on
New head: |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Landed in 5c69645. Thanks @synthalorian! Verified on a built Gateway: large WebChat images are now staged where workspace tools can read them, and vision still gets one copy. |
* improve: simplify workspace and memory plugin messages * test(reef): match stored-key generation diagnostic * fix(webchat): stage offloaded images for file tools (#168537) fix(webchat): stage offloaded WebChat images into the managed workspace WebChat images above the inline threshold reached vision input but were not handed to managed workspace staging, so file tools couldn't find them. Offloaded WebChat images now expose their media-store path for staging, path-less transcript images hydrate from the staged sandbox copy, and images already staged are not staged again. Vision still receives exactly one image. Proof: built Gateway chat.send with a 3,147,780-byte PNG: on main the image reached vision but exec found no staged file; on the candidate exec finds the staged PNG. A 378-byte inline image works the same on both. A live gpt-5-mini turn also found the staged image through exec. Thanks @synthalorian. Co-authored-by: Ayaan Zaidi <[email protected]> * fix(gateway): retain model lists across skills refreshes Configuration publications refresh skills because skills can depend on arbitrary config paths. Reuse the published model-list cache when the existing catalog facts still match, while rebuilding commands and other skill-dependent metadata. Model, auth, plugin, catalog and owner changes keep their existing invalidation and read-authority boundaries. Fixes the repeated projection work exposed by 877301a (#170341): scheduled main run 38339144048 rebuilt model lists after each of six UI preference writes. The prepared-model regression also reproduced the unnecessary second projection before this change. Preserve the original integration assertion and verify that skills-dependent commands refresh alongside retained model projections. Validation: prepared-model regression fails before the repair and passes after (2/2 tests; 257.74s on the loaded host). Targeted lint, formatting and diff checks pass. Independent Codex review completed with no actionable findings. The full Gateway freshness integration remains assigned to canonical CI. * test(gateway): resolve auth-policy session targets in workers The synchronous fixture lookup could create a database after a Gateway worker captured its absence, triggering the physical identity guard and closing admission before the initial turn. Use existing read-only worker discovery for both fixture targets, matching neighboring authority tests. Preserve all retained and revoked grant, final-write, and transcript assertions. No production guard or authorization behavior changes. * fix(plugins): retain inspected config for decision diagnostics Plugin inspection resolved the explicitly supplied config, then discarded it while projecting decision providers and consulted the runtime snapshot instead. Cold inspection could fail with an unprepared runtime config; a prepared but different runtime could also report the wrong configured model. Carry the resolved config through the existing inspection context. Cover single and all-plugin inspection with different explicit and ambient models. Plugin loading, decision execution, and lifecycle ownership are unchanged. Original ambient-config lookup: cde6bbd (#152237), exposed by 7e48efb (#169714). Scheduled main 38334375513 repeats nine trust-diagnostics failures. Focused proof: loader.trust-diagnostics 11/11 and status 9/9 passed. The two new cases take 29ms and 15ms; loaded-host wrapper wall 1794.74s is dominated by worker build and module transforms. Independent review found no actionable defects. * fix: allow test builds in containers without systemd (#170640) --------- Co-authored-by: synth <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
* improve: simplify gateway, protocol, and security diagnostics * fix(webchat): stage offloaded images for file tools (#168537) fix(webchat): stage offloaded WebChat images into the managed workspace WebChat images above the inline threshold reached vision input but were not handed to managed workspace staging, so file tools couldn't find them. Offloaded WebChat images now expose their media-store path for staging, path-less transcript images hydrate from the staged sandbox copy, and images already staged are not staged again. Vision still receives exactly one image. Proof: built Gateway chat.send with a 3,147,780-byte PNG: on main the image reached vision but exec found no staged file; on the candidate exec finds the staged PNG. A 378-byte inline image works the same on both. A live gpt-5-mini turn also found the staged image through exec. Thanks @synthalorian. Co-authored-by: Ayaan Zaidi <[email protected]> * fix(gateway): retain model lists across skills refreshes Configuration publications refresh skills because skills can depend on arbitrary config paths. Reuse the published model-list cache when the existing catalog facts still match, while rebuilding commands and other skill-dependent metadata. Model, auth, plugin, catalog and owner changes keep their existing invalidation and read-authority boundaries. Fixes the repeated projection work exposed by 877301a (#170341): scheduled main run 38339144048 rebuilt model lists after each of six UI preference writes. The prepared-model regression also reproduced the unnecessary second projection before this change. Preserve the original integration assertion and verify that skills-dependent commands refresh alongside retained model projections. Validation: prepared-model regression fails before the repair and passes after (2/2 tests; 257.74s on the loaded host). Targeted lint, formatting and diff checks pass. Independent Codex review completed with no actionable findings. The full Gateway freshness integration remains assigned to canonical CI. * test(gateway): resolve auth-policy session targets in workers The synchronous fixture lookup could create a database after a Gateway worker captured its absence, triggering the physical identity guard and closing admission before the initial turn. Use existing read-only worker discovery for both fixture targets, matching neighboring authority tests. Preserve all retained and revoked grant, final-write, and transcript assertions. No production guard or authorization behavior changes. * fix(plugins): retain inspected config for decision diagnostics Plugin inspection resolved the explicitly supplied config, then discarded it while projecting decision providers and consulted the runtime snapshot instead. Cold inspection could fail with an unprepared runtime config; a prepared but different runtime could also report the wrong configured model. Carry the resolved config through the existing inspection context. Cover single and all-plugin inspection with different explicit and ambient models. Plugin loading, decision execution, and lifecycle ownership are unchanged. Original ambient-config lookup: cde6bbd (#152237), exposed by 7e48efb (#169714). Scheduled main 38334375513 repeats nine trust-diagnostics failures. Focused proof: loader.trust-diagnostics 11/11 and status 9/9 passed. The two new cases take 29ms and 15ms; loaded-host wrapper wall 1794.74s is dominated by worker build and module transforms. Independent review found no actionable defects. * fix: allow test builds in containers without systemd (#170640) --------- Co-authored-by: synth <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
* improve: simplify agent, exec, and automation messages * fix(webchat): stage offloaded images for file tools (#168537) fix(webchat): stage offloaded WebChat images into the managed workspace WebChat images above the inline threshold reached vision input but were not handed to managed workspace staging, so file tools couldn't find them. Offloaded WebChat images now expose their media-store path for staging, path-less transcript images hydrate from the staged sandbox copy, and images already staged are not staged again. Vision still receives exactly one image. Proof: built Gateway chat.send with a 3,147,780-byte PNG: on main the image reached vision but exec found no staged file; on the candidate exec finds the staged PNG. A 378-byte inline image works the same on both. A live gpt-5-mini turn also found the staged image through exec. Thanks @synthalorian. Co-authored-by: Ayaan Zaidi <[email protected]> * fix(gateway): retain model lists across skills refreshes Configuration publications refresh skills because skills can depend on arbitrary config paths. Reuse the published model-list cache when the existing catalog facts still match, while rebuilding commands and other skill-dependent metadata. Model, auth, plugin, catalog and owner changes keep their existing invalidation and read-authority boundaries. Fixes the repeated projection work exposed by 877301a (#170341): scheduled main run 38339144048 rebuilt model lists after each of six UI preference writes. The prepared-model regression also reproduced the unnecessary second projection before this change. Preserve the original integration assertion and verify that skills-dependent commands refresh alongside retained model projections. Validation: prepared-model regression fails before the repair and passes after (2/2 tests; 257.74s on the loaded host). Targeted lint, formatting and diff checks pass. Independent Codex review completed with no actionable findings. The full Gateway freshness integration remains assigned to canonical CI. * test(gateway): resolve auth-policy session targets in workers The synchronous fixture lookup could create a database after a Gateway worker captured its absence, triggering the physical identity guard and closing admission before the initial turn. Use existing read-only worker discovery for both fixture targets, matching neighboring authority tests. Preserve all retained and revoked grant, final-write, and transcript assertions. No production guard or authorization behavior changes. * fix(plugins): retain inspected config for decision diagnostics Plugin inspection resolved the explicitly supplied config, then discarded it while projecting decision providers and consulted the runtime snapshot instead. Cold inspection could fail with an unprepared runtime config; a prepared but different runtime could also report the wrong configured model. Carry the resolved config through the existing inspection context. Cover single and all-plugin inspection with different explicit and ambient models. Plugin loading, decision execution, and lifecycle ownership are unchanged. Original ambient-config lookup: cde6bbd (#152237), exposed by 7e48efb (#169714). Scheduled main 38334375513 repeats nine trust-diagnostics failures. Focused proof: loader.trust-diagnostics 11/11 and status 9/9 passed. The two new cases take 29ms and 15ms; loaded-host wrapper wall 1794.74s is dominated by worker build and module transforms. Independent review found no actionable defects. * fix: allow test builds in containers without systemd (#170640) --------- Co-authored-by: synth <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
fix(webchat): stage offloaded WebChat images into the managed workspace WebChat images above the inline threshold reached vision input but were not handed to managed workspace staging, so file tools couldn't find them. Offloaded WebChat images now expose their media-store path for staging, path-less transcript images hydrate from the staged sandbox copy, and images already staged are not staged again. Vision still receives exactly one image. Proof: built Gateway chat.send with a 3,147,780-byte PNG: on main the image reached vision but exec found no staged file; on the candidate exec finds the staged PNG. A 378-byte inline image works the same on both. A live gpt-5-mini turn also found the staged image through exec. Thanks @synthalorian. Co-authored-by: Ayaan Zaidi <[email protected]>
* improve: simplify workspace and memory plugin messages * test(reef): match stored-key generation diagnostic * fix(webchat): stage offloaded images for file tools (openclaw#168537) fix(webchat): stage offloaded WebChat images into the managed workspace WebChat images above the inline threshold reached vision input but were not handed to managed workspace staging, so file tools couldn't find them. Offloaded WebChat images now expose their media-store path for staging, path-less transcript images hydrate from the staged sandbox copy, and images already staged are not staged again. Vision still receives exactly one image. Proof: built Gateway chat.send with a 3,147,780-byte PNG: on main the image reached vision but exec found no staged file; on the candidate exec finds the staged PNG. A 378-byte inline image works the same on both. A live gpt-5-mini turn also found the staged image through exec. Thanks @synthalorian. Co-authored-by: Ayaan Zaidi <[email protected]> * fix(gateway): retain model lists across skills refreshes Configuration publications refresh skills because skills can depend on arbitrary config paths. Reuse the published model-list cache when the existing catalog facts still match, while rebuilding commands and other skill-dependent metadata. Model, auth, plugin, catalog and owner changes keep their existing invalidation and read-authority boundaries. Fixes the repeated projection work exposed by 044ae43 (openclaw#170341): scheduled main run 38339144048 rebuilt model lists after each of six UI preference writes. The prepared-model regression also reproduced the unnecessary second projection before this change. Preserve the original integration assertion and verify that skills-dependent commands refresh alongside retained model projections. Validation: prepared-model regression fails before the repair and passes after (2/2 tests; 257.74s on the loaded host). Targeted lint, formatting and diff checks pass. Independent Codex review completed with no actionable findings. The full Gateway freshness integration remains assigned to canonical CI. * test(gateway): resolve auth-policy session targets in workers The synchronous fixture lookup could create a database after a Gateway worker captured its absence, triggering the physical identity guard and closing admission before the initial turn. Use existing read-only worker discovery for both fixture targets, matching neighboring authority tests. Preserve all retained and revoked grant, final-write, and transcript assertions. No production guard or authorization behavior changes. * fix(plugins): retain inspected config for decision diagnostics Plugin inspection resolved the explicitly supplied config, then discarded it while projecting decision providers and consulted the runtime snapshot instead. Cold inspection could fail with an unprepared runtime config; a prepared but different runtime could also report the wrong configured model. Carry the resolved config through the existing inspection context. Cover single and all-plugin inspection with different explicit and ambient models. Plugin loading, decision execution, and lifecycle ownership are unchanged. Original ambient-config lookup: 0a54fc6 (openclaw#152237), exposed by 5dbf215 (openclaw#169714). Scheduled main 38334375513 repeats nine trust-diagnostics failures. Focused proof: loader.trust-diagnostics 11/11 and status 9/9 passed. The two new cases take 29ms and 15ms; loaded-host wrapper wall 1794.74s is dominated by worker build and module transforms. Independent review found no actionable defects. * fix: allow test builds in containers without systemd (openclaw#170640) --------- Co-authored-by: synth <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
* improve: simplify gateway, protocol, and security diagnostics * fix(webchat): stage offloaded images for file tools (openclaw#168537) fix(webchat): stage offloaded WebChat images into the managed workspace WebChat images above the inline threshold reached vision input but were not handed to managed workspace staging, so file tools couldn't find them. Offloaded WebChat images now expose their media-store path for staging, path-less transcript images hydrate from the staged sandbox copy, and images already staged are not staged again. Vision still receives exactly one image. Proof: built Gateway chat.send with a 3,147,780-byte PNG: on main the image reached vision but exec found no staged file; on the candidate exec finds the staged PNG. A 378-byte inline image works the same on both. A live gpt-5-mini turn also found the staged image through exec. Thanks @synthalorian. Co-authored-by: Ayaan Zaidi <[email protected]> * fix(gateway): retain model lists across skills refreshes Configuration publications refresh skills because skills can depend on arbitrary config paths. Reuse the published model-list cache when the existing catalog facts still match, while rebuilding commands and other skill-dependent metadata. Model, auth, plugin, catalog and owner changes keep their existing invalidation and read-authority boundaries. Fixes the repeated projection work exposed by 044ae43 (openclaw#170341): scheduled main run 38339144048 rebuilt model lists after each of six UI preference writes. The prepared-model regression also reproduced the unnecessary second projection before this change. Preserve the original integration assertion and verify that skills-dependent commands refresh alongside retained model projections. Validation: prepared-model regression fails before the repair and passes after (2/2 tests; 257.74s on the loaded host). Targeted lint, formatting and diff checks pass. Independent Codex review completed with no actionable findings. The full Gateway freshness integration remains assigned to canonical CI. * test(gateway): resolve auth-policy session targets in workers The synchronous fixture lookup could create a database after a Gateway worker captured its absence, triggering the physical identity guard and closing admission before the initial turn. Use existing read-only worker discovery for both fixture targets, matching neighboring authority tests. Preserve all retained and revoked grant, final-write, and transcript assertions. No production guard or authorization behavior changes. * fix(plugins): retain inspected config for decision diagnostics Plugin inspection resolved the explicitly supplied config, then discarded it while projecting decision providers and consulted the runtime snapshot instead. Cold inspection could fail with an unprepared runtime config; a prepared but different runtime could also report the wrong configured model. Carry the resolved config through the existing inspection context. Cover single and all-plugin inspection with different explicit and ambient models. Plugin loading, decision execution, and lifecycle ownership are unchanged. Original ambient-config lookup: 0a54fc6 (openclaw#152237), exposed by 5dbf215 (openclaw#169714). Scheduled main 38334375513 repeats nine trust-diagnostics failures. Focused proof: loader.trust-diagnostics 11/11 and status 9/9 passed. The two new cases take 29ms and 15ms; loaded-host wrapper wall 1794.74s is dominated by worker build and module transforms. Independent review found no actionable defects. * fix: allow test builds in containers without systemd (openclaw#170640) --------- Co-authored-by: synth <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
* improve: simplify agent, exec, and automation messages * fix(webchat): stage offloaded images for file tools (openclaw#168537) fix(webchat): stage offloaded WebChat images into the managed workspace WebChat images above the inline threshold reached vision input but were not handed to managed workspace staging, so file tools couldn't find them. Offloaded WebChat images now expose their media-store path for staging, path-less transcript images hydrate from the staged sandbox copy, and images already staged are not staged again. Vision still receives exactly one image. Proof: built Gateway chat.send with a 3,147,780-byte PNG: on main the image reached vision but exec found no staged file; on the candidate exec finds the staged PNG. A 378-byte inline image works the same on both. A live gpt-5-mini turn also found the staged image through exec. Thanks @synthalorian. Co-authored-by: Ayaan Zaidi <[email protected]> * fix(gateway): retain model lists across skills refreshes Configuration publications refresh skills because skills can depend on arbitrary config paths. Reuse the published model-list cache when the existing catalog facts still match, while rebuilding commands and other skill-dependent metadata. Model, auth, plugin, catalog and owner changes keep their existing invalidation and read-authority boundaries. Fixes the repeated projection work exposed by 044ae43 (openclaw#170341): scheduled main run 38339144048 rebuilt model lists after each of six UI preference writes. The prepared-model regression also reproduced the unnecessary second projection before this change. Preserve the original integration assertion and verify that skills-dependent commands refresh alongside retained model projections. Validation: prepared-model regression fails before the repair and passes after (2/2 tests; 257.74s on the loaded host). Targeted lint, formatting and diff checks pass. Independent Codex review completed with no actionable findings. The full Gateway freshness integration remains assigned to canonical CI. * test(gateway): resolve auth-policy session targets in workers The synchronous fixture lookup could create a database after a Gateway worker captured its absence, triggering the physical identity guard and closing admission before the initial turn. Use existing read-only worker discovery for both fixture targets, matching neighboring authority tests. Preserve all retained and revoked grant, final-write, and transcript assertions. No production guard or authorization behavior changes. * fix(plugins): retain inspected config for decision diagnostics Plugin inspection resolved the explicitly supplied config, then discarded it while projecting decision providers and consulted the runtime snapshot instead. Cold inspection could fail with an unprepared runtime config; a prepared but different runtime could also report the wrong configured model. Carry the resolved config through the existing inspection context. Cover single and all-plugin inspection with different explicit and ambient models. Plugin loading, decision execution, and lifecycle ownership are unchanged. Original ambient-config lookup: 0a54fc6 (openclaw#152237), exposed by 5dbf215 (openclaw#169714). Scheduled main 38334375513 repeats nine trust-diagnostics failures. Focused proof: loader.trust-diagnostics 11/11 and status 9/9 passed. The two new cases take 29ms and 15ms; loaded-host wrapper wall 1794.74s is dominated by worker build and module transforms. Independent review found no actionable defects. * fix: allow test builds in containers without systemd (openclaw#170640) --------- Co-authored-by: synth <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
Fixes #103198
What Problem This Solves
Fixes file tools being unable to find large WebChat image uploads even though the model can see the image.
User Impact
WebChat images larger than the 2,000,000-byte inline threshold are available to workspace tools as well as native vision. Small inline images retain their existing behavior; there are no new permissions or configuration settings.
Why This Change Was Made
Pass offloaded images to the same managed inbound-media staging owner already used by inline WebChat uploads and channel attachments. The staging-only copy does not hydrate a second vision image. Canonical image-reference resolution prefers a staged file over its media-store alias, including when the transcript snapshot predates staging.
The simplification removes the separate staged-image reference wrapper and a duplicate regression case. The complete PR is +30 production lines and +206 test lines against its merge base (down from +60 production/+245 tests). The remaining image reconciliation preserves the existing sandbox boundary rather than adding a WebChat-only runner path.
Thanks to @synthalorian for the fix and @woohahahaaa for the report. No overlap with Pash/Sarah changes.
Evidence
An isolated, built Gateway accepted actual
chat.sendimage attachments over RPC. A scripted OpenAI Responses provider captured native vision input and called the realexecworkspace tool. Baseline:d7ca748acba99c758ab548943642e1156fbcbbca; candidate:8c2abc79feecaf0b959c94d292cee63fb567660c. The affected baseline files are unchanged at the PR merge base.Observed tool output (generated IDs shortened):
Both candidate turns completed with
successfulToolNames: ["exec"]; captured requests contained exactly oneinput_imageeach.Live-provider check on the same candidate:
gpt-5-mini-2025-08-07received the large image through an isolated Gateway, invoked the realexectool, and reportedmedia/inbound/openclaw-staged-.../input-live-large---....png. The tool output listed that file, the run completed successfully, and there were two provider requests. The test proxy selected the cheap live model instead of the mock model configured for the scripted comparison.Focused checks in the secretless container:
chat-send-user-turn.test.ts: 23 passed, 38.80 seconds including compilation.images.media-refs.test.ts: 12 passed, 5.23 seconds, including staged sandbox hydration from a path-less transcript fact.expected [] to deeply equal [...]) and the staged sandbox hydration regression fail (failedMediaCountis 1 instead of 0).No visual UI changes; the proof uses the shipped Gateway RPC boundary.
Merge danger: two-way door; reverting restores the old attachment behavior without a schema or configuration migration. Blast radius is managed image staging and native image-reference resolution; inline-image and sandbox-hydration regressions remain covered.