Repository navigation
fix(canvas): omit deleted snapshot paths - #125216
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 7:16 AM ET / 11:16 UTC. ClawSweeper reviewWhat this changesThis PR returns Canvas snapshot metadata without the staged file path or media URL after the image has been hydrated and the staging file removed. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessNo blocking correctness finding: the Canvas-local wrapper removes only metadata made stale by cleanup while preserving the hydrated inline image. Likely related people: steipete (high confidence), from the merged snapshot lifecycle work and this follow-up. Priority: P2 Review scores
Verification
How this fits togetherCanvas snapshots are rendered by a paired node, staged in managed media storage, hydrated into an inline image result, and then cleaned up. The agent-facing result must retain durable facts such as node and format without retaining the deleted staging path. flowchart LR
A[Canvas snapshot request] --> B[Paired Canvas node]
B --> C[Managed media staging]
C --> D[Inline image hydration]
D --> E[Staging file cleanup]
E --> F[Pathless result metadata]
Decision needed
Why: The protected maintainer label requires explicit maintainer handling despite the focused, source-backed repair. Before merge
Agent review detailsSecurityNone. PR surfaceSource +2, Tests +7. Total +9 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the Canvas-local pathless return shape, leave the generic file-backed image helper unchanged for durable-file callers, and land after exact-head CI and maintainer review. Do we have a high-confidence way to reproduce the issue? Yes—source proves the helper emits the staged path and media URL before Canvas deletes that file, and the focused regression exercises that exact helper-and-cleanup boundary. Is this the best way to solve the issue? Yes—the wrapper preserves generic image hydration while removing only Canvas-specific facts that become invalid during cleanup; changing the shared helper would affect durable-file callers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e30b425e18af. LabelsLabel 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
|
|
Land-ready proof for exact head
This is the result-contract follow-up to #125126. The stale facts were produced by the generic image helper but invalidated by Canvas-owned immediate cleanup, so the canonical fix remains local to Canvas while durable-file callers keep the shared helper contract unchanged. |
|
Merged via squash.
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(canvas): omit deleted snapshot paths This is item 3/3 in the current shard. Shard 2/35. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
* fix(canvas): omit deleted snapshot paths * refactor(canvas): return pathless snapshot details
Related: #125126
What Problem This Solves
Fixes an issue where Canvas snapshots returned a path and media URL after the snapshot staging file had already been deleted, leaving agents and callers with stale result facts.
Why This Change Was Made
Keep the inline image and canonical node/format/media policy, but remove only the file-backed path fields before returning the result. The staging file remains unlinked in
finally. This is AI-assisted maintainer work.User Impact
Canvas snapshot results no longer advertise an unusable file path. Agents still receive the image itself and the facts needed to continue safely.
Evidence
node scripts/run-vitest.mjs extensions/canvas/src/tool.test.tsfailed the new assertion becausedetails.pathstill contained the deleted snapshot path (43 passed, 1 failed).media.outbound: false, no outbound artifact, and deleted staging-file verification.node_modules/.bin/oxfmt --check extensions/canvas/src/tool.ts extensions/canvas/src/tool.test.tspassed.node scripts/run-oxlint.mjs extensions/canvas/src/tool.ts extensions/canvas/src/tool.test.tspassed.pnpm check:assertion-safety --base origin/mainpassed after the result handling was simplified to avoid a new assertion.git diff --checkpassed.node scripts/check-changed.mjs --dry-run -- extensions/canvas/src/tool.ts extensions/canvas/src/tool.test.tsclassifiedextensions, extensionTestssuccessfully.--mode uncommittedwas clean with no accepted/actionable findings.