test(MUSIC3-DEPTH-ARM-REACH): gate the engine's own call to the depth arm selector (#1839) - #1845
Merged
Merged
Conversation
…ets a gate (#1839) Issue #1839, lane #672. The spec, committed before the implementation it describes, per `AGENTS.md` `## Spec before code`. #1131 named BOTH MiniMax-Music3 device-arm twins. Row `MUSIC3-DIT-ARM-REACH` closed the DiT one on `thor:gpu0` and closed #1131 with it, which left the depth half tracked by nothing until #1839 was filed. `.agents/specs/minimax-music3.md` §19.5 measured what the gap costs: deleting the engine's two-line call to `Music3SelectDepthArm` leaves `test_minimax_music3_ar` 37/37 and `test_minimax_music3_speech` 9/9 green, because the 0.646B RVQ depth decoder returns to its host reference loops and produces the same song, later. §19.1 measured that stage at 48.4% of a run. The spec mirrors the DiT twin's method rather than re-deriving it, and it states up front which instrument is direct and which corroborates: `ar.depth_staging` is emitted past the selector's CPU early return and answers the call site; `ar.depth_device` says the production append lambda took the device branch; `ar.depth_host` absent is the control. They are NOT independent on the call-site mutation, because engagement flows from the selector, and the spec says so rather than implying otherwise. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: Claude:claude-opus-5 [Claude Code]
… arm selector (#1839) Row `MUSIC3-DEPTH-ARM-REACH`, lane #672, spec `.agents/specs/music3-depth-arm-reachability.md`. The twin of PR #1821, which closed the DiT half of #1131 and left this one for #1839. `tests/parity/test_minimax_music3_depth_arm_real.cpp` enters through `include/vllm.h` — `vllm_speech_engine_load` with `device = 1`, then `vllm_synthesize`. That is a production entry point by `AGENTS.md` `## Nothing lands dead`'s own list. The gate constructs no engine, calls no `Music3DepthStage`, stages nothing and builds no arm by hand: the only thing that may select the device arm is the shipped engine executing the line under test. `Music3DepthStage`'s append lambda gains `ar.depth_device` and `ar.depth_host`, the depth twin of `denoise.dit_device` / `denoise.dit_host`. They exist because the alternative observable — `Music3DepthDeviceForwardCount()` — is read by no production run, which is #1839's own complaint, and because the record that filed the issue already describes the gate as asserting `ar.depth_staging` with "the host bucket absent" and no host bucket existed. `profile::Count` writes a `seconds = -1` pure counter, so it joins no leaf sum; with the instrument off it returns on one predicted branch and reads no clock. `test_minimax_music3_ar`'s composed-stage case drives both sides of that branch in one process, which is the only place in the tree where both execute. `ar.depth_staging` is the direct answer to the residual and `ar.depth_device` corroborates; they are NOT independent on the call-site mutation, because an arm is engaged only through fields the selector sets. They separate on other defects, which is why both are asserted. The entry carries `LABELS "gpu;checkpoint;music3"` and exits 77 without a device or checkpoint, so CTest reports Skipped and never Passed. `scripts/check-test-registration.py` pins `ctest -L gpu` to the exact two-name set, because `ctest -L` returns 0 over an empty selection. Renaming the label on one of the two shipped entries takes the checker from rc 0 to rc 1 with `ctest -L gpu selects 1 test(s) [test_minimax_music3_device_arm_real]`, and the restored file hashes back to `ab66e87cff5d75355096c0ad4a7eb501c5ef5c35`. The mutation suite gains `M48` for that case — a non-empty miss only reachable at n > 1, which a floor cannot see — and goes 57 to 58 cases, OK. Local CPU-only Release gates: `test_minimax_music3_ar` 37/37 · 655/655 SUCCESS! (649 before, the six new assertions), `test_minimax_music3_speech` 9/9 · 223/223, `test_music3_profile` 7/7 · 50/50, `test_minimax_music3_acoustic` 40/40 · 395/395, every one 0 `[SKIP]` lines. `test_minimax_music3_depth_arm_real` exits 77 and CTest reports it Skipped. The device leg and the acceptance mutation follow in this pull request; the spec's `## Outcome` carries them. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: Claude:claude-opus-5 [Claude Code]
…mutation reds the gate (#1839) The spec's `## Outcome`, filled in from the leased run. `rc` lease on `thor:gpu0`, worker pod `rc-worker-kk96r`, boot id `e2112cac` unchanged end to end and the same pod as PR #1821's job. Release CUDA build for `110`, nvcc 13.0.88, `compile_rc=0` in 248 s, tree cloned inside the worker and asserted equal to the SHA under test. Checkpoint verified by bytes rather than by existence, `SRC_BYTES == DST_BYTES == 28517617303`. The gate is green at 1/1 · 23/23, `ar.depth_staging` 1 call, `ar.depth_device` 56 of 56 appends, `ar.depth_host` absent, and 56 / 7 depth stages = 8 appends each, which is the checkpoint's `num_codebooks` derived from the run. The acceptance criterion holds. Deleting the engine's two-line call reds it — `gate_mutated_rc=8`, 12 assertions / 11 passed / 1 failed, `Status: FAILURE!`, at `REQUIRE( staging != nullptr )` — while `test_minimax_music3_ar` 37/37 · 655/655 and `test_minimax_music3_speech` 9/9 · 223/223 stay green on the same binaries, which is #1839's recorded blindness reproduced at this head. The red is a named assertion and not a clock: neither labelled entry carries a `TIMEOUT` property, dumped from `ctest --show-only=json-v1` in the job. The restored binary hashes back to the BASELINE, not to the mutated one, and the gate re-runs green. That comparison is the one PR #1821 got wrong and corrected; this toolchain's CUDA link does reproduce, measured again here. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: Claude:claude-opus-5 [Claude Code]
localai-bot
marked this pull request as ready for review
August 24, 2026 08:53
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 #1839. Row
MUSIC3-DEPTH-ARM-REACH, lane #672, spec.agents/specs/music3-depth-arm-reachability.md.The twin of PR #1821. #1131 named BOTH MiniMax-Music3 device-arm twins; row
MUSIC3-DIT-ARM-REACHtook the DiT one onthor:gpu0and #1131 went with it,leaving the depth half tracked by nothing until #1839 was filed before that
merge.
.agents/specs/minimax-music3.md§19.5 measured the gap: deleting theengine's two-line call to
Music3SelectDepthArmleavestest_minimax_music3_ar37/37 and
test_minimax_music3_speech9/9 green, because the 0.646B RVQ depthdecoder returns to its host reference loops and produces the same song, later.
§19.1 measured that stage at 48.4% of a run and a 0.646B model costing 6.3x the
8.6B language model beside it.
The gate
tests/parity/test_minimax_music3_depth_arm_real.cppenters throughinclude/vllm.h—vllm_speech_engine_loadwithdevice = 1, thenvllm_synthesize. That is a production entry point byAGENTS.md## Nothing lands dead's own list. It constructs no engine, calls noMusic3DepthStage, stages nothing and builds no arm by hand: the only thingthat may select the device arm is the shipped engine executing the line under
test.
The instrument the issue said did not exist
#1839's complaint is precise and it is not only "no CI runner has a GPU". The
observable §19.6's "device path TAKEN" leg rides is
Music3DepthDeviceForwardCount(), which §19.5 itself records as unreachablefrom production — its only readers are the tests written for it. A counter no
production run reads measures a class, not a capability. The instrument that
would answer the call site,
ar.depth_staging, was read by nothing.So
Music3DepthStage's append lambda gainsar.depth_deviceandar.depth_host, the depth twin ofdenoise.dit_device/denoise.dit_host,and the record that filed #1839 already described the gate as asserting
ar.depth_staging"with the host bucket absent" — a bucket that did not exist.profile::Countwrites aseconds = -1pure counter, so it joins no leaf sumand cannot make the split's parts exceed its whole; with the instrument off it
returns on one predicted branch and reads no clock.
ar.depth_stagingMusic3SelectDepthArmand the selector took the device branch. The direct answer to #1839.ar.depth_devicear.depth_forward, which brackets every append on both armsar.depth_hostThey are not independent of one another on the call-site mutation, and this
says so rather than implying otherwise.
ar.depth_deviceis emitted underdevice_arm.engaged(), and an arm is engaged only through fields the selectorsets, so deleting the engine's call reds both at once.
ar.depth_stagingis themost direct;
ar.depth_devicecorroborates. They separate on OTHER defects,which is why both are asserted: an arm that stages and is then dropped by the
loop moves the first and not the second, and a partial fallback moves the third.
The body-executed question —
dit.pack's role in the DiT twin — is deliberatelynot asked here.
ar.depth_devicesits in the same branch as theDepthDecoderAppendDevicecall it labels with nothing between them, andtest_minimax_music3_ar.cpp's composed-stage case already holdsMusic3DepthDeviceForwardCount()to an exactnum_codebooksper frame. That isa class assertion in the place a class assertion belongs.
Counts are arithmetic over quantities the run produced —
ar.frames,ar.depth_stage,ar.depth_forward— never against constants written in thetest.
num_codebooksis a checkpoint property, so only divisibility is assertedand the quotient is reported.
Both sides of the branch, from a CPU runner
test_minimax_music3_ar.cpp's composed-stage case is the only place in the treewhere
Music3DepthStageruns twice in one process, once with adefault-constructed arm and once with an arm staged onto a CPU
vt::Queue. Thetwo new buckets are asserted there on both sides:
ar.depth_hostcalls == num_codebookswithar.depth_deviceabsent, then the reverse.The label lane
The entry carries
LABELS "gpu;checkpoint;music3"and exits 77 without a deviceor checkpoint, so CTest reports Skipped, never Passed.
scripts/check-test-registration.pypinsctest -L gputo the exact two-nameset, because
ctest -LprintsNo tests were found!!!and returns 0 over anempty selection. Renaming the label on one of the two shipped entries takes the
checker from
rc 0torc 1:and the restored
tests/CMakeLists.txthashes back toab66e87cff5d75355096c0ad4a7eb501c5ef5c35. The mutation suite gainsM48forthat case — a non-empty miss, one gate leaving the lane while the other keeps
it non-empty, which is only reachable at n > 1 and which a floor cannot see — and
M44,M45andM47now mutate both entries so the empty-selection case theyexist for is still the case they measure. 57 to 58 cases,
OK, 0 skipped.Local gates, CPU-only Release
[SKIP]test_minimax_music3_artest_minimax_music3_speechtest_music3_profiletest_minimax_music3_acoustictest_minimax_music3_aris 655 against 649 onorigin/main: the six newassertions, three per side of the branch.
test_minimax_music3_depth_arm_realexits 77 on this build with the refusal quoted and CTest reports it Skipped.
scripts/agent-preflight.sh: 100 gatesok, 0 FAIL, 0 SKIP, rc 0, "Allgates green."
check-commit-styleandcheck-commit-trailersbothrc 0overthe non-empty merge-base range; a detached scratch commit with a trailing-period
subject and no body takes both to
rc 1, so neither passed vacuously.scripts/check-test-registration.pyrc 0.Measured on thor:gpu0
Inside an
rclease, 2026-08-24 08:38:37Z-08:44:56Z. Worker podrc-worker-kk96r, boot ide2112cac-660b-434e-911d-33cbd29b9176, unchanged endto end and the same pod and boot as PR #1821's job, so the box has not rebooted
between the twins. NVIDIA Thor
compute_cap 11.0, driver 595.78, nvcc 13.0.88installed by the job, Release CUDA build for
110,configure_rc=0,compile_rc=0in 248 s. Tree cloned inside the worker and asserted equal to9649a4c12903547cbe362369c9db7689c01fb3ebbefore anything was built(
clean_tree=yes). Thercjob UUID is UNVERIFIED — the client headerscrolled out of a
tailandrc pslists only live jobs — so the run isidentified by device, submitter string, pod, boot id, the UTC window and
/mnt/nas_share/rc/m3depth/out/job.log. Recorded as missing rather than guessed.The first submission was refused by its own disk guard (78 GiB free against
NEED_GB=110, exit 95, device untouched) and that log is kept beside the run.The checkpoint was read from
/tmp/m3reach-ckpton the worker's overlay, whichPR #1821's job staged on this same pod; reused is not trusted, and the same hard
SRC_BYTES == DST_BYTES == 28517617303comparison a fresh copy gets was applied,with
findmntprinted for the NAS source and for the path actually read.[SKIP]test_minimax_music3_depth_arm_realtest_minimax_music3_device_arm_real(PR #1821's gate, control)test_minimax_music3_acoustictest_minimax_music3_speechtest_minimax_music3_artest_music3_profilectest -N -L gpuselected exactly#70and#71, so the pin is the tree'sbehaviour and not a declaration.
device 1 resolves to 'cuda'andvllm_speech_engine_device()returned 1, so this is the granted arm.ar.depth_staging1 call / 1.149 s,ar.depth_device56,ar.depth_forward56,ar.depth_hostabsent;ar.frames6,ar.depth_stage7, and 56 / 7 = 8appends per stage, the checkpoint's
num_codebooks, derived from the run ratherthan written into the test.
The acceptance criterion
Delete the production call site and rerun the focused gate
(
.agents/reachability.md). One hunk,mutation_applied=1,git diff --stat1 file / 2 insertions / 2 deletions, and
compile_rc=0reported before anyverdict.
RED:
gate_mutated_rc=8, 1 case / 0 passed / 1 failed, 12 assertions / 11passed / 1 failed,
Status: FAILURE!, CTest***Failed 19.07 sec, attest_minimax_music3_depth_arm_real.cpp:295: REQUIRE( staging != nullptr ).The red is a named assertion and not a clock. Neither labelled entry carries
a
TIMEOUTproperty — dumped fromctest --show-only=json-v1inside the job,HAS_TIMEOUT=Falsefor both — andvllm_cpp_add_teststill sets onlySKIP_RETURN_CODE 77. The one case-insensitivetimeoutmatch in the mutatedlog is CTest's own
Test timeout computed to be: 10000000, its no-timeoutsentinel; the grep was read rather than counted, because a count of 1 would
otherwise be indistinguishable from a real timeout.
And what the red is made of is the argument. The mutated run did not fail,
break or produce different audio.
ar.depth_stagingandar.depth_devicewentabsent,
ar.depth_hostappeared at 56,ar.depth_forwardwent 0.327 s to5.446 s over the same 56 calls and
ar.depth_stage0.519 s to 5.591 s, whileacoustic.dit_staging1 anddenoise.dit_device2 were unchanged — which iswhat says the mutation is scoped to the depth call site rather than disabling the
accelerator. No performance claim is made and the ratios are named with the
quantity each belongs to: the
ar.depth_forwardbucket is 16.7x, thear.depth_stagespan 10.8x, and the CTest wall for the whole gate 1.23xbecause the run loads 28.5 GB either way. On 0.24 seconds of audio, from a
change that alters no number anywhere.
And the tree stayed green. Under the identical mutation
test_minimax_music3_aris 37/37 · 655/655SUCCESS!andtest_minimax_music3_speech9/9 · 223/223SUCCESS!— #1839's recordedblindness, reproduced at this head, on the same binary set that reds the new
gate.
Restore: the binary hashes back to the BASELINE.
git status --porcelainempty at the same SHA,
compile_rc=0,RESTORED_BINARY_SHA256andBASELINE_BINARY_SHA256both1f8e424f611ab9973fc529798565f5b3649c9ce1ed4d50d06ebbfbc23aeac8e4against themutated
9296b268..., and the gate re-ran 1/1 · 23/23SUCCESS!. The comparisonis against the baseline and never against the mutated binary, which is the
mistake PR #1821 made and corrected: this toolchain's CUDA link does
reproduce, measured here on the same box.
The CPU-side instrument has teeth too
Deleting
profile::Count("ar.depth_device", 1)from the production lambda —mutation_applied=1,hunk_count=1,compile_rc=0before the verdict, mutatedbinary
0fe1524bad50e28d...against baseline58342939c4c72f58...— takestest_minimax_music3_arto 37 / 36 passed / 1 failed, 635 / 634 / 1,Status: FAILURE!attest_minimax_music3_ar.cpp:1813: REQUIRE( device_bucket != nullptr ). Restored:porcelain empty, binary back to
58342939c4c72f58..., suite back to 37/37 ·655/655.
Scope
No performance claim is made. The
release_hostpass-through on the depthselector's device path is
MUSIC3-DEPTH-DEVICE's and is unchanged; the DiT arm'sown residual is
MUSIC3-DIT-ARM-REACH's and is unchanged.Known reds not owned here:
windows-msvc-*(#584, #1829),macos-metal-mlx(#1823),
agent-recordhugo (#1722),test_cpu_x86_llamacpp_floorunder boxload (#618), and
build-test-cpu-arm64-full's pre-existing undefinedApiServer::*references.FOLLOWING_AGENTS_PROTOCOL
Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: Claude:claude-opus-5 [Claude Code]