- Plain `mcp` routed to a headless session runs a blocking render as a long job again
(progress, other requests, cancellation): the long-job path uses the routed session.
- A tool's calls all go to one route, so a window closing mid-tool can't split them.
- The window's `agent_folders` answer is narrowed to the command's folders.
- A write-only session names its write folder as its read folder too.
- `file.revert` checks the open project's file against the read folders; `file.save` with
a non-string `path` checks the open project's file against the write folders.
- Reverting (and the reload after the file changed) keeps an agent's footage limits.
- An agent request queued before the switch turned off, or the folders changed, doesn't run;
a request with other limits waits until queued input from another scope was applied.
- Docs: several write roots need --headless. Tests: fixture cleanup, broken-pipe write.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The start project went through `backend` before `mcp_backend` confined the session, so a
project outside the automation roots opened at startup. Now the session is confined first
and the start project must lie inside the roots, like every file the agent opens.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closes the window's one gap against headless agent sessions (#4387): while an agent's
request or queued input runs, a project it opens wraps the session's footage source in the
agent folders' ConfinedFootage. The next project the person opens reads footage as before.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Headless `mcp` (switch off, --headless, --autosave, project options) no longer runs
unconfined without automation roots: a direction without a root or agent folder grants
nothing, as PhotoCraft's `mcp` does and AGENTS.md rule 18 asks. `--autosave` sessions may
still read their own checkpoints to recover. The deprecated `--bridge` is unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Plain mcp with --automation-read-root/--automation-write-root confines
the live backend itself, so control and the UI tools are refused there
as in every confined session (they used to reach the window unchecked).
- With agents let in, plain mcp without a settings folder is an error
instead of a headless session without the agent folders.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- The command's --automation-read-root/--automation-write-root also bind
calls that reach the window (checked in the CLI, on top of the window's
agent folders).
- An agent request keeps the agents channel's reply deadline: one still
waiting in the backlog after it is not run.
- The person's --control requests run without a pending agent's gate.
- An agent's `null` params read as `{}`, other non-objects are refused, so
a screenshot or frame can't skip the inline branch.
- The handshake reply is read up to 64 KiB.
- --when-closed launch/error without a settings folder is an error, not a
silent headless session.
- Docs: the closed-app choice, not "headless", when EffectCraft is closed;
the window's footage exception (#4387); the command's folders.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
While the launcher's Settings > AI agents switch names EffectCraft (behind
the suite's AI-MCP flag), the window serves agents through the shared
craft_automation::agents::AgentLink (token, connection file, switch
watching) and plain `effectcraft-cli mcp` finds it on every tool call
through the shared craft_control::agents::Live: the open window while
agents may use it, otherwise a session without a window, and the
closed-app choice (launch, headless, error) when EffectCraft is closed.
- The CLI signs in with the challenge handshake; the token never crosses
the wire and a listener that can't prove it holds it gets nothing.
- Agent requests in the window stay inside the agent folders: a command
gate on the session (Session::command_gate) runs the same Confinement
checks as --automation-read-root/--automation-write-root, also for the
input an agent queues until a UI pass applied it. Screenshots and
frames without a file come back inline.
- New `agent_folders` tool; Settings > AI Agents is the shared Agents
page (agents.settings saves agents.json for the CLI).
- `mcp --headless`, `--when-closed`; `mcp --bridge` stays one release as a
deprecated alias. No client configuration is written.
Closes#4383.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Render log: say why a GPU project renders on the CPU, and name the GPU adapter (#3727)
* WebM: the header, the size patch and delivering the file count as writing time; last_timing says whose it is (#3732 review)
* Export timing: label the initial compositor and attached GPU adapter, count frames that fell back to the CPU later
The timing line says "Initial compositor" and "attached GPU adapter" for the choice made at the
start. A frame asked of the GPU that ends with the GPU unavailable is counted in the new
gpu_fallback_frames, and the line reports it as "Later GPU fallback: N of M frames rendered on
the CPU after the GPU became unavailable". New test:
a_gpu_lost_after_the_start_is_reported_apart_from_the_initial_choice.
* Export timing: frames the probe drops do not count as a later GPU fallback
A device lost while Auto measures makes the job pick the CPU and drop the GPU's measured
frames, so only frames of a job that chose the GPU are counted.
* Export timing: count a GPU fallback when the frame is rendered, not from the adapter afterwards
The renderer now notes per frame whether the accelerator declined it while unavailable
(Renderer::comp_frame_noting_gpu_loss, passes::comp_frame_noting_gpu_loss), and the export
counts that. A frame the GPU rendered no longer counts when another frame in flight loses the
device before it is counted. The test renders two frames at once: frame 0 on the GPU while
frame 1 loses the device.
* Deferred readbacks: a frame that goes to the CPU after missed passes says whether the device was lost
in_passes records why it renders the frame without the accelerator (Passed::gpu_lost: the
device is no longer available, not passes run out on a healthy one), and
passes::comp_frame_noting_gpu_loss passes that on instead of dropping it with .value. New test:
a_deferred_frame_on_the_cpu_says_whether_the_device_was_lost.
---------
Co-authored-by: FredApps <[email protected]>
* feat: use craft-nightly for nightly profile isolation
* fix(nightly): answer bare version queries before profile resolution
* test: update version query unit test in main.rs for craft-nightly
* #3328: output guard checks file identity only where an alias is possible
The output guard opened every footage file of the project, for every check
of an output that existed, on the UI thread: minutes for long sequences on
a network share. It now compares only the files that can be the output
(folders on the output's volume, folders holding symbolic links), keeps the
identities it learnt in the session (folders that changed are looked at
again; Reload Footage forgets them), and does no file system call while its
lock is held.
render.frame checks and writes with one guard. A control request whose
sender stopped waiting is not run, and one tick runs control requests for at
most a tenth of a second; the rest follow in order on the next ticks.
* #3328: output guard compares paths only, no file is opened
Comparing file identities still cost a file open per footage frame when
folders were on the output's volume, and caching them invited races (#3330
review). The guard now compares paths by name once resolved: absolute, dot
segments resolved, one separator, Windows verbatim prefixes as the plain
path, without case on Windows and macOS. A link or hard link to footage
under another name is no longer recognised; the reported data loss (#1743)
is the same-path case. Render queue duplicate outputs compare by name too.
* #3328: drop the link identity tests of the render queue; test and doc review fixes
* #3328: a mapped network drive and its UNC path are one place
On Windows the output guard resolves each drive letter's root once per guard
(std::fs::canonicalize of `X:\`) and compares a path on that letter as the
place it resolves to: a mapped network drive as its \server\share path, a
subst drive as its folder. A root that can't be resolved keeps its letter.
* #3328: drive roots are looked up only where they can matter, and kept a minute
A drive letter's root is resolved only when the output and the protected
files are not all on one letter, or not all UNC paths: footage and output on
one mapped drive never wait for a disconnected drive or an empty removable
one. Resolved roots, failures too, are kept process-wide for 60 s.
* #3328: the 13,000-frame guard test counts file system lookups instead of timing them
* #3328: note why only Windows counts lookups in the 13,000-frame guard test
* #3328: queued outputs collide under drive and UNC spellings
* #3328: queued sequences and subst drives compare by the place they name
* #3328: queued outputs keep their resolved places instead of resolving per comparison
* #3328: cache_bench's play request carries the abandoned flag (main's example met the new ControlRequest field)
* Refuse an output in a folder linked to a source's folder
An output whose name matches no protected file now has its folder resolved on disk, once per folder per guard, and is compared again by name. An output in render-alias/, a symbolic link or junction to plates/, no longer replaces plates/source.exr. No protected file is looked at.
* Resolve both folders, and only for a source with the output's file name
The footage path as imported may itself run through a link (macOS /var is /private/var, Windows 8.3 names), so resolving only the output's folder missed it. Now an output whose path matches nothing is compared again only with sources of the same file name, both folders resolved once per guard. An output named like no source asks the file system nothing.
Nightly launch fix under Skylar's Exec 454: the Launcher's trailing `--` no longer reaches the file list where that applied, and a refused launch no longer blocks on macOS (the reason goes to stderr and the app exits 2). One doc comment was reworded so the app's `rfd`-use guard (#3084) keeps passing.
Linux nightly packaging by @dylanmtaylor, with the per-app Nightly flavor commits stacked on his branch.
Co-authored-by: Dylan M. Taylor <[email protected]>
* Scripts: a ScriptUI Browse… button opens the file dialog
Fixes#2778.
Fixes#2894.
File.openDialog, File.saveDialog, Folder.selectDialog and the instance
openDlg / saveDlg / selectDlg were stubs that returned null, so a script
dialog's or a dockable ScriptUI panel's Browse… button did nothing.
On a script-host thread, in an app that shows them, the script now asks
for the dialog (Session::script_ui.file_dialogs, each with an id), hands
the session back like a modal dialog's show() does and waits for the
answer: a File (an array with multiSelect), a Folder, or null when
cancelled. The script's filter becomes the dialog's (its name, "All Files"
for *.*); without extensions every file shows. Headless runs, the Script
Console, the web and Shutdown scripts get null at once.
The app shows the dialog after the pass's events: blocking on Windows
(Hooks::pick_file_dialog), without blocking on macOS and Linux, one at a
time; a non-blocking dialog that ends without answering counts as
cancelled. scriptui.fileDialogs lists the waiting dialogs and
scriptui.fileDialog answers one (refused while file access is confined,
and refused to scripts). A dialog leaves the list only when its script
has the answer; the script's windows refuse events meanwhile, except
scriptui.close, which cancels the file dialog first. A script host that
ends takes its dialogs with it.
* Scripts: carry a file dialog's prompt, start location and filter to the native dialog (#2778)
serve_file_dialogs collected the script's prompt, start folder and save filter
but dropped them at the host boundary. FileDialog::Script now carries prompt and
start, and new ScriptFolder and ScriptSave requests carry the folder dialog's
prompt/start and the save dialog's prompt and whole filter (label, extensions,
any file) instead of the default name's extension. Both the blocking and the
non-blocking host dialogs apply title, initial directory and filters; Save also
goes through the blocking hook where one is set. Hook-level regression test
asserts all three requests.
* Scripts: a hidden window paints so a script's file dialog is shown (#3253 review)
* Scripts: formatting (#3253)
The command-line tool reads the system's memory once at start, so its caches
share the budget of the installed RAM instead of the budget for unknown RAM.
A Render Queue run's two layer caches and a one-off export's own caches take
the session's layer cache budget instead of a fixed 512 MiB; they are in the
memory accountant, which keeps them within the common budget together with the
other caches. In the browser each gets half the layer cache's cap.
Fixes#1986
**Cause.** On macOS the open panel has no key equivalents of its own. Cmd+A (and C/V/X/Z) work
because the menu bar sends `selectAll:`, `copy:` and so on down the responder chain to the key
window. EffectCraft's Edit items are custom muda items, so while the sheet was up Cmd+A ran
Edit > Select All on the Project panel behind it.
**Fix.** The native file dialogs on screen are counted (`native_dialogs`). While one is open on
macOS, Undo / Redo / Cut / Copy / Paste / Select All become macOS predefined items, which send
the real actions to the dialog. The other `edit.*` items are disabled. The UI is repainted when
a dialog opens so the menu is rebuilt before the next key.
**Tests.** `edit_menu_is_disabled_while_a_file_dialog_is_open`,
`edit_text_commands_are_predefined_while_a_file_dialog_is_open`. Checked by hand on macOS:
Cmd+A in "Import multiple files" selects the files.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* On macOS, Edit menu commands are disabled while a native file dialog is open and return to their appropriate enabled state when it closes or is canceled.
* While a dialog is open, Undo, Redo, Cut, Copy, Paste, and Select All appear as native macOS menu commands with their current labels.
* Opening a file dialog now triggers an immediate interface refresh, helping the menu update before the next key event.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
When an export or Render Queue job ends, the render log (and the
effectcraft_export log target) gets one summary line: wall time, busy time
of rendering, the encoder and writing the file (they overlap, so not a sum),
the compositor and why, the encoder and its settings, and frames per second.
Formats that cannot time a stage apart say so. effectcraft-cli render --json
returns it as timing and timingSummary.
#3713
Conflict in crates/render/src/pipeline.rs: kept both the footage-rows
reader of this branch and the frame-mix span reader from main.
Adapted three menus tests to DialogAnswer.paths now being a Result.
* AG4: xtask ci --affected
cargo xtask ci --affected [--base REV] [--dry-run] runs fmt, clippy, tests (nextest + doctests when available), layers, assets (only on asset changes) and wasm (only for affected L0-L4/web crates) for the packages a change can affect: changed files map to the owning package and to packages whose sources read them via ../ paths, expanded to reverse dependents. Workspace-wide inputs (root Cargo.toml, Cargo.lock, .cargo/, xtask/, toolchain, clippy.toml) fall back to full CI. Documented in docs/testing.md, AGENTS.md and CLAUDE.md.
(cherry picked from commit f3ca84fc2ee3948582cbc94e4c99ee510e829540)
(cherry picked from commit 8a2cdcadf447eafa57ab14016beae4420f002af0)
(cherry picked from commit d8a4301bc1)
(cherry picked from commit 36402c61ac2f7e29ecd76a6cfc89365cc2572e0a)
* AO1: fast CI profile, looser timing tests
- [profile.ci] (release without LTO, 16 codegen units); `xtask ci` runs clippy
and tests with --profile ci instead of --release.
- Wall-clock asserts in engine memory_tick, gpu OpenGL decline and script
socket tests keep their intent with bounds that survive a loaded machine.
- docs/testing.md and CONTRIBUTING.md mention the profile.
(cherry picked from commit b45c8a379351ebdfda0d7076ad4b740baf6f2087)
(cherry picked from commit fa1ea6a107c4c1936cde89b518a05adc73f2b4b0)
(cherry picked from commit e5d5ed80e9)
(cherry picked from commit d2c67660c70764f9c56880a642ad7f0d004a7f92)
* AG6: journal replay repros
Bug reports become replay scripts and crash regression tests become data files:
- engine::replay: a JSON-lines repro format (start line, command steps with
expect_error, expect queries with JSON pointer + equals, expect_no_error),
a never-panicking runner that reports per-step ok/error and the first failure,
and journal export (from the last project open; saves left out; size-capped).
- journal.export {path?} and help.exportRepro {path?} (not journaled).
- Crash capture: when the last-resort guard catches a panic in the outermost
command, the journal plus that command is saved to Repros/crash-*.jsonl in the
settings store (newest 20 kept) and the error names the file.
- Commands run by a journaled command (script steps) are no longer journaled twice.
- effectcraft-cli replay SCRIPT.jsonl [--json] [--keep-going]: exits 1 on a failed
step, unmet expectation or panic.
- crates/host/tests/repros.rs replays every tests/repros/*.jsonl; three samples
from past crash fixes (zero frame rate, Layer Settings with no selection,
New Comp from Selection with hostile overlap).
- Docs: docs/agents.md "Repro scripts"; AGENTS.md: crash fix regression test =
a .jsonl in tests/repros.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit c38509d7dafe507856c48c78db65e00b94b0cebc)
(cherry picked from commit e55b56dbf76716adfcbfe4cc773df19a74edc419)
(cherry picked from commit 96a63855a9)
(cherry picked from commit c59351ab3bd697f0868e41230dd883960d94a540)
* xtask: ci and ci --affected run cargo test and nextest with --no-fail-fast
One run now lists every failing crate instead of stopping at the first.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019qXL3GPNnY9BSFF2XoU2Yu
(cherry picked from commit e46c7debe738eca62b35bf7392ab77637f6a33ae)
* Agents: confinement write-checks journal.export, help.exportRepro and file.exportTimeline
Review on #859 (split into this PR): their output paths were only read-checked (relative ones
not at all). Test: confinement_covers_every_command_that_writes_a_file.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014d65YdNxQmjRkbXRtP2NwH
* #1224: handle bin-only CI targets and BOM repros without weakening timing tests
* #1224: run the full gate when nextest policy changes
---------
Co-authored-by: Elias <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: FredApps <[email protected]>
Co-authored-by: FredApps <[email protected]>
* docs: track startup adapter recovery investigation (#477)
* Fix launch guard ownership during concurrent startup
* Launch guard (#477): fold the ownership tests into the tests module
Review cleanup, no behaviour change:
- Drop docs/issue-477-startup-recovery.md (investigation notes, not docs).
- Move the investigation_477 and root_patch_477_tests cases into the existing
tests module under behaviour names, without println! output; every
assertion is kept.
- Rewrap the module doc comment.
* #477: preserve inaccessible launch markers on Windows
---------
Co-authored-by: FredApps <[email protected]>