Skip to content

fix(stream): viewer live-stream rotation missed the data/ segment - #15

Merged
ChronodeAi merged 2 commits into
mainfrom
fix/live-stream-default-path
Aug 25, 2026
Merged

fix(stream): viewer live-stream rotation missed the data/ segment#15
ChronodeAi merged 2 commits into
mainfrom
fix/live-stream-default-path

Conversation

@ChronodeAi

Copy link
Copy Markdown
Owner

Follow-up to #14, caught during post-deploy verification.

Problem

viewerLiveStreamPath() built <resolveDataDir()>/stream_store/stream%3Amem-live%3Aviewer.bin, but the iii-stream adapter persists under <data-dir>/data/stream_store/ — the same layout src/health/engine-resources.ts inventories and src/cli/iii-runtime-config.ts materializes. On a real deployment every default-path statSync returned ENOENT, rotation silently never fired (the 130 MB viewer stream kept growing through the new build), and because the miss is a silent no-op by best-effort design, nothing logged.

Unit tests missed it: they injected an explicit dataDir tmp dir and seeded stream_store directly beneath it, mirroring the wrong assumption instead of production layout.

Fix

  • Default path now resolves to <data-dir>/data/stream_store/stream%3Amem-live%3Aviewer.bin.
  • Tests seed and assert the real data/-nested layout.

Battery

  • npx vitest run: 1965 passed / 1 skipped; same 3 known base file-level artifacts.
  • tsc sorted: identical to baseline set.
  • Canonical R13 (AGENTMEMORY_SECRET=dummy AGENTMEMORY_PROJECT_CAPABILITY_SECRET=dummy RUN_HF_SMOKE=1 node scripts/r13/run.mjs): R-13 passed (receipt .r13-receipts/1787697021160-0-55da057b).
  • evidence:interfaces:test pass, skills:check green, inventory refreshed.

…store

The default path omitted the data segment the iii-stream adapter actually
uses (<data-dir>/data/stream_store — same layout engine-resources
inventories and iii-runtime-config materializes), so every default-path
stat missed and rotation silently never fired on a real deployment.
Caught during post-deploy verification; unit tests now seed the real
layout.
@ChronodeAi
ChronodeAi merged commit 9a6d7bf into main Aug 25, 2026
8 checks passed
@ChronodeAi
ChronodeAi deleted the fix/live-stream-default-path branch August 25, 2026 22:34
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