Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelog.d/4778-linux-x64-npm-native.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<!-- section: Added -->
- Prepare a Linux x64 native npm package from a verified final payload and producer receipt, with extracted payload and mode checks (#4778).
28 changes: 28 additions & 0 deletions docs/RELEASE_BINARIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,34 @@ targets before writing the aggregate receipt. This proves payload and archive
shape for the exact candidate; it does not establish a public release, wheel,
npm package, or native runtime compatibility floor.

### Linux x64 npm native package

From the same clean committed checkout, the Linux x64 producer can wrap the
staged final payload and its producer build receipt without publishing:

```bash
cargo xtask release-server-archive --npm-payload-dir <payload-directory> \
--payload-identity <payload-identity.json> --producer-receipt <producer-build.json> \
--build-identity <selected-target-build-identity.json> --qualified-archive <server-archive.tar.gz> \
--out-dir <new-output-directory>
```

The command requires the successful selected-target build identity from the
qualification workflow and its matching archive. It binds their candidate,
version, target, readback flag, workflow, archive and payload hashes to the
current checkout and producer receipt. The command maps the flat
`ripr` file to the launcher's `bin/ripr`, writes a deterministic npm tarball,
and checks its extracted metadata, inventory, executable mode and payload
digests. It records the payload aggregate, identity and producer receipt hashes
separately from the tarball hash in `npm-native-receipt.json`. Existing output
files are not overwritten. This is a Linux x64 package artifact only: it does
not establish installed channel parity, a compatibility floor or publication.
The build identity must be retained with the successful workflow run and
artifact evidence; its JSON fields alone do not authenticate their origin. If
the process is killed between the package and receipt writes, remove the
incomplete output package before retrying; a package without its receipt is not
a successful producer result.

## Exact-candidate qualification (read-only)

Use `.github/workflows/server-archive-qualification.yml` when archive shape
Expand Down
16 changes: 16 additions & 0 deletions xtask/src/reports/release_server.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
mod npm_native;
mod payload;
mod producer;
mod qualification;
Expand All @@ -11,6 +12,21 @@ use sha2::{Digest, Sha256};
use crate::{command_success_owned, run_owned};

pub(crate) fn release_server_archive(args: &[String]) -> Result<(), String> {
if let Some(payload_dir) = optional_release_arg(args, "npm-payload-dir") {
let identity = required_release_arg(args, "payload-identity", "PAYLOAD_IDENTITY")?;
let producer = required_release_arg(args, "producer-receipt", "PRODUCER_RECEIPT")?;
let build_identity = required_release_arg(args, "build-identity", "BUILD_IDENTITY")?;
let archive = required_release_arg(args, "qualified-archive", "QUALIFIED_ARCHIVE")?;
let out_dir = required_release_arg(args, "out-dir", "NPM_NATIVE_OUT_DIR")?;
return npm_native::produce(
Path::new(&payload_dir),
Path::new(&identity),
Path::new(&producer),
Path::new(&build_identity),
Path::new(&archive),
Path::new(&out_dir),
);
}
if let Some(rows_dir) = optional_release_arg(args, "terminal-receipt-dir") {
let out_dir = required_release_arg(args, "out-dir", "TERMINAL_RECEIPT_OUT_DIR")?;
let candidate_sha = required_release_arg(args, "candidate-sha", "CANDIDATE_SHA")?;
Expand Down
Loading
Loading