Skip to content

fix(doop/cd): freshness watch skips a candidate built after the last D2 run (CHE-10563) [squash] - #186

Open
congvc-bot-x99[bot] wants to merge 1 commit into
cheese/mainfrom
agent/x99-claude-sonnet/che-10563-41869a4bc378
Open

congvc-bot-x99[bot] wants to merge 1 commit into
cheese/mainfrom
agent/x99-claude-sonnet/che-10563-41869a4bc378

Conversation

@congvc-bot-x99

Copy link
Copy Markdown

Status

Draft. Fix for the CD freshness watch false alarm in CHE-10563.

Change

On 27 Nov 2026, D2 ran for the 15:17 UTC slot at 17:29 UTC and deployed d108109. Commit 59c2604 finished its D1 build at about 19:05 UTC, after that run. The watch measured age from the 15:17 slot and alarmed every 15 min from 16:47 UTC (run 46077531591: "438 min after the slot"). That candidate belongs to the 23:17 UTC slot.

freshness now takes candidateAtMs (when the candidate's D1 run finished) and d2LatestMs (when the newest D2 run since the slot was created). When a D2 run exists since the slot and the candidate qualified after it, the result is none. If either time is unknown, the alarm stays.

Blast Radius

Only scripts/cd-watch.mjs freshness and its CLI input. The dispatch path (no D2 run since the slot) and the live watcher are unchanged. A candidate that existed before a failed or skipped D2 run still alarms at 90 min. Proof level: 2.

Evidence

Command: bunx vitest run tests/cdWatch.test.ts tests/cdWatchTrigger.test.ts tests/cdWatchWorkflows.test.ts
Output: Test Files 3 passed (3), Tests 98 passed (98).
New test: "does not alarm for a candidate that qualified after the newest D2 run since the slot".
bunx prettier --check passes on both files.

Changelog: none

Refs CHE-10563

@congvc-bot-x99
congvc-bot-x99 Bot marked this pull request as ready for review November 27, 2026 23:41

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants