Add typed iPhone face tracking receiver

This commit is contained in:
Meta Vens 2026-08-06 09:43:30 +01:00
commit 525519bdaa
10 changed files with 451 additions and 33 deletions

View file

@ -7,5 +7,6 @@
<Project Path="src/Mimir.VerseRecorder/Mimir.VerseRecorder.csproj" />
<Project Path="src/Mimir.PsMoveProbe/Mimir.PsMoveProbe.csproj" />
<Project Path="src/Mimir.CultMeshMedia/Mimir.CultMeshMedia.csproj" />
<Project Path="src/Mimir.FaceReceiver/Mimir.FaceReceiver.csproj" />
</Folder>
</Solution>

View file

@ -1,5 +1,20 @@
# Implementation Plan
## iPhone TrueDepth face witness
- Implemented: `Mimir.FaceReceiver` admits Epic Live Link Face Apple ARKit UDP
v6 from one configured iPhone/subject into bounded typed
`mimir.face_tracking_observation.v1` CultCache slots. Decoder, normalization,
distinct source/arrival clocks, stale rejection, source restart epoch, and
malformed-value rejection share one commit path with the self-test.
- Physical handoff: install Live Link Face from the App Store, grant Camera and
Local Network consent, select Apple ARKit mode, target Starfire private-LAN
UDP 11111, prove ledger growth, then use Guided Access with Touch disabled.
- Next: publish the Mimir-owned schema through the live authenticated
Yggdrasil/Odin provider boundary and derive an Eve surface. Do not reactivate
retired Starfire Odin, resurrect `Mimir.EveSensorReceiver`, or call an
inaccessible in-process ring a CultMesh publication.
## Current Cut Line
Mimir is now a C# app/runtime plus native reservoir project. The live stream

View file

