fix(tier-check): count an SDK release in the 24h before a spec release as tracking it (#458)
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.
This commit is contained in:
parent
c321dd3203
commit
74edef34d6
1 changed files with 5 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue