Skip to content

impl(056): part b2, the fresh-consumer qualification harness - #328

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

bartekus merged 1 commit into
mainfrom
impl/056-harness

Conversation

@bartekus

@bartekus bartekus commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Spec 056, part b2: the fresh-consumer qualification harness. Stacked on #326.

  • tools/rustev-release/qualify.sh <version> <manifest> <evidence-dir> runs tools/rustev-release/qualify/harness.py in a new temporary directory (3.3). It refuses a workspace ancestor and any path, Git, patch, source-replacement or alternate-registry configuration, starts with empty Cargo and npm homes and no registry token, and checks every lockfile source and checksum against the signed manifest.
  • Steps write one rustev.qualification-step/1 file per kind and platform:
    • crates: qualify/consumer.rs (bounded decision over contract, core, runtime and rules; the declared example of 3.2 offline; the remote HTTP client and loopback server; cargo install rustev-cli), plus each partial-adoption subset through adoption.sh's new registry mode (RUSTEV_ADOPTION_VERSION, same subset list);
    • npm: install, npm audit signatures, required provenance, qualify/smoke.cjs;
    • cli: hosted archive, checksum, gh attestation verify, smoke commands;
    • image: excluded when the manifest names none.
      A step the host cannot run is not_run, never excluded or passed.
  • adoption.sh without RUSTEV_ADOPTION_VERSION keeps its workspace path mode.
  • Spec 056: part b2 record.

Tests: tools/rustev-release/tests/qualify_harness.rs (offline: usage, freshness refusals, a dry run whose not_run steps qualify refuses). A live run needs a published version after 0.1.0.

Review note (5ae419d): the tar extraction filter is used when the interpreter has it (3.12 and 3.11.4 onward), and the member checks still refuse links, special files and paths outside the root. In registry mode the subset test now runs --locked, so the lockfile checked against the signed manifest before the build is the one built; the duplicate check after the test is removed.

Review note (29c54df): qualify.yml now reads the MSRV from the workspace Cargo.toml at the checked-out tag, not from the manifest before its signature is verified; the harness then requires the verified manifest's msrv to be an installed toolchain, or the crates step is not_run and qualification refuses. The lock_checks [package] finding is a false positive: both writers of that Cargo.toml (Harness.project and adoption.sh line 71) always emit a [package] table, and a missing one exits 2, never skipped (in-hunk comment added).

Review note (3a99047): qualify.sh now checks that python3 is 3.11 or later (tomllib) before running the harness, so an older interpreter gets the stated diagnostic.

Review note (5704503): an excluded step's reason now uses the manifest's own artifact kind (binary artifact for cli, npm artifact, container image).

Review note (fbc09c9): example() now removes a partial example project left by a step that failed part way and rebuilds it, so a later step neither trips on nor trusts it; qualify.yml refuses a tag whose Cargo.toml declares no rust-version instead of installing .0.

Review note (541299d): the crates step now runs the installed CLI as rustev.exe on win32, as the cli step does.

Review note (476e69e): qualify.yml now checks the tag is v<major>.<minor>.<patch> in its first step, before any checkout. The [package] point is a repeat false positive: adoption.sh emits the table in its subset loop (printf '[package]...', line 71) before [workspace]; lock_checks now refuses a Cargo.toml without one with an explicit error instead of a KeyError.

Review note (c5526b7): lock_checks no longer reads Cargo.toml at all. The consumer root is the lockfile's only package without a source, and it must be a generated rustev-adoption-* or rustev-qualification-* consumer; any other source-less package is refused as a path dependency. The lock test now writes no Cargo.toml.

Review note (68e1919): not a defect. Spec 056 3.3 requires offline (network denied where the platform allows it) only for the declared example, which offline_run does; the partial-adoption subsets run "against the registry" by design, --locked after the lockfile is checked against the signed manifest. The README sentence overstates this; narrowing it is tracked in #342 and left out of this PR.

Review note (b177daa): fixed. cli_smoke now compares the recorded outcome with expected.json's outcome (the file holds the whole SYNTHETIC judgment), as consumer.rs already did.

Split (2026-10-28): part c (.github/workflows/qualify.yml) moved back out to #350, stacked on this PR, so this one changes no workflow file and needs no review exception. The harness fixes from the review rounds stay here.

Armed on cca8d54 with the owner's approval (2026-10-28): the reviewer stalled on this head five times; its last completed review (b177daa) found the outcome-comparison defect, fixed here, and nothing else changed since.

@github-actions

Copy link
Copy Markdown

AI review skipped: transient

the reviewer call stalled twice (no event for 180 seconds)

This pull request was not reviewed by the AI reviewer. A green ci-gate does not say otherwise.

@github-actions

Copy link
Copy Markdown

AI review (findings)

Reviewing the diff across all changed files.

tools/rustev-release/qualify/harness.py — filter='data' incompatible with Python 3.11

In the cli method:

tar.extractall(path, members=members, filter='data')

The filter keyword argument to tarfile.TarFile.extractall() was added in Python 3.12. Python 3.11.4+ added only a DeprecationWarning when filter is absent, not the parameter itself. On Python 3.11 (the stated minimum in qualify/README.md and qualify.sh), this call raises TypeError: extractall() got an unexpected keyword argument 'filter', crashing the cli step on every Python 3.11 host.

tools/rustev-release/adoption.sh — double lockfile validation in registry mode

When $version is non-empty, harness.py lock is called twice against the same unmodified $dir/Cargo.lock:

  1. Immediately after cargo generate-lockfile (the else branch of the lockfile-copy block, ~line 119).
  2. Again in the else branch of the drift-check block (~line 148), before collecting evidence.

The lockfile does not change between the two invocations, so the second call is redundant. If the first check is meant to be an early fail-fast guard and the second was intended to serve only for evidence collection, the re-validation is an oversight.

No other concrete defects were found. The guard function's omission of [replace] is covered by the subsequent lockfile source/checksum checks; the hardcoded signer identity is a governance concern outside the review scope; the npm package-field keying matches the test fixture; and the tarfile member-set comparison prevents path-traversal independent of filter.

{"head": "5ae419d330f6e948bbd42d17ff1948842f14e78f", "verdict": "findings", "findings": [{"path": "tools/rustev-release/qualify/harness.py", "line": 339, "summary": "tar.extractall() is called with filter='data', a keyword argument added in Python 3.12; on Python 3.11 (the stated minimum) this raises TypeError and crashes the cli step."}, {"path": "tools/rustev-release/adoption.sh", "line": 148, "summary": "In registry mode (non-empty $version), harness.py lock is invoked twice against the same unchanged Cargo.lock—once after cargo generate-lockfile and once in the drift-check else branch—making the second call redundant."}]}

Subject: ddd160f...5ae419d, diff digest 998fe0b3026ded423491b83479545996067e0d1e192ea5ac00b290552dd589d6, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus had a problem deploying to statecraft-review-exception October 27, 2026 16:51 — with GitHub Actions Error
@github-actions

Copy link
Copy Markdown

AI review skipped: transient

the reviewer call stalled twice (no event for 180 seconds)

This pull request was not reviewed by the AI reviewer. A green ci-gate does not say otherwise.

bartekus added a commit that referenced this pull request Oct 27, 2026
Spec 056, part c: the qualification workflow. Stacked on #328.

- `.github/workflows/qualify.yml` (056 3.3), dispatched after
publication with the release tag. It downloads `release-manifest.json`
and its `.sig` from the hosted release, installs the pinned toolchain
and the manifest's MSRV, and runs `tools/rustev-release/qualify.sh` on
each of release.yml's seven platforms (spec 027 3.13.1). The musl
platforms run the harness in an Alpine 3.22 container (pinned by digest)
on the host, so the harness sees the platform's libc.
- Each platform's step files are uploaded as `qualify-<platform>`;
`rustev-release qualify` over the collected evidence records the
lifecycle, never this workflow.
- Read-only permissions (`contents`, `attestations`); actions pinned as
in release.yml. Not a required check, so not in
`ci.extra_required_jobs`.
- A change under `.github/workflows/`, so it needs the owner's
`statecraft-review-exception` approval once.
- Spec 056: part c record, and what remains for `implementation:
complete`.

Checked locally: `actionlint`, `make gate`.

Review note (7d7dc75): fixed. The Alpine image is pinned by its
multi-platform index digest (`alpine@sha256:2e0b81d6...`), like the
actions' commit pins.
@github-actions

Copy link
Copy Markdown

AI review (findings)

Reviewing the qualification harness, workflow, and adoption-script changes for concrete bugs and security issues.

Finding 1 — qualify.yml: MSRV extracted from unverified manifest before signature check

In the release step (≈ lines 53–60 of the new file), the workflow downloads release-manifest.json and immediately reads the msrv field with Python:

msrv=$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["msrv"])' release/release-manifest.json …)
echo "msrv=$msrv" >> "$GITHUB_OUTPUT"

That value is then consumed in the next step:

run: rustup toolchain install "$PINNED" "$MSRV" --profile minimal

The manifest signature is not verified until qualify.sh runs harness.py's verify_manifest() inside the later Qualify step. So between download and qualify.sh, the MSRV from the unsigned manifest is trusted for toolchain installation. An attacker who can replace the hosted manifest before the workflow reads it could cause the workflow to install an arbitrary toolchain string (rustup would reject malformed strings, but a plausible-looking wrong version would silently proceed and the qualification would then fail). The severity is low given access controls and GitHub release immutability, but it contradicts the stated security model where manifest content should not be trusted before signature verification.

