Skip to content

Build caching for the deploy actions (sccache) #346

Description

@aram356

Summary

Implement build caching for the EdgeZero deploy actions so a deploy no longer pays a ~10-minute cold Rust compile every run (observed on stackpop/trusted-server-deployer, which checks out a separate application repo and builds its CLI).

The design is merged (via #316) and lives at:

  • Spec: docs/specs/edgezero-deploy-build-caching.md (v6.14 — sccache pivot)
  • Container sub-plan: docs/superpowers/plans/2026-08-20-build-cache-container.md

Approach (v6.14)

Caching is delivered by a reusable workflow (workflow_call) running in a pinned container (single-manifest linux/amd64, digest-pinned, baking the Rust toolchain + wasm32-wasip1 + a pinned sccache + the Fastly CLI), on GitHub-hosted runners only. The cache mechanism is a fresh CARGO_TARGET_DIR + an action-owned pinned sccache disk cache (Cargo's own recommendation): content-addressed, so it works for any source (including EdgeZero's own unpublished git dependency), needs no custom target/ pruner, and caches no dependency source (compiled objects only). cache is off by default; provenance + container execution are unconditional.

Sub-plans (dependency-ordered)

  1. Pinned build container — Dockerfile, GHCR publish (verify-by-digest → reviewable image.json PR), digest-pin gate. Everything keys platform-id on this digest.
  2. Cached build path — reusable workflow + prepare/compile split + owned actions/cache restore/save over SCCACHE_DIR + config/source closure.
  3. Provenance — committed JSON Schema + canonical-JSON validation, validate-app-cli-provenance, compute-app-cli-identity, the single ExpectedIdentity contract.
  4. Consumer integrationactive-version-fastly, per-consumer ExpectedIdentity, the one action-owned Docker launcher, production-only recovery.

Rollout is atomic at one EdgeZero SHA (provenance + container execution change every build; the direct-composite producer is retired, so adopters move to a two-job topology; runner floor rises to Actions Runner 2.336.0 for the self-repo $/ reference).

Status / scope of the tracking PR

The design has been through extensive review and is still being hardened. This issue tracks the implementation, landing in dependency order behind the container. The first increment (the fail-closed image.json digest-pin validator) is in the linked PR.

Out of scope (v1)

Caching .crate archives; workflow-bound artifact attestation; git/alternate-registry dependency authentication; a trusted self-hosted runner mode; non-default feature sets; non-Fastly adapters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions