Skip to content

fix(h3): route video device selection through the backend seam - #135

Merged
localai-bot merged 4 commits into
mainfrom
row/ARCH-ONE-SURFACE-H3-DEVICE
Aug 8, 2026
Merged

fix(h3): route video device selection through the backend seam#135
localai-bot merged 4 commits into
mainfrom
row/ARCH-ONE-SURFACE-H3-DEVICE

Conversation

@localai-bot

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

Copy link
Copy Markdown
Collaborator

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

  • Preserve public ABI device: 0=CPU, 1=CUDA.
  • Validate/map it once with MiniMaxH3VideoDeviceType.
  • Create one queue through GetBackend(device_type) and use that queue's device.
  • Add fold-unit coverage for selectors 0/1 and invalid -1/2.
  • Refresh the owning model/roadmap/spec/public/state records.

RED -> GREEN evidence

  • RED on origin/main: python3 scripts/check-device-leakage.py --report -> DSR 34, kcuda=2, baseline 32, exit 1.
  • GREEN at 4e3d64d5: DSR 32, kcuda=0, baseline unchanged, no allowlist.
  • python3 tests/scripts/test_device_leakage.py: 25/25 pass.
  • Public-doc checker mutation suite: 41/41 pass.
  • Full staged preflight: exit 0.
  • Full pre-push preflight chained to normal push: exit 0.
  • Commit message inspected with sed -n l: FOLLOWING_AGENTS_PROTOCOL and Assisted-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.

mudler added 2 commits August 7, 2026 23:08
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]
@localai-bot
localai-bot marked this pull request as ready for review August 8, 2026 00:13
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]
@localai-bot
localai-bot merged commit 57d546f into main Aug 8, 2026
11 checks passed
mudler added a commit that referenced this pull request Aug 8, 2026
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]
@localai-bot

Copy link
Copy Markdown
Collaborator Author

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 commit-tree -p origin/main resolved the symbolic ref AFTER another session's fetch had advanced it to this PR's merge, so the push fast-forwarded with a parent whose tree lacked this PR's changes. Restored in full by b44ad33 (exact-restore of the six untouched files + hunk-level recomposition of the six shared record files; the restored fold test passes on the repaired tree; eleven gates green). The landing recipe is hardened permanently: MAIN_SHA pinned at worktree creation, commit-tree against the pinned SHA, and lease-guarded pushes so a moved remote fails loudly instead of absorbing a wrong parent. Apologies to this lane for the window.

mudler added a commit that referenced this pull request Aug 8, 2026
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]
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