Finding 2 — harness.py: lock_checks reads Cargo.toml adjacent to the lock file; the lock subcommand entry-point can KeyError if the TOML has no [package] table

lock_checks always does:

root = tomllib.loads(lock.with_name('Cargo.toml').read_text())['package']['name']

The __main__ guard catches KeyError and exits 2, but adoption.sh treats any non-zero exit from the lock subcommand as a hard failure. The project() method in the harness always writes a [package] section, so the harness-internal calls are safe. For the lock subcommand path invoked by adoption.sh, the Cargo.toml is the one generated by adoption.sh—the diff only shows the [workspace]/[dependencies] fragment, making it impossible to confirm from the hunk alone that a [package] section is always present above it. If the section is absent (e.g., virtual workspace), the subcommand exits 2 and every adoption subset fails in registry mode. Not a confirmed bug given the truncated context, but a fragile assumption worth noting.

Finding 3 — harness.py: offline_run sandbox probe writes to self.log before self.log is assigned

offline_prefix is initialised lazily on the first call to offline_run. During that initialisation the probe does:

probe = subprocess.run(prefix + ['true'], cwd=self.work, env=self.env,
                       stdout=self.log, stderr=self.log, …)

self.log is only set inside the with … as self.log: block in execute(), so any call to offline_run from within that block is fine. However, if offline_run were ever called outside execute() (e.g., directly from tests), this would raise AttributeError. In the current code the call sites are all inside execute(), so this is not a runtime bug today, but the assumption is not enforced.


{"head": "29c54df7b8f3bf8cb4f0dc25adcc42d4f2318aa7", "verdict": "findings", "findings": [{"path": ".github/workflows/qualify.yml", "line": 57, "summary": "The MSRV field is read from the downloaded manifest and used to install a Rust toolchain before the manifest signature is verified by qualify.sh, trusting unverified manifest content ahead of the stated verification step."}, {"path": "tools/rustev-release/qualify/harness.py", "line": 55, "summary": "lock_checks unconditionally reads ['package']['name'] from the adjacent Cargo.toml; if that file is a virtual workspace with no [package] table the call raises KeyError and causes every registry-mode adoption subset to fail with exit 2."}]}

Subject: ddd160f...29c54df, diff digest eb15a3acd1791d2f566c0612af9963770609e1e11bfe78341237df2e1566b8cd, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus temporarily deployed to statecraft-review-exception October 27, 2026 18:37 — with GitHub Actions Inactive
bartekus added a commit that referenced this pull request Oct 27, 2026
Spec 056, part c: the qualification workflow. Stacked on #328.

- `.github/workflows/qualify.yml` (056 3.3), dispatched after
publication with the release tag. It downloads `release-manifest.json`
and its `.sig` from the hosted release, installs the pinned toolchain
and the manifest's MSRV, and runs `tools/rustev-release/qualify.sh` on
each of release.yml's seven platforms (spec 027 3.13.1). The musl
platforms run the harness in an Alpine 3.22 container (pinned by digest)
on the host, so the harness sees the platform's libc.
- Each platform's step files are uploaded as `qualify-<platform>`;
`rustev-release qualify` over the collected evidence records the
lifecycle, never this workflow.
- Read-only permissions (`contents`, `attestations`); actions pinned as
in release.yml. Not a required check, so not in
`ci.extra_required_jobs`.
- A change under `.github/workflows/`, so it needs the owner's
`statecraft-review-exception` approval once.
- Spec 056: part c record, and what remains for `implementation:
complete`.

Checked locally: `actionlint`, `make gate`.

Review note (7d7dc75): fixed. The Alpine image is pinned by its
multi-platform index digest (`alpine@sha256:2e0b81d6...`), like the
actions' commit pins.
bartekus added a commit that referenced this pull request Oct 27, 2026
Spec 056, part c: the qualification workflow. Stacked on #328.

- `.github/workflows/qualify.yml` (056 3.3), dispatched after
publication with the release tag. It downloads `release-manifest.json`
and its `.sig` from the hosted release, installs the pinned toolchain
and the manifest's MSRV, and runs `tools/rustev-release/qualify.sh` on
each of release.yml's seven platforms (spec 027 3.13.1). The musl
platforms run the harness in an Alpine 3.22 container (pinned by digest)
on the host, so the harness sees the platform's libc.
- Each platform's step files are uploaded as `qualify-<platform>`;
`rustev-release qualify` over the collected evidence records the
lifecycle, never this workflow.
- Read-only permissions (`contents`, `attestations`); actions pinned as
in release.yml. Not a required check, so not in
`ci.extra_required_jobs`.
- A change under `.github/workflows/`, so it needs the owner's
`statecraft-review-exception` approval once.
- Spec 056: part c record, and what remains for `implementation:
complete`.