@ -0,0 +1,104 @@
# iPhone TrueDepth Face Receiver
## Authority map
- Owner: `Mimir.Runtime` admits and normalizes face samples and owns the typed
observation ledger.
- Inputs: Epic Live Link Face Apple ARKit UDP v6 datagrams from the iPhone, the
configured stream identity, and Starfire monotonic arrival time.
- Outputs: bounded `mimir.face_tracking_observation.v1` CultCache documents.
CultMesh publication is a separate provider-boundary cut and is not falsely
claimed by this ingress process.
- Derived state: freshness, packet counts, Odin discovery projections, Eve
status, and later Fensalir/avatar lowering. None of these may rewrite an
admitted observation.
- Forbidden writers: Live Link Face, Starfire scripts, Odin, Eve, OBS, and the
archived `Mimir.EveSensorReceiver` do not own normalized tracking truth.
- Shared paths: live UDP and `--self-test` fixtures use the same v6 decoder,
admission ledger, and stream serialization.
- Cut line: no WebSocket/HTTP receiver, JSON ledger, renderer-owned parser, or
direct phone-to-avatar path. The old Eve sensor socket remains archived.
## Transport
The phone emits Epic's Apple ARKit Live Link Face v6 datagrams over LAN UDP.
Mimir listens on UDP `11111`, validates the complete big-endian packet, admits
61 named channels, and assigns its own monotonic sequence. The first 52 ARKit
blendshape coefficients are bounded to `[0,1]`; the nine head/eye rotation
channels retain their signed values. Source timecode and Starfire arrival time
remain separate because an unproved cross-device clock offset is not latency.
The normalized observation is a typed MessagePack CultCache document in a
bounded `.cc` slot ledger. UDP is only the xenos ingress from the App Store
sender; it is not the internal state protocol. The old Starfire Odin authority
was retired during the Yggdrasil cut, so this receiver does not invent a local
provider or publish to an assumed endpoint. The next publication cut must have
Odin accept this Mimir-owned `.cc` schema through the live authenticated
provider boundary and expose the derived Eve surface.
Run on Starfire:
```powershell
dotnet run --project .\src\Mimir.FaceReceiver\Mimir.FaceReceiver.csproj -- --bind 0.0.0.0:11111 --stream iphone-xs-max-face --ledger state\mimir-face-observations.cc
```
Windows Firewall must allow inbound UDP 11111 for the selected private LAN
profile. Do not open this port to the public internet.
## Sender and signing decision
Use Epic's free **Live Link Face** App Store app in Apple ARKit mode. This is
the minimum Windows-practical sender: it supports network streaming of ARKit
animation data, needs iOS 16 or later, and the iPhone XS Max has the required
front TrueDepth/ARKit capability. Its newer real-time MetaHuman workflow says
iPhone 12 or later; that is a different mode and is not the receiver contract
used here.
A custom Mimir iOS sender is not a Windows-only deployment path. Building and
signing an ARKit app requires macOS with Xcode plus an Apple development team
and provisioning profile. `pymobiledevice3` can inspect the phone and install
an already signed IPA; it does not replace Xcode's iOS SDK build, entitlement,
code-signing, and provisioning authority. A custom app therefore requires a
Mac/Xcode handoff (or an external macOS CI/signing service) before Starfire can
install the resulting signed IPA.
Starfire USB inspection on 2026-08-06 verified the attached device as
`iPhone11,6` running iOS `18.7.9`, paired and reachable through
`pymobiledevice3`. The installed-app inventory contained no Live Link Face app.
Device identifiers are intentionally excluded from this repository.
## Exact phone-side handoff
1. On the iPhone, install **Live Link Face** by Epic Games from the App Store.
2. Join the same private LAN as Starfire. Obtain Starfire's active LAN IPv4
address with `Get-NetIPAddress -AddressFamily IPv4` and exclude loopback,
APIPA, VPN, and disconnected adapters.
3. Launch Live Link Face and grant Camera and Local Network permission. Select
the Apple ARKit / non-MetaHuman realtime mode.
4. In Live Link Face settings, add Starfire's LAN IPv4 address as a Live Link
target and set UDP port `11111`. Enable **Always Send Face Pose** if the app
exposes it, so loss of face detection remains observable rather than looking
like receiver death.
5. Return to capture, face the TrueDepth camera, and confirm Mimir reports
advancing accepted frames. Do not infer success from app preview alone.
6. With the desired screen active, start Guided Access. In Guided Access
Options disable Touch, keep auto-lock at Never, then start the session. This
makes the ghost-touch panel non-authoritative while tracking continues.
Voice Control can be used for the one-time setup before Touch is disabled.
7. Mount the phone with the front sensor array unobstructed and provide power.
The only unresolved physical handoff is installing/configuring the App Store
app and granting its first-run permissions. No receiver code can perform those
consent actions through `pymobiledevice3`.
## Verification
```powershell
dotnet run --project .\src\Mimir.FaceReceiver\Mimir.FaceReceiver.csproj -- --self-test
```
The self-test proves v6 big-endian decode, 61-channel normalization, typed
MessagePack document roundtrip, stale-frame rejection, restart epochs, and
rejection of a non-finite channel. Hardware
acceptance requires a real datagram from the configured phone and growth of the
`.cc` ledger; it cannot be claimed before the App Store sender is installed.

View file

@ -1,5 +1,18 @@
# Current System Map
## iPhone face-tracking ingress
`Mimir.FaceReceiver` owns the Starfire-local ingress from Epic Live Link Face.
It validates Apple ARKit Live Link UDP v6 and calls the same
`MimirFaceObservationLedger` used by replay/self-test. Mimir assigns normalized
sequence, source epoch, and arrival time, then stores bounded
`mimir.face_tracking_observation.v1` slots in CultCache. CultMesh publication is
not yet wired: the retired Starfire Odin path must not be revived, and the live
Yggdrasil provider boundary has not been assumed. The phone, Starfire, Odin,
Eve, OBS, and Fensalir do not own admitted face truth. Source timecode and
Starfire arrival carry distinct clock-domain fields until a cross-device clock
model exists.
Source-level code ownership is mapped in [[docs/code-algorithm-map|Code Algorithm Map]].
The indexed problem-domain map is
[[docs/perfect-machine-domain-index|Perfect Machine Domain Index]]; the

View file

