fix(cli): add missing cache fields to telemetry test fixture - #1915
Conversation
ExtractionPhaseBreakdown gained cachePublishFailures/cacheGcEvictions/ cacheGcBytesFreed/cacheAgedPartialsCleared; the studioRenderTelemetry test fixture was never updated, breaking Typecheck on main and every PR based on it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Closing in the backlog value sweep. This is documentation, test-only, dependency upkeep, refactoring, or narrow diagnostic/ergonomic polish without enough current user impact or an active merge path to justify carrying it open. Please reopen or resubmit against current main if the need is still concrete. |
vanceingalls
left a comment
There was a problem hiding this comment.
R1 adversarial review — COMMENT
Delta scope: +4 fields on the videoExtractBreakdown fixture in packages/cli/src/server/studioRenderTelemetry.test.ts:112-115.
Verified
ExtractionPhaseBreakdowninpackages/engine/src/services/videoFrameExtractor.ts:240-246declarescachePublishFailures,cacheGcEvictions,cacheGcBytesFreed,cacheAgedPartialsClearedas requirednumbers. The fixture was type-unsound without them; this PR restores the fixture to match the interface. Sibling fixtures already carry the same fields (packages/producer/src/services/render/stages/extractVideosStage.test.ts,extractVideosStage.timelineBound.test.ts,videoFrameExtractor.ts:1454-1459producer default), so the shape is consistent tree-wide.- Consumer under test:
packages/cli/src/server/studioRenderTelemetry.tsextractPayload()reads onlyresolveMs / hdrProbeMs / hdr…Count / vfr… / extractMs / cacheHits / cacheMisses— the 4 new fields are not consumed. Using0is a safe neutral value; norender_completeassertion needs to change. - CI: all required checks green on head (Test, Typecheck, Lint, CLI smoke, regression shards 1-8, Windows render).
Non-blockers (observations, not asks)
studioRenderTelemetry.ts:65-75(extractPayload) andpackages/cli/src/telemetry/events.ts:268-277(RenderCompleteProps.extract*) both stop atextractCacheMisses. The 4 new phase-breakdown counters (cachePublishFailures,cacheGcEvictions,cacheGcBytesFreed,cacheAgedPartialsCleared) are collected by the extractor and now live on the fixture but are dropped on the floor before hitting PostHog. The comment oncachePublishFailuresinvideoFrameExtractor.ts:237-239explicitly calls it "the first signal that warm renders are silently going cold" — worth a follow-up PR that extendsextractPayload+ adds matchingextract_cache_publish_failures/extract_cache_gc_*/extract_cache_aged_partials_clearedkeys toEventMapand thetrackRenderCompletemapper. Out of scope here; flagging so it doesn't get lost.- The mapping test at
studioRenderTelemetry.test.ts:170-190currently only asserts on the two extract-cache fields the consumer already emits (extractCacheHits,extractCacheMisses); when the follow-up above lands, this test is the right home for the four new field assertions and will need to be extended in the same PR to keep mutation-escapability tight.
Verdict: LGTM as a minimal fixture-completeness fix. No blockers.
— Via
miga-heygen
left a comment
There was a problem hiding this comment.
Approve. Independent read. Four new cache-telemetry fields added to the RenderPerfSummary fixture with safe zero defaults. Consumer only reads pre-existing fields, so the addition is backward-compatible. PostHog extraction is a follow-up concern (Via's note). Minimal change, no risk.
— Miga

What
Brief description of the change.
Why
Why is this change needed?
How
How was this implemented? Any notable design decisions?
Test plan
How was this tested?