Skip to content

fix(api): make transition indices optional and report the real take pair - #806

Open
wagenet wants to merge 2 commits into
Eyevinn:mainfrom
wagenet:wagenet/transition-schema
Open

wagenet wants to merge 2 commits into
Eyevinn:mainfrom
wagenet:wagenet/transition-schema

Conversation

@wagenet

@wagenet wagenet commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Problem

One handler serves two block kinds with different contracts. A vision mixer reads the authoritative PGM/PVW pair from overlay state and discards from_input/to_input — correct and unchanged, since a client-computed index can be stale by the time the request lands, which would make every take a lost-update race. A plain compositor (builtin.compositor, builtin.glcompositor) registers no overlay state, so there the indices are load-bearing.

TriggerTransitionRequest declared both required, documented as "Index of the currently active input (0-based)". That is false for a vision mixer, and the schema told every client to compute a value that is usually thrown away.

Change

Main has since made both fields Option<usize> so a stinger can leave them out, but still returned 400 for any other take without them. This PR removes that 400 for a vision mixer: it takes PGM→PVW from its own state, so a request without indices is accepted. A plain compositor, which has no such state, still returns 400.

The judgment call worth reviewing: supplied-but-unused indices are accepted and ignored, not rejected. A client cannot know whether a block has live state without a pre-flight GET, and that state can change before the POST lands — the same race the discard exists to prevent. A 400 would also break vision-mixer.html, which sends indices on every take. Disagreements log at debug, not warn, since that page makes them routine.

Omitting an index on a block with no live state is a different case and now returns 400: that take is underspecified rather than redundant.

The response message echoed the request indices, and the vision mixer page shows that string to the operator. AppState::trigger_transition now returns the real pair and the handler builds the message from it, naming no indices when a bus is a PiP. StromEvent::TransitionTriggered carries the authoritative pair too; its fields stay usize so the variant is unchanged, and a PiP bus reports 0. Nothing consumes it today.

Frontend

api_sync.rs keeps its own transition_from/transition_to. That is not a mirror of server state: CompositorEditor opens only for the two compositor blocks, never for a vision mixer (whose UI is vision-mixer.html), and those blocks have no server-side pair to read — GET /blocks/{block_id}/state 404s for them. Left alone here.

Follow-up defect: the from/to swap happens before the POST, so a failed request leaves the pair backwards for the next take.

Tests

Ran locally on macOS (GL pipeline running) on the rebased branch, d08733a on main 4e1edf5:

  • cargo test --workspace --lib transition — 15 passed in the backend lib, 3 in strom-types (the wire-contract cases).
  • cargo test --test openapi_test — passed. Against main the only delta in openapi.json is description text; main already made both fields nullable.
  • Vision mixer suites — vision_mixer_fx_test 4, _fx_passthrough_test 1 (1 ignored), _overlay_upload_test 3, _underlay_upload_test 3, _source_resize_test 8; all passed. vision_mixer_fx_test passes None, None, so it covers a vision mixer take with no indices.
  • Stinger suites, --test-threads=1 — stinger_api_test 9, stinger_test 3 (1 ignored), stinger_clip_test 14, stinger_software_decode_test 1, stinger_prores_test 4; all passed. stinger_api_test asserted main's 400 for a cut without indices; it now expects 200.
  • media_download_test — 15 passed.
  • cargo fmt --all -- --check and cargo clippy --workspace --all-targets -- -D warnings — clean.

Not run: the rest of the backend suite. No test covers the plain-compositor 400; that needs a running compositor block and no harness exists.

Written by Claude.

🤖 Generated with Claude Code

@srperens srperens left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: Comment — the guard sits at the right layer and the wire change is genuinely additive, so nothing here needs undoing. Two things to settle first, neither of them the fix itself.

Requested changes

  1. Document the 0 stand-in on the wire type, not only at the producer — types/src/events.rs:253. The comment above the broadcast explains why a PiP bus reports 0, but whoever consumes TransitionTriggered reads the type, not state.rs. A doc line on the two fields is not a schema break and closes the one place this PR knowingly emits a number that is not the truth.

Claims

Claim Verdict Evidence
An omitted index on a block with no overlay state now fails instead of silently taking from input 0 CONFIRMED backend/src/gst/pipeline/effects/take.rs:66 — ` if overlay_state.is_none() && (from_input.is_none()
The three new wire-contract tests executed rather than skipping CONFIRMED Check (Linux) job 103482440889 at head 8425653f: transition_request_accepts_legacy_body, transition_request_accepts_omitted_indices and transition_request_omits_absent_indices each ... ok
No existing harness covers the new 400 CONFIRMED, and more sharply than the body puts it the nearest harness does not run at all on CI: backend/tests/vision_mixer_fx_test.rs:91 — eprintln!("SKIP: GL environment unavailable (no context or GL elements missing)"); (again at :269), and in the same job both its tests report ok ... finished in 0.04s, which is a skip, not a GL pipeline reaching EOS. A test placed there would guard nothing
Nothing consumes TransitionTriggered today CONFIRMED the only producer is backend/src/state.rs:2237 — .broadcast(StromEvent::TransitionTriggered {; the only other mentions are the definition and its serde round-trip in types/src/events.rs. No frontend reader

Diagnosis — the distinction the fix rests on is the real content, and it is drawn correctly: overlay state present but reporting None means a PiP is on the bus and the pads are knowable without the request, whereas no overlay state at all means the request indices were the only thing naming the pads. Collapsing those two into unwrap_or(0) is what produced a take from input 0 that nobody asked for. Coverage is BOUNDED: the accept/serialize side is now pinned by three tests, the reject side by none, and per the row above that is a property of the CI environment rather than of this author's diligence.

The residual is backend/src/state.rs:2240 — from_input: old_pgm.or(from_input).unwrap_or(0),. A PiP bus broadcasts 0, indistinguishable from a real take off input 0. Harmless while nothing reads the event; it becomes a silent wrong reading the moment something does, which is why the doc line is worth the two minutes now rather than after the first consumer ships.

Radius — SHARED: the transition request type in strom-types, the take effect, and the emitted schema. Both fields gained #[serde(default, skip_serializing_if = "Option::is_none")], so an old client sending both indices is unaffected and an absent index no longer serialises as 0 — additive in both directions. openapi.json is 3.1.0, where "type": ["integer","null"] is valid, and the snapshot was regenerated in the same commit rather than left to drift.

Tests & CI — six checks green at 8425653f (run 34667544509, head confirmed). Build (Windows) and Build (macOS) are skipping; no target_os code in the diff, so Linux-green plus the post-merge main run covers it.

Confidence: HIGH

@srperens srperens mentioned this pull request Sep 14, 2026
@wagenet

wagenet commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Claude here, replying for the author.

Addressed in eaf9d99: from_input and to_input on StromEvent::TransitionTriggered now carry doc comments saying that on a vision mixer they are the PGM pair rather than the request, and that 0 also stands in for a PiP bus, so a 0 is ambiguous and VisionMixerStateChanged is the unambiguous source. The only change to openapi.json is those two description strings. The variant's shape is unchanged.

Ran cargo test --test openapi_test. It failed on the new descriptions, I regenerated the snapshot, and the re-run passed. cargo fmt --all --check and the pre-commit clippy pass are clean. Nothing else was run, since the change is doc-only.

@srperens srperens left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: Comment — supersedes my review of 2026-09-14 (at 8425653f); the verdict stands. The one standing ask is closed, and what is left is not a code change: the body's test evidence for the vision-mixer half does not hold on this repository's CI.

Requested changes

  1. Correct the Tests section: say that backend/tests/vision_mixer_fx_test.rs skips on CI, so the None, None call sites it now passes are exercised on your machine only. CLAUDE.md requires stating which tests were skipped, and this is the row a reader would otherwise take as coverage.

What changed since the last review

The delta is eaf9d999 alone, and it touches only doc comments plus the regenerated snapshot — no code-bearing file moved, so every row I confirmed at 8425653f still holds and I am not rebuilding them. The ask was to document the 0 stand-in on the wire type rather than only in the producer comment, and that is exactly what landed: types/src/events.rs:253 — /// Input the take left (0-based). On a vision mixer this is what was, with the matching note above types/src/events.rs:259 — to_input: usize,. The description text reached openapi.json in the same commit and API Contract Check passed, so the schema did not drift.

Claims

Claim Verdict Evidence
The three new wire-contract cases execute on CI CONFIRMED types/src/api.rs:1395 — fn transition_request_accepts_omitted_indices() {; all three ran in Check (Linux) job 104063217972 (test api::tests::transition_request_accepts_omitted_indices ... ok)
"cargo test --test vision_mixer_fx_test — 2 passed ... exercising a real vision mixer take with no indices supplied at all" is coverage for this change UNVERIFIED backend/tests/vision_mixer_fx_test.rs:91 — eprintln!("SKIP: GL environment unavailable (no context or GL elements missing)"); and the same guard at backend/tests/vision_mixer_fx_test.rs:269; both cases report finished in 0.05s in that job, which no GL pipeline reaching EOS can do
The new 400 is untested CONFIRMED the body says so itself; no harness exists for a running compositor block

Diagnosis — Unchanged from the last review: the guard is at the right layer and the wire change is additive in both directions. Coverage stays BOUNDED — the accept side is guarded by tests that genuinely run, the reject side by nothing.

Radius — SHARED: a public endpoint's request type and a StromEvent variant's documentation. The variant's fields are untouched, so nothing on the WebSocket contract breaks.

Tests & CI — Run 34869977800 at eaf9d999: Check (Linux), Build (Linux x86_64), Build (Linux ARM64), Check & Build (WASM) and API Contract Check all pass. Build (macOS) and Build (Windows) report skipping, which is expected without the label and irrelevant to a wire-type change.

The skipping GL suite is not this PR's defect to fix — it predates the diff and needs its own issue. Flagging it because the body cites it as evidence.

Confidence: HIGH

@wagenet

wagenet commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Claude here, replying for the author.

I corrected the Tests section in the PR body. vision_mixer_fx_test skips on CI, so CI does not cover the vision mixer half of this change. I re-ran it locally on macOS at eaf9d99 with --nocapture: both cases passed in 4.86s with no SKIP line, so the GL pipeline did run there, including the None, None takes. No code changed.

wagenet added a commit to wagenet/strom that referenced this pull request Sep 27, 2026
…ma change

Eyevinn#806 made trigger_transition's indices optional; the tests Eyevinn#803 adds
still passed bare integers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wagenet added a commit to wagenet/strom that referenced this pull request Sep 28, 2026
…usal tests

Integration fix-up: Eyevinn#806 makes trigger_transition's input indices
optional, and Eyevinn#803's two FTB-refusal tests still pass bare integers.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
wagenet added a commit to wagenet/strom that referenced this pull request Sep 29, 2026
…ma change

Eyevinn#806 made trigger_transition's indices optional; the tests Eyevinn#803 adds
still passed bare integers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 7972650)
wagenet added a commit to wagenet/strom that referenced this pull request Sep 29, 2026
…usal tests

Integration fix-up: Eyevinn#806 makes trigger_transition's input indices
optional, and Eyevinn#803's two FTB-refusal tests still pass bare integers.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit d20b5d9)
wagenet added a commit to wagenet/strom that referenced this pull request Sep 29, 2026
…ize tests

Integration fix-up: Eyevinn#806 makes trigger_transition's input indices
optional, and Eyevinn#894's resize tests still pass bare integers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wagenet added a commit to wagenet/strom that referenced this pull request Sep 29, 2026
…ma change

Eyevinn#806 made trigger_transition's indices optional; the tests Eyevinn#803 adds
still passed bare integers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 7972650)
wagenet added a commit to wagenet/strom that referenced this pull request Sep 29, 2026
…usal tests

Integration fix-up: Eyevinn#806 makes trigger_transition's input indices
optional, and Eyevinn#803's two FTB-refusal tests still pass bare integers.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit d20b5d9)
wagenet added a commit to wagenet/strom that referenced this pull request Sep 29, 2026
…ize tests

Integration fix-up: Eyevinn#806 makes trigger_transition's input indices
optional, and Eyevinn#894's resize tests still pass bare integers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wagenet added a commit to wagenet/strom that referenced this pull request Oct 1, 2026
…ma change

Eyevinn#806 made trigger_transition's indices optional; the tests Eyevinn#803 adds
still passed bare integers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 7972650)
wagenet added a commit to wagenet/strom that referenced this pull request Oct 1, 2026
…usal tests

Integration fix-up: Eyevinn#806 makes trigger_transition's input indices
optional, and Eyevinn#803's two FTB-refusal tests still pass bare integers.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit d20b5d9)
wagenet added a commit to wagenet/strom that referenced this pull request Oct 1, 2026
…ize tests

Integration fix-up: Eyevinn#806 makes trigger_transition's input indices
optional, and Eyevinn#894's resize tests still pass bare integers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wagenet added a commit to wagenet/strom that referenced this pull request Oct 1, 2026
…er signature

Eyevinn#806 changes trigger_transition's input indices from usize to
Option<usize>. idx() converts into whichever the method takes, so these
tests compile whether Eyevinn#806 lands before or after this PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wagenet added a commit to wagenet/strom that referenced this pull request Oct 1, 2026
…er signature

Eyevinn#806 changes trigger_transition's input indices from usize to
Option<usize>. idx() converts into whichever the method takes, so these
tests compile whether Eyevinn#806 lands before or after this PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
srperens added a commit that referenced this pull request Oct 2, 2026
* fix(vision mixer): keep a source's new shape when it changes size

The GPU mixer's per-input glshader (fx_look, fx_take) takes its output
size from the first entry of downstream's caps. After the first
negotiation the compositor answers with the size it already has, so a
source that changes size is stretched to its first shape: a camera
switched to portrait, or a new publisher on a reused WHIP slot. The
mixer never sees a caps change and never re-fits the aspect.

Open width and height in the caps answer on each filter's peer pad so
the filter stays at its input size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(vision mixer): re-fit an input only once its new caps are stored

The caps probe queues a geometry refresh on the main loop, which runs on
its own thread. A pad stores caps only after its probes return, so the
refresh could run first, read the old size, find nothing changed and
leave the input in its old shape. Requeue the refresh until the pad
holds the caps that triggered it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(vision mixer): re-fit from stored caps and the configured PGM size

Refresh an input's geometry from the pad's notify::caps, which fires
after the pad stores new caps, instead of a caps event probe that fires
before. A refresh queued from the probe could read the old size when the
streaming thread was held up before the store, and the source stayed
stretched until its next shape change. This replaces the bounded requeue.

Fall back to the block's configured PGM size, not 1920x1080, when the
mixer output has not negotiated yet. The first refresh runs before it
has, so a source present at start was fitted to a 1080p canvas on any
other PGM size and stayed misplaced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(vision mixer): hold a re-fit until a take or FTB is over

Re-fitting an input clears the pad's control bindings, so a source
that changed size during a fade or wipe ended the transition as a cut.
The GPU mixer now reaches that path on every resize, because the effect
shaders pass the new size through.

The geometry refresh now leaves an animating compositor alone, marks
the layout pending, and runs again after the last keyframe. FTB off
fits the program pads to their sources' current shapes before they
fade back in, so a source that changed shape during FTB no longer
comes back stretched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(vision mixer): let Fade to Black play out on a slow mixer

FTB wiped its alpha keyframes on a wall-clock timer, duration + 100 ms.
The keyframes are in the mixer's stream time, so a mixer running slower
than real time had its fade wiped part-way and stayed there: never
reaching black, or coming back dimmed. The same timer wiped the fade-in
of an FTB off pressed during the FTB-on fade. The cleanup now waits
until the mixer's position passes the fade's end, and skips a control
source a later FTB or take has reprogrammed.

FTB off also re-applies a PiP source's crop, which is in pixels of the
source and was left sized for a source that changed shape during FTB.

The fade and FTB tests now time their checks by the mixer's clock
instead of the wall clock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(gl): fail instead of skipping when the GPU mixer breaks

vision_mixer_fx_test printed SKIP and passed when the GPU vision mixer
failed to build or start, even after the GL probe had proven the
environment renders and even under STROM_REQUIRE_GL. A GPU mixer that
stopped building passed green on the macOS job. Those paths now fail.

Missing GL elements were folded into "no GL context", which the Linux
jobs treat as a legitimate skip. Every CI job installs the GL plugins,
so both GL test files now fail on a missing GL element under
STROM_REQUIRE_GST_PLUGINS, like every other missing element, and also
under STROM_REQUIRE_GL, since a platform that must render cannot do it
without them.

The two fx tests shared block ID "vmfx". The vision mixer's overlay
state is process-global and keyed by block ID, and the tests run
concurrently, so the letterbox test now uses its own ID.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(gl): route missing GL elements through the shared test helper

Both GL test files hand-rolled the STROM_REQUIRE_GST_PLUGINS check that
common::require_or_skip already owns. common::gl_elements_available adds
the one thing that helper lacks, failing under STROM_REQUIRE_GL too, and
both files now call it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(vision mixer): pass take indices through a helper that fits either signature

#806 changes trigger_transition's input indices from usize to
Option<usize>. idx() converts into whichever the method takes, so these
tests compile whether #806 lands before or after this PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(vision mixer): route missing GL elements through the shared test helper

The resize tests had their own copy of the GL skip check, which folded
missing GL elements into "no GL context". Linux CI skips that case, so a
dropped GL package would turn all eight guards green without running them.
Check the elements with common::gl_elements_available from #917 first, and
keep the context probe for the legitimate headless skip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Per Enstedt <per.enstedt@eyevinn.se>
@wagenet
wagenet force-pushed the wagenet/transition-schema branch from eaf9d99 to 6a60332 Compare October 2, 2026 15:40
wagenet added a commit to wagenet/strom that referenced this pull request Oct 2, 2026
…er signature

Eyevinn#806 changes trigger_transition's input indices from usize to
Option<usize>. idx() converts into whichever the method takes, so these
tests compile whether Eyevinn#806 lands before or after this PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wagenet
wagenet force-pushed the wagenet/transition-schema branch from 6a60332 to 11a6095 Compare October 8, 2026 23:26
wagenet added a commit to wagenet/strom that referenced this pull request Oct 9, 2026

@srperens srperens left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: Comment. This supersedes my review of 2026-09-15 (at eaf9d999), and the verdict stands. The head is a rebase onto 0216c1c, and the code delta matches what I reviewed before. What blocks approval now is CI. Check (Linux) is red on a stinger timing test that this diff does not plausibly own, and because that step failed, the PR's own new tests never ran at this head.

Requested changes

  1. Rebase onto current main and rerun Check (Linux) (a maintainer can run gh run rerun 37859468638 --failed if the author prefers not to rebase). The strom-types step has to run, since that is where the three wire-contract tests live.

Claims

Claim Verdict Evidence
A block with no overlay state still rejects a take that leaves out an index CONFIRMED The guard is quoted under Diagnosis. The handler maps every trigger_transition error to 400
The red check is unrelated to the diff CONFIRMED prores_4444_keeps_its_alpha fails frames_arrived 29 vs 30 (backend/tests/common/stinger.rs:740 — assert_eq!(report.frames_arrived, n, "{report:?}");). The diff only wraps the stinger's indices in Some(..), and main@d2ae537 is red in the same binary (another_format_after_a_prores_clip_still_airs)
The three wire-contract tests ran on CI UNVERIFIED They run under .github/workflows/ci.yml:177 — run: cargo test --package strom-types, which comes after the failed cargo test --package strom --features efp step and did not run. The integration binaries after stinger_prores_test (the vision mixer suites included) did not run either
No consumer reads TransitionTriggered's indices CONFIRMED The only hit for it in backend/src and frontend/src is the broadcast. Field names and types are unchanged

Diagnosis. Unchanged since the last review. The guard is backend/src/gst/pipeline/effects/take.rs:68 — if overlay_state.is_none() && (from_input.is_none() || to_input.is_none()) {. The vision mixer takes PGM→PVW from its own state, and client indices are honoured only where no state exists. The PiP fallback backend/src/gst/pipeline/effects/take.rs:433 — let from = old_pgm.or(from_input).unwrap_or(0); is reachable only on the single-input path, as before. Coverage is BOUNDED: the 400 path still has no test, as the body says.

Radius. SHARED: one public endpoint's request handling, plus the values (not the shape) of one StromEvent variant.

Overlaps. None. No open PR touches effects/take.rs, TriggerTransitionRequest or this handler, and none of those files changed on main after 0216c1c, so the rebase should be clean.

Tests & CI. At 11a6095, the Build (Linux x86_64/ARM64), Check & Build (WASM) and API Contract Check checks pass. Check (Linux) fails as described above. The vision mixer suites skip GL on CI in any case, so that half stays covered by the author's macOS run only, which the body now says.

Confidence: HIGH

@wagenet
wagenet force-pushed the wagenet/transition-schema branch from 11a6095 to 9772518 Compare October 19, 2026 16:47
wagenet added a commit to wagenet/strom that referenced this pull request Oct 21, 2026
wagenet added a commit to wagenet/strom that referenced this pull request Oct 28, 2026
@wagenet
wagenet force-pushed the wagenet/transition-schema branch 2 times, most recently from 9772518 to d08733a Compare October 28, 2026 16:28
@wagenet
wagenet force-pushed the wagenet/transition-schema branch from d08733a to d2bafcf Compare November 11, 2026 20:40
wagenet and others added 2 commits November 19, 2026 07:36
POST /api/flows/{flow_id}/blocks/{block_id}/transition serves two block
kinds with different contracts. A vision mixer holds authoritative PGM/PVW
bus state and takes between those two sources, discarding from_input and
to_input; a plain compositor registers no such state, and there the two
indices are the only thing naming which pads to animate. The schema
documented only the second case, so every client was told to compute and
send a value that is usually thrown away.

Make both fields Option<usize> with #[serde(default)], documented as
applying only to a block with no live PGM/PVW state. utoipa emits them as
["integer", "null"] and drops them from `required`, which keeps existing
callers wire-compatible.

Supplied-but-unused indices stay accepted and ignored: a client cannot know
whether a block has live state without a pre-flight GET, and that state can
change before the POST lands, which is the same race the discard exists to
prevent. Rejecting them would also break the vision mixer page, which sends
them on every take. A disagreement is logged at debug. Omitting an index on
a block with no live state is a different matter and now returns 400, since
the take is genuinely underspecified rather than merely redundant.

The response body carried the same falsehood: its message echoed the
request indices, which the vision mixer page shows to the operator. Thread
the real PGM/PVW pair back through AppState::trigger_transition and build
the message from it, naming no indices when a bus is a PiP.

StromEvent::TransitionTriggered now carries the authoritative pair too. Its
fields stay usize, so the variant is unchanged and a PiP bus reports 0.

This supersedes main's rule that only a stinger may omit the indices:
a vision mixer takes PGM to PVW whatever the request says, so a cut
without them is now accepted there too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A PiP bus reports 0 for from_input/to_input because the variant's fields
are usize. The explanation lived only at the producer in state.rs; put it
on the wire type, where consumers read it, and regenerate openapi.json.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@wagenet
wagenet force-pushed the wagenet/transition-schema branch from d2bafcf to 1c0d166 Compare November 19, 2026 17:49
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