fix(h3): route video device selection through the backend seam - #135
Conversation
Replacement for malformed-trailer PR #134 on row/ARCH-ONE-SURFACE-H3-DEVICE. FOLLOWING_AGENTS_PROTOCOL Assisted-by: Codex:gpt-5 [Codex]
Keep the public ABI selector at 0=CPU and 1=CUDA while converting it once to vt::DeviceType. The H3 shared layer now creates one queue through GetBackend(device_type), restoring the device-leakage ratchet without an allowlist or baseline change. Helper row: row/ARCH-ONE-SURFACE-H3-DEVICE (PR #135; replaces #134). FOLLOWING_AGENTS_PROTOCOL Assisted-by: Codex:gpt-5 [Codex]
Exercise the real CUDA load path with a counting backend so a second queue creation or loss of the selected queue device fails the CPU fold gate. Backend registration is restored by scope on builds that already provide CUDA. Helper row: row/ARCH-ONE-SURFACE-H3-DEVICE (PR #135). FOLLOWING_AGENTS_PROTOCOL Assisted-by: Codex:gpt-5 [Codex]
Preserve CLAIM-ARCH-ONE-SURFACE-H3-DEVICE / PR #135 on origin/main while taking every keyed record from main wholesale and reapplying only the scoped H3 evidence. The append-only state is unioned and sorted. FOLLOWING_AGENTS_PROTOCOL Assisted-by: Codex:gpt-5 [Codex]
INCIDENT, disclosed in full: the #136 squash was built by merging its branch against main@9f772cad, but `git commit-tree -p origin/main` resolved the ref at squash time - after another session's fetch in the shared repo had advanced origin/main to 57d546f (PR #135, the H3 device-seam repair). The pushed commit bcd9c48 therefore parented on 57d546f while its tree lacked #135's changes, silently reverting them on main: minimax_h3_video.{h,cpp} device-seam fix, 53 fold-test lines, and #135's record rows. This commit restores #135's full delta on top of #136: exact-restore of the six files #136 never touched, hunk-level re-application of the six shared record files (NOW composed into one Surface-coverage row; the #135 state entry re-inserted at its chronological slot). Verified: diff vs 57d546f now shows only #136's own changes; the restored fold test passes on this tree. Hardening (applied to the landing recipe going forward): pin MAIN_SHA=$(git rev-parse origin/main) at worktree creation, use commit-tree -p "$MAIN_SHA" (never the symbolic ref, which other sessions' fetches move), and push with --force-with-lease=refs/heads/main:"$MAIN_SHA"-derived expectations so a moved remote fails the push instead of absorbing a wrong parent. FOLLOWING_AGENTS_PROTOCOL Assisted-by: Claude Code:claude-fable-5 [ClaudeCode]
|
INCIDENT DISCLOSURE + REPAIR: the #136 landing (bcd9c48) accidentally reverted this PR's content on main for ~40 minutes — a shared-repo ref race: the squash's |
Validate human W1-W13 row identity before dictionary normalization, and pin the five remaining exact machine fields through independent mutation inventories and consumers. Reconcile origin/main b44ad33 while preserving its Kimi and #135 device-seam work. Row: ENG-RELEASE-BINARIES FOLLOWING_AGENTS_PROTOCOL Assisted-by: Codex:gpt-5 [Codex]
Clean replacement for #134; the malformed implementation commit was not cherry-picked or rewritten. The exact tree diff was reapplied from origin/main, verified identical before the mechanical PR-reference update, and committed with real separate protocol trailer lines.
Change
device: 0=CPU, 1=CUDA.MiniMaxH3VideoDeviceType.GetBackend(device_type)and use that queue's device.RED -> GREEN evidence
python3 scripts/check-device-leakage.py --report-> DSR 34,kcuda=2, baseline 32, exit 1.4e3d64d5: DSR 32,kcuda=0, baseline unchanged, no allowlist.python3 tests/scripts/test_device_leakage.py: 25/25 pass.sed -n l:FOLLOWING_AGENTS_PROTOCOLandAssisted-by:are real separate lines.Honest pending gate
Per operator direction, the local CPU build was not repeated after the shared-disk incident.
test_minimax_h3_video_fold, H3, C API, and CPU build/tests are NOT claimed locally and must pass GitHub CI before review/merge. No GPU job, download, benchmark, release-row edit, baseline change, or allowlist was made.Draft remains open for the operator's fresh mutation review.