Skip to content

Build Windows release graph once and reuse exact candidate archives #1611

Description

@TheGreenCedar

Context

Run 30512692629 restores Cargo registry and git inputs plus a bounded sccache object cache, then compiles three Windows graphs: a debug repository-identity test, a release native-staging test, and the release CLI/runtime/qualification-driver package. The cache restores quickly, but build scripts, native configuration, staging, and linking repeat. Protected hosts also download the same authenticated 160–180 MB candidate archives on every proof phase.

The exact-package invariant remains strict: archive reuse is valid only for the exact source commit, target, and archive SHA-256. A PR head and a later merge commit are different candidates even when their trees or bytes happen to match.

Acceptance

  • Build the exact-head Windows release graph once, including the production CLI, runtime, optional qualification driver, and the Windows native-staging regression harness.
  • Run Windows path-identity and the complete immutable-native-staging regressions from artifacts emitted by that build, with no later Cargo or direct rustc invocation. Move genuinely source-only checks to source proof where they do not belong in the package graph.
  • Package the exact production binaries emitted by that graph and preserve all existing path, staging, native identity, package-integrity, signing, and checksum guarantees.
  • Cache model material by the checked-in model SHA-256, validating size and digest on every hit.
  • Cache protected-host candidate archives in an atomic content-addressed store keyed by exact source SHA, target, and inner archive SHA-256. Authenticate producer provenance, target, archive name, size, and SHA-256 on every hit. Reject cross-SHA, stale-run, symlink/reparse, hardlink, partial, and traversal entries.
  • On a cache miss, download the exact Actions or Release asset into a temporary sibling, validate outer and inner identity, then atomically publish the complete record. Never use prefix restore keys.
  • Reuse one authenticated exact-main-SHA archive through prepublish qualification, publication, and postpublish proof where host locality permits. A promotion that changes SHA, signed macOS bytes, or a cold host must miss. Keep the one publisher transfer needed to upload GitHub Release assets.
  • Remove unconditional large downloads used only to recover archive identity when an authenticated small package-cell record suffices.
  • Publish timing that separates dependency/compiler/model cache restoration, native setup, the Cargo graph, linker work, regression execution, packaging, and artifact transfer.
  • Update workflow policy and its mutation suite for every workflow edit. Update release-claims.json and claim/closeout tests for any changed reuse or claim-graph contract.
  • Independently execute mutations that restore duplicate compiler invocations, run Cargo after the unified build, mix debug/release outputs, select arbitrary test binaries, admit stale or cross-SHA archives, skip hit verification, make large transfers unconditional, or key model material by anything other than model SHA. Every mutation must fail.

Use focused tests while iterating and one exact-head source proof only after independent acceptance. Never rerun an unchanged hardware-proof head.

Refs #1179

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions