fix(stream): viewer live-stream rotation missed the data/ segment - #15
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 layoutsrc/health/engine-resources.tsinventories andsrc/cli/iii-runtime-config.tsmaterializes. On a real deployment every default-pathstatSyncreturned 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
dataDirtmp dir and seededstream_storedirectly beneath it, mirroring the wrong assumption instead of production layout.Fix
<data-dir>/data/stream_store/stream%3Amem-live%3Aviewer.bin.data/-nested layout.Battery
npx vitest run: 1965 passed / 1 skipped; same 3 known base file-level artifacts.tscsorted: identical to baseline set.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:testpass,skills:checkgreen, inventory refreshed.