From 17746c442e98f28fc88f7d80df0f7bfc5ac3c3b4 Mon Sep 17 00:00:00 2001 From: Timothy Date: Fri, 17 Jul 2026 01:21:57 +0200 Subject: [PATCH] =?UTF-8?q?test(77):=20address=20cold-review=20nits=20?= =?UTF-8?q?=E2=80=94=20TZ-invariant=20guard=20comment=20+=20DecoDefault?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to the MERGEABLE cold review: - Golden: document that TZ-independence relies on PadToNearestMinute=15 dividing every IANA offset; warn against regenerating with a non-15 divisor. - decisions.md: include DecoDefault in the ProjectFlood coalesce list. [decisions-edit] corrects a factual omission in the same-PR entry added this session. Refs #77 Co-Authored-By: Claude Opus 4.8 (1M context) --- .../Scheduling/Goldens/PlayoutBuildGoldenTests.cs | 6 ++++++ docs/decisions.md | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ErsatzTV.Core.Tests/Scheduling/Goldens/PlayoutBuildGoldenTests.cs b/ErsatzTV.Core.Tests/Scheduling/Goldens/PlayoutBuildGoldenTests.cs index 6197e79da..11f2106ae 100644 --- a/ErsatzTV.Core.Tests/Scheduling/Goldens/PlayoutBuildGoldenTests.cs +++ b/ErsatzTV.Core.Tests/Scheduling/Goldens/PlayoutBuildGoldenTests.cs @@ -457,6 +457,12 @@ public class PlayoutBuildGoldenTests await context.Collections.AddAsync(fillerCollection, cancellationToken); await context.SaveChangesAsync(cancellationToken); + // TZ-INDEPENDENCE INVARIANT: the pad ceiling is computed on the LOCAL minute-of-hour + // (PlayoutModeSchedulerBase uses StartOffset = ToLocalTime()), yet this golden snapshots raw UTC + // Start/Finish. Those agree across machine timezones ONLY because PadToNearestMinute = 15 divides + // every real IANA UTC offset (all are multiples of 15 min — Kolkata +5:30, Nepal +5:45, Chatham + // +12:45), so the pad delta is offset-invariant. Do NOT regenerate this golden with a non-15-divisor + // increment (e.g. 10) — it would become machine-TZ dependent and need the Block-style Assume guard. var padFiller = new FillerPreset { Name = "Pad To Quarter Hour", diff --git a/docs/decisions.md b/docs/decisions.md index 52d8c23b0..894e632b6 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -1078,8 +1078,8 @@ documentation* rather than a new feature: - **Block playouts**: no per-item Pad, and none is needed — Block is inherently clock-anchored (each `Block` starts at a fixed `TemplateItem.StartTime`), so it already yields clean guide times. - **EPG reflects the padding with no extra code**: `ChannelGuideProjector.ProjectFlood` coalesces trailing - PostRoll/Tail/GuideMode/Fallback filler into the programme window, so a programme's `Stop` is the padded - boundary (the filler run's finish), not the raw content finish. + PostRoll/Tail/GuideMode/Fallback/DecoDefault filler into the programme window, so a programme's `Stop` is + the padded boundary (the filler run's finish), not the raw content finish. **What this decision fixes in the record:** the issue's premise ("reverses an earlier not-adopting call") predates the machinery; do not re-implement pad-to-boundary from scratch. Two deterministic tests lock the