* fix(render): Fill keeps a scaled-up text layer's working image small (#4158)
A layer's effect stack skips the cover of the whole layer rectangle only
when every effect is in SKIPS_COVER. Fill was not, so a text layer with
Fill scaled up to ~900 % got a working image the size of the scaled layer
rectangle on every frame, and a render reached tens of GB.
Fill without Invert only recolours pixels the layer already has (masked
or not), so it now skips the cover too. Inverted, it paints the layer's
transparent area and keeps it. The check reads the instance's Invert
value, so EffectSpec gains skips_cover_for(params).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(render): a feathered Fill keeps the cover (#4158)
With a feather, a Fill mask edge outside the painted pixels still blurs
into them, so the coverage has to be computed beyond the painted bounds.
Keep the cover when either feather is set; unfeathered Fill (the default)
still skips it. Adds a covered-reference test with a feathered mask whose
edge lies just outside the painted content (fails without this change).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* CLI: a headless session's footage frames keep at most 1 GB (#4157)
Since #3301 the footage frames may fill the caches' whole common budget,
and since #3941 the CLI's budget is that of the installed RAM. A one-pass
render reads each frame about once, so it kept gigabytes of frames it never
read again and was killed under a cgroup memory limit.
Session::footage_cap caps the footage frames (and decoded planes) below
the common budget; apply_cache_budgets honours it, so a new memory reading
or a settings change keeps it. headless_session() sets it to
HEADLESS_MEDIA_CACHE (1 GB, the footage cache's default in 0.24). The
desktop app keeps the whole budget.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(host): a headless session's footage cap is exactly HEADLESS_MEDIA_CACHE (#4157)
Assert the cap itself (or the budget, if smaller) rather than only that it
is below the budget, which a wrong cap above 1 GB would also pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* #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.
* media: keep the running decoder across in-flight frames
* media: keep a full GOP of decoded frames
* media: keep decoding across a draft switch
* media: run ProRes bands on the decode pool
* media: report shared decoder counters in gop_stats
* media: guard shared cancellation in MediaPool
* media: test sequential playback with B-frames
* media: count all shared decoder routes
* media: cache each picture's actual draft state
* media: remember draft switches across failed requests
* media: keep the requested picture through cache trimming
* ci: notify artcraft-services on release state changes
* ci: pass only the dispatch token to the notify-services workflow
secrets: inherit hands the called workflow every repository secret, including
the signing credentials. The reusable workflow only reads
ARTCRAFT_SERVICES_DISPATCH_TOKEN, so map just that one.
---------
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Merged within Executive 271's Fred-approved scope, on Fred's REST review 6076595648 given explicitly at 81a2ce21, with the fresh full bar verified at that head: CI green (Linux gate and all four instrumented shards, Sonar among them), CodeRabbit reviewed this head, zero unresolved threads. #4122 and #4123 are untouched by this.
* Helper host: video protocol types, reply rules and discovery
Part of RFC-0031, phase 1. The host side of docs/video-helper-protocol.md
that needs no process: the messages, what to do with each reply, and
finding the program. Starting the helper and the client come next.
- video::wire: encode.open/frame/flush/close, cancel, hello and the
replies, as the page documents them; control lines are at most 1 MiB.
- video::jobs: job and frame ids, the 8 frame / 256 MiB budget and the
"What EffectCraft does with each reply" table (accept, drop, job error,
protocol break) as plain logic.
- video::check_hello and find_video_helper: the version and app_min
checks, and the program is looked for only in helpers/ next to the
executable. Effect-helper scans now skip it.
* Helper host: video helper client, stand-in helper and gate tests
Part of RFC-0031, phase 1. Starts a video helper and runs encode jobs
on it, following docs/video-helper-protocol.md and the reply rules
added in the previous commit.
- video::client: VideoHelper starts the program, checks its hello,
opens encode jobs, sends pictures (waiting when 8 frames or 256 MiB
are out), flushes, cancels and closes. Packets are copied out of the
exchange file as they arrive. A crash, hang or broken reply stops the
helper and fails the export; 3 stops turn it off. A refused job ends
that job only.
- Stopping kills the helper process and waits at most 5 s, then drops
the exchange file so a stray process can't touch a reused region. The
spec no longer promises a process-group or job-object kill, which
needs unsafe code; its wording follows what is implemented.
- tests/it/video.rs: a stand-in helper (this test binary, driven by a
scenario) and 19 gate checks: crash, hang, bad and out-of-order
replies, out-of-bounds packets, version mismatch, missing helper,
lost device, packet_too_large as a job error, cancel, ignored
cancel, 3 stops and retry.
* Helper host: harden the video client against a misbehaving helper
Review fixes on the video client and its tests.
- Packets in one reply may not add up to more than their region, so
repeated references to the same bytes can't make the host copy them
many times. The reader's queue is bounded; a helper that floods it
waits on its own pipe.
- A picture is sized with checked arithmetic and refused over 256 MiB
before any layout or exchange file growth; an encode.open that can't
be written is refused before the job, its ids and regions exist.
- Waits end at their deadline even while replies keep arriving, a poll
looks at a bounded number of late replies, the flush batch and
encode.flushed share one timeout, and a timeout too long to represent
no longer panics.
- close is private: a job is closed only after encode.flushed or
cancelled. An unsent frame is given back when writing its planes
fails; a failed copy of packets stops the helper without counting it
as a crash.
- Contents/Helpers is searched only for an executable in
Contents/MacOS. An incomplete base64 group is rejected.
- Tests assert the protocol diagnostic of each malformed reply and
cover the flood, the flush deadline, oversized pictures and an
oversized encode.open. The spec table drops every reply except
cancelled for a failed job that has not been cancelled yet.
* Helper host: allow one encoder job at a time on a video helper
open_encoder accepted a second job while the first was open. If the
first job then reported an error while the client was waiting on the
second, the error was dropped and its caller only saw "no such video
job".
A second open is now refused with a request error until the first job
is finished or cancelled, so each job's error reaches its own caller.
The receiver state machine still tracks several jobs; only the client
API is single-job.
The gate test refuses a second open while one is active and accepts a
new one after finish and after cancel.
* Helper host: reject malformed base64 padding, align two protocol notes
base64_decode stripped every trailing "=", so "====" decoded to an
empty codec configuration that open_encoder then accepted. It now
accepts at most two "=" and only when the length is a multiple of 4.
The protocol page said job ids are never reused even after a restart,
but the counter is per process, and said nothing about replies that
were already queued when the frame timeout passed. Both now describe
what the client does.
* Helper host: fix two code comments about job id reuse
The comments on NEXT_JOB and Jobs::new said ids are never reused across
helper processes or restarts. The counter is per process and a new
helper starts from the highest id opened so far, so the comments now say
that, matching docs/video-helper-protocol.md.
* Helper host: cap the encoder delay a video helper may report
A helper-reported delay sized the flush region (and the exchange file) with
unchecked arithmetic. A delay over 64 is now a protocol break, the flush
region uses checked arithmetic, and the protocol page says so. Also moves a
test doc comment back onto the test it describes.
---------
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Conflict in crates/ui-egui/tests/it/ui_shortcut_scopes.rs: kept this PR's press/press_in split (press and release, shared context) and main's framework::install_headless call, now made on every context the tests create.
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.
Supervised nightly switch-on, merged under Skylar's explicit Nightly 758 override after green CI, CodeRabbit on this head with no open threads, Sonar passing, and an independent adversarial review with no blockers.
Renders the plain nightly tar's launcher from craft-common-actions' shared template.
Independent check: dylanmtaylor compared all 14 app launcher PRs byte for byte with the template rendered from the registry (https://github.com/storytold/craft-common-actions/pull/367#issuecomment-7172085284); this head was re-checked against craft-common-actions main 88148a5.
The movie's audio step now times mixing and encoding as audio and muxing the encoded AAC/PCM
samples (and the AAC drain) as writing, as the timing contract says. A Finished update without
timing clears the item's earlier timing. New test: an_audio_mux_write_counts_as_writing.