Checked locally: `actionlint`, `make gate`.

Review note (7d7dc75): fixed. The Alpine image is pinned by its
multi-platform index digest (`alpine@sha256:2e0b81d6...`), like the
actions' commit pins.
@github-actions

Copy link
Copy Markdown

AI review (findings)

Reviewing the diff across all changed paths.

.github/workflows/qualify.yml — Actions are pinned by digest, concurrency guard is correct, Alpine image is pinned by digest, GH_TOKEN is scoped to contents: read + attestations: read. No injection issues: $TAG is always double-quoted and qualify.sh validates full semver before use.

tools/rustev-release/qualify.sh — Version validated with two-pass check (character class + regex). mktemp + trap cleanup is correct. The Python presence check on line 11 is the only concrete defect (see below).

tools/rustev-release/qualify/harness.py

  • guard() correctly checks workspace markers up the ancestor chain and inspects CARGO_HOME Cargo config for forbidden keys (patch, source, registries, registry). The paths key is not a standard top-level Cargo config key, but its presence in the check is harmless — it never produces a false pass.
  • Environment stripping is thorough; RUSTUP_HOME is intentionally preserved.
  • Tarball extraction: member names are checked against the exact expected set before extraction; any path-traversal name fails the equality check. data_filter is used where available; the fallback is safe because links and special files are pre-refused.
  • lock_checks() refuses non-crates.io sources and validates version + checksum against the signed manifest.
  • verify_manifest() passes the manifest file via stdin to ssh-keygen -Y verify against the repo's allowed_signers file — correct.
  • image kind: always raises NotRun('container qualification is not implemented'). If a manifest ever includes an image artifact (required = True), this causes failed = True. The README explicitly documents this limitation ("An image named by a future manifest remains not_run"), so this is intentional.
  • npm audit provenance check correctly requires attestations.provenance to be truthy.
  • gh attestation verify is called with --source-ref and --source-digest from the signature-verified manifest — solid chain of trust.

tools/rustev-release/adoption.sh — The CDPATH=''/cd -- pattern is correct for path-independent script location. Version validation mirrors qualify.sh. ${version:+--locked} correctly adds --locked only in registry mode.

tools/rustev-release/qualify/consumer.rs — Synthetic consumer; no workspace fixtures used.

tools/rustev-release/tests/qualify_harness.rs — Tests exercise: malformed version rejection, workspace marker detection, dry-run step parsing + qualification refusal, forbidden Cargo config, and lockfile source/checksum validation. Test assertions are consistent with the harness behavior.

specs/056-release-0-1-1-and-consumer-qualification/spec.md — Parts b2 and c added with correct date stamps. implementation: in-progress is appropriate while acceptance criteria remain outstanding.


Concrete defect:

qualify.sh line 11 checks only that python3 exists (command -v python3 >/dev/null), then emits "Python 3.11 or later required" if it is absent. If Python 3.10 or earlier is present, the check passes silently, and the harness fails immediately with ModuleNotFoundError: No module named 'tomllib' — the documented clean diagnostic is never printed. The fix is to add a version guard: python3 -c 'import sys; sys.exit(sys.version_info < (3,11))'.

{"head": "3a99047fbf808324f49dd87a54cf11e77e42be45", "verdict": "findings", "findings": [{"path": "tools/rustev-release/qualify.sh", "line": 11, "summary": "The Python presence check passes for Python 3.10 or earlier, producing an opaque ModuleNotFoundError instead of the advertised 'Python 3.11 or later required' diagnostic, because tomllib is not available before 3.11."}]}

Subject: ddd160f...3a99047, diff digest 99e3af4c11a0f08c8ec3d9eca9b1183cb07105778b7f5fb9add06ba0e5c1825b, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus temporarily deployed to statecraft-review-exception October 27, 2026 19:09 — with GitHub Actions Inactive
bartekus added a commit that referenced this pull request Oct 27, 2026
Spec 056, part c: the qualification workflow. Stacked on #328.

- `.github/workflows/qualify.yml` (056 3.3), dispatched after
publication with the release tag. It downloads `release-manifest.json`
and its `.sig` from the hosted release, installs the pinned toolchain
and the manifest's MSRV, and runs `tools/rustev-release/qualify.sh` on
each of release.yml's seven platforms (spec 027 3.13.1). The musl
platforms run the harness in an Alpine 3.22 container (pinned by digest)
on the host, so the harness sees the platform's libc.
- Each platform's step files are uploaded as `qualify-<platform>`;
`rustev-release qualify` over the collected evidence records the
lifecycle, never this workflow.
- Read-only permissions (`contents`, `attestations`); actions pinned as
in release.yml. Not a required check, so not in
`ci.extra_required_jobs`.
- A change under `.github/workflows/`, so it needs the owner's
`statecraft-review-exception` approval once.
- Spec 056: part c record, and what remains for `implementation:
complete`.

Checked locally: `actionlint`, `make gate`.

Review note (7d7dc75): fixed. The Alpine image is pinned by its
multi-platform index digest (`alpine@sha256:2e0b81d6...`), like the
actions' commit pins.
@github-actions

Copy link
Copy Markdown

AI review (findings)

Looking at the changed files for bugs, security problems, and inconsistencies.

harness.py – exclusion reason for the cli kind is wrong

In execute(), the required check for the cli step correctly maps to the manifest artifact kind 'binary':

required = ... any(a['kind'] == ('binary' if kind == 'cli' else kind) for a in self.m['artifacts'])

But the exclusion message uses kind directly:

status = {'excluded': {'reason': 'the signed manifest names no container image'
          if kind == 'image' else 'the signed manifest names no ' + kind}}

When kind == 'cli' and no binary artifacts are present, the written step JSON will contain "reason": "the signed manifest names no cli" — a string that does not match the manifest's own artifact kind "binary". The qualify_harness.rs test only asserts the image exclusion reason; the cli exclusion reason is untested. Any downstream consumer that matches the reason string (e.g., family.rs validation, audit tooling) would see a mismatch between what the manifest calls the artifact (binary) and what the step says was absent (cli).


qualify.yml – workflow file under .github/workflows/ requires owner approval of statecraft-review-exception

Per AGENTS.md: "Any change under .github/workflows/ … needs the owner's approval of the statecraft-review-exception Environment once." The new qualify.yml is a .github/workflows/ file. Enforcement is noted as occurring elsewhere so this is flagged for completeness, not as a code defect, and no other concrete code defects were found in the workflow.


No other concrete defects are supported by the supplied evidence.

{"head": "57045036a6192b3ac1c8114d09b124e923367052", "verdict": "findings", "findings": [{"path": "tools/rustev-release/qualify/harness.py", "line": 305, "summary": "Exclusion reason for the 'cli' step says 'the signed manifest names no cli' but the manifest artifact kind for CLI archives is 'binary', making the reason string inconsistent with the manifest's own terminology."}]}

Subject: ddd160f...5704503, diff digest 6c6f969f54e7c096425a0e1e18d43badf6f88643370e5692bf588f7788d8b6d8, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus had a problem deploying to statecraft-review-exception October 27, 2026 19:20 — with GitHub Actions Error
bartekus added a commit that referenced this pull request Oct 27, 2026
Spec 056, part c: the qualification workflow. Stacked on #328.

- `.github/workflows/qualify.yml` (056 3.3), dispatched after
publication with the release tag. It downloads `release-manifest.json`
and its `.sig` from the hosted release, installs the pinned toolchain
and the manifest's MSRV, and runs `tools/rustev-release/qualify.sh` on
each of release.yml's seven platforms (spec 027 3.13.1). The musl
platforms run the harness in an Alpine 3.22 container (pinned by digest)
on the host, so the harness sees the platform's libc.
- Each platform's step files are uploaded as `qualify-<platform>`;
`rustev-release qualify` over the collected evidence records the
lifecycle, never this workflow.
- Read-only permissions (`contents`, `attestations`); actions pinned as
in release.yml. Not a required check, so not in
`ci.extra_required_jobs`.
- A change under `.github/workflows/`, so it needs the owner's
`statecraft-review-exception` approval once.
- Spec 056: part c record, and what remains for `implementation:
complete`.

Checked locally: `actionlint`, `make gate`.

Review note (7d7dc75): fixed. The Alpine image is pinned by its
multi-platform index digest (`alpine@sha256:2e0b81d6...`), like the
actions' commit pins.
@github-actions

Copy link
Copy Markdown

AI review skipped: transient

the reviewer call stalled twice (no event for 180 seconds)

This pull request was not reviewed by the AI reviewer. A green ci-gate does not say otherwise.

@bartekus
bartekus temporarily deployed to statecraft-review-exception October 27, 2026 19:27 — with GitHub Actions Inactive
@bartekus
bartekus temporarily deployed to statecraft-review-exception October 27, 2026 19:47 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown

AI review (no-findings)

I reviewed the diff carefully across all seven changed paths against the governance documents and repo context.

specs/056-.../spec.md — Parts b2 and c extend the spec in place. The lifecycle language ("Remaining for implementation: complete") is consistent with the contract's description of approved + in-progress.

.github/workflows/qualify.yml — The workflow is workflow_dispatch-only, permissions are minimal (contents: read, attestations: read), actions are pinned by hash, the Alpine image is pinned by digest, and cancel-in-progress: false is appropriate. The TAG input is quoted throughout shell uses; qualify.sh then validates the version format before use. The musl container approach mirrors release.yml. The MSRV extraction via sed adds .0 normalization but produces msrv=.0 if rust-version is absent from Cargo.toml, which would cause rustup toolchain install to fail with a non-descriptive error — minor robustness issue, not a security one.

tools/rustev-release/adopt.sh — The registry-mode additions correctly double-validate RUSTEV_ADOPTION_VERSION (case pattern plus grep -Eq semver). The lockfile is verified against the signed manifest before any compilation (python3 harness.py lock). The drift check is appropriately skipped in registry mode (the manifest check provides equivalent assurance). --locked is correctly added to cargo test in registry mode.

tools/rustev-release/qualify.sh — Straightforward wrapper. Version validated twice (case pattern + grep). Python 3.11 check is correct. mktemp -d with trap cleanup is correct POSIX practice.

tools/rustev-release/qualify/harness.py — Reviewed in detail:

  • guard() correctly refuses source-replacement, patch, registries, compiler-override config before replacing CARGO_HOME.
  • lock_checks() correctly refuses non-crates.io sources, missing checksums, and version/checksum mismatches against the signed manifest.
  • Workspace ancestor detection (Cargo.toml/package.json) is correct.
  • Environment stripping is thorough; RUSTEV_ADOPTION_* is stripped then re-set explicitly by crates().
  • Tarfile extraction in cli() enforces an exact three-member set before extracting, rejecting path traversal, symlinks, and hardlinks regardless of whether filter='data' is available.
  • verify_manifest() is called at the start of each required kind — redundant for subsequent kinds but not harmful.
  • offline_run() provides defense-in-depth around Cargo's own --offline flag.

qualify/consumer.rs — Correctly uses only public registry package APIs; loopback() compiles the remote client/server APIs without contacting a provider.

qualify/smoke.cjs — Correct npm/wasm smoke test; relies on the example files produced by consumer.rs::export().

tools/rustev-release/tests/qualify_harness.rs — Tests cover version-format refusal, workspace detection, dry-run step parsing and qualification refusal, config-based refusal, and lockfile source/checksum validation.

No concrete defects found in the supplied evidence.

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

Subject: ddd160f...effb839, diff digest 940cf1b5fa24778e783159af20e35f01234c03f5e3cb89a12a416a411aca18ab, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus had a problem deploying to statecraft-review-exception October 27, 2026 20:45 — with GitHub Actions Error
bartekus added a commit that referenced this pull request Oct 27, 2026
Spec 056, part c: the qualification workflow. Stacked on #328.

- `.github/workflows/qualify.yml` (056 3.3), dispatched after
publication with the release tag. It downloads `release-manifest.json`
and its `.sig` from the hosted release, installs the pinned toolchain
and the manifest's MSRV, and runs `tools/rustev-release/qualify.sh` on
each of release.yml's seven platforms (spec 027 3.13.1). The musl
platforms run the harness in an Alpine 3.22 container (pinned by digest)
on the host, so the harness sees the platform's libc.
- Each platform's step files are uploaded as `qualify-<platform>`;
`rustev-release qualify` over the collected evidence records the
lifecycle, never this workflow.
- Read-only permissions (`contents`, `attestations`); actions pinned as
in release.yml. Not a required check, so not in
`ci.extra_required_jobs`.
- A change under `.github/workflows/`, so it needs the owner's
`statecraft-review-exception` approval once.
- Spec 056: part c record, and what remains for `implementation:
complete`.

Checked locally: `actionlint`, `make gate`.

Review note (7d7dc75): fixed. The Alpine image is pinned by its
multi-platform index digest (`alpine@sha256:2e0b81d6...`), like the
actions' commit pins.
@github-actions

Copy link
Copy Markdown

AI review skipped: transient

the reviewer call stalled twice (no event for 180 seconds)

This pull request was not reviewed by the AI reviewer. A green ci-gate does not say otherwise.

bartekus added a commit that referenced this pull request Oct 27, 2026
Spec 056, part c: the qualification workflow. Stacked on #328.

- `.github/workflows/qualify.yml` (056 3.3), dispatched after
publication with the release tag. It downloads `release-manifest.json`
and its `.sig` from the hosted release, installs the pinned toolchain
and the manifest's MSRV, and runs `tools/rustev-release/qualify.sh` on
each of release.yml's seven platforms (spec 027 3.13.1). The musl
platforms run the harness in an Alpine 3.22 container (pinned by digest)
on the host, so the harness sees the platform's libc.
- Each platform's step files are uploaded as `qualify-<platform>`;
`rustev-release qualify` over the collected evidence records the
lifecycle, never this workflow.
- Read-only permissions (`contents`, `attestations`); actions pinned as
in release.yml. Not a required check, so not in
`ci.extra_required_jobs`.
- A change under `.github/workflows/`, so it needs the owner's
`statecraft-review-exception` approval once.
- Spec 056: part c record, and what remains for `implementation:
complete`.

Checked locally: `actionlint`, `make gate`.

