From 14a079ce3c9b3c5562aa015746484c5ea8a815b4 Mon Sep 17 00:00:00 2001 From: Vincent Herbst Date: Tue, 25 Aug 2026 21:30:32 +0200 Subject: [PATCH] diag(video): the #409 verdict line names the cadence it measured A repair that reports only a rounded step cannot be told apart from one that measured the ladder wrong, and on a fractional ladder the cadence and its phase are what the verdict rests on. A whole-tick ladder logs what it always logged. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01RbWZLwBVLGM1xUVXa9NeJ1 --- .../AetherEngine/Video/H264CompositionOffsetRepair.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Sources/AetherEngine/Video/H264CompositionOffsetRepair.swift b/Sources/AetherEngine/Video/H264CompositionOffsetRepair.swift index 698862a2..41fa6f59 100644 --- a/Sources/AetherEngine/Video/H264CompositionOffsetRepair.swift +++ b/Sources/AetherEngine/Video/H264CompositionOffsetRepair.swift @@ -729,8 +729,15 @@ final class H264CompositionOffsetRepairSession { ) switch verdict { case .repair(let plan): + // The cadence and its phase belong in the line: on a fractional ladder they are the + // reading the verdict rests on, and a repair that reports only a rounded step cannot be + // told apart from one that measured the ladder wrong. + let cadenceDescription = plan.cadence.map { + " cadence=\($0.numerator)/\($0.denominator) phase=\(plan.ladderPhase)" + + " ladderAhead=\(plan.ladderOrdinalOffset)" + } ?? "" verdictDescription = "repair step=\(plan.step) lead=\(plan.decodeLead) " - + "shift=\(plan.shift) pocStep=\(plan.pocStep)" + + "shift=\(plan.shift) pocStep=\(plan.pocStep)" + cadenceDescription phase = .repairing var rewriter = H264CompositionOffsetRepair.Rewriter(plan: plan) for entry in held where entry.packet.pointee.stream_index == streamIndex {