@ -1,5 +1,21 @@
# Fresh Workspace Handoff
## 2026-08-06 iPhone face witness
Mimir now has a narrow Starfire receiver for Epic Live Link Face Apple ARKit
UDP v6 in `src/Mimir.FaceReceiver`, with normalization/ledger contracts in
`Mimir.Runtime`. It persists a bounded typed MessagePack
`mimir.face_tracking_observation.v1` CultCache ledger; no JSON/HTTP or
archived Eve sensor receiver path owns live state. Build and `--self-test` pass.
The USB-attached `iPhone11,6` on iOS 18.7.9 is paired and reachable, but Live
Link Face is not installed. Next physical action: install the App Store app,
grant Camera/Local Network, select Apple ARKit mode, target Starfire LAN IPv4
UDP 11111, confirm advancing accepted frames/`.cc` state, then enter Guided
Access with Touch disabled. See `docs/iphone-truedepth-face-receiver.md`.
CultMesh/Eve publication remains a named next cut through the live authenticated
Yggdrasil/Odin provider boundary; this pass does not revive retired Starfire
Odin or pretend an in-process ring is published state.
This is the short re-entry packet for `E:\Projects\Mimir`.
Do not trust this file for exact branch, HEAD, or dirty state. Ask git.

View file

@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Mimir.Runtime\Mimir.Runtime.csproj" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,106 @@
using System.Diagnostics;
using System.Net;
using System.Net.Sockets;
using GameCult.Caching;
using GameCult.Caching.MessagePack;
using Mimir.Runtime.Synchronization;
if (args.Contains("--self-test", StringComparer.OrdinalIgnoreCase)) return await RunSelfTestAsync();
var bind = ParseEndpoint(Parse(args, "--bind", "0.0.0.0:11111"));
var streamId = Parse(args, "--stream", "iphone-xs-max-face");
var cachePath = Path.GetFullPath(Parse(args, "--ledger", Path.Combine("state", "mimir-face-observations.cc")));
var slots = Math.Clamp(int.Parse(Parse(args, "--slots", "3600")), 60, 216000);
Directory.CreateDirectory(Path.GetDirectoryName(cachePath)!);
using var cache = await CultCacheMessagePack.OpenAsync(cachePath, new CultCacheOpenOptions { PullOnOpen = File.Exists(cachePath) });
using var udp = new UdpClient(bind);
using var stopping = new CancellationTokenSource();
Console.CancelKeyPress += (_, eventArgs) => { eventArgs.Cancel = true; stopping.Cancel(); };
var ledger = new MimirFaceObservationLedger(streamId);
long accepted = 0, rejected = 0;
Console.Error.WriteLine($"Mimir face receiver owns udp://{bind} -> {cachePath}; stream={streamId}; schema=mimir.face_tracking_observation.v1");
try
{
while (!stopping.IsCancellationRequested)
{
var datagram = await udp.ReceiveAsync(stopping.Token);
var arrivalNs = checked(Stopwatch.GetElapsedTime(0, Stopwatch.GetTimestamp()).Ticks * 100L);
if (!MimirLiveLinkFaceDecoder.TryDecode(datagram.Buffer, out var packet, out var error) ||
!ledger.TryAdmit(packet!, arrivalNs, out var observation, out error))
{
rejected++;
if (rejected <= 3 || rejected % 120 == 0) Console.Error.WriteLine($"rejected={rejected}: {error}");
continue;
}
var admitted = observation!;
await cache.UpsertAsync(admitted, new CultRecordHandle<MimirFaceTrackingObservation>(
new CultRecordKey($"mimir-face:{streamId}:slot:{admitted.Sequence % (ulong)slots:D6}")));
accepted++;
if (accepted % 60 == 0) { await cache.FlushAsync(soft: true); Console.Error.WriteLine($"accepted={accepted} rejected={rejected} sourceFrame={admitted.SourceFrame}"); }
}
}
catch (OperationCanceledException) when (stopping.IsCancellationRequested) { }
finally { await cache.FlushAsync(); }
return 0;
static string Parse(IReadOnlyList<string> args, string name, string fallback)
{
for (var i = 0; i < args.Count - 1; i++) if (string.Equals(args[i], name, StringComparison.OrdinalIgnoreCase)) return args[i + 1];
return fallback;
}
static IPEndPoint ParseEndpoint(string value)
{
var split = value.LastIndexOf(':');
if (split <= 0 || !int.TryParse(value[(split + 1)..], out var port)) throw new ArgumentException($"Invalid endpoint: {value}");
var host = value[..split];
return new IPEndPoint(host is "0.0.0.0" or "*" ? IPAddress.Any : IPAddress.Parse(host), port);
}
static async Task<int> RunSelfTestAsync()
{
using var memory = new MemoryStream();
using var writer = new BinaryWriter(memory, System.Text.Encoding.UTF8, leaveOpen: true);
writer.Write(MimirLiveLinkFaceDecoder.SupportedVersion);
WriteString(writer, "iphone11,6");
WriteString(writer, "MimirFace");
WriteUInt32(writer, 42); WriteUInt32(writer, 0); WriteUInt32(writer, 60); WriteUInt32(writer, 1);
writer.Write((byte)MimirLiveLinkFaceDecoder.ChannelCount);
for (var index = 0; index < MimirLiveLinkFaceDecoder.ChannelCount; index++) WriteSingle(writer, index == 17 ? 0.75f : 0f);
var bytes = memory.ToArray();
if (!MimirLiveLinkFaceDecoder.TryDecode(bytes, out var packet, out var error)) { Console.Error.WriteLine(error); return 1; }
var decodedPacket = packet!;
var ledger = new MimirFaceObservationLedger("iphone-xs-max-face");
if (!ledger.TryAdmit(decodedPacket, 123456, out var observation, out error) || observation is null ||
observation.ChannelNames.Length != 61 || observation.ChannelValues[17] != 0.75f || observation.SourceFrame != 42)
{ Console.Error.WriteLine(error.Length == 0 ? "normalized observation mismatch" : error); return 1; }
var encoded = MessagePack.MessagePackSerializer.Serialize(observation);
var decoded = MessagePack.MessagePackSerializer.Deserialize<MimirFaceTrackingObservation>(encoded);
if (decoded.ObservationId != observation.ObservationId) { Console.Error.WriteLine("typed observation MessagePack roundtrip mismatch"); return 1; }
bytes[^1] = 0x7f;
bytes[^2] = 0xff;
bytes[^3] = 0xff;
bytes[^4] = 0xff;
if (MimirLiveLinkFaceDecoder.TryDecode(bytes, out _, out _)) { Console.Error.WriteLine("non-finite channel was admitted"); return 1; }
var stalePacket = decodedPacket with { Frame = 41 };
if (ledger.TryAdmit(stalePacket, 123457, out _, out _)) { Console.Error.WriteLine("stale frame was admitted"); return 1; }
var restartedPacket = decodedPacket with { Frame = 1 };
if (!ledger.TryAdmit(restartedPacket, 1_100_123_458, out var restarted, out _) || restarted?.SourceEpoch != 1) { Console.Error.WriteLine("source restart epoch was not admitted"); return 1; }
var testLedgerPath = Path.Combine(Path.GetTempPath(), $"mimir-face-self-test-{Guid.NewGuid():N}.cc");
try
{
using (var cache = await CultCacheMessagePack.OpenAsync(testLedgerPath, new CultCacheOpenOptions { PullOnOpen = false }))
{
await cache.UpsertAsync(restarted!, new CultRecordHandle<MimirFaceTrackingObservation>(new CultRecordKey("mimir-face:self-test:slot:000000")));
await cache.FlushAsync();
}
if (!File.Exists(testLedgerPath) || new FileInfo(testLedgerPath).Length == 0) { Console.Error.WriteLine("CultCache ledger was not persisted"); return 1; }
}
finally { if (File.Exists(testLedgerPath)) File.Delete(testLedgerPath); }
Console.WriteLine("Mimir face receiver self-test passed: Live Link Face v6 decode, admission, typed observation roundtrip, malformed/stale rejection, restart epoch, CultCache persistence.");
return 0;
static void WriteString(BinaryWriter target, string value) { var bytes = System.Text.Encoding.UTF8.GetBytes(value); WriteUInt32(target, checked((uint)bytes.Length)); target.Write(bytes); }
static void WriteUInt32(BinaryWriter target, uint value) { Span<byte> bytes = stackalloc byte[4]; System.Buffers.Binary.BinaryPrimitives.WriteUInt32BigEndian(bytes, value); target.Write(bytes); }
static void WriteSingle(BinaryWriter target, float value) => WriteUInt32(target, unchecked((uint)BitConverter.SingleToInt32Bits(value)));
}

