Skip to content

#465 PR-C3: shipping package — tarball, MANIFEST, package digest, atomic installer - #542

Merged
raylei50653 merged 7 commits into
mainfrom
feat/465-pr-c3-package
Oct 8, 2026
Merged

raylei50653 merged 7 commits into
mainfrom
feat/465-pr-c3-package

Conversation

@raylei50653

Copy link
Copy Markdown
Owner

Summary

Phase C PR-C3 (scope §6): the PR-C1/C2 shipping tree becomes a package that installs atomically from a clean system. Contract, results and limits: docs/reference/native_runtime_resolved_config.md §19.

  • Release = 3 files: <name>.tar.gz, <name>.install.sh, <name>.sha256 (package digest over both). <name> = saccade-0.1.0-linux-x86_64-cu13.0-trt10.16-sm120-glibc2.39.

  • shipping/package/install.sh (POSIX sh, Ubuntu 24.04 base tools only):

    1. Checks the digest.
    2. Extracts into private staging next to TARGET.
    3. Checks every file against MANIFEST.json: exact set, regular files, size, sha256, mode.
    4. Runs one mv -n -T, which is renameat2(RENAME_NOREPLACE).

    Any failure or signal removes the staging directory and never creates TARGET. --verify PREFIX re-checks an installed tree. No hook options or environment variables.

  • MANIFEST.json: every key except files is derived from the repository at the source commit:

    • pins, versions, SM / glibc
    • attestation / lineage / model-root references
    • the runtime-identity coordinate

    The builder refuses files that are not the pins, a dirty tree, or a stale identity.

  • Checks:

    • check_shipping_package.py tarball: 7 checks.
    • check_shipping_package.py install-trace: from strace -yy, the target is touched only by that one rename.
    • check_shipping_bundle.py static --manifest: checks an installed tree.
  • Nothing in stage computation, entrypoint pin, operator library, the 27 vendor objects, launcher, auditor or install rules changes.

Design decisions open to owner review (§19.1):

  • The installer is outside the tarball.
  • The digest is not a signature (P3 records this; signing is PR-C4).
  • The runtime identity is republished before the formal run, because the MANIFEST records the coordinate. That republish is the stacked PR on chore/465-prc3-republish.

Formal run: 9217ed92 → PASS

results/465_prc3_package/full_9217ed92/ (not versioned), evaluation.json 6f8e1210….

Gate Result
1–2 build/install exit 0; static 12/12
3 package tree_clean, identity_current; tarball 7/7; two builds byte-identical (tarball 21c9ac08…, 2.22 GiB); MANIFEST matches the tree
4 install in clean container (dash) exit 0; install-trace 5/5: the target is touched by one renameat2(…, RENAME_NOREPLACE) only, 274 other mutations all in staging, staging removed; static --manifest 13/13; --verify 0; installed tree matches the cmake tree
5 installed tree, clean container EXACT: detector 5316/5316, MOT 7/7, graph 7/7; identical to the PR-C2 A4 run
6 G2-2/G2-4 runtime 3/3; EXACT, 7/7 identical

Installer negative controls P1–P15 all gave their required result:

  • Corrupt tarball; one file changed; extra file; missing file.

  • Target exists (dir, empty dir, file, symlink); full disk; SIGTERM during extraction and during verification; prefix with :; digest missing or ambiguous; renamed package.

    In every one of these, TARGET is never created (or is left unchanged when it already existed) and no staging directory is left.

  • SIGKILL leaves the staging directory (a named limit); the next install reports it and succeeds.

  • A plain tar -xzf fails install-trace.

One evaluator fix is recorded in §19.5: P10a's staging count used a recursive listing. The contract is unchanged.

Not done

  • No distribution: Phase C scope §4 licensing is still unconfirmed.
  • No minisign signature (PR-C4).
  • No other GPU, host or filesystem.

Merge order

Review and merge the stacked republish PR into this branch first. That merge is required: test_runtime_identity_staleness fails without it.

scripts/pre_push.sh passed on the combined head.

🤖 Generated with Claude Code

raylei50653 and others added 7 commits October 7, 2026 22:59
- scripts/native/build_shipping_package.py: from a tree that passes
  check_shipping_bundle.py static, write <name>.tar.gz (deterministic USTAR +
  gzip, one top directory, MANIFEST.json), <name>.install.sh and the package
  digest <name>.sha256. Every MANIFEST key but "files" is derived from the
  repository at the source commit and refuses files that are not the pins.
