A panic in the background cook left stale previews with no error, and a
dead worker (Disconnected) was cleared silently. The worker now runs under
catch_unwind and reports failure; the failure and a vanished worker mark
every node with the error and raise a toast. App::run and the control
channel's command.run also run commands under catch_unwind and reply with
an error instead of crashing.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
decode() sRGB-decoded every 8/16-bit color bitmap, so an RGB normal map
(0.5, 0.5, 1) became (0.214, 0.214, 1). decode now takes a linear flag. The
Bitmap node gets a Color space choice (sRGB by default, so existing files cook
the same) and graph input preview images can be bound as linear data maps
(graph.input.bind linear: true, stored in input_images_linear).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A background cook of version A could land after session.inspect had
synchronously cooked version B and cleared dirty, overwriting B's results
with no recook. Sessions now count synchronous cooks (cook_epoch) and the
cooker discards a result whose start epoch is out of date.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The grid-bin span was unbounded, so a large size or length visited billions of
bins per item, and Splatter also scanned each bin with contains. Cap the span
to one turn of bins per axis (as fx_map does), drop the contains scan, and
clamp Splatter's count to its declared maximum of 2000.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
merge_key was cleared only by edit/undo/redo/reset_history, so two drags
of one slider, two "New random seed" clicks and two MCP/control
node_param calls collapsed into one undo entry. Add Session::end_merge,
call it on pointer release and around each control/MCP command, and
restore the session when a merged edit fails.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
blur_xy made ceil(extra/2) full-image passes with an unclamped sigma, so a
large intensity at high resolution took ~1e11 ops and a hostile one never
ended. Clamp both sigmas to the image size and do the extra horizontal blur
as one Gaussian (new ops::gaussian_h, three box passes, O(1) per pixel).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
load_package read a resource entry once per resource that named it, so a tiny
deflated entry plus thousands of resources could allocate hundreds of GB. Each
distinct entry is now read once and shared, the resource count and total bytes
are capped, and a missing or over-cap entry is an error instead of silently
empty data. save_package gives colliding sanitized file names a numeric suffix.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The desktop control server had its own token code (hashed RandomState, default-permission
file in the shared temp dir, plain ==, unlimited guesses on one connection). It now uses the
automation crate's server_token and token_matches, which the CLI already used.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Editing a graph two levels below an instance node left the instance's cached result stale, and
bitmaps of equal length with equal headers shared a cache key.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
materialcraft-cli mcp and serve now take the --automation-*-root spelling
the other crafting apps use, as aliases of --read-root / --write-root. The
parser stores them under the short names, so the last root given wins
whichever spelling it used. Adds unit tests and a note in the protocol doc.
Fixes#55
Co-Authored-By: Claude Opus <noreply@anthropic.com>
Pressing an unconnected input started no gesture, so a wire could only
be pulled from an output. It now starts a wire that ends on an output
and runs the same graph.connect. Dropping it anywhere else changes
nothing. Dragging from an output and unplugging a connected input work
as before.
Refs #13
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From CodeRabbit: an error from the app creator (AppCreation, e.g. a --control
file it can't write) comes after the window and renderer started, so "update
the graphics driver" doesn't apply. It now says only that the app couldn't
start; other errors keep the window/graphics text. Tested both ways (the
new test fails with the AppCreation arm disabled).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>