View file

@ -0,0 +1,156 @@
using System.Buffers.Binary;
using GameCult.Caching;
using MessagePack;
namespace Mimir.Runtime.Synchronization;
[CultDocument("mimir.face_tracking_observation", "mimir.face_tracking_observation.v1")]
[MessagePackObject]
public sealed record MimirFaceTrackingObservation(
[property: Key(0), CultName] string ObservationId,
[property: Key(1)] string StreamId,
[property: Key(2)] string DeviceId,
[property: Key(3)] string SubjectName,
[property: Key(4)] string ProducerId,
[property: Key(5)] string HostId,
[property: Key(6)] ulong Sequence,
[property: Key(7)] long SourceFrame,
[property: Key(8)] int SourceSubFrame,
[property: Key(9)] int FrameRateNumerator,
[property: Key(10)] int FrameRateDenominator,
[property: Key(11)] long ArrivalTimestampNs,
[property: Key(12)] string SourceClockDomainId,
[property: Key(13)] string ArrivalClockDomainId,
[property: Key(14)] ulong SourceEpoch,
[property: Key(15)] string[] ChannelNames,
[property: Key(16)] float[] ChannelValues,
[property: Key(17)] string SourceProtocol);
public sealed record MimirLiveLinkFacePacket(
byte Version, string DeviceId, string SubjectName, uint Frame, uint SubFrame,
uint FrameRateNumerator, uint FrameRateDenominator, float[] Channels);
public static class MimirLiveLinkFaceDecoder
{
// Epic AppleARKitLiveLinkSource v6 wire layout, independently mirrored by
// https://github.com/Jules-NC/GodotARKit/blob/main/arkit_packet.gd
public const byte SupportedVersion = 6;
public const int ChannelCount = 61;
public static readonly string[] ChannelNames =
[
"EyeBlinkLeft", "EyeLookDownLeft", "EyeLookInLeft", "EyeLookOutLeft", "EyeLookUpLeft",
"EyeSquintLeft", "EyeWideLeft", "EyeBlinkRight", "EyeLookDownRight", "EyeLookInRight",
"EyeLookOutRight", "EyeLookUpRight", "EyeSquintRight", "EyeWideRight", "JawForward",
"JawRight", "JawLeft", "JawOpen", "MouthClose", "MouthFunnel", "MouthPucker",
"MouthRight", "MouthLeft", "MouthSmileLeft", "MouthSmileRight", "MouthFrownLeft",
"MouthFrownRight", "MouthDimpleLeft", "MouthDimpleRight", "MouthStretchLeft",
"MouthStretchRight", "MouthRollLower", "MouthRollUpper", "MouthShrugLower",
"MouthShrugUpper", "MouthPressLeft", "MouthPressRight", "MouthLowerDownLeft",
"MouthLowerDownRight", "MouthUpperUpLeft", "MouthUpperUpRight", "BrowDownLeft",
"BrowDownRight", "BrowInnerUp", "BrowOuterUpLeft", "BrowOuterUpRight", "CheekPuff",
"CheekSquintLeft", "CheekSquintRight", "NoseSneerLeft", "NoseSneerRight", "TongueOut",
"HeadYaw", "HeadPitch", "HeadRoll", "LeftEyeYaw", "LeftEyePitch", "LeftEyeRoll",
"RightEyeYaw", "RightEyePitch", "RightEyeRoll"
];
public static bool TryDecode(ReadOnlySpan<byte> payload, out MimirLiveLinkFacePacket? packet, out string error)
{
packet = null;
error = string.Empty;
var reader = new BigEndianReader(payload);
if (!reader.TryByte(out var version) || version != SupportedVersion)
{
error = "Live Link Face packet version is absent or unsupported; expected v6.";
return false;
}
if (!reader.TryString(out var deviceId) || !reader.TryString(out var subjectName) ||
!reader.TryUInt32(out var frame) || !reader.TryUInt32(out var subFrame) ||
!reader.TryUInt32(out var fps) || !reader.TryUInt32(out var denominator) ||
!reader.TryByte(out var count) || count != ChannelCount)
{
error = "Live Link Face v6 header is truncated or does not declare 61 channels.";
return false;
}
var channels = new float[ChannelCount];
for (var index = 0; index < channels.Length; index++)
{
if (!reader.TrySingle(out channels[index]) || !float.IsFinite(channels[index]))
{
error = $"Live Link Face channel {index} is truncated or non-finite.";
return false;
}
}
if (reader.Remaining != 0 || string.IsNullOrWhiteSpace(deviceId) || string.IsNullOrWhiteSpace(subjectName) || denominator == 0)
{
error = "Live Link Face packet has trailing bytes or invalid identity/timecode.";
return false;
}
packet = new(version, deviceId, subjectName, frame, subFrame, fps, denominator, channels);
return true;
}
private ref struct BigEndianReader
{
private readonly ReadOnlySpan<byte> bytes;
private int offset;
public BigEndianReader(ReadOnlySpan<byte> bytes) { this.bytes = bytes; offset = 0; }
public int Remaining => bytes.Length - offset;
public bool TryByte(out byte value) { value = 0; if (Remaining < 1) return false; value = bytes[offset++]; return true; }
public bool TryUInt32(out uint value) { value = 0; if (Remaining < 4) return false; value = BinaryPrimitives.ReadUInt32BigEndian(bytes[offset..]); offset += 4; return true; }
public bool TrySingle(out float value) { value = 0; if (!TryUInt32(out var bits)) return false; value = BitConverter.Int32BitsToSingle(unchecked((int)bits)); return true; }
public bool TryString(out string value)
{
value = string.Empty;
if (!TryUInt32(out var length) || length == 0 || length > 1024 || Remaining < length) return false;
value = System.Text.Encoding.UTF8.GetString(bytes.Slice(offset, checked((int)length)));
offset += checked((int)length);
return true;
}
}
}
public sealed class MimirFaceObservationLedger(string streamId, string hostId = "starfire", string producerId = "mimir.runtime.face-receiver")
{
private ulong sequence;
private ulong sourceEpoch;
private uint? lastSourceFrame;
private long? lastArrivalTimestampNs;
private string? boundIdentity;
public bool TryAdmit(MimirLiveLinkFacePacket packet, long arrivalTimestampNs, out MimirFaceTrackingObservation? observation, out string error)
{
ArgumentNullException.ThrowIfNull(packet);
observation = null;
error = string.Empty;
var identity = $"{packet.DeviceId}\n{packet.SubjectName}";
if (boundIdentity is null) boundIdentity = identity;
if (!string.Equals(boundIdentity, identity, StringComparison.Ordinal))
{
error = "Face stream identity changed; one ledger admits exactly one configured device and subject.";
return false;
}
if (lastSourceFrame is { } prior && packet.Frame <= prior)
{
var restartGap = lastArrivalTimestampNs is { } lastArrival && arrivalTimestampNs - lastArrival >= 1_000_000_000L;
if (!restartGap)
{
error = $"Duplicate or stale face frame {packet.Frame} arrived after {prior}.";
return false;
}
sourceEpoch++;
}
lastSourceFrame = packet.Frame;
lastArrivalTimestampNs = arrivalTimestampNs;
var admittedSequence = sequence++;
var values = packet.Channels.ToArray();
for (var index = 0; index < 52; index++) values[index] = Math.Clamp(values[index], 0f, 1f);
observation = new($"{streamId}:{admittedSequence:D20}", streamId, packet.DeviceId, packet.SubjectName,
producerId, hostId, admittedSequence, packet.Frame, checked((int)packet.SubFrame),
checked((int)packet.FrameRateNumerator), checked((int)packet.FrameRateDenominator), arrivalTimestampNs,
"iphone-livelink-timecode", "starfire-monotonic", sourceEpoch,
MimirLiveLinkFaceDecoder.ChannelNames.ToArray(), values,
"epic.livelinkface.applearkit.udp.v6");
return true;
}
}