Review note (7d7dc75): fixed. The Alpine image is pinned by its
multi-platform index digest (`alpine@sha256:2e0b81d6...`), like the
actions' commit pins.
bartekus added a commit that referenced this pull request Oct 27, 2026
Spec 056, part c: the qualification workflow. Stacked on #328.

- `.github/workflows/qualify.yml` (056 3.3), dispatched after
publication with the release tag. It downloads `release-manifest.json`
and its `.sig` from the hosted release, installs the pinned toolchain
and the manifest's MSRV, and runs `tools/rustev-release/qualify.sh` on
each of release.yml's seven platforms (spec 027 3.13.1). The musl
platforms run the harness in an Alpine 3.22 container (pinned by digest)
on the host, so the harness sees the platform's libc.
- Each platform's step files are uploaded as `qualify-<platform>`;
`rustev-release qualify` over the collected evidence records the
lifecycle, never this workflow.
- Read-only permissions (`contents`, `attestations`); actions pinned as
in release.yml. Not a required check, so not in
`ci.extra_required_jobs`.
- A change under `.github/workflows/`, so it needs the owner's
`statecraft-review-exception` approval once.
- Spec 056: part c record, and what remains for `implementation:
complete`.

Checked locally: `actionlint`, `make gate`.

Review note (7d7dc75): fixed. The Alpine image is pinned by its
multi-platform index digest (`alpine@sha256:2e0b81d6...`), like the
actions' commit pins.
@github-actions

Copy link
Copy Markdown

AI review (findings)

Reviewing the PR, which adds a fresh-consumer qualification harness (spec 056, parts b2 and c).

Finding: adoption.sh subset tests in registry mode do not enforce offline execution

tools/rustev-release/qualify/README.md line 30 states explicitly: "Both pinned and MSRV consumer tests run with Cargo offline; process network denial uses sandbox-exec or a network namespace when available."

However, in tools/rustev-release/qualify/harness.py the call that exercises adoption.sh uses self.run(), not self.offline_run():

# harness.py, crates() method
self.offline_run('cargo', '+' + toolchain, 'test', '--locked', '--offline', cwd=example)
...
self.run('sh', HERE.parent / 'adoption.sh')   # no network sandbox

And in tools/rustev-release/adoption.sh the subset cargo test in registry mode adds --locked but not --offline:

# adoption.sh ~line 127
if ! result=$(cd "$dir" && RUSTEV_ADOPTION_MARK="$mark" cargo test --quiet ${version:+--locked} --test subset 2>&1)

The example-project tests (run via offline_run) correctly get both the --offline flag and the OS-level network sandbox (sandbox-exec/unshare -n). The adoption subset tests get neither. This contradicts the README's explicit guarantee and means adoption subset consumer tests can make network connections during execution.

{"head": "68e1919c9a07f2381f84a050da3472eaad9bb417", "verdict": "findings", "findings": [{"path": "tools/rustev-release/qualify/harness.py", "line": null, "summary": "adoption.sh is invoked via self.run() rather than self.offline_run(), so adoption subset cargo tests lack both --offline and the OS-level network sandbox, contradicting the README's explicit claim that both pinned and MSRV consumer tests run with Cargo offline."}, {"path": "tools/rustev-release/qualify/README.md", "line": 30, "summary": "Claims 'Both pinned and MSRV consumer tests run with Cargo offline' but adoption.sh subset tests use only --locked, not --offline, and receive no network sandbox."}]}

Subject: a1f97c2...68e1919, diff digest c8e11f7ea9081b3db8410d5a2fdd03034fdd1d9a8a980cedb5758d9d54604db6, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus temporarily deployed to statecraft-review-exception October 27, 2026 23:43 — with GitHub Actions Inactive
Base automatically changed from impl/056-qualify to main October 28, 2026 00:28
bartekus added a commit that referenced this pull request Oct 28, 2026
Spec 056, part c: the qualification workflow. Stacked on #328.

- `.github/workflows/qualify.yml` (056 3.3), dispatched after
publication with the release tag. It downloads `release-manifest.json`
and its `.sig` from the hosted release, installs the pinned toolchain
and the manifest's MSRV, and runs `tools/rustev-release/qualify.sh` on
each of release.yml's seven platforms (spec 027 3.13.1). The musl
platforms run the harness in an Alpine 3.22 container (pinned by digest)
on the host, so the harness sees the platform's libc.
- Each platform's step files are uploaded as `qualify-<platform>`;
`rustev-release qualify` over the collected evidence records the
lifecycle, never this workflow.
- Read-only permissions (`contents`, `attestations`); actions pinned as
in release.yml. Not a required check, so not in
`ci.extra_required_jobs`.
- A change under `.github/workflows/`, so it needs the owner's
`statecraft-review-exception` approval once.
- Spec 056: part c record, and what remains for `implementation:
complete`.

