Skip to content

fix(LTX25-DEVICE-SEAM-SIBLING): the third question, and a leakage bucket that is a property rather than a spelling (#659, #660) - #671

Closed
localai-bot wants to merge 11 commits into
mainfrom
row/LTX25-DEVICE-SEAM-SIBLING
Closed

fix(LTX25-DEVICE-SEAM-SIBLING): the third question, and a leakage bucket that is a property rather than a spelling (#659, #660)#671
localai-bot wants to merge 11 commits into
mainfrom
row/LTX25-DEVICE-SEAM-SIBLING

Conversation

@localai-bot

@localai-bot localai-bot commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Implements the committed spec .agents/specs/ltx25-device-seam-sibling.md.

Issues: #659, #660. Campaign: #644.

The two defects

#659 — the seam was adopted, its companion guard was not. 11cc1d589 routed
LTX-2.5's device question through the platform seam and asked two of the three
questions its own cited precedent asks. src/vllm/entrypoints/model_loader.cpp:97
also asks plat.supports_model_architecture(architecture), which exists so a
PARTIAL backend can decline by name. src/vllm/platforms/metal.cpp:70 and
src/vllm/platforms/tenstorrent.cpp:52 are the only two overriders and both
declare {"OPTForCausalLM", "Qwen3ForCausalLM"}. On those builds a device = 1
LTX-2.5 load was refused by name and had become a queue bind that dies later
inside a kernel. CUDA is unaffected, which is why it is invisible on the gate box.

#660 — the gate that certified it is a token grep.
scripts/check-device-leakage.py's kcuda bucket is \bkCUDA\b.
src/vllm/multimodal/minimax_h3_video.cpp:225 (pre-change) wrote
static_cast<vt::DeviceType>(device) against kCUDA = 1 and scored zero,
while tests/vllm/models/test_minimax_h3_video_fold.cpp:162 spelled the token
honestly and was counted. The gate read the confession and missed the act.

The load-bearing claim: dev_cast is a property, not a spelling

A bucket that grepped static_cast<vt::DeviceType> would close the one site we
found and be the same defect one spelling later. The bucket is anchored on the
target type, matched over the whole comment-stripped text, and is asserted
RED for ten spellings that are not in the tree, each individually:

Mutant Spelling planted Added
M20 C-style (vt::DeviceType)d
M21 functional vt::DeviceType(d)
M22 intermediate int + unqualified static_cast<DeviceType>(raw)
M23 brace vt::DeviceType{d} (unnamed temporary)
M24 cast split across two lines by clang-format
M29 C-style past the parameter-declaration discriminators, with a literal )1, a signed literal )-1 and an identifier operand review
M30 global-scope static_cast<::vt::DeviceType>(raw) review
M31 elaborated static_cast<enum vt::DeviceType>(raw) review
M32 list-init in a declaration, vt::DeviceType dt{raw} review
M33 pointer punning *reinterpret_cast<vt::DeviceType*>(&raw) review

Each goes RED with DSR REGRESSION in bucket 'dev_cast': 1 > baseline 0 — except
M29, which appends its three operand kinds to the same false-positive fixture and
so reds at 1 >, then 2 >, then 3 > baseline 0, proving the discriminators
cost none of them.

M22 is the one that separates "anchored on the target type" from "anchored on
the operand": the thing cast is neither a literal nor the parameter, and the
qualifier is dropped.

Negatives, so the bucket stays usable: M25 (static_cast<int>(t) and
static_cast<size_t>(t) — the safe direction, and how the seam indexes its own
registry — do not count), M26 (prose and string literals do not count), M27 (the
platform registry walk is allowlisted at exactly one; a second cast in that
file still fails), M28 (DSR-ALLOW exempts a dev_cast and is printed loudly),
M29 (a parameter declaration is not a cast).