View file

@ -205,3 +205,5 @@
{"ts": "2026-07-17T10:46:17+01:00", "type": "verification", "status": "ok", "note": "Final snapshot-only Muninn/Sleipnir input build delivered 100/100 one-frame A-button presses and releases over Raven LAN under seeded 5% datagram loss (254/5251 dropped): Starfire observer 100/100, Muninn captured 200 semantic edges, Raven observer 100/100, final pad neutral, proxy queue overflow zero/max queue 28. Raven-visible hold duration median 29.166 ms, p95 36.719 ms, p99 62.667 ms, max 118.074 ms; retransmission tail remains the next latency pressure point."}
{"ts": "2026-07-17T11:20:23+01:00", "type": "rejected_path", "status": "ok", "note": "Application semantic replay over the reliable hid.edge channel was built and field-falsified under 5% loss: new reliable duplicates accumulated transport debt and worsened Raven-visible holds to multi-second outliers. The reliable replay cut was deleted; semantic assist must never create retransmission debt."}
{"ts": "2026-07-17T11:20:23+01:00", "type": "verification", "status": "ok", "note": "Native 1 ms XInput witnesses replaced scheduling-contaminated PowerShell polling. Under concurrent sustained Raven media at seeded 1% loss and 100 one-frame input taps at seeded 5% loss, dual-path input (one reliable hid.edge owner plus bounded unreliable unordered hid.edge.assist repeats) delivered exact 100/100 and final neutral. Raven hold p95 improved 78.875->38.000 ms, p99 264.745->53.235 ms, max 272.107->59.028 ms; network-added median 11.617 ms, p95 17.387 ms, max 23.267 ms; media and input proxy queue overflow remained zero."}
{"ts": "2026-08-06T09:37:57+01:00", "type": "implementation", "status": "partial", "note": "Mimir now owns a typed iPhone face witness ingress: Live Link Face Apple ARKit UDP v6 is validated and normalized into mimir.face_tracking_observation.v1, projected as a MessagePack CultMesh ring frame, and persisted in a bounded CultCache ledger. Release build and decoder/admission/roundtrip/malformed self-test pass. Starfire USB inspection verified iPhone11,6 on iOS 18.7.9 and confirmed Live Link Face is not installed, so hardware field acceptance remains gated on App Store install, consent, and target configuration."}
{"ts": "2026-08-06T09:41:50+01:00", "type": "correction", "status": "ok", "note": "Pre-commit Modeling cut the inaccessible in-process CultMesh ring and its false publication claim. The completed receiver output is bounded typed mimir.face_tracking_observation.v1 CultCache state; live CultMesh/Eve publication remains a separate authenticated Yggdrasil/Odin provider-boundary cut. Arrival time conversion is overflow-safe, source and arrival clock domains are distinct, channel ordering follows the protocol parser reference, and admission now binds one device/subject with stale rejection and explicit restart epochs."}

