MagentaRT2: root-cause engine metallib failure (LFS), drop unsafe swap option - #132
Merged
Merged
Conversation
…p option The "Invalid library file" engine failure was never a toolchain or xcframework problem: vendor/magentart.xcframework's Metal libraries are Git LFS objects (107MB each), and checkouts without hydrated LFS carry 134-byte pointer stubs that Metal rejects. `git lfs install --local && git lfs pull` restores them; the modelLoadFailed error message now says exactly that, and docs/configuration.md documents the constraint. With the engine finally runnable, the gated prompt-swap integration test delivered its verdict on the opt-in non-blocking swap shipped in #128: overlapping mrt2_engine_generate_frame with the engine's asynchronous prompt encode SEGFAULTS (signal 11, deterministic). The option and its env switch are removed — a mid-session swap blocks the render loop for the encode by engine constraint, with the 1ms poll retained. Stall-free swaps need the engine's threaded mrt2_runner_* API with its buffered audio ring; the test suite now pins the supported blocking behavior (passes live: 50 frames through a swap, finite non-silent audio, [magenta-test] peak_after_swap=0.33). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes out the Magenta RT2 investigation with two corrections to the record.
1. The engine was never toolchain-broken — it's Git LFS
vendor/magentart.xcframework/**/Resources/*.metallibare LFS-tracked 107MB objects; un-hydrated checkouts carry 134-byte pointer stubs, and Metal's "Invalid library file ×2" was it rejecting those stubs.git lfs install --local && git lfs pullfixes it — verified:music realtimerenders 101 frames / 5s of audio immediately after hydration. ThemodelLoadFailedmessage now includes the LFS hint, and the docs note the constraint. (The earlier task chip's "rebuild the xcframework" hypothesis was wrong; chip dismissed. Related context: this is a sibling of the tracked-stale-metallib class of problem fixed in #131 — binary Metal artifacts in git that don't obviously fail when wrong.)2. The promotion gate ran — and rejected the non-blocking swap
With the engine live, the gated integration test shipped in #128 delivered its verdict: overlapping
mrt2_engine_generate_framewith the engine's async prompt encode segfaults deterministically (signal 11). The opt-inMERERUN_MAGENTA_NONBLOCKING_PROMPT_SWAPand its code path are removed; mid-session swaps block for the encode by engine constraint (1ms poll retained from #128). Stall-free swaps need the engine's threadedmrt2_runner_*API with its buffered ring — documented as the future path.The rewritten test suite pins the supported blocking behavior and passes live:
🤖 Generated with Claude Code