diff --git a/.github/actions/rust-cache/action.yml b/.github/actions/rust-cache/action.yml index 43727027141..6580c8d4b14 100644 --- a/.github/actions/rust-cache/action.yml +++ b/.github/actions/rust-cache/action.yml @@ -1,65 +1,119 @@ name: Rust cache -description: Install mbx, put its Cargo shim on PATH, and restore the build cache the default branch warms. +description: Install mbx, put its Cargo shim on PATH, and back it with the R2 build cache that `main` and its merge queue write. inputs: - scope: - description: Key space for the store. A workflow that builds a different set of artifacts needs its own. - default: shared - save-on-dispatch: - description: Let a trusted workflow_dispatch seed the cache (the warming workflow only). - default: "false" + access-key-id: + description: R2 access key id. Empty, as for a fork pull request, builds cold. + default: "" + secret-access-key: + description: R2 secret access key matching `access-key-id`. + default: "" runs: using: composite steps: - # The pinned action saves in a post step guarded by success(), so failed - # builds cannot publish a cache even when dispatch saving is enabled. - - uses: jdx/mr-boxington-action@7234d3dd1a6ca8f6c381eea8e4dfb03f18fcf777 # v1.3.0 + # Runs on `main` and in its merge queue write; everything else reads. A + # queued pull request is about to become `main`, so its code is trusted + # like `main`'s, and publishing from the queue keeps the cache current + # with what lands without building it again after the merge. + # + # The write key is the boundary. It lives in the `cache-write` + # Environment, whose branch policy admits exactly the refs `WRITE` names, + # and its secrets shadow the repository's read key under the same names. + # So every job that can run on those refs names the Environment there, and + # a pull request's code never sees the write key, even from this + # repository. Fork pull requests get no secrets at all and build cold. + # + # A writer without a key means the Environment is misconfigured, and + # building on would leave every reader cold with nothing to say why. Half + # a pair is a broken secret on any job, never a fork's empty one. + - name: Cache credentials + shell: bash + env: + KEY_ID: ${{ inputs.access-key-id }} + SECRET: ${{ inputs.secret-access-key }} + WRITE: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/gh-readonly-queue/main/') }} + run: | + if [ -z "$KEY_ID" ] && [ -z "$SECRET" ]; then + if [ "$WRITE" = "true" ]; then + echo "::error::$GITHUB_REF writes the cache but the cache-write Environment supplied no R2 key" + exit 1 + fi + echo "::warning::No R2 cache credentials, as for a fork pull request; building cold" + exit 0 + fi + if [ -z "$KEY_ID" ] || [ -z "$SECRET" ]; then + echo "::error::only one of the R2 access key id and secret is set; check the MBX_R2_* secrets" + exit 1 + fi + { + echo "AWS_ACCESS_KEY_ID=$KEY_ID" + echo "AWS_SECRET_ACCESS_KEY=$SECRET" + echo "MBX_REMOTE_S3_ENDPOINT=https://dd618f5dbd5da77b8296f1613c301f5c.r2.cloudflarestorage.com" + echo "MBX_REMOTE_S3_REGION=auto" + if [ "$WRITE" = "true" ]; then + echo "MBX_REMOTE_MODE=read-write" + # mbx trusts only a push to a protected branch, which leaves out + # the merge queue and Nightly's schedule. Its guess is bypassed on + # purpose: the Environment already decided who holds the write key. + echo "MBX_REMOTE_TRUST_WRITES=true" + else + echo "MBX_REMOTE_MODE=read-only" + fi + } >> "$GITHUB_ENV" + + # mbx keys every compilation on the compiler, target, and inputs, so one + # bucket serves every toolchain and workflow without a cache key of ours. + # The namespace splits it per runner platform anyway, so a platform's + # usage and misses can be read off its own prefix. The remote mode comes + # from MBX_REMOTE_MODE above. + - uses: jdx/mr-boxington-action@47ce49b32025d93a7a2f4570815afaa2b7092240 # v1.7.2 with: - version: 1.10.0 - # `github-cache-mode` is left at its `target` default. That transports - # Cargo's pruned target tree, the same payload Swatinem carried, with - # mbx's per-compilation store on top. The `objects` closure is portable - # across differing target directories, which nothing here needs, and - # measured slower. It transports `./target` relative to the working - # directory and ignores CARGO_TARGET_DIR, so a workflow that sets one - # has to point it there. - # - # The key is spelled out because the generated one cannot name this - # repository's compiler. It keys on `rustc -vV` from PATH, which here is - # whatever the runner image ships: the compiler these jobs build with - # exists only inside `nix develop`. The `toolchain` input is no help - # either, since it names a rustup toolchain and probes - # `rustc + -vV`, and nothing installs that channel through rustup. - # - # flake.lock pins that compiler, so hashing the flake identifies it more - # precisely than `rustc -vV` would, and rolls the cache when the dev - # shell changes. Build scripts link against Nix store paths, so a - # restored executable whose dynamic linker moved is worse than a cold - # cache. rust-toolchain.toml is in the hash because it picks the channel, - # even though it is kept in sync with the flake. - # - # Every segment the generated layout carries has to be carried here too: - # the runner pair, so a job on an x86 runner cannot restore the ARM64 - # store, and `target`, so changing `github-cache-mode` cannot - # restore the other payload. The trailing run id rolls the key on every - # run, which is what lets a repeated `workflow_dispatch` seed a cold - # cache against GitHub's immutable entries. - cache-key: ${{ runner.os }}-${{ runner.arch }}-mbx-target-${{ inputs.scope }}-${{ hashFiles('flake.nix', 'flake.lock', 'rust-toolchain.toml') }}-${{ github.run_id }}-${{ github.run_attempt }} - restore-keys: ${{ runner.os }}-${{ runner.arch }}-mbx-target-${{ inputs.scope }}-${{ hashFiles('flake.nix', 'flake.lock', 'rust-toolchain.toml') }}- - save-on-workflow-dispatch: ${{ inputs.save-on-dispatch }} + version: 1.25.0 + backend: ${{ inputs.access-key-id != '' && inputs.secret-access-key != '' && 'remote' || 'local' }} + remote-url: s3://mbx-moq-dev + namespace: ${{ runner.os }}-${{ runner.arch }} + + # The action only warns when it cannot reach the remote, which is how a + # revoked or mistyped key would look. A cache that silently never hits + # costs every job its full build, so refuse instead. A writer also has to + # come out read-write, or nothing would publish and every reader would + # drift cold unnoticed. + - name: Check the cache + if: inputs.access-key-id != '' && inputs.secret-access-key != '' + shell: bash + run: | + report=$(mbx doctor --json || true) + remote=$(jq -r '.checks[] | select(.name == "remote") | "\(.severity): \(.detail)"' <<< "$report") + policy=$(jq -r '.checks[] | select(.name == "policy") | .detail' <<< "$report") + echo "remote: $remote" + echo "policy: $policy" + case "$remote" in + pass:*) ;; + *) echo "::error::R2 cache unusable: $remote"; exit 1 ;; + esac + if [ "$MBX_REMOTE_MODE" = "read-write" ] && [[ "$policy" != *"effective read-write" ]]; then + echo "::error::the cache writer cannot publish: $policy" + exit 1 + fi # The shim is how mbx reaches Cargo. The action above only puts `mbx` itself # on PATH, which reaches a build that spells the wrapper out; nothing here # does, and release-plz spawns Cargo where no environment variable could. - # `mbx setup` installs a `cargo` launcher instead, and flake.nix puts its - # directory in front of the dev shell's pinned toolchain. + # `mbx setup` installs a `cargo` launcher instead. Its directory goes on + # PATH for jobs that use the runner's rustup toolchain, and flake.nix puts + # it back in front of the dev shell's pinned toolchain. # - # `--status` is the assertion, not decoration: the shim is the only thing - # routing Cargo through mbx, so a setup that quietly did nothing would build - # every job uncached and still report success. + # The shim existing is the assertion: it is the only thing routing Cargo + # through mbx, so a setup that quietly did nothing would build every job + # uncached and still report success. - name: Cargo shim shell: bash run: | mbx setup --yes - mbx setup --status + shim=$(mbx setup --status 2>/dev/null | sed -n '1s/.*: //p' || true) + if [ ! -e "$shim" ]; then + echo "::error::mbx setup installed no Cargo shim: $(mbx setup --status 2>&1)" + exit 1 + fi + echo "${shim%[/\\]*}" >> "$GITHUB_PATH" diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 7e5ff1ded18..1dc53aae603 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -1,22 +1,9 @@ name: Cache -# Populates the Rust build cache that pull request jobs restore, and the dev -# shell closure that every nix job substitutes. +# Pushes the dev shell closure that every nix job substitutes. # -# Actions scopes cache reads to the current branch plus the default branch, so -# only caches written here on `main` are reachable from a pull request. This -# workflow is therefore the single trusted writer. The action refuses to publish -# from a pull request regardless. -# -# The Rust store is ARM64 only, because every job that restores it runs there. -# Each store is about 6 GB against the repository's 10 GB budget, and Actions -# evicts least recently used first, so an x86 store nobody on a pull request -# read was enough to push out the one they all do. The x86 leg still pushes its -# dev shell, which the x86 jobs substitute. -# -# This runs the unscoped suite rather than the diff-scoped one: the point is to -# leave artifacts for whatever a future PR happens to touch, not to check `main` -# (the PR that became `main` was already checked). It blocks nobody. +# The Rust build cache is not warmed here: `main` and its merge queue publish +# what they compile as they run (see .github/actions/rust-cache). permissions: contents: read @@ -24,26 +11,17 @@ permissions: on: push: branches: [main] - # A docs-only merge can't change the build graph, so don't spend a runner. + # Only the flake decides the dev shell, so don't spend a runner otherwise. paths: - - "rs/**" - - "Cargo.toml" - - "Cargo.lock" - - "rust-toolchain.toml" - "flake.nix" - "flake.lock" + - "nix/**" - ".github/workflows/cache.yml" - # The action pin and the cache key both live here, and either can roll - # the store. Without this the sole writer would not re-run after such a - # change, leaving every PR reader cold until something else landed. - - ".github/actions/rust-cache/**" - # Priming a cold cache by hand, e.g. after a toolchain bump rolls the key. + # Priming the shell by hand, e.g. after a failed push. workflow_dispatch: -# Queue rather than cancel. A warm takes 30-50 minutes and `main` merges more -# often than that, so cancelling meant no warm ever finished and every pull -# request restored a store hours stale. Actions keeps only the newest pending -# run per group, so merges that land mid-warm still coalesce into one. +# Queue rather than cancel, so a run always finishes. Actions keeps only the +# newest pending run per group, so merges that land mid-run coalesce into one. concurrency: group: cache-${{ github.ref }} cancel-in-progress: false @@ -54,11 +32,7 @@ jobs: strategy: fail-fast: false matrix: - include: - - runner: ubuntu-24.04-arm - rust: true - - runner: ubuntu-latest - rust: false + runner: [ubuntu-24.04-arm, ubuntu-latest] runs-on: ${{ matrix.runner }} timeout-minutes: 60 @@ -85,7 +59,7 @@ jobs: # package, so the dev shell itself was never cached. Anything in it that # nixpkgs doesn't serve prebuilt (uniffi-bindgen-go, a # buildRustPackage from a git tag) was therefore compiled from source by - # every job that entered the shell. Push it once here so pull requests + # every job that entered the shell. Push it once here so later jobs # substitute it instead. - uses: cachix/cachix-action@38b082610b782e7e93e209c35fd730d399dee866 # v17 with: @@ -99,31 +73,3 @@ jobs: # out the build-time inputs. nix develop --profile /tmp/devshell --command true cachix push kixelated /tmp/devshell - - # The single writer. `save-on-dispatch` is what lets the - # `workflow_dispatch` above prime a cold store; the action otherwise saves - # only on pushes to the default branch. - - name: Rust cache - if: matrix.rust - uses: ./.github/actions/rust-cache - with: - save-on-dispatch: true - - # Both halves, so the saved cache carries the lint artifacts (clippy rmeta) - # and the test artifacts (codegen + linked test binaries). They share - # little, and a PR usually needs both. - # - # `continue-on-error` because the action saves only from a successful - # job, and the artifacts are worth saving whatever a lint or test on - # `main` says: a formatting slip or one flaky test otherwise left every - # pull request restoring a store days stale. The merge queue gates are - # what report those failures. - - name: Check - if: matrix.rust - continue-on-error: true - run: nix develop --command just ci check --all - - - name: Test - if: ${{ matrix.rust && !cancelled() }} - continue-on-error: true - run: nix develop --command just ci test --all diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 0ecbc88b817..2c28510e9b3 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -34,6 +34,8 @@ jobs: # the concurrency group above. if: github.event.action != 'closed' && (github.event_name != 'pull_request' || github.base_ref == 'release') runs-on: ubuntu-24.04-arm + # `main` and its merge queue write the Rust cache; see .github/actions/rust-cache. + environment: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/gh-readonly-queue/main/')) && 'cache-write' || '' }} # Backstop a hang instead of holding the runner for the 6-hour default. timeout-minutes: 60 @@ -71,14 +73,15 @@ jobs: - uses: DeterminateSystems/flake-checker-action@786422608c7bded2bbc9741ad9f91356842bf520 # main if: steps.scope.outputs.needed == 'true' - # cache.yml warms the default-branch store on `main`. Queue and release PR - # runs restore it; the action refuses to publish from them, and Actions - # would scope such an entry to its own ref anyway, where no later run - # could read it while it ate the repository's 10 GB budget. A selection - # of lints alone compiles no Rust, so it skips the restore. + # The merge queue writes what it compiles, so the cache follows what lands + # on `main` without a second build after it; release pull requests read. + # A selection of lints alone compiles no Rust, so it skips the cache. - name: Rust cache if: steps.scope.outputs.rust == 'true' uses: ./.github/actions/rust-cache + with: + access-key-id: ${{ secrets.MBX_R2_ACCESS_KEY_ID }} + secret-access-key: ${{ secrets.MBX_R2_SECRET_ACCESS_KEY }} # Half of the `just ci` a contributor runs before pushing, with the same # MOQ_STRICT and nextest profile. In the queue it diffs against the merge @@ -97,6 +100,8 @@ jobs: name: Test if: github.event.action != 'closed' && (github.event_name != 'pull_request' || github.base_ref == 'release') runs-on: ubuntu-24.04-arm + # `main` and its merge queue write the Rust cache; see .github/actions/rust-cache. + environment: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/gh-readonly-queue/main/')) && 'cache-write' || '' }} timeout-minutes: 60 steps: @@ -131,10 +136,13 @@ jobs: extra-substituters = https://kixelated.cachix.org extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= - # Restore only, and only for selected Rust, same as the `check` job above. + # Reads and writes like the `check` job above. - name: Rust cache if: steps.scope.outputs.rust == 'true' uses: ./.github/actions/rust-cache + with: + access-key-id: ${{ secrets.MBX_R2_ACCESS_KEY_ID }} + secret-access-key: ${{ secrets.MBX_R2_SECRET_ACCESS_KEY }} - name: Test if: steps.scope.outputs.needed == 'true' diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml index 0daaf91bb4a..9f733f142d8 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -13,9 +13,8 @@ name: Dependabot # calls one `gh` command against the pull request number. # # The moq-bot token rather than GITHUB_TOKEN: a merge enabled by GITHUB_TOKEN -# does not trigger further workflow runs, which would silently skip Cache -# (the Rust cache warm keyed on Cargo.lock, exactly what the cargo group -# changes), release-rs and release-js on every auto-merged bump. +# does not trigger further workflow runs, which would silently skip +# release-rs and release-js on every auto-merged bump. permissions: {} diff --git a/.github/workflows/interop.yml b/.github/workflows/interop.yml index b7c9f003813..997d67725a7 100644 --- a/.github/workflows/interop.yml +++ b/.github/workflows/interop.yml @@ -45,6 +45,8 @@ jobs: interop: name: Interop runs-on: ubuntu-latest + # `main` and its merge queue write the Rust cache; see .github/actions/rust-cache. + environment: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/gh-readonly-queue/main/')) && 'cache-write' || '' }} # The matrix runs in real time (ffmpeg -re pacing + per-subscriber timeouts); # this is a safety net against a hung relay/client plus a cold first build. timeout-minutes: 60 @@ -68,14 +70,13 @@ jobs: extra-substituters = https://kixelated.cachix.org extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= - # Reuse ~/.cargo + ./target across nightly runs so only changed crates - # recompile (the relay, cli, moq-ffi, and moq-c all build from source). + # The relay, cli, moq-ffi, and moq-c all build from source. The nightly + # run publishes them for the pull requests that touch the harness. - name: Rust cache - uses: Swatinem/rust-cache@f0d9c3887740aee45f6153b24b3a6b815192ec16 # v2 + uses: ./.github/actions/rust-cache with: - # A pull request's entry is scoped to its own branch, where no later - # run reads it, while it spends the budget the shared store needs. - save-if: ${{ github.event_name != 'pull_request' }} + access-key-id: ${{ secrets.MBX_R2_ACCESS_KEY_ID }} + secret-access-key: ${{ secrets.MBX_R2_SECRET_ACCESS_KEY }} # Playwright's Chromium isn't in the nix devShell. Install it plus its apt # runtime libs (`--with-deps` needs the host package manager) so the diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 43bccf2a601..c43088a1174 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -50,6 +50,7 @@ jobs: # The path-filtered gates main PRs skip; release PRs still run them. x11: uses: ./.github/workflows/x11.yml + secrets: inherit android: uses: ./.github/workflows/android.yml @@ -59,6 +60,7 @@ jobs: wasm: uses: ./.github/workflows/wasm.yml + secrets: inherit audio-replay: uses: ./.github/workflows/audio-quality.yml @@ -70,6 +72,8 @@ jobs: nightly: name: Nightly (${{ matrix.name }}) runs-on: ${{ matrix.runner || 'ubuntu-24.04-arm' }} + # `main` and its merge queue write the Rust cache; see .github/actions/rust-cache. + environment: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/gh-readonly-queue/main/')) && 'cache-write' || '' }} timeout-minutes: 60 strategy: fail-fast: false @@ -184,11 +188,13 @@ jobs: extra-substituters = https://kixelated.cachix.org extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= - # Restore only, like `tests` below. Saving its own store cost 3.6 GB of the - # repository's 10 GB budget and evicted the one every pull request restores. + # Writes from `main`, like every Rust cache user there. - name: Rust cache if: ${{ !matrix.uncached }} uses: ./.github/actions/rust-cache + with: + access-key-id: ${{ secrets.MBX_R2_ACCESS_KEY_ID }} + secret-access-key: ${{ secrets.MBX_R2_SECRET_ACCESS_KEY }} # perf samples the relay in kernel context into large buffers; bench-profile refuses without it. - name: Allow perf kernel sampling @@ -294,6 +300,8 @@ jobs: tests: name: Tests (${{ matrix.recipe }}) runs-on: ubuntu-24.04-arm + # `main` and its merge queue write the Rust cache; see .github/actions/rust-cache. + environment: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/gh-readonly-queue/main/')) && 'cache-write' || '' }} timeout-minutes: 60 strategy: fail-fast: false @@ -327,6 +335,9 @@ jobs: extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= - name: Rust cache uses: ./.github/actions/rust-cache + with: + access-key-id: ${{ secrets.MBX_R2_ACCESS_KEY_ID }} + secret-access-key: ${{ secrets.MBX_R2_SECRET_ACCESS_KEY }} - name: Install nightly Rust if: matrix.nightly uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable @@ -343,6 +354,8 @@ jobs: media-engines: name: Media (${{ matrix.engine }} player) runs-on: ubuntu-24.04-arm + # `main` and its merge queue write the Rust cache; see .github/actions/rust-cache. + environment: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/gh-readonly-queue/main/')) && 'cache-write' || '' }} timeout-minutes: 60 strategy: fail-fast: false @@ -361,6 +374,9 @@ jobs: extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= - name: Rust cache uses: ./.github/actions/rust-cache + with: + access-key-id: ${{ secrets.MBX_R2_ACCESS_KEY_ID }} + secret-access-key: ${{ secrets.MBX_R2_SECRET_ACCESS_KEY }} - name: Install publisher and player engines run: nix develop --command bash -c "bun install --frozen-lockfile && bunx playwright install --with-deps chromium ${{ matrix.engine }}" - name: Media and negative controls @@ -382,15 +398,18 @@ jobs: # The only macOS and Windows coverage main gets; release PRs run it too. platform: uses: ./.github/workflows/platform.yml + secrets: inherit with: benchmarks: true # Plays the matrix in headless Chromium and the native player through moq-shaper # and grades what the listener heard against test/audio-quality/budgets.json. - # ARM64 like wasm.yml, the only architecture cache.yml warms a Rust store for. + # ARM64 like wasm.yml. audio-quality: name: Audio quality runs-on: ubuntu-24.04-arm + # `main` and its merge queue write the Rust cache; see .github/actions/rust-cache. + environment: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/gh-readonly-queue/main/')) && 'cache-write' || '' }} # Thirty-six rows at a minute each, plus the relay, CLI, and shaper built from source. timeout-minutes: 90 steps: @@ -406,6 +425,9 @@ jobs: extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= - name: Rust cache uses: ./.github/actions/rust-cache + with: + access-key-id: ${{ secrets.MBX_R2_ACCESS_KEY_ID }} + secret-access-key: ${{ secrets.MBX_R2_SECRET_ACCESS_KEY }} # Playwright's Chromium isn't in the nix devShell; `--with-deps` installs # its apt runtime libs, and run.sh's own install then no-ops. - name: Playwright Chromium @@ -562,6 +584,8 @@ jobs: # Measures what these release jobs upload rather than rebuilding it. needs: [release-py-ffi, release-shared-ffi, release-moq-c, release-moq-relay, release-moq-cli] runs-on: ubuntu-24.04-arm + # `main` and its merge queue write the Rust cache; see .github/actions/rust-cache. + environment: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/gh-readonly-queue/main/')) && 'cache-write' || '' }} timeout-minutes: 120 permissions: contents: read @@ -577,6 +601,9 @@ jobs: extra-substituters = https://kixelated.cachix.org extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= - uses: ./.github/actions/rust-cache + with: + access-key-id: ${{ secrets.MBX_R2_ACCESS_KEY_ID }} + secret-access-key: ${{ secrets.MBX_R2_SECRET_ACCESS_KEY }} - name: Collect and compare sizes run: nix develop --command just gh size-nightly size-report "$GITHUB_RUN_ID" env: diff --git a/.github/workflows/obs.yml b/.github/workflows/obs.yml index 9c1ebb37fd5..6fc532279bb 100644 --- a/.github/workflows/obs.yml +++ b/.github/workflows/obs.yml @@ -113,12 +113,14 @@ jobs: extra-substituters = https://kixelated.cachix.org extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= - # cache.yml warms the default-branch store on `main`. Pull requests restore - # it; the action refuses to publish from a pull request. It holds - # dev-profile artifacts, which is why `just obs ci` builds moq-ffi in debug - # rather than the preset's release. + # Read only: this runs for `release` alone, and Nightly's `obs ci` row + # writes on `main`. The cache holds dev-profile artifacts, which is why + # `just obs ci` builds moq-ffi in debug rather than the preset's release. - name: Rust cache uses: ./.github/actions/rust-cache + with: + access-key-id: ${{ secrets.MBX_R2_ACCESS_KEY_ID }} + secret-access-key: ${{ secrets.MBX_R2_SECRET_ACCESS_KEY }} # The same recipe a developer runs on Linux. Warnings are errors here, via # the platform's CI preset. diff --git a/.github/workflows/platform.yml b/.github/workflows/platform.yml index dff851d7153..c5ddc6f4dd7 100644 --- a/.github/workflows/platform.yml +++ b/.github/workflows/platform.yml @@ -83,7 +83,9 @@ jobs: if: needs.scope.outputs.rs == 'true' || needs.scope.outputs.cpp == 'true' || needs.scope.outputs.obs == 'true' # OBS uses the Visual Studio 17 2022 CMake generator. runs-on: windows-2022 - # The suites run serially without a Rust cache; the full macOS suite measured 43 min. + # `main` and its merge queue write the Rust cache; see .github/actions/rust-cache. + environment: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/gh-readonly-queue/main/')) && 'cache-write' || '' }} + # The suites run serially; the full macOS suite measured 43 min without a Rust cache. timeout-minutes: 90 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -103,6 +105,12 @@ jobs: uses: taiki-e/install-action@ab6895351a88b908e96a4697860d4ffea5e57dbe # v2.87.27 with: tool: nextest@0.9.146 + # Nightly writes these platforms; `release` pull requests read. + - name: Rust cache + uses: ./.github/actions/rust-cache + with: + access-key-id: ${{ secrets.MBX_R2_ACCESS_KEY_ID }} + secret-access-key: ${{ secrets.MBX_R2_SECRET_ACCESS_KEY }} - name: Install uniffi-bindgen-cpp if: needs.scope.outputs.cpp == 'true' || needs.scope.outputs.obs == 'true' shell: bash @@ -129,6 +137,8 @@ jobs: needs: scope if: needs.scope.outputs.rs == 'true' || needs.scope.outputs.swift == 'true' || needs.scope.outputs.obs == 'true' || needs.scope.outputs.moq_sh == 'true' runs-on: macos-latest + # `main` and its merge queue write the Rust cache; see .github/actions/rust-cache. + environment: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/gh-readonly-queue/main/')) && 'cache-write' || '' }} timeout-minutes: 90 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -143,6 +153,11 @@ jobs: uses: taiki-e/install-action@ab6895351a88b908e96a4697860d4ffea5e57dbe # v2.87.27 with: tool: nextest@0.9.146 + - name: Rust cache + uses: ./.github/actions/rust-cache + with: + access-key-id: ${{ secrets.MBX_R2_ACCESS_KEY_ID }} + secret-access-key: ${{ secrets.MBX_R2_SECRET_ACCESS_KEY }} - name: Install uniffi-bindgen-cpp if: needs.scope.outputs.obs == 'true' run: cargo install uniffi-bindgen-cpp --locked --git https://github.com/kixelated/uniffi-bindgen-cpp --tag v0.11.0-kixelated.5+v0.32.2 diff --git a/.github/workflows/release-ffi.yml b/.github/workflows/release-ffi.yml index 89a88115d2c..e67c121789b 100644 --- a/.github/workflows/release-ffi.yml +++ b/.github/workflows/release-ffi.yml @@ -85,8 +85,8 @@ jobs: with: targets: ${{ matrix.target }} - # No Rust cache: its entry would evict the store every pull request - # restores from the 10 GB budget. See cache.yml. + # No Rust cache: shipped binaries compile from source rather than from + # whatever the shared R2 cache holds. - name: Install cross-compilation tools (Linux ARM64) if: matrix.target == 'aarch64-unknown-linux-gnu' @@ -139,8 +139,8 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable - # No Rust cache: its entry would evict the store every pull request - # restores from the 10 GB budget. See cache.yml. + # No Rust cache: shipped binaries compile from source rather than from + # whatever the shared R2 cache holds. # Go uses a third-party generator; build.sh skips Go when it is absent. - name: Install uniffi-bindgen-go diff --git a/.github/workflows/release-kt-lib.yml b/.github/workflows/release-kt-lib.yml index 1c51c811b6f..babc4337641 100644 --- a/.github/workflows/release-kt-lib.yml +++ b/.github/workflows/release-kt-lib.yml @@ -214,8 +214,8 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable - # No Rust cache: its entry would evict the store every pull request - # restores from the 10 GB budget. See cache.yml. + # No Rust cache: shipped binaries compile from source rather than from + # whatever the shared R2 cache holds. # Generate the UniFFI Kotlin so the sibling :moq-ffi project compiles. - name: Generate bindings diff --git a/.github/workflows/release-rs.yml b/.github/workflows/release-rs.yml index 5a42cf5f53b..c3288af3104 100644 --- a/.github/workflows/release-rs.yml +++ b/.github/workflows/release-rs.yml @@ -26,7 +26,7 @@ on: - "flake.lock" - ".release-plz.toml" - ".github/workflows/release-rs.yml" - # Releasing by hand, e.g. after a skipped push or a cold cache. Dispatch it + # Releasing by hand, e.g. after a skipped push. Dispatch it # on `release`; the job refuses any other ref. workflow_dispatch: @@ -42,9 +42,7 @@ jobs: # against the registry, so cargo-semver-checks would otherwise build # rustdoc for every crate, baseline and current, into a throwaway target # directory. Pin one absolute path instead so the ~30 crates share their - # dependency builds and the cache below can carry them between runs. It - # has to be this path: the cache action transports `./target` relative to - # the working directory and does not read CARGO_TARGET_DIR. + # dependency builds. CARGO_TARGET_DIR: ${{ github.workspace }}/target steps: @@ -76,12 +74,8 @@ jobs: extra-substituters = https://kixelated.cachix.org extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= - # Its own scope rather than the shared store cache.yml warms: this holds - # cargo-semver-checks rustdoc, not check and test artifacts, and mixing - # the two would have each restoring a target tree built for the other. - # This workflow only runs on `release`, so it is the sole writer of its scope. - # The cache action saves push runs only on the default branch, so pushes - # here restore without saving; a dispatch on `release` refreshes it. + # Read only: `release` is not a writer. Crates publish as + # source, so nothing this reads ends up in a release. # # The action's shim is what gets mbx in here at all. release-plz spawns # Cargo and cargo-semver-checks itself, so no environment variable reaches @@ -89,8 +83,8 @@ jobs: - name: Rust cache uses: ./.github/actions/rust-cache with: - scope: release-rs - save-on-dispatch: true + access-key-id: ${{ secrets.MBX_R2_ACCESS_KEY_ID }} + secret-access-key: ${{ secrets.MBX_R2_SECRET_ACCESS_KEY }} - name: Release run: nix develop --command just rs release diff --git a/.github/workflows/ts.yml b/.github/workflows/ts.yml index 28c9ac96dd3..5856d250a95 100644 --- a/.github/workflows/ts.yml +++ b/.github/workflows/ts.yml @@ -61,6 +61,8 @@ jobs: ts: name: TS validation runs-on: ubuntu-latest + # `main` and its merge queue write the Rust cache; see .github/actions/rust-cache. + environment: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/gh-readonly-queue/main/')) && 'cache-write' || '' }} timeout-minutes: 60 steps: - name: Checkout @@ -77,6 +79,9 @@ jobs: - name: Rust cache uses: ./.github/actions/rust-cache + with: + access-key-id: ${{ secrets.MBX_R2_ACCESS_KEY_ID }} + secret-access-key: ${{ secrets.MBX_R2_SECRET_ACCESS_KEY }} - name: FFmpeg and TSDuck controls if: ${{ !cancelled() }} diff --git a/.github/workflows/uring.yml b/.github/workflows/uring.yml index 869e246f3e7..b76de00cacb 100644 --- a/.github/workflows/uring.yml +++ b/.github/workflows/uring.yml @@ -55,6 +55,9 @@ jobs: - name: Rust cache uses: ./.github/actions/rust-cache + with: + access-key-id: ${{ secrets.MBX_R2_ACCESS_KEY_ID }} + secret-access-key: ${{ secrets.MBX_R2_SECRET_ACCESS_KEY }} - name: io_uring run: nix develop --command just rs uring-changed "$CI_BASE" diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml index 6270c2f0618..995b96b75cd 100644 --- a/.github/workflows/wasm.yml +++ b/.github/workflows/wasm.yml @@ -71,9 +71,11 @@ jobs: wasm: name: WASM if: github.event.action != 'closed' - # ARM64 like check.yml, the only architecture cache.yml warms a Rust store - # for; the harness builds the relay natively, which that store covers. + # ARM64 like check.yml; the harness builds the relay natively, which the + # merge queue's Check and Test publish. runs-on: ubuntu-24.04-arm + # `main` and its merge queue write the Rust cache; see .github/actions/rust-cache. + environment: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/gh-readonly-queue/main/')) && 'cache-write' || '' }} timeout-minutes: 60 steps: @@ -91,10 +93,12 @@ jobs: extra-substituters = https://kixelated.cachix.org extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= - # cache.yml warms the default-branch store on `main`. Pull requests restore - # it; the action refuses to publish from a pull request. + # Nightly's call writes on `main`; release pull requests read. - name: Rust cache uses: ./.github/actions/rust-cache + with: + access-key-id: ${{ secrets.MBX_R2_ACCESS_KEY_ID }} + secret-access-key: ${{ secrets.MBX_R2_SECRET_ACCESS_KEY }} # Playwright's Chromium isn't in the nix devShell. Install it plus its apt # runtime libs (`--with-deps` needs the host package manager); run.sh's own diff --git a/.github/workflows/x11.yml b/.github/workflows/x11.yml index 88d042068ac..952853c9a3d 100644 --- a/.github/workflows/x11.yml +++ b/.github/workflows/x11.yml @@ -30,6 +30,8 @@ jobs: capture: name: SHM and GetImage runs-on: ubuntu-24.04-arm + # `main` and its merge queue write the Rust cache; see .github/actions/rust-cache. + environment: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/gh-readonly-queue/main/')) && 'cache-write' || '' }} timeout-minutes: 30 steps: - name: Checkout @@ -44,6 +46,9 @@ jobs: extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= - name: Rust cache uses: ./.github/actions/rust-cache + with: + access-key-id: ${{ secrets.MBX_R2_ACCESS_KEY_ID }} + secret-access-key: ${{ secrets.MBX_R2_SECRET_ACCESS_KEY }} - name: Capture comparison run: nix develop --command just rs x11-bench-ci env: diff --git a/infra/README.md b/infra/README.md index dba5cb5e3aa..1f03bca0cb9 100644 --- a/infra/README.md +++ b/infra/README.md @@ -8,12 +8,15 @@ infrastructure. | `infra/apt` | `apt.moq.dev` | `apt-moq-dev` | Debian/Ubuntu package repository | | `infra/rpm` | `rpm.moq.dev` | `rpm-moq-dev` | Fedora/RHEL package repository | | `infra/moq-sh` | `moq.sh` | | The `moq` installer script | +| `infra/mbx` | | `mbx-moq-dev` | Private Rust build cache for CI | Each worker is a standalone bun package with a `wrangler.jsonc` and a small TypeScript handler. The apt and rpm workers proxy GETs out of the R2 bucket with appropriate `Content-Type` and `Cache-Control` headers for the file kind. The moq.sh worker serves `install.sh` from its bundle at every path, with the newest `moq-cli` release filled in as the default version. +`infra/mbx` has no Worker: CI reaches its bucket directly through mbx's S3 +client. ## Deploying a worker @@ -103,6 +106,79 @@ After this, every release that publishes a `.deb` or `.rpm` (one of the triggers `apt-repo.yml` / `rpm-repo.yml`, which downloads the assets, regenerates the repository metadata, signs it, and uploads the diff. +## Bootstrapping the Rust build cache + +`.github/actions/rust-cache` points mbx at the private `mbx-moq-dev` bucket, +namespaced per runner OS and architecture. Every job that runs on `main` or in +its merge queue (`gh-readonly-queue/main/*`) writes what it compiles: a queued +pull request is about to become `main`, so its code is trusted like `main`'s. +Release pull request jobs only read (main pull requests run no cloud CI), and +fork pull requests, which get no secrets, build cold. + +The write key is what enforces that: it lives in a GitHub Environment that +only those refs can deploy to, and each writer job names that Environment only +when it runs on one of them. mbx on its own trusts only a push to a protected +branch, which leaves out the queue and Nightly's schedule, so the action sets +`MBX_REMOTE_TRUST_WRITES` for writers and the Environment is the only boundary. + +All of this runs once, by a maintainer. Steps 1, 2, and 4 are done, and step 3 +is done for `main`. + +1. **Create the bucket and its lifecycle rule** under your `wrangler login`: + + ```bash + just infra mbx create + ``` + + `lifecycle.json` deletes every object 30 days after upload and aborts + multipart uploads left incomplete for a day. mbx writes each compilation + once and never refreshes it, so a result still in use expires too; the + next writer that misses it compiles and uploads it again. After editing + the rules, `just infra mbx lifecycle` applies them. + +2. **Create two R2 API tokens** in the dashboard (R2 -> Manage API tokens -> + Create Account API token), both scoped to `mbx-moq-dev` only. Wrangler + cannot create R2 tokens. Each shows an Access Key ID and a Secret Access + Key once. + + - `mbx-read`: **Object Read only**. + - `mbx-write`: **Object Read & Write**. + +3. **Create the `cache-write` Environment**, deployable from `main` and its + merge queue only. A protected-branches policy would admit `release` as + well, so name the branches instead: + + ```bash + gh api -X PUT repos/moq-dev/moq/environments/cache-write --input - <<'EOF' + {"deployment_branch_policy": {"protected_branches": false, "custom_branch_policies": true}} + EOF + gh api -X POST repos/moq-dev/moq/environments/cache-write/deployment-branch-policies \ + -f name=main -f type=branch + gh api -X POST repos/moq-dev/moq/environments/cache-write/deployment-branch-policies \ + -f name='gh-readonly-queue/main/*' -f type=branch + ``` + + Without the queue policy, every merge queue job that writes fails before + it starts, and the queue merges nothing. + +4. **Store the keys under the same two names at both levels.** An Environment + secret shadows a repository secret of the same name, so writers get the + write key and every other job the read key, all through one pair of names: + + ```bash + # mbx-write, readable only by jobs in the cache-write Environment + gh secret set MBX_R2_ACCESS_KEY_ID --env cache-write --repo moq-dev/moq + gh secret set MBX_R2_SECRET_ACCESS_KEY --env cache-write --repo moq-dev/moq + + # mbx-read, for every other job + gh secret set MBX_R2_ACCESS_KEY_ID --repo moq-dev/moq + gh secret set MBX_R2_SECRET_ACCESS_KEY --repo moq-dev/moq + ``` + +Without the repository secrets, readers warn and build cold. A writer without +its key fails rather than publish nothing, and so does a key the bucket +refuses, in any job. + ## Rotating the signing key If the key needs to be rotated, repeat steps 3 through 5 with a new key diff --git a/infra/justfile b/infra/justfile index 513c5d6dc88..b10f26352e5 100644 --- a/infra/justfile +++ b/infra/justfile @@ -3,6 +3,7 @@ set fallback mod apt mod rpm mod moq-sh +mod mbx # Deploy all infra workers. deploy: diff --git a/infra/mbx/bun.lock b/infra/mbx/bun.lock new file mode 100644 index 00000000000..2bbe83e2bca --- /dev/null +++ b/infra/mbx/bun.lock @@ -0,0 +1,195 @@ +{ + "lockfileVersion": 2, + "configVersion": 1, + "workspaces": { + "": { + "name": "mbx-moq-dev", + "devDependencies": { + "wrangler": "^4", + }, + }, + }, + "packages": { + "@cloudflare/kv-asset-handler": ["@cloudflare/kv-asset-handler@0.5.0", "", {}, "sha512-jxQYkj8dSIzc0cD6cMMNdOc1UVjqSqu8BZdor5s8cGjW2I8BjODt/kWPVdY+u9zj3ms75Q5qaZgnxUad83+eAg=="], + + "@cloudflare/unenv-preset": ["@cloudflare/unenv-preset@2.16.2", "", { "peerDependencies": { "unenv": "2.0.0-rc.24", "workerd": ">1.20260305.0 <2.0.0-0" }, "optionalPeers": ["workerd"] }, "sha512-JBP1+Z7ZSNG/d4mRP+y8VC5dka3tZVMLEZRvS+rzQ4DGV1EoxRFQckcJTTkXbHSQiTj0DtNI01Zwb/V2fX0mvQ=="], + + "@cloudflare/workerd-darwin-64": ["@cloudflare/workerd-darwin-64@1.20261012.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-dkTL9aY3V4D40b+jBpGPCistWUPFQ/M61wlWi6i1o8MvHFFgEw7EQkcaYEv6Yd3bkPDD/3TFT4hRsMb2xVZSwQ=="], + + "@cloudflare/workerd-darwin-arm64": ["@cloudflare/workerd-darwin-arm64@1.20261012.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-2/nVGcKXjNNI+DhxKSepTKvFng9H7aN2WXv6Zu67iqgI6JrxypNt5kTPv4ZHosxrcfyKMci/2RfN7GIrN0BitQ=="], + + "@cloudflare/workerd-linux-64": ["@cloudflare/workerd-linux-64@1.20261012.1", "", { "os": "linux", "cpu": "x64" }, "sha512-uMe7ONHnLxStD1Ye0YFHBO36uj4cStv5P53rW+5GVWXFT8BRjqVixlH0IqCAHe1Pmcwyd1+7fVoGde89MZSCJg=="], + + "@cloudflare/workerd-linux-arm64": ["@cloudflare/workerd-linux-arm64@1.20261012.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-I0VMdcXk7ygG5vYDce0ePTBFdnBXC0i9WiBY5mWiv0iTinbfea6/rHqSQ7B1UMpjgrYVs9E0m4bZ9ufsk5GCFA=="], + + "@cloudflare/workerd-windows-64": ["@cloudflare/workerd-windows-64@1.20261012.1", "", { "os": "win32", "cpu": "x64" }, "sha512-c5hQvNx574UEoknaCFvMa/NdLrrYiALNbe6sx1okW8uOiRYWxrFuA8WpXFnBJ5XJypm0TEAHYaUTGv3rRLpY7Q=="], + + "@cspotcode/source-map-support": ["@cspotcode/source-map-support@0.8.1", "", { "dependencies": { "@jridgewell/trace-mapping": "0.3.9" } }, "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw=="], + + "@emnapi/runtime": ["@emnapi/runtime@1.11.3", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="], + + "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.28.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ=="], + + "@esbuild/android-arm": ["@esbuild/android-arm@0.28.2", "", { "os": "android", "cpu": "arm" }, "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg=="], + + "@esbuild/android-arm64": ["@esbuild/android-arm64@0.28.2", "", { "os": "android", "cpu": "arm64" }, "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A=="], + + "@esbuild/android-x64": ["@esbuild/android-x64@0.28.2", "", { "os": "android", "cpu": "x64" }, "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q=="], + + "@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.28.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw=="], + + "@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.28.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw=="], + + "@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.28.2", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw=="], + + "@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.28.2", "", { "os": "freebsd", "cpu": "x64" }, "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg=="], + + "@esbuild/linux-arm": ["@esbuild/linux-arm@0.28.2", "", { "os": "linux", "cpu": "arm" }, "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w=="], + + "@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.28.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug=="], + + "@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.28.2", "", { "os": "linux", "cpu": "ia32" }, "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ=="], + + "@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.28.2", "", { "os": "linux", "cpu": "none" }, "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ=="], + + "@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.28.2", "", { "os": "linux", "cpu": "none" }, "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA=="], + + "@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.28.2", "", { "os": "linux", "cpu": "ppc64" }, "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ=="], + + "@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.28.2", "", { "os": "linux", "cpu": "none" }, "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA=="], + + "@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.28.2", "", { "os": "linux", "cpu": "s390x" }, "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg=="], + + "@esbuild/linux-x64": ["@esbuild/linux-x64@0.28.2", "", { "os": "linux", "cpu": "x64" }, "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ=="], + + "@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.28.2", "", { "os": "none", "cpu": "arm64" }, "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw=="], + + "@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.28.2", "", { "os": "none", "cpu": "x64" }, "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw=="], + + "@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.28.2", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ=="], + + "@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.28.2", "", { "os": "openbsd", "cpu": "x64" }, "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw=="], + + "@esbuild/openharmony-arm64": ["@esbuild/openharmony-arm64@0.28.2", "", { "os": "none", "cpu": "arm64" }, "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q=="], + + "@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.28.2", "", { "os": "sunos", "cpu": "x64" }, "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g=="], + + "@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.28.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ=="], + + "@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.28.2", "", { "os": "win32", "cpu": "ia32" }, "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA=="], + + "@esbuild/win32-x64": ["@esbuild/win32-x64@0.28.2", "", { "os": "win32", "cpu": "x64" }, "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g=="], + + "@img/colour": ["@img/colour@1.1.0", "", {}, "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ=="], + + "@img/sharp-darwin-arm64": ["@img/sharp-darwin-arm64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.3.4" }, "os": "darwin", "cpu": "arm64" }, "sha512-QRUlFQ0WxvdWyqqG/WtI3iupfD5rBzmCHXSdPsY91sAtVtTo7Q4cb6zOccZ3gqEqkr0f1As1ehLqmEpDsRf+lg=="], + + "@img/sharp-darwin-x64": ["@img/sharp-darwin-x64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.3.4" }, "os": "darwin", "cpu": "x64" }, "sha512-+BR255RhDlpygUpOc/Jdt1nT6DQ3XG/ERo5wbcdOf5Q320dKtPCKPLR1LJs9VGXRaMa8l1uUa0tkCNOXiAxZUw=="], + + "@img/sharp-freebsd-wasm32": ["@img/sharp-freebsd-wasm32@0.35.5", "", { "dependencies": { "@img/sharp-wasm32": "0.35.5" }, "os": "freebsd" }, "sha512-Y/z91nEZ4uIBX5X3nfTovjU9lHNKFYbL2lpHCLVNmXQK03VIZvXBBt0KxbPGp2SdGSF+2mQU4e+hQaWOt86iAw=="], + + "@img/sharp-libvips-darwin-arm64": ["@img/sharp-libvips-darwin-arm64@1.3.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-5R89nBYiRdUlSWJxPhO+GVtaXzXSxKnRu/xqMn3KTA3L9EB9Oy/P+Nn2f2vlhPuUdy/Zusb2DarbyTpGCfEDuw=="], + + "@img/sharp-libvips-darwin-x64": ["@img/sharp-libvips-darwin-x64@1.3.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-iR2OKH80yi0U+dUplyh3/xdpFvps6YkCwsXenIJxqxR1v9o+xtKTGbS9H7cps+2Vxjc8B1j96p75NmTGjIhtpQ=="], + + "@img/sharp-libvips-linux-arm": ["@img/sharp-libvips-linux-arm@1.3.4", "", { "os": "linux", "cpu": "arm" }, "sha512-LmRtTsOHuvM2+wlO2Db37dx5MiZhB0FvSunciw48YjdOkZz9KAiRbm8ujeMOA1INqmei5NapFxYEK1D1ZSidmw=="], + + "@img/sharp-libvips-linux-arm64": ["@img/sharp-libvips-linux-arm64@1.3.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-Y3dgX/6lE2QhQb+Gxy0WZxfg9MEm/JBjamZpS2IklP7xIQoKN4hzAm7KcMVGtaVDt3neE9OKBC7vAfonA/Lr1A=="], + + "@img/sharp-libvips-linux-ppc64": ["@img/sharp-libvips-linux-ppc64@1.3.4", "", { "os": "linux", "cpu": "ppc64" }, "sha512-Le6boB8Tai0Nis+gIxIpKx68UDVVIqdR8Tin5Yf1z2LJJQLDJvCDRqRu+jC2qCoD+eIomonmOwB4smBRxfVpYQ=="], + + "@img/sharp-libvips-linux-riscv64": ["@img/sharp-libvips-linux-riscv64@1.3.4", "", { "os": "linux", "cpu": "none" }, "sha512-aHkkIEHPRdQEegJN20MLmGtxYD9R2wQr3Cwpddnu5+YKMt6Uzax7S9h5gpZTo8wyrGuZSlfQ63OevL5mTyOC7Q=="], + + "@img/sharp-libvips-linux-s390x": ["@img/sharp-libvips-linux-s390x@1.3.4", "", { "os": "linux", "cpu": "s390x" }, "sha512-ra/mB6MikESDUO7Yg+Mi95bFBb9GsObURuhnOv3OqknjGe9sZrG8tCe9q0xSIGrtLgvgw0gKnFWcK4blSgQOuQ=="], + + "@img/sharp-libvips-linux-x64": ["@img/sharp-libvips-linux-x64@1.3.4", "", { "os": "linux", "cpu": "x64" }, "sha512-GJ//SSXbnwSDes02umB3nDJLFcQzw8a18V8fyhqr6tV515tOEMdImjjxj1AoafMRz56F3PHgftnj1QEKSU1zkw=="], + + "@img/sharp-libvips-linuxmusl-arm64": ["@img/sharp-libvips-linuxmusl-arm64@1.3.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-hvulFwtjUcagsis6BBxHwGFwWoNZjgYmULGVrZcyfNbjA8hKILbRxGg15/7w5HDyXHXUos/j6baAWqnCyQ2DWA=="], + + "@img/sharp-libvips-linuxmusl-x64": ["@img/sharp-libvips-linuxmusl-x64@1.3.4", "", { "os": "linux", "cpu": "x64" }, "sha512-6zXKeE/p39I1AmA3cJG35eyBGNqNddLnUXjhwBnsGjFPWqf5VKkDBEqaEkPDoTEtkxwi2vv8Tcr2mDyP4So7Fg=="], + + "@img/sharp-linux-arm": ["@img/sharp-linux-arm@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm": "1.3.4" }, "os": "linux", "cpu": "arm" }, "sha512-LEaXK2WdXVK5ykcw0buWyPMsmLLL2vpHLD6yrNSW+JGEL3BZPA4tpKN6iaMc4AxTTAoaX/sU1rOL51lcIz48ZQ=="], + + "@img/sharp-linux-arm64": ["@img/sharp-linux-arm64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm64": "1.3.4" }, "os": "linux", "cpu": "arm64" }, "sha512-LYVx5JTsOM2CBzmxreh+nl64/3H6Xb09iSLknqH47z2T2DFFxDeFLP5y4dJwe6H7uGQlHPyEEtIqyo3DYsRwdQ=="], + + "@img/sharp-linux-ppc64": ["@img/sharp-linux-ppc64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-ppc64": "1.3.4" }, "os": "linux", "cpu": "ppc64" }, "sha512-QVxAAq8evVRI9ia2vqgwrmWucn5Dfv+JdWzj75pD8omHLPSP7f8p20O8jxzjCcuCEQEOtYOZUmX1hkiZ0kdevA=="], + + "@img/sharp-linux-riscv64": ["@img/sharp-linux-riscv64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-riscv64": "1.3.4" }, "os": "linux", "cpu": "none" }, "sha512-LtdreXguaavKODPIfzJ4kffx7UNt1omwtK0rch4EBbbSTXPnxWmYSayXdLJw0fJzQ97kHt1gL/yh4tvU+nCyRQ=="], + + "@img/sharp-linux-s390x": ["@img/sharp-linux-s390x@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-s390x": "1.3.4" }, "os": "linux", "cpu": "s390x" }, "sha512-UZasTOFiYzotTsGOCu42BfUzP6Tu6Do/947iRm1RsLKvlllxwGcn4RN27LibGWceix4Y+Pmw3jsnTcCQIgWjqA=="], + + "@img/sharp-linux-x64": ["@img/sharp-linux-x64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-x64": "1.3.4" }, "os": "linux", "cpu": "x64" }, "sha512-SxFtLTeJInhAA9Q836kux2vZNeOBQEx658qvbboZScr0wIARym3IcGmW7KpVD5sbVg0Ojy+udFQdayYIZyoNog=="], + + "@img/sharp-linuxmusl-arm64": ["@img/sharp-linuxmusl-arm64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-arm64": "1.3.4" }, "os": "linux", "cpu": "arm64" }, "sha512-9HbMclmI1zlNkFRs3z9/eBtDjfD0sGlrX1z6b1qwmiFY5ElDLh4BC0LPBdVp7z1DXFiKlIcznf+ZlsuZzLxQqg=="], + + "@img/sharp-linuxmusl-x64": ["@img/sharp-linuxmusl-x64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-x64": "1.3.4" }, "os": "linux", "cpu": "x64" }, "sha512-4KOphqB035HrVdqLZfCgMzzERrQkkzOwRhl4OAkRO1YCldbaFjySXMaK534Mo0V+LndnlJk+sbUyLeU0ULyD1A=="], + + "@img/sharp-wasm32": ["@img/sharp-wasm32@0.35.5", "", { "dependencies": { "@emnapi/runtime": "^1.11.3" } }, "sha512-Ptsga1su4tQx+LLF1ECS9U6nz5kmrXKo6XVbtR48Ke3ZRxxgaWBu7IDtEe1quo8hiupwm6WFqxVlXaSf7IINGQ=="], + + "@img/sharp-webcontainers-wasm32": ["@img/sharp-webcontainers-wasm32@0.35.5", "", { "dependencies": { "@img/sharp-wasm32": "0.35.5" }, "cpu": "none" }, "sha512-hfhF/FmoQyTUkA0bIKFOtw536BQSeBMe6BF6QyWlrPxT754+TFLaZ7sKKTfvvM0yJgKgaYTwnFCIZ/GuDw5SUA=="], + + "@img/sharp-win32-arm64": ["@img/sharp-win32-arm64@0.35.5", "", { "os": "win32", "cpu": "arm64" }, "sha512-X4t7g+7ZA5DKblCBEXGjUqqemj4vczING/5viFwAL8h4N3qYeyjwdCvRLHi4EdOUI+2Z7UFlp1VM+p/AuEtm6Q=="], + + "@img/sharp-win32-ia32": ["@img/sharp-win32-ia32@0.35.5", "", { "os": "win32", "cpu": "ia32" }, "sha512-5Zm82LoBc43nhwNybZlG7Y1KO//Zhsn306fQl29ZOuStHLGTo3BWL83q3cznX0poxSAMuYL1On/BHBxkBeKr6A=="], + + "@img/sharp-win32-x64": ["@img/sharp-win32-x64@0.35.5", "", { "os": "win32", "cpu": "x64" }, "sha512-x76eH0vEiHlcMQu8Y8IenntaACtddpT6W0wmXtWrnKcnKI7ME5DdgqhAD6SEWOEl1v2zDvkZDhFA9KnURwpfqg=="], + + "@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.2", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="], + + "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.6.0", "", {}, "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw=="], + + "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.9", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ=="], + + "@poppinss/colors": ["@poppinss/colors@4.1.6", "", { "dependencies": { "kleur": "^4.1.5" } }, "sha512-H9xkIdFswbS8n1d6vmRd8+c10t2Qe+rZITbbDHHkQixH5+2x1FDGmi/0K+WgWiqQFKPSlIYB7jlH6Kpfn6Fleg=="], + + "@poppinss/dumper": ["@poppinss/dumper@0.6.5", "", { "dependencies": { "@poppinss/colors": "^4.1.5", "@sindresorhus/is": "^7.0.2", "supports-color": "^10.0.0" } }, "sha512-NBdYIb90J7LfOI32dOewKI1r7wnkiH6m920puQ3qHUeZkxNkQiFnXVWoE6YtFSv6QOiPPf7ys6i+HWWecDz7sw=="], + + "@poppinss/exception": ["@poppinss/exception@1.2.3", "", {}, "sha512-dCED+QRChTVatE9ibtoaxc+WkdzOSjYTKi/+uacHWIsfodVfpsueo3+DKpgU5Px8qXjgmXkSvhXvSCz3fnP9lw=="], + + "@sindresorhus/is": ["@sindresorhus/is@7.2.0", "", {}, "sha512-P1Cz1dWaFfR4IR+U13mqqiGsLFf1KbayybWwdd2vfctdV6hDpUkgCY0nKOLLTMSoRd/jJNjtbqzf13K8DCCXQw=="], + + "@speed-highlight/core": ["@speed-highlight/core@1.2.24", "", {}, "sha512-qeW2e1l78afw8VhRPfPQ1Gjj+KU5XFQ/OFV5ti6eTa9bruO7mJyZtA4vw0ofqmA3tKCkROE9xLk3VZoeRc98nw=="], + + "blake3-wasm": ["blake3-wasm@2.1.5", "", {}, "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g=="], + + "cookie": ["cookie@1.1.1", "", {}, "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ=="], + + "detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="], + + "error-stack-parser-es": ["error-stack-parser-es@1.0.5", "", {}, "sha512-5qucVt2XcuGMcEGgWI7i+yZpmpByQ8J1lHhcL7PwqCwu9FPP3VUXzT4ltHe5i2z9dePwEHcDVOAfSnHsOlCXRA=="], + + "esbuild": ["esbuild@0.28.2", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.28.2", "@esbuild/android-arm": "0.28.2", "@esbuild/android-arm64": "0.28.2", "@esbuild/android-x64": "0.28.2", "@esbuild/darwin-arm64": "0.28.2", "@esbuild/darwin-x64": "0.28.2", "@esbuild/freebsd-arm64": "0.28.2", "@esbuild/freebsd-x64": "0.28.2", "@esbuild/linux-arm": "0.28.2", "@esbuild/linux-arm64": "0.28.2", "@esbuild/linux-ia32": "0.28.2", "@esbuild/linux-loong64": "0.28.2", "@esbuild/linux-mips64el": "0.28.2", "@esbuild/linux-ppc64": "0.28.2", "@esbuild/linux-riscv64": "0.28.2", "@esbuild/linux-s390x": "0.28.2", "@esbuild/linux-x64": "0.28.2", "@esbuild/netbsd-arm64": "0.28.2", "@esbuild/netbsd-x64": "0.28.2", "@esbuild/openbsd-arm64": "0.28.2", "@esbuild/openbsd-x64": "0.28.2", "@esbuild/openharmony-arm64": "0.28.2", "@esbuild/sunos-x64": "0.28.2", "@esbuild/win32-arm64": "0.28.2", "@esbuild/win32-ia32": "0.28.2", "@esbuild/win32-x64": "0.28.2" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA=="], + + "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], + + "kleur": ["kleur@4.1.5", "", {}, "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ=="], + + "miniflare": ["miniflare@5.20261012.0-beta", "", { "dependencies": { "@cspotcode/source-map-support": "0.8.1", "sharp": "0.35.5", "undici": "7.29.1", "workerd": "1.20261012.1", "ws": "8.21.0", "youch": "4.1.0-beta.10" } }, "sha512-Cjrs+vHHQ7krLO4HYELYpYBJBuMhcnNZD/Z5z/UcQSnFqWSQY3DhtTCFalXgI1/yO1iK+YrRKK8EYkumrEopxg=="], + + "path-to-regexp": ["path-to-regexp@6.3.0", "", {}, "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ=="], + + "pathe": ["pathe@2.0.3", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="], + + "semver": ["semver@7.8.5", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="], + + "sharp": ["sharp@0.35.5", "", { "dependencies": { "@img/colour": "^1.1.0", "detect-libc": "^2.1.2", "semver": "^7.8.5" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.35.5", "@img/sharp-darwin-x64": "0.35.5", "@img/sharp-freebsd-wasm32": "0.35.5", "@img/sharp-libvips-darwin-arm64": "1.3.4", "@img/sharp-libvips-darwin-x64": "1.3.4", "@img/sharp-libvips-linux-arm": "1.3.4", "@img/sharp-libvips-linux-arm64": "1.3.4", "@img/sharp-libvips-linux-ppc64": "1.3.4", "@img/sharp-libvips-linux-riscv64": "1.3.4", "@img/sharp-libvips-linux-s390x": "1.3.4", "@img/sharp-libvips-linux-x64": "1.3.4", "@img/sharp-libvips-linuxmusl-arm64": "1.3.4", "@img/sharp-libvips-linuxmusl-x64": "1.3.4", "@img/sharp-linux-arm": "0.35.5", "@img/sharp-linux-arm64": "0.35.5", "@img/sharp-linux-ppc64": "0.35.5", "@img/sharp-linux-riscv64": "0.35.5", "@img/sharp-linux-s390x": "0.35.5", "@img/sharp-linux-x64": "0.35.5", "@img/sharp-linuxmusl-arm64": "0.35.5", "@img/sharp-linuxmusl-x64": "0.35.5", "@img/sharp-webcontainers-wasm32": "0.35.5", "@img/sharp-win32-arm64": "0.35.5", "@img/sharp-win32-ia32": "0.35.5", "@img/sharp-win32-x64": "0.35.5" } }, "sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g=="], + + "supports-color": ["supports-color@10.2.2", "", {}, "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g=="], + + "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "undici": ["undici@7.29.1", "", {}, "sha512-RYONW2MeafgYlkVOKYKkA/Ag7BmXqgIWCa8t1m0JcxrQg9pI9lEqRhAOruOBCbAohOa/gkCF+iPi9hrgvTzu6Q=="], + + "unenv": ["unenv@2.0.0-rc.24", "", { "dependencies": { "pathe": "^2.0.3" } }, "sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw=="], + + "workerd": ["workerd@1.20261012.1", "", { "optionalDependencies": { "@cloudflare/workerd-darwin-64": "1.20261012.1", "@cloudflare/workerd-darwin-arm64": "1.20261012.1", "@cloudflare/workerd-linux-64": "1.20261012.1", "@cloudflare/workerd-linux-arm64": "1.20261012.1", "@cloudflare/workerd-windows-64": "1.20261012.1" }, "bin": { "workerd": "bin/workerd" } }, "sha512-tEHoMPsMga0seVjxfsR8Pd3f8IRqYwkq++dTUKI5Gdgj6zuSDluYwisydq+dn90SsIACwBquJUQ1nBpcOqaWTA=="], + + "wrangler": ["wrangler@4.151.0", "", { "dependencies": { "@cloudflare/kv-asset-handler": "0.5.0", "@cloudflare/unenv-preset": "2.16.2", "blake3-wasm": "2.1.5", "esbuild": "0.28.2", "miniflare": "5.20261012.0-beta", "path-to-regexp": "6.3.0", "unenv": "2.0.0-rc.24", "workerd": "1.20261012.1" }, "optionalDependencies": { "fsevents": "2.3.3" }, "peerDependencies": { "@cloudflare/workers-types": "^5.20261006.1" }, "optionalPeers": ["@cloudflare/workers-types"], "bin": { "wrangler": "bin/wrangler.js", "wrangler2": "bin/wrangler.js", "cf-wrangler": "bin/cf-wrangler.js" } }, "sha512-ra8MpzSR+ClkbGofu9S+AmAKjytS60MqSuayXKpa1CAYIzP+NIc8q6EiF55Gz5PS3lxT4qcvMuPHihCNhTPpDg=="], + + "ws": ["ws@8.21.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g=="], + + "youch": ["youch@4.1.0-beta.10", "", { "dependencies": { "@poppinss/colors": "^4.1.5", "@poppinss/dumper": "^0.6.4", "@speed-highlight/core": "^1.2.7", "cookie": "^1.0.2", "youch-core": "^0.3.3" } }, "sha512-rLfVLB4FgQneDr0dv1oddCVZmKjcJ6yX6mS4pU82Mq/Dt9a3cLZQ62pDBL4AUO+uVrCvtWz3ZFUL2HFAFJ/BXQ=="], + + "youch-core": ["youch-core@0.3.3", "", { "dependencies": { "@poppinss/exception": "^1.2.2", "error-stack-parser-es": "^1.0.5" } }, "sha512-ho7XuGjLaJ2hWHoK8yFnsUGy2Y5uDpqSTq1FkHLK4/oqKtyUU1AFbOOxY4IpC9f0fTLjwYbslUz0Po5BpD1wrA=="], + } +} diff --git a/infra/mbx/justfile b/infra/mbx/justfile new file mode 100644 index 00000000000..dfd6c894b64 --- /dev/null +++ b/infra/mbx/justfile @@ -0,0 +1,15 @@ +set fallback + +# No Worker config names the account here, so wrangler would ask. +export CLOUDFLARE_ACCOUNT_ID := "dd618f5dbd5da77b8296f1613c301f5c" + +# Create the mbx-moq-dev R2 bucket and apply its lifecycle rules. Run once. +create: + bun install --frozen-lockfile + bun wrangler r2 bucket create mbx-moq-dev + just lifecycle + +# Replace the bucket's lifecycle rules with lifecycle.json. +lifecycle: + bun install --frozen-lockfile + bun wrangler r2 bucket lifecycle set mbx-moq-dev --file lifecycle.json --force diff --git a/infra/mbx/lifecycle.json b/infra/mbx/lifecycle.json new file mode 100644 index 00000000000..bd974fc6e88 --- /dev/null +++ b/infra/mbx/lifecycle.json @@ -0,0 +1,11 @@ +{ + "rules": [ + { + "id": "expire", + "enabled": true, + "conditions": { "prefix": "" }, + "deleteObjectsTransition": { "condition": { "type": "Age", "maxAge": 2592000 } }, + "abortMultipartUploadsTransition": { "condition": { "type": "Age", "maxAge": 86400 } } + } + ] +} diff --git a/infra/mbx/package.json b/infra/mbx/package.json new file mode 100644 index 00000000000..ff24f994ed1 --- /dev/null +++ b/infra/mbx/package.json @@ -0,0 +1,7 @@ +{ + "name": "mbx-moq-dev", + "private": true, + "devDependencies": { + "wrangler": "^4" + } +} diff --git a/quest/m0/ci/README.md b/quest/m0/ci/README.md index b1463f621d4..6797954bca9 100644 --- a/quest/m0/ci/README.md +++ b/quest/m0/ci/README.md @@ -30,13 +30,6 @@ dry run on PRs (five macOS builds per run). On Linux the PR Check and Test jobs and the `cache.yml` warm dominate. A branch's PR Check runs a median 2 and a p90 5 times before it merges. -`cache.yml` has not published since 2026-10-11: its save step only runs when -the warm's `just ci check --all` and `just ci test --all` pass, and a -formatting slip and a flaky test on `main` blocked it. OBS on a `main` push -also saved into the same shared key space, so PRs restored its sliver of the -workspace. #5428 lets the warm save regardless and stops OBS saving; a -compile-only warm can follow if the warm's runtime matters. - Decisions (maintainer, 2026-10-13): - macOS and Windows run in the merge queue, not on every PR push. The fast @@ -51,6 +44,9 @@ Decisions (maintainer, 2026-10-13): signing key), so a pull request job cannot read them even from the same repository. Fork PRs get no secrets and run uncached. +- Decided 2026-10-19: the merge queue is trusted like `main`, since a queued + PR is about to land. Rust cache writers are the jobs on `main` and in its + queue, and no separate warm rebuilds what landed. - Self-hosted CI is dropped: hosted runners plus the R2 caches replace the spare-desktop runner, its cache server, and the cache release it waited on. Reopened 2026-10-19, conditionally: [faster runners](/quest/m0/ci/runners.md) @@ -83,7 +79,7 @@ The historical samples locate candidates; they are not controlled benchmarks. - [CI pipeline audit](/quest/m0/ci/audit.md) - every queue and nightly job earns its minutes, and the Rust cache reuses unchanged crates - [Pin Quest's gate](/quest/m0/ci/quest-gate-pin.md) - make shared command admission available - [Share local check capacity](/quest/m0/ci/local-gate.md) - gate expensive phases and bound internal fanout -- [mbx on R2](/quest/m0/ci/mbx-r2.md) - Rust builds on every OS read an R2 cache that only `main` writes, escaping the 10 GB Actions cache +- [Verify the R2 Rust cache](/quest/m0/ci/mbx-r2-verify.md) - condition: the maintainer bootstrap; then measure hits, restore time, and expiry - [Nix cache](/quest/m0/ci/nix-cache.md) - `nix.moq.dev` on R2 replaces Cachix for CI and releases - [First shared FFI release](/quest/m0/ci/nightly-ffi-reuse.md) - condition: the first `moq-ffi-v*` tag that runs `Release FFI`, and a `Shipping sizes` run; verify the wrappers and size keys - [Faster runners](/quest/m0/ci/runners.md) - pick hosted, Blacksmith or the NixOS desktop from measurements of the optimized queue diff --git a/quest/m0/ci/audit.md b/quest/m0/ci/audit.md index 3d40708ea03..5783f68f926 100644 --- a/quest/m0/ci/audit.md +++ b/quest/m0/ci/audit.md @@ -11,8 +11,9 @@ recurring [test cost audit](/quest/m0/audit-test-cost.md). ## Plan Decided 2026-10-19: a one-time m0 audit, separate from the recurring test cost -audit. It also owns the cache fixes; storage still moves to R2 in -[mbx on R2](/quest/m0/ci/mbx-r2.md). +audit. It also owns the cache fixes. Storage moved to R2, written by the +merge queue and `main`; [Verify the R2 Rust cache](/quest/m0/ci/mbx-r2-verify.md) +measures it. Measured 2026-10-19 (ubuntu-24.04-arm; sample of 20 PR and 20 queue runs of check.yml, plus 35 wider runs). Start from these levers and re-measure each @@ -28,10 +29,11 @@ before and after: 41% of Rust jobs ran cold. Key on what restored artifacts actually depend on: the toolchain's and the native libraries' store paths. Build scripts link against those paths, which is why the key covers the flake today. + The R2 cache has no key of ours: mbx keys each compilation itself. - **Cold warm timeout:** a cold `cache.yml` warm takes 58 to 60 minutes against `timeout-minutes: 60`. On 10-19, two of three were cancelled while - saving, so cold windows lasted up to 3.5 hours. Split the warm or let it - finish. + saving, so cold windows lasted up to 3.5 hours. The R2 cache drops the + warm: the merge queue publishes what it builds. - **Workspace crates rebuild on a hit:** 76 workspace units recompile in Test and 112 in Check even when the cache hits, and mbx's object store reports 0 hits in 914 of 960 sessions. The likely cause is that checkout resets file diff --git a/quest/m0/ci/mbx-r2-verify.md b/quest/m0/ci/mbx-r2-verify.md new file mode 100644 index 00000000000..65a8bc6084d --- /dev/null +++ b/quest/m0/ci/mbx-r2-verify.md @@ -0,0 +1,30 @@ +# [S] Verify the R2 Rust cache + +## Goal + +Condition: the `mbx-moq-dev` bootstrap in `infra/README.md` is complete, +including the `cache-write` Environment's `gh-readonly-queue/main/*` branch +policy, and the merge queue has merged Rust changes since. Check it with +`gh run list --workflow check.yml --event merge_group`. + +Then confirm the cache earns its keep, and record the numbers in the PR that +closes this: + +- Each merge queue and `main` job's `Check the cache` step reports + `effective read-write`, and a release pull request's reports + `effective read-only`. +- The merge queue's Check and Test show mbx remote hits for code the queued + pull request did not touch, and Nightly's macOS and Windows jobs hit what + the previous Nightly wrote. +- Restore plus build time against the 150-210s Actions restore of the ~6 GB + store it replaced, from the same diff before and after. +- Each object expires 30 days after upload, and the queue builds only what + its diff selects, so an expired crate stays cold until a queue or `main` + job builds it again. Count how often a queue entry pays that rebuild. +- Bucket size and request counts after a month, against the 30-day expiry in + `infra/mbx/lifecycle.json`. Shorten or lengthen it from that. + +## Related + +- [Require the release gates](/quest/m0/ci/release-gates.md) - the macOS and Windows jobs this cache serves +- [Nix cache](/quest/m0/ci/nix-cache.md) - the same R2 and Environment bootstrap for Nix diff --git a/quest/m0/ci/mbx-r2.md b/quest/m0/ci/mbx-r2.md deleted file mode 100644 index cdb26b3fc54..00000000000 --- a/quest/m0/ci/mbx-r2.md +++ /dev/null @@ -1,34 +0,0 @@ -# [M] mbx caches Rust builds in R2 - -## Goal - -Every Rust CI job on Linux, macOS, and Windows restores compilation artifacts -from an R2 bucket instead of the Actions cache, so the 10 GB repository -budget no longer decides which jobs get a cache. Only workflows running on -`main` can write; pull requests and the merge queue read. - -## Plan - -- mbx supports `s3://` remotes with an R2 endpoint, needs no server, and - already narrows itself to read-only outside protected-branch pushes. That - client check is a convenience, not the boundary: the write key lives only - in a GitHub Environment (e.g. `cache-write`) whose deployment branch policy - allows `main`, so a same-repo PR cannot read it. A read-only key is a plain - repo secret; fork PRs get neither and build cold. -- A private bucket, separate from the public Nix cache bucket. Namespaces per - OS and architecture; expire old objects with an R2 lifecycle rule rather - than a cleanup job. -- The pinned mbx (1.10.0) is well behind upstream; check which version the - R2 backend and its read-only enforcement need. -- The bucket, lifecycle rule, and keys follow the apt/rpm bootstrap in - `infra/README.md`: checked in where wrangler allows, commands documented - where it does not. Creating them and the Environment are maintainer - actions; ask before running each. -- Once R2 serves Linux, retire the Actions-cache path and the per-workflow - Swatinem caches (Swift) rather than run both. -- Measure restore time against the 150-210s Actions restore of the ~6 GB - store; R2 transfers only the objects a build misses, so it may be faster. - -## Related - -- [Release gates](/quest/m0/ci/release-gates.md) - the macOS and Windows jobs this gives a cache diff --git a/quest/m0/ci/nix-cache.md b/quest/m0/ci/nix-cache.md index 0bac88b63a3..f2fddf82333 100644 --- a/quest/m0/ci/nix-cache.md +++ b/quest/m0/ci/nix-cache.md @@ -17,7 +17,7 @@ and push. trust boundary. Keep it and the bucket key in GitHub Environments that `main` and the release tags can deploy from, and nothing else. Release tags are unprotected today (no tag ruleset), so restricting who can create them - comes first; a separate release Environment from the mbx one is fine. A + comes first; a separate release Environment from mbx's `cache-write` is fine. A leaked bucket key cannot make a client accept a path. - Serve the bucket like apt and rpm: a Worker in `infra/nix` with a checked-in `wrangler.jsonc` and custom domain, cache headers suited to `.narinfo` @@ -38,4 +38,4 @@ and push. ## Related -- [mbx on R2](/quest/m0/ci/mbx-r2.md) - shares the Environment and bootstrap pattern, not the bucket +- [Verify the R2 Rust cache](/quest/m0/ci/mbx-r2-verify.md) - the mbx bucket's bootstrap in `infra/README.md` is the pattern; share it, not the bucket diff --git a/quest/m0/ci/one-pass.md b/quest/m0/ci/one-pass.md index ce77b4cdc99..896dbf21137 100644 --- a/quest/m0/ci/one-pass.md +++ b/quest/m0/ci/one-pass.md @@ -23,9 +23,9 @@ its own artifact: - docs, wasm clippy, uring-check, the `wasm-release` build, and the py and kt binding builds. -cache.yml runs both halves in one job, and its Test step takes as long as a -standalone Test, so folding them as they are would only add the two times -together. +The `cache.yml` warm ran both halves in one job, and its Test step took as +long as a standalone Test, so folding them as they are would only add the +two times together. Decisions (maintainer, 2026-10-19): shrink Check, then fold it. diff --git a/quest/m0/ci/runners.md b/quest/m0/ci/runners.md index e480904e82d..f3bfb9d3a4c 100644 --- a/quest/m0/ci/runners.md +++ b/quest/m0/ci/runners.md @@ -31,4 +31,4 @@ against the new baseline. - [One CI pass](/quest/m0/ci/one-pass.md) - the job to benchmark - [CI pipeline audit](/quest/m0/ci/audit.md) - removes the waste first -- [mbx on R2](/quest/m0/ci/mbx-r2.md) - the hosted baseline's cache +- [Verify the R2 Rust cache](/quest/m0/ci/mbx-r2-verify.md) - the hosted baseline's cache