- shipping/package/install.sh: POSIX sh, base system tools only. Digest ->
  extract into a private staging directory next to TARGET -> every file
  against MANIFEST.json (exact set, regular files, size, sha256, mode) ->
  one mv -n -T (renameat2 RENAME_NOREPLACE). Any failure or signal removes
  the staging directory; TARGET is never created. --verify PREFIX re-checks
  an installed tree. No option or environment variable changes the checks.
- scripts/native/check_shipping_package.py: the canonical MANIFEST form the
  installer parses with sed; `tarball` checks the release set, digest,
  member rules, MANIFEST against the members, the pinned tree and the
  metadata recomputed at the source commit.
- check_shipping_bundle.py static --manifest: an installed package tree.
  Its `# status:` header moves above the docstring (it sat past the
  indexer's 60-line window, so the generated index had dropped the label).
- scripts/native/run_package_container.sh: install in the pinned clean
  ubuntu:24.04 image (dash), optionally under strace -yy.
- tests/unit/test_shipping_package.py: format, determinism, and the
  installer's refusals on a synthetic package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… current

The builder runs check_runtime_identity_staleness.py --mode attested and
refuses a stale publication (or a dirty tree) unless --trial; the MANIFEST
records both, and check_shipping_package.py tarball fails a package where
either did not hold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sages

- check_shipping_package.py install-trace: from strace -ff -yy of an
  installation, the target is touched by exactly one successful
  renameat2(<staging>/x/<name>, TARGET, RENAME_NOREPLACE) and nothing else
  (failed attempts included); every other mutating call is in the one
  staging directory; the staging directory is removed; unresolved mutating
  calls fail.
- run_package_container.sh install-strace traces %file plus the fd-based
  mutators instead of %desc (11 GB of read/write data in the first trial).
- install.sh: says when it starts checking files; reports (does not remove)
  staging directories left by an interrupted installation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, P1-P15

The design decisions (three release files, installer outside the tarball,
digest over both, MANIFEST derived from the source commit, the identity
republish before the formal run), the trial on the PR-C2 A4 tree, and the
formal-run contract written before any formal measurement: build + static,
package (tarball check, determinism, MANIFEST = tree), install from the
tarball in the clean container with the install-trace gates, the installed
tree's EXACT run against PR-C2 A4, G2-2/G2-4, and the installer's negative
controls P1-P15.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Archive the outgoing canonical (implementation 7d4dc7907dbef1aa, the PR-C1 A4
publication) and promote a fresh controlled-host capture (build/runtime_identity,
Release, --run-probe --require-complete) at the PR-C3 contract head 1f58aef.
Promoted before the PR-C3 formal run (docs §19.4): the package's MANIFEST
records this coordinate, so it must describe the package's source commit.

Axes:
* implementation MOVED 7d4dc7907dbef1aa -> 1927e740d4267aec; files 286 -> 287.
  Added (1): shipping/package/install.sh (the package installer, new under
  shipping/**). Changed: none. Removed: none.
* environment, decision_surface, identity_semantics, runtime_inputs: unchanged.
* probe: re-run fresh (not reused); behavior 2dabed0b, equal to the A4
  publication. Probe equality is not an equivalence claim; equivalence stays
  unproven.

Verified: check_runtime_identity_staleness.py --mode attested exit 0. The
attested operator library build/libsaccade_scan_torchop.so is unchanged
(aa84cccd) after the capture build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… P1-P15)

Package built from the PR-C2 pinned tree at a clean commit with a current
runtime identity, deterministic (two builds byte-identical), installed from
the tarball in the clean container with the target touched only by one
renameat2(RENAME_NOREPLACE); the installed tree EXACT (detector 5316/5316,
MOT 7/7, graph 7/7) and identical to the PR-C2 A4 run. All 15 installer
negative controls as required; P3 records that the digest is not a
signature. The evaluator's P10a staging count (recursive listing) is fixed
and recorded; no contract change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chore(provenance): republish the runtime coordinate for #465 PR-C3
@raylei50653
raylei50653 merged commit 56bc57f into main Oct 8, 2026
8 checks passed
@raylei50653
raylei50653 deleted the feat/465-pr-c3-package branch November 13, 2026 11:10
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