Skip to content

feat(webv2): advisory for suspicious Wan A14B expert wiring - #135

Merged
lstein merged 5 commits into
mainfrom
feat/video-panel-09-expert-warning
Aug 22, 2026
Merged

lstein merged 5 commits into
mainfrom
feat/video-panel-09-expert-warning

Conversation

@lstein

@lstein lstein commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Stacked on #134 (PR 8 of the video panel series). Adds a non-blocking advisory in the Video panel's Model Components section when Wan 2.2 A14B expert wiring looks suspicious, per the swapped-experts experiment discussed during smoke testing.

The backend tags single-file/GGUF Wan checkpoints with an expert field (high/low/none) via a filename heuristic, and wan_model_loader already logs at warning severity when explicit wiring disagrees with the tags — explicit wiring stays authoritative, so deliberate cross-wiring (an experiment the maintainer may actually want) still runs. No backend change was needed; this PR brings the same advisory to the panel at selection time instead of enqueue time.

What it does

getWanExpertWiringWarning (pure, in videoPolicies.ts) inspects the main + low-noise slots of a single-file A14B pairing and reports one of four conditions:

  • swapped — main is tagged low, low-noise slot is tagged high
  • high-as-low — low-noise slot holds a high-tagged file
  • low-as-main — main slot holds a low-tagged file
  • single-low — a low-tagged main with no low-noise expert wired (mirrors the loader's single-expert warning)

WanExpertWiringNotice renders the matching message beneath the component slots, with a one-click Swap experts action (hidden for single-low, where there is nothing to swap). The swap routes through the canonical model-selection transition (getVideoModelSelectionResult), so accelerator bookkeeping and model-governed defaults stay consistent; because the low-noise slot filter guarantees a same-variant single-file pair, the swap is a pure role exchange.

Untagged files (expert: 'none', common on community finetunes) never trigger the advisory on their own; Diffusers mains, TI2V-5B (no expert pair), and H3 are out of scope by construction.

Deliberately deferred

An enqueue-time toast backstop for graphs built outside the panel (workflow editor) is deferred — the backend log already covers that path, and the panel is where the mis-wiring is actionable.

Review hardening

The pre-push adversarial review found and this PR fixes: (1) swapping while the model catalog was still loading ran the selection transition against an empty catalog and silently stripped the Lightning accelerator — the Swap button now waits for the catalog to be authoritative; (2) a same-tag pair (high+high / low+low) re-warns after any role exchange, so the button now renders only when simulating the exchange actually clears the warning; (3) the message-key map's hyphenated i18n leaves were invisible to the translation-key scan — renamed to camelCase so the scan really guards them.

Testing

  • New unit tests for getWanExpertWiringWarning covering all four warning kinds plus the silent cases (correct wiring, untagged pairs, Diffusers, TI2V-5B, H3, null).
  • Full webv2 suite: 6362 tests passing (node) plus 793 browser tests; tsc, oxlint, format, and architecture checks clean.
  • Adversarial fresh-context review of the diff completed pre-push.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JYSJ8DZR42nUUhZagaga2z

@lstein
lstein force-pushed the feat/video-panel-08-recall branch from f4cc91b to 49e6738 Compare August 21, 2026 03:06
@lstein
lstein force-pushed the feat/video-panel-09-expert-warning branch from 026fd44 to 9c9c059 Compare August 21, 2026 03:06
@lstein
lstein force-pushed the feat/video-panel-08-recall branch from 49e6738 to 3b8ed68 Compare August 21, 2026 03:31
@lstein
lstein force-pushed the feat/video-panel-09-expert-warning branch from 9c9c059 to 107b174 Compare August 21, 2026 03:31
@lstein
lstein force-pushed the feat/video-panel-08-recall branch from 3b8ed68 to 457e24b Compare August 22, 2026 02:24
@lstein
lstein force-pushed the feat/video-panel-09-expert-warning branch from 107b174 to 34fe4be Compare August 22, 2026 02:24
lstein and others added 3 commits August 21, 2026 22:47
When a single-file A14B main is tagged as the low-noise expert, or the
low-noise slot holds a high-tagged file, the Model Components section
shows a non-blocking warning with a one-click "Swap experts" action.
The stance mirrors wan_model_loader exactly: the expert tag is a
filename heuristic ('none' is common on community finetunes), explicit
wiring stays authoritative, and deliberate cross-wiring remains
expressible — the backend already logs this case at warning severity.
A low-tagged single expert (no pair wired) gets the same advisory the
loader logs, without a swap action.

The swap routes through the canonical model-selection transition, so
it is a pure role exchange for the same-variant single-file pair the
slot filter guarantees.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adversarial review of the advisory found three issues, fixed here:

- Swapping while the model catalog was still loading (or errored) ran
  the selection transition against an empty catalog, which judged the
  Lightning pair "not installed" and silently stripped the accelerator
  (steps 4 -> 40, CFG 1 -> 5) with no way back. The Swap button now
  waits for the catalog to be authoritative, matching the reset
  button's models-loaded gate.
- A same-tag pair (high+high, low+low) re-warns after any role
  exchange, so offering Swap there just looped. The button now renders
  only when simulating the exchange actually clears the warning; the
  same check keeps a legacy Diffusers config in the low slot from
  being promoted to main.
- The message-key map used hyphenated leaf keys, which the
  translation-key scan's identifier pattern skips — the "scan can see
  them" comment was false. Leaves renamed to camelCase so the scan
  really does guard them.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…isory

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
lstein and others added 2 commits August 22, 2026 11:26
The "Swap experts" gate checked catalog-loaded, not per-model presence, so
uninstalling either expert while the panel was open left the button live —
clicking it relocated the stale, uninstalled config into the main slot.
The click handler re-validates presence against the catalog too.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LUjUcPHzQCoL7dqgsVzi63
Base automatically changed from feat/video-panel-08-recall to main August 22, 2026 17:27
@lstein
lstein merged commit 6a8e8f3 into main Aug 22, 2026
19 checks passed
@lstein
lstein deleted the feat/video-panel-09-expert-warning branch August 22, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant