Skip to content

sidecar: a hold group is one per connection, and the compiler to match - #13

Merged
imbcmdth merged 3 commits into
mainfrom
fix/hold-groups-per-connection
Oct 18, 2026
Merged

imbcmdth merged 3 commits into
mainfrom
fix/hold-groups-per-connection

Conversation

@imbcmdth

Copy link
Copy Markdown
Owner

Three changes so a node's many-stream hold input can carry sound beside each picture, as blitz's compose is about to, plus a compile race found on the way.

A hold group is one per connection (fbdb7e3, sidecar). The sidecar built one hold group per group name and put every stream of every input naming it into that one group, which has one source and one feed at a time. With compose's inputs and a parallel audio input on one group, so a lateral's picture and sound share a connection and an offset, a cam connecting closed the main feed. A group is now keyed by its name and its connection: a port-fed stream by its port, a plan-bound stream by its place among its input's streams, so the k-th picture and the k-th sound pair. A data input on the group joins the group of the port its rows arrive on. A fleet module, shape-group, and a live test check that connecting, dropping and rejoining the second connection leaves the first as one feed, that each connection's sound shares its picture's offset, and that a rejoin re-anchors only that connection.

A lateral may bring some of one call's held many inputs (e924958, compiler). _check_feeder_groups refused a group whose connections reach different sets of calls, which kept switch's picture and sound halves together; it now lets a group through when every connection reaches the same one call through any of its ports, so a picture-only cam beside a main feed with sound compiles, while connections reaching different calls stay refused. Several many inputs writing port lists into one shared param now merge them instead of the last overwriting. An exec test runs two laterals on one many hold group through a real run.

The registry loads once when two compiles read it at once (3b2b8d7, compiler). Two run-time laterals on one data stream compile their instances on two threads, and Registry._ensure_loaded marked itself loaded before reading ffmpeg's filters, so one instance was refused with "unknown function setpts()". A lock fixes it; a test reads the registry on two threads. This is the "unknown function fps()" a user saw once with two cam laterals launched together.

Docs: NODE-CLI.md's hold and group paragraphs, and one bullet in docs/dialect.md.

Checks: cargo fmt and clippy -D warnings clean with default features and --no-default-features; lib and bins 224 and 80; ffrwd_wasm 133; node_shapes 33; live 21; ruff and mypy clean (also linux and darwin); unit tier 5151; exec laterals, feeders and the cookbook's 175 pins green, the model recipes with their files in place.

🤖 Generated with Claude Code

imbcmdth and others added 3 commits October 17, 2026 17:15
The assembler built one hold group per group name, so a node's many hold
inputs on one group shared one source and one feed: with compose's
picture inputs and a parallel sound input on one group, a second lateral
connecting closed the first lateral's feed. A group is now keyed by its
name and its connection: the port for a port-fed stream, and the
stream's place among its input's streams for one bound in the plan. Each
connection has its own source, feed and offset, a picture and a sound on
one connection still share theirs, and a data input on the group follows
the group of the connection its rows arrive on.

shape-group is the test module: many pictures and many sounds held on
one group, with a row per change in each stream's feed. The live test
feeds it on two ports, drops and rejoins the second, and checks that the
first stays one feed, each connection's sound shares its picture's
offset, and the first connection's rows land with its own offset.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Two run-time laterals reading one data stream compile their instances on
threads of their own at the same moment. The registry marked itself
loaded before it had read ffmpeg's filters, so the second thread found
none and refused its instance with "unknown function setpts()". The load
now holds a lock, and a second reader waits for the first.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
compose(k, ARRAY[m.video, c.video], audio => ARRAY[m.audio]) was refused:
m's connection reached compose through `inputs` and `audio` and c's
through `inputs` alone, and the group check wants every connection to
reach the same calls. A group whose every connection reaches one and the
same call is that call's many inputs, so a connection may bring some of
them and not others. Groups whose connections reach different calls,
the switch pair's case, are refused as before.

Every many input of the group now lists the group's connections in its
one port param, in the order first written, where the last input
written used to overwrite the list.

The exec test runs two laterals into shape-group through ffrwd run: m
brings its picture and its sound, c its picture alone a second later;
each is live beside the other on its own origin, and m's sound shares
its picture's offset.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@imbcmdth
imbcmdth merged commit e924958 into main Oct 18, 2026
2 checks passed
@imbcmdth
imbcmdth deleted the fix/hold-groups-per-connection branch October 18, 2026 00: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.

1 participant