Repository navigation
ci: preflight generated release bodies before publishing - #1001
Conversation
There was a problem hiding this comment.
Reviewed at 644610a. This was a read-only review: I did not run the test suite, dist, or either workflow. Two findings are marked important; the rest are nits.
Important: [skip ci] can block the release, not just this PR's CI. The PR already says to remove it before merging; this is why it matters. The commit title ends in [skip ci], and this repo's squash setting is COMMIT_MESSAGES, so a squash merge of this PR or of #994 can carry the marker into the new head commit. GitHub then skips the push workflows for that commit. release.sh check_ci requires successful push runs of Rust, WASM, Lint, etc. for the tagged SHA, and a tag push on that commit can skip release.yml itself. Fix: amend the commit title before merging, and check the final squash messages for both PRs.
The other findings are inline.
— Claude (Opus 5.5), AI code review via Claude Code, posted from @adityamukho's account at their request
Validate the rendered release body through the existing release gate and add an early PR preflight with boundary and configuration tests. Use one audited cargo-dist version policy in both workflows. Surface warnings as safe Actions annotations and support lower character budgets. Incorporate review feedback while retaining the existing branch filters.
644610a to
532f3c8
Compare
There was a problem hiding this comment.
Re-reviewed at 532f3c8. All seven findings from the review at 644610a are resolved, and I found no new problems. This was a read-only check of the code: I did not run the tests, dist, or either workflow, and no CI has run on this PR.
[skip ci]marker: fixed. There is no skip marker in this PR's commit message or in #994's three commits. The squash setting is stillCOMMIT_MESSAGES, so check the final message when merging.- Version pin only checked after tagging: fixed. Both workflows check
dist-workspace.tomland the manifest againstAUDITED_DIST_VERSION. - Workflow cannot run on this PR: resolved by documentation. The workflow comment now requires the parent PR to pass it before tagging.
- Warning easy to miss: fixed, with escaped annotations and injection tests.
--max-env-bytes: now documented as a backstop in both workflows.--max-charson its own: fixed, with boundary tests.- Flat report shape in tests: fixed, and the "proposed" wording is gone.
Still needed before tagging: Release Body Preflight and the rest of CI must pass on #994 after this is merged into it. Repeat the preflight after the final changelog and date edits.
— Claude (Opus 5.5), AI code review via Claude Code, posted from @adityamukho's account at their request
Summary
Prevent a late GitHub release failure when cargo-dist's generated announcement exceeds the release-body limit. For #994, cargo-dist 0.31.0 produces 118,058 Unicode code points; the generated workflow's
echoadds one LF, so the submitted notes contain 118,059 and leave 6,941 code points of headroom.This is a draft stacked on #994, targeting
release/v3.0.0-alpha, so the diff contains only the preflight changes. The current branch/path filters exclude this stacked PR from CI; no CI results are claimed. The sole commit has no CI-skip directive. After integration, #994 must pass the preflight and the appropriate CI before tagging; the existing release gate also requires successful push checks for the exact tagged commit.Type of change
Changes
ANNOUNCEMENT_BODY=name and terminating NUL.release-gate.ymlto downloadartifacts-plan-dist-manifestfrom the same run and check it before the generated host job. Require nonempty changelog content, the actual release tag, cargo-dist 0.31.0, and the extra LF used by the notes-file transport.dist plan. Keep generatedrelease.ymlanddist-workspace.tomlunchanged.dist-workspace.tomland the manifest against one audited version constant in the checker; the PR installer obtains that same validated version.Measurement
Measured from #994 head
177689670813829900ddf21fe8c6e587ec0e82c0with the checksum-verified official cargo-dist 0.31.0 binary:echoGenerated heading/download overhead is 1,673 code points. The notes-file SHA-256 is
ee937bbf1543e7ff5c00dede7033fa272b906accc4a11f6ea6c84766fbec7156. The earlier 141,076 figure is reported by #994, not independently reproduced from an earlier committed tree.The compact full manifest is 243,064 bytes, already too large for one Linux environment string. The new gate therefore reads the artifact file instead of exporting the full
inputs.planJSON.Validation
bash -n; shared audited-version wiring, direct host dependency and failure propagation inspected.git apply --checkagainst the pinned source snapshot.dist generate --mode ci --checkpassed on the pinned source; the generated workflow is unchanged.cargo test, clippy and Rust formatting were not rerun: this changes Python/YAML release tooling only. No release was created or edited, and no workflow was dispatched or rerun. No product changelog entry is included in this release-automation-only draft.Notes for reviewer
notes.txtimmediately beforegh release create. Reassess if custom artifact-producing jobs or generation behavior change.always()condition, which accepts skipped intermediates. Host hooks also run alongside host, and publish hooks run after GitHub release creation here. The existing release gate is a direct failure dependency and avoids those ordering problems.[Unreleased]notes before the version bump. Repeat after final changelog/date staging and merge updates.--notes-filemode without adding another LF.Review follow-up
Addressed the findings in Claude's review:
Review-fix validation: 71 local tests passed, both workflow YAML files and shell steps validated, and the measured alpha announcement still passes at 118,059 submitted code points. No workflow was dispatched or rerun.