Skip to content

fix(doop/cd): freshness watch ignores a candidate built after the slot's D2 run (CHE-10558) [squash] - #185

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

congvc-bot-x99[bot] wants to merge 1 commit into
cheese/mainfrom
agent/x99-claude-sonnet/che-10558-ed6ae598f28b

Conversation

@congvc-bot-x99

Copy link
Copy Markdown

Status

Draft. Refs CHE-10558.

Change

The CD freshness watch alarmed every 15 min after a merge that landed late in a slot window. Run 46074397367 is one example. The 15:17 UTC slot's D2 run (46042268498) deployed d108109 at 17:47 UTC. Commit 59c2604 merged at 21:14 UTC. The watch then failed with candidate 59c2604 is ahead of the last successful D2 d108109, 408 min after the slot (limit 90) until the 23:17 UTC slot.

freshness() now returns none when the candidate's D1 run was created after the slot and a D2 run exists since the slot. That candidate belongs to the next slot. A candidate with no builtAtMs, a candidate built before the slot, and a slot with no D2 run behave as before. The CLI passes builtAtMs from the D1 run's created_at.

Blast Radius

Only scripts/cd-watch.mjs freshness() and its CLI caller change. The live check, D2 and the D1 rerun are untouched. A real miss still alarms: a candidate built before the slot that D2 did not deploy, and a slot with no D2 run, both alarm as before. Proof level: 2.

Evidence

Command: npx vitest run tests/cdWatch.test.ts tests/cdWatchTrigger.test.ts tests/cdWatchWorkflows.test.ts

Result on the fix: 3 files passed, 98 tests passed.

Red check: with scripts/cd-watch.mjs reverted, does not alarm on a candidate built after the slot once that slot has a D2 run fails (1 failed, 71 passed in tests/cdWatch.test.ts).

Changelog

Changelog: none

Refs CHE-10558

@congvc-bot-x99
congvc-bot-x99 Bot marked this pull request as ready for review November 27, 2026 23:14
@congvc-bot-x99
congvc-bot-x99 Bot requested a review from congvc-dev November 27, 2026 23:18

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