Repository navigation
Conversation
A screenshot that names no destination minted a fresh temp dir per capture (mkdtemp agent-device-screenshot-*), so a caller had to parse the path out of the output and copy the file before temp cleanup raced the read. The artifact adapter now reserves the session's stable artifact path when the request names no destination, and the crop publish stages inside the session dir instead of os.tmpdir(). An explicit positional or --out destination still wins, and the sparse-snapshot fallback gets its own stable name so it never overwrites a capture the caller asked for earlier in the session. The CLI renders the destination path alone on the final line; capture metadata (dimensions, density, annotated-ref count) moves above it. Co-Authored-By: Claude Code <noreply@anthropic.com>
|
Thanks for working on the stable screenshot path. At 0abde34 the change has two regressions that lose or delete screenshots, so it needs fixes before merge. With publicNetworkOnly (remote Maestro), invokeMaestroPublicOperation drops the screenshot path. The daemon then resolves every takeScreenshot and every comparison capture to the one The staged atomic publish in screenshot-artifact-adapter.ts only runs when Not blocking, and fine to take or leave: the CLI text summary change in Would a smaller design work? The adapter could keep minting a default path, but under the session directory with a request-unique name such as The Coverage check fails on this head. The diff adds branches in the adapter, |
…taging root The provider-scenario android-screenshot-crop lane pins the contract that a crop request acquires staging through mkdtemp, and the staged atomic publish had stopped minting one once the session owns a staging root, so all 12 lane cases failed. Each request now mints its own agent-device-crop-* dir inside the staging root (the session's screenshots/crop-staging when one is owned, os.tmpdir() otherwise), so concurrent crop publishes in one session no longer share one staging path and no longer rely on the session request lock for exclusivity. The staging root stays for the session's lifetime; cleanup removes only the request dir. Co-Authored-By: Claude Code <noreply@anthropic.com>
The CLI screenshot summary moved capture metadata above the destination path, but this pinned case still expected the old "path (width x height)" line and failed the Coverage run at the previous head. Pin the current two-line contract with the warning still last. Co-Authored-By: Claude Code <noreply@anthropic.com>
…ed file A capture without a destination previously landed on one stable `screenshots/screenshot.png`, so a remote Maestro flow's N takeScreenshot steps all reported and overwrote the same file, and a comparison capture that releases its capture after reading deleted that shared file. The default is now minted per capture under the session's screenshots dir as `<request id>-<suffix>.png`: every step reports its own intact file, and nothing a caller lists as its artifact or deletes after reading is shared with another request. A crop capture without a destination now sends its default through the same staged publish an explicit destination uses, and a minted capture removes its own file when the capture fails. A missing, ambiguous, or canceled selector — or any capture or scale failure after the platform write — leaves every earlier capture untouched and leaves no bytes behind. Co-Authored-By: Claude Code <noreply@anthropic.com>
|
Thanks for the review — I adopted your smaller design, with one addition your question uncovers. The default is now minted per capture as One finding forced a deviation from the literal Blocking #2: the staged publish now runs for every real destination ( Regression tests (each fails at the previous head for the recorded reason):
Converted to draft while the revision runs; the body's Validation section records the lanes at 867f23f. 🤖 Generated with Claude Code |
|
Thanks for the update. At 867f23f, the earlier findings from the first review (#4865 (comment)) are addressed. One docs problem remains. The Not blocking, and fine to take or leave: No conflicts were reported. The failing Smoke Tests job is only the aggregate gate: its iOS, macOS and Android jobs were cancelled and never ran, so no smoke test failed. This diff touches the destination-less screenshot route that smoke exercises, so a completed smoke run is still needed. Not verified here: tests, a live remote flow, whether every flow step shares one request id, and the Coverage job at this head. Before merge, fix the help text and rerun Smoke Tests to green. |
|
867f23f now conflicts with main. Please rebase onto main and include the open findings from the last review in the same push. |
|
ADR 0040 alignment (ADR) Decision: screenshot ownership: Rebase the screenshot path work on the #4945 screenshot lane, then reduce the diff to any remaining default or crop regression, including the Maestro route where needed. Use one producer reservation for each remote screenshot through #4970 and keep explicit client destinations client-local. Keep the failed-crop earlier-file control and the two-distinct-captures control. Use the common adapter and reconcile the router file with #4965. |
|
One routing question before I take the ADR 0040 direction. The #4945 lane lives on |
|
The base question (retarget to |
…t-stable-path-merge # Conflicts: # packages/daemon/src/execution/screenshot-artifact-adapter.ts
|
Merged current |
|
Thanks for the update. This review covers 6f20bbc and builds on the earlier review at 867f23f. The earlier request for a completed Smoke Tests run is now met, because the checks at this head show 16 total and 0 not passing. Not verified here: individual smoke job results were not opened, and the PR's test files were not run locally. The code still has six problems, listed below. The PR still has merge conflicts with main. Before merge, the problems below must be fixed and the conflicts resolved. The first problem is that two successful screenshots with no destination in the same session return different filenames (screenshot.ts:37). The router supplies a stable directory, but The second problem is that two sparse snapshots in one session publish different captures to the same The third problem is that session staging now applies to explicit crops (screenshot-artifact-adapter.ts:136). If the caller's destination equals the crop-staging path, The fourth problem is that a long request ID can break a destination-less screenshot (session-artifact-paths.ts:28). The fifth problem is that The sixth problem is that the text summary changes even for an explicit output path (screenshot.ts:49). A caller that read the path from the previous summary line now reads dimensions or an annotation heading. The new final-line claim at line 155 also fails for a clipped crop, because The earlier clean assessment also rested on the claim that a screenshot with no caller-supplied path writes to one stable default file in the session. The code does not do that on the ordinary route. Please make the claim true or explain it. The new Maestro test drives the real router and adapter, but it does not cover the public HTTP or same-session replay envelope. The next change needed before merge is the first problem above: a caller must be able to use one session default file to read the latest destination-less capture. |
…t-stable-path-merge # Conflicts: # packages/command-surface/src/capture/screenshot.ts
|
Redesigned at 03e6068 and merged current
Coverage: the new remote control drives the same router envelope the HTTP surface uses ( |
|
Thanks for the update. This follow-up on the earlier review of 6f20bbc covers commit 03e6068. The default screenshot now targets the session's stable path, but two problems remain, and the earlier conclusion that the stable-path behavior holds on the ordinary local route did not hold up. On a local X11 desktop with scrot installed, the second pathless screenshot passes the existing The new help at screenshot.ts:44 tells callers to omit CI is green: 18 checks, none failing at 03e6068, and smoke covers the pathless screenshot route. No conflicts. Not verified here: any live run, individual smoke job logs, and the remote behavior, which was traced from source only. The first finding must be fixed before merge. |
|
Thanks for working through the screenshot cases. Could you narrow this PR to the screenshot help on Please drop the runtime and test changes, remove the new session-file entry from the docs, and update the title to describe the help change. This scope can ship on 0.21 without waiting for the 0.22 branch. |
|
Understood — narrowing this PR to the screenshot help change only: the pathless capture keeps returning its per-capture path, and the help will tell readers to open that returned path (or pass a filename when they need a fixed destination). The runtime, test and |
Summary
A
screenshotthat names no destination on the ordinary local route now publishes to one stable session file,<session>/screenshots/screenshot.png, so a caller reads the latest capture from the path the help promises. A remote request (publicNetworkOnly) or a caller-owned destination keeps the adapter's per-capture reservation, so independent owners never share a file. The earlier session staging and per-capture minting are gone: crops stage underos.tmpdir(), the sparse-snapshot fallback keeps its per-capture path andsnapshot-fallback.pngdownload name, and the CLI text and JSON summary are unchanged.Before / after
Validation
Tested at 03e6068.
🤖 Generated with Claude Code