Skip to content

Prepare Linux x64 npm package from verified native payload - #11085

Merged
EffortlessSteven merged 4 commits into
mainfrom
codex/npm-native-linux-x64
Oct 30, 2026
Merged

EffortlessSteven merged 4 commits into
mainfrom
codex/npm-native-linux-x64

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

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 ripr to bin/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

  • Base a533e7fb312e1b989c99f3f022f4373cadb230eb; head e72a0d72317e2d671081f0b9cefecebf47d896b7, tree 6288dca9b561df99826064f12df632e5cdc9419a.
  • Pinned Rust 1.95.0: focused npm-native tests 4 passed, zero ignored. They cover synthetic package byte, license, mode, target/version, inventory and qualification-field mutations, deterministic repacking, snapshot replacement, and handled failure/retry. The mode control failed before the check was implemented and passes afterward.
  • Node 24.19.0/npm 11.9.0 launcher baseline: 32 passed using a writable cache. These are launcher tests, not an installed native-product proof.
  • Independent source review of exact head found no further material defect in the bounded source review. It did not run tests.
  • check-release-targets, check-process-policy, and check-network-policy passed using the exact-head debug xtask. The local exact-head check-file-policy also passed after compiling its required test targets; remaining exact-head policies and hosted checks are pending.
  • Actual selected-target workflow run/artifact provenance, public producer invocation using that authentic identity, upgrade, rollback, three-channel archive/wheel/npm parity, and hosted exact-head checks remain pending. Caller-supplied qualification JSON is not authentication of an Actions run. The selected-target identity and archive must come from the actual successful workflow run.
  • A process killed between output package and receipt promotion can leave an unreceipted package that needs removal before retry; the documentation records this limit.

The exact-head Linux archive build completed locally. Archive SHA-256 3aa78b956c4b793e22961847c3990637f6ec412e2fc8563e7a4f1e3192a6ecb8; payload aggregate c4bc8eaa45fb2fd3e2cc182831d3bf452940faa077bf876654b8494bc2ccdc6c; installed executable SHA-256 81802638108d15bf2984bac1d9e242224b16a556c643ed237a2e276304527f4e. With an explicitly synthetic local build-identity fixture, the public producer generated tarball 8a50e7b571b0b6be4a36ee385eb46aa4ee6584fd6421871be94b87e471b15cd3 and receipt 75984136d8ced41d186e8a3771f5b1fe594d8b74c26c97ed62bd6a31bd9b1450; 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 are 12956894540, 12957556101 and 12957556120. 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 was 382604baf6aa469461e36423b32faf69a22949fd (head e72a0d7, base 8feb18c). 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 is 10ea5fef2002a911e65aae4516e5b3de1562aaaf4a97372c3f00f9433855ab6d and executable SHA-256 is 6e72eef24c3533f91edcc96a10c4c485bd3f77e684b628cf3a76185111447a1c. 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 is 28af89e2c5d8753f0a48dcfcc2f97cc41c5e8dc43a252b61bc624628402be955, and its executable SHA-256 is 14efdf940c0c0ddcb68bef63f55795a9273297998013c209fa31ba56e332ce41. 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.

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 149 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 039dec21-7c07-4976-be7a-16cca8d33cbc
Commits

Reviewing files that changed from the base of the PR and between 8feb18c and 201471a.

Files selected for processing: 6
  • changelog.d/4778-linux-x64-npm-native.md
  • docs/RELEASE_BINARIES.md
  • xtask/src/reports/release_server.rs
  • xtask/src/reports/release_server/npm_native.rs
  • xtask/src/reports/release_server/payload.rs
  • xtask/src/reports/release_server/producer.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 30, 2026 05:26
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 gates is FAILURE at e72a0d7 (run 41008738384, job 123909763572), and the log names exactly five clippy::assertions_on_result_states errors at these five lines; Admit PR Candidate and both Ripr Rust Small Result jobs 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 example assert!(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 Hosted skipped in runs 41008572926 and 41008738384; rust-tests-junit skipped 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. produce hashes it and then requires the caller-supplied build-identity JSON to carry archive_readback_verified: true plus matching candidate/version/target/workflow/archive/payload/producer hashes (:413-429); the npm tarball itself is built from payload_dir, not from the archive, so the archive contributes a provenance gate and nothing else. The body and docs/RELEASE_BINARIES.md both 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 - produce itself, the function that binds the candidate, version, target, readback flag, workflow, archive and payload hashes together, has no automated test; the four focused tests cover pack, verify_package, manifest, verify_qualification and promote_pair individually, and the "eight public-path negatives" the body reports are manual runs. The binding rule itself is covered by qualification_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_executable errors 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 exercises pack is 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, #4778 reference) and a docs/RELEASE_BINARIES.md section describing the command, the limits and the kill-between-writes caveat. No spec owns the release-server producers (docs/specs has no release-server spec) and .ripr/traceability.toml has zero release_server rows, 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, head e72a0d72 and tree 6288dca9. I confirmed all three: a533e7fb is the merge base of this branch and main, main's tip is 8feb18c4 (8 commits ahead of that base), and the head tree is 6288dca9. The branch is 3 ahead / 8 behind main.
    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", the check-release-targets/check-process-policy/check-network-policy passes 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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@EffortlessSteven
EffortlessSteven merged commit e912545 into main Oct 30, 2026
51 of 52 checks passed
@EffortlessSteven
EffortlessSteven deleted the codex/npm-native-linux-x64 branch October 30, 2026 09:24

@EffortlessSteven EffortlessSteven left a comment •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_states errors 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 to let Err(_) = ... else { return Err(...) } / ?. A direct scan of npm_native.rs at this head finds zero remaining assert!(...) expressions whose argument calls is_ok() or is_err(), and no #[expect] or #[allow] attribute was introduced, so allow_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 and Admit PR Candidate = success. Run 41026932179 (CI) reports Rust-only feature lane = success; run 41026932290 (Security) reports cargo-deny = success and dependency-review = success; Windows Advisory, Merge-ready Conflict Notice and Qualify 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 into out_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.json must equal a byte-exact re-derived manifest (:280-285), every payload file is checked by SHA-256 and by the tar-header execute bit via verify_extracted_file (:292), and the payload aggregate is re-derived over the extracted files through payload::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 flat ripr file is mapped to bin/ripr by package_path (:36).
  • xtask/src/reports/release_server/npm_native.rs:327 promote_pair — the output package is opened with create_new, written, re-read and re-hashed against the verified digest (:358), and the receipt is promoted with hard_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 append and :155 pack — tar headers fix mtime, uid and gid at 0 with regular entry type and explicit modes, the gzip header carries mtime(0), the output is created with create_new, and entry order comes from the payload identity, which payload_file_identities sorts 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 in verify_package_inner cannot 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 produce itself has no automated test; the focused tests cover pack, verify_package, manifest, verify_qualification and promote_pair individually, 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_executable errors 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 e72a0d72317e2d671081f0b9cecebf47d896b7 and tree 6288dca9b561df99826064f12df632e5cdc9419a in 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-review job in run 41026914479 concluded cancelled while every substantive step succeeded — step 8 ub-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 Analytics and macOS Advisory reported skipped at this head, and the msrv, vscode, Perl and release proof and rust-coverage legs 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, rustup are 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-review and 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-policy passes, 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 main was run; the branch was 57 commits behind main at 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant