fix(osc): float32 readback tolerance for list values; loud placement failures; disarm skips reset layers and always logs (869f8hfra) - #20
Merged
Conversation
…included (869f8hfra) pyossia stores Float and the elements of List/Vec2f as float32. set_value only tolerated that for scalar floats and compared lists with !=, so any scale that is not exactly representable (1200/2160) raised "Could not set .../scale" on every video layer arm, after the value had already been sent. Numbers now compare with math.isclose (rel/abs 1e-6), lists element by element, and every failure reports what was read back. The scalar branch's fixed 1e-5 absolute bound also failed large floats (1920.3); covered too.
…ed on the cue (red, 869f8hfra)
… cue (869f8hfra) When a layer's placement/scale cannot be applied (no output match, or a genuine readback mismatch), arm_videoCue and run_videoCue's GO re-apply logged a WARNING and moved on, so the cue reported "armed" with the layer at default geometry and nothing told the operator. They now log at ERROR with the cue, layer and output, and record the layer in cue._placement_failed, which every arm resets. The cue still arms and plays: a wrong-sized video is better than no video in a live show (Ion, 2026-09-28).
…why (red, 869f8hfra)
…disarm with a reason (869f8hfra) STOP, load and ready_script reset the videocomposer before disarm_all on purpose (instant blackout); disarm then wrote visible 0 to endpoints the reset had removed, 70 "Node not found" per week on medina cupula2, logged at DEBUG. disarm now skips a layer PlayerHandler no longer tracks, keeping the order untouched. Every disarm now logs what it did and why (Ion: a silent disarm, the automatic one at cue end included, is not acceptable): one DEBUG line per cue with a reason (cue_end, stop_action, disabled, project_changed, load, ready_script, shutdown); video cues list the layers unloaded and skipped. A per-layer failure is now a WARNING instead of DEBUG.
…unload (rig-verified, 869f8hfra)
… reason stop; a GO re-apply clears the arm failure (red, 869f8hfra)
- disarm: hiding (visible 0) and unloading are separate; a failed hide no
longer skips the unload and leaves the layer loaded. A failed unload keeps
the layer registered so the next /reset still cleans it up.
- disarm's skipped-layer note says what it knows ("no longer tracked:
removed by reset or quit") and flags a cue with no video client.
- ready_script takes its caller's reason, so a STOP logs "(stop)" and a
load "(load)" instead of "(ready_script)".
- a successful placement re-apply at GO clears the failure recorded at arm.
- the placement ERROR no longer claims default geometry when only one of
position/scale failed.
CI Lint failed on PR #20: black --check flagged OssiaNodes.py, test_video_placement_failure.py and test_ossia.py. Purely cosmetic (blank lines, line width); no behavior change. Re-ran the 3 affected test files after formatting: 54 passed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes ClickUp 869f8hfra. Plan:
cuems-RELATIONS/Plans/2026-09-28-videocue-scale-readback-869f8hfra.mdProblem
On every video layer arm and GO, the engine logged
Could not set …/scaleeven though the value was sent correctly.The ticket blamed an OSC race, but the real cause is a readback check. pyossia stores list elements as float32, and
OssiaNodes.set_valuecompared lists with a strict!=. So0.1sent never equalled0.10000000149…read back.Changes
A.
set_valuetolerance._values_matchcompares recursively. Numbers usemath.isclose(rel/abs 1e-6), and lists must match in length.B. Placement failures are loud. If position or scale cannot be applied:
cue._placement_failed, which is reset on every arm;D. Disarm skips layers
/videocomposer/resetalready removed. STOP resets before it disarms, on purpose, for an instant blackout. Disarm used to write to endpoints that were gone and loggedNode not found. Within disarm, hiding and unloading now fail independently: a failedvisible 0still unloads the layer.D4. Every disarm logs at DEBUG, with a reason:
cue_end,stop,stop_action,load,ready_script,disabled,project_changedorshutdown. A silent disarm is not acceptable.Docs. CLAUDE.md gains two gotchas: the float32 readback, and the fact that engine-driven layers never auto-unload. They freeze on their last frame until the disarm.
Tests come first in each pair of commits. The last pair holds the
/code-reviewfollow-ups.Verification
Engine suite on test2: 818 passed on
rc_1; 853 passed on this branch.Live A/B on test2:
rc_1Could not setNode not foundat STOPDisarm lines carry their reasons, and a bad output name produces the B ERROR while the cue still plays.
Compatibility
Engine only; there is no protocol or config change. Placement messages move from WARNING to ERROR, and disarms now log at DEBUG.