Negative M34 (review): a function definition whose return type is
DeviceType is not a conversion. Not hypothetical — the first cut of M32's
declaration form accepted ( as well as { and produced three false positives
on the real tree
, including MiniMaxH3VideoDeviceType and
ResolveExplicitDeviceType. The declarator form takes { only, which costs
nothing real because vt::DeviceType dt(raw) is ill-formed.

Residual blind spots, recorded in the checker's own docstring because a
checker's message is the authority on what it enforces: casts through a type
alias, a macro, or a template parameter; bit_cast/memcpy/union punning
(the pointer-cast spelling is now caught — these three are not, because no
spelling of the target type appears at the site); conversions inside the
unscanned src/vt/ device leg; and the fact that nothing type-checks the
operand, so the bucket flags every cast to DeviceType and relies on
DSR-ALLOW for a legitimate wire-format decode — which is also why a pointer
target counts, since const_cast<DeviceType*>(p) removes const rather than
converting, and buys its exemption the same way.

metal.cpp / tenstorrent.cpp run no diffusion model

Checked before assuming, per spec §5. Searched their own vocabulary over
src/vllm/platforms/{metal,tenstorrent}.cpp and src/vt/{metal,tenstorrent}/
with OPTForCausalLM as a positive control in the same command: the control
hit 3 times, ltx|minimax|h3|diffus|video hit 0. The guard refuses nothing that
works today, so §6's NEEDS_DECISION stop condition is not triggered.

Baseline: every line touched, with its reason

scripts/device-leakage-baseline.jsonone added line, no changed value:

+    "dev_cast": 0,

total stays 32 and every other bucket is byte-identical. The key is
required because load_baseline() reads every entry in BUCKETS; the value is
0 because the H3 site is repaired rather than absorbed, and the platform
registry walk is allowlisted with a stated reason rather than counted. No number
in this file goes up. (A peer measured that --write-baseline refuses to raise
the baseline but that hand-editing the JSON higher makes the checker PASS — so
this diff being two lines and visible is the only real defence, and it is stated
here for the reviewer to check by md5 against the base for every other key.)

The one judgement call

supports_model_architecture is asked with the family string (ltx-2.5,
minimax-h3), not an HF architectures[0] class name. The diffusion lanes are
reached through LoadVideoEngine/VideoModelParams::family and never read an
architectures entry, so the family slug is the only stable identifier they
have — and it is the string the user actually typed, which is what the refusal
names. It does mean the seam's key space now mixes HF class names with family
slugs. They cannot collide. Flagged rather than buried.

A disagreement between the dispatch brief and the spec, resolved in the spec's favour

The brief said test_minimax_h3_video_fold.cpp:161-164 must stay green
unchanged. The spec's §4.2 enumerates the contract as 0 → kCPU, -1 and
2 throw, and separately requires that on a CPU-only build 1 is refused.
Line 162 asserted MiniMaxH3VideoDeviceType(1) == kCUDA — precisely the cast's
answer — and cannot survive the change. It is now build-conditional and asserts
both arms rather than skipping either: == accelerator where one is
registered, refused-by-name where none is. 161/163/164 are untouched.

The review upheld this and corrected the other half of it — see the review
section below: the build-conditional form was right, but the predicate choosing
between its arms asked two of the three questions and so red on a correct
refusal.

Relatedly, that file's CUDA-load case registered a backend and no
platform — it could, because the cast never asked whether the build had an
accelerator. It supplies both halves now. That is the defect being visible, not
a harness concession: a build with a CUDA backend registered and no CUDA platform
is not a build that runs on CUDA.

Out of scope, held to

Review repair (findings from the review of 094ac9e4)

The review returned FAIL with sound core work: it reproduced every green and
every claimed mutation, verified branch orthogonality, confirmed the baseline
diff by hash, and independently planted three fresh spellings that each went RED.
Four findings, all repaired here.

F1 (High) — the bucket missed the purest form of the defect, and the test that
was supposed to rule that out could not see it.

(vt::DeviceType)d    -> dev_cast 1, RED     (what M29 asserted)
(vt::DeviceType)1    -> dev_cast 0, GREEN   <-- MISSED
(vt::DeviceType)-1   -> dev_cast 0, GREEN   <-- MISSED

The C-style alternative's trailing lookahead admitted only [A-Za-z_(], and 1
is a digit. A C-style cast of an integer literal — the device named by its
raw enum value — is exactly what this bucket exists to police, so the one form it
could not see was the one form it was for.

What makes it High rather than a nit: this PR asserted that the M29
discriminators cost nothing, and they cost this — while M29's own "did not cost
the real thing" assertion used an identifier operand, so the test could not
detect the gap it was written to rule out. A guard that certifies itself is the
exact disease this row exists to fix, reproduced inside the row's own instrument.
M29 now pins the literal first, then the signed literal, then the identifier,
all in the same file as the false-positive fixture.

Re-derived rather than taken on report: over src/vllm + include/vllm, 720
files
, with \bDeviceType\b = 162 matches as a positive control in the same
command
, admitting 0-9+- adds zero hits and loses none. The only raw match
under either pattern is platform.cpp:85's allowlisted registry-walk inverse.

F3 (Medium) — the docstring under-reported, and three cast keywords were dead.
Four more plain spellings read GREEN in scanned files. Each was compile-checked
as legal C++ before being called a blind spot, and each is now closed (see the
M30–M33 rows above). The pointer target is what makes the keyword list honest:
reinterpret_cast, const_cast and dynamic_cast to a scoped enum are
ill-formed
— compile-checked, all three rejected, with static_cast as a live
control that compiles — so before this change those three keywords could only
ever have matched code that does not build. They created an appearance of
coverage the pattern did not have. Matching a pointer target makes them live
rather than dropping them.

F2 (Medium) — the row added a test that FAILS on the build class #659 exists to
serve.
test_minimax_h3_video_fold.cpp's have_accelerator asked two of the
three questions (device_type() != kCPU && TryGetBackend() != nullptr). On Metal
or Tenstorrent both are true, so the test took the == accelerator arm while the
source correctly refused, and the refusal surfaced as an uncaught exception.
Proven by mutation, not deduced — a DecliningPlatform registered in the XPU
slot, production code untouched:

result
before (2-question predicate) :247 ERROR: CHECK( MiniMaxH3VideoDeviceType(1) == accelerator ) THREW … "DECLINES the architecture 'minimax-h3'" — 6 cases, 5 passed / 1 failed, 137 assertions, FOLD_EXIT=1
after (3-question predicate) 6 cases, 6 passed / 0 failed, 137 assertions, FOLD_EXIT=0

So the row shipped a false RED on precisely the partial-backend build it was
written to protect
— invisible on the CPU and CUDA boxes that run the gates,
which is this row's own thesis about #659 turned against its own test. The
predicate is now three-way and asserts which refusal, because a right refusal
for a wrong reason is a wrong diagnosis that reads as a right one.

F4 (Low) — an assertion that only checked absences. The "COMPLETE backend is
not refused" case checked that DECLINES and supports_model_architecture were
absent and never positively asserted that the load reached the missing
checkpoint, so it would pass on any other wrong failure. Mutation (an unrelated
Fail() planted after the capability clause): the two absence checks both
passed
and only the new assertion caught it — 4 cases, 3 passed / 1 failed;
24 assertions, 23 passed / 1 failed; the failure at :178 on the /nonexistent/
path. ltx2_video.cpp restored and verified by sha256.

F6 — the decline consequence inverts the cited precedent (recorded in the
spec, no code change). model_loader.cpp:97's capability question lives on the
kAuto path, whose answer to a decline is to fall through to :103 and serve
on CPU
; metal.cpp:65-69 states that policy in as many words. Both diffusion
lanes instead throw. That is correct — device = 1 is an explicit
accelerator request, and model_loader.cpp:71-72 already says an explicit
accelerator must fail loudly rather than silently serve on CPU — but this PR
described the change as mirroring the precedent, and it mirrors the question
while inverting the consequence. Both halves are the seam's own, taken from two
different paths of it. Also recorded: vulkan.cpp does not override
supports_model_architecture
, so a partial Vulkan build still binds and dies.
Residual, not this row's to fix.

New-branch orthogonality

Each of the five new capabilities REDs its own mutant and no other; the
unmutated suite REDs none. Checker restored and sha256-verified after every one.

Capability removed RED
digits/sign in the C-style lookahead (F1) M29
global-scope :: in the qualifier (F3-a) M30
elaborated enum in the qualifier (F3-b) M31
the named declarator list-init (F3-c) M32
the pointer target (F3-d) M33

M34 is proven the same way in reverse: re-admitting ( to the declarator form
makes it RED at 4 != 0.

Landing: rebuilt onto origin/main, twice, and one keyed record RETIRED rather than reapplied

The branch was rebuilt, not just merged, because four of its commits could never
have landed.
78f401796, b73d4576f, 966e4883f and 79ebbce42 carried
Assisted-by: AGENT:claude-opus-5[1m] [claude-code]. Brackets are the TOOL slot;
scripts/check-commit-trailers.py:20's grammar has no bracket in the model token,
so the strict per-commit walk CI runs over base..head fails on all four no
matter what the tip looks like. Only those four message lines were rewritten. The
pre-merge tree is byte-identical to the previous head bf8bb745b — the same tree
object 6ab028f8c — and the branch topology is unchanged, so this is the same
change with four commit messages repaired.

The conflict was .agents/roadmap_v1.md, and the resolution is to write
NOTHING there.
Main's version was taken wholesale, per the keyed-record rule.
Then the scoped edits were not reapplied, and that is the finding rather than an
omission. Both edits lived in the ## Open issues table, and
#840 (POLICY-ISSUE-INTAKE)
moved that whole table out to the new append-only .agents/issue-index.md. Under
that regime a row is appended and never edited; GitHub holds the open and closed
state, so closing #659 and #660 costs the index no edit at all. This branch's
in-place annotation of those two rows is exactly the FIXED IN FLOW shape that
spec retired, and a union driver would have duplicated it rather than merged
it. The evidence it carried is not lost — it is in this row's spec, which is the
surface that owns it.

Proved by comparison rather than by eye:

record diff vs origin/main
.agents/roadmap_v1.md 0 lines
.agents/issue-index.md 0 lines
scripts/check-issue-index-append-only.py --base origin/main --head HEAD OK: issue index append-only (0 rows removed, 0 edited)

LTX25-DEVICE-SEAM-SIBLING has no portfolio row in roadmap_v1.md either —
checked with ENG-WEIGHT-OFFLOAD at 2 hits as a positive control in the same
command — so there is no lifecycle write owed and docs/STATUS.md /
docs/BENCHMARKS.md stay untouched. The spec's ## Now now says all of this,
because it previously claimed a table that no longer exists.

origin/main then moved again, mid-gate. It is a shared ref in a shared
checkout, and a peer session's fetch advanced it from 4a4ab89cb to 62406c30e
while this branch was building. The tell was a git diff origin/main HEAD that
grew from 11 files to 24 and showed this branch deleting
docs/WEIGHT-OFFLOAD.md, which it has never touched. Nothing was wrong with the
branch; the denominator moved. Everything below is therefore measured against
refs/pinned/main671, a local ref pinned at 62406c30e, so the gate and the push
agree on one tree. The second merge was conflict-free and the two record checks
above were re-run against the new tip rather than inherited.

Diff, measured rather than copied: 11 files, +1733 / -13 against
62406c30e. (The body previously said 12 / +1706 / -15; the twelfth file was
roadmap_v1.md, which is the file this section explains away.)

Where the rebuilt history is. Rewriting four commit messages makes the new
history a non-descendant of the old head, so publishing it on
row/LTX25-DEVICE-SEAM-SIBLING needs a force update of that ref. This session
does not hold that authority and did not work around it. The gated head is
7502004aa, pushed with a plain non-forcing push to
row/LTX25-DEVICE-SEAM-SIBLING-REBUILD. Everything measured in this body is
measured on that SHA. The operator repoints this pull request at it — either by
force-updating the row branch to 7502004aa, or by moving the pull request to
the rebuild branch — before landing. The old head bf8bb745b carries the same
tree and four commit messages that cannot pass check-commit-trailers.py.

scripts/device-leakage-baseline.json re-checked against the new tip: one added
line
, "dev_cast": 0, total still 32, every other bucket byte-identical.

Anchors re-derived at the merged tree, asserted UNIQUE

Every path:NN this row cites was re-resolved by pattern, and each pattern was
required to match exactly once in its file — existence is not enough, because
an anchor that still resolves can resolve to the wrong thing. 31 citations across
the spec and the row's own source comments. Five did not hold, and they split two
ways:

anchor was is whose drift
model_loader.cpp:97 (the capability clause) :97 :98 main's
model_loader.cpp:71-72 (explicit-accelerator polarity, F6) :71-72 :72-73 main's
minimax_h3_video.h:63 (the preserved public contract) :63 :69 already stale at bf8bb745b
ltx2_video.cpp:545-548 (the "refusal to fake it" argument) :545-548 :562-565 already stale at bf8bb745b
minimax_h3_video.cpp's citation of ltx2_video.cpp:549-580 :549-580 :566-610 already stale at bf8bb745b

Three of the five rotted inside this pull request, shifted by its own later
commits — which is the recorded-anchor failure mode this repository already has a
name for, and nothing but re-derivation notices it. All five are corrected.

The spec's own scanned-file figure was re-derived too, since it carries a SHA
precisely because it rots: 776 files at this merge, controls
\bDeviceType\b = 163 and \bkCUDA\b = 18. kCUDA is unchanged and
DeviceType moved by one — the invariant that section claims — against +11 on the
count, the thing it predicts. Two measurement traps are now written beside the
number because each made a correct recorded figure read as wrong: the controls
are counted over the comment-and-string-stripped text (raw source gives
177 / 82), and the enumeration must be the checker's own rglob, since a
git ls-tree walk filtered by string prefix swallows include/vllm.h and returns
777.

Mutation table — every guarantee neutralised, rebuilt, and re-run

Mutated, not read. Each row records whether it built, because a mutation that
fails to compile reads as a passing test and has produced false verdicts on this
campaign before. Every file was restored and verified by sha256 after each
mutation, and git status --porcelain carried no product-file entry afterwards.

# guarantee mutation built? verdict
MU1 #659: ltx2_video refuses device = 1 by name when the platform declines the architecture if (false && !platform.supports_model_architecture(kLtx2VideoFamily)) YES REDtest_diffusion_device_seam exit 1, 4 cases / 3 passed / 1 failed, 24 assertions / 19 passed / 5 failed
MU2 #660: MiniMaxH3VideoDeviceType resolves through the seam, not by integer cast the pre-change defect restored verbatim: return static_cast<vt::DeviceType>(device); YES REDtest_minimax_h3_video_fold exit 1, 6 cases / 5 passed / 1 failed; FATAL ERROR at test_minimax_h3_video_fold.cpp:232, "device 1 must be refused when this build cannot honour it"
MU3 #659, H3 arm: the sibling lane asks the third question too if (false && !platform.supports_model_architecture(kMiniMaxH3VideoFamily)) YES REDtest_diffusion_device_seam exit 1, 4 cases / 3 passed / 1 failed
MU4 F4: the COMPLETE-backend case positively asserts the load reached the missing checkpoint an unrelated Fail() planted after the capability clause YES RED — exit 1, 24 assertions / 23 passed / 1 failed; the single failure is :178, CHECK( msg.find("/nonexistent/ltx2-dit-that-is-never-opened.safetensors") != npos ). Both absence checks passed, exactly as F4 claims
MU5 #660: the dev_cast bucket is what the checker's suite is testing RE_DEVTYPE_CAST replaced with a pattern matching nothing n/a (Python) REDtests/scripts/test_device_leakage.py: 30 failed, 24 passed
MU6 #660 forward: the shipped gate now sees the act, not only the confession the original defect restored in product source, checker unmodified n/a (Python) REDdev_cast=1, total 33, ERROR: DSR REGRESSION in bucket 'dev_cast': 1 > baseline 0, exit 1

MU6 is the one that proves the row's thesis rather than its implementation. The
old kcuda token grep scored that exact line zero; the shipped bucket fails
the build on it.

Gate

CPU build, no CUDA, -j6, on the pinned tree 62406c30e + this branch.

cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DVLLM_CPP_CUDA=OFF
cmake --build build -j6
ctest --test-dir build -j4 --output-on-failure
axis value
CONFIGURE_EXIT 0
BUILD_EXIT 0
edges built 1416 / 1416 — a full rebuild, not an incremental one
Building CXX / Linking CXX (positive controls) 930 / 480
: error: 0
warning: 1, and it is ninja: warning: premature end of filezero compiler warnings
No space left 0
BFD assertion 0
ctest -N 478 registered
CTEST_EXIT 0
result 100% tests passed, 0 tests failed out of 478

Two tests did not run, both Skipped by their own guards and both pre-existing:
test_modelopt_mixed_precision_checkpoint and test_voxtral_e2e.

The counts moved because main moved: ctest -N was 456 when this body last
recorded it and is 478 now, across 31 commits of origin/main.

Nothing was charged to this branch. The full suite is green on this box, so
none of the known-flaky set (test_op_parity, test_openai_conformance,
test_serve_low_tools, test_cpu_threadpool) needed a serial re-run: all of them
passed under -j4.

scripts/agent-preflight.sh returns 9 red, and every one is demonstrated to
be main's rather than argued to be:

red proof
check-release-binary-contract, check-release-workflow, check-test-registration, test_check_release_binary_contract, test_release_manifest, test_release_pipeline, test_check_test_registration all seven re-run on a pristine origin/main worktree at 62406c30e and all seven exit 1 there. They read .github/workflows/ci.yml, and git diff origin/main HEAD -- .github/ is empty — positive control: the 11 files that DO differ are listed above
test_cpu_x86_llamacpp_floor the recorded load artifact (#618). Its own message is the evidence: AssertionError: 4 != 2 with load=133.92 147.59 112.07 — exit 4 is NO_QUIET_WINDOW, the harness declining to measure, not a floor that was measured and missed
role-undeclared a session-state gate, not a tree gate. Cleared: claimed role=helper row=LTX25-DEVICE-SEAM-SIBLING

Green in the same run and worth naming, because they are the ones this change
could have broken: check-agent-record, check-now-current, doc-checkpoint range, issue-index append-only, audit-live-rows, and the trailer and
commit-style suites.

Two instrument notes recorded rather than smoothed over, because both are the
shape that produces a false verdict here:

  • The build directory's .ninja_log was corrupt (ninja: warning: premature end of file; recovering), so ninja silently re-did 821 test objects on every
    invocation and no build was ever recorded as finished. Deleting it is why the
    gate above is a genuine 1416-edge full build rather than an incremental one —
    an incremental green is not a clean green.
  • The session scratchpad is shared between agents, and a foreign writer
    touched build.log two minutes after this session's build had written its
    exit sentinel. A build log whose mtime is later than its own sentinel is not
    this session's log. Every figure above comes from a private log directory
    instead.

Not merged with the newest main, deliberately. origin/main advanced three
times during this gate (4a4ab89cb62406c30eb3d0f3ed5), and chasing it
means never finishing a gate. The gate above is on 62406c30e.
git merge-tree --write-tree origin/main HEAD against b3d0f3ed5 exits 0, so
the newer tip is conflict-free; the three commits it adds touch none of this
branch's 11 files. A clean merge-tree is not a merge that builds, which is the
operator's own rerun to make.

Build directory deleted after the run.

## Nothing lands dead (8f49ac3be, landed mid-gate)

The policy arrived on main while this was gating, so it is answered rather than
ignored. Nothing here lands unreached.

  • ltx2_video.cpp's guard sits inside Ltx2VideoEngine::Load, which is what
    LoadVideoEngine and the video C ABI call. test_diffusion_device_seam enters
    through Ltx2VideoEngine::Load(mp) — not by hand-constructing an internal.
  • MiniMaxH3VideoDeviceType has exactly one production call site,
    minimax_h3_video.cpp:343 in MiniMaxH3VideoEngine::Load.
  • The proof the policy asks the reviewer for is already in the table above:
    MU1 and MU4 neutralise the production call site and the focused gate goes
    RED
    . A gate that stayed green without it would be measuring a class rather
    than a capability.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:claude-opus-5 [claude-code]

…evice seam, and the gate that cannot see it (#659, #660)

FOLLOWING_AGENTS_PROTOCOL

`11cc1d589` routed LTX-2.5's device question through the platform seam. It
fixed the lane it aimed at and left two things standing, both found by a peer
session's reviewer while reviewing that repair for landing.

#659 -- the seam was adopted, its companion guard was not. `ltx2_video.cpp:549`
asks `CurrentPlatform().device_type()` and `TryGetBackend(...)`, but never
`supports_model_architecture`, which is the third question the cited precedent
`model_loader.cpp:97` asks and the reason a PARTIAL backend can decline by name.
`metal.cpp:70` and `tenstorrent.cpp:52` are the two overriders. On those builds
a `device = 1` load was refused BY NAME and is now accepted into a kernel bind.
CUDA is unaffected -- which is exactly why it is invisible on the gate box.

#660 -- the gate that certified that repair is a token grep.
`check-device-leakage.py:78` is `\bkCUDA\b`; `minimax_h3_video.cpp:221-226`
writes `static_cast<vt::DeviceType>(device)` and scores ZERO. The sharpest form:
`test_minimax_h3_video_fold.cpp:162` asserts `... == vt::DeviceType::kCUDA`, so
the gate counts the TEST's honest spelling and misses the SOURCE's laundered
one. "kcuda 2 -> 0" is a true statement about the token and a weaker statement
about the property than it reads.

The spec's load-bearing constraint is on the new bucket: it must be derived from
the property, not from the one spelling in the tree, and it must go RED for at
least three spellings that are not that one. A bucket that only catches the
known site is a regression test wearing a gate's clothes, and the row says so
rather than claiming coverage.

Explicitly out of scope: the leakage baseline. A peer measured today that
`--write-baseline` refuses to RAISE the baseline, but hand-editing the JSON to a
higher number makes the checker PASS -- so the file's only real defence is a
visible, reviewed diff, and this row touches it only for its own new entries.

Gate: `agent-preflight.sh --staged` is green except `test_cpu_x86_llamacpp_floor`,
which failed under six concurrent build agents (`busy=163% load=60.36`, the
NO_QUIET_WINDOW retry path) and is a recorded load artifact; this change is a
spec plus two roadmap rows and cannot reach a CPU x86 llama.cpp floor.

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:claude-opus-5[1m] [claude-code]
mudler added 2 commits August 14, 2026 11:03
The row branched from 11cc1d5 and main has moved 40 commits since. Merging
before the gate so the ctest denominator this row reports is main's current one
(443 registered), not the count at the branch point — a registration count that
cannot be attributed is indistinguishable from a test this row dropped.

Ordinary merge, no conflicts outside `.agents/roadmap_v1.md` and
`tests/CMakeLists.txt`, both of which are keyed/append surfaces resolved by key.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: Claude:claude-opus-5 [ClaudeCode]
…ket that is a property rather than a spelling (#659, #660)

Implements the committed spec .agents/specs/ltx25-device-seam-sibling.md.

#659. 11cc1d5 routed LTX-2.5's device question through the platform seam and
asked two of the three questions its own cited precedent asks. SelectQueueForModel
(model_loader.cpp:97) also asks plat.supports_model_architecture(architecture),
which exists so a PARTIAL backend can decline BY NAME. metal.cpp:70 and
tenstorrent.cpp:52 are the only overriders and both declare exactly
{OPTForCausalLM, Qwen3ForCausalLM}. On those builds a device = 1 diffusion load
WAS refused by name and had become a queue bind that dies later inside a kernel.
CUDA is unaffected - supports_model_architecture defaults to true - which is
exactly why it is invisible on the box that runs the gates. The clause is added
at the same site in ltx2_video.cpp, and minimax_h3_video.cpp now asks all three.

#660. The kcuda bucket is the token grep \bkCUDA\b. minimax_h3_video.cpp:225 (pre-change) wrote
static_cast<vt::DeviceType>(device) against kCUDA = 1 and scored ZERO, while
test_minimax_h3_video_fold.cpp:162 spelled the token honestly and WAS counted: the
gate read the confession and missed the act. It is also an enum-ordering hazard -
reorder include/vt/device.h and every H3 device-1 load silently re-points.

THE LOAD-BEARING CLAIM, which is why this row is worth landing. A bucket that
grepped static_cast<vt::DeviceType> would close the one site we found and be the
same defect one spelling later. dev_cast is anchored on the TARGET TYPE, matched
over the whole comment-stripped text, and is RED for SIX spellings that are not in
the tree, each asserted individually and each proved by removing the alternative
that catches it:

  M20 C-style (vt::DeviceType)d                          | alt2 removed -> RED
  M21 functional vt::DeviceType(d)                       | alt3 removed -> RED
  M22 intermediate int + unqualified static_cast<>       | alt1 removed -> RED
  M23 brace vt::DeviceType{d}                            | alt3 removed -> RED
  M24 cast split across two lines by clang-format        | alt1/join   -> RED
  M29 C-style past the parameter-declaration guards      | alt2 removed -> RED

Four independent mutations of the pattern, each restored and verified by sha256:
alt1 -> 12 RED, alt2 -> 4 RED, alt3 -> 2 RED, join -> 15 RED. Removing any one
alternative REDs its own mutants and no others among M20-M24/M29, so no branch is
carrying another's weight.

NEGATIVES, because a bucket that cannot be lived with gets deleted: M25
(static_cast<int>/<size_t> of a DeviceType is the SAFE direction and is how the
seam indexes its own registry), M26 (prose and string literals), M27 (the platform
registry walk is allowlisted at EXACTLY one - a second cast in platform.cpp still
fails), M28 (DSR-ALLOW exempts and is printed loudly), M29 (a parameter
declaration is not a cast).

M29 is a real false positive the bucket produced on this tree, kept as a mutant:
kv_connector.h:225's supports_worker_transfer_on(vt::DeviceType /*device*/) const
strips to (vt::DeviceType ) followed by const, which is textually a C-style cast.
Two discriminators fixed it and M29 pins both, together with the proof that they
did not cost the real detection.

RESIDUAL BLIND SPOTS ARE IN THE CHECKER'S OWN DOCSTRING, per the spec's
instruction that a checker's message is the authority on what it enforces: casts
through a type alias or a template parameter, bit_cast/memcpy/union punning,
conversions inside the unscanned src/vt/ device leg, and the fact that nothing
type-checks the operand. Those are gaps in a TEXT checker, stated rather than
traded away.

BASELINE: ONE ADDED LINE, NO CHANGED VALUE. "dev_cast": 0. total stays 32 and
every other key is byte-identical. The key is required because load_baseline()
reads every entry in BUCKETS; the value is 0 because the H3 site is REPAIRED
rather than absorbed and the registry walk is allowlisted with a stated reason.
A peer measured that --write-baseline refuses to raise the baseline but that
hand-editing the JSON higher makes the checker PASS, so a two-line visible diff
is the only real defence and it is called out here for the reviewer to check by
md5 against the base for every key this row does not claim.

metal.cpp / tenstorrent.cpp RUN NO DIFFUSION MODEL, checked before assuming per
spec section 5, with OPTForCausalLM as a positive control in the same command:
the control hit 3 times, ltx|minimax|h3|diffus|video hit 0 across
platforms/{metal,tenstorrent}.cpp and src/vt/{metal,tenstorrent}/. The guard
refuses nothing that works today, so the NEEDS_DECISION stop condition is not
triggered.

WHERE THE BRIEF AND THE SPEC DISAGREED, resolved in the spec's favour and recorded
in the spec. The brief said test_minimax_h3_video_fold.cpp:161-164 must stay green
UNCHANGED. Spec section 4.2 enumerates the contract as 0 -> kCPU, -1 and 2 throw,
and SEPARATELY requires that on a CPU-only build 1 is REFUSED. Line 162 asserted
MiniMaxH3VideoDeviceType(1) == kCUDA - precisely the cast's answer - and cannot
survive the change. It is now build-conditional and asserts BOTH arms rather than
skipping either. 161/163/164 are untouched. That file's CUDA-load case also
registered a BACKEND and no PLATFORM; it could, because the cast never asked
whether the build had an accelerator. It supplies both halves now.

THE ONE JUDGEMENT CALL: supports_model_architecture is asked with the FAMILY
string (ltx-2.5, minimax-h3), not an HF architectures[0] class name. The diffusion
lanes are reached through LoadVideoEngine/VideoModelParams::family and never read
an architectures entry, so the family slug is the only stable identifier they
have, and it is the string the user actually typed. It does mean the seam's key
space now mixes HF class names with family slugs; they cannot collide. Flagged
rather than buried.

GATE. CPU build, no CUDA. CMAKE_EXIT=0 BUILD_EXIT=0, zero compiler errors, zero
warnings, zero "No space left"/"BFD assertion" in the build log. ctest -N = 445 =
main-at-merge 444 + this row's one new executable; origin/main has since added
three more (indextts2 #738/#739/#741), which is the whole of the drift from the
443 measured earlier. Full ctest -j4: 444/445 passed, 2 skipped, 1 FAILED -
test_op_parity, which is #737 (a null where a string is required in the
MiniMax-Music3 golden manifest added to main today) and reproduces on clean main;
this row touches no parity golden. Note it printed "70 passed | 0 failed" while
the case THREW: the exit code (CTEST_EXIT=8) is the authority, not the summary.

Focused, before -> after: test_ltx2_video 30 cases / 502 assertions UNCHANGED;
test_minimax_h3_video_fold 6 / 137 UNCHANGED (the one case I touched executes 4
assertions on either arm, exactly as before - the FAIL is on the untaken path);
test_diffusion_device_seam 4 / 23, new.

SOURCE MUTATIONS, each reverted independently, rebuilt, and restored by sha256:
  * revert the h3 seam to the cast -> test_diffusion_device_seam 2/4 cases FAIL
    (kXPU assertion and the DECLINES refusal), test_minimax_h3_video_fold FATAL
    at :214 "device 1 must be refused when no accelerator backend is registered",
    and check-device-leakage RED at dev_cast 1 > baseline 0. Three independent
    instruments, one defect.
  * drop the ltx2 capability clause -> test_diffusion_device_seam 1/4 cases FAIL,
    5 assertions, on platform/architecture/DECLINES.
Restored and re-green at 4/23 and 6/137.

preflight --staged: 2 gates fail, audit-live-rows and test_audit_live_rows, both
the stale ACTIVE MODEL-MUSIC-minimax-music3 row from a3aa02e. PROVEN not mine:
the same single assertion fails in a clean origin/main worktree, and this diff
touches no music3 path. Already filed as #731 and #733.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: Claude:claude-opus-5 [ClaudeCode]
@localai-bot localai-bot changed the title spec(LTX25-DEVICE-SEAM-SIBLING): the sibling that never adopted the device seam, and the gate that cannot see it (#659, #660) fix(LTX25-DEVICE-SEAM-SIBLING): the third question, and a leakage bucket that is a property rather than a spelling (#659, #660) Aug 14, 2026
mudler added 5 commits August 14, 2026 13:07
…, and the test that ruled it out could not see it (#659, #660)

Review repair for PR #671 at 094ac9e. Four findings; the core work the review
reproduced (branch orthogonality, the by-hash baseline, both source mutations) is
untouched.

F1 (High). THE BUCKET MISSED THE PUREST FORM OF THE DEFECT.

  (vt::DeviceType)d    -> dev_cast 1, RED   (what M29 asserted)
  (vt::DeviceType)1    -> dev_cast 0, GREEN <-- MISSED
  (vt::DeviceType)-1   -> dev_cast 0, GREEN <-- MISSED

The C-style alternative's trailing lookahead admitted only [A-Za-z_(], and `1` is
a digit. Naming a device by its literal enum value is exactly what this bucket
exists to police, so the one form it could not see was the one form it was for.

What makes it High rather than a nit: the spec and the PR body both assert the
M29 discriminators cost nothing, and they cost this - while M29's own "did not
cost the real thing" assertion used an IDENTIFIER operand, so the test could not
detect the gap it was written to rule out. A guard that certifies itself is the
exact disease this row exists to fix, reproduced inside the row's own instrument.
M29 now pins the literal FIRST, then the signed literal, then the identifier, all
in the same file as the false-positive fixture.

Re-derived rather than taken from the review: over src/vllm + include/vllm, 720
files, positive control \bDeviceType\b = 162 matches in the same command,
admitting `0-9+-` adds ZERO hits and loses none. The only raw match under either
pattern is platform.cpp:85's allowlisted registry-walk inverse.

F3 (Medium). THE DOCSTRING UNDER-REPORTED, AND THREE CAST KEYWORDS WERE DEAD.
Four more plain spellings read GREEN in SCANNED files, each compile-checked as
legal C++ before being called a blind spot, and each now closed:

  static_cast<::vt::DeviceType>(raw)        global-scope qualification
  static_cast<enum vt::DeviceType>(raw)     elaborated-type-specifier
  vt::DeviceType dt{raw};                   list-init in a DECLARATION (M23
                                            caught only the unnamed temporary)
  *reinterpret_cast<vt::DeviceType*>(&raw)  pointer punning

The pointer target is what makes the keyword list honest. reinterpret_cast,
const_cast and dynamic_cast TO a scoped enum are ill-formed - compile-checked,
all three rejected, with static_cast as a live control that compiles - so before
this change those three keywords could only ever have matched code that does not
build. They created an appearance of coverage the pattern did not have. Matching
a pointer target makes them live instead of dropping them.

MEASURED, NOT ASSUMED. My first cut of the declaration form accepted `(` as well
as `{` and introduced THREE false positives on the real tree - every function
DEFINITION returning DeviceType, including MiniMaxH3VideoDeviceType and
ResolveExplicitDeviceType. The declarator form takes `{` only, and that costs
nothing real: `vt::DeviceType dt(raw)` is ill-formed, there being no implicit
int -> scoped-enum conversion. M34 pins that negative. Final pattern: zero new
hits, zero lost hits.

Residual blind spots STILL NAMED in the docstring, per the row's own standard:
type aliases, MACROS and template parameters resolving to DeviceType;
bit_cast/memcpy/union punning (the pointer-cast spelling is now caught, these
three are not, because no spelling of the target type appears at the site); the
unscanned src/vt/ leg; and that nothing type-checks the operand - which is also
why a pointer target counts, since const_cast<DeviceType*>(p) removes const
rather than converting, and buys its exemption the same way.

F2 (Medium). THE ROW ADDED A TEST THAT FAILS ON THE BUILD CLASS #659 SERVES.
test_minimax_h3_video_fold.cpp's `have_accelerator` asked two of the three
questions (device_type() != kCPU && TryGetBackend() != nullptr). On Metal or
Tenstorrent both are true, so the test took the `== accelerator` arm while the
source CORRECTLY refused, and the refusal surfaced as an uncaught exception.
Proven by mutation, not deduced - a DecliningPlatform registered in the XPU slot,
production code untouched:

  before  :247 ERROR: CHECK( MiniMaxH3VideoDeviceType(1) == accelerator ) THREW
          "... DECLINES the architecture 'minimax-h3' ..."
          6 cases | 5 passed | 1 failed | 137 assertions | FOLD_EXIT=1
  after   6 cases | 6 passed | 0 failed | 137 assertions | FOLD_EXIT=0

So the row shipped a false RED on precisely the partial-backend build it was
written to protect, invisible on the CPU and CUDA boxes that run the gates -
which is this row's own thesis about #659, turned against its own test. The
predicate is now three-way and asserts WHICH refusal, because a right refusal for
a wrong reason is a wrong diagnosis that reads as a right one.

The review also ruled on the earlier brief-vs-spec disagreement, and the spec
won: keeping fold:162's `== kCUDA` would have required the source to still return
kCUDA on a CPU-only build - the defect itself. The build-conditional form stays;
F2 was a bug in the predicate, not in that decision.

F4 (Low). AN ASSERTION THAT ONLY CHECKED ABSENCES. The "COMPLETE backend is not
refused" case checked that DECLINES and supports_model_architecture were absent
and never positively asserted the load reached the missing checkpoint, so it
would pass on any OTHER wrong failure. Mutation (an unrelated Fail() planted
after the capability clause): the two absence checks BOTH passed and only the new
assertion caught it - 4 cases | 3 passed | 1 failed, 24 | 23 passed | 1 failed,
the failure at :178 on the /nonexistent/ path. Restored by sha256.

F6. THE DECLINE CONSEQUENCE INVERTS THE CITED PRECEDENT, recorded in the spec, no
code change. model_loader.cpp:97's capability question lives on the kAuto path,
whose answer to a decline is to fall through to :103 and serve on CPU;
metal.cpp:65-69 states that policy in as many words. Both diffusion lanes THROW.
That is correct - device = 1 is an explicit accelerator request, and :71-72
already says an explicit accelerator must fail loudly rather than silently serve
on CPU - but the PR described the change as mirroring the precedent, and it
mirrors the QUESTION while inverting the CONSEQUENCE. Both halves are the seam's
own, from two different paths of it. Also recorded: vulkan.cpp does NOT override
supports_model_architecture, so a partial Vulkan build still binds and dies.
Residual, not this row's to fix.

GATE. CPU build, no CUDA. BUILD_EXIT=0 throughout, zero "No space left"/"BFD
assertion" in any build log.

  tests/scripts/test_device_leakage.py  37 -> 42 tests, OK, exit 0.
    RED-first against the HEAD checker: 5 failures (M29 strengthened, M30-M33).
    M34 is green both before and after by construction - it guards a false
    positive the change could have introduced, not one it fixes.
  check-device-leakage on the real tree: dev_cast=0, total 32 == baseline 32.
    scripts/device-leakage-baseline.json is UNTOUCHED by this commit.
  test_minimax_h3_video_fold  6 / 137 -> 6 / 137, UNCHANGED.
  test_diffusion_device_seam  4 / 23  -> 4 / 24, +1 = the F4 assertion, exactly.

Both source mutations restored and verified by sha256, not by git status.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: Claude:claude-opus-5 [ClaudeCode]
The branch was 16 commits behind origin/main (7b8919d) and the PR read
CONFLICTING. Sole conflict: .agents/roadmap_v1.md.

RESOLVED BY KEY, NOT BY THREE-WAY. roadmap_v1.md is a keyed record, so AGENTS.md
forbids accepting an automatic merge of it: main's version was taken WHOLESALE
and this row's two scoped edits - the #659 and #660 issue rows - reapplied onto
it by key. Verified afterwards that the file differs from origin/main on exactly
two lines, both owned keys, with the line COUNT unchanged so no row was added or
dropped. Main had inserted a row above them (branch line 197 -> main line 198),
which is precisely the drift that makes an automatic three-way unsafe here.

docs/USAGE.md and tests/CMakeLists.txt auto-merged; both checked to carry BOTH
sides - this row's test_diffusion_device_seam registration and main's four new
indextts2 registrations are all present, and no conflict marker survives in any
of the three files.

Re-gated after the merge rather than trusting the pre-merge result: a clean merge
is not a merge that builds.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: Claude:claude-opus-5 [ClaudeCode]
…the pattern named one sigil (#659, #660)

FOLLOWING_AGENTS_PROTOCOL

Review finding F5, and the third time this row's own thesis has come back for
its instrument. `dev_cast`'s docstring says the bucket is "anchored on the
TARGET TYPE, not on the operand and not on one cast keyword", and lists
`std::bit_cast` as unreachable "because no spelling of the target type appears
at the conversion site". Both claims were false for spellings that DO write the
target type at the conversion site and scored ZERO. A checker's own message is
the authority on what it enforces (AGENTS.md), so an over-claiming message is a
defect in the gate, not in the prose.

Nine spellings, every one compile-verified legal (g++ -std=c++20 -Wall -Wextra,
exit 0 — read, not assumed), each 0 before and 1 after:

  reinterpret_cast<vt::DeviceType&>(raw)      reference target; the standard
                                              DEFINES it as M33's pointer pun
  static_cast<vt::DeviceType const>(d)        east const
  static_cast<vt::DeviceType const&>(t)       east const + reference, the form
                                              that compiles with NO warning and
                                              so survives a -Werror build
  (vt::DeviceType const)d                     east const, C-style
  (vt::DeviceType)*cursor                     the WIRE-DECODE spelling the
                                              docstring itself names as the
                                              expected DSR-ALLOW case
  (vt::DeviceType)~mask / )!flag              the same trailing-class hole
  reinterpret_cast<vt::DeviceType**>(p)       `\*?` is ONE star
  std::bit_cast<vt::DeviceType>(raw)          spells the target in full

Three edits: the named-cast target takes cv on either side of the name and a RUN
of `*`/`&`; the C-style trailing class admits `*~!`; `bit_cast` joins the cast
keywords. `&` is deliberately NOT admitted after a C-style `)` — `) &` and
`) &&` are ref-qualifiers on a member declarator, which is the false positive the
trailing guard exists to reject, so the C-STYLE pointer pun `*(vt::DeviceType*)&x`
stays blind and is now NAMED as blind with the reason that is true of it. The
blind-spot list no longer shares one reason across entries it is false for.

Measured, not asserted. Over 740 files in `src/vllm` + `include/vllm`, with
`\bDeviceType\b` = 162 matches as a POSITIVE CONTROL in the same command: 0 new,
0 lost. Shipped hits 1, widened hits 1 — the same allowlisted
`platform.cpp:85` registry-walk inverse. dev_cast stays 0, total stays 32, the
baseline is untouched.

M35-M40 pin it, one mutant per newly-closed spelling, each sub-spelling asserted
INDIVIDUALLY (the M29 shape) because a mutant that only exercises the case the
pattern was tuned for is a guard that certifies itself. RED-before is real: with
the pattern reverted to its pre-repair value in-process, M35-M39 all go RED while
M20, M33 and M40 stay GREEN, so a blanket failure cannot pass for five findings.
M40 is the negative — pointer- and reference-returning declarations, ref- and
rvalue-ref-qualified members with a SPACE before the paren, volatile members,
`std::vector<vt::DeviceType*>` — all still 0.

Issues: #659, #660. Campaign: #644.
Spec: .agents/specs/ltx25-device-seam-sibling.md

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:claude-opus-5[1m] [Claude Code]
FOLLOWING_AGENTS_PROTOCOL

29 commits behind, and `git merge-tree` conflicted, so this is a real re-merge
rather than a fast-forward. One conflict, in `tests/CMakeLists.txt`: main added
`test_ltx2_image_cond` (row LTX25-IMAGE-COND, `c629b5d0f`) at the same insertion
point this row added `test_diffusion_device_seam`. Both sides are pure additions;
resolved by keeping BOTH, main's block byte-for-byte first and this row's entry
after it, so the resolved file differs from `33f570ea9` by exactly the seven
lines this row owns (verified with `git diff 33f570e -- tests/CMakeLists.txt`).

The keyed records were NOT taken on the auto-merge's word. `.agents/roadmap_v1.md`
was compared key-by-key against main: 264 keys on both sides, 0 added, 0 removed,
exactly `#659` and `#660` changed, and 0 differing non-table lines.
`docs/USAGE.md` differs by exactly this row's one paragraph in the LTX-2.5 device
section. `docs/FEATURES.md`, `docs/STATUS.md` and `docs/BENCHMARKS.md` are
untouched, so #769's duplicated `Safetensors direct load` key is neither fixed
nor multiplied here.

`src/vllm/multimodal/ltx2_video.cpp` auto-merged with the #659 guard intact, and
the merged tree still has exactly ONE raw `dev_cast` hit -- the allowlisted
`platform.cpp` registry-walk inverse -- so the baseline needs no touching.
Merge-tree CLEAN is not merge-tree BUILDS, so the gate is re-run on the merged
tree rather than inferred from it.

Issues: #659, #660. Campaign: #644.

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:claude-opus-5[1m] [Claude Code]
…he merge, and record F5 (#659, #660)

FOLLOWING_AGENTS_PROTOCOL

`9f2b9bb9a` moved `tenstorrent.cpp`'s `supports_model_architecture` from `:52` to
`:55`. This branch cited `:52` in four places, all of which became wrong the
moment the re-merge landed:

  src/vllm/multimodal/ltx2_video.cpp
  tests/vllm/multimodal/test_diffusion_device_seam.cpp
  .agents/specs/ltx25-device-seam-sibling.md  (x2)

Re-derived on the MERGED tree, not copied from the review: `tenstorrent.cpp:55`,
and `metal.cpp:70`, `interface.h:263`, `model_loader.cpp:97` all still hold.

Every `path:NN` anchor in this row's files was then resolved mechanically rather
than spot-checked — 103 distinct anchors — and the only ones that do not land on
live code are upstream Python paths (not in this tree) and the two
`examples/*/main.cpp` citations in `minimax_h3_video.cpp:3-4`, which carry their
own `@ fc636c7` and are therefore provenance rather than drift. `#794` records
the rest of this lane's mis-cited anchors and is not widened here.

The one anchor this row OWNS that was drifting the same way is
`minimax_h3_video.cpp:221-226` in §0 and in the `#660` roadmap key: it describes
the defect this row REMOVES, so an unanchored line number there points at a blank
line the moment the row lands. Anchored on the spec's base SHA `11cc1d589`, where
`git show` resolves it to exactly the `static_cast<vt::DeviceType>(device)` the
issue is about.

The spec gains a `## Findings from review round 2` section carrying F5's nine
spellings, their compile proofs, the 0-new/0-lost measurement with its positive
control, and — stated as a finding rather than buried — the ONE spelling that
stays blind and the reason that is true of it. `## Now` is refreshed; the row
stays `READY`, so no lifecycle surface is owed.

The `#660` roadmap key is corrected from "TEN spellings" to nineteen, since a
record that under-states its own gate is the same class of defect this row keeps
finding. Verified keyed: 264 keys on `33f570ea9` and 264 here, 0 added, 0
removed, exactly `#659` and `#660` changed, 0 differing non-table lines.

Issues: #659, #660. Campaign: #644.

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:claude-opus-5[1m] [Claude Code]
@localai-bot

Copy link
Copy Markdown
Collaborator Author

F5 repaired, re-merged onto 33f570ea9, anchors re-derived

Head moves from 074ef1420. Three commits: the checker repair, the merge, the anchor/record round.

F5 — the docstring named the target type, the pattern named one sigil

The review's finding was one spelling. Deriving it from the property rather than from the example turned up nine, all of which write the target type at the conversion site — the very thing the docstring said the bucket is anchored on — and all of which scored 0:

spelling why it slipped before after
reinterpret_cast<vt::DeviceType&>(raw) reference target; the standard defines it as M33's pointer pun 0 1
static_cast<vt::DeviceType const>(d) east const 0 1
static_cast<vt::DeviceType const&>(t) east const + reference — compiles with no warning, so it survives -Werror where the prvalue form trips -Wignored-qualifiers 0 1
(vt::DeviceType const)d east const, C-style 0 1
(vt::DeviceType)*cursor trailing class admitted a sign, not a dereference — and this is the wire-decode spelling the docstring itself names as the expected DSR-ALLOW case 0 1
(vt::DeviceType)~mask same hole 0 1
(vt::DeviceType)!flag same hole 0 1
reinterpret_cast<vt::DeviceType**>(p) \*? is one star 0 1
std::bit_cast<vt::DeviceType>(raw) the docstring's own reason ("no spelling of the target type appears at the conversion site") is false for it 0 1

Every one is compile-verified legalg++ -std=c++20 -Wall -Wextra -fsyntax-only, exit 0, individually — because a "miss" that does not compile is not a miss.

Three edits: the named-cast target takes cv-qualifiers on either side of the name and a run of */&; the C-style trailing class admits *~!; bit_cast joins the cast keywords.

What stays blind, and why the docstring now says so per-entry

& is deliberately not admitted after a C-style ): ) & and ) && are ref-qualifiers on a member declarator, which is exactly the false positive the trailing guard exists to reject, and it cannot tell void note (vt::DeviceType*) & from a pun. So the C-style pointer pun *(vt::DeviceType*)&x remains blind and is now named as blind with the reason true of it. The old blind-spot list gave one shared reason to three entries and that reason was false for one of them; each entry now carries its own.

Measured, with the positive control in the same command

Over 760 files in src/vllm + include/vllm on the merged tree, \bDeviceType\b = 162 matches as the positive control:

files examined                 : 760
POSITIVE CONTROL \bDeviceType\b: 162 matches over the same file set
dev_cast raw hits  SHIPPED     : 1
dev_cast raw hits  REPAIRED    : 1
NEW  (repaired - shipped)      : 0
LOST (shipped - repaired)      : 0
    = src/vllm/platforms/platform.cpp:85: static_cast<DeviceType>

dev_cast stays 0, total stays 32, device-leakage-baseline.json untouched this round.

M35-M40, each sub-spelling asserted individually

RED-before is real rather than narrated: with the pattern reverted in-process to its pre-repair value, M35-M39 all go RED while M20, M33 and M40 stay GREEN — so a blanket failure cannot pass for five findings.

M35  reverted-pattern verdict = RED    expected RED    -> ok
M36  reverted-pattern verdict = RED    expected RED    -> ok
M37  reverted-pattern verdict = RED    expected RED    -> ok
M38  reverted-pattern verdict = RED    expected RED    -> ok
M39  reverted-pattern verdict = RED    expected RED    -> ok
M20  reverted-pattern verdict = GREEN  expected GREEN  -> ok
M33  reverted-pattern verdict = GREEN  expected GREEN  -> ok
M40  reverted-pattern verdict = GREEN  expected GREEN  -> ok

M40 is the negative the widening could have cost: pointer- and reference-returning declarations, ref- and rvalue-ref-qualified members with a space before the paren, volatile members, std::vector<vt::DeviceType*> — all still 0.

Re-merge

29 behind, merge-tree conflicted. One conflict, tests/CMakeLists.txt: main added test_ltx2_image_cond at the same insertion point this row added test_diffusion_device_seam. Both pure additions, both kept, main's block byte-for-byte first. git diff 33f570ea9 -- tests/CMakeLists.txt is exactly this row's seven lines.

Keyed records were not taken on the auto-merge's word. .agents/roadmap_v1.md: 264 keys on both sides, 0 added, 0 removed, exactly #659 and #660 changed, 0 differing non-table lines. docs/USAGE.md differs by exactly this row's one paragraph. FEATURES.md / STATUS.md / BENCHMARKS.md untouched, so #769's duplicated Safetensors direct load key is neither fixed nor multiplied.

Anchors

9f2b9bb9a moved tenstorrent.cpp's supports_model_architecture :52 → :55. All four citations corrected, re-derived on the merged tree. metal.cpp:70, interface.h:263, model_loader.cpp:97 re-derived and still hold. All 103 distinct path:NN anchors in this row's files resolved mechanically; the only non-resolving ones are upstream Python paths and the two examples/*/main.cpp citations that carry @ fc636c76 and are provenance rather than drift. #794 is not widened here. minimax_h3_video.cpp:221-226 — the line this row removes — is now anchored on the spec's base SHA 11cc1d589, where git show resolves it to the exact static_cast.

mudler added 3 commits August 14, 2026 22:49
Review round 3 of #671 found this row's own thesis in the checker's
message for a fourth time. This time it sat inside a blind-spot entry.
`check-device-leakage.py:78-83` covered "a C-style cast to a pointer or
reference" under one reason: "both are `)` followed by `&`". That reason
is true of `*(vt::DeviceType*)&x`. It is false of
`(vt::DeviceType&)raw`, whose next character is an identifier. The
reviewer built the feared false positive instead of accepting the
argument, and the entry split cleanly. Widening only inside the parens
catches the reference form and `(vt::DeviceType*)vp` at zero new hits.
The negatives `void note (vt::DeviceType*) &;` and `... &&;` stay at
zero, because `&` remains out of the trailing class. So the trailing
exclusion earns its place, the C-style pointer pun stays blind for a
reason of its own, and the one entry becomes two.

Eight spellings close here, counted rather than rounded. A compiler proved each one legal (g++ 13.3,
`-std=c++20 -Wall -Wextra -fsyntax-only`, exit 0), and each measured 0
before and 1 after on its own. The C-style targets
`(vt::DeviceType&)raw` and `(vt::DeviceType*)vp` needed the run inside
the parens. The declaration form carried no cv-group at all, so
`vt::DeviceType const d{raw}`, `vt::DeviceType volatile d{raw}` and
`struct Cfg { vt::DeviceType const kD{1}; }` all scored 0. That is a
fourth place a cv-qualifier sits, while M36 asserted "all three places".
That is M29's self-certifying enumeration, one round later.
`std::bit_cast<vt::DeviceType, std::uint8_t>(raw)` slipped because
`bit_cast` is a function template with two parameters, and terminating
the target at `>` assumed the one-argument shape of the four real casts.
`reinterpret_cast<vt::DeviceType* const&>(p)` slipped because the `[*&]`
run stopped at the first cv-qualifier.
`__builtin_bit_cast(vt::DeviceType, raw)` slipped because it is not a
template-id at all.

One pre-existing false positive closes rather than grows. `sizeof
(vt::DeviceType) + 1` already scored 1. `sizeof` is not glued to its
paren, so the identifier discriminator passes, and `+` sits in the
trailing class. Admitting `*` inside the parens would extend that miss
to the pointer spelling. A `sizeof` or an `alignof` converts nothing, so
the pattern excludes both. M45 pins it and goes RED against the shipped
pattern.

The rest of this change stops widening and makes the claim honest. Four
rounds each found a spelling the previous round's message already
claimed, and every one closed at zero hits, so none was a coverage
trade. There was simply another spelling each time. The docstring now
claims only measured behavior. It enumerates the forms it matches. It
gives every blind spot a reason true of that entry alone. The list holds
the C-style pointer pun, a character-literal operand, which the comment
stripper blanks to whitespace before the pattern runs, and `memcpy` or a
union, whose reason becomes "no cast expression to anchor on" rather
than the `bit_cast` reason they wrongly carried. It then states the
residual as a property. A text checker enforces a set of spellings, so a
green `dev_cast` reports that none of the listed spellings is present,
and never that no integer becomes a DeviceType here. The structural
answer is an AST-level check, filed as #828 with all four rounds as its
evidence, and deliberately not built here.

M41-M46 add one mutant per newly closed spelling, each asserted on its
own. M46 is a new shape. It pins that the declared blind spots stay
blind, with `(vt::DeviceType)buf[0]` as a positive control in the same
test. A later widening that closes one of them turns M46 RED, which
forces the message to change in the same commit. RED-before is measured,
not narrated. With `RE_DEVTYPE_CAST` reverted in process to `79ebbce42`,
exactly six mutants go RED (M36, M41-M45), and M20, M33, M40 and M46
stay GREEN, so one blanket failure cannot pass for six findings. The
applied pattern reds none of them. The suite grows 48 -> 54.

The tree measurement is re-derived, not quoted. The scanned set is 760
files across `src/vllm` and `include/vllm`, not the 740 that the roadmap
row and this spec both claimed. The same pass measured `\bDeviceType\b`
= 162 and `\bkCUDA\b` = 18 as positive controls, and `bit_cast` = 0
against `static_cast` = 9950. The result is 0 new and 0 lost. `dev_cast`
stays at its single allowlisted `platform.cpp:85` registry-walk inverse,
the total stays 32 against a baseline of 32, and this commit does not
touch `scripts/device-leakage-baseline.json`.

This commit's body follows `.agents/style/commits.md`, which lands in
the merge below it. The prose inside `check-device-leakage.py` and the
spec keeps the em dashes and semicolons of the surrounding text, which
`.agents/style/prose.md` now discourages. Rewriting that file's voice is
not this row's scope, and a dash-free island inside a docstring written
in the older voice would read worse than either choice alone. The
deviation is stated here so a reviewer can rule on it rather than
discover it.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:claude-opus-5 [claude-code]
The branch sat 17 commits behind `origin/main`, and the last full gate ran
from the previous merge base. This merge re-bases the row's evidence on
the tree it will land in.

None of main's 17 commits touches this row's files. `tests/CMakeLists.txt`
gains 4 registrations on main and 1 on this branch, so the merged count is
456 and neither side moved the other's entry. `.agents/roadmap_v1.md` is a
keyed record: main still carries the pre-branch text for the #659 and #660
keys, this branch carries the current text, and every other key comes from
main unchanged.

`.agents/style/commits.md` and `.agents/style/prose.md` arrive in this
merge. The commit below it follows the commit guide.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:claude-opus-5 [claude-code]
… SHA (#660)

The round-3 repair corrected "740 files" to 760. Re-running the same
measurement on the merged tree returned 765, because main added five
source files under `src/vllm` and `include/vllm` in the 17 commits this
branch just merged.

That is the interesting part, so this commit records it rather than
silently overwriting one number with another. A file count of one tree,
stored inside another file, is a measurement that every unrelated pull
request invalidates. AGENTS.md names that shape under "never store a
measurement of one file inside another file". The 740 was not wrong when
someone wrote it. It rotted.

Both records now carry the SHA the number was measured at. A reader who
finds a mismatch then knows to re-derive the count instead of doubting
the rest of the section. The durable statement is the pair of positive
controls, which the merge left unchanged: `\bDeviceType\b` = 162 and
`\bkCUDA\b` = 18 in the same pass, `dev_cast` still at its single
allowlisted `platform.cpp:85` registry-walk inverse, and 0 new and 0 lost
against the shipped pattern.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:claude-opus-5 [claude-code]
@localai-bot

Copy link
Copy Markdown
Collaborator Author

Rebuilt and gated at 7502004aa — this pull request needs its head repointed

The conflict and the red are both fixed, but the fix cannot reach this pull
request's head without a force update of row/LTX25-DEVICE-SEAM-SIBLING, which
this session does not hold authority for and did not work around. The gated head
is 7502004aa on row/LTX25-DEVICE-SEAM-SIBLING-REBUILD, pushed with a
plain non-forcing push. The body above describes that SHA.

Two separate reasons this could not have landed as bf8bb745b.

  1. .agents/roadmap_v1.md conflicted. It is a keyed record, so main's version was
    taken wholesale — and the scoped edits were then not reapplied, because
    Issue intake is a merge lock, and 33 of its 185 rows name no owner, so filing an issue defers the fix #840 moved the ## Open issues table to the append-only
    .agents/issue-index.md, where a row is appended and never edited. Both
    record files are now byte-identical to main (0-line diff each) and
    check-issue-index-append-only.py is green.
  2. Four commits — 78f401796, b73d4576f, 966e4883f, 79ebbce42 — carried
    Assisted-by: AGENT:claude-opus-5[1m] [...]. Brackets are the TOOL slot, so
    the strict per-commit walk CI runs over base..head fails on all four
    regardless of the tip. Only those four message lines were rewritten; the
    pre-merge tree is byte-identical to bf8bb745b (same tree object
    6ab028f8c) and the topology is unchanged.

A third, which is why the body above was rewritten rather than patched: the
previous body itself failed the trailer contract — no bare
FOLLOWING_AGENTS_PROTOCOL paragraph and no trailer block. Since
squash_merge_commit_message = PR_BODY, that is the landed commit message, and
CI runs check-commit-trailers.py --message-file --filled on it. Worth knowing
for every other pull request here: a markdown --- rule anywhere before the
trailer block silently kills them, because git interpret-trailers treats ---
as the patch separator and stops reading.

Gate on 7502004aa: CONFIGURE_EXIT=0, BUILD_EXIT=0, a full 1416-edge
rebuild, 0 : error:, 0 No space left, 0 BFD assertion, ctest -N 478,
CTEST_EXIT=0, 100% tests passed, 0 tests failed out of 478. Six mutations, all
of which built and all of which went RED. Details in the body.

Merge-tree against the current origin/main (b3d0f3ed5) exits 0, so the rebuild
branch is conflict-free against a tip three commits newer than the one it was
gated on; those three commits touch none of its 11 files.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:claude-opus-5 [claude-code]

@localai-bot

Copy link
Copy Markdown
Collaborator Author

Closing in favour of #898, which is this branch rebuilt onto current main.

Four commits here (78f401796, b73d4576f, 966e4883f, 79ebbce42) carry Assisted-by: AGENT:claude-opus-5[1m] [...]. The brackets are the tool slot only, so the model id is malformed, and CI walks trailers per commit over PR_BASE..PR_HEAD — those four fail regardless of what the tip looks like. A message cannot be corrected in place without rewriting history, and no force variant is used on this repository, so the branch was replaced rather than force-updated.

The content is unchanged. The pre-merge tree object is byte-identical to bf8bb745b — same tree 6ab028f8c — and the topology is unchanged. Only the four Assisted-by: lines differ. I verified the replacement range myself rather than taking the report: check-commit-trailers, check-doc-checkpoint, and check-commit-style all exit 0 over merge-base..7502004aa.

Two findings from the rebuild that outlive this PR:

A markdown --- rule anywhere before the trailer block silently destroys the trailers. git interpret-trailers treats --- as the patch separator and stops reading there. Since squash_merge_commit_message = PR_BODY, that makes a PR body with a horizontal rule fail the trailer contract while looking correct to a reader. This PR body had no trailer block at all, which is a separate defect, now fixed in #898.

Three of the five stale file:line anchors were already stale at bf8bb745b — shifted by this PR's own later commits, not by main. minimax_h3_video.h:63:69, ltx2_video.cpp:545-548:562-565, and an in-source citation :549-580:566-610. Anchors rot inside a single PR, which is why #898 asserts each one matches exactly once rather than merely existing.

FOLLOWING_AGENTS_PROTOCOL

localai-bot pushed a commit that referenced this pull request Aug 15, 2026
… not fail, and the H3 half was unreached (#659, #660, #828)

Repairs the eight findings of the fresh review of `7502004aa`. The review found
the change correct and the gate honest; every finding is an untestable
assertion, a reachability gap, or a record that claimed more than it had.

F1. `test_diffusion_device_seam.cpp` asserted `msg.find(kLtx2VideoFamily)`, and
`Fail()` in ltx2_video.cpp prefixes EVERY message with "ltx-2.5 video: ", which
contains that string verbatim. The assertion was satisfied by boilerplate on
every refusal the file can throw — including the two the same case asserts it is
NOT — and no defect in the message could make it fail. Measured: substituting
"<redacted>" for the family name in the DECLINES `Fail` BUILT and left the suite
GREEN. Both lanes now assert the QUOTED SLOT, `architecture '<family>'`, through
one `QuotedArchitecture()` helper. The H3 side escaped only because its prefix
spells the family with an underscore against a hyphenated family, which is a
coincidence of spelling and not a property; it is hardened the same way.

F2. `## Nothing lands dead`: the H3 half had a production chain and nothing
entering through it. Replacing `MiniMaxH3VideoEngine::Load`'s
`MiniMaxH3VideoDeviceType(params.device)` with the pre-row
`params.device == 0 ? kCPU : kCUDA` BUILT and left both suites GREEN — the fold
suite's CUDA-load case does enter through `Load`, but its FakeCudaPlatform
reports kCUDA, so the seam and the cast return the same answer and it cannot
separate them. Two H3 cases now enter at `LoadVideoEngine` against the declining
PartialXpuPlatform, and the two LTX cases moved there too, so both lanes are
entered at the same production point and neither skips the registry hop. That
mutation is now RED: 6 cases, 4 passed / 2 failed, and the two failures are the
new cases.

F3. The anchor sweep that claimed completeness was incomplete, and this pull
request's own edits are what falsified it. Six citations were stale, all rotted
inside this branch, two of them seven and fifteen lines from the `:54` citation
that SHA-anchors itself with exactly the reasoning that applies to them. Four
more range citations started or ended on the wrong line. All corrected; the
completeness sentence is withdrawn with its reason and replaced by a statement
of method and of what the method cannot see.

F5. `dev_cast` fires on a plain copy-initialisation, `vt::DeviceType d{other}`,
which converts nothing. It is not narrowed, because `vt::DeviceType d{raw}` is
the real conversion M36/M41 pin and is textually identical. The docstring gains
a third section, WHAT dev_cast OVER-MATCHES, with the cost stated — the baseline
is a hard 0, so the first such line under the scan roots fails the ratchet and
needs DSR-ALLOW — and M47 pins it in the M46 shape with the value-init as the
negative control in the same test.

F6. Four comments still called the video ABI selector CUDA, including the public
`vllm_video_model_params.device` field and `minimax_h3_video.h:88` nineteen lines
below the docstring this row rewrote. `include/vllm/config/device.h:19` repeats
the same sentence and is corrected with them. `docs/USAGE.md` gains the paragraph
that owes.

F7. #828 was named in product code and indexed nowhere. Appended to
`.agents/issue-index.md` with no owning row and listed under the spec's new
`## Owed`, which is the shape the protocol defines for an issue a row files and
does not fix.

F4 and F8 are a `## Now` pointing at closed PR #671 and the pre-rebuild branch,
and one inverted sentence in the test header.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:claude-opus-5 [claude-code]
localai-bot added a commit that referenced this pull request Aug 15, 2026
…ket that is a property rather than a spelling (#659, #660) (#898)

Rebuild of #671 onto current `main`, plus the repair of the fresh review of `7502004aa`. #671 is CLOSED; this is the branch that carries the work. The original rebuild was needed because four commits carried `Assisted-by: AGENT:claude-opus-5[1m] [...]`, and the brackets belong to the tool slot only, so CI's per-commit walk over `PR_BASE..PR_HEAD` failed on all four regardless of the tip. A new branch rather than a force update, because no force variant is used here.

Implements the committed spec [`.agents/specs/ltx25-device-seam-sibling.md`](.agents/specs/ltx25-device-seam-sibling.md).

Issues: #659, #660. Files and does not fix: #828. Campaign: #644.

**The review of `7502004aa` returned FAIL on a change it found correct and a gate it found honest.** Every one of its eight findings was an untestable assertion, a reachability gap, or a record that claimed more than it had — and every one is this row's own thesis pointed back at the row. They are repaired in `f0b465029`, `0600a7ef1` and `4e7a708ad` (the READER ANCHORS re-derivation), each verified on this branch with `git merge-base --is-ancestor`; see "Review round 4" below, which also corrects two claims this body previously made and the review disproved.

## The two defects

**#659 — the seam was adopted, its companion guard was not.** `11cc1d589` routed
LTX-2.5's device question through the platform seam and asked two of the three
questions its own cited precedent asks. `src/vllm/entrypoints/model_loader.cpp:98`
also asks `plat.supports_model_architecture(architecture)`, which exists so a
PARTIAL backend can decline by name. `src/vllm/platforms/metal.cpp:70` and
`src/vllm/platforms/tenstorrent.cpp:55` are the only two overriders and both
declare `{"OPTForCausalLM", "Qwen3ForCausalLM"}`. On those builds a `device = 1`
LTX-2.5 load *was* refused by name and had become a queue bind that dies later
inside a kernel. CUDA is unaffected, which is why it is invisible on the gate box.

**#660 — the gate that certified it is a token grep.**
`scripts/check-device-leakage.py`'s `kcuda` bucket is `\bkCUDA\b`.
`src/vllm/multimodal/minimax_h3_video.cpp:225` (pre-change) wrote
`static_cast<vt::DeviceType>(device)` against `kCUDA = 1` and scored **zero**,
while `tests/vllm/models/test_minimax_h3_video_fold.cpp:162` spelled the token
honestly and **was** counted. The gate read the confession and missed the act.

## The load-bearing claim: `dev_cast` is a property, not a spelling

A bucket that grepped `static_cast<vt::DeviceType>` would close the one site we
found and be the same defect one spelling later. The bucket is anchored on the
**target type**, matched over the whole comment-stripped text, and is asserted
RED for **ten spellings that are not in the tree**, each individually:

| Mutant | Spelling planted | Added |
|---|---|---|
| M20 | C-style `(vt::DeviceType)d` | |
| M21 | functional `vt::DeviceType(d)` | |
| M22 | intermediate `int` + unqualified `static_cast<DeviceType>(raw)` | |
| M23 | brace `vt::DeviceType{d}` (unnamed temporary) | |
| M24 | cast split across two lines by clang-format | |
| M29 | C-style past the parameter-declaration discriminators, with a **literal** `)1`, a **signed literal** `)-1` and an identifier operand | review |
| M30 | global-scope `static_cast<::vt::DeviceType>(raw)` | review |
| M31 | elaborated `static_cast<enum vt::DeviceType>(raw)` | review |
| M32 | list-init in a **declaration**, `vt::DeviceType dt{raw}` | review |
| M33 | pointer punning `*reinterpret_cast<vt::DeviceType*>(&raw)` | review |

Each goes RED with `DSR REGRESSION in bucket 'dev_cast': 1 > baseline 0` — except
M29, which appends its three operand kinds to the same false-positive fixture and
so reds at `1 >`, then `2 >`, then `3 > baseline 0`, proving the discriminators
cost none of them.

M22 is the one that separates "anchored on the target type" from "anchored on
the operand": the thing cast is neither a literal nor the parameter, and the
qualifier is dropped.

**Negatives, so the bucket stays usable:** M25 (`static_cast<int>(t)` and
`static_cast<size_t>(t)` — the safe direction, and how the seam indexes its own
registry — do not count), M26 (prose and string literals do not count), M27 (the
platform registry walk is allowlisted at *exactly* one; a second cast in that
file still fails), M28 (`DSR-ALLOW` exempts a `dev_cast` and is printed loudly),
M29 (a parameter declaration is not a cast).

**Negative M34 (review):** a function *definition* whose return type is
`DeviceType` is not a conversion. Not hypothetical — the first cut of M32's
declaration form accepted `(` as well as `{` and produced **three false positives
on the real tree**, including `MiniMaxH3VideoDeviceType` and
`ResolveExplicitDeviceType`. The declarator form takes `{` only, which costs
nothing real because `vt::DeviceType dt(raw)` is ill-formed.

**Residual blind spots, recorded in the checker's own docstring** because a
checker's message is the authority on what it enforces: casts through a type
alias, a **macro**, or a template parameter; `bit_cast`/`memcpy`/union punning
(the *pointer-cast* spelling is now caught — these three are not, because no
spelling of the target type appears at the site); conversions inside the
unscanned `src/vt/` device leg; and the fact that nothing type-checks the
operand, so the bucket flags every cast *to* `DeviceType` and relies on
`DSR-ALLOW` for a legitimate wire-format decode — which is also why a pointer
target counts, since `const_cast<DeviceType*>(p)` removes const rather than
converting, and buys its exemption the same way.

## `metal.cpp` / `tenstorrent.cpp` run no diffusion model

Checked before assuming, per spec §5. Searched their own vocabulary over
`src/vllm/platforms/{metal,tenstorrent}.cpp` and `src/vt/{metal,tenstorrent}/`
with `OPTForCausalLM` as a **positive control in the same command**: the control
hit 3 times, `ltx|minimax|h3|diffus|video` hit 0. The guard refuses nothing that
works today, so §6's `NEEDS_DECISION` stop condition is not triggered.

## Baseline: every line touched, with its reason

`scripts/device-leakage-baseline.json` — **one added line, no changed value:**

```
+    "dev_cast": 0,
```

`total` stays **32** and every other bucket is byte-identical. The key is
required because `load_baseline()` reads every entry in `BUCKETS`; the value is
`0` because the H3 site is *repaired* rather than absorbed, and the platform
registry walk is allowlisted with a stated reason rather than counted. No number
in this file goes up. (A peer measured that `--write-baseline` refuses to raise
the baseline but that hand-editing the JSON higher makes the checker PASS — so
this diff being one line and visible is the only real defence, and the key-by-key
comparison is under "Landing" below.) On the final tree the shipped ratchet reads
`kcuda=0, is_cuda=0, dev_cast=0, cuda_inc=0, vt_ifdef=32 -> total 32`, and
`--report` shows the one raw `dev_cast` hit is `platform.cpp`'s allowlisted
registry-walk inverse.

## The one judgement call

`supports_model_architecture` is asked with the **family** string (`ltx-2.5`,
`minimax-h3`), not an HF `architectures[0]` class name. The diffusion lanes are
reached through `LoadVideoEngine`/`VideoModelParams::family` and never read an
`architectures` entry, so the family slug is the only stable identifier they
have — and it is the string the user actually typed, which is what the refusal
names. It does mean the seam's key space now mixes HF class names with family
slugs. They cannot collide. Flagged rather than buried.

## A disagreement between the dispatch brief and the spec, resolved in the spec's favour

The brief said `test_minimax_h3_video_fold.cpp:161-164 @ 62406c3` must stay green
**unchanged**. The spec's §4.2 enumerates the contract as `0 → kCPU`, `-1` and
`2` throw, and *separately* requires that on a CPU-only build `1` is **refused**.
Line 162 asserted `MiniMaxH3VideoDeviceType(1) == kCUDA` — precisely the cast's
answer — and cannot survive the change. It is now build-conditional and asserts
**both** arms rather than skipping either: `== accelerator` where one is
registered, refused-by-name where none is. 161/163/164 are untouched.

The review upheld this and corrected the *other* half of it — see the review
section below: the build-conditional form was right, but the predicate choosing
between its arms asked two of the three questions and so red on a correct
refusal.

Relatedly, that file's CUDA-load case registered a **backend** and no
**platform** — it could, because the cast never asked whether the build had an
accelerator. It supplies both halves now. That is the defect being visible, not
a harness concession: a build with a CUDA backend registered and no CUDA platform
is not a build that runs on CUDA.

## Out of scope, held to

- No change to what CUDA does. `supports_model_architecture` defaults to `true`,
  so CUDA and CPU selection is byte-unchanged; the existing suite passing
  unchanged on this box is the gate for that.
- No other baseline key touched.
- No change to the H3 video engine's model behaviour — device resolution only.
- `src/vllm/multimodal/video_engine.cpp` untouched (#664 / PR #677 own it).

## Review repair (findings from the review of `094ac9e4`)

The review returned **FAIL with sound core work**: it reproduced every green and
every claimed mutation, verified branch orthogonality, confirmed the baseline
diff by hash, and independently planted three fresh spellings that each went RED.
Four findings, all repaired here.

**F1 (High) — the bucket missed the purest form of the defect, and the test that
was supposed to rule that out could not see it.**

```
(vt::DeviceType)d    -> dev_cast 1, RED     (what M29 asserted)
(vt::DeviceType)1    -> dev_cast 0, GREEN   <-- MISSED
(vt::DeviceType)-1   -> dev_cast 0, GREEN   <-- MISSED
```

The C-style alternative's trailing lookahead admitted only `[A-Za-z_(]`, and `1`
is a digit. A C-style cast of an integer **literal** — the device named by its
raw enum value — is exactly what this bucket exists to police, so the one form it
could not see was the one form it was for.

What makes it High rather than a nit: this PR asserted that the M29
discriminators cost nothing, and they cost *this* — while M29's own "did not cost
the real thing" assertion used an **identifier** operand, so the test could not
detect the gap it was written to rule out. A guard that certifies itself is the
exact disease this row exists to fix, reproduced inside the row's own instrument.
M29 now pins the literal **first**, then the signed literal, then the identifier,
all in the same file as the false-positive fixture.

Re-derived rather than taken on report: over `src/vllm` + `include/vllm`, **720
files**, with `\bDeviceType\b` = **162 matches as a positive control in the same
command**, admitting `0-9+-` adds **zero** hits and loses none. The only raw match
under either pattern is `platform.cpp:85`'s allowlisted registry-walk inverse.

**F3 (Medium) — the docstring under-reported, and three cast keywords were dead.**
Four more plain spellings read GREEN in *scanned* files. Each was compile-checked
as legal C++ *before* being called a blind spot, and each is now closed (see the
M30–M33 rows above). The pointer target is what makes the keyword list honest:
`reinterpret_cast`, `const_cast` and `dynamic_cast` **to a scoped enum are
ill-formed** — compile-checked, all three rejected, with `static_cast` as a live
control that compiles — so before this change those three keywords could only
ever have matched code that does not build. They created an appearance of
coverage the pattern did not have. Matching a pointer target makes them live
rather than dropping them.

**F2 (Medium) — the row added a test that FAILS on the build class #659 exists to
serve.** `test_minimax_h3_video_fold.cpp`'s `have_accelerator` asked two of the
three questions (`device_type() != kCPU && TryGetBackend() != nullptr`). On Metal
or Tenstorrent both are true, so the test took the `== accelerator` arm while the
source **correctly** refused, and the refusal surfaced as an uncaught exception.
Proven by mutation, not deduced — a `DecliningPlatform` registered in the XPU
slot, production code untouched:

| | result |
|---|---|
| before (2-question predicate) | `:247 ERROR: CHECK( MiniMaxH3VideoDeviceType(1) == accelerator ) THREW … "DECLINES the architecture 'minimax-h3'"` — 6 cases, **5 passed / 1 failed**, 137 assertions, `FOLD_EXIT=1` |
| after (3-question predicate) | 6 cases, **6 passed / 0 failed**, 137 assertions, `FOLD_EXIT=0` |

So the row shipped a **false RED on precisely the partial-backend build it was
written to protect** — invisible on the CPU and CUDA boxes that run the gates,
which is this row's own thesis about #659 turned against its own test. The
predicate is now three-way and asserts *which* refusal, because a right refusal
for a wrong reason is a wrong diagnosis that reads as a right one.

**F4 (Low) — an assertion that only checked absences.** The "COMPLETE backend is
not refused" case checked that `DECLINES` and `supports_model_architecture` were
*absent* and never positively asserted that the load reached the missing
checkpoint, so it would pass on any *other* wrong failure. Mutation (an unrelated
`Fail()` planted after the capability clause): the two absence checks **both
passed** and only the new assertion caught it — 4 cases, 3 passed / 1 failed;
24 assertions, 23 passed / 1 failed; the failure at `:178` on the `/nonexistent/`
path. `ltx2_video.cpp` restored and verified by sha256.

**F6 — the decline *consequence* inverts the cited precedent** (recorded in the
spec, no code change). `model_loader.cpp:98`'s capability question lives on the
`kAuto` path, whose answer to a decline is to fall through to `:104` and **serve
on CPU**; `metal.cpp:65-69` states that policy in as many words. Both diffusion
lanes instead **throw**. That is correct — `device = 1` is an explicit
accelerator request, and `model_loader.cpp:71-72` already says an explicit
accelerator must fail loudly rather than silently serve on CPU — but this PR
described the change as mirroring the precedent, and it mirrors the *question*
while inverting the *consequence*. Both halves are the seam's own, taken from two
different paths of it. Also recorded: **`vulkan.cpp` does not override
`supports_model_architecture`**, so a partial Vulkan build still binds and dies.
Residual, not this row's to fix.

### New-branch orthogonality

Each of the five new capabilities REDs **its own mutant and no other**; the
unmutated suite REDs none. Checker restored and sha256-verified after every one.

| Capability removed | RED |
|---|---|
| digits/sign in the C-style lookahead (F1) | `M29` |
| global-scope `::` in the qualifier (F3-a) | `M30` |
| elaborated `enum` in the qualifier (F3-b) | `M31` |
| the named declarator list-init (F3-c) | `M32` |
| the pointer target (F3-d) | `M33` |

`M34` is proven the same way in reverse: re-admitting `(` to the declarator form
makes it RED at **4 != 0**.

## Landing: rebuilt onto `origin/main`, twice, and one keyed record RETIRED rather than reapplied

**The branch was rebuilt, not just merged, because four of its commits could never
have landed.** `78f401796`, `b73d4576f`, `966e4883f` and `79ebbce42` carried
`Assisted-by: AGENT:claude-opus-5[1m] [claude-code]`. Brackets are the TOOL slot;
`scripts/check-commit-trailers.py:20`'s grammar has no bracket in the model token,
so the strict per-commit walk CI runs over `base..head` fails on all four no
matter what the tip looks like. Only those four message lines were rewritten. The
pre-merge tree is byte-identical to the previous head `bf8bb745b` — the same tree
object `6ab028f8c` — and the branch topology is unchanged, so this is the same
change with four commit messages repaired.

**The conflict was `.agents/roadmap_v1.md`, and the resolution is to write
NOTHING there.** Main's version was taken wholesale, per the keyed-record rule.
Then the scoped edits were *not* reapplied, and that is the finding rather than an
omission. Both edits lived in the `## Open issues` table, and
[#840](#840) (`POLICY-ISSUE-INTAKE`)
moved that whole table out to the new append-only `.agents/issue-index.md`. Under
that regime a row is appended and never edited; GitHub holds the open and closed
state, so closing #659 and #660 costs the index no edit at all. This branch's
in-place annotation of those two rows is exactly the `FIXED IN FLOW` shape that
spec retired, and a union driver would have **duplicated** it rather than merged
it. The evidence it carried is not lost — it is in this row's spec, which is the
surface that owns it.

Proved by comparison rather than by eye:

| record | diff vs `origin/main` |
|---|---|
| `.agents/roadmap_v1.md` | **0 lines** |
| `.agents/issue-index.md` | **one APPENDED row**, #828 (round 4 / F7). No existing row edited, none deleted, and the preamble untouched — which is what makes the `merge=union` driver safe |
| `scripts/check-issue-index-append-only.py --base origin/main --head HEAD` | green in `agent-preflight.sh` (`issue-index append-only`) on both the committed range and the staged change |
| `check-agent-record.py` | green; `UNOWNED_HIGH_WATER` is **unchanged at 33**, because #828 names no owning row but IS listed under the spec's `## Owed`, which is exactly the mechanism that keeps the count where it is |

`LTX25-DEVICE-SEAM-SIBLING` has no portfolio row in `roadmap_v1.md` either —
checked with `ENG-WEIGHT-OFFLOAD` at 2 hits as a positive control in the same
command — so there is no lifecycle write owed and `docs/STATUS.md` /
`docs/BENCHMARKS.md` stay untouched. The spec's `## Now` now says all of this,
because it previously claimed a table that no longer exists.

**`origin/main` then moved again, mid-gate.** It is a shared ref in a shared
checkout, and a peer session's fetch advanced it from `4a4ab89cb` to `62406c30e`
while this branch was building. The tell was a `git diff origin/main HEAD` that
grew from 11 files to 24 and showed this branch **deleting**
`docs/WEIGHT-OFFLOAD.md`, which it has never touched. Nothing was wrong with the
branch; the denominator moved. The second merge was conflict-free and the two
record checks above were re-run against the new tip rather than inherited.

**Two more merges in round 4, both conflict-free.** `e8048ef63` first — it
carries `8f49ac3be`, the `## Nothing lands dead` policy and
`.agents/reachability.md` that F2 is judged against, and it fixes `check-site.py`
which this branch had been carrying red. Then `0785cfc4d` mid-repair, taken
BEFORE the final anchor sweep rather than after it, because it edits
`ltx2_video.cpp` and moved four of this row's anchors by 43 lines. Deriving
anchors against a denominator that is about to move is not a derivation.

**Diff, measured rather than copied:** **15 files, +2104 / -22** against
`origin/main` at `2f2bce926`, which this branch has merged. (The body previously
said 11 / +1733 / -13 against `62406c30e`; three merges and the round-4 repair
are in the difference.)

**Where the history is.** `row/LTX25-DEVICE-SEAM-SIBLING-REBUILD`, pushed with
plain non-forcing pushes only. This pull request is already based on it, so the
"operator repoints it" note this body used to carry is discharged.

`scripts/device-leakage-baseline.json` — the keyed record — re-checked at the
final tree, key by key rather than by eye:

```
top-level keys base=['_comment','buckets','total'] head=['_comment','buckets','total']
_comment identical: True        total base=32 head=32
  cuda_inc   base=0    head=0    SAME
  dev_cast   base=<absent> head=0  CHANGED   <- the one key this row claims
  is_cuda    base=0    head=0    SAME
  kcuda      base=0    head=0    SAME
  vt_ifdef   base=32   head=32   SAME
added=['dev_cast'] removed=[] changed=[]
raw text with the ONE added line removed == base text: True
```

Note for the reviewer: `total` is **decorative**. `load_baseline()` reads only
`data["buckets"]`, so nothing gates the sum, and "total is still 32" is not
evidence about any bucket. The line-for-line identity above is.

## Anchors re-derived at the merged tree, asserted UNIQUE

> **Superseded by the round-4 repair below.** This section's closing sentence
> claimed the sweep was complete. It was not: six more citations were stale, all
> of them rotted inside this pull request, and the sweep had not counted them.
> The corrected method, and the four *further* anchors that the second merge then
> moved by 43 lines, are in "Review round 4". The paragraph is kept because the
> five anchors it does record were genuinely repaired.

Every `path:NN` this row cites was re-resolved by pattern, and each pattern was
required to match **exactly once** in its file — existence is not enough, because
an anchor that still resolves can resolve to the wrong thing. 31 citations across
the spec and the row's own source comments. Five did not hold, and they split two
ways:

| anchor | was | is | whose drift |
|---|---|---|---|
| `model_loader.cpp:97` (the capability clause) | `:97` | `:98` | main's |
| `model_loader.cpp:71-72` (explicit-accelerator polarity, F6) | `:71-72` | `:72-73` | main's |
| `minimax_h3_video.h:63` (the preserved public contract) | `:63` | `:69` | **already stale at `bf8bb745b`** |
| `ltx2_video.cpp:545-548` (the "refusal to fake it" argument) | `:545-548` | `:562-565` | **already stale at `bf8bb745b`** |
| `minimax_h3_video.cpp`'s citation of `ltx2_video.cpp:549-580` | `:549-580` | `:566-610` | **already stale at `bf8bb745b`** |

Three of the five rotted *inside this pull request*, shifted by its own later
commits — which is the recorded-anchor failure mode this repository already has a
name for, and nothing but re-derivation notices it. All five are corrected.

The spec's own scanned-file figure was re-derived too, since it carries a SHA
precisely because it rots: **776 files** at this merge, controls
`\bDeviceType\b` = **163** and `\bkCUDA\b` = **18**. `kCUDA` is unchanged and
`DeviceType` moved by one — the invariant that section claims — against +11 on the
count, the thing it predicts. Two measurement traps are now written beside the
number because each made a *correct* recorded figure read as wrong: the controls
are counted over the **comment-and-string-stripped** text (raw source gives
177 / 82), and the enumeration must be the checker's own `rglob`, since a
`git ls-tree` walk filtered by string prefix swallows `include/vllm.h` and returns
777.

## Mutation table — every guarantee neutralised, rebuilt, and re-run

> Measured against `7502004aa`, before the round-4 repair. The counts moved with
> the test file (4 cases / 24 assertions then, 6 / 38 now) and MU1 and MU3
> entered at `Ltx2VideoEngine::Load` rather than `LoadVideoEngine`. The
> round-4 table at the end of this body re-runs the equivalents at the final
> tree; MU-D and MU-E are MU1 and MU3 repeated there.

Mutated, not read. Each row records **whether it built**, because a mutation that
fails to compile reads as a passing test and has produced false verdicts on this
campaign before. Every file was restored and verified by sha256 after each
mutation, and `git status --porcelain` carried no product-file entry afterwards.

| # | guarantee | mutation | built? | verdict |
|---|---|---|---|---|
| MU1 | #659: `ltx2_video` refuses `device = 1` **by name** when the platform declines the architecture | `if (false && !platform.supports_model_architecture(kLtx2VideoFamily))` | **YES** | **RED** — `test_diffusion_device_seam` exit 1, 4 cases / 3 passed / 1 failed, 24 assertions / 19 passed / **5 failed** |
| MU2 | #660: `MiniMaxH3VideoDeviceType` resolves through the seam, not by integer cast | the pre-change defect restored verbatim: `return static_cast<vt::DeviceType>(device);` | **YES** | **RED** — `test_minimax_h3_video_fold` exit 1, 6 cases / 5 passed / 1 failed; `FATAL ERROR` at `test_minimax_h3_video_fold.cpp:232`, "device 1 must be refused when this build cannot honour it" |
| MU3 | #659, H3 arm: the sibling lane asks the **third** question too | `if (false && !platform.supports_model_architecture(kMiniMaxH3VideoFamily))` | **YES** | **RED** — `test_diffusion_device_seam` exit 1, 4 cases / 3 passed / 1 failed |
| MU4 | F4: the COMPLETE-backend case **positively** asserts the load reached the missing checkpoint | an unrelated `Fail()` planted after the capability clause | **YES** | **RED** — exit 1, 24 assertions / **23 passed / 1 failed**; the single failure is `:178`, `CHECK( msg.find("/nonexistent/ltx2-dit-that-is-never-opened.safetensors") != npos )`. Both absence checks passed, exactly as F4 claims |
| MU5 | #660: the `dev_cast` bucket is what the checker's suite is testing | `RE_DEVTYPE_CAST` replaced with a pattern matching nothing | n/a (Python) | **RED** — `tests/scripts/test_device_leakage.py`: **30 failed, 24 passed** |
| MU6 | #660 **forward**: the shipped gate now sees the act, not only the confession | the original defect restored in product source, checker unmodified | n/a (Python) | **RED** — `dev_cast=1`, total 33, `ERROR: DSR REGRESSION in bucket 'dev_cast': 1 > baseline 0`, exit 1 |

MU6 is the one that proves the row's thesis rather than its implementation. The
old `kcuda` token grep scored that exact line **zero**; the shipped bucket fails
the build on it.

## Gate

CPU build, no CUDA, `-j6`.

```
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DVLLM_CPP_CUDA=OFF
cmake --build build -j6
ctest --test-dir build -j4 --output-on-failure
```

Two runs, because `origin/main` moved between them. The first is the **clean**
one — `build/` deleted first, because an incremental green is not a clean green.
The second re-gates the union merge on top of it.

| axis | clean, at the `0785cfc4d` merge | final, at the `2f2bce926` merge |
|---|---|---|
| `CONFIGURE_EXIT` | **0** | **0** |
| `BUILD_EXIT` | **0** | **0** |
| edges | **1418 / 1418**, from a deleted `build/` | 774 (incremental over the clean one) |
| `Building CXX` / `Linking CXX` | **931** / **481** | 294 / 479 |
| `: error:` | **0** | **0** |
| `warning:` | **0** | **0** |
| `No space left` | **0** | **0** |
| `BFD assertion` | **0** | **0** |
| `ctest -N` | **479** | **481** |
| `CTEST_EXIT` | 8 | **0** |
| result | `99% tests passed, 1 tests failed out of 479` | **`100% tests passed, 0 tests failed out of 481`** |
| box loadavg at ctest | 20 | 44 |

Two tests did not run in both, `Skipped` by their own guards and both
pre-existing: `test_modelopt_mixed_precision_checkpoint` and `test_voxtral_e2e`.

**The clean run's one failure was `test_engine_core_proc`, charged to load and
measured rather than asserted.** It failed under `-j4` on `CHECK( abort_seen )`
(`test_engine_core_proc.cpp:481`), a timing assertion. Re-run **alone, three
times**: 14/14, 14/14, 14/14 — and its assertion count moves between runs (113,
118, 118), which is the timing dependence visible in the instrument itself. It is
on the known load-dependent list, and it passed in the final run at a *higher*
load.

**A second failure was real, was this branch's, and is fixed in `4e7a708ad`.**
An earlier full run also red `test_ltx2_video` — `0785cfc4d` records nine line
numbers in `ltx2_video.cpp`'s `READER ANCHORS` comment and gates them, and this
branch's capability guard sits ABOVE all nine, so the merge moved every one by
exactly 30. `git merge` reported no conflict and `merge-tree` would not have
either, because nothing overlapped textually: one side records line numbers of a
file the other side edits. A clean merge is not a merge that passes. Re-derived
and green: `test_ltx2_video` 40/40, 827 assertions.

`tests/scripts/test_device_leakage.py`: **55 tests, OK** (was 54; the +1 is M47).

Two tests did not run, both `Skipped` by their own guards and both pre-existing:
`test_modelopt_mixed_precision_checkpoint` and `test_voxtral_e2e`.

`scripts/agent-preflight.sh` returns **7 red**, and every one is demonstrated to
be main's rather than argued to be:

| red | proof |
|---|---|
| `check-release-binary-contract`, `check-release-workflow`, `check-test-registration`, `test_check_release_binary_contract`, `test_release_manifest`, `test_release_pipeline`, `test_check_test_registration` | the #873 family. All seven read `.github/workflows/*`, and `git diff origin/main HEAD -- .github/` is **EMPTY** — positive control in the same command: the files that DO differ are the 15 listed above. `check-test-registration`'s own message is `check-test-registration is missing from the explicit CI checker step`, which names a workflow this branch does not touch |
| — | `check-site.py` is **no longer** red: `e8048ef63` fixed it on main and the first merge picked it up |
| — | `test_cpu_x86_llamacpp_floor` (#618) went red on the pre-commit run at loadavg 65 with `AssertionError: 4 != 2` — exit **4** is `NO_QUIET_WINDOW`, the harness declining to measure — and green on the staged run. Load-dependent, not a floor that was measured and missed |

Green in the same run and worth naming, because they are the ones this change
could have broken: `check-agent-record`, `check-device-leakage`,
`check-now-current`, `doc-checkpoint range`, `doc-checkpoint --staged`,
**`issue-index append-only`**, `audit-live-rows`, and the trailer and
commit-style suites.

**One caution about the mutation pass, recorded because it produces a false
green.** The harness restores the source but does not rebuild, so the binaries
left behind after the last C++ mutant still contain it. The tree was rebuilt
after the pass, and `test_diffusion_device_seam` (6/6, 38 assertions),
`test_minimax_h3_video_fold` (6/6, 137) and `test_ltx2_video` (40/40, 827) were
re-run directly to confirm the restored binaries are the green ones. A stale
binary prints a green status.

Build directory deleted after the run.

**GitHub said CONFLICTING while `merge-tree` said clean, and the difference is
the finding.** After the push at `0785cfc4d`, `git merge-tree --write-tree
origin/main HEAD` exited **0** and the pull request read `CONFLICTING` /
`DIRTY`. Re-running the merge with the union driver disabled names the single
file: `.agents/issue-index.md`, which carries `merge=union` in `.gitattributes`.
GitHub's merge machinery does not apply a `.gitattributes` merge driver, so an
appended index row conflicts on the forge and resolves locally. **Any** branch
that appends an index row while `main` also appends will read the same way; it is
a property of the surface, not of this row.

Merged locally with the driver and then verified rather than trusted, because a
union merge is exactly what turns an EDITED row into a duplicate: the merged
index has **one** line `origin/main` does not (#828), **zero** lines it has and
the merge lacks, and **no** duplicated issue number.
`check-issue-index-append-only.py --base origin/main --head HEAD` reports `OK`.
The final gate above is on that merge.

## `## Nothing lands dead` (`8f49ac3be`, landed mid-gate)

> **Half of this section was wrong, and the review proved it by mutation.** It
> claimed the H3 lane was reached because `MiniMaxH3VideoDeviceType` has exactly
> one production call site and MU1/MU4 red without it. Naming a call site is not
> the test the policy asks for. MU1 and MU4 neutralise the LTX *guard*, not the
> H3 *call site*, and deleting the H3 call site left every suite GREEN. Repaired
> below; the corrected claim is in "Review round 4 / F2".

The policy arrived on main while this was gating, so it is answered rather than
ignored. Nothing here lands unreached.

- `ltx2_video.cpp`'s guard sits inside `Ltx2VideoEngine::Load`, which is what
  `LoadVideoEngine` and the video C ABI call.
- `MiniMaxH3VideoDeviceType` has exactly one production call site, in
  `MiniMaxH3VideoEngine::Load`.
- Both lanes are now ENTERED at `LoadVideoEngine` by
  `test_diffusion_device_seam`, and deleting either call site reds it.

## Review round 4 (findings against `7502004aa`)

**F1 (major) — the "refuses BY NAME" assertion could not fail.** The LTX case
asserted `msg.find(kLtx2VideoFamily)`. `Fail()` in `ltx2_video.cpp` prefixes
**every** message it throws with `"ltx-2.5 video: "`, and `kLtx2VideoFamily` *is*
the string `ltx-2.5` — so the assertion was satisfied by boilerplate on every
refusal the file can produce, including the two the same case asserts it is NOT,
and no defect in the message could make it fail. That assertion is the row's
whole thesis for #659.

Proven by mutation, not deduced: replacing the family name with `"<redacted>"`
inside the DECLINES `Fail` **BUILT and stayed GREEN** on the reviewed head. It is
now RED — see MU-A in the table below. The H3 side escaped only because its
prefix spells the family with an underscore (`minimax_h3 video: `) against a
hyphenated family (`minimax-h3`); that is a coincidence of spelling, not a
property, and it is hardened the same way (MU-B). Both lanes assert the **quoted
slot**, `architecture '<family>'`, through one `QuotedArchitecture()` helper that
carries the reason.

**F2 (major) — the H3 half violated `## Nothing lands dead`.** The chain existed
— `vllm_video_engine_load` → `LoadVideoEngine` → the `minimax_h3` registration →
`MiniMaxH3VideoEngine::Load` → `MiniMaxH3VideoDeviceType` — and nothing entered
through it. Replacing the `Load`-time call with the pre-row defect
`params.device == 0 ? kCPU : kCUDA` **BUILT and left both suites GREEN**. The
fold suite's `CUDA load creates exactly one queue` case *does* enter through
`Load`, but its `FakeCudaPlatform` reports `kCUDA`, so the seam and the cast
return the same answer and it cannot separate them.

Two H3 cases now enter at `LoadVideoEngine` against the declining
`PartialXpuPlatform`, mirroring the two LTX cases — and the two LTX cases moved
from `Ltx2VideoEngine::Load` to `LoadVideoEngine` as well, so both lanes are
entered at the same production point and neither skips the registry hop. The
red-before is MU-C, whose two failing cases are exactly the two new ones. The
policy ships **no checker** (`.agents/reachability.md`), so there is no exit code
to report; the test is the enforcement.

**F3 (major, record) — the anchor sweep that claimed completeness was
incomplete, and this pull request's own edits are what falsified it.** Six more
citations were stale, all rotted inside this branch, two of them seven and
fifteen lines (measured at `7502004aa`) from section 0(b)'s `minimax_h3_video.cpp:221-226 @ 11cc1d5` citation, which SHA-anchors itself with exactly the
reasoning that applies to them.

| citation | was | is |
|---|---|---|
| `check-device-leakage.py:78` (`RE_KCUDA`) | unanchored | `@ 62406c3` (on the branch: `:224`) |
| `test_minimax_h3_video_fold.cpp:162` (the `kCUDA` assertion) | unanchored | `@ 62406c3` (on the branch: `:220`, `== accelerator`) |
| `test_minimax_h3_video_fold.cpp:161-164`, twice | unanchored | `@ 62406c3` (on the branch: the three untouched at `:192-194`, the two arms replacing `:162` at `:218-238`) |
| `ltx2_video.cpp:549-562` (the two questions) | unanchored | `@ 11cc1d5` |
| `ltx2_video.cpp:562-565` (the refusal-to-fake-it argument) | `:562-565` | `:610-613` |
| `model_loader.cpp:97` (the capability clause), twice | `:97` | `:98` |

Four more range citations started or ended on the wrong line and were tightened:
`SelectQueueForModel` is `:60-105` (cited `:59-104`), its auto arm `:76-104`
(cited `:75-104`), the `kAuto` CPU fall-through `:104` (cited `:103`), and the
LTX device block, which the citation ended four lines short of, cutting the
`Fail` in half — now `:609-657`.

**Then it rotted a THIRD time, mid-repair.** `0785cfc4d`
(`LTX25-RETIRE-DEAD-ARMS`) landed on main and edited `ltx2_video.cpp` above this
branch's device block, moving all four live anchors by 43 lines. Caught because
the re-derivation was re-run *after* the merge: a sweep whose denominator moves
afterwards proves nothing. The rule the spec now records is take the merge first,
derive the anchors at the tree that is pushed.

Re-derivation, with a positive control **in the same run**: each anchor carries a
token that must appear on the cited line and match **exactly once** in the file,
and one deliberately wrong line number is included that must report `STALE`.

```
HOLDS=27  STALE=1  AMBIGUOUS=0
  stale: include/vllm/platforms/interface.h:264 — token is at [263], not 264
POSITIVE CONTROL (a deliberately wrong line) reported STALE: True
```

The completeness sentence is withdrawn with its reason, and replaced by a
statement of method and of what the method cannot see: the set is every `path:NN`
on a line this pull request **adds**, extracted from
`git diff -U0 $(git merge-base ...)`. It deliberately excludes citations this row
inherited and did not write — folding those in is how the last sweep came to
believe it had checked everything.

That paragraph said it had **two** limits. It had three, and the third is what
round 5 found twice: **a bare `:NN` whose path sits in a NEIGHBOURING token is
never extracted**, because the pattern requires path and number to be glued. See
"Review round 5".

**F4 (moderate, record)** — `## Now` pointed at closed PR #671 and the pre-rebuild
branch. Corrected, with the relationship between the two stated rather than the
number silently swapped, because the round-1 to round-3 findings were made
against #671's heads and a reader has to be able to find them.

**F5 (minor, checker) — `dev_cast` over-matches a plain copy-initialisation.**
`vt::DeviceType d{other}` — a local copy, a member default-init, or an init from
a call returning `DeviceType` — fires alternative (3) while converting nothing.
Measured: 1 hit each; `vt::DeviceType d{}` scores 0.

It is **not narrowed**, and that is proven rather than argued.
`vt::DeviceType d{raw}` is the real conversion M32/M36 pin and is textually
identical, so narrowing to remove the false positive deletes the true positive.
`MUT-P1` makes that executable — restricting the declaration form's initialiser
to a digit reds `M32`, `M36` **and all four of M47's subtests together**.
`MUT-P2` shows M47 is not merely along for the ride: dropping the empty-braces
lookahead reds only `M46` and `M47`, the negative controls, and leaves the real
catches green.

The docstring gains a third section, **WHAT `dev_cast` OVER-MATCHES**, alongside
DOES SEE and STILL CANNOT SEE — because a gate whose message omits its own false
positives misleads in the other direction, and a reader takes a RED as proof of
leakage. It states the cost: the baseline is a hard `0`, so the **first** such
line written under the scan roots fails the ratchet and needs `DSR-ALLOW`.
Nothing in the tree writes the form today. `M47` pins it in the `M46` shape, with
the value-init as the negative control in the same test, so a later change that
closes it goes RED and the message must be corrected in the same commit.

**F6 (minor)** — four comments still called the video ABI selector CUDA,
including the public `vllm_video_model_params.device` field and
`minimax_h3_video.h:88` nineteen lines below the docstring this row rewrote.
`include/vllm/config/device.h:19` repeats the same sentence and is corrected with
them — it is the fifth instance of one claim, not a fifth claim. `docs/USAGE.md`
gains the paragraph that owes, and `check-doc-checkpoint --staged` was RED until
it did.

**F7 (minor, record)** — #828 was named in `check-device-leakage.py:58,139,158`
and in the spec, and had no row in `.agents/issue-index.md`.
`check-agent-record.py` passed only because an absent row is nothing to count.
Appended with no owning row and listed under the spec's new `## Owed`, which is
the shape the protocol defines for an issue a row files and does not fix.
`UNOWNED_HIGH_WATER` is unchanged, because the `## Owed` entry is what keeps the
row owned.

**F8 (trivial)** — an inverted sentence in the test header that read as though
the refusal and the kernel death both happened.

### Round-4 mutation table — three facts each

`git diff --stat` after the substitution is printed because **a pattern that does
not match edits nothing, and the suite then prints SUCCESS**. Whether it BUILT is
printed because a mutant that fails to compile reads as a passing test. The exit
code is printed because a thrown doctest case prints `0 failed`. Every file was
restored and its sha256 compared, and `git status --porcelain` was empty after
each.

| # | what is neutralised | diff | built? | focused gate |
|---|---|---|---|---|
| MU-A | F1: the LTX refusal stops naming the architecture (`"<redacted>"`) | `ltx2_video.cpp \| 2 +-` | **YES**, 0 errors | **RED** — exit 8; 6 cases / 5 passed / **1 failed**; 38 assertions / 37 passed / 1 failed |
| MU-B | F1, H3 side: same substitution | `minimax_h3_video.cpp \| 2 +-` | **YES**, 0 errors | **RED** — exit 8; 6 cases / 4 passed / **2 failed**; 38 / 36 / 2 |
| MU-C | **F2 reachability**: the `Load`-time call site replaced by the pre-row cast | `minimax_h3_video.cpp \| 3 ++-` | **YES**, 0 errors | **RED** — exit 8; 6 cases / 4 passed / **2 failed**; 38 / 33 / **5**. The two failures are the two NEW cases |
| MU-D | the LTX capability clause itself | `ltx2_video.cpp \| 2 +-` | **YES**, 0 errors | **RED** — exit 8; 6 / 5 / 1; 38 / 33 / 5 |
| MU-E | the H3 capability clause itself | `minimax_h3_video.cpp \| 2 +-` | **YES**, 0 errors | **RED** — exit 8; 6 / 4 / 2; 34 / 28 / 6 |
| MUT-P1 | F5: (3)'s declaration form narrowed to a digit operand | `check-device-leakage.py \| 2 +-` | IMPORTS=True | **RED** — exit 1, `FAILED (failures=6)`: `M32`, `M36`, and M47 ×4 |
| MUT-P2 | F5: the empty-braces lookahead dropped | `check-device-leakage.py \| 2 +-` | IMPORTS=True | **RED** — exit 1, `FAILED (failures=2)`: `M46`, `M47` only |

MU-C is the one that matters. Under the reviewed head the same substitution left
`test_diffusion_device_seam` at 4/4 and `test_minimax_h3_video_fold` at 6/6.

All seven were run twice: once before the `0785cfc4d` merge and once on the tree
being pushed. The numbers above are the second run.

**MU-B's first attempt on the second run reported `BUILT=False` with `: error:`
count 0** — a build that failed with no compile diagnostic, which is an
instrument failure and not a verdict. It is recorded rather than dropped, because
without `FACT 2` the harness would have gone on to a ctest that could not have
been meaningful, and a mutant that fails to build reads as a passing test. Re-run
in isolation it BUILT with 0 errors and went **RED** (6 cases / 4 passed / 2
failed; 38 assertions / 36 / 2), which is the row in the table. The cause was not
identified and is stated as unexplained; disk was 66 G free at the re-run.

## Review round 5 (head `bf77c944e`) — record only

Every code, test and checker repair passed: both F1 mutations, the F2
reachability mutation that was GREEN before the repair and is now RED, the F5
narrowing proof, and the READER ANCHORS fix. The four findings are all record
defects, and two of them are one defect: **an anchor into a file the change is
itself editing is stale by default.**

**FF1 — `RE_KCUDA` was recorded at `:188` by the very commit that moved it to
`:224`.** `f0b465029` carries both the F3 anchor table, which writes `:188`, and
the F5 `WHAT dev_cast OVER-MATCHES` docstring section, which inserts 36 lines
above that regular expression. The F5 half falsified the F3 half of the same
commit — it rotted with **no merge involved**, which is the usual suspect and
here was innocent. Corrected in this body and in the spec.

**FF2 — this body contradicted itself two screens apart.** Three live claims used
anchors this body's own F3 table already records as corrected: `model_loader.cpp:97`
twice (now `:98`) and `tenstorrent.cpp:52` (now `:55`). A **fourth**, not in the
review's list, was found by re-deriving rather than by transcribing the list: the
F6 paragraph said the `kAuto` path falls through to `:103`, which the same body's
F3 prose records as corrected to `:104`. The `was` columns keep `:97`
deliberately. This mattered because `squash_merge_commit_message = PR_BODY` makes
this text the landed commit message, so it would have entered `main`'s history
disagreeing with itself.

**FF3 — this body named a commit that is not in this pull request.**
`git merge-base --is-ancestor 93736e745 bf77c94` exits **1**: that object
exists but is a superseded twin of `0600a7ef1`'s first half. The three repair
commits actually on the branch are `f0b465029`, `0600a7ef1` and `4e7a708ad` —
and `4e7a708ad`, the READER ANCHORS fix, was not named at all. Each is now
verified with `--is-ancestor` before being written.

**FF4 — the `:54` self-citation pointed at a blank line, and it is the exemplar
of GOOD anchoring practice.** At `7502004aa` `:54` was section 0(b)'s
`minimax_h3_video.cpp:221-226 @ 11cc1d5` citation; the "seven and fifteen
lines" distances resolve against it exactly, which is how it was identified
rather than guessed. `f0b465029` then added the anchors F3 asked for, section 0
grew, and `:54` went blank. All uses now name it in PROSE, because a line number
pointing into the spec itself is the one citation no re-derivation of the TREE
can check, and this row has rotted it twice.

**Re-derivation.** Every citation extracted — bare continuations included, which
is the change — and every live repo-local one checked at the pushed tree, with
each needle derived from what the spec **claims** the span holds rather than read
back out of the cited file, because a validator that reads its expectation from
its target re-derives `f(x) == f(x)` and cannot fail. A deliberately wrong row
rode in the same run as a positive control.

```
50 rows FRESH, 0 STALE   |   POSITIVE CONTROL reported STALE: True
```

Two observations reported and **not** repaired, because neither is wrong:
`ltx2_video.cpp:609-657` opens one line inside the preceding comment separator
rather than on the block head at `:614` (round 4's repair was to its tail, which
is correct at `:657`), and `check-device-leakage.py:58,139,158` is a genuine
three-way citation whose needle cannot be unique by construction.

**Gate on the pushed tree**, merged onto `origin/main` at `fba312c67` first so
the anchors are derived at the tree that is pushed:
`CONFIGURE_EXIT=0`, `BUILD_EXIT=0`, `: error:` count **0**, `No space left` 0,
`BFD assertion` 0, with `Building CXX` 933 and `Linking CXX` 483 as positive
controls that the build actually ran. `ctest -N` **481**, `CTEST_EXIT=0`,
**100% tests passed, 0 tests failed out of 481**. All six checkers exit **0**:
`check-doc-checkpoint`, `check-commit-trailers`, `check-commit-style`,
`check-issue-index-append-only`, `check-agent-record`, `test_device_leakage`.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:claude-opus-5 [claude-code]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants