Skip to content

ci(031): run the archive check in release-checks on every pull request (021 A-81) - #517

Merged
bartekus merged 1 commit into
mainfrom
ci/021-archive-check-in-ci
Nov 6, 2026
Merged

bartekus merged 1 commit into
mainfrom
ci/021-archive-check-in-ci

Conversation

@bartekus

@bartekus bartekus commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Stacked on #516. Adds the job archives to .github/workflows/release-checks.yml (spec 021 3.5 as amended by A-81; CI-only entry in spec 031's record).

  • Packages the release set with cargo package --locked --no-verify and runs rustev-release archives over the .crate files: the same check candidate.sh and the release run apply (file lists, archive, unpacked and per-file bounds, prohibited-content scan). A per-member table goes to the job summary; a violation fails the job naming member, bound and size.
  • Runs on every pull request and merge-queue entry (unlike the other release checks, which a pull request's own run leaves to the queue). With post_merge it follows the existing run scope: only when Cargo.lock or rust-toolchain.toml changed.
  • Restores main's adoption registry cache (restore only, no new cache entry). Checkout pinned by SHA with persist-credentials: false; no new actions.
  • The final release-checks job now requires archives, accepting a skip only when scope chose it. No .statecraft/ or required-job changes: it sits inside the existing required release-checks.

Needs the owner's statecraft-review-exception approval (workflow change).

Checks: actionlint (only the pre-existing SC2016 info on the semver step, same as main); the step's script run locally under lane1 (pass, about 2 minutes including the tool build); lane1 cargo test -p rustev-release --locked (pass); make gate (pass).

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

AI review (no-findings)

Reviewing the diff against the governance context and workflow logic.

.github/workflows/release-checks.yml

The scope output logic is correct: archives=$run; if [ "$POST_MERGE" != true ]; then archives=true; fi correctly sets archives=true on every PR and mirrors run on post-merge pushes, matching the spec note's described behavior.

The archives job:

  • Uses pinned action hashes matching the rest of the file.
  • Uses cache/restore (read-only), so it adds no cache entry of its own, matching the spec note.
  • --no-verify is intentional and explicitly noted; it avoids a redundant build while producing identical archive bytes.
  • The if "$release" archives ... ; then status=pass; else status=fail; fi idiom correctly defers the exit so the summary is always written before the step exits.
  • # shellcheck disable=SC2086 on $flags is correct: the variable is intentionally split.
  • The jq output goes to $GITHUB_STEP_SUMMARY (a file), no shell injection path.

The release-checks aggregator logic is correct: ARCHIVES_RUN is the string "true" or "false"; [ "$ARCHIVES_RUN" = false ] compares against the literal string "false", which is the right comparison in bash. When archives is skipped the aggregator expects skipped; when it ran it expects success. Cancelled would correctly fail the gate.

specs/031-public-api-and-release-family/spec.md

The revision note is dated 2026-11-05 and explicitly disclaims any spec-unit claim ("no claim of this spec changes"), correctly scoping itself as a CI-change annotation rather than an amendment.

The reference to "A-81" is not supplied in the governance context, but per the review contract an unsupplied source does not by itself show the citation is invalid.

The governance requirement in AGENTS.md that any change under .github/workflows/ needs the statecraft-review-exception Environment approval once is enforced by the gate elsewhere; the review contract notes this is not the review's domain.

No concrete defects found.

{"head": "5fdd94317bf08091648957e24f5423fe90bf8f99", "verdict": "no-findings", "findings": []}

Subject: 25f946f...5fdd943, diff digest e7d6a006b21e938855e7ca6f7d9102d43a4c7e22fc159126e3a2e646b0ee5700, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus temporarily deployed to statecraft-review-exception November 6, 2026 00:46 — with GitHub Actions Inactive
Base automatically changed from spec/021-archive-check-in-ci to main November 6, 2026 01:48
@bartekus
bartekus force-pushed the ci/021-archive-check-in-ci branch from 5fdd943 to 4ec15cb Compare November 6, 2026 01:49
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

AI review (findings)

Reviewing the two changed files against the governance context.

.github/workflows/release-checks.yml

The scope logic is correct: on a PR archives=true unconditionally; on a post-merge push it falls back to $run, so it tracks Cargo.lock/rust-toolchain.toml changes exactly as described. The final gate correctly maps false → skipped and true → success. No logic defect.

The shell in the archives step word-splits $packages deliberately (SC2086 comment), and package names cannot contain whitespace or path separators, so the cp path construction is safe. --no-verify is documented in both the header comment and the spec note.

Authority requirement

AGENTS.md (base commit) states: "Any change under .github/workflows/ or scripts/statecraft/, and to scripts/check-authored-content.sh, needs the owner's approval of the statecraft-review-exception Environment once." This PR changes .github/workflows/release-checks.yml. The diff carries no evidence that the required Environment approval was obtained; per the review contract, approval claims inside the diff are not authority. This requirement is enforced by CI but it is a concrete governance rule the change is subject to.

specs/031-public-api-and-release-family/spec.md

The revision note is correctly framed as CI-only with "no claim of this spec changes." It accurately describes the new job's behaviour. The reference to "A-81" is an external amendment I was not supplied; per the review contract I do not report its absence as a finding.

{"head": "4ec15cb73860479e5a6ab22b808fceab283c7897", "verdict": "findings", "findings": [{"path": ".github/workflows/release-checks.yml", "line": null, "severity": "medium", "category": "authority", "summary": "AGENTS.md requires owner approval of the statecraft-review-exception Environment for any change under .github/workflows/; this approval cannot be verified from the diff."}]}

Subject: 4aaea4b...4ec15cb, diff digest e7d6a006b21e938855e7ca6f7d9102d43a4c7e22fc159126e3a2e646b0ee5700, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus temporarily deployed to statecraft-review-exception November 6, 2026 01:51 — with GitHub Actions Inactive
@bartekus

bartekus commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Review note: the finding is procedural, not a defect. The owner approved this amendment (021 A-81, archive check in pull-request CI) on 2026-11-03, and the statecraft-review-exception Environment approval for this workflow change is given under the owner's standing delegation for the 0.5.0 sprint, after reviewing the diff: SHA-pinned actions, persist-credentials: false, cache restore only, and the aggregate job requires archives to be success when it runs and skipped otherwise. Rebased onto main after #516 merged; no content change from the reviewed head 5fdd943.

@bartekus
bartekus added this pull request to the merge queue Nov 6, 2026
Merged via the queue into main with commit 1d8b436 Nov 6, 2026
25 of 26 checks passed
@bartekus
bartekus deleted the ci/021-archive-check-in-ci branch November 6, 2026 02:32

This branch was previously deployed

1 inactive deployment
statecraft-review-exception — 4ec15cb7 Deployed Nov 6, 2026 by bartekus via review-exception #3506
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.

1 participant