Repository navigation
Prepare Linux x64 npm package from verified native payload - #11085
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 37 minutes. View limit details
Comment |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Independent review (fresh-context reviewer, head e72a0d7): REPAIR_REQUIRED
Inspected: PR body and its #4778 claim; the full 6-file diff at e72a0d7 (xtask/src/reports/release_server/npm_native.rs +790, xtask/src/reports/release_server.rs +16, .../payload.rs +3/-3, .../producer.rs +6/-2, docs/RELEASE_BINARIES.md +28, changelog.d/4778-linux-x64-npm-native.md +2); the semantic owner xtask/src/reports/release_server/payload.rs (verify_final_native_payload, payload_file_identities :427, verify_payload_files :472) and producer.rs (validate_receipt_shape, validate_version_line, bind_to_payload_identity), whose three pub(super) visibility widenings are the only changes to existing modules; policy/distribution.toml (the npm target rows the manifest is built from); Cargo.toml:35-159 (the workspace lint policy that gates this head); the failed job log for run 41008738384 / job 123909763572; docs/RELEASE_BINARIES.md; changelog.d/README.md. Closely read: npm_native.rs end to end (produce :381, pack :155, verify_package_inner :220, verify_qualification :312, promote_pair :327, require_source_executable :135) and its four unit tests. Sampled: policy/distribution.toml, the launcher's npm tests, the other release-server modules.
Challenge: I tried to falsify the verification claims in three ways and failed on all three. (1) "Deterministic tarball": pack fixes mtime/uid/gid/mode per entry, the gzip header carries mtime(0), and entry order comes from payload_file_identities sorting by path (:462), so the bytes are a pure function of the payload. (2) "Reconstructed payload verified": verify_package_inner enforces an exact inventory with no extra, duplicate or non-regular entry (:245-252), exact per-file digests (:292), the tar-header execute bit for the executable via verify_extracted_file, a byte-exact package.json against a re-derived manifest (:283), and finally re-derives the payload aggregate over the extracted files through payload::verify_payload_files (:302). (3) "Does not overwrite": both the output package and the receipt are created with create_new/hard_link, and a failed receipt promotion removes the partial package (:364-377). No counterexample found; the producer logic is sound.
Blocking:
xtask/src/reports/release_server/npm_native.rs:512(also :515, :722, :730, :733) - this head fails the enforced lint gate.Ripr Rust Small on GitHub Hosted / Rust gatesis FAILURE at e72a0d7 (run 41008738384, job 123909763572), and the log names exactly fiveclippy::assertions_on_result_stateserrors at these five lines;Admit PR Candidateand bothRipr Rust Small Resultjobs are also failures at this head.blanket_clippy_restriction_lints = "deny"(Cargo.toml:159) makes this a hard gate, not a warning. The PR body discloses the same five lines accurately, so this is a known-red head rather than a surprise, but the head does not pass. Repair: rewrite the five assertions into a shape the restriction lint does not flag (for exampleassert!(matches!(result, Ok(_)))/Err(_)), or add a reasoned#[expect(clippy::assertions_on_result_states, reason = "...")]-allow_attributes_without_reason = "deny"(Cargo.toml:158) requires the written justification. Consequence of the red gate: every Rust test lane is skipped at this head (Ripr Rust Small tests on GitHub Hostedskipped in runs 41008572926 and 41008738384;rust-tests-junitskipped in all four runs at this head), so no Rust test result exists for e72a0d7.
Non-blocking:xtask/src/reports/release_server/npm_native.rs:412- the qualified archive is never opened.producehashes it and then requires the caller-supplied build-identity JSON to carryarchive_readback_verified: trueplus matching candidate/version/target/workflow/archive/payload/producer hashes (:413-429); the npm tarball itself is built frompayload_dir, not from the archive, so the archive contributes a provenance gate and nothing else. The body anddocs/RELEASE_BINARIES.mdboth state that the JSON does not authenticate its origin, so this is disclosed rather than hidden - worth restating because "archive readback identity" reads as though this producer performed the readback.xtask/src/reports/release_server/npm_native.rs:381-produceitself, the function that binds the candidate, version, target, readback flag, workflow, archive and payload hashes together, has no automated test; the four focused tests coverpack,verify_package,manifest,verify_qualificationandpromote_pairindividually, and the "eight public-path negatives" the body reports are manual runs. The binding rule itself is covered byqualification_requires_success_and_every_bound_field(:519), so the gap is orchestration coverage, not an untested rule.xtask/src/reports/release_server/npm_native.rs:150-require_source_executableerrors on every non-Unix host, so the producer is Unix-only by construction. That is right for a Linux x64 package, and the one test that exercisespackis correctly#[cfg(unix)](:602), but it also means three of the four focused tests are the only coverage a Windows dev host can run. Coverage note, not a defect.- Contract parity is satisfied for this repo's convention:
changelog.d/4778-linux-x64-npm-native.md(section Added,#4778reference) and adocs/RELEASE_BINARIES.mdsection describing the command, the limits and the kill-between-writes caveat. No spec owns the release-server producers (docs/specshas no release-server spec) and.ripr/traceability.tomlhas zerorelease_serverrows, so no spec or traceability update is owed here; the manifest rows this PR would need do not exist for any sibling producer. - The body reports base
a533e7fb, heade72a0d72and tree6288dca9. I confirmed all three:a533e7fbis the merge base of this branch andmain,main's tip is8feb18c4(8 commits ahead of that base), and the head tree is6288dca9. The branch is 3 ahead / 8 behindmain.
Not run:cargo clippy/cargo test(shared tree, long build, concurrent agents in this checkout), so the five lint errors were read from the hosted job log rather than reproduced locally, and the four focused npm-native tests were not executed. The body's "focused npm-native tests 4 passed, zero ignored", thecheck-release-targets/check-process-policy/check-network-policypasses and the exact-head archive build were not reproduced here; the third of the four tests is#[cfg(unix)], so on this Windows host only three would run.
Reviewed by an independent Mavis review agent on behalf of the maintainer; bound to head e72a0d72. Not an approval.
…ecks Replace assert!(result.is_ok()/is_err()) in the npm_native tests with let-Err else-return checks (and ? for success paths), clearing clippy::assertions_on_result_states without tripping clippy::expect_used on expect_err.
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm the public npm producer's qualification binding lacks an end-to-end negative test.
- Confirm the new dispatch branch has no test proving npm arguments select this producer without regressing existing archive modes.
- Confirm the npm route is selected by --npm-payload-dir and requires the remaining npm arguments through the existing argument helper; unrelated archive modes remain separate branches.
Refuted
- The public documentation overclaims workflow authentication or release qualification.; refuted because: It explicitly limits the artifact to Linux x64 and says build-identity JSON alone does not authenticate origin, nor establish parity, compatibility floor, or publication.
- The build-identity check authenticates fields, not the successful workflow run that produced them.
Parked follow-ups
- Build identity fields are compared against the expected candidate, workflow, payload, producer, and archive bindings, but the documentation correctly states that JSON fields do not authenticate workflow origin.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- Exact-head Rust compilation and focused tests remain unproven by available sensor receipts.
There was a problem hiding this comment.
Independent review (fresh-context reviewer, head 201471a): REVIEW_READY
Inspected:
- Repair of the previously proven blocking defect — the prior review at head e72a0d7 found five
clippy::assertions_on_result_stateserrors at xtask/src/reports/release_server/npm_native.rs:512, :515, :722, :730 and :733 and the "Rust gates" job red at that head. At 201471a the commit "fix(distribution): rewrite npm native result assertions as let-Err checks" (parent e72a0d7) rewrites those sites tolet Err(_) = ... else { return Err(...) }/?. A direct scan of npm_native.rs at this head finds zero remainingassert!(...)expressions whose argument callsis_ok()oris_err(), and no#[expect]or#[allow]attribute was introduced, soallow_attributes_without_reason = "deny"is not engaged. The repair is complete at source and the blocking defect is closed. - Hosted proof at the exact head — workflow run 41026932302 ("Merge-ready request 201471a") reports
Ripr Rust Small on GitHub Hosted / Rust gates= success (the strict lane that was red at e72a0d7),Ripr Rust Small tests on GitHub Hosted / Rust test shards verify= success with all four shards success,Ripr Rust Small Result= success andAdmit PR Candidate= success. Run 41026932179 (CI) reportsRust-only feature lane= success; run 41026932290 (Security) reportscargo-deny= success anddependency-review= success;Windows Advisory,Merge-ready Conflict NoticeandQualify ripr-rs Python Wheel (read-only)also succeeded. No lane is red at this head. - xtask/src/reports/release_server/npm_native.rs:381
produce— a local, no-publish producer: it binds identity, producer receipt, build identity, archive and payload hashes and writes only intoout_dir. No registry, credential, tag, settings or publication call exists in the path. - xtask/src/reports/release_server/npm_native.rs:413-429 — the caller's build-identity JSON is compared field by field against a derived expectation covering target, candidate sha, candidate tree, version, archive filename, archive sha256,
archive_readback_verified, cargo lock hash, qualification workflow file hash, payload identity hash, producer receipt hash, payload aggregate, payload file count, selected features, native runtime evidence, producer cargo arguments, producer executable hash and version line, plus rustc and cargo verbose versions.verify_qualification(:312) compares each expected field against the parsed JSON and rejects any mismatch. - xtask/src/reports/release_server/npm_native.rs:220
verify_package_inner— the tarball is re-opened and checked, not merely hashed: the inventory must match exactly with no extra, duplicate or non-regular entry (:245-252), per-entry sizes are checked (:267-275),package/package.jsonmust equal a byte-exact re-derivedmanifest(:280-285), every payload file is checked by SHA-256 and by the tar-header execute bit viaverify_extracted_file(:292), and the payload aggregate is re-derived over the extracted files throughpayload::verify_payload_files(:302). - xtask/src/reports/release_server/npm_native.rs:75
manifest— the npm package name, os, cpu and libc are pinned against the distribution contract row for x86_64-unknown-linux-gnu (:90-96), so a contract drift cannot silently change the published identity; the flatriprfile is mapped tobin/riprbypackage_path(:36). - xtask/src/reports/release_server/npm_native.rs:327
promote_pair— the output package is opened withcreate_new, written, re-read and re-hashed against the verified digest (:358), and the receipt is promoted withhard_link(:369); a failure in either step removes the partial package (:365, :370), so an existing output is never overwritten and a package is never left without its receipt. - xtask/src/reports/release_server/npm_native.rs:451-457 — after packing, the payload and identity are re-verified and both the tarball and the qualified archive are re-hashed against their pre-verification digests, closing the window between verification and promotion.
- xtask/src/reports/release_server/npm_native.rs:116
appendand :155pack— tar headers fix mtime, uid and gid at 0 with regular entry type and explicit modes, the gzip header carriesmtime(0), the output is created withcreate_new, and entry order comes from the payload identity, whichpayload_file_identitiessorts by path (xtask/src/reports/release_server/payload.rs:462). The tarball bytes are therefore a pure function of the payload. - xtask/src/reports/release_server/payload.rs:880
portable_flat_path— a payload path must be exactly one normal path component, and payload entries must be regular non-symlink files (payload.rs:443-454), so the extracted-file writes inverify_package_innercannot escape the verification directory. - xtask/src/reports/release_server/producer.rs and payload.rs — the only changes to the existing modules are
pub(super)visibility widenings (validate_receipt_shape,validate_version_line,payload_file_identities,verify_payload_files,aggregate_payload_digest); no existing verification behavior is altered. - xtask/src/reports/release_server.rs:15 — the npm mode is a mutually exclusive branch selected by
--npm-payload-dir, following the existing mode-selection pattern of the same command, and the candidate identity is taken from the verified payload identity rather than from a free-standing CLI argument. - docs/RELEASE_BINARIES.md:69-95 — the documented command line matches the implementation argument for argument, and the documented limits (deterministic tarball, separate payload and container digests, no overwrite, no channel parity, no publication, build-identity JSON does not authenticate its own origin, kill-between-writes caveat) match the code.
- changelog.d/4778-linux-x64-npm-native.md — follows the repository
<!-- section: Added -->/ bullet /(#4778)fragment format. - PR state — this PR merged at 2026-10-30T09:24:08Z as squash commit e912545 while this review was in progress. The landed squash tree differs from the head tree because main advanced 57 commits, but all six files of this PR are byte-identical between head 201471a and the landed commit (verified by content-addressed blob comparison), so the merged content is exactly what was reviewed here.
Blocking:
- None.
Non-blocking:
- xtask/src/reports/release_server/npm_native.rs:412 the qualified archive is hashed and re-checked at :457 but never opened; the npm tarball is built from
payload_dir, so the archive contributes a provenance gate and nothing else. The PR body and docs/RELEASE_BINARIES.md:91-92 both disclose that the build-identity JSON does not authenticate its own origin, so this is stated rather than hidden — worth restating because "archive readback identity" reads as though this producer performed the readback. - xtask/src/reports/release_server/npm_native.rs:381
produceitself has no automated test; the focused tests coverpack,verify_package,manifest,verify_qualificationandpromote_pairindividually, and the binding rule is covered at the qualification level, so the gap is orchestration coverage rather than an untested rule. - xtask/src/reports/release_server/npm_native.rs:134
require_source_executableerrors on every non-Unix host, so the producer is Unix-only by construction. That is correct for a Linux x64 package and the packaging test is#[cfg(unix)], but it means a Windows development host can run only part of the focused coverage. - The PR body still pins head
e72a0d72317e2d671081f0b9cecebf47d896b7and tree6288dca9b561df99826064f12df632e5cdc9419ain its "Evidence and current limits" section, and narrates the red Rust gates at that older head. The published head is 201471a with tree 7e2ce841e82b48453882c99e65d43dfb27e297a8; the body should be refreshed so its evidence section describes the head that actually landed. - The
ub-reviewjob in run 41026914479 concludedcancelledwhile every substantive step succeeded — step 8ub-review= success, steps 9-11 = success — and only the post-job rust-cache save was skipped. That is runner infrastructure at the post-job stage, not a candidate defect. - Hosted lanes
Future Clippy (advisory),Coverage,Test AnalyticsandmacOS Advisoryreportedskippedat this head, and themsrv,vscode,Perl and release proofandrust-coveragelegs were likewise skipped; these are advisory or runner-dependent lanes rather than the strict Rust gate, but they contributed no subjects.
Not run:
- cargo build, cargo test, cargo clippy, cargo fmt,
cargo xtask check-release-targets,cargo xtask check-process-policy,cargo xtask check-network-policy,cargo xtask check-file-policy— this host has no Rust toolchain (rustc,cargo,rustupare absent from PATH). The producer logic was verified by reading source at the head SHA, and the strict Rust gate, the Rust test shards,cargo-deny,dependency-reviewand the candidate-admission lane were taken from the exact-head hosted runs instead. - The four focused npm-native tests were not executed locally; one is
#[cfg(unix)], so on this Windows host only three of the four would run. - The body's claimed local results were not reproduced: the 4-passed focused npm-native tests, the
check-release-targets/check-process-policy/check-network-policypasses, the exact-head Linux archive build, the synthetic build-identity fixture run with its generated tarball and receipt hashes, and the offline npm install that launched the actual binary. These remain author-supplied evidence. - The actual selected-target workflow run and artifact provenance were not re-checked, and the wheel Actions artifact download that the body reports as HTTP 403 was not retried, so channel parity stays unproven as the body states.
- No combined-tree proof against current
mainwas run; the branch was 57 commits behindmainat the merge, and the squash applied the PR diff onto the advanced base.
Reviewed by an independent Mavis review agent on behalf of the maintainer; bound to head 201471acccf40ea9502307564161b1da6e73505d. Not an approval.
Problem and change
The native npm launcher has no producer that wraps the admitted Linux x64 payload. This PR adds a no-publish producer that maps flat
riprtobin/ripr, checks a selected-target archive readback identity against the exact source, payload, producer, workflow and archive hashes, and verifies the tarball's metadata, inventory, mode and reconstructed payload before writing a separate receipt. It checks licenses and notice against source, and records the container hash separately from the payload aggregate.Governing issue or accepted claim: #4778
Acceptance delta (one sentence): For Linux x64, create and verify a no-publish npm tarball from the exact selected-target payload and archive-readback identity, retaining separate payload and container digests.
Parent: #4778; parity consumer: #4624. This is the Linux x64 subset of the future native-package family, not the five-target producer or shared-channel parity completion. The selected source alpha instead uses the single @effortlessmetrics/ripr package whose payload is drawn from the npm qualification run’s own audited wheel. This PR does not qualify or replace that selected tarball, and does not publish or stage a registry package.
Evidence and current limits
a533e7fb312e1b989c99f3f022f4373cadb230eb; heade72a0d72317e2d671081f0b9cefecebf47d896b7, tree6288dca9b561df99826064f12df632e5cdc9419a.check-release-targets,check-process-policy, andcheck-network-policypassed using the exact-head debug xtask. The local exact-headcheck-file-policyalso passed after compiling its required test targets; remaining exact-head policies and hosted checks are pending.The exact-head Linux archive build completed locally. Archive SHA-256
3aa78b956c4b793e22961847c3990637f6ec412e2fc8563e7a4f1e3192a6ecb8; payload aggregatec4bc8eaa45fb2fd3e2cc182831d3bf452940faa077bf876654b8494bc2ccdc6c; installed executable SHA-25681802638108d15bf2984bac1d9e242224b16a556c643ed237a2e276304527f4e. With an explicitly synthetic local build-identity fixture, the public producer generated tarball8a50e7b571b0b6be4a36ee385eb46aa4ee6584fd6421871be94b87e471b15cd3and receipt75984136d8ced41d186e8a3771f5b1fe594d8b74c26c97ed62bd6a31bd9b1450; offline npm install launched the actual binary, whose installed hash matched the payload. On one Rust fixture both npm and extracted archive paths emitted identical JSON with one probe and one finding. Eight public-path negatives rejected wrong executable, wrong license, missing identity, failed readback, wrong version/target, wrong archive hash and wrong producer hash before output. This synthetic qualification fixture is a test input, not proof of a successful workflow or a qualified release artifact. No wheel comparison or upgrade/rollback was performed.The non-publishing qualification workflow was dispatched as run 41008293491; its selected Linux x64 job passed readback and the glibc 2.34 floor, while the aggregate is pending. The selected payload aggregate SHA-256 is
680076963979e07b5826734a314cd34254ad1b36349bfc30c4ed0bc092f80a34; artifact IDs for archive, payload identity and build identity are12956894540,12957556101and12957556120. These are future-family evidence, not selected-alpha evidence, and their bytes have not been locally downloaded. The first Ready-state CI request was refused because this description lacked explicit claim fields; after adding those fields, run 41008738384 passed admission but failed strict workspace Clippy on five assertions_on_result_states errors in npm_native.rs (lines 512, 515, 722, 730, 733); required tests and later steps were skipped. The tested integration was382604baf6aa469461e36423b32faf69a22949fd(heade72a0d7, base8feb18c). The prior 401 status lookup recovered on the same authorized route; the exact-head Python wheel build and pip/uv jobs passed, but the wheel Actions artifact download returned HTTP 403 at the storage endpoint, so its bytes were not inspected and parity remains unproven. No alternate transfer was attempted. The existing public single-package alpha.1 tarball was read back and installed offline; its tarball SHA-256 is10ea5fef2002a911e65aae4516e5b3de1562aaaf4a97372c3f00f9433855ab6dand executable SHA-256 is6e72eef24c3533f91edcc96a10c4c485bd3f77e684b628cf3a76185111447a1c. Offline historical alpha.1 → alpha.2 → alpha.1 install/upgrade/rollback succeeded; each installed binary matched its own tarball and ran a one-finding Rust fixture. Alpha.2 tarball SHA-256 is28af89e2c5d8753f0a48dcfcc2f97cc41c5e8dc43a252b61bc624628402be955, and its executable SHA-256 is14efdf940c0c0ddcb68bef63f55795a9273297998013c209fa31ba56e332ce41. This is a historical selected-package control, not proof for this future-family PR or the next alpha candidate. The integrated alpha remains separately gated.Rollback
Revert this branch's commits; the existing archive producer and launcher remain available. No registry, release, tag, credential or settings changes are included.