You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Repro (workspace qa-ep72): get_output_image(name="asset:qa-cast/priya-portrait.jpg", workspace="qa-ep72", max_dimension=256) → Error executing tool get_output_image: Not Found
The asset exists: validate_workflow resolved the same reference in #444 and the job used it.
Expected: show the asset, as get_gallery_metadata and assess_output already do for asset: refs. Failing that, say that asset refs aren't accepted and point at the tool that is.
Why it matters: judging an image-conditioned output means comparing it with its input. For #444 I couldn't look at the reference sheet I had passed in. The bare Not Found also reads as though the asset is missing.
triage: work — get_output_image (dw_mcp/media.py:40) doesn't resolve asset: names the way get_gallery_metadata/assess_output do; align it with them, or refuse with a message that names the tool that accepts them. Check the sibling get_output_frames/get_output_audio for the same gap.
Root cause: get_output_image/get_output_text (dw_mcp/media.py) both hit GET /outputs/{name} on the server, which was a bare StaticFiles-backed route with no asset: handling — unlike every sibling gallery route (get_gallery_metadata, get_output_frames, get_output_audio, assess_output), which already branch on is_asset_reference before resolving. An asset: name there fell straight into StaticFiles.get_response and 404'd with a bare "Not Found", no hint that the caller should look elsewhere.
Fix (commit 50376dc, merged to develop at 3a28146): /outputs/{name:path} in dw/server/app.py now checks is_asset_reference(name) first; if set, it resolves via _asset_file(name, ws) (same resolution/validation used by the gallery family) and serves it through a StaticFiles bound to the resolved asset's directory (mirroring how /inputs/{name:path} already serves from an arbitrary root), preserving ETag/304 and Range/206 support. Otherwise it behaves exactly as before. This single server-side change covers both get_output_image and get_output_text, since both call the same api_path("outputs", name) route.
Checked the triage's named siblings (get_output_frames, get_output_audio, assess_output) — they already hit the asset-aware /api/gallery/... family and needed no change.
Tests: added test_output_file_route_resolves_an_asset_reference in tests/test_server.py — a real end-to-end test (actual FastAPI test client, real StaticFiles resolution, a real file written into the asset dir) confirming GET /outputs/asset:portrait.png returns 200 with the right content-type, and that a missing asset still 404s. Full test_server.py (235 passed), test_mcp_media.py + test_mcp_server.py (201 passed) — no regressions. ruff check/ruff format --check clean.
Possible regression case for regression-suite-smoke.md: get_output_image(name="asset:<some-asset>.png", workspace=...) (or get_output_text on an asset text file) should return the file's content rather than a 404 — leaving that for the tester to confirm and add.
Original repro get_output_image(name="asset:qa-cast/priya-portrait.jpg", workspace="qa-ep72", max_dimension=256) now returns the image (original_size [768,768], returned_size [256,256], 10911 bytes).
Missing asset asset:qa-cast/no-such-file.jpg → Unknown asset 'qa-cast/no-such-file.jpg': not found in <ws>/assets, common/assets, <install>/assets. That is a clear message, not a bare Not Found.
Traversal asset:../../etc/passwd → refused with Invalid asset name: ... segment '..' starts with '.'. The asset name validation applies on this route too.
Activity
dkackman commentedon Sep 25, 2026
triage: work —
get_output_image(dw_mcp/media.py:40) doesn't resolveasset:names the wayget_gallery_metadata/assess_outputdo; align it with them, or refuse with a message that names the tool that accepts them. Check the siblingget_output_frames/get_output_audiofor the same gap.— implementer, claude-opus-5-5 via anthropic
fix(server): #445 - /outputs/{name} resolves asset: references
dkackman commentedon Sep 25, 2026
Fixed and deployed.
Root cause:
get_output_image/get_output_text(dw_mcp/media.py) both hitGET /outputs/{name}on the server, which was a bareStaticFiles-backed route with noasset:handling — unlike every sibling gallery route (get_gallery_metadata,get_output_frames,get_output_audio,assess_output), which already branch onis_asset_referencebefore resolving. Anasset:name there fell straight intoStaticFiles.get_responseand 404'd with a bare "Not Found", no hint that the caller should look elsewhere.Fix (commit
50376dc, merged todevelopat3a28146):/outputs/{name:path}indw/server/app.pynow checksis_asset_reference(name)first; if set, it resolves via_asset_file(name, ws)(same resolution/validation used by the gallery family) and serves it through aStaticFilesbound to the resolved asset's directory (mirroring how/inputs/{name:path}already serves from an arbitrary root), preserving ETag/304 and Range/206 support. Otherwise it behaves exactly as before. This single server-side change covers bothget_output_imageandget_output_text, since both call the sameapi_path("outputs", name)route.Checked the triage's named siblings (
get_output_frames,get_output_audio,assess_output) — they already hit the asset-aware/api/gallery/...family and needed no change.Tests: added
test_output_file_route_resolves_an_asset_referenceintests/test_server.py— a real end-to-end test (actual FastAPI test client, realStaticFilesresolution, a real file written into the asset dir) confirmingGET /outputs/asset:portrait.pngreturns 200 with the right content-type, and that a missing asset still 404s. Fulltest_server.py(235 passed),test_mcp_media.py+test_mcp_server.py(201 passed) — no regressions.ruff check/ruff format --checkclean.Deployed:
develop @ 3a28146, healthy ("version":"0.4.0-beta.6" mcp=true).Possible regression case for
regression-suite-smoke.md:get_output_image(name="asset:<some-asset>.png", workspace=...)(orget_output_texton an asset text file) should return the file's content rather than a 404 — leaving that for the tester to confirm and add.— claude-sonnet-5 (anthropic)
dkackman commentedon Sep 25, 2026
Verified against develop @ 3a28146.
get_output_image(name="asset:qa-cast/priya-portrait.jpg", workspace="qa-ep72", max_dimension=256)now returns the image (original_size [768,768], returned_size [256,256], 10911 bytes).asset:qa-cast/no-such-file.jpg→Unknown asset 'qa-cast/no-such-file.jpg': not found in <ws>/assets, common/assets, <install>/assets. That is a clear message, not a bareNot Found.asset:../../etc/passwd→ refused withInvalid asset name: ... segment '..' starts with '.'. The asset name validation applies on this route too.No regression case added.
— tester, claude-opus-5-5 via anthropic
fix(server): /outputs asset: miss no longer names server paths
docs: 0.4.0 notes cover #418-#445 and the release fixes