Skip to content

fix(release): read the release-plan artifact the daily-release job publishes (#1279) - #1296

Merged
HugoXK merged 1 commit into
mainfrom
dev4/1279-plan-artifact
Nov 24, 2026
Merged

HugoXK merged 1 commit into
mainfrom
dev4/1279-plan-artifact

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 24, 2026

Copy link
Copy Markdown
Owner

Written-by: Fledge Platform Dev-4

Fixes #1279

Baseline and tip

  • Baseline: 4e5ed78f182725e9790eff1b51156068aee763d2 — live main, read with GET /commits/main in 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.
  • Tip: 2ceb571d2507c2497e03a7e97a623c6bd64e7e90 — one commit, author and committer Fledge Platform Dev-4 <dev4@fledge.invalid>.
  • Computed tier at this tip: 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-459 publishes the release-plan artifact as { mainSha, plan, drive } — the planner's answer is nested under plan. The watchdog's planFromArtifactZip required a top-level shouldRelease, so the real artifact was "unreadable" and every green night the planner declined was reported as a miss with alarm plan-unavailable, opening a "slot shipped no release" card.

Production evidence, read in this turn: the artifact of run 45311131982 (2026-11-24T02:16:15Z, head effecdea59ee, artifact id 14883012475) 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 returns null; fed to decideSlotWatchdog at 2026-11-24T03:42:41Z with that slot's runs it returns action: '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 main already returns declined when the plan says shouldRelease: 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: planFromArtifactZip reads plan from 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 artifact 14883012475): the published shape is read back intact, and a declined night read from it is declined with no card instead of missed.
  • 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.ts on baseline 4e5ed78f with only the test hunk applied:

not ok 22 - a plan artifact in the published shape is read, not called unreadable
  error: Expected values to be strictly deep-equal:
  + actual - expected
  + null
  - { features: 1, fragments: 12, reason: 'not-enough-features', shouldRelease: false, total: 11 }
  operator: 'deepStrictEqual'
  location: 'test/releaseSlotWatchdog.test.ts:457:1'

not ok 23 - a declined night read from the published artifact releases the slot instead of opening a card
  error: Expected values to be strictly equal:
  + actual - expected
    + 'missed'
    - 'declined'
  operator: 'strictEqual'
  location: 'test/releaseSlotWatchdog.test.ts:469:1'

# pass 24
# fail 2

The second failure is the slot state this card is about: missed with a card where the slot's own plan says declined. Green at the tip: the same command, 26/26.

Acceptance

  1. The published artifact is read. planFromArtifactZip answers the plan from { mainSha, plan, drive }, and still answers a bare plan.
  2. A declined night releases the slot. decideSlotWatchdog with that plan returns declined, alarm: undefined, no issue, planReason: 'not-enough-features'.
  3. The alarms do not regress. A failed run, no run at all, an unreadable artifact and shouldRelease: true still answer missed with their own alarm and card — the existing tests for those cases are unchanged and green.
  4. No scope bleed, no UI face. No change to 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.mjs
  • node scripts/changelog.mjs check — pass
  • Artifact replay: downloaded artifact 14883012475 from 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-watchdog workflow against the GitHub API (it needs a token with actions: read and issues: write on 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

  • The reader prefers a top-level plan and falls back to plan, so an artifact in either shape is readable; one with neither still answers null and still reports plan-unavailable as a miss, which is the safe direction and is unchanged.
  • A card already opened for a slot still wins (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.
  • The artifact replay is offline: it proves the parsing and the decision, not the workflow's token or download path, which the existing driver tests pin with a fake server.

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.

@HugoXK-bot HugoXK-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  • curl head, check-runs?filter=latest, reviews, files and compare at 2ceb571d — 1 commit, 3 files +45/−2, mergeable:true, mergeable_state:blocked, no prior review at this sha; 31 runs, all success or skipped except review-gate (the missing verdict)
  • npx tsx --test test/releaseSlotWatchdog.test.ts at the tip — 26/26 pass, 0 fail
  • npx tsx --test test/releaseSlotWatchdog.test.ts at base 7f72a4a5 with only the test hunk — 24/26 pass, not ok 22 and not ok 23, both for the wrapper shape
  • curl download of artifacts 14883012475 (run 45311131982) and 14882301760 — real release-plan.json bytes unwrapped
  • node probes of planFromArtifactZip/decideSlotWatchdog at tip and base over the real artifact and the declined/release-true/failed/no-run/garbage/bare-plan cases
  • curl GET /commits/main — 7f72a4a5 is still current main, so the PR is not behind and there is no rebase ground
    Not run: npm run check in full (CI test (24) is green at this sha) and the Playwright visual job (no UI face); no rebase, no push, no merge.

@HugoXK-bot HugoXK-bot added the review:approved Issue reviewed and approved by the Fledge Platform Reviewer label Nov 24, 2026
@HugoXK
HugoXK merged commit 87cda2f into main Nov 24, 2026
36 of 37 checks passed
@HugoXK
HugoXK deleted the dev4/1279-plan-artifact branch November 24, 2026 10:34
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved Issue reviewed and approved by the Fledge Platform Reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

release-watchdog: the 2026-11-24 02:00Z slot shipped no release

2 participants