Skip to content

impl(056): part c, the qualification workflow - #350

Merged
bartekus merged 1 commit into
mainfrom
impl/056-workflow
Oct 28, 2026
Merged

bartekus merged 1 commit into
mainfrom
impl/056-workflow

Conversation

@bartekus

Copy link
Copy Markdown
Contributor

Summary

Spec 056 part c: .github/workflows/qualify.yml, the fresh-consumer qualification of a published family version (056 3.3). It was reviewed in #329 and #328, and is split out again so that only this workflow file needs the owner's statecraft-review-exception approval.

  • Dispatched with the release tag, which must be v<major>.<minor>.<patch> and is checked before any checkout.
  • Downloads the signed manifest from the hosted release and installs the pinned toolchain and the MSRV toolchain. The MSRV comes from the tagged workspace's rust-version, not from the unverified manifest.
  • Runs tools/rustev-release/qualify.sh on each of release.yml's seven platforms. The musl platforms run in an Alpine container pinned by digest.
  • Uploads each platform's step files as qualify-<platform>.
  • Not a required check. rustev-release qualify over the collected files records the lifecycle.

Stacked on #328 (part b2, the harness this workflow runs).

Verification

  • make refresh, then make gate: clean.
  • scripts/check-authored-content.sh and couple: clean.
  • The workflow's matrix runs for real only on dispatch after a publication (056 Acceptance).

@github-actions

Copy link
Copy Markdown

AI review (no-findings)

Reviewing the two changed files: the new qualify.yml workflow and the spec update adding Part c.

.github/workflows/qualify.yml

  • Tag validation (grep -Eq '^v...$') runs before checkout, preventing a malformed input from reaching refs/tags/${{ inputs.tag }}. The regex admits only semver characters, so no injection risk there.
  • All three actions (checkout, setup-node, upload-artifact) are pinned by SHA. The Alpine image is pinned by multi-platform index digest in the env block (not from user input), so the $ALPINE expansion in the docker run line is safe.
  • GH_TOKEN (scoped to contents: read + attestations: read) is passed into the container, where qualify.sh is sourced from the checked-out tag -- owner-controlled code, so the exposure is bounded by the declared permissions.
  • MSRV is extracted from Cargo.toml at the tag via a single-line sed pattern with ^/$ anchors; the regex cannot span lines, so a crafted value cannot inject additional key-value pairs into $GITHUB_OUTPUT.
  • The release-manifest.json download uses an exact-name -p pattern (no globs), and signature verification is deferred to qualify.sh as the comment notes.
  • matrix.platform values are hardcoded; the artifact name qualify-${{ matrix.platform }} cannot be influenced by the dispatch input.
  • node-version: 22 (no patch pin) is intentional for a consumer-qualification workflow that tests against what real consumers would use.

specs/056-release-0-1-1-and-consumer-qualification/spec.md

Part c accurately reflects the workflow: seven platforms matching release.yml's matrix, musl platforms in Alpine pinned by digest, artifact upload per platform, and explicit statement that it is not a required check. The "Remaining for implementation: complete" clause is consistent with an in-progress spec.

No concrete defects found in either file.

{"head": "073f45df161ee0ad526caa07099b46f3fc2e86c7", "verdict": "no-findings", "findings": []}

Subject: cca8d54...073f45d, diff digest b881c11937149c66467638e91ef4d7b20cb971076189638e21286b6265d687dd, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus temporarily deployed to statecraft-review-exception October 28, 2026 02:01 — with GitHub Actions Inactive
Base automatically changed from impl/056-harness to main October 28, 2026 04:24
@github-actions

Copy link
Copy Markdown

AI review (no-findings)

Reviewing the two changed files: a new qualify workflow and a spec amendment.

.github/workflows/qualify.yml

  • Tag validation (grep -Eq '^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$') runs before any checkout and guards all downstream uses of TAG. The validated form (digits and dots only) prevents injection through gh release download "$TAG", ${TAG#v}, and the ref: refs/tags/${{ inputs.tag }} checkout field.
  • All three uses: references are pinned by commit SHA, not mutable tags.
  • The Alpine image is pinned by digest (alpine@sha256:...), which is appropriate for a multi-platform manifest.
  • GH_TOKEN is passed into the Alpine container via -e GH_TOKEN; this is intentional since qualify.sh must call gh, and the token is the standard ephemeral github.token.
  • MSRV emptiness is checked ([ -n "$msrv" ] || ... exit 1); PINNED is not guarded similarly, but an empty value would cause rustup toolchain install to fail, which is acceptable (fail-safe).
  • apk add inside the digest-pinned Alpine container installs from the network without version pinning, which is standard Alpine practice and acceptable given the image itself is pinned.
  • if: ${{ always() }} on upload with if-no-files-found: error correctly captures evidence even on partial failure.
  • The release/ directory is written on the host before the Docker step and mapped via -v "$PWD:/repo", so the container correctly sees release/release-manifest.json at /repo/release/release-manifest.json.

specs/056-release-0-1-1-and-consumer-qualification/spec.md

The Part c description is consistent with the workflow: seven platforms, Alpine for musl, digest-pinned image, rustev-release qualify records the lifecycle (not the workflow itself), and no required-check claim.

No concrete defects found.

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

Subject: 93c868b...a84f557, diff digest b881c11937149c66467638e91ef4d7b20cb971076189638e21286b6265d687dd, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus temporarily deployed to statecraft-review-exception October 28, 2026 04:27 — with GitHub Actions Inactive
@bartekus
bartekus enabled auto-merge October 28, 2026 04:29
@bartekus
bartekus added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 7391ebe Oct 28, 2026
30 checks passed
@bartekus
bartekus deleted the impl/056-workflow branch October 28, 2026 05:50

This branch was previously deployed

1 inactive deployment
statecraft-review-exception — a84f557b Deployed Oct 28, 2026 by bartekus via review-exception #2546
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