From 4fad4b9e294d89d203539100b908d5c84e4b3308 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 2 Jun 2026 00:07:21 +0100 Subject: [PATCH] Archive Well capture pages --- docs/implementation-plan.md | 18 +- notes/fresh-workspace-handoff.md | 13 +- scripts/start-online-verse-daemons.ps1 | 10 +- src/Mimir.VerseRecorder/Program.cs | 220 ++++++++++++++++++++++++- src/Mimir.Well/Program.cs | 177 ++++++++++++++++++++ state/evidence.jsonl | 2 + state/map.yaml | 19 ++- 7 files changed, 443 insertions(+), 16 deletions(-) diff --git a/docs/implementation-plan.md b/docs/implementation-plan.md index 01b3bd6..331a813 100644 --- a/docs/implementation-plan.md +++ b/docs/implementation-plan.md @@ -575,19 +575,27 @@ a named invariant that the native runtime cannot protect yet. serves a WebSocket subscriber lane on `/eve/periwinkle/subscribe`. `Mimir.VerseRecorder` subscribes to that lane and writes a timestamped `session.json` plus `observations.jsonl` under - `C:\Users\Meta\Videos\Mimir\VerseCaptures` by default. `Mimir.Well` is the + `C:\Users\Meta\Videos\Mimir\VerseCaptures` by default. It now recognizes + `mimir.well_capture_page.v1`, strips inline base64 sample bodies into paged + binary files under `bodies/page-*.bin`, and records + `mimir.recorder_body_index.v1` refs in `bodies/index.jsonl`. `Mimir.Well` is the long-running Starfire ingest/publish daemon: it loads `config/mimir-runtime.well.local.json`, creates every configured source it can, polls the `MimirSynchronizationHub` with a bounded daemon cadence, updates audio sync/probe state, and publishes `mimir.well_snapshot.v1` records with source buffers, composite controls, publication/stem contract, - and synchronized-frame status. The online supervisor + and synchronized-frame status. It also publishes bounded + `mimir.well_capture_page.v1` records with synchronized frame-slice timing, + configured composite state, and inline source sample bodies when CPU payload + bytes exist and fit the configured body limit. The online supervisor `scripts/start-online-verse-daemons.ps1` starts the relay, recorder, Nightwing Eyes/Move/builtin-camera/builtin-mic witness, music-synced de-Bruijn/microtonal Move gesture worker, and `Mimir.Well` from the broad - Well profile. This cut records typed observation evidence and Well state; - raw camera/audio payload publication into CultMesh remains a future heavy - media surface. The current live scar is explicit: ASIO device timestamps and + Well profile with capture-page/body-paging enabled. This is the first local + paged-recording ABI for offline reconstruction, not the final CultCache shard + engine. GPU-handle-only samples remain metadata/body-handle evidence until a + Fensalir/native program-output recorder owns rendered composite bodies. The + current live scar is explicit: ASIO device timestamps and camera driver timestamps are different domains, so `Mimir.Well` publishes degraded sync status until a camera-clock/global-time correction owner maps those domains. diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 691e7ea..c0d1193 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -199,12 +199,21 @@ Get-Content .\state\evidence.jsonl -Tail 8 WebSocket path beside its observation ingest path, and `Mimir.VerseRecorder` writes subscribed observations to `C:\Users\Meta\Videos\Mimir\VerseCaptures\\session.json` plus - `observations.jsonl`. `Mimir.Well` loads + `observations.jsonl`. Recorder now also recognizes + `mimir.well_capture_page.v1`, strips inline base64 sample bodies into + `bodies/page-*.bin`, and records `mimir.recorder_body_index.v1` refs in + `bodies/index.jsonl` so offline reconstruction tools can resolve payloads + without treating JSONL as the body store. `Mimir.Well` loads `config/mimir-runtime.well.local.json`, starts every configured source it can, polls `MimirSynchronizationHub` with a bounded per-source budget, updates audio sync/probe state, and publishes `mimir.well_snapshot.v1` records with source buffers, composite controls, publication/stem contract, and sync - status. `scripts/start-online-verse-daemons.ps1` supervises the relay, + status. It also publishes bounded `mimir.well_capture_page.v1` records for + synchronized frame slices with timing metadata, configured composite state, + and inline source bodies when CPU bytes exist and fit the configured body + limit. GPU-handle-only samples remain metadata/body-handle evidence until + Fensalir/native program-output recording owns rendered composite bodies. + `scripts/start-online-verse-daemons.ps1` supervises the relay, recorder, Nightwing typed Eyes/Move/builtin-camera/builtin-mic witness, the music-synced de-Bruijn/microtonal Move gesture worker, and `Mimir.Well`. Current live proof `online-verse-daemons-20260601-212502` wrote Well, diff --git a/scripts/start-online-verse-daemons.ps1 b/scripts/start-online-verse-daemons.ps1 index 5a6f4a3..679c4a1 100644 --- a/scripts/start-online-verse-daemons.ps1 +++ b/scripts/start-online-verse-daemons.ps1 @@ -119,7 +119,9 @@ $recorderArgs = @( (Join-Path $repo "src\Mimir.VerseRecorder\Mimir.VerseRecorder.csproj"), "--", "--url", $SubscribeUrl, - "--out-dir", $RecorderRoot + "--out-dir", $RecorderRoot, + "--write-bodies", "true", + "--body-page-bytes", "134217728" ) if ($DurationSeconds -gt 0) { $recorderArgs += "--seconds" @@ -274,7 +276,11 @@ if (-not $SkipRuntime) { "--visual-expected-leds", "38", "--visual-minimum-luma", "0.55", "--visual-setting-seconds", "0.75", - "--visual-resweep-seconds", "12.0" + "--visual-resweep-seconds", "12.0", + "--capture-pages", "true", + "--capture-ms", "250", + "--capture-max-body-bytes", "4194304", + "--capture-inline-bodies", "true" ) ` -Environment @{ "MIMIR_RUNTIME_CONFIG" = $ConfigPath diff --git a/src/Mimir.VerseRecorder/Program.cs b/src/Mimir.VerseRecorder/Program.cs index 28a274c..ec9a8b7 100644 --- a/src/Mimir.VerseRecorder/Program.cs +++ b/src/Mimir.VerseRecorder/Program.cs @@ -1,6 +1,8 @@ using System.Net.WebSockets; +using System.Security.Cryptography; using System.Text; using System.Text.Json; +using System.Text.Json.Nodes; var options = VerseRecorderOptions.Parse(args); Directory.CreateDirectory(options.OutputDirectory); @@ -9,6 +11,9 @@ var runDirectory = Path.Combine(options.OutputDirectory, runId); Directory.CreateDirectory(runDirectory); var jsonlPath = Path.Combine(runDirectory, "observations.jsonl"); var sessionPath = Path.Combine(runDirectory, "session.json"); +var bodyPager = options.WriteBodies + ? new MimirRecorderBodyPager(runId, runDirectory, options.BodyPageBytes) + : null; await File.WriteAllTextAsync( sessionPath, @@ -21,6 +26,16 @@ await File.WriteAllTextAsync( startedAt = DateTimeOffset.Now.ToString("O"), options.Seconds, observations = jsonlPath, + bodies = bodyPager is null + ? null + : new + { + enabled = true, + pageBytes = options.BodyPageBytes, + directory = bodyPager.BodyDirectory, + index = bodyPager.IndexPath, + document = "mimir.recorder_body_index.v1", + }, }, new JsonSerializerOptions { WriteIndented = true })); @@ -57,7 +72,10 @@ while (!stopping.IsCancellationRequested) break; } - await output.WriteLineAsync(text); + var storedText = bodyPager is null + ? text + : await bodyPager.PageBodiesAsync(text, stopping.Token).ConfigureAwait(false); + await output.WriteLineAsync(storedText); count++; if (DateTimeOffset.UtcNow - lastMeter >= TimeSpan.FromSeconds(options.MeterSeconds)) { @@ -86,6 +104,11 @@ while (!stopping.IsCancellationRequested) } await output.FlushAsync(); +if (bodyPager is not null) +{ + await bodyPager.DisposeAsync().ConfigureAwait(false); +} + Console.Error.WriteLine($"verse-recorder complete observations={count} path={jsonlPath}"); static async Task ReceiveTextAsync(ClientWebSocket socket, CancellationToken stopping) @@ -113,7 +136,9 @@ internal sealed record VerseRecorderOptions( string OutputDirectory, double Seconds, double ReconnectSeconds, - double MeterSeconds) + double MeterSeconds, + bool WriteBodies, + long BodyPageBytes) { public static VerseRecorderOptions Parse(string[] args) { @@ -126,7 +151,9 @@ internal sealed record VerseRecorderOptions( ParseString(args, "--out-dir", defaultOutput), ParseDouble(args, "--seconds", 0.0), ParseDouble(args, "--reconnect-seconds", 2.0), - ParseDouble(args, "--meter-seconds", 5.0)); + ParseDouble(args, "--meter-seconds", 5.0), + ParseBool(args, "--write-bodies", true), + ParseLong(args, "--body-page-bytes", 128L * 1024L * 1024L)); } private static string ParseString(IReadOnlyList args, string name, string fallback) @@ -148,4 +175,191 @@ internal sealed record VerseRecorderOptions( ? value : fallback; } + + private static long ParseLong(IReadOnlyList args, string name, long fallback) + { + return long.TryParse(ParseString(args, name, ""), out var value) + ? value + : fallback; + } + + private static bool ParseBool(IReadOnlyList args, string name, bool fallback) + { + for (var index = 0; index < args.Count; index++) + { + if (!string.Equals(args[index], name, StringComparison.OrdinalIgnoreCase)) + { + continue; + } + + if (index == args.Count - 1 || + args[index + 1].StartsWith("--", StringComparison.Ordinal)) + { + return true; + } + + return bool.TryParse(args[index + 1], out var value) ? value : fallback; + } + + return fallback; + } +} + +internal sealed class MimirRecorderBodyPager : IAsyncDisposable +{ + private readonly string runId; + private readonly long pageByteLimit; + private readonly StreamWriter indexWriter; + private FileStream? currentPage; + private long currentPageBytes; + private int pageIndex; + + public MimirRecorderBodyPager(string runId, string runDirectory, long pageByteLimit) + { + this.runId = runId; + this.pageByteLimit = Math.Max(1024 * 1024, pageByteLimit); + BodyDirectory = Path.Combine(runDirectory, "bodies"); + Directory.CreateDirectory(BodyDirectory); + IndexPath = Path.Combine(BodyDirectory, "index.jsonl"); + indexWriter = new StreamWriter(new FileStream(IndexPath, FileMode.Create, FileAccess.Write, FileShare.Read), Encoding.UTF8); + } + + public string BodyDirectory { get; } + + public string IndexPath { get; } + + public async Task PageBodiesAsync(string text, CancellationToken stopping) + { + JsonNode? root; + try + { + root = JsonNode.Parse(text); + } + catch (JsonException) + { + return text; + } + + if (root is not JsonObject rootObject || + !string.Equals(rootObject["document"]?.GetValue(), "mimir.well_capture_page.v1", StringComparison.Ordinal) || + rootObject["samples"] is not JsonArray samples) + { + return text; + } + + var wroteAny = false; + foreach (var sampleNode in samples) + { + if (sampleNode is not JsonObject sampleObject || + sampleObject["body"] is not JsonObject bodyObject || + !string.Equals(bodyObject["status"]?.GetValue(), "inline", StringComparison.Ordinal) || + !string.Equals(bodyObject["encoding"]?.GetValue(), "base64", StringComparison.Ordinal)) + { + continue; + } + + var encoded = bodyObject["data"]?.GetValue(); + if (string.IsNullOrWhiteSpace(encoded)) + { + continue; + } + + byte[] bytes; + try + { + bytes = Convert.FromBase64String(encoded); + } + catch (FormatException) + { + continue; + } + + var bodyId = sampleObject["bodyId"]?.GetValue() ?? Guid.NewGuid().ToString("N"); + var bodyRef = await WriteBodyAsync(bodyId, bytes, sampleObject, stopping).ConfigureAwait(false); + sampleObject.Remove("body"); + sampleObject["bodyRef"] = bodyRef; + wroteAny = true; + } + + return wroteAny + ? rootObject.ToJsonString() + : text; + } + + private async Task WriteBodyAsync( + string bodyId, + byte[] bytes, + JsonObject sampleObject, + CancellationToken stopping) + { + await EnsurePageAsync(bytes.LongLength, stopping).ConfigureAwait(false); + var pageName = $"page-{pageIndex:000000}.bin"; + var offset = currentPageBytes; + await currentPage!.WriteAsync(bytes, stopping).ConfigureAwait(false); + currentPageBytes += bytes.LongLength; + + var hash = Convert.ToHexString(SHA256.HashData(bytes)).ToLowerInvariant(); + var bodyRef = new JsonObject + { + ["storage"] = "mimir-recorder-page", + ["document"] = "mimir.recorder_body_ref.v1", + ["bodyId"] = bodyId, + ["runId"] = runId, + ["page"] = $"bodies/{pageName}", + ["offset"] = offset, + ["byteLength"] = bytes.LongLength, + ["sha256"] = hash, + ["encoding"] = "raw", + }; + + var indexRecord = new JsonObject + { + ["document"] = "mimir.recorder_body_index.v1", + ["bodyId"] = bodyId, + ["runId"] = runId, + ["page"] = $"bodies/{pageName}", + ["offset"] = offset, + ["byteLength"] = bytes.LongLength, + ["sha256"] = hash, + ["sourceId"] = sampleObject["sample"]?["SourceId"]?.GetValue(), + ["kind"] = sampleObject["sample"]?["Kind"]?.GetValue(), + ["origin"] = sampleObject["sample"]?["Origin"]?.GetValue(), + ["sequence"] = sampleObject["sample"]?["Sequence"]?.GetValue(), + ["timestampNs"] = sampleObject["sample"]?["TimestampNs"]?.GetValue(), + }; + await indexWriter.WriteLineAsync(indexRecord.ToJsonString()).ConfigureAwait(false); + return bodyRef; + } + + private async Task EnsurePageAsync(long nextBodyBytes, CancellationToken stopping) + { + if (currentPage is not null && currentPageBytes + nextBodyBytes <= pageByteLimit) + { + return; + } + + if (currentPage is not null) + { + await currentPage.FlushAsync(stopping).ConfigureAwait(false); + await currentPage.DisposeAsync().ConfigureAwait(false); + currentPage = null; + pageIndex++; + currentPageBytes = 0; + } + + var pagePath = Path.Combine(BodyDirectory, $"page-{pageIndex:000000}.bin"); + currentPage = new FileStream(pagePath, FileMode.Create, FileAccess.Write, FileShare.Read); + } + + public async ValueTask DisposeAsync() + { + if (currentPage is not null) + { + await currentPage.FlushAsync().ConfigureAwait(false); + await currentPage.DisposeAsync().ConfigureAwait(false); + } + + await indexWriter.FlushAsync().ConfigureAwait(false); + await indexWriter.DisposeAsync().ConfigureAwait(false); + } } diff --git a/src/Mimir.Well/Program.cs b/src/Mimir.Well/Program.cs index 31143b4..723542c 100644 --- a/src/Mimir.Well/Program.cs +++ b/src/Mimir.Well/Program.cs @@ -48,8 +48,10 @@ await using var publisher = new MimirWellPublisher(options.PublishUrl); await publisher.ConnectAsync(stopping.Token).ConfigureAwait(false); var sequence = 0L; +var captureSequence = 0L; var startedAt = DateTimeOffset.UtcNow; var nextPublish = DateTimeOffset.MinValue; +var nextCapture = DateTimeOffset.MinValue; var nextSync = DateTimeOffset.MinValue; var nextVisualCalibration = DateTimeOffset.MinValue; var presentation = new MimirPresentationControlState(); @@ -105,6 +107,18 @@ while (!stopping.IsCancellationRequested) ++sequence, startedAt); await publisher.PublishAsync(snapshot, stopping.Token).ConfigureAwait(false); + if (options.CapturePagesEnabled && now >= nextCapture) + { + var capturePage = MimirWellCapturePage.Build( + options, + presentation, + frame, + ++captureSequence, + startedAt); + await publisher.PublishAsync(capturePage, stopping.Token).ConfigureAwait(false); + nextCapture = now + TimeSpan.FromMilliseconds(options.CaptureIntervalMs); + } + if (sequence % Math.Max(1, options.MeterEvery) == 0) { Console.Error.WriteLine( @@ -162,6 +176,10 @@ internal sealed record MimirWellOptions( double VisualMinimumLuma, double VisualSettingSeconds, double VisualResweepSeconds, + bool CapturePagesEnabled, + int CaptureIntervalMs, + int CaptureMaxBodyBytes, + bool CaptureInlineBodies, int MeterEvery) { public static MimirWellOptions Parse(string[] args) => new( @@ -180,6 +198,10 @@ internal sealed record MimirWellOptions( ParseDouble(args, "--visual-minimum-luma", 0.55), ParseDouble(args, "--visual-setting-seconds", 0.75), ParseDouble(args, "--visual-resweep-seconds", 12.0), + ParseBool(args, "--capture-pages", true), + ParseInt(args, "--capture-ms", 250), + ParseInt(args, "--capture-max-body-bytes", 4 * 1024 * 1024), + ParseBool(args, "--capture-inline-bodies", true), ParseInt(args, "--meter-every", 20)); private static string ParseString(IReadOnlyList args, string name, string fallback) @@ -257,6 +279,161 @@ internal sealed class MimirWellPublisher(Uri url) : IAsyncDisposable } } +internal static class MimirWellCapturePage +{ + public static object Build( + MimirWellOptions options, + MimirPresentationControlState presentation, + MimirSynchronizedBufferFrame frame, + long captureSequence, + DateTimeOffset startedAt) => new + { + type = "cultmesh-observation", + document = "mimir.well_capture_page.v1", + sourceId = "mimir-well", + nodeId = options.NodeId, + captureSequence, + wallClockUtc = DateTimeOffset.UtcNow.ToString("O"), + elapsedSeconds = (DateTimeOffset.UtcNow - startedAt).TotalSeconds, + frame = new + { + frame.PresentationTimeNs, + frame.WindowStartNs, + frame.WindowEndNs, + PresentationDelayMs = frame.PresentationDelay.TotalMilliseconds, + frame.IsComplete, + }, + storage = new + { + bodyTransport = options.CaptureInlineBodies ? "inline-base64" : "metadata-only", + maxInlineBodyBytes = options.CaptureMaxBodyBytes, + intendedSink = "mimir-recorder-paged-cultcache", + }, + configuredComposite = new + { + video = presentation.VideoFeeds.Select(feed => new + { + feed.SourceId, + feed.DisplayName, + feed.Enabled, + feed.Solo, + feed.Opacity, + feed.Layer, + }).ToArray(), + audio = presentation.AudioFeeds.Select(feed => new + { + feed.SourceId, + feed.DisplayName, + feed.Muted, + feed.Solo, + feed.Gain, + }).ToArray(), + postprocess = presentation.Postprocess, + renderedProgramBody = new + { + status = "not-published-yet", + reason = "Fensalir/OBS program-output capture is a separate producer; this page records the configured composite contract and synchronized source bodies.", + }, + }, + samples = frame.Slices + .Where(slice => slice.Sample.HasValue) + .Select(slice => CaptureSample(options, captureSequence, slice)) + .ToArray(), + }; + + private static object CaptureSample( + MimirWellOptions options, + long captureSequence, + MimirSynchronizedStreamSlice slice) + { + var sample = slice.Sample!.Value; + var bodyId = $"{options.NodeId}:{captureSequence}:{sample.SourceId}:{sample.Sequence}"; + return new + { + bodyId, + slice = new + { + slice.SourceId, + Kind = slice.Kind.ToString(), + Origin = slice.Origin.ToString(), + Status = slice.Status.ToString(), + slice.SourceTimestampNs, + slice.CanonicalStartNs, + slice.CanonicalEndNs, + slice.PresentationTimeNs, + slice.TimingOffsetNs, + slice.DistanceFromPresentationNs, + slice.TimingConfidence, + slice.TimingEvidenceKind, + }, + sample = SampleMetadata(sample), + body = CaptureBody(options, sample), + }; + } + + private static object SampleMetadata(MimirStreamSample sample) => new + { + sample.SourceId, + Kind = sample.Kind.ToString(), + Origin = sample.Origin.ToString(), + sample.TimestampNs, + sample.ArrivalNs, + sample.Sequence, + sample.PayloadHandle, + sample.ByteLength, + video = sample.VideoFrame is null ? null : new + { + sample.VideoFrame.Width, + sample.VideoFrame.Height, + PixelFormat = sample.VideoFrame.PixelFormat.ToString(), + sample.VideoFrame.StrideBytes, + sample.VideoFrame.DeviceTimestampNs, + sample.VideoFrame.NativeHandle, + sample.VideoFrame.NativeHandleKind, + sample.VideoFrame.ResourceKey, + sample.VideoFrame.ProducerFenceHandle, + sample.VideoFrame.ProducerFenceValue, + sample.VideoFrame.UnavoidableCopyCount, + }, + audio = sample.AudioBlock is null ? null : new + { + sample.AudioBlock.SampleRate, + sample.AudioBlock.Channels, + SampleFormat = sample.AudioBlock.SampleFormat.ToString(), + sample.AudioBlock.FrameCount, + sample.AudioBlock.DeviceTimestampNs, + sample.AudioBlock.NativeHandle, + sample.AudioBlock.NativeHandleKind, + }, + }; + + private static object CaptureBody(MimirWellOptions options, MimirStreamSample sample) + { + if (!options.CaptureInlineBodies) + { + return new { status = "not-inline", sample.ByteLength }; + } + + if (sample.Data.IsEmpty || sample.ByteLength <= 0) + { + return new { status = "empty", sample.ByteLength }; + } + + if (sample.ByteLength > options.CaptureMaxBodyBytes) + { + return new { status = "too-large", sample.ByteLength }; + } + + return new + { + status = "inline", + encoding = "base64", + byteLength = sample.ByteLength, + data = Convert.ToBase64String(sample.Data.Span), + }; + } +} + internal static class MimirWellSnapshot { public static object Build( diff --git a/state/evidence.jsonl b/state/evidence.jsonl index ac989e6..ddfff90 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -344,3 +344,5 @@ {"ts": "2026-06-01T23:24:26+01:00", "type": "implementation", "status": "ok", "note": "2026-06-01: Added live score detection to the Move/Syrinx worker. OnlineAnalyzer now emits tempo_candidates and a 12-bin cyclic_tempogram from onset autocorrelation. LiveScoreEstimator publishes mimir.live_score.v1 with detected voices, note names, durations, score confidence, target-confidence deficit, gesture density, and per-Move note targets. ScoreGestureScheduler consumes that score document so Move/Syrinx calibration gestures are spread across detected voices/spectral lanes according to confidence deficit. Live run artifacts/runtime/move-live-score-20260601-232156 sampled 350/350 records with live_score, maxVoices=3, maxTempoCandidates=8, 21 score event frames, 20 emitted Syrinx calls, and Move targets assigned to shotgun-mic, realtek-loopback, and cardioid-mic."} {"ts": "2026-06-01T23:37:14+01:00", "type": "implementation", "status": "ok", "note": "2026-06-01: Move/Syrinx score gestures now carry explicit articulation roles. ScoreGestureScheduler assigns Moves to violin-syrinx, harp-arpeggio, and peck-syrinx by default; events include articulation, gesture note sequence, attack shape, and duration hint. Move RGB lowering and Realtek AquaSynth playback consume the same event so each pulse remains one audiovisual calibration voice. Verified with a synthetic scheduler probe plus py_compile and launcher dry-run."} {"ts": "2026-06-01T23:50:56+01:00", "type": "implementation", "status": "ok", "note": "2026-06-01: Mimir.Well now owns online camera exposure/gain optimization for visual sync. MimirCameraExposureController samples live Well video buffers, scores LED spline quality with MimirLedSplineFrameAnalyzer, cycles KS exposure/gain candidates, locks the best score, periodically resweeps, and publishes visualCalibration status in mimir.well_snapshot.v1. Verified with dotnet build src/Mimir.Well and supervisor dry-run options."} +{"ts": "2026-06-02T00:06:12+01:00", "type": "implementation", "status": "ok", "note": "2026-06-02: Added the first Well-to-Recorder archival payload path. Mimir.Well now publishes bounded mimir.well_capture_page.v1 documents beside the dashboard snapshot; capture pages carry synchronized frame-slice timing, configured composite state, and inline base64 sample bodies when CPU payload bytes exist below the configured limit. Mimir.VerseRecorder strips those inline bodies into paged binary files under bodies/page-*.bin, replaces them with mimir.recorder_body_ref.v1 refs in observations.jsonl, and appends mimir.recorder_body_index.v1 records to bodies/index.jsonl. Verified with dotnet build for Mimir.Well and Mimir.VerseRecorder, supervisor dry-runs, and a relay/recorder synthetic capture-page smoke that wrote a 4-byte page body with the expected SHA-256 ref."} +{"ts": "2026-06-02T00:06:13+01:00", "type": "verification", "status": "degraded", "note": "2026-06-02: A short local online-verse daemon run proved recorder startup and session/body directory creation, but live Mimir.Well synchronized-frame planning degraded repeatedly with mixed timestamp-domain range errors such as camera/ASIO timestamps being compared before a shared canonical clock owner exists. Treat this as the known camera-clock/global-time correction scar, not a recorder storage failure."} diff --git a/state/map.yaml b/state/map.yaml index 16d7847..e635a42 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -396,17 +396,28 @@ invariants: witness stream: `/eve/periwinkle` ingests typed observations and `/eve/periwinkle/subscribe` broadcasts normalized records to live subscribers. `Mimir.VerseRecorder` subscribes and writes a session manifest - plus JSONL observation ledger under `C:\Users\Meta\Videos\Mimir\VerseCaptures`. + plus JSONL observation ledger under `C:\Users\Meta\Videos\Mimir\VerseCaptures`; + when it sees `mimir.well_capture_page.v1`, it strips inline base64 sample + bodies into `bodies/page-*.bin` and records `mimir.recorder_body_index.v1` + refs in `bodies/index.jsonl` so offline reconstruction jobs can resolve + source payloads without bloating the observation ledger. `Mimir.Well` is the Starfire Well daemon: it loads the broad Well runtime profile, starts every configured source it can, polls `MimirSynchronizationHub` with a bounded daemon budget, updates audio sync/probe state, and publishes `mimir.well_snapshot.v1` records containing buffer health, composite - controls, publication/stem contract, and sync status. The online supervisor + controls, publication/stem contract, and sync status. It also publishes + bounded `mimir.well_capture_page.v1` records for synchronized frame slices: + each page carries timing metadata, configured composite state, and inline + source sample bodies when a sample has CPU bytes and stays under the + configured body limit. GPU-handle-only samples remain metadata/body-handle + evidence until a Fensalir/native readback or direct program-output recorder + owns rendered composite bodies. The online supervisor now starts relay, recorder, Nightwing Eyes/Move/builtin-camera/builtin-mic witness publication, conservative de-Bruijn/microtonal music-synced Move gestures with Realtek plus opportunistic ASIO music evidence, and - `Mimir.Well`. This owns typed state publication, not raw CultMesh media - payloads yet. The live timestamp-domain scar is explicit: ASIO device time + `Mimir.Well` with capture-page/body-paging enabled. This owns a first local + paged-recording ABI, not the final CultCache shard engine yet. The live + timestamp-domain scar is explicit: ASIO device time and camera driver time are not in one canonical timeline, so sync frame publication is degraded until a camera-clock/global-time correction owner exists.