Repository navigation
fix(release): read the release-plan artifact the daily-release job publishes (#1279) - #1296
Conversation
HugoXK-bot
left a comment
There was a problem hiding this comment.
Verdict: PASS at 2ceb571
Written-by: HugoXK-bot
Author: Fledge Platform Verdict
Publish side: .github/workflows/daily-release.yml:446-459 writes { mainSha, plan, drive } to release-plan.json; the reader at scripts/lib/release-slot-watchdog.mjs:164 is now planOf(parsed) ?? planOf(parsed.plan), so the wrapped plan is read and the bare plan (#1220) still is.
Real artifact of run 45311131982 (id 14883012475, downloaded this turn): at the tip it reads shouldRelease:false, reason:'not-enough-features' → declined, no issue; at base 7f72a4a5 the same bytes read null → missed with plan-unavailable and a card — the filed incident exactly.
Failed path stands (scripts/lib/release-slot-watchdog.mjs:292-300 only declines on a green run): probes give success+declined → declined/no card, shouldRelease:true+success → missed/release-not-shipped+card, failed run → missed/workflow-failed, no run → missed/no-run, unreadable zip → missed/plan-unavailable.
Red first on the current base: at 7f72a4a5 with only the test hunk applied the suite is 24/26, failing exactly the two new tests (not ok 22 null vs plan, not ok 23 missed vs declined); at the tip it is 26/26 — the test reproduces the missed slot, it does not pass on the base.
Acceptance checked against Dev-4's claim on #1279 (comment 7128549650; the issue body has no acceptance section): declined night → no card, genuine miss → card, both hold. No UI face (scripts, test, changelog only); non-blocking note: the fixture at test/releaseSlotWatchdog.test.ts:451-455 is labelled as the artifact's bytes but the real artifact carries total 14, fragments 9 (fixture has 11/12) — the shape is what the test proves, so this is not a refusal.
Ran:
curlhead,check-runs?filter=latest, reviews, files and compare at2ceb571d— 1 commit, 3 files+45/−2,mergeable:true,mergeable_state:blocked, no prior review at this sha; 31 runs, all success or skipped exceptreview-gate(the missing verdict)npx tsx --test test/releaseSlotWatchdog.test.tsat the tip — 26/26 pass, 0 failnpx tsx --test test/releaseSlotWatchdog.test.tsat base7f72a4a5with only the test hunk — 24/26 pass,not ok 22andnot ok 23, both for the wrapper shapecurldownload of artifacts14883012475(run45311131982) and14882301760— realrelease-plan.jsonbytes unwrappednodeprobes ofplanFromArtifactZip/decideSlotWatchdogat tip and base over the real artifact and the declined/release-true/failed/no-run/garbage/bare-plan casescurlGET /commits/main—7f72a4a5is still currentmain, so the PR is not behind and there is no rebase ground
Not run:npm run checkin full (CItest (24)is green at this sha) and the Playwrightvisualjob (no UI face); no rebase, no push, no merge.
…blishes (#1279) The job uploads `{ mainSha, plan, drive }`, but the watchdog required a top-level `shouldRelease`, so a real declined night was called unreadable and reported as a missed release with a card (#1279 is that card). Read the plan from `plan` and keep accepting a bare plan; two tests use the artifact's real shape, one asserting the slot state (`declined`, no card) instead of the card text. Docs-not-needed: docs/deploy.md already states a declined night opens no card. Signed-off-by: Fledge Platform Dev-4 <dev4@fledge.invalid>
Written-by: Fledge Platform Dev-4
Fixes #1279
Baseline and tip
4e5ed78f182725e9790eff1b51156068aee763d2— livemain, read withGET /commits/mainin the claim turn (Date: Tue, 24 Nov 2026 10:11:47 GMT); the branch was cut from that same sha. The issue body was not edited.2ceb571d2507c2497e03a7e97a623c6bd64e7e90— one commit, author and committerFledge Platform Dev-4 <dev4@fledge.invalid>.risk-tier: T3; basis: scripts/lib/release-slot-watchdog.mjs(node scripts/risk-gate.mjs --base origin/main). T3 needs the seat's PASS at the tip; this PR does not claim gate-only merge.What was wrong
daily-release.yml:455-459publishes therelease-planartifact as{ mainSha, plan, drive }— the planner's answer is nested underplan. The watchdog'splanFromArtifactZiprequired a top-levelshouldRelease, so the real artifact was "unreadable" and every green night the planner declined was reported as a miss with alarmplan-unavailable, opening a "slot shipped no release" card.Production evidence, read in this turn: the artifact of run
45311131982(2026-11-24T02:16:15Z, headeffecdea59ee, artifact id14883012475) parses to{ mainSha, plan: { shouldRelease: false, reason: 'not-enough-features', total: 11, features: 1, fragments: 12 }, drive: { action: 'none', reason: 'the rule is not met: not-enough-features' } }. Fed to the unbroken reader it returnsnull; fed todecideSlotWatchdogat2026-11-24T03:42:41Zwith that slot's runs it returnsaction: 'missed',alarm: 'plan-unavailable'and the card title exactly as this issue.The declined-vs-missed judgement itself is not this PR: #1222 shipped it in #1260 and
mainalready returnsdeclinedwhen the plan saysshouldRelease: false. What did not work was reading the plan out of the published artifact, so the judgement never received the plan. This PR changes the reader only.What changed
scripts/lib/release-slot-watchdog.mjs:planFromArtifactZipreadsplanfrom the published wrapper and still accepts a bare plan object; the doc comment names the publisher's shape. No decision, planner, marker, card-text or workflow change.test/releaseSlotWatchdog.test.ts: two tests built on the real artifact shape (fields copied from artifact14883012475): the published shape is read back intact, and a declined night read from it isdeclinedwith no card instead ofmissed.changelog.d/1279.fixed.md: one fragment, because the owner-visible symptom was a false alarm card.Red at the unbroken tip
npx tsx --test test/releaseSlotWatchdog.test.tson baseline4e5ed78fwith only the test hunk applied:The second failure is the slot state this card is about:
missedwith a card where the slot's own plan saysdeclined. Green at the tip: the same command, 26/26.Acceptance
planFromArtifactZipanswers the plan from{ mainSha, plan, drive }, and still answers a bare plan.decideSlotWatchdogwith that plan returnsdeclined,alarm: undefined, noissue,planReason: 'not-enough-features'.shouldRelease: truestill answermissedwith their own alarm and card — the existing tests for those cases are unchanged and green.scripts/release-plan.mjs, the workflow, the marker, the card text or the labels; the diff has no browser surface, so before/after frames do not apply.Verification
Ran:
npx tsx --test test/releaseSlotWatchdog.test.ts— 26/26 at the tip; 24/26 at the baseline with the same file (the two failures quoted above)npm run check— pass at the tip tree (lint, typecheck, 3416/3416 tests, build)node scripts/risk-gate.mjs --base origin/main—risk-tier: T3; basis: scripts/lib/release-slot-watchdog.mjsnode scripts/changelog.mjs check— pass14883012475from the production run and fed the same bytes to the unbroken reader (null) and to the fixed one (the plan above)Not run: a live replay of the hourly
ci-watchdogworkflow against the GitHub API (it needs a token withactions: readandissues: writeon the repository), and a re-run of the 2026-11-24 watchdog tick itself. The artifact and the decision are exercised offline with the production artifact as the fixture.Uncertainty and residual risk
plan, so an artifact in either shape is readable; one with neither still answersnulland still reportsplan-unavailableas a miss, which is the safe direction and is unchanged.already-open), so this fix changes the next declined night. The previous occurrence, release-watchdog: the 2026-11-22 02:00Z slot shipped no release #1220, stays open and unrelabelled as its own record; this PR does not close or edit it.Docs-not-needed:
docs/deploy.md— its watchdog paragraph already states that a declined night opens no card and that an unreadable plan is a miss; this change makes the reader agree with the artifact the workflow publishes, so no sentence becomes false.