Checked locally: `actionlint`, `make gate`.

Review note (7d7dc75): fixed. The Alpine image is pinned by its
multi-platform index digest (`alpine@sha256:2e0b81d6...`), like the
actions' commit pins.
@github-actions

Copy link
Copy Markdown

AI review skipped: transient

the reviewer call stalled twice (no event for 180 seconds)

This pull request was not reviewed by the AI reviewer. A green ci-gate does not say otherwise.

@bartekus
bartekus temporarily deployed to statecraft-review-exception October 28, 2026 00:37 — with GitHub Actions Inactive
@bartekus
bartekus had a problem deploying to statecraft-review-exception October 28, 2026 01:19 — with GitHub Actions Error
@github-actions

Copy link
Copy Markdown

AI review (findings)

Reviewing the new qualification harness, workflow, and supporting scripts for concrete defects.

tools/rustev-release/qualify/harness.py — cli_smoke outcome comparison is structurally wrong

consumer.rs's export() writes pkg::EXAMPLE_JUDGMENT directly as expected.json. The Rust unit test in the same file confirms EXAMPLE_JUDGMENT is a JSON object with an outcome key:

serde_json::from_slice::<serde_json::Value>(pkg::EXAMPLE_JUDGMENT).unwrap()["outcome"]

So expected.json has the shape {"outcome": <value>, …}.

In cli_smoke, the comparison is:

if read(path / 'record.json')['core']['recorded']['judgment']['outcome'] != read(path / 'expected.json'):
    raise ValueError('CLI example outcome mismatch')

The left side is the outcome value extracted from the CLI record; the right side is the full expected.json dict (the whole judgment object). They are structurally different types/shapes, so this condition is always True and every CLI qualification step will raise ValueError('CLI example outcome mismatch'). The comparison should be read(path / 'expected.json')['outcome'].


No other concrete defects found. The workflow file requires the statecraft-review-exception Environment approval per AGENTS.md, but that is enforced outside review.

{"head": "b177daa501a6ed24dfe404b77e3413ea82196539", "verdict": "findings", "findings": [{"path": "tools/rustev-release/qualify/harness.py", "line": null, "summary": "cli_smoke compares the CLI run's judgment outcome value against the full expected.json dict; consumer.rs confirms EXAMPLE_JUDGMENT is a judgment object with an 'outcome' key, so the right-hand side must be read(path / 'expected.json')['outcome'], otherwise the check always raises ValueError('CLI example outcome mismatch')."}]}

Subject: 8dcbf53...b177daa, diff digest c8e11f7ea9081b3db8410d5a2fdd03034fdd1d9a8a980cedb5758d9d54604db6, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus temporarily deployed to statecraft-review-exception October 28, 2026 01:50 — with GitHub Actions Inactive
bartekus added a commit that referenced this pull request Oct 28, 2026
Spec 056, part c: the qualification workflow. Stacked on #328.

- `.github/workflows/qualify.yml` (056 3.3), dispatched after
publication with the release tag. It downloads `release-manifest.json`
and its `.sig` from the hosted release, installs the pinned toolchain
and the manifest's MSRV, and runs `tools/rustev-release/qualify.sh` on
each of release.yml's seven platforms (spec 027 3.13.1). The musl
platforms run the harness in an Alpine 3.22 container (pinned by digest)
on the host, so the harness sees the platform's libc.
- Each platform's step files are uploaded as `qualify-<platform>`;
`rustev-release qualify` over the collected evidence records the
lifecycle, never this workflow.
- Read-only permissions (`contents`, `attestations`); actions pinned as
in release.yml. Not a required check, so not in
`ci.extra_required_jobs`.
- A change under `.github/workflows/`, so it needs the owner's
`statecraft-review-exception` approval once.
- Spec 056: part c record, and what remains for `implementation:
complete`.

Checked locally: `actionlint`, `make gate`.

Review note (7d7dc75): fixed. The Alpine image is pinned by its
multi-platform index digest (`alpine@sha256:2e0b81d6...`), like the
actions' commit pins.
@github-actions

Copy link
Copy Markdown

AI review skipped: transient

the reviewer call stalled twice (no event for 180 seconds)

This pull request was not reviewed by the AI reviewer. A green ci-gate does not say otherwise.

@bartekus
bartekus had a problem deploying to statecraft-review-exception October 28, 2026 01:57 — with GitHub Actions Error
@github-actions

Copy link
Copy Markdown

AI review skipped: transient

the reviewer call stalled twice (no event for 180 seconds)

This pull request was not reviewed by the AI reviewer. A green ci-gate does not say otherwise.

@bartekus
bartekus added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 93c868b Oct 28, 2026
60 checks passed
@bartekus
bartekus deleted the impl/056-harness branch October 28, 2026 04:24
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