From dafbaa8370ae655b0181a334f2c4bfb94bc2d4bb Mon Sep 17 00:00:00 2001 From: Max Isbey <224885523+maxisbey@users.noreply.github.com> Date: Sun, 16 Aug 2026 12:44:33 +0000 Subject: [PATCH] fix(tier-check): count an SDK release in the 24h before a spec release as tracking it Lockstep SDKs publish in the hours before the spec release is tagged (for 2026-07-28: python-sdk 3h early, go-sdk 3.5h, typescript-sdk the evening before), so "first SDK release at or after the spec" read them as not having released and would fail them 30 days later. Allow a 24h lead. --- src/tier-check/checks/spec-tracking.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tier-check/checks/spec-tracking.ts b/src/tier-check/checks/spec-tracking.ts index ce4c101c..d2557702 100644 --- a/src/tier-check/checks/spec-tracking.ts +++ b/src/tier-check/checks/spec-tracking.ts @@ -1,6 +1,10 @@ import { Octokit } from '@octokit/rest'; import { SpecTrackingResult } from '../types'; +// Lockstep SDKs publish in the hours before the spec release is tagged; +// a release up to this long before it counts as the release for that spec. +const LEAD_MS = 24 * 60 * 60 * 1000; + export async function checkSpecTracking( octokit: Octokit, owner: string, @@ -38,7 +42,7 @@ export async function checkSpecTracking( // Reverse so oldest-first, then find the FIRST SDK release after the spec const oldestFirst = [...nonDraftSdkReleases].reverse(); const firstSdkAfterSpec = oldestFirst.find( - (r) => new Date(r.published_at!) >= specDate + (r) => new Date(r.published_at!).getTime() >= specDate.getTime() - LEAD_MS ); if (!firstSdkAfterSpec) {