Ingest Muninn Move identity records

This commit is contained in:
Meta Vens 2026-06-17 03:49:55 +01:00
commit 3103a7aa27
3 changed files with 87 additions and 0 deletions

View file

@ -109,6 +109,11 @@ if (args.Any(arg => string.Equals(arg, "--muninn-move-evidence-smoke", StringCom
ParseStringOption(args, "--native-reservoir", DefaultNativeReservoirPath()));
}
if (args.Any(arg => string.Equals(arg, "--muninn-move-identity-smoke", StringComparison.OrdinalIgnoreCase)))
{
return RunMuninnMoveIdentitySmoke();
}
if (args.Any(arg => string.Equals(arg, "--muninn-move-cultmesh-stream-smoke", StringComparison.OrdinalIgnoreCase)))
{
return RunMuninnMoveCultMeshStreamSmoke(
@ -1637,6 +1642,38 @@ static int RunMuninnMoveEvidenceSmoke(string nativeReservoirPath)
: 1;
}
static int RunMuninnMoveIdentitySmoke()
{
var identity = new MuninnMoveIdentityDocument(
IdentityId: "starfire:move-000704a800d0:move-identity",
HostId: "starfire",
MoveId: "move-000704a800d0",
SourcePath: @"windows-psmove:\\?\hid#vid_054c&pid_03d5&col01#a&976df89&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}",
BluetoothHostAddress: "5C:93:A2:9C:A8:A8",
State: "usb-visible",
Detail: "Muninn discovered this PS Move on a local USB/HID input path.",
ObservedAt: "2026-06-17T02:24:16.0000000Z");
var encoded = MessagePackSerializer.Serialize(identity);
var decoded = MessagePackSerializer.Deserialize<MuninnMoveIdentityDocument>(encoded);
var snapshot = MimirMuninnMoveEvidenceAdapter.BuildIdentitySnapshots([decoded]).Single();
var expectedHash = MimirMuninnMoveEvidenceAdapter.Fnva64("starfire:move-000704a800d0");
Console.WriteLine(
$"muninn-move-identity-smoke identity={snapshot.IdentityId} move={snapshot.MoveId} source={snapshot.SourcePath} bluetoothHost={snapshot.BluetoothHostAddress} state={snapshot.State} observedNs={snapshot.ObservedAtNs} controllerHash=0x{snapshot.ControllerIdHash:X}");
return snapshot.IdentityId == identity.IdentityId &&
snapshot.HostId == "starfire" &&
snapshot.MoveId == "move-000704a800d0" &&
snapshot.SourcePath.Contains("vid_054c&pid_03d5", StringComparison.OrdinalIgnoreCase) &&
snapshot.BluetoothHostAddress == "5C:93:A2:9C:A8:A8" &&
snapshot.State == "usb-visible" &&
snapshot.ObservedAtNs > 0 &&
snapshot.ControllerIdHash == expectedHash
? 0
: 1;
}
static int RunMuninnMoveCultMeshStreamSmoke(string nativeReservoirPath)
{
if (!File.Exists(nativeReservoirPath))

View file

@ -40,6 +40,29 @@ public sealed record MuninnMoveControllerStateDocument(
[property: Key(11)] string ObservedAt,
[property: Key(12)] string SourcePath = "");
[CultDocument("muninn.move_identity", "muninn.move_identity.v1")]
[MessagePackObject]
public sealed record MuninnMoveIdentityDocument(
[property: Key(0)] string IdentityId,
[property: Key(1)] string HostId,
[property: Key(2)] string MoveId,
[property: Key(3)] string SourcePath,
[property: Key(4)] string BluetoothHostAddress,
[property: Key(5)] string State,
[property: Key(6)] string Detail,
[property: Key(7)] string ObservedAt);
public sealed record MimirMuninnMoveIdentitySnapshot(
string IdentityId,
string HostId,
string MoveId,
string SourcePath,
string BluetoothHostAddress,
string State,
string Detail,
ulong ObservedAtNs,
ulong ControllerIdHash);
[MessagePackObject]
public sealed record MimirMuninnMoveEvidenceStreamFrame(
[property: Key(0)] string FrameId,
@ -126,6 +149,32 @@ public static class MimirMuninnMoveEvidenceAdapter
.ToArray();
}
public static IReadOnlyList<MimirMuninnMoveIdentitySnapshot> BuildIdentitySnapshots(
IEnumerable<MuninnMoveIdentityDocument> identities)
{
ArgumentNullException.ThrowIfNull(identities);
return identities
.Select(ToIdentitySnapshot)
.OrderBy(identity => identity.MoveId, StringComparer.Ordinal)
.ThenByDescending(identity => identity.ObservedAtNs)
.ToArray();
}
public static MimirMuninnMoveIdentitySnapshot ToIdentitySnapshot(MuninnMoveIdentityDocument identity)
{
ArgumentNullException.ThrowIfNull(identity);
return new MimirMuninnMoveIdentitySnapshot(
IdentityId: identity.IdentityId,
HostId: identity.HostId,
MoveId: identity.MoveId,
SourcePath: identity.SourcePath,
BluetoothHostAddress: identity.BluetoothHostAddress,
State: identity.State,
Detail: identity.Detail,
ObservedAtNs: ObservedAtToUnixNs(identity.ObservedAt),
ControllerIdHash: Fnva64($"{identity.HostId}:{identity.MoveId}"));
}
public static MimirNativeMoveEvidenceSample ToNativeSample(MuninnMoveMarkerCandidateDocument marker)
{
ArgumentNullException.ThrowIfNull(marker);

View file

@ -143,3 +143,4 @@
{"ts":"2026-06-16T00:05:00+01:00","type":"correction","status":"ok","note":"Corrected the transport model: CultLib has added authorized RUDP helpers across runtimes and Odin/Idunn now treats daemon truth as typed CultCache/CultMesh state carried over cultnet.transport.rudp.v0. Mimir should not assume TCP is needed for any daemon-truth path once the runtime has RUDP support; HTTP/WebSocket/TCP are client lowerings, compatibility probes, or migration debt. Health is separate from media by authority, not because it needs a separate TCP transport."}
{"ts":"2026-06-16T00:12:00+01:00","type":"correction","status":"ok","note":"Source audit found Mimir.CultMeshMedia still using older C# CultMesh.StartNodeAsync/CultMesh.ConnectClient entrypoints while CultLib now exposes C# CultMesh.CreateRudpServer/CreateRudpClient/CreateRudpClientForAuthorizedPeer. Updated maps to treat the media bridge's current transport path as migration debt: typed program/media documents should move to explicit CultNet RUDP helpers, with OBS-local UDP preserved only as compatibility egress."}
{"ts": "2026-06-16T18:05:56+01:00", "type": "verification", "status": "ok", "note": "Mimir.CultMeshMedia migrated from old CultMesh node/client transport to explicit CultNet RUDP relay/send/recv path; local smoke artifacts/rudp-media-smoke-20260616-180404 proved 32 MPEG-TS chunks reached Starfire-local UDP sink over RUDP (packets=32 bytes=42112)."}
{"ts": "2026-06-17T03:45:44+01:00", "type": "decision", "status": "ok", "note": "Muninn Move identity is now a typed provenance/provisioning lane: Mimir consumes muninn.move_identity.v1 as identity snapshots while controller-state/marker evidence remains the only native reservoir motion evidence. Verified with Mimir.BufferSmoke --muninn-move-identity-smoke and --muninn-move-evidence-smoke."}