Skip to content

fix(ci): do not alarm on a D2 candidate that qualified after the slot's D2 run (CHE-10559) [squash] - #187

Open
congvc-bot-x99[bot] wants to merge 2 commits into
cheese/mainfrom
agent/x99-claude-sonnet/che-10559-d30b4c98e22c
Open

congvc-bot-x99[bot] wants to merge 2 commits into
cheese/mainfrom
agent/x99-claude-sonnet/che-10559-d30b4c98e22c

Conversation

@congvc-bot-x99

@congvc-bot-x99 congvc-bot-x99 Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

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

Change
The freshness watch failed every 15 min from 20:16 UTC on 27 Nov 2026. The D2 run at 17:29 UTC had already deployed d108109 for the 15:17 UTC slot. Candidate 59c2604 merged at 18:55 UTC, after that run. The watch measured its 90 min limit from the slot, not from the candidate. It raised "D2 is overdue" for a candidate that D2 could not have picked up yet.

Now freshness() takes candidateAtMs (D1 run finish time) and newestD2AtMs (last activity, updated_at, of the newest D2 run since the slot). When a D2 run exists since the slot and the candidate finished after that run ended, the result is none. A candidate that finished while that run was still going may have been picked by its resolve step, so it keeps the alarm (review finding P1, fixed in the second commit). The candidate waits for the next slot. That slot then applies its own 45 min dispatch and 90 min alarm. If either time is unreadable, the old alarm stays.

Blast Radius
Touches only scripts/cd-watch.mjs (the freshness decision and its CLI call) and tests/cdWatch.test.ts. pickCandidate and deploy-gate.mjs are unchanged. It can only suppress an alarm, never add a deploy. A candidate that was ready before the slot's D2 run still alarms. Detected by the same watch run on cheese/main. Proof level: 2.

Evidence
Test command: npx vitest run tests/cdWatch.test.ts tests/deployTrain.test.ts
Result: 2 files passed, 271 tests passed. oxlint and prettier --check clean on both changed files.
Post-merge proof, PENDING-POST-MERGE: a later green run of "CD freshness watch" on cheese/main.

Changelog: The CD freshness watch no longer raises a false overdue alarm for a candidate that merged after the slot's D2 run.
Refs CHE-10559

@congvc-bot-x99
congvc-bot-x99 Bot marked this pull request as ready for review November 28, 2026 01:13

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