Commit graph

337 commits

Author SHA1 Message Date
Meta Vens
f4f1fcdad7 Merge origin/main into hands/muninn-cut2
Bring H3, the Sleipnir import and the recipe merge into the Cut 2 branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:24:29 +02:00
Meta Vens
f4f1f8592f Merge H3: Sleipnir joins the Muninn workspace with its history
Soul: merge with follow-ups. The CultLib c2a9a6e pin stops acking
unreliable frames, so Sleipnir's 1 s subscribe alone refreshes Muninn's 2 s
HID timeout; H2/H4 replace that path. odin-core 3e96c6c lives only under an
attic tag; repin once the bump reaches Odin main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:22:24 +02:00
Meta Vens
8f59bddf47 Merge route/b3-declare: raven-muninn declares its Odin dependency
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:17:09 +02:00
Meta Vens
ed02890c12 Give Sleipnir the media_delivery field CultLib c2a9a6e requires
Odin main's Sleipnir was written against CultLib a8aedda, and its two
CultNetRudpSocketTransportOptions initialisers do not compile at
Muninn's c2a9a6e pin. media_delivery: None is the field's default, so
behaviour is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:16:07 +02:00
Meta Vens
6a628ee551 Hoist the CultLib and odin-core pins into one workspace table
Sleipnir joins the workspace at Muninn's pins (CultLib c2a9a6e, odin-core
Odin 3e96c6c) instead of Odin main's a8aedda and a path dependency.
Muninn and Sleipnir now move together by construction. Manifests and
lock only; no source change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:11:40 +02:00
Meta Vens
3a12d14e2c Import Sleipnir from Odin 379b826 with history
Merges crates/sleipnir-daemon/{Cargo.toml,src/main.rs} filtered from Odin
main 379b826 (git filter-repo --path, unrelated history). Source is
unchanged; the manifest still carries Odin's pins and is repointed in the
next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:10:42 +02:00
Meta Vens
d564543b70 State the stream rule once: consumers dial the producing Muninn
The input firewall rule is what any producing Muninn needs, not an input
exception or an accepted cost of Q10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:05:34 +02:00
Meta Vens
70f838dfb9 Describe the group send queue and the 250 ms default in the media doc
The streaming doc still said a request naming no latency budget got 2,000 ms
and did not mention that the sender queue is bounded, per-group, and owns the
deadline that repairs inherit. Re-anchor the two main.rs references it moved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:04:39 +02:00
Meta Vens
e66c2565fb Bound the media sender: one deadline owner, whole-group drops, a drivable seam
The sender's queues were unbounded (mpsc::channel plus two VecDeques), expired
payloads one at a time so half a frame could leave after the other half died,
gave repairs a fresh deadline from the clock, spun on a 1 ms sleep, and could
not be driven without PowerShell, ffmpeg and WASAPI. The latency budget also had
two owners: a 2 s producer default that the receiver's 250 ms age never matched.

MediaSendCore (new media_send.rs) owns the queues, hub, feedback intake, repair
cache and budget, and progress counters. run_rudp_mux_once now spawns encoders,
feeds readers into the core and publishes; it decides no deadline.

- The unit is a group: one access unit with its parity, or one audio packet,
  stamped produced_at + the request's latency budget when it leaves the
  packetizer. Expiry is per group; a group is sent whole or not at all.
- Queues are capped per kind (audio 256, video 512 groups), drop the oldest
  group and count it (groups_dropped_audio, groups_dropped_video). The reader
  channel is a bounded sync_channel.
- The Annex B packetizer returns one group per access unit and no longer errors
  on pending overflow: an unfinished access unit larger than the ceiling is
  dropped and counted.
- Repairs inherit the deadline of their frame and are not sent after it. A
  blocked send polls resends and stops at the group deadline; the sleep is gone.
- MUNINN_RUDP_MEDIA_RECEIVER_ASSEMBLY_DEADLINE_MS is deleted. The default budget
  is 250 ms (Q7), used only when a request names none and offered as the
  advertisement's default_latency_budget_ms. The profile loses its three copies
  of the budget; the telemetry JSON carries one latency_budget_ms.
- A test harness drives the real readers and core over loopback through a
  seeded drop relay to a CultNet RUDP client, from a committed H.264 clip
  (testdata/clip.h264, ffmpeg command recorded beside it) and a PCM ramp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:04:17 +02:00
