Repository navigation
impl(031): increment 5, the npm members and the absences in the release set - #162
Conversation
AI review (no-findings)Reviewing the diff for bugs, security issues, and inconsistencies. Cargo.lock / Cargo.toml: The
Tests: Spec text (021, 031): The 021 increment correctly discloses the audit failure, the fix applied, and that 3.7 (full reproduction) remains open pending the post-merge candidate run. The 031 increment accurately narrates the added member list and absence list relative to the code. No concrete defect found. {"head": "3670e6baeb108a3e1257fab7bdc4b965f81c7567", "verdict": "no-findings", "findings": []}Subject: 70a6424...3670e6b, diff digest 543fdd87c0b0eca509eccaca1db9ac6366402191481698b58e7da528456071fd, 1 call(s). An AI comment is not an approval. |
3670e6b to
419b664
Compare
AI review (findings)Reviewing the PR for bugs, security issues, and inconsistencies.
for key in ["dependencies", "peerDependencies", "bundleDependencies"] {
if doc
.get(key)
.is_some_and(|d| d.as_object().is_none_or(|m| !m.is_empty()))
{
Tests: No other concrete defects found. {"head": "419b6647fa03c24541fba18c03e44faca8171b87", "verdict": "findings", "findings": [{"path": "tools/rustev-release/src/npm.rs", "line": 297, "summary": "The bundleDependencies key is treated as a JSON object via as_object(), but npm defines it as an array; any array value including the harmless empty [] triggers a false-positive violation because as_object() returns None and is_none_or() unconditionally returns true on None."}]}Subject: 70a6424...419b664, diff digest 6bb4fcf8c6d476e2e724d3173ad29ca1495f3a4a4152ee0072a33db1942d30b2, 1 call(s). An AI comment is not an approval. |
419b664 to
912471d
Compare
AI review (no-findings)Reviewing the PR, which covers: TLS dependency updates for two security advisories, an archive policy bound increase for Cargo.toml / Cargo.lock archive-policy.json tools/rustev-release/src/npm.rs
tools/rustev-release/src/main.rs tests/npm.rs tests/repro.rs, tests/signing.rs No concrete defects found. {"head": "912471db4400cb8067df39ccfa7ab75ab273e186", "verdict": "no-findings", "findings": []}Subject: 70a6424...912471d, diff digest 7ebd480957cf09439bcc6b3bd759d4a2f5670581c23598f9bafaf366fdd3db48, 1 call(s). An AI comment is not an approval. |
912471d to
7c68d72
Compare
AI review (no-findings)Reviewing the diff for bugs, security issues, and inconsistencies. Cargo.lock / Cargo.toml: The archive-policy.json: The release-set.json: The nine npm members are listed in the declared order — seven per-platform packages in ASCII-ascending name order, then src/lib.rs: src/npm.rs — logic review:
tests/npm.rs — coverage review:
No bugs, security problems, or inconsistencies found. {"head": "7c68d72bab5f323729d4a1a49df28a6fe6a62a19", "verdict": "no-findings", "findings": []}Subject: cf6665c...7c68d72, diff digest 5e8c85c12cc287f559f874fe155b5066c76f5b0b2770aad9ad0a9e82b42027d2, 1 call(s). An AI comment is not an approval. |
7c68d72 to
9ad8a9b
Compare
AI review (findings)Reviewing the diff for bugs, security issues, and inconsistencies. Security bump (Cargo.lock / Cargo.toml):
Concrete defects found: 1. 2. {"head": "9ad8a9bd613cce102655395679c0c61456347329", "verdict": "findings", "findings": [{"path": "tools/rustev-release/release-set.json", "line": null, "summary": "The absent entry for rustev-otel states reason 'not implemented', but the base commit contains a full implementation at integrations/rustev-otel/ (Cargo.toml, src/, tests/, golden fixtures)."},{"path": "specs/031-public-api-and-release-family/spec.md", "line": 752, "summary": "The added text attributes rustev-otel to '(spec 011)' and calls it 'planned', but rustev-otel is owned by spec 028 and is fully implemented in the repository."}]}Subject: 70b99ea...9ad8a9b, diff digest 6206b82daec767aaa761d08547825c64ea1ebb664a59c3b2cc5d788c850050d4, 1 call(s). An AI comment is not an approval. |
9ad8a9b to
385371a
Compare
AI review (no-findings)Reviewing the PR, which adds npm-member checking to the release tooling, bumps TLS dependencies for security advisories, and raises an archive size bound.
Dependency updates
Archive policy / spec records
No concrete defects found. {"head": "385371ae10c81d8cdad5e68b8d11927e9d02979a", "verdict": "no-findings", "findings": []}Subject: 70b99ea...385371a, diff digest 1ae80cccf72d4ef50d4d819a1e77eb488de307eef47dffde073e3dc1e92c8587, 1 call(s). An AI comment is not an approval. |
385371a to
9a461fe
Compare
AI review (findings)Reviewing the PR: a security fix bumping Cargo/spec changes look correct. The RUSTSEC numbers cited in the comment match the advisory descriptions. The
The fix is to sanitise the path before reading (e.g. assert no No other findings. The {"head": "9a461fe1261b56b8133fa4f6e06394f8bd9bde93", "verdict": "findings", "findings": [{"path": "tools/rustev-release/src/npm.rs", "line": 180, "summary": "check_npm_set records a violation for an unexpected directory but does not stop check_npm from reading from that path; a release-set.json entry with a directory containing ../ components passes the violation through and still reads an arbitrary file via the unguarded Path::join in the main.rs closure."}]}Subject: 68f40c0...9a461fe, diff digest 4b3b101a514868ff12d8a506628e47fe11614a4383bf1ae0831c6343c3c57d09, 1 call(s). An AI comment is not an approval. |
9a461fe to
e299fa3
Compare
AI review (no-findings)I'll review the PR for bugs, security issues, and inconsistencies. Security update (Cargo.lock / Cargo.toml)The bump of Archive policy (
|
e299fa3 to
d703970
Compare
AI review (no-findings)Reviewing the PR: a TLS dependency security update (webpki-roots/rustls-webpki), a release-set npm extension (new Security update (Cargo.toml / Cargo.lock): The floor is correctly raised from Path-traversal guard in Ordering logic: The platform-before-main check ( Absence de-duplication: The key is
No concrete defects found. {"head": "d70397003c0f61a68b19b831cda736de6982d062", "verdict": "no-findings", "findings": []}Subject: 1b0ce68...d703970, diff digest 364df4f199b1c937f2c6105e0e14a135f4f2c2bfd32d4d1ecf6a0973e9a8823a, 1 call(s). An AI comment is not an approval. |
…se set Spec 027 is complete (R-47), so its npm packages join the release family: release-set.json lists the seven per-platform packages, the native main package and the WebAssembly package in the npm layer's upload order, and lists as absent, with reasons, the prebuilt CLI binaries, the rustev-serve image and crate, and the planned bedrock, otel and embed-linear crates. rustev-release manifests now also checks each npm member's package.json (name, family version, license, repository directory, the private guard spec 027 keeps until publication, platform os and cpu, no runtime dependency, and the main package's exact optionalDependencies); tests/npm.rs breaks each rule once. No workflow changes and nothing is published. Spec 021: the candidate at 00a4b7c reproduced and unpacked all eleven archives but failed the audit on RUSTSEC-2026-0381 and 0382; the lock now holds rustls-webpki 0.103.16 and webpki-roots 1.0.10, the latter's floor is raised to match, and cargo deny passes with the release policy.
d703970 to
7c4ea89
Compare
AI review (no-findings)Reviewing the diff across all changed paths. Cargo.toml / Cargo.lock — TLS bump
The absent-duplicate key is
No concrete defects found. {"head": "7c4ea890450303ba2172ad3256796e39e7778604", "verdict": "no-findings", "findings": []}Subject: 262b37c...7c4ea89, diff digest 66d5073db98a3df2f823cb5b3695af0497fadac77352eb7ee8a0e8ce78f1a17e, 1 call(s). An AI comment is not an approval. |
…g candidate (#167) ## Summary Small follow-up in lane C (specs 027, 021, 045). - **Binding test flake (027).** `integrations/rustev-node/test/negative.test.mjs` and the conformance driver (`tools/rustev-conformance/js/run.mjs`) bounded their waits for an engine-side condition by 100,000 event-loop turns. A loaded CI runner exhausted them in "a host backend resolving after the deadline is discarded and counted" (#151's `bindings / wasm`, "waited forever"). Both waits are now bounded by 120 s of wall time, still yielding with `setImmediate` and never sleeping; no assertion changed. - **Release candidate evidence (021, 045).** `make release-candidate` passed in full at `419b664` (a reviewed head of #162), locally on macOS arm64: eleven archives byte-identical across two clean runs, archive policy, unpacked tests on 1.98.1 and MSRV 1.88, `cargo deny` clean with no exception, SBOMs, changelog, and the release manifest (SHA-256 `8b4e92e8dbd42fb91394474bb02fd58a59875c8fe8310f066174d44069b4761a`). Recorded in 021 as evidence for that commit only; the release candidate is rerun at the commit the owner names. 045's second acceptance item is met; it stays `pending` on the upload-order item, which waits for the owner. Nothing is signed, tagged or published. ## Checks - `node --check` on both scripts: OK. `make gate`: passed. `spec-spine couple`: OK. `check-authored-content.sh`: clean. - The Node tests run in CI's `bindings` jobs.
Spec 029 increment 3: repeat sets and `rustev.repeat-report/1` (3.1, 3.2.5, 3.5, 3.6). Library only; no CLI, ledger, baseline or gate yet; no live run, provider call or spend. `implementation` stays `in-progress`. - `rustev-eval/src/repeat.rs` (new): `repeat(RepeatInputs)` over N reconciled runs. Refuses the `live` source (`live-source-unavailable`), N outside 1 to 64, unreconciled case measures (`reconcile`), runs that differ in dataset, split, evaluator configuration, plan or metric list or do not list the split's cases in manifest order (`mixed-runs`), a `replay` set whose runs are not identical (`not-reproducible`), an unreported stability metric or override, and a cohort over the bootstrap bound (`bootstrap-too-large`). The report names the source, configurations, dataset, split and fixed role (3.7.1), provenance, adapter rules, plan, each run's document digests and run seed, the stable cohort, and per cohort (`all`, then each slice) every metric's per-run values, `mean`, `sd`, `min`, `max`, `pooled`, interval and band with its basis. Slices below their minimum are unknown throughout; a metric without a per-case measure (cost totals, `brier`) has across-run statistics in `all` only. Latency, queue and cost metrics state their observation (`historical` for candidate runs, 3.11.2). A held-out report records `held_out` as unknown until increment 4 adds the ledger. - `rustev-eval/src/report.rs`, `eval_cases.rs`: `cost_per_1000/observed` and `/estimated` case measures (3.2.5), unknown unless cost units are declared comparable, the observed series unknown for a case with liability or an unknown charge; none for a candidate. - `rustev-eval/src/repeat_stats.rs`: `across_runs`, factored out of `run_stats` unchanged, for metrics stated only by the run reports. - Tests (`tests/reports.rs`): replay set (zero `deterministic_replay` band, pooled equal to the report, distinct run seeds, stable cohort, totals and `brier`, observations, unknown `cost_per_1000`, a reported slice and one below its minimum, round trip and byte determinism); captured set with a case losing its bundle (stable cohort, positive `k_sd` band); one captured run (unknown band); differing replays, the live source and N of 0 and 65 refused; mixed baseline and candidate runs, unreconciled measures and an unreported stability metric refused; a candidate set with historical observations and `interval_width` bands. - `tools/rustev-release/archive-policy.json`: `src/repeat.rs`. - Spec 029: increment 3 record and engineering choices. Still open from increment 2: owner decision D-029-1 (Brier per-case measures), recorded in spec 029's implementation record. Local verification (macOS arm64): `make gate` passes with spec-spine 0.31.0; `cargo clippy -p rustev-eval --all-targets -- -D warnings`, `cargo test -p rustev-eval` and `cargo test -p rustev-fp-corpus` pass. Review round 1 (1 finding, not a defect, evidence added): the finding says a candidate's cases get a known `cost_per_1000/observed` when costs are comparable and known. The cost measures sit inside `case_measures_of`'s `if inputs.candidate.is_none()` block (opened above the latency loop, outside the reviewed hunk), so a candidate's cases carry none. A comment now says so in the hunk, and a new test, `cost_per_1000_is_measured_for_a_baseline_and_never_for_a_candidate`, declares cost units comparable and checks that the baseline's cases carry cost per 1000 while the candidate's carry none and its repeat report's `cost_per_1000/observed` is historical and unknown. Review round 2: no findings. Rebased onto `main` after #159 (no conflict). `make code` passes locally on this head, except two failures caused by other worktrees sharing the build target (a test binary removed by a concurrent `cargo clean`, and `rustev-jev`'s `lodging_swap` finding its output directory already created by a concurrent run); each passes when rerun alone. Review round 3 (1 finding, fixed by making the rule explicit): the finding says `cost_unknown_attempts` should carry no observation. It is one of the four cost series a spec 004 candidate report replaces with "the candidate was not executed; latency and cost are the baseline's", so it is an observation of the runs and historical for a candidate, as 3.12.4 needs. `observation` now lists latency, queue, the four cost series and `cost_per_1000/*` by name instead of a `cost_` prefix, with that reason in its comment; the candidate test checks the cost series are historical and a quality metric has no observation. Local on this head: `make gate` passes; `cargo test --workspace --no-fail-fast` passes except `rustev-release --test manifests`, which reports a `rustev-aicortex` member that exists only in another lane's worktree sharing the build target, and passes when run alone; clippy, fmt and boundaries pass. Rebased onto `main` after #157 (no conflict); `rustev-eval` and `rustev-release` tests (including `manifests`, now that `rustev-aicortex` is on `main`) and `rustev-eval` clippy pass on the rebased head. Review round 4: no findings. Rebased onto `main` after #162 (no conflict). Review round 5: no findings. Rebased onto `main` after #160 (no conflict); `make code` and `make gate` pass locally on this head. Review round 6: no findings. Its `code` run failed in `rustev-remote-http --test runtime_batch` (`a_deadline_or_a_cancellation_after_send_ends_every_member_as_independent_calls_do`), a timing test in a crate this PR does not touch. Rebased onto `main` after #167, which changes no Rust source, so the previous head's local `make code` still covers the Rust tree; `make gate` passes.
## Summary Spec 031 increment 6: the release workflow with build provenance. Increment 5 (#162) has merged; this PR is rebased onto `main`. **This is a workflow change: it needs the owner's approval of the `statecraft-review-exception` Environment.** `.github/workflows/release.yml` runs only when dispatched by hand on the signed release tag (`gh workflow run release.yml --ref vX.Y.Z -f tag=vX.Y.Z`). It is not a required job and changes no managed file. - `tag`: refuses a tag other than the release set's, a lightweight tag, a signature that does not verify against `tools/rustev-release/allowed_signers`, or a dispatch on another ref. - `bindings`: spec 027's bindings workflow at the tag; supplies each platform's addon. - `cli`: `rustev` on the seven platforms in the bindings images at the commit's source date; `--help` and a `plan check` of the lodging reference plan that must equal its golden; archived with the license and attested. - `pack`: `rustev-release manifests`, the WebAssembly package built as `make bindings` does, each addon staged, exactly the `private` guard removed, the nine npm members packed in release order and attested. - Attestations: `actions/attest-build-provenance` 4.2.2, keyless Sigstore signatures over SLSA v1.0 provenance (Build Level 2, 031 3.9.5). - `npm`: publishes with npm provenance through trusted publishing (no token), only with `publish-npm: true` and after the owner approves the `npm-publish` Environment. Nothing here dispatches it, creates that Environment or the trusted publisher, or publishes. ## Review findings answered - Round 3 (`17d292e`), `npm` job never sets `NODE_AUTH_TOKEN`: fixed differently. Publication is by npm trusted publishing (OIDC), which needs no token but needs npm 11.5.1 or later (Node 22 bundles npm 10). The job now installs npm 11.21.0 pinned and checks it, and no longer passes `registry-url`, so no `.npmrc` expects a token. - Round (`ba6fed2`), npm pinned by version only: fixed. The job downloads the npm 11.21.0 tarball, checks its SHA-512 against the registry integrity recorded in the workflow (`sha512-Zov8...qivPg==`, verified locally), and installs that file with `--ignore-scripts`. - Round (`a2c5447`), `process.argv[1]` under `node -e` is empty: not so. With `-e` there is no script path, so `argv[1]` is the first argument: `node -e 'console.log(JSON.stringify(process.argv.slice(1)))' integrations/x` prints `["integrations/x"]` (Node 24.6.0; the same layout on Node 22). A comment in the step now states it. - Round (`c697c11`), the `bindings` call would deny `id-token`/`attestations`: not applicable. `bindings.yml` declares only `permissions: contents: read` at the top level and no job asks for more (`grep -n 'id-token\|attestations' .github/workflows/bindings.yml` finds nothing); `upload-artifact` needs no token permission. The call now states `contents: read` explicitly with that reason; the attestations are made in `pack`. ## Open, recorded in 031's record - The CLI has no version command (spec 006), so 031 3.9.7d's version step cannot run as written. - macOS and Windows CLI archives use bsdtar without fixed order or times, so they are not yet reproducible (3.9.3); the Linux ones are. - Not yet: two-build comparison for tarballs and binaries, the npm audit (3.9.2), their SBOMs (3.9.1), and the hosted release (layer 8). ## Checks - `actionlint .github/workflows/release.yml`: clean. `make gate`: passed. `spec-spine couple`: OK. - The workflow has not been dispatched: it needs a signed tag, and publication waits for the owner's instruction (021 3.9, 031 3.11).
Summary
Spec 031 increment 5: the npm members and the absences in the release set, and the audit fix the first full release candidate found (spec 021).
tools/rustev-release/release-set.json). Spec 027 is complete (R-47), so its npm packages join the family:npmlists the seven per-platform packages by name, then@statecrafting/rustev, then@statecrafting/rustev-wasm, each with its directory.absentlists, with reasons, what 031 3.1 plans but this release does not ship: the prebuiltrustevCLI binaries (no release workflow yet; the CLI ships as therustev-clicrate), therustev-serveimage and crate (spec 010 in progress), andrustev-bedrock,rustev-backend-embed-linear.rustev-otel(spec 028, impl(028): the span projection and JSONL exporter in rustev-otel #158) exists and stays underexcludedwith its reason.src/npm.rs, run byrustev-release manifests). Each npm member'spackage.json: name, family version, license, repository URL and directory, description,files,os/cpufor platform packages, no runtime dependency, the main package'soptionalDependenciesnaming exactly the release's platform packages at exactly the family version, and the"private": trueguard spec 027 keeps until publication (the release's packing step removes exactly that field). The set's shape refuses wrong npm order, wrong scope or directory, duplicates, and an absence with an unknown kind, no reason, or a member's name.tests/npm.rspasses on the repository and breaks each rule once.make release-candidateat00a4b7c(local) reproduced all eleven archives byte-identically, passed the archive policy, the unpacked tests on 1.98.1 and MSRV 1.88, and wrote every SBOM, then failedcargo denyon RUSTSEC-2026-0381 (webpki-roots1.0.9) and RUSTSEC-2026-0382 (rustls-webpki0.103.15), viarustev-remote-http. The lock now holds 0.103.16 and 1.0.10, and the workspace'swebpki-rootsfloor is 1.0.10. Recorded in 021's implementation record; 021 3.7 stays open until the candidate passes in full at a commit with this fix.3670e6b) passed packaging and SBOMs, then failed the archive policy:rustev-eval's unpacked total is 279,602 bytes against its reviewed bound of 262,144 after spec 029's statistics core (impl(029): increment 1, the statistics core #155). The bound is raised, by review, to 393,216; the archive (73,245 bytes) and every other bound are unchanged.No workflow change; nothing is published.
Review findings answered
419b664),bundleDependenciesread as an object: fixed. The bundled list (either spelling) is judged as npm defines it (an array of names, ortrue); empty maps and lists declare nothing. Tests cover[], a named list andtruefor both spellings, and{}fordependencies.9ad8a9b),rustev-otellisted as absent and unimplemented: fixed. impl(028): the span projection and JSONL exporter in rustev-otel #158 merged the crate as an exclusion; the absence is removed and the record says why.9a461fe), a refused directory still read: fixed.expected_directorygives each family package its one directory (a platform name is lowercase letters, digits and single hyphens), andcheck_npmopens only a member whose directory is exactly that; tests show a..directory or platform name is refused and never read.Checks
cargo fmt --check,cargo clippy -p rustev-release --all-targets -D warnings,cargo test -p rustev-release(all suites): passed locally on the first head; the round-2 fix is verified by CI (the shared target was in use by the candidate run).cargo run -p rustev-release -- manifests: 11 crates and 9 npm packages pass.cargo deny ... checkwith the release policy: advisories, bans, licenses, sources ok.make gate: passed.spec-spine couple: OK.check-authored-content.sh: clean.