View file

@ -1,7 +1,7 @@
workspace:
name: Mimir
status: active
focus: direct-driver-fensalir-stream-app
focus: iphone-truedepth-face-witness
implementation_name: Mimir public surface / native runtime contracts
premise: >
Mimir is the local realtime field machine: cameras, microphones, speakers,
@ -15,10 +15,12 @@ objective:
microphones, two speakers, Leap timing, Fensalir GPU rendering, Faust DSP,
Eve operator surfaces, and Yggdrasil site publication.
current: >
Promote the active bioacoustic packet-song receiver into runtime state:
self-identifying song contours should pin multiple time/frequency anchors
per heard call, learn per-path response, and drive the audio actuator while
direct camera/audio capture continues feeding Mimir.Runtime buffers.
Admit a salvaged iPhone XS Max as a face-tracking-only witness: Epic Live
Link Face supplies Apple ARKit UDP v6 datagrams, while Mimir.Runtime owns
normalization and the typed CultCache observation ledger. Hardware
acceptance waits on App Store installation and phone-side
consent/configuration; CultMesh/Eve publication waits on the live
authenticated Yggdrasil/Odin provider boundary.
constraints:
- Sender is Windows.
@ -87,6 +89,18 @@ invariants:
are temporary smoke/bootstrap edges only.
accepted_design:
- The iPhone TrueDepth face path is Mimir-owned, not Starfire-owned. Epic Live
Link Face is the minimum Windows-practical sender and UDP v6 is only its
xenos ingress. `MimirLiveLinkFaceDecoder` validates the complete big-endian
61-channel packet; `MimirFaceObservationLedger` owns monotonic admission and
emits bounded typed MessagePack `mimir.face_tracking_observation.v1`
CultCache `.cc` slots. Source timecode and Starfire arrival keep separate
clock domains, and sender restart increments an explicit source epoch.
CultMesh/Eve publication is not yet wired and must cross the live
authenticated Yggdrasil/Odin provider boundary; the retired Starfire Odin
and archived WebSocket sensor receiver are not revived. A custom sender
requires macOS/Xcode signing; pymobiledevice3 can inspect/install an already
signed artifact but is not signing authority.
- Muninn video FEC is typed as `muninn.media_video_parity_shard.v4`.
Odin divides each access unit into independent blocks of at most eight data
shards and emits four Cauchy GF(256) parity rows for every block, including
@ -779,31 +793,11 @@ current_status:
Kiyo 30.18 fps, PS3 Eye 0 59.66 fps, and PS3 Eye 1 59.95 fps. A mouse in
the Leap USB neighborhood does not reproduce the Focusrite-induced collapse.
next_action: >
Use the stable single-provider Nightwing Move stream to collect a spatially
diverse stereo calibration session. Calibrate each Eye's intrinsics, fit
their relative extrinsics from timestamped same-ID correspondences, use
apparent orb radius only as a weighted distance cue after radius calibration,
and publish typed camera calibration plus residual evidence. Do not claim
precise camera matrices from overlap or radius alone. Then feed calibrated
witnesses through MimirMoveFusion and the named Fensalir proof spine.
Current app testing proves Fensalir WASAPI output wakes Scarlett speaker
loopback, live mic buffers stay populated, runtime sync analysis now runs as
a bounded rotating service without UI/telemetry re-entry, and the bioacoustic
motif timeline produces deterministic synthetic active sync. The next
invariant is self-identifying song contours producing stable intra-call
time/frequency anchors and clock fits through real loopback and microphones,
so the actuator can use decoded time instead of filtered lag guesses.
Replace the remaining
diagnostic JSON-line process bridges with direct native capture drivers that
push buffer handles into Mimir.Runtime. Mimir.BufferSmoke still proves live buffers and sync reports
for Scarlett loopback, Focusrite mic, Kiyo mic, and Kiyo Pro mic when
calibration witnesses are playing. Treat PS3 Eye audio as
enumeration/runtime-fragile, not unavailable. Keep the Focusrite away from
the Leap USB neighborhood. The Scarlett Solo 4th Gen is now attached to
Starfire, and `native/probes/asio_audio_cadence` proves local Focusrite USB
ASIO access with 4 inputs / 2 outputs including Loopback 1/2, 192-frame
preferred buffers, 44.1-192 kHz support, and nonzero 4-channel Int32LSB
input callbacks at 192 kHz. Raven also has a 192 kHz loopback-capable
Scarlett for co-streamer/game timing evidence, but Starfire owns the heavy
soundfield and sensor-fusion work. Treat Kiyo Pro as a ~25 fps source until
its SuperSpeed negotiation is fixed.
Install Epic Live Link Face from the App Store on the paired iPhone11,6,
grant Camera and Local Network consent, select Apple ARKit mode, and target
Starfire's private-LAN IPv4 UDP port 11111. Run Mimir.FaceReceiver and prove
advancing accepted source frames plus growth of the CultCache observation
ledger. Then enter Guided Access with Touch disabled so the damaged
digitizer cannot steer the dedicated tracker. Publish the accepted schema
through the authenticated Yggdrasil/Odin boundary in a separate
CultMesh/Eve cut.