fix(playback): report software scaler results and scope smoke ring diagnostics

The software-renderer fallback now reports which scaler options mpv
accepted and which it rejected (with mpv's error), instead of always
printing success. The smoke's black-canvas diagnostics read only the
failed session's rings (<sessionId>-g<N>), not every impv-fc ring in
/dev/shm.

Addresses Greptile review feedback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Opus 5.5 committed 2026-09-29 19:39:52 +02:00
1 parent 893c9d62a6
commit 6fc2b201ae
3 files changed
+20 -8

No files matched your search

@@ -20,7 +20,6 @@ import {
*/
const SHM_DIRECTORY = '/dev/shm';
const SHM_PREFIX = 'impv-fc-';
const FRAME_SHM_MAGIC = 0x564d5046;
const FRAME_SHM_RING_SLOTS = 3;
const HEADER_BYTES = 56 + FRAME_SHM_RING_SLOTS * 16;
@@ -103,10 +102,16 @@ export function describeFrameRing(
};
}
export function describeFrameRings(): FrameRingDiagnostics[] | string {
/**
* The helper names its rings `/<sessionId>-g<generation>`, so the prefix
* keeps stale or concurrent sessions out of the report.
*/
export function describeFrameRings(
sessionId: string
): FrameRingDiagnostics[] | string {
try {
return readdirSync(SHM_DIRECTORY)
.filter((entry) => entry.startsWith(SHM_PREFIX))
.filter((entry) => entry.startsWith(`${sessionId}-g`))
.map((entry) =>
describeFrameRing(
entry,
@@ -146,7 +151,7 @@ export async function expectRenderedFrame(
videoHeight: session.videoHeight,
stats: session.stats,
},
frameRings: describeFrameRings(),
frameRings: describeFrameRings(sessionId),
};
const body = JSON.stringify(diagnostics, null, 2);
console.log(`[frame-copy smoke diagnostics] ${body}`);