|
| 1 | +--- |
| 2 | +name: qualify-oliphaunt-change |
| 3 | +description: Select, run, and diagnose Oliphaunt local and GitHub CI qualification for code, package, extension, SDK, policy, workflow, or release changes. Use before merge/release, when checks are slow or duplicated, or when an exact commit must be proven publishable. |
| 4 | +--- |
| 5 | + |
| 6 | +# Qualify Oliphaunt Change |
| 7 | + |
| 8 | +Use the repository graph to select work, but require the full exact-SHA gate for releases. |
| 9 | + |
| 10 | +## Local feedback |
| 11 | + |
| 12 | +1. Inspect the diff and ask Moon for affected projects/tasks. Do not infer affected products from directory names alone. |
| 13 | +2. Run formatting/static checks and focused unit/package tests first. Run expensive producer/E2E lanes only when their inputs or release contract changed. |
| 14 | +3. If the diff intentionally changes WASIX binary-semantic inputs (source pins, |
| 15 | + patches, build recipes, the WASIX toolchain, or producer code), refresh the |
| 16 | + committed fingerprint before qualification with |
| 17 | + `cargo run -p xtask -- assets input-fingerprint --write`. Do not refresh it |
| 18 | + for version, changelog, package-description, smoke-expectation, or |
| 19 | + target-envelope-only changes. See `docs/maintainers/assets.md`. |
| 20 | +4. For any release, package identity, workflow, version, or extension change, run: |
| 21 | + |
| 22 | +```sh |
| 23 | +tools/dev/bun.sh tools/release/release-check.mjs |
| 24 | +cargo run -p xtask -- assets verify-committed |
| 25 | +tools/dev/bun.sh src/extensions/tools/check-extension-model.mjs --check |
| 26 | +``` |
| 27 | + |
| 28 | +The canonical `release-check` runs the live repository-structure and uncached |
| 29 | +repository-graph policies before release metadata and mutation tests. Its |
| 30 | +uncached `release-tools:check` Moon task is the single hosted graph-validation |
| 31 | +owner; `graph-tools:check` remains a focused local target and |
| 32 | +`graph-tools:generate` is the sole writer of `target/graph`. Do not substitute |
| 33 | +the policy unit tests: they prove the classifiers but do not scan the candidate |
| 34 | +tree. |
| 35 | + |
| 36 | +For source-acquisition policy or a source `mirror_url`, run |
| 37 | +`tools/dev/bun.sh test tools/policy/source-fetch-core.test.mjs` and |
| 38 | +`tools/dev/bun.sh tools/policy/fetch-sources.mjs all --validate-only`. Prove a |
| 39 | +new endpoint with a live exact-commit fetch, but keep reachability out of the |
| 40 | +deterministic unit gate. Qualification must show bounded canonical-to-mirror |
| 41 | +failover, exact-pin rejection, canonical durable origin, and transactional |
| 42 | +preservation of an existing checkout when every endpoint fails. |
| 43 | + |
| 44 | +5. For any workflow or local-action change, run |
| 45 | + `bash tools/policy/check-workflows.sh` before waiting for CI. This is the |
| 46 | + repository's exact pinned `actionlint` plus `zizmor` gate and its workflow |
| 47 | + behavior tests; running `actionlint` alone is not sufficient. If the direct |
| 48 | + release job graph, job permissions, protected environment, dispatch input, |
| 49 | + or continuation dependency changed, also push the exact candidate to a |
| 50 | + disposable branch and dispatch one supported `publish-dry-run` compiler |
| 51 | + probe. Require GitHub to materialize the direct job graph, then cancel it |
| 52 | + before expensive qualification and delete the probe branch. The local gate |
| 53 | + cannot prove hosted environment-secret resolution or dispatch-time graph |
| 54 | + compilation. |
| 55 | + When a release workflow shell block or a shell script transitively reached by |
| 56 | + `release-check` changes, run the complete gate with GNU Bash 3.2, matching |
| 57 | + `/bin/bash` on the `macos-26` release runner. On macOS, omit the override; |
| 58 | + elsewhere, point `OLIPHAUNT_BASH3` at a maintained local Bash 3.2 build: |
| 59 | + |
| 60 | + ```sh |
| 61 | + bash3="${OLIPHAUNT_BASH3:-/bin/bash}" |
| 62 | + case "$bash3" in |
| 63 | + /*) ;; |
| 64 | + */*) bash3="$(cd "$(dirname "$bash3")" && pwd -P)/$(basename "$bash3")" ;; |
| 65 | + *) bash3="$(command -v "$bash3")" ;; |
| 66 | + esac |
| 67 | + "$bash3" -c '((BASH_VERSINFO[0] == 3 && BASH_VERSINFO[1] == 2))' |
| 68 | + PATH="$(dirname "$bash3"):$PATH" \ |
| 69 | + OLIPHAUNT_TEST_BASH="$bash3" \ |
| 70 | + "$bash3" tools/dev/bun.sh tools/release/release-check.mjs |
| 71 | + ``` |
| 72 | + |
| 73 | + This behavioral gate is authoritative for Bash 3.2 `set -u` empty-array |
| 74 | + semantics; a syntax check or a source-pattern check is not a substitute. |
| 75 | +6. Declare runner capabilities on the narrowest Moon task that needs them. Use |
| 76 | + `ci-rust` for Cargo, rustc, rustfmt, or another Rust-toolchain command; |
| 77 | + `ci-maintainer-tools` for the pinned tools installed by |
| 78 | + `tools/dev/bootstrap-tools.sh`; and `ci-android-sdk` for Android SDK work. |
| 79 | + Capabilities propagate through task dependencies. The planner keeps |
| 80 | + capability-bearing checks dedicated and combines only compatible static |
| 81 | + checks into bounded shards. |
| 82 | +7. Treat a hosted runner-image pin as a toolchain dependency. Never introduce a mutable `*-latest` alias; after changing an explicit runner pin, inspect the image delta and run the platform binary contract for every affected release target. |
| 83 | + |
| 84 | +For a WASIX Docker, APT snapshot, or bootstrap trust change, also run the |
| 85 | +product-owned fault test and source verifier before the expensive build: |
| 86 | + |
| 87 | +```sh |
| 88 | +bash src/runtimes/liboliphaunt/wasix/assets/build/docker/install-pinned-apt-packages.test.sh |
| 89 | +tools/dev/bun.sh tools/policy/fetch-sources.mjs wasix-runtime --verify-only |
| 90 | +cargo run -p xtask -- assets source-spine --strict-local |
| 91 | +``` |
| 92 | + |
| 93 | +Then build the pinned Dockerfile from a clean builder context. Require a |
| 94 | +successful TLS-verified snapshot transaction and the exact declared wasixcc, |
| 95 | +Clang, and Binaryen versions; a source-spine/static check alone does not prove |
| 96 | +that the pinned trust chain still reaches the snapshot service. |
| 97 | + |
| 98 | +For an SDK change, run `moon run sdk-contracts:check`, then run every affected |
| 99 | +SDK's `package` target in one Moon invocation. SDK package targets own their |
| 100 | +same-project `check` and `test` dependencies, so this is the compact product |
| 101 | +gate without the platform artifact or E2E matrix. Set `MOON_BASE` and |
| 102 | +`MOON_HEAD`, then select SDK project IDs with |
| 103 | +`moon query projects --affected --downstream deep --tags sdk --tasks package`. |
| 104 | +Pass the exact `<project>:package` targets to `moon run`; a workspace-wide |
| 105 | +`:package` selector also selects non-SDK products and is not this lane. Confirm |
| 106 | +ownership with |
| 107 | +`moon query tasks --project <sdk-project> --id package` when changing task |
| 108 | +topology. Never replace the product task with a narrower native command: for |
| 109 | +example, `cargo test -p oliphaunt --lib` excludes Rust executable tests under |
| 110 | +`src/bin/**`, while `moon run oliphaunt-rust:test` includes the library, |
| 111 | +executable, integration, build-crate, and documentation tests. Add |
| 112 | +`release-check` when package or registry behavior changes, and run |
| 113 | +`moon run extension-model:check` when an extension catalog or generated SDK |
| 114 | +extension surface changes. Put new guarantees in a parsed schema/generated |
| 115 | +contract, clean-consumer package check, or product-owned behavioral test. Do |
| 116 | +not qualify SDK behavior by grepping prose, test names, or |
| 117 | +implementation-source spellings. |
| 118 | + |
| 119 | +Advisory cleanup is not qualification. Use |
| 120 | +`moon run dev-tools:helper-reference-audit` or |
| 121 | +`moon run dev-tools:source-reference-audit` when intentionally looking for |
| 122 | +possibly unreferenced helpers or modules, then inspect each result before |
| 123 | +removing it. Do not turn reference counts into a required CI gate. |
| 124 | + |
| 125 | +## GitHub qualification |
| 126 | + |
| 127 | +- Identify runs by workflow plus exact `headSha`; never accept “latest successful on branch.” |
| 128 | +- The release prerequisite is the non-cancelled `Qualified` gate for that SHA, including required checks, builds, policy, tests, and selected E2E. |
| 129 | +- When WASIX or an extension is selected, require the same-run full lifecycle evidence artifact. It must cover every promoted extension in direct, server, restart, materialization, and dump/restore modes and satisfy `--require-current-evidence` for the candidate source digest. |
| 130 | +- Ensure artifact attestations and the publication lock reference the same SHA/tree. |
| 131 | +- Require artifact evidence for the compatibility floors in |
| 132 | + `docs/maintainers/release.md`: inspect Mach-O load commands, Android API/ELF |
| 133 | + metadata, and Linux ELF symbol versions rather than inferring support from a |
| 134 | + runner or package label. |
| 135 | +- Do not rerun duplicate downstream E2E workflows when the same evidence is already part of the required gate. |
| 136 | +- On failure, inspect the failing job log and earliest causal error. Fix the cause, push a new SHA, and restart qualification; do not reuse artifacts from the failed SHA. |
| 137 | + |
| 138 | +## Report |
| 139 | + |
| 140 | +List commands and outcomes, skipped lanes with reasons, exact GitHub run/SHA, required gate state, produced artifact/lock evidence, WASIX lifecycle evidence when selected, and residual platform gaps. “Green CI” without exact-SHA and gate names is not release evidence. |
0 commit comments