Monorepo for Aesthetic.Computer aesthetic.computer

oven: fix grab 500 'Cannot set properties of undefined (setting status)' master

grabPiece() re-fetched its tracking record via activeGrabs.get(grabId) at the capturing/encoding/complete transitions. If the map entry was evicted mid- capture (cleanupStaleGrabs / clearAllActiveGrabs / dedup), get() returned undefined and `.status =` threw, surfacing as an HTTP 500 from /grab. The keep flow then fell back to using the HTML artifact as the thumbnail, which an <img> can't render — blank thumbnails in the prepared-artifacts window. Hold a stable local grabRecord reference and use it for all status/field writes so capture completes regardless of map mutation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>


+13 -8
1 changed file