Meta Vens
8d869ca8df Record Q13: no live Sleipnir on Raven, H2 and H4 merge independently
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:01:33 +02:00
Meta Vens
83b3947a8f Record Q11 (muninn-contracts) and Q12 (fold Move evidence in)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:58:10 +02:00
Meta Vens
fe33ce7f10 Re-map the HID cuts H0-H5 to Q9 and Q10 (Imagination pass 3)
Sleipnir moves into the Muninn workspace with its history. Input mirrors
the media request path: Muninn advertises an input stream on CultMesh, the
consumer requests it and dials. Opens Q11-Q13.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:55:22 +02:00
Meta Vens
c3520d10a1 Merge realtime robustness Cuts 0-1: maps corrected, receiver residue deleted
Soul: merge after doc fixes (done in b607592). -565 lines from the producer;
no consumer of the deleted symbols in Muninn, Ratatoskr, Odin, Mimir or
StreamPixels; the bluetoothctl-dependent test now runs through a seam.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 16:09:40 +02:00
Meta Vens
b607592be2 Correct keyframe, GOP, and provenance claims in the media docs
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 16:02:33 +02:00
Meta Vens
88f9ed7ccd Collapse the video parity wire builder to one frame; test stale-identity pruning without bluetoothctl
video_wire_records_with_parity keeps only its single-frame caller. The stale
move-identity prune is split out of reconcile_move_identity_records so its
test no longer shells out to the host Bluetooth binary.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 16:02:33 +02:00
Meta Vens
66e8642f59 Record HID rulings Q9 (Sleipnir in Muninn's workspace) and Q10 (Muninn advertises input streams)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 16:02:10 +02:00
Meta Vens
36d6a79a2a Map Cut 6 (native encoder) and the remote-play HID cuts H0-H5
Cut 6: the donor encoder behind a C ABI in an off-default package, typed
encoder-command records on stdin, built and accepted on Raven by Idunn. HID:
muninn-contracts crate, edges carried on the latest channel with the state, no
Odin main change. Q9 (Sleipnir's home) and Q10 (who dials) open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 14:11:04 +02:00
Meta Vens
4af6c8fac4 Move test-only cultnet imports into the tests module
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 13:59:53 +02:00
Meta Vens
eb332b0d2e Record realtime robustness rulings Q1-Q8 (2026-09-30)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 13:55:27 +02:00
Meta Vens
a189363c23 Drop imports the receiver residue left unused
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 13:51:01 +02:00
Meta Vens
f2a5db9eec Subtract receiver residue from the producer (RR Cut 1)
Delete AudioPacketBuffer (receiver jitter buffer), the whole-stream Annex B
helpers (packetize_video_annex_b_stream, its options structs and wire
wrappers) and encode/decode_record_payload; only tests called them. Re-home
the packetizer-behaviour tests onto VideoAnnexBStreamSendState. Drop the five
audio_packet_buffer tests and the legacy-feedback decode test (CultLib pins
key 10 default in receiver_feedback_decodes_records_written_before_its_last_field).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 13:50:38 +02:00
Meta Vens
2c120c96d7 Correct the Muninn maps against git (RR Cut 0)
teardown-map.md: mark the extraction-era claims as history in place (pin,
symbol counts, diamond, live-exercise note) and correct the false claim that
the sender turns keyframe requests into an IDR. muninn-media-streaming.md:
preset p5, 848-byte chunks, 30 ms resend inside the latency-budget expiry.
Docs only.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 13:47:40 +02:00
Meta Vens
e70db69d76 Map the realtime robustness campaign (Imagination, 2026-09-30)
Operator made the Odin muninn-bounded-realtime-send donor a campaign. FEC moves
to a CultLib cultnet-rs media_fec codec (reed-solomon-erasure) used by both
Muninn and Ratatoskr; bounded whole-frame sender; one latency owner. Q1-Q8 open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 13:46:42 +02:00
Meta Vens
2260853727 Declare the Odin dependency raven-muninn publishes to
Idunn no longer infers how a target proves readiness, and a recipe with
neither a route nor an Odin dependency is refused at admission. raven-muninn
has no route and publishes to Odin over CultMesh RUDP, so its recipe declares
the odin.verse-rendezvous dependency.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 12:51:59 +02:00
Meta Vens
cee7b9c698 Drain expired media without stalling the sender 2026-09-27 21:35:35 +02:00
Meta Vens
7fc2925f4a Drop the comment for the patch that is gone
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 15:03:51 +02:00
Meta Vens
70fe005247 Raven's operator launcher and deploy scripts retire; Idunn owns the host
restart-muninn.ps1, its cmd alias, deploy-raven-muninn-binary.ps1 and
repair-raven-muninn-task-actions.ps1 started and replaced serve on Raven by
hand through a scheduled task and a VBS launcher. Idunn's host actuator is
the only thing that starts serve there now, so they leave rather than stay
as a second launch path. Docs say what replaced them and what remains.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 14:43:38 +02:00
Meta Vens
8e2f935984 Presence publisher sequence survives a restart
Odin admits a signer's presence only above the sequence it last stored,
across the signer's restarts. The sequence is now the observation clock,
which a fresh process cannot restart below.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 14:40:05 +02:00
Meta Vens
24e5b50284 Presence is serve liveness, not controller freshness
A switched-off gamepad made --health fail and so kept the Idunn presence
at warming forever; the daemon was serving the whole time. Presence now
reads the telemetry surface the tick rewrites; source freshness stays in
--health where an operator asked for it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 14:15:23 +02:00
Meta Vens
60ed6b2c85 Pin CultLib by full sha so odin-core and this crate resolve one source
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 14:09:30 +02:00
Meta Vens
033aac0b24 Build from the pins, not from a sibling checkout
The committed workspace patch pointed CultLib at ../CultLib, which only a
workstation with that checkout beside it could satisfy; on Raven the
build died looking for it. odin-core now comes from Odin 3e96c6c, whose
CultLib pin is c2a9a6e like ours, so the diamond closes without a patch.
A developer who wants a local CultLib puts the patch in .cargo/config.toml.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 14:09:04 +02:00
Meta Vens
70d267f97a An Idunn-launched serve presents itself to Odin; a recipe for Raven
When Idunn's host actuator starts serve, it hands over the runtime bundle,
a one-shot activation credential and the host's provider identity. From
those, serve publishes a dual-signed gamecult.runtime_presence_health.v2
record to Odin every two seconds: warming until its own health check
passes, active after. Odin's correlation of that record is what admits
the incarnation and keeps it alive. An operator-started serve has no
bundle and publishes nothing.

deployment/idunn/raven-muninn.toml is the target declaration: one cargo
build step on the host, the daemon and the loopback script as artifacts,
and the launch contract that today's restart script assembles by hand,
with Raven's paths as argument bindings. Cargo.lock is committed so the
build is --locked.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 13:49:30 +02:00
Meta Vens
e2c44ac86c Capture and encoder children are spawned at their own priority class
Windows hands a priority class down to a child only when it is below
normal, so the mux child's above-normal never reached ffmpeg; on a live
stream with the host at 99.8% CPU the encoder ran at normal, 790 video
chunks per 10 s went missing and the mux loop sat a second behind. Raising
the processes in place took that to 116 lost and a 60-chunk backlog with
zero late frames, and the viewer reported every frame arriving. The mux
child and video encoder now run at high, the audio pipeline at
above-normal, from spawn.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 03:41:51 +02:00
Meta Vens
3a03ac577e A failed serve tick is logged and retried, not fatal
serve is the body that must outlive a racing store write or an absent
Odin. It exited on the first "failed to atomically replace" and left its
activation child streaming with nobody answering requests; OBS's own
request sat at pending while it watched the orphan. The tick body now
reports and the loop continues on the next interval. CultLib pin c2a9a6e
carries the store-side retry for the same race.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 02:45:01 +02:00
Meta Vens
3cea88417d A running command is not re-stamped every tick
The "kept existing capture stream" branch wrote the running command back
with the current time on every tick, which made a running command the
newest forever: no request sent tonight could outrank the July start until
this was cut. The spawn transition keeps the command's stamp too. The
teardown map records the audio result: 860 frames and 2,756 audio packets
in 29 s, nothing expired, on a producer host at 93% CPU.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 01:33:05 +02:00
Meta Vens
bc43e1b6e5 Terminal transitions keep a command's own stamp
The command engine orders commands by updated_at, and both terminal
writers, superseding and reaping, re-stamped the dead record with the
current time. A superseded command therefore outranked the command that
had superseded it on the very next tick and respawned; tonight a July
start did that to the stop that ended it. The stamp is the command's
ordinal now: superseding and reaping change state and detail only, with
the exit time carried in the detail. A newer command that was already
handled still shadows an older pending one, which the earlier cut had
broken and the existing test caught.

CultLib pin 47b9fc4: readers no longer stop at acknowledgement-only
packets, which was what starved the video leg once reliable audio shared
the session.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 01:25:58 +02:00
Meta Vens
98b4f0b350 Reliable media resends wait 30 ms; the producer runs above normal priority
5 ms resend was a July LAN value for the old dialled client. A receiver
that polls every 2 ms answers in 3-6 ms, so nearly every audio fragment
was resent before its acknowledgement arrived and the producer's send
loop drowned in retransmits: 7 video frames in 9 s with audio on, 266
without. Audio expires at the assembly deadline regardless.

The activation child now raises itself to above-normal priority, which
its encoder and capture children inherit. Measured on Raven at 93% total
CPU with a game running: at normal priority the mux loop starved and
video backed up 1.5 s before expiring wholesale.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 01:17:13 +02:00
Meta Vens
8c97437a93 Record the first frames across Raven to Starfire
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 01:01:19 +02:00
Meta Vens
58e8663178 Only a live command can be the latest
Reaping a killed child rewrites its command with a fresh stamp. Letting
that stamp compete for "latest" let a July command supersede the request
that had just stopped it and respawn itself with the sources of its day,
which is how the first start request tonight ran with a Focusrite that
no longer exists. Terminal commands are out of the running; a test pins
both halves.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 00:57:38 +02:00
Meta Vens
0b8d738f78 A translated request is stamped by Muninn's clock
The command engine orders commands by comparing updated_at strings. A
consumer's RFC 3339 stamp sorts below every `unix-` stamp Muninn writes,
so the first stop request sent tonight lost to a start command stored in
July and Raven kept encoding to nobody. Translated commands now carry
Muninn's own stamp; the test pins the ordering.

Idunn daemon health on the Raven launch is optional now and omitted by
default: no Idunn manages this host, and the publisher only filled
yggdrasil's firewall log.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 00:52:19 +02:00
Meta Vens
887efa7543 Make the Raven deploy run again from this repository
The loopback capture script the restart ships was still only in Odin's
tree; it lives here now. Both scripts wrote sftp batches that Win32-OpenSSH
rejects today: backslashes in quoted local paths are read as escapes, and
"C:/..." remote paths resolve under the login home rather than the drive.
Local paths go in with slashes and remote Windows paths as "/C:/...".
The alias-carried SSH user is honoured by passing -SshUser "".

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 00:34:37 +02:00
Meta Vens
3823f1e2c0 Drop the media-profile verifier: its subject left the restart script
The check asserted ffmpeg video-proof constants in restart-muninn.ps1 that
were removed with the VideoProof task; the encoder profile lives in the
daemon and its tests. It blocked every deploy for a machine that is gone.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 00:10:29 +02:00
Meta Vens
a8d4416737 Say where the Muninn target records actually live
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 23:43:17 +02:00
Meta Vens
85e4c31810 Record that Muninn has one body now
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 23:40:09 +02:00
Meta Vens
07c70ac4e9 Muninn listens for receivers instead of dialling them
The activation child binds one CultNet RUDP hub on --media-rudp-bind and
serve advertises it as the stream's media_endpoint; receivers dial it and
are known by their connect payload. Video rides the media channel lossy
under parity, audio the new audio channel reliably with the assembly
deadline as expiry, both on one session per receiver. Repairs go back to
the receiver that asked; a receiver silent for 6 s is dropped.

Gone: --obs-target-host/--obs-port (refused with the reason), the second
audio connection, the Odin provider-catalog lookup of an OBS receiver, the
receiver advertisement request-stream used to publish, and the cultmesh://
target requirement on activate. The consumer's host no longer needs a
firewall rule; Raven opens one UDP port, and restart-muninn.ps1 adds it
beside the HID controller rule.

CultLib pin c84cb2e.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 23:03:14 +02:00
Meta Vens
8141eb8663 Record the OBS source and what still blocks a live frame
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 22:22:48 +02:00
Meta Vens
b679fc2879 Advertise streams and take requests in the producer-agnostic shape
Muninn now publishes gamecult.media_stream_advertisement for its A/V
stream beside the Muninn-specific OBS catalog, and each serve tick pulls
gamecult.media_stream_request documents addressed to this host from Odin.
A pending request becomes the capture command the existing tick already
runs — same command id, so the outcome is traceable — and the command's
state is written back onto the request under its stream:receiver key, so
a consumer watches one document. A request naming a codec this producer
cannot encode is answered failed with the supported codecs named, and
never becomes a command.

The translation is a pure function with tests. The node registers the
two CultLib records beside Odin's document set.

  cargo test -p muninn-daemon -> 152 passed

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 22:20:50 +02:00
Meta Vens
faeb5d7efb Record that the receiver feedback path exists
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 21:39:39 +02:00
Meta Vens
0d156beeb6 Take the receiver feedback builder from CultLib
build_receiver_feedback moved to CultLib (34c8ea7): a record both ends
construct belongs beside the record. The sender's repair-cache tests
keep constructing feedback the way a receiver would, now through the
same code the receiver uses.

  cargo test -p muninn-daemon -> 148 passed, no warnings

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 21:35:21 +02:00
Meta Vens
34776ea27a Cut the receiver half of the packetizer; it lives in Ratatoskr now
Frame assembly, the assembly set, reassembly, expired-frame feedback and
their tests were kept here after the September dead-code cut as the seed
for Ratatoskr's reassembly. That seed has been planted (Ratatoskr
2618184, crates/ratatoskr-core/src/video.rs), so the producer stops
carrying code only a consumer runs. 705 lines. What stays is the producer
half: packetize, XOR stripe parity, and build_receiver_feedback, which the
sender's repair-cache tests use to construct what a receiver would say.

Also removes adts_frame, a test helper orphaned by the AAC cut.

  cargo test -p muninn-daemon -> 151 passed, no warnings

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 21:23:33 +02:00