build: split release closeout stages#826
Merged
Merged
Conversation
Split the release-state stages in scripts/verify-release-closeout.mjs so Mode 2 closeout reflects that the GitHub Release is finalized after promotion, not before. Add a final stage; make promote tolerant of a not-yet-finalized Release (GREEN when draft/prerelease, YELLOW when already finalized, never RED on release-finalization state); extract a pure, exported classifyGithubRelease helper behind a main guard for deterministic unit tests; route promote, final, and mode1 through the latest-channel npm check while preserving publish and mode1 semantics. Modernize the standalone closeout test to the current 0.15.0 release artifacts (the prior 0.12.13 anchors no longer match the live facts and current release JSON) and add the classifier stage-by-state matrix plus a final-stage case. Document the four stages in docs/RELEASING.md and note that repo-surface-status freshness is an independent staleness check.
Make the closeout reconciler and its test future-proof without expanding scope: - classifyGithubRelease now fails closed: an unknown stage or a malformed release object returns RED instead of falling through to a passing branch. - The subprocess helper gains a bounded timeout (60s) and max-buffer (10 MiB) so a hung npm/git/gh call cannot stall closeout. Failed or timed-out commands still return null, so reporting semantics are unchanged. - The standalone test derives the release version under test from docs/releases/current.json at runtime (guarded against facts.json drift) instead of hardcoding a literal, and skips the independent freshness gate (--max-updated-age-hours 0) so the release-state assertions are deterministic and clock-independent. Adds fail-closed classifier cases. - RELEASING.md documents the --allow-stamp-pending window for inline promote.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Split the release-state stages in the post-release truth reconciler so that Mode 2 closeout reflects that the GitHub Release is finalized after promotion, not before. No protocol surface change.
Scope
Tooling, its test, and release docs only. No wire, schema, signing, CLI, or runtime behavior change; no published-package change; no workflow change; no release-state JSON change; no dependency change. Public-surface sentinels are unchanged.