/pulp:ci runs instead · from pulp
Validates branches and ships code for Pulp CI workflows. Handles PR creation, merging, local/cloud CI, and status checks.
This skill never runs in Claude Code
It ships in pulp at .agents/, but /pulp:ci (a command, or a skill Claude Code finds first) has the same name: typing it, or Claude choosing it, runs that one instead.
Validate branches and ship code safely. This skill handles all CI workflows for Pulp across local machines and VMs.
The hosted drift-fast workflow is a required status check. It selects the
historical GPU-probe acceptance test from a depth-2 checkout. Keep its bounded
hydrate_gpu_provenance_commits.py step after checkout and before configure;
removing it produces a deterministic shallow-history failure unrelated to the
source change.
Docs-only pull requests take a fast path that still reports every required
context: CodeQL does not run (paths-ignore), drift-fast runs only its
readers from source, and the source selftests run only the entries that can
read the change. The class comes from classify_changes.impact_class; never
add paths/paths-ignore or a job-level if: to a required workflow to get
the same effect, and never extend drift_fast.json's prose_not_readers
without a reviewed reason. See docs/guides/local-ci.md "Impact-scoped jobs".
Every step below exists because skipping it cost a CI round trip (20-40 min) on a real PR. Do them in order.
Run tools/scripts/gates.sh origin/main before every push. It runs the
offline gates CI runs, including both halves of the required Vellum freeze
check, over the merge-base range. On a host that carries the required gate
VMs it refuses its heavy half. tools/scripts/gate_host_policy.sh reads
tartci host-profile, not the hostname: when TARTCI_SERVES_GATE=1 and
TARTCI_ROLE is anything but light (today m3 dedicated-builder, m5 and
m5s dev-overflow), gates.sh compiles nothing and runs no diff-coverage.
The build-free Python lanes (source-only selftests, workflow-lint, pr-fast,
ctest-registered Python, and the sync job's fixture tests) still run there, at
nice -n 19 and background QoS (taskpolicy -b), at most two suites at a time
(one when PULP_BUILD_JOBS=1), each lane under a wall-time cap
(PULP_GATES_GATE_HOST_CAP_S, default 600 s, via run_capped.py; the cap holds
if the wrapper is killed, and a descendant that ignores TERM is SIGKILLed).
Suites that configure or compile something (--no-compile: test_object_deps,
test_ccache_pch_isolation, test_check_installed_rpaths,
test_vellum_sdk_consumer) are listed NOT CHECKED there. This is a priority
bound, not a tartci lease: unlike the configure-only lane these lanes take no
share, and a suite may still fan out its own processes. A lane that hits the
cap is NOT CHECKED unless its log already shows a failure, in which case the
gate fails. A cap during the base re-run leaves no .source-selftests-base-*
worktree behind.
PULP_GATES_GATE_HOST_PYTHON=0 restores the old refusal. The generated-manifest lane keeps the one allowance
the policy names (pulp_gate_host_configure_only_allowance): a
configure-only tree in a temporary build-configure-only.* directory under
the worktree, governed as one background core (governed-build.sh,
PULP_BUILD_CLASS=background PULP_BUILD_JOBS=1, nice 10), refused if it
leaves a .ninja_log or a target object, and removed when the lane ends
(tools/scripts/configure_only.py). PULP_GATES_NO_CONFIGURE=1 still keeps
it build-free; its families prediction can still fail.
The refused heavy half is listed as NOT CHECKED, so the verdict reads "not a
full pass" rather than "safe to push". The cheap gates still run.
Before any gate runs, gates_preflight.py checks every prerequisite once and
prints one list with the exact fix command for each: a shallow clone
(git fetch --unshallow), the pulp-gpu-ledger merge driver and hooks path
(set for this worktree only: git config extensions.worktreeConfig true, then
git config --worktree ...; install-githooks.sh sets them for every worktree
of the clone), the VST3 and AU SDKs the committed census records for this
platform (./setup.sh --deps-only), the jsx-runtime packages (npm ci), and a
build dir with no CMake file-API reply. Only the first two always apply; the
SDK, package and file-API checks block only when the diff reaches a lane that
configures a build (generated manifests, families, census) and are otherwise
printed as notes, so a docs-only diff in a fresh worktree is not stopped.
gates.sh --bootstrap performs the blocking ones (setup.sh and npm ci at
nice 10, npm cache under the git dir or npm_config_cache, a configure-only
rerun of your existing build dir for the file-API reply, announced first, and never on a
host that serves the required gate, where it only prints a note) and
continues. A Vellum-enabled build dir (PULP_ENABLE_PULP_VELLUM*,
PULP_ENABLE_RMLUI_ADAPTER ON) is never chosen as the gate build dir, so it
stays where it is and the gates use build/ or configure build-gate; naming
one in PULP_GATES_BUILD_DIR is a blocking finding. PULP_GATES_SKIP_PREFLIGHT=1 skips it and lists it NOT CHECKED.
When a gate fails, the final summary names every failed gate in a comma-separated
gates: failed: line before the remediation advice.
Two lanes read their commands from the CI jobs themselves, so a step added
there reaches gates.sh with no edit: the required Enforce version & skill sync job's python3 <script> commands that gates.sh has no block for
(docs-sync, screenshot-sync, release-tag report, CLI/MCP parity, source
contracts, the gate-script fixture tests) run from
source_selftests.py run --sync-job, and the drift-fast job's selection
(tools/ci/drift_fast.json) runs from --drift-fast. On a gate host both run
under the cap described above.
tools/ci/sync_job_parity.json names what gates.sh runs itself, and
tools/scripts/test_gates_sync_parity.py fails when the workflow and
gates.sh disagree.
The pre-push hook and local_diff_cover.sh (exit 4) refuse the
diff-coverage build the same way, and the hook ends "gates clean except
diff coverage: NOT CHECKED". Run the full set on m1 (light) or a
disposable VM.
The policy fails closed:
~/.local/bin;host-profile fails, or that prints no
TARTCI_SERVES_GATE, counts as a gate host;Every fleet host reports TARTCI_SERVES_GATE=1, so that field alone would
refuse m1 too. PULP_TARTCI_BIN is a test hook that names a fake profile.
Do not point it at a fake light profile to dodge the refusal. The gate run
covers:
watch events — a range touching a watched capability-family path
without a committed .github/vellum-expansion-watch-events/ event FAILS
(exit 10) and prints the exact JSON; or run
python3 tools/scripts/vellum_watch_preflight.py --write-event --rationale "...".
foundation include lint — foundation_include_lint.py fails when a
file under core/platform, core/runtime or core/simd includes an
upper-layer pulp/<area>/ header or a quoted relative path that resolves
outside those roots (it resolves through the foundation include dirs, the
way the compiler does). Put the code in the owning subsystem instead of
allowlisting it; a stale allowlist entry also fails.
core -> Vellum direction — core_vellum_direction.py fails when a
file under core/ includes a vellum/ header (any spelling, including a
relative path through a vellum/ directory) or a CMake file under core/
names find_package(Vellum, a Vellum::/vellum:: target, or fetches or
adds a Vellum tree. Pulp core knows nothing about Vellum; the connection
belongs in an integration package. Nothing is allowlisted. gpu-runtime
(VellumGpuRuntime::*, fetched by tools/cmake/PulpGpuRuntime.cmake) is
the neutral device layer, not a Vellum edge: it depends on neither repo,
and its target names do not match the check. Its source half is
include_boundary.py --boundary core-vellum.
legacy platform hosts guard — legacy_platform_hosts_guard.py fails
when code outside integrations/legacy-platform-hosts/ includes a
quarantined Windows, Linux, iOS, Android or web host header (by its
pulp/view/... spelling or a path into the host directory), names a host
file or directory in a CMake argument, or links a target a quarantine
CMake file defines. The host directories count at both their original
core/ paths and their quarantine paths. Today's edges are allowlisted
per (file, platform, kind) with an exact count, so a new reference, or a
removed one whose row stayed, fails. --report lists every edge. Do not
grow the allowlist for new code: port it to Vellum instead.
The path filters of android.yml and web-plugins.yml list the
quarantine directories of the hosts they build, so moving a host keeps
its workflow trigger.
change events (vellum_freeze_check.py) — a range touching a path in
a transferred slice of .github/vellum-ownership.json (e.g.
core/view/src/pointer_dispatch.cpp in retained-ui-kernel) without a
committed .github/vellum-change-events/ event FAILS (exit 12) and prints
the JSON (disposition pulp-only, suggested tests); or run
python3 tools/scripts/vellum_watch_preflight.py --write-change-event --rationale "...".
One edit can owe BOTH events. A committed event whose rationale is still
the <REPLACE: ...> placeholder also fails here, because CI accepts it.
node ABI virtual order (node_abi_gate.py) — the append-only check
covers Processor, PluginSlot, and the experimental GpuAudioNode
surface. New GPU-audio virtual hooks belong at the end of that class;
inserting one in the middle shifts existing slots even though the SDK
remains source-rebuild oriented. The gate reads
PULP_FORMAT_LEGACY_VIEW_NAME(x) in processor.hpp as x (the reserved
names a UI-free SDK gives the view hooks) and expands no other macro, so
a renamed spelling of an existing slot passes and a changed signature
inside the macro still fails. The editor-host interfaces (Editor,
EditorContext, EditorFactory, NativeSurfaceHost) are checked under a
stricter FROZEN policy: an appended virtual fails too, because a UI
package and a format adapter are separate prebuilt binaries. Don't "fix"
the failure by appending at the tail. Ship the capability as a new
query_extension() id. A Node-ABI-Break: <Class> trailer exists for a
deliberate break, but on these classes it breaks every prebuilt peer.
Commit the event(s) before re-running — both checkers read the commit
range, never the working tree. Run python3 tools/scripts/vellum_watch_preflight.py --enforce
on its own for just the Vellum verdict.
A new integrations/pulp-vellum-* package is built and tested by the
Vellum SDK consumer lane only: add its directory to that workflow's
paths: list and its PULP_ENABLE_* flag to the bridge configure line, and
give its ctest targets a label that starts with pulp-vellum so
labelled-targets selects them. Any new TU that includes a tracked core
header (for example pulp/host/signal_graph.hpp) trips the header fan-out
guard; the package needs a Fanout-Grow: all reason="..." trailer naming
the legacy TU it replaces.
Know the required contexts, and only those. They come from branch protection, not from the check list on the PR page:
shipyard landability --repo Generous-Corp/pulp # prints "required contexts (branch_protection): ..."
shipyard landability --repo Generous-Corp/pulp --pr <N> # was each gate actually requested for this PR?
As of 2026-10-02: macos, Enforce version & skill sync, Vellum freeze,
Vellum trusted freeze, Build + prove + (owner-gated) deploy,
drift-fast. release-configure reports on every pull request but is
not required until a follow-up registers it (decision 33). Everything else (Workflow lint, CodeQL, Linux, Windows,
coverage) is advisory — red there does not stop auto-merge.
A red release-configure means a tag cut from this change would publish
nothing. It replays release-cli.yml's own configure for every release
leg (darwin-x64 cross-configured on hosted Apple Silicon, Linux, Windows) on
hosted runners. Read the Release <platform> configure fails annotation for
the CMake error, and reproduce with
python3 tools/ci/release_configure_matrix.py run --platform <platform> on
a matching host. Never "fix" it by renaming or skipping a release-cli.yml
step: renaming a build-cli step, or adding an unclassified one, fails the
gate's self-test until tools/ci/release_configure_matrix.py classifies it
(replayed, mirrored or skipped with a reason). See docs/guides/local-ci.md
§ release-configure.
Release jobs and long release steps carry derived timeout-minutes.
tools/ci/release_step_timeouts.json holds max(floor, 4 x p95) of each
step's slowest leg over recent successful Release CLI runs, and
release_step_timeouts.py check (workflow-lint) fails a release job with no
timeout or a long step without its recorded value. When a long step is
renamed or a release step gets slower, re-run
release_step_timeouts.py derive and update the policy and workflow
together; do not hand-raise one number. A timed-out leg is re-run once by
the release reconciler (rerun-failed-jobs), so a hang no longer waits for
the drought alarm. See docs/guides/release-watchdog.md.
Open with shipyard pr and leave auto-merge armed. Before you start,
shipyard ship-state list shows whether someone is already landing it.
Read mergeStateStatus correctly:
| State | Means | Do |
|---|---|---|
CLEAN | mergeable, all checks green | nothing; the queue takes it |
UNSTABLE | mergeable; a non-required check is failing or pending | nothing. Auto-merge still fires. Check whether that check is also red on main before "fixing" it on your branch |
BLOCKED | a required context is missing, pending, or failing (or a review is owed) | find which required context; shipyard landability --pr <N> tells absent from unschedulable |
BEHIND | base moved under strict | if auto-merge is armed the merge queue does the update itself — check the queue before touching it |
DIRTY | real conflict | merge origin/main and resolve; never --force |
Do not merge main into a BEHIND branch the queue owns. With
auto-merge armed, BEHIND usually means QUEUED, and a queued branch rejects
pushes (GH006 ... Branches that are queued for merging cannot be updated). Read the queue first:
ghapp api graphql -f query='{repository(owner:"Generous-Corp",name:"pulp"){mergeQueue(branch:"main"){entries(first:20){nodes{position state pullRequest{number}}}}}}'
Every manual merge of main also restarts the PR-head macos run for
nothing: the merge group validates the combined tree anyway.
A red check that your diff cannot have caused is probably main.
Reproduce it on origin/main (see "Is main itself broken?") before
debugging your branch.
Wait with one blocking command, then prove the merge by git ancestry:
shipyard wait pr <N> --state merged, then
git fetch origin main -q && git merge-base --is-ancestor <merge-sha> origin/main.
A wait exit code is not merge proof.
The PR route of version-at-land keeps the standing bump description aligned
with its commit. It compares the complete normalized body, filters the bump
branch to this repository's head owner, and emits an Actions error plus a
failing status when the description GET or PATCH fails; the next drain retries
the reconciliation.
run: step stops at the first failing commandGitHub's default shell for run: is bash -e {0} (no pipefail), so a step
stops at a failing command even when the script itself starts with
set -uo pipefail. A step that runs a checker and
then prints its report or picks a verdict from the exit code must capture the
code with set +e ... rc=$? ... set -e, or the step ends at the checker
with only "exit code 1" in the log. format-changed-check.yml hit this.
printf "$output" | grep -q fails under pipefail even when it matchesA reader that stops early (grep -q, head, sed q) closes the pipe while
the writer still has output, so the writer dies of SIGPIPE and, under
set -o pipefail, the whole pipeline fails. The check then reports the very
marker it found as missing. It is size- and timing-dependent, so it looks like
a flake: android-run-fixtures failed "omitted pass marker" on a run whose
fixtures all passed, with printf: write error: Broken pipe one line above.
Search a captured variable with a here-string (grep -Fq "$m" <<<"$output")
instead of piping printf into it. tools/ci/test_android_fixture_lane.py
reproduces the case through a fake adb (marker first, then 200k lines).
The PR-head affected-test step reads a marker written immediately before the
governed build. Keep that marker inside the build directory and before the
build command: the warm Ninja log contains outputs from earlier branches, so
only artifacts newer than this run's marker count as rebuilt tests. The marker
proves the build produced an output, not that the diff caused it. So the rebuilt
set is also dropped when it exceeds REBUILT_EXECUTABLE_CAP (8) executables,
or when build.ninja or CMakeCache.txt was regenerated after the marker.
Otherwise a cold or stale directory selects the whole suite.
Any command that Pulp prints for a user to copy, any generated test driver,
and every sanitizer workflow build step must invoke
tools/ci/governed-build.sh cmake --build .... Keep the target and build
directory explicit, including secondary artifact trees and the Linux RTSan
lane, but do not include -j, --parallel, or a host-core probe: the
governor owns parallelism, leases, and build-directory locking.
Windows workflow steps that use shell: pwsh still invoke the same governor
through bash tools/ci/governed-build.sh ...; do not bypass it with a direct
cmake --build. This applies to the main matrix as well as advisory compile
gates, so custom runner selectors cannot bypass the governor.
The timeline hardening workflow's focused Ninja build follows the same rule:
timeline-hardening.yml must invoke the governor directly and leave worker
selection to it, even though the lane only builds two timeline test targets.
The web-plugins.yml WAMv2 and WebCLAP build steps run under nested
working-directory values. Use the absolute workspace-root wrapper path in
those steps (bash "$GITHUB_WORKSPACE/tools/ci/governed-build.sh"); relative
tools/ci/ paths resolve inside the demo directory and fail before the build.
WebCLAP Cloudflare builds use the same absolute workspace-root wrapper for
every WASI/Emscripten tree. The gallery step runs from
examples/web-demos/wclap-build, so a relative tools/ci/ path cannot resolve;
keep configure toolchains and build directories unchanged when routing an
existing build through the governor.
The timeline fuzz workflow's deterministic and libFuzzer build steps follow the
same rule. Keep their target lists and build directories unchanged, but route
both cmake --build invocations through tools/ci/governed-build.sh; the
governor owns the worker share on every runner.
The Android fixture workflow follows the same rule for its cross-compiled
headless runners. Keep the NDK toolchain, API floor, build directory, and
pulp-fixture-runner/pulp-android-fixture-runner target list unchanged, but
route the build through tools/ci/governed-build.sh without an explicit
--parallel cap. The governor owns the worker share and build-directory lock;
the emulator and fixture execution steps remain separate.
governed-build.sh treats an explicit -j/--parallel on the build command
(also after --) as a request: the lower of it and PULP_BUILD_JOBS caps the
lease, and the flag is rewritten to the final share before the command runs.
A literal count can therefore lower a build's share but never raise it past
the lease, and a bare flag cannot go unbounded. Before that rule the flag
silently overrode the governor (a -j4 build reserved and logged the full
profile share). Covered by the explicit/flag cases in
tools/ci/test_governed_build.py.
A CMAKE_BUILD_PARALLEL_LEVEL the caller exports is the same kind of request:
the lowest of it, any flag, and PULP_BUILD_JOBS wins. The wrapper exports its
own share under that name, which used to replace the caller's value, so
CMAKE_BUILD_PARALLEL_LEVEL=4 ran at the full lease. Covered by the
caller_parallel_level cases.
The TSan workflow keeps its SignalGraph selection exact and bounded: include the compile-first lifecycle cases, mutation-lock and prepare-swap publication cases, and the routed and parallel re-prepare/process race hammers. Do not replace this with the full graph parity matrix; ordinary lanes own parity coverage while TSan owns these thread-race cases.
The cross-platform software-GPU workflow also routes its Linux and Windows build steps through the governor. Keep each runner's existing build directory, Release configuration, log tee, and platform-specific test flow unchanged; the wrapper supplies bounded parallelism and the shared build-directory lock.
Any command that Pulp prints for a user to copy, including desktop video
doctor/remediation output, is a build emitter and must invoke
tools/ci/governed-build.sh cmake --build .... Keep the target and build
directory explicit, but do not include -j, --parallel, or a host-core
probe: the governor owns parallelism, leases, and build-directory locking.
The local sanitizer and coverage helper scripts follow the same rule: pass a
requested cap through PULP_BUILD_JOBS and leave worker flags out of the
cmake --build argv.
pulp build, pulp dev, pulp loop, and pulp test in a source checkout build
and run only what the working diff affects (pulp affected, the build-target
projection in tools/scripts/changed_surface_inventory.py, which also honours
the families under [targets.mac.changed_surface_selection]; banner
FOCUSED: building N/<total> targets affected by your diff - run 'pulp build --all' before opening a PR). That is
deliberate for iteration speed and deliberately not what any gate runs: the
pre-push diff-cover build, tools/scripts/gates.sh, Shipyard's lanes, and every
GitHub Actions job build all and drive ctest themselves, so the CLAUDE.md
"struct-layout change must compile everywhere" contract is unchanged. Before
shipyard pr, run pulp build --all (and pulp test --all when you changed
anything with tests); a focused green run proves the affected set, not the
graph. PULP_BUILD_FOCUS=0 disables focus for scripts that wrap the CLI.
The arm64 macOS legs of build.yml and build-macos.yml configure
PULP_GPU_AUDIO_EXACT_PROVIDER_PROOF=ON, so the full build compiles and links
the GPU-audio hardware-evidence binaries against the pinned Dawn. Their ctest
registrations carry the gpu-proof label, which tools/ci/ctest_gate_args.py
excludes on every gate lane (the protected merge receipt's required selection
carries the same literal; so do changed_surface_inventory.EXCLUDED_LABEL_REGEX
and Shipyard's macOS test stage). A step after configure compares ctest -N -L gpu-proof with the reviewed allowlist tools/ci/gpu_proof_tests.txt, so a
dropped proof target cannot pass by absence and a new one is a reviewed diff,
and fails if the gate's own -LE selection contains any of them: ctest adds a
required fixture's setup test even under -LE, so no ordinary test may require
a gpu-proof fixture. With the proof ON the gate selects exactly the tests it
selects with it OFF. pulp_gpu_proof_begin()/pulp_gpu_proof_end() bracket
each proof block, and end is a configure error outside the proof option.
Register proof binaries with add_test, never pulp_add_test_suite or
catch_discover_tests: discovered cases come from a TEST_INCLUDE_FILES
script after the build, so end cannot label them, the configure-time
allowlist check cannot see them, and they run in the gate. end is a
configure error when a proof block adds such a script.
Hardware receipts stay owner-run on m3.
An A2T evidence PR targeting Generous-Corp/pulp main that adds or modifies the exact tracked
evidence/receipt.json gets
one additional fail-closed step in the native macos matrix child. The step
runs tools/scripts/a2t_structural_verification_ci.py, which executes the
reviewed offline verifier with bounded stdout/stderr and uploads one immutable
a2t-structural-verification-<PR-head> attestation. The attestation is
structural and nonterminal: it binds the protected target repository/ref,
execution-time S/E, Git blobs,
digests, command, workflow revision, run attempt, job key, step, and result.
Its closed producer contract is
docs/validation/gpu-trace-overhead/a2t-structural-verifier-attestation-v1.schema.json;
the issuer validates every output against it, and the adjacent fixtures/
golden is the stable cross-repository consumer example. The verifier runs in a
detached checkout whose live HEAD is exactly S; the tracked E receipt is
mounted as a separate sibling input. The schema, issuer, issuer schema
validator, verifier, and every verifier-loaded support module are bound to the
reviewed S snapshot and must be byte-identical at E before any such
dependency is loaded or executed.
Regenerate the golden only with
python3 tools/scripts/a2t_structural_verification_ci.py --write-golden; the
producer test requires byte-exact equality with that canonical output. Do not
hand-edit derived fields such as workflow.semantics_sha256.
It intentionally cannot claim the future protected merge, its own Actions
artifact ID/digest/size, the final job conclusion, or terminal acceptance.
The planning validator must recover and authenticate those later from GitHub.
The event-pinned base/head tree diff, not path existence, gates this work. An
unrelated PR that merely inherits a historical receipt skips it, including a
later tool-only change. A receipt add/modify on a PR runs and publishes; the
same change targeting develop/** or another repository verifies without
issuing or uploading protected-main attestation authority. The
same change in a merge group or protected-main push reruns structural
verification but cannot issue or upload PR attestation authority. An exact
event revision that cannot be hydrated, an ambiguous receipt diff, or a
receipt deletion fails closed. A receipt that is untracked, symlinked,
different from the PR-head blob, bound to a different schema/issuer/verifier,
dynamically loaded dependency, trace, or source,
or produces noncanonical verifier output fails the required check. Linux and
Windows remain advisory and do not produce this authority.
The Shipyard merge steward snapshots all open pull-request heads and runs
tools/scripts/shipyard_duplicate_pr_heads.py before cleanup planning. A
duplicate exact head identity means two open PRs are asking the queue to spend
validation capacity on the same source state; consolidate them before adding
more fixup commits. The check is read-only and diagnostic because a REST
snapshot has a time-of-check/time-of-use gap. Shipyard's atomic exact-head
handoff remains the merge-time authority, and malformed census data must stay
failed closed.
The merge queue's failure mode is not that it misses a break. It is that it
inherits one and repeats it. A batch validates main plus its entries, so a
break already on main fails every batch, ejects the innocent entries,
re-forms, and fails again. One observed cascade ran ten-plus consecutive
batches over seven hours with zero merges, each ~40 minutes, each reporting
against a batch name that was not the culprit.
Three facts make that possible, and all three are worth knowing before you diagnose a stalled queue:
An ordinary pull-request head does not run the full test suite. The
Test (non-Windows) step runs the fast tier for ordinary heads, while an
armed head selected by pr_suite == full runs the full suite as a required
queue-admission signal. Tests also run in the merge queue, on push, and on
Shipyard's workflow_dispatch.
main's macOS health is the merge group's macos job, not a push run.
The queue lands with the MERGE method, so the commit on main IS the
merge-group head: ghapp api 'repos/Generous-Corp/pulp/actions/workflows/build.yml/runs?head_sha=<main-sha>&event=merge_group'
finds the run that tested main's exact commit. Read its macos job, never
the run's conclusion. In a merge group the Linux matrix leg is job-level
continue-on-error, so a red Linux leg no longer turns the run's conclusion to
failure; its own check run still shows red. A merge-group run marked
failure therefore means a non-advisory job failed, but the run conclusion
still does not tell macos from the other jobs, and pull-request and push runs
keep folding the Linux leg into their conclusion. Over 2026-10-02 to 10-09, 343
of 726 merge-group runs read failure with only the Linux leg red; the rule
turns those to success and leaves all 48 runs with a red or cancelled macos
non-green (tools/ci/test_build_matrix_contract.py pins both directions).
A cheap required check cancelled with no runner is starvation, not the PR.
drift-fast, Vellum trusted freeze and Enforce version & skill sync run on
hosted ubuntu-latest unless their routing variable is set. On 2026-10-05 each
was cancelled about 15 minutes after creation with runner_name empty and zero
steps, and the queue ejected #9652, #9647 and #9662 for it. A required job that
did get a runner can also be cancelled at its timeout-minutes: on 2026-10-07
drift-fast spent 19.5 of its 20 minutes in a silent apt-get update, which
ejected #9846. The shared apt installer now bounds every attempt (apt's 30 s
connection timeout plus a wall-clock timeout) so a stalled mirror is retried
instead of spending the job. Read the job's runner_name, step count and the
step that was running before calling such a cancel a failure.
A push-to-main run has no macOS leg at all (resolve-provider omits it; a
static test in tools/scripts/test_fork_pr_runner_routing.py pins that no
push-reachable job routes to a self-hosted runner). It used to carry one on the
legacy base selector, which the event-class pool never serves: that leg queued
for hours holding the build-refs/heads/main concurrency group
(cancel-in-progress is false for push), so 57 of 60 push runs were cancelled
while pending with zero jobs, and the Linux/Windows cache-save steps almost
never ran. Push runs now finish on hosted runners. Never put a self-hosted job
back on the push lane.
A batch stops at its first failing test. merge_group runs ctest with
--stop-on-failure; no other lane does. It composes with --repeat until-pass:2 rather than defeating it — ctest stops only once the retries are
exhausted, so a flake still self-heals — and under -j8 the stop is bounded by
the parallel width, so a few extra tests finish. Do not read a batch's short
test list as the complete set of what is broken; a Shipyard workflow_dispatch
run of the fix reports every failure.
Both event-dependent ctest decisions live in tools/ci/ctest_gate_args.py,
tested by ctest-gate-args-selftest, which also asserts build.yml still
calls it.
vellum-suite-lane.yml rebuilds the suites the in-tree Vellum mode retires
against an installed Vellum-mode SDK (tools/scripts/vellum_suite_lane.py).
It runs nightly and on changes to its inputs, on the isolated advisory macOS
runner, and is not a required check.
account step is a manifest problem, not a test failure. Every
retired Pulp-UI suite in PulpVellumUiInTreeTests.cmake needs exactly one
disposition in test/vellum-suite-lane/manifest.json. A newly retired or
un-retired suite changes that set, so update the manifest in the same PR.name|reason,
name|reason:detail and name|reason|OPTION, the last in force only when
that option is on. A parser that misses one form reports the suites as stale.account --gate, which refuses
any suite still waiting.ci-cause annotationBefore you read a 10 MB job log, look for the run's ci-cause notice. The
advisory ci-cause (advisory) job in build.yml prints one ci.cause/v1
record per failed job. Each record gives the failing test, compile error,
runner failure or gate verdict, with a class and a confidence.
unknown means unread, not innocent. A low confidence, or a
class of unknown, means the extractor could not name the cause. Read the
log in that case.tools/ci/ci_cause_notices.sh
reads the version from tools/shipyard.toml and the asset's SHA-256 from
tools/toolchain/shipyard.sha256, so a Shipyard pin bump moves it too; never
copy a version or hash into the script. A record's quality is that release's
C2 extractor: a bare shell-exit or CMake string signature on a run
pinned below the C2 v7 release (Shipyard v0.337.0) is a known gap of the
old extractor, not a new failure mode.macos check can mean nothing ranThe required macos context is reported by more than one job: the macOS matrix
leg, which builds and tests, and bootstrap jobs that claim the name without
running anything — when no native input changed, or when a protected receipt is
reused. With PULP_MACOS_PR_GATING on, an unapproved pull-request head's own
macOS leg is green after only its configure-only contract lane (deferred
tier). A reused receipt produces a three-step green job (Set up job, the
bootstrap step, Complete job). In the checks list it is indistinguishable
from a real pass, and reasoning from one as evidence that the suite passed has
already cost hours of wrong conclusions.
Ask the run instead of the colour:
python3 tools/scripts/gate_suite_executed.py --run-id <run-id>
# executed | tier-only | built-but-untested | not-executed, with the step count
python3 tools/scripts/gate_suite_executed.py --run-id <run-id> --require-executed
# exits nonzero unless the full suite genuinely ran
tier-only is the normal pull-request head: the fast deterministic tier or the
affected-tests tier ran, and Test (...) was skipped. That is not the suite
(build.yml: the fast tier "is NOT test evidence for the merge", and the
affected tier can select nothing), so --require-executed refuses it.
Each bootstrap job also writes a banner into its own job summary saying no
build and no test step ran. A step count near three on a macos job is the
tell.
Behind PULP_MACOS_PR_GATING, default off. Until the repository variable is
exactly true, every pull request runs the full macOS lane, label events do
nothing, and none of the rest of this section applies. Do not set it until
Shipyard #929 (queue-arm-guard refuses a head whose required macos check is
tier deferred) is merged AND verified live, by arming a deferred head and
seeing the refusal. Design, measurements,
decision-row coverage and rollback: "macOS on a pull request waits for
approval" in docs/guides/local-ci.md.
With gating on, a pull request's macOS leg (the job named macos) runs in one
of two lanes. tools/ci/macos_pr_lane.py picks it:
pr-fast tier minus needs-build members, and the pr-guard tier (the
A2T acceptance and verifier selftests). There is no build. It takes about
3.5 min, against a 23.4 min median for the full job. Its green carries a
shipyard-test-tier annotation of deferred.macos-ci: everything the PR head
ran before, plus pr-guard. The App starts it by dispatching build.yml
on the branch.merge_group, push and dispatch are unchanged; the merge queue always runs
macOS.
shipyard-local[bot]'s macos-ci counts. On opened or
reopened the lane checks who last applied the label. To force the full
lane, dispatch build.yml on the branch with -f pr_number=<n>.pr_number. Without it a dispatch tests
the bare branch head (a behind head fails freshness checks such as
agent-capability-manifest-check), and its Linux leg waits forever for
Linux (x64) [local]. With it the run is bound to the PR's head, resolves
its merge commit once (parents: base, then head) and tests that sha in
classify and every build leg, routes Linux to hosted like a PR run, and
records
tested_ref, tested_sha and merged_base (step outputs, the job summary,
and the Tested <ref> at <sha> onto <base> step name).build.yml does not listen for labeled. A label event's run is a newer
check suite with no macos check run, and the merge queue then refuses to
enqueue with "Required status check "macos" is expected" although the
earlier run's macos passed. Never add labeled to a workflow that owns a
required context.macos check run is a completed full-lane success
(not deferred). An earlier arm is disabled at once by
macos-ci-arm-refusal.yml, with a comment. It judges the PR's current head,
read live, not the arm event's, and reads every page of that head's check
runs; a head or listing it cannot read is a refusal. If the full lane fails,
the PR needs a fix, and the fix is a new head, which needs a new verdict.macos-ci-label-reset.yml disables
auto-merge on synchronize (otherwise the new head's contract-lane green
would merge it) and removes macos-ci. A queued PR leaves the queue on push
anyway, and the fenced carrier's update-branch counts as a push. Re-arming
needs a fresh verdict, the label, and a full-lane success. A PR armed (or
queued) before approval fails its contract-lane macos ("armed before
approval and a full macOS run"); remove auto-merge and get a trusted APPROVE.
macos-ci-deferred-disarm.yml also disarms any PR still armed when a
deferred run completes, and dequeues it if it is already queued.PULP_PR_FAST_NEEDS_BUILD in
test/cmake/pr_fast_tests.cmake.GITHUB_TOKEN starts no workflow run.gate_suite_executed.py reads both lanes as tier-only. Use the
deferred annotation, or the skipped Build step, to tell them apart.macos-tier-record.yml publishes a shipyard-test-tier/macos check run per
completed same-repository Build and Test run, bound to that run and attempt.
It is created with a dedicated App's token from the main-only tier-record
environment, never GITHUB_TOKEN. The tier is the more conservative of the
run (a workflow_dispatch by the fleet App of a head it had approved) and
the macos job's step conclusions (Build skipped means deferred). A head with no counted
record, or a deferred one, cannot be armed once tiered_required_checks
is set.Independent of PULP_MACOS_PR_GATING, and inert while it is true (every
synchronize head is then the contract lane already). A synchronize head that is exactly a
conflict-free merge of a base-branch commit into the previous head
(github.event.before), whose tree equals git merge-tree --write-tree of
those two parents, and whose previous head's newest macos check from this
repository's workflows (any event; a newer red is never skipped) is a
same-repository build.yml pull_request full-lane success (Build
succeeded, tier fast or full), runs only configure, pr-fast (minus
needs-build) and pr-guard, with tier clean-merge.
tools/ci/clean_merge_lane.py decides in the step Decide the clean-merge lane (pull request head).
full. No chaining: a
previous green that was a contract or clean-merge lane is full. Never
republish a previous head's conclusion; the lane runs on the head.PULP_CLEAN_MERGE_LANE_MODE is shadow when unset (annotate
would_take, run the full lane), enforce takes the lane, off is the
rollback. clean_merge_lane.py report --since <date> gives the enforcement
figures; enforce only after 7 days or 50 would_take heads with zero
would_take heads whose Build, affected tests or SDK proof failed.matrix.lane != 'contract' && steps.clean_merge.outputs.lane != 'clean-merge',
and tools/scripts/test_build_workflow.py (CleanMergeLaneTest) fails a
step that reads matrix.lane != 'contract' without the second clause.shadow until the input is found.Opposite to the diff-scoped gates below, and on purpose. classify decides
whether a group's tree needs the native matrix, and a passing group lands every
entry ahead of it, so it diffs the whole batch: main's tip, reached by
tools/scripts/resolve_classify_base.py walking the first-parent chain down
from merge_group.base_sha to merge_group.base_ref. Diffing base_sha
itself (the previous speculative group when entries are queued ahead) let a
docs-only entry at the end of a batch report native_build_required=false
and carry a C++ entry that had failed its own group onto main. A chain the
resolver cannot walk prints origin/main, which every caller treats as "build".
The exact-generated-version-bump fast path and protected-receipt-reuse both
apply only when the group's first parent is that main tip; a stacked group
keeps the full matrix. If a merge group reports skip-safe, the
[classify-base] lines in the classify log name the base it diffed.
The merge-group HOLD check and the queue circuit breaker scan from that same
main tip. The "Resolve the merge group's main base" step runs the protected
copy of the resolver before any queue-entry code and classify reuses its
base output, so the three cannot disagree. Do not hand either check
merge_group.base_sha: from there a HOLD on an entry ahead in the batch is
never re-checked by the group that lands it. An unresolved base (origin/main)
fails the HOLD check and a live breaker closed. A group failing with "main's
tip could not be resolved" is that fallback: read the step's merge-group base:
line, then re-run classify or re-queue.
One deliberate exception narrows only native_build_required: the "Docs-only
entry delta (merge groups)" step skips the native build for a group whose OWN
entry (base_sha..head_sha --no-renames, classified by the protected base's
classify_changes.py) is docs-only. It is sound only under ALLGREEN, so the
step reads the rulesets live on every run and keeps the build unless exactly
one active merge_queue rule on the default branch says ALLGREEN, and it
skips only when PULP_DOCS_ENTRY_DELTA is exactly enforce (otherwise it
reports would_skip). Read its docs-entry-delta notice before assuming a
skip-safe group was misclassified. Never cache or remove the strategy read
(decision 11), never let it change another output, and never move the HOLD
check, breaker, A2T or bump path onto the entry delta. A new entry-delta rule
ships only when reuse_policy_replay.py score reads docs_caused 0 and
unexplained 0 for it, with exonerated groups at or below the window's
macos red rate. Its "exonerated" class is replay-only hindsight (the same
head landed green, or the failure recurs in other batches' non-docs groups),
never a reason to pass a live run.
Enforce version & skill sync diffs against merge_group.base_sha on a queued
run, resolved by tools/scripts/ci_diff_base.py. It used to take
merge-base(origin/main, HEAD), which spans every entry ahead in the queue: a
fix: touching no versioned surface in one entry ejected the innocent entry
behind it, and the offender passed on whatever sat ahead of it. If an enforce
failure on a merge group names a commit that is not in the ejected PR, read the
diff base: line in the job log before touching the PR. Any new diff-scoped
gate added to a merge_group workflow should reuse the same resolver.
[train] rollups are member-approvedThe merge train's switch is on in .shipyard/config.toml; mode = "rollup"
permits only rollups whose members each have an exact counted approval and
whose replayed file tree and merge parents pass the guard. Each rollup lands
through the merge queue as a merge commit. SHIPYARD_TRAIN=off or a
train.pause file disables the train, and shipyard rollup reconcile --apply
is manual because Pulp has no merge steward.
On 2026-10-12/13 six pulp pull requests merged minutes after a verdict: HOLD
naming their merge head: each was armed before the HOLD, and review before arm
judges only the arm. Two layers stop that now. Shipyard's verdict-hold-hook
dequeues or disarms the exact head when the HOLD posts through ghapp (on
hosts that enable hold-disarms). Behind it, the merge-group classify job runs
tools/ci/merge_group_hold_check.py, which fails macos closed, before any VM,
when a queued pull request's latest trusted verdict on the head it lands is
HOLD. Its error annotation names the pull request, the HOLD's URL and the fix:
a new head plus the fleet App's APPROVE, or the App's APPROVE on that head if
the HOLD no longer applies, then re-queue. Only the fleet App's APPROVE (a
verdict posted through ghapp, whose author is a Bot) clears a HOLD here; a
human account's APPROVE, comment or review, never does, and neither does a
user account named shipyard-local. It fails closed: an "(unreadable)" error annotation
means it could not read the group (a commit on the chain, a missing token) or a
pull request's comments or reviews in full (a failed read, a GraphQL errors
answer, a list short of its totalCount), and that fails the group too. A
stalled queue is the deliberate lesser harm: re-run the group's classify job or
re-queue. A failed fetch of the base branch fails the same way; only a base
that does not carry the check yet passes, with a notice. A HOLD from the pull
request's own author counts; a HOLD from an OWNER, MEMBER or COLLABORATOR
counts too.
An App APPROVE needs a signer. Every agent posts verdicts as the same App,
so .shipyard/config.toml names who may sign one ([auto_merge] reviewer_signers = ["pulp-review", "infra-review2"]): Shipyard's guards count
an App verdict: APPROVE only with a reviewer: <name> line naming one of
them, and never one ghapp stamped with an unattributed session. A reviewer
agent puts reviewer: <its name> on the line above the verdict. Adding a
reviewer means adding it to that list.
reviewer_stamp_sessions = ["fleet-pass-reviewer-*"] in the same table also
requires the APPROVE's ghapp session stamp (the session part, not the host
prefix) to match a glob, so only the scheduled standing pass approves; a HOLD
from any session still counts. A reviewer tab outside that pass needs its
session listed. The key only takes effect through the Shipyard commit pinned in
.github/workflows/review-verdict.yml, so keep that pin at a version that reads it.
The pin is Shipyard v0.407.0 (44721a9f): since v0.386.0 the commit status
is pending (awaiting reviewer verdict for head <sha>), not failure, while
a head only awaits its reviewer; failure means a counted HOLD or an
unreadable review. The check run itself stays red in both cases, so a pending
status is never a defect to fix and never something a push clears. Moving the
pin edits a workflow file (owner subset): open the PR unarmed with the
scripts/review_verdict_status.py + scripts/ghapp_queue_arm_guard.py diff
summarised against exact-head, stamp-session and self-approval behaviour.
carry_excluded_paths replaces Shipyard's default; it does not add to it.
The same [auto_merge] table lists the paths whose change stops an APPROVE
from carrying to a new head after a merge-only refresh. Shipyard's guard reads
the key as the whole list. Pulp's copy therefore restates Shipyard's
DEFAULT_CARRY_EXCLUDED_PATHS except .shipyard/**, which it narrows to the
policy files: config.toml, ci-profiles/** and vm-image*.toml. That keeps
a regenerated changed-surface-families.toml carrying. To add an exclusion,
append it to that list. When Shipyard's default changes, compare the two lists
again, or Pulp silently drops the new protection.
review-verdict check (not yet a required context).github/workflows/review-verdict.yml runs Shipyard's review_verdict_status.py
from a pinned Shipyard commit (never the pull request's code) and fails unless
the exact head is approved and not held, so once review-verdict is a required
check bound to GitHub Actions, GitHub itself refuses a held head, whoever armed
it. Reviews reach it through review-verdict-trigger.yml (a no-permission
workflow whose completion starts the poster via workflow_run). A comment or
review re-runs the head's own check, so an APPROVE or HOLD changes it without a
push. review-verdict-merge-group.yml reports the same context green for a
merge-queue entry (the synthetic merge commit no review can name; admission
already required the verdict), so making the check required cannot stall the
queue. Bump the pinned Shipyard ref only to a commit that still contains the
sticky-HOLD rule.
The poster job is named review-verdict, like the required context and the
job in Vellum, Shipyard and TartCI. Keep the job id and name equal to the
context: the merge steward matches a required check bound to GitHub Actions by
the check run's name, so renaming the job (as was done once, to
post-review-verdict) left every PR head with only the commit status and a
steward that matched only check runs reported
required_never_ran:review-verdict while GitHub showed the rule green. The
accepted cost: a comment- or workflow_run-triggered run can also show a
review-verdict check on main's commit. The merge-group job shares the name
too, because there the check run is the signal. A push to main touching the
three review-verdict workflows, or a manual workflow_dispatch, runs
backfill-review-verdict, which drives the same pinned script for every open
non-draft PR targeting main, so existing PRs get a current status without a
push. A refusal is a warning there, not a failed run.
A merge_group batch is NAMED for one pull request but CONTAINS every entry ahead of it. Blaming the name sends someone to fix an innocent branch while the real break keeps failing every batch that forms.
python3 tools/scripts/queue_batch_attribute.py [<failed-merge-group-run-id>]
It maps each failing ctest to the pull request whose files own it. Below its
confidence threshold it prints LIKELY PRE-EXISTING ON MAIN and names nobody —
read that as "go ask the base health detector", never as "no culprit exists". A
batch whose macos gate never ran the suite yields nothing, which is the previous
section's problem wearing a different hat.
When file ownership names nobody, ask the queue's history. A change can break a test it never names (an ABI size moved by a node header, a new test file a tier audit has not heard of), and file scoring is blind to it. The queue is not: over a few hours it runs many batches with overlapping memberships.
python3 tools/scripts/queue_batch_attribute.py --history [--since 24h] [--limit 60] [<run-id>]
For each failing test it names the entry whose presence EXACTLY separates the
failing batches from the green ones: in every failing batch, in no passing
batch, counting only the batches inside the span the entry was queued for (the
same test red on main hours earlier is a different episode, and each episode
names its own culprit). It names a culprit only from 2 or more failing batches,
and names nobody (ambiguous) while two entries have always travelled together.
The window is time-based (default 24 h, capped at --limit runs, and it says
when the cap cut it). Completed runs are cached per run under
~/.cache/pulp/queue-history/ (PULP_QUEUE_HISTORY_CACHE overrides), so a
repeated pass reads only new runs; membership is recomputed every pass because
it depends on where main is now.
It judges every REQUIRED context, read from branch protection and rulesets
(never a hard-coded list): macos failures by ctest name, any other required
failure as [<context>] <failing step>. A red outside the required set (the
hosted Linux job, coverage, CodeQL) is listed as advisory and never counted:
the queue does not eject on it. Add --pr <n> to explain each of that PR's
failed_checks ejections from the exact group that caused it (the removal
event's beforeCommit is that group's head sha, so the run is found by
identity, not time). A group whose build.yml run shows only a Linux red did
not eject anyone; look for the entry's own group instead. A test no entry separates, failing at a low rate or rescued by a
retry, is reported as flake. Membership comes from each group's first-parent
chain down to its merge base with main; the pr-N-<sha> ref's sha is the
previous entry's group commit, so reading members from it sees only the last
entry. base_poison_detector.py --name-fix-pr carries the same finding as
likely_culprits (a PR to dequeue, never a fix to jump).
Read logs from the RUN, never the job. ghapp api repos/<o>/<r>/actions/jobs/<id>/logs withholds any response carrying terminal
escape sequences and returns a short refusal instead of the log, so a reader
built on it sees an EMPTY failing-test list and reports "no ctest failure block"
on a run that failed four tests. The attributor reads the run-level zip
(actions/runs/<id>/logs), which is binary and passes through. The
machine-readable per-test record is the run's ctest-logs-macos artifact,
uploaded with if: always(), which is what the base health detector reads:
ghapp api repos/Generous-Corp/pulp/actions/runs/<run-id>/artifacts \
--jq '.artifacts[]|select(.name=="ctest-logs-macos")|.id'
ghapp api repos/Generous-Corp/pulp/actions/artifacts/<id>/zip > /tmp/ctest.zip
unzip -p /tmp/ctest.zip Testing/Temporary/LastTestsFailed.log
The same module answers a second, narrower question for Shipyard. When
queue-arm-guard refuses a same-head re-enqueue after a failed_checks
ejection, it asks Pulp's declared attributor whether the ejecting batch
implicated the head at all:
python3 tools/scripts/queue_batch_attribute.py --certify \
--repo Generous-Corp/pulp --pr <n> --run-id <ejecting-run-id>
It rules from the batch's chain ancestry first: the pr-<N>-<parent> ref
names the commit the entry was stacked on, so a green parent makes the head the
culprit, and a red parent that failed a superset of this batch's macos tests
makes it a neighbour (other_pull_request, naming the ancestor whose own parent
passed). Known flakes (tools/scripts/queue_known_flakes.json) are set aside
first, and a batch failing only those certifies as infrastructure. The
reading is under chain.classification (culprit / neighbour /
known-flake / pre-existing-on-main / unknown). Gotcha: a parent that
failed at Build never ran the tests, so it is looked through to the nearest
ancestor whose suite ran — comparing against its empty test set would make
every child look like a culprit. When the chain cannot rule, it falls back to
the per-step accounting, which certifies only on positive evidence, per failing
step and exhaustively, so most of those batches refuse — including every batch that failed with no ctest block,
because a link error is how a head most often breaks one. Do not read a refusal
as a bug in the attributor; read it as "nothing here rules this head out". The
full rule, and the two candidate signals rejected for certifying a guilty head,
are in docs/guides/local-ci.md under
"Letting an un-implicated head back into the queue".
Gotcha: the chain rule compares outcomes, not causes, so it reads a network
ejection as culprit when the parent passed on a host that could reach the
network (--certify returns implicates_head: true for #8678's pip relay 403
and #8911's cargo DNS failure). Pulp therefore also sets
[queue.environment_requeue] enabled = true: Shipyard allows ONE same-head
re-enqueue when every failing required step printed a network signature near its
first ##[error]. Before pushing a no-op commit after an ejection, read
shipyard landing --pr <n>'s ENVIRONMENT RE-ENQUEUE block; ALLOWED means
shipyard ship --pr <n> on the same head. A second ejection of that head is
refused. See "One same-head retry after a network ejection" in the same guide.
Gotcha: since 2026-11-17 [auto_merge] flake_requeue = "apply" (a bounded
trial) re-enqueues a same-head ejection once when the same failing test ejected
another pull request's merge group within 24 hours (at most one per signature
per window). Before pushing a no-op commit after an ejection, read the steward
tick's flake_requeue decision for the head and the PR's own queue state
(shipyard wait pr <n> --state actionable --timeout 60 --json): it is back only
when the PR is in the merge queue again. A signature_capped or
signature_tripped decision, or none, means it still needs a new head. See "One flake
re-enqueue when the same test ejected two pull requests" in the same guide.
main itself broken? Ask the base health detectorpython3 tools/ci/base_poison_detector.py --name-fix-pr
Read-only. It answers "is the base carrying the failure these batches keep
dying on?" and prints a one-line base-poison-signal/v1 JSON annotation plus a
table. .github/workflows/main-health-detector.yml runs it after every
completed merge-group Build and Test run, green or red (workflow_run), on a
backstop schedule, and on demand, so every new tip gets a verdict; it draws no
macOS gate host and reports only — pausing a re-forming batch is Shipyard's
side.
Do not rely on schedule for anything time-critical in this repo. GitHub
throttles its crons to about one run every four hours whatever the expression
says (*/30 workflows fired at 10:27, 15:15 and 19:12 on one day), which is
why the detector is event-triggered. When you need a read NOW, dispatch it:
ghapp workflow run main-health-detector.yml. A workflow_run workflow runs the
default branch's copy with base-repo permissions: never check out
github.event.workflow_run.head_sha in one, and keep its token read-only.
Where main's evidence comes from without a build. The merge group whose
head sha is main's tip (source: head-sha), judged on every required
context in .shipyard/config.toml [governance] required_status_checks,
gathered from the merge_group runs of every [landability] workflows entry
(build.yml jobs with steps, the other workflows' check runs by check suite, and
commit statuses) — never by a run conclusion and never by macos alone, and
read at any run status because a group lands as soon as its required checks
pass while advisory legs may still run. Judging macos alone is how a
fourteen-hour drift-fast red on 2026-09-29 read healthy, and why every
batch that failed drift-fast broke the streak (batch_streak 0). Failing
tests come from ctest-logs-macos for macos and from the RUN log zip for a
context with no artifact (drift-fast); never the per-job log endpoint, which
ghapp answers with a refusal. Replay read-only with --tip-sha + --before. If that run's gate is not evidence (a reused
receipt, still running), an earlier merge group that built the same tree is
used (source: tree-identity). No merge_group run for the tip (an admin or
direct push) is unproven. The signal carries main_head_sha, so a verdict
always names the tip it is about. Judging the run instead of the gate is what
made every tip read red while advisory Linux was failing.
status | Means | Act on it? |
|---|---|---|
healthy | every required context passed on main's tree and macos ran the suite | no |
unproven | a required context is running/missing, or macos ran nothing; unmeasured | no |
suspected | a streak of batches share a failure, or main failed naming no test | hint only |
poisoned | main's own suite failed a test a streak of executed batches also failed | yes |
safe_to_pause_queue is true for poisoned and nothing else. It is the only
field to act on.
Do not "improve" it with either of these two rules. Both are measured
unsafe. (1) Cross-batch corroboration: batches with disjoint single-entry
memberships have failed with a byte-identical error at different bases while one
of those entries was genuinely broken, so a shared failure cannot distinguish a
red base from one entry breaking every batch it joins — that is why a streak
alone is only suspected. (2) "No ctest block therefore infrastructure": a
compile or link error produces no ctest block either.
A suspected verdict with a named test is still the best starting point in a
cascade: attribute it with queue_batch_attribute.py, and check whether the
landing batch that produced main's current tree reused a receipt (three steps,
green, ran nothing) — if it did, main's tree has never been tested.
When a test fails on main itself, every group the queue forms inherits it and burns a gate VM. The agent opening the fix sets the breaker with one call (writing a repository variable needs repo admin, or an App token with Variables write):
until=$(date -u -v+3H +%Y-%m-%dT%H:%M:%SZ) # GNU: date -u -d '+3 hours' ...
ghapp api -X POST repos/Generous-Corp/pulp/actions/variables -f name=PULP_QUEUE_BREAKER \
-f value="{\"test\":\"<ctest name>\",\"fix_pr\":<fix-pr>,\"until\":\"$until\"}"
# lift early, or after the fix lands if you set no fix_pr:
ghapp api -X DELETE repos/Generous-Corp/pulp/actions/variables/PULP_QUEUE_BREAKER
While it is live, classify fails every merge group (queue-breaker error
annotation, plus a comment on each pull request) that carries neither the fix
nor a queue-unblock label. Gotchas:
queue-unblock, and it counts only when
the fleet App or a repo admin/maintainer applied it last. The name is exact
and case-sensitive; tartci's queue tier reads the same string, so tell the
tartci owner before renaming it.fix_pr to the base health detector's candidate_fix_pr (shipyard base-health --repo Generous-Corp/pulp, or the base-poison-signal
artifact) when it names one, so the fix Shipyard would jump is the one the
breaker admits; a different fix_pr leaves the jumped fix blocked.until more than 3 h ahead is IGNORED, not clamped. Re-set it to extend.fix_pr merges; with no fix_pr it holds
until until or the delete.PULP_QUEUE_BREAKER_CONTROL (same JSON) is judged report-only on every
pull_request classify run, the positive control that the variable arrives.When base_poison_detector.py says poisoned, or the same failing test name
appears in two or more consecutive merge-group macos jobs on different hosts,
every batch that forms behind the break will fail after a full gate and eject
innocent entries. Fixing the ejected PRs is wasted work. Land the fix instead,
ahead of everything else:
id=$(ghapp api repos/Generous-Corp/pulp/pulls/<fix-pr> --jq .node_id)
GHAPP_ALLOW_QUEUE_REMOVAL=1 GHAPP_QUEUE_REMOVAL_REASON=reorder-main-red-fix \
ghapp api graphql -F id="$id" -f query='mutation($id:ID!){
dequeuePullRequest(input:{id:$id}){mergeQueueEntry{id}}}'
GHAPP_ALLOW_REARM=1 ghapp api graphql -F id="$id" -f query='mutation($id:ID!){
enqueuePullRequest(input:{pullRequestId:$id,jump:true}){mergeQueueEntry{position}}}'
The dequeue is only needed when the fix PR already sits in the queue; a PR not yet queued goes straight to the enqueue. The jump is pre-approved for a PR whose title or body names the failing test or the change being reverted. If no fix PR exists, open the revert or the one-line fix and jump that. Record the PR, the failing test, and how long main was red. Jumping anything else, or switching on an automatic jump, is a maintainer decision.
poisoned also comes from main's PUSH run: when its Linux leg executed ctest
on main's tip and failed a test the batch streak shares (proof
main-push-linux-failure+batch-streak). That catches a test that passed when
its commit landed and fails on main afterwards, which the merge group on the
tip cannot see; a receipt-reuse green on that merge group used to leave such a
night suspected. [base_health] auto_jump = "dry-run" in
.shipyard/config.toml makes shipyard base-health --act record "would jump
PR #n" (host-local <state>/base-health/jump-decisions.jsonl) and nothing
else. Advice needs a decisive candidate_fix_pr, so a poisoned base with no
named fix records nothing; jump by hand as above.
The pre-approval is narrow. GHAPP_ALLOW_QUEUE_REMOVAL=1 is pre-approved
only to dequeue the fix PR itself so it can be re-enqueued at the front, and only
while main is red. Every such call carries
GHAPP_QUEUE_REMOVAL_REASON=reorder-main-red-fix, which the queue-removal guard
logs. Every other use needs Daniel's explicit OK first: rebasing or refreshing a
queued PR, reordering or dequeuing any other PR, or making room ahead of the fix.
workflow-lint runs in the merge queue; its scope is a list, not a paths: filterworkflow-lint.yml has no paths: filter on any trigger and runs on
merge_group. A paths: filter never applies to merge_group, and a required
check whose workflow is filtered out never reports, so the old shape could not
run in the queue (two PRs that each passed lint on their own heads landed a
combined tree that failed it on 2026-11-10) and could not be made required. The
scope job matches the change against tools/ci/workflow_lint_paths.txt
(compare API; unreadable diff or 300+ files runs everything) and the
workflow-lint aggregate job (if: always()) is the context to require.
tools/ci/workflow_lint_paths.txt,
not to the workflow. Tests that pinned paths in the workflow text now read
that file. The native-build classifier treats this exact scope list as
inert, just like the workflow's former path filter; naming a script in a
lint filter does not execute it in the native gate. Keep actual native
workflow and action references blocking.needs: scope plus
if: needs.scope.outputs.run == 'true', add it to the aggregate's needs,
and pass its result as a --job name=result to workflow_lint_scope.py verdict. tools/ci/test_workflow_lint_scope.py fails otherwise.tools/ci, tools/scripts and .shipyard/config.toml from
merge_group.base_sha and runs
flake_exoneration.py gate from that copy, so a queued PR cannot loosen the
rule that judges its own group. Anything the gate reads relative to its own
file must be in that pathspec: without .shipyard/config.toml,
base_poison_detector.required_contexts() silently falls back to macos
alone. The step text itself still comes from the group's build.yml, which
review has to catch.workflow-lint job: read the step timings before raising the timeoutThe lint job's 10-minute timeout-minutes cancels the job (conclusion
cancelled, later steps skipped), so the step that happened to be running
looks guilty. It was not: the release-pipeline step needs ~75s and
test_generated_version_bump_check.py needs 350-460s. Read per-step durations
(ghapp api repos/<o>/<r>/actions/runs/<id>/jobs, steps[].started_at and
completed_at) from a green run beside the cancelled one before choosing a
fix. That suite now runs as its own generated-version-bump-contract job.
rmlui-native lane builds its own Vellum SDK.github/workflows/rmlui-native.yml is advisory and path-filtered. The RmlUi
native adapter only exists with PULP_ENABLE_RMLUI_ADAPTER=ON and an installed
VellumRmlUiNative package, and Vellum publishes no rmlui SDK artifact, so the
lane builds Vellum's rmlui/ project (tools/ci/rmlui_native_lane.sh sdk) at
the commit vellum-rmlui-sdk pins in tools/deps/manifest.json, cached by that
commit. To move the pin, change the manifest entry (commit, version) and the
DEPENDENCIES.md row together, then run the lane by hand first. The test step
fails on an absent program, a failing case, or any skipped case (skips exit 0
under Catch2, and three cases need no device, so a Metal-less runner must fail
through PULP_REQUIRE_METAL; the negative-control step proves it). It runs on
the hosted fallback through resolve_advisory_macos_runner.py; whether that
runner has a Metal device is unverified. Never point it at a pulp-build* pool.
For an unattended pull request, use shipyard wait pr <PR> --state merged
with an explicit timeout. This uses Shipyard's single authoritative PR watch
ledger and can run from any fleet host. Never wrap gh pr view or gh pr checks in a polling loop.
A wait on CI or a PR belongs in one blocking call: shipyard wait run|job|pr|release,
shipyard ship --pr <n> (merges on green), or a background command that exits
when the condition holds. A loop that reads the same state every few seconds
costs an agent turn per read and changes nothing: in one week of agent sessions
on one host, poll turns were a fifth of all tool calls.
A queued or in-progress required check is never "blocked". The fleet has a fixed
number of macOS VM slots (2 per Mac), so a required macos job can sit queued for
capacity for an hour or more; that is normal. Run one background
shipyard wait pr <n> --state actionable --timeout 3600 --json, then take the next
independent item or hand off. Do not mark the goal blocked or stop. Call a PR
blocked only when shipyard wait returns a next_action that needs someone else.
macos job before pushingbuild.yml cancels a PR's older pull_request run when a new head arrives
(cancel-in-progress on build-refs/pull/N/merge). A workflow_dispatch run
groups on the branch ref instead, so a push does not cancel it. What a push
costs therefore depends on the state of the current head's macos job, not on
how soon you push:
macos job on the current head | What a new push costs | Do |
|---|---|---|
| none yet (resolve-provider/classify still running, or no run will start, e.g. a conflicting PR has no merge ref) | Nothing | Push now if you have the whole fix; do not wait for a run that may never start |
queued (no runner yet) | No runner time; at most a VM tartci had started booting for it | Push now if you have the whole fix |
in_progress, head already known bad: drift-fast red, a HOLD at this head, or DIRTY | The minutes it has run; the rest is saved | Push the fix now |
in_progress, anything else (including a red Enforce version & skill sync alone) | The minutes it has run, plus the macOS failures it would have shown you | Finish the round, wait for the result, then push once |
completed (green or red) | Nothing extra | Push once, with everything |
drift-fast counts as known bad because it runs the same drift tests as the
macOS fast deterministic tier, so a running macos job on that head mostly
repeats it. A version-skill red says nothing about the build or the tests, so
the running job still carries signal you would otherwise wait another round for.
A native macos job only starts on a head whose cheap required checks did not
fail first: build.yml's cheap-first job holds the native matrix until
drift-fast and Enforce version & skill sync report, and on a red one
macos-cheap-first-blocked reports a red macos that names it instead of
starting a gate VM. The skip-safe macos aliases never wait for the gate. So a head whose cheap check is red usually has no in_progress native job
at all, and a version-skill red now costs you that head's macOS result: fix the
bump first. After re-running a flaky cheap check to green, re-run the Build
run's failed jobs. Mechanism, fail-open rules and the measured latency:
docs/guides/local-ci.md, "Cheap checks run first".
Read the newest macos run in one call. A commit can carry several (re-runs,
an older cancelled run, a workflow_dispatch full-lane run); on a head that
needs no native build the alias job named macos is the one returned, and it
finishes in seconds:
ghapp api "repos/Generous-Corp/pulp/commits/<head-sha>/check-runs?check_name=macos" \
--jq '.check_runs | sort_by(.started_at) | last | "\(.status) \(.started_at)"'
Fold everything for the round into that one push: the fix, its test and,
when the PR is DIRTY, the merge of its base. Two pushes in one round pay for a
second gate run, and the queue wait, which is often longer than the run, starts
again. Over one week of Pulp PR heads, about two thirds of cancelled macos
runs were cancelled while still queued. The runs cancelled after starting had
been running for about 11 minutes (median), and over half of that time was on
heads superseded by a merge of main pushed separately from the fix.
A check-run's startedAt on a job cancelled while queued equals its creation
time, so its "duration" is queue wait, not runner time. Measure the VM time a
cancelled job held from its job record (runner_name set, first to last step),
never from the check run alone.
shipyard landing --pr <n> (its verdict line where
it prints one) or from the head's statusCheckRollup, read at the time of the
claim and naming the head SHA. "Nothing red" or "still running" without that
read is a guess.main itself, or batch attribution
naming another PR.main into it, or update-branch it by hand: moving the head cancels the
running macos gate and the queue tests on top of main anyway. Enqueue it
as it is with shipyard ship --pr <n>. Refresh only for a real conflict or a
failing required check (see "Do not refresh a BEHIND PR" below); the
pre-push hook prints a hint when a push only re-bases an armed PR.PULP_SKIP_PREPUSH), reads
every updated branch's open PRs in the actual push destination and their full
comment history, with pagination,
and refuses while another actor's repair-claim: is
live. Named releases remove only that ID (single-label and slash-separated
IDs use the same grammar); only a bare release clears all claims. An
unreadable expiry remains live until released or corrected. A whitespace-separated
explanation after a valid UTC timestamp does not extend its expiry; malformed
timestamp tokens still count as live. Claim with shipyard claim post --pr <n> --owner <id> --until 2h from the worktree you push from: it posts the
claim and records that comment in the worktree's own git config, and the hook
then counts that one claim as yours (same id, same comment, still live, not
released or taken; another worktree's record never counts). shipyard claim release --pr <n> ends it. repair-claim-taken: <new> from <old> moves a
claim to its new owner. The fleet runner's SHIPYARD_CLAIM_OWNER (or
PULP_REPAIR_CLAIM_ID) still names an own claim by id. A failed read warns and
allows. With PULP_AGENT_OWNER set, it also refuses a push from an active
worktree whose lineage owner is someone else
(worktree_lineage.sh assert-owner). Edit only worktrees you created, and
run review subagents read-only so they return a patch.PULP_SKIP_DIFF_COVER=1. Never pipe
git push, shipyard pr, or shipyard ship through tail/head: the pipe
hides the heartbeat until exit and replaces the command's exit status with the
filter's.Pulp's required PR and merge-queue macOS checks use the local M1/M3/M5 Tart
JIT pool. build.yml replaces the legacy base selector with exactly one
event-class-v2 label: pulp-build-pr-head for PR validation or
pulp-build-merge-group for merge groups. All three checked-in host profiles
can serve both classes; merge groups derive lease priority 110 and PR heads
derive 100. Do not reserve a host permanently for either class and do not set a
fixed profile-wide lease priority, because that disables class-derived
priority and can strand usable reserved capacity.
M1 is a deliberate delayed fallback and waits 10 minutes before taking Pulp
work; that affects latency, not its ability to serve either required class.
One gate name means one configuration. The macos job publishes the
required context on pull requests, Shipyard workflow_dispatch runs, and merge
groups alike, so it assembles its CMake arguments once and no github.event_name
branch may append to them. workflow_dispatch used to add
-DPULP_ENABLE_GPU=OFF, which is how a weaker build came to post under the
required gate's name on Shipyard's own PR-validation path: PULP_TEXT_SHAPING
follows PULP_ENABLE_GPU, Skia goes with it, render_to_rgba returns an empty
buffer and resolved_face_identity returns an empty string, so capture- and
font-dependent view tests fail for the configuration rather than for the diff.
The tell is the test count: a GPU-off macos run reports roughly 19,859 tests
where a pull_request run reports about 20,991. When that gate is red and the
diff cannot reach the named tests, compare the totals before debugging the diff.
tools/scripts/test_workflow_build_dirs.py pins the single assembly line and
asserts no cmake_args+= append exists.
JIT runners exist in GitHub only while claiming a job, so an empty runner list is healthy-idle as well as dead. Conversely, an organization-visible idle runner is not proof that Pulp can assign it. Prove service with queue age, healthy host supervisors, repository-visible registration, exact job-to-runner assignment, and lease/VM reclamation. A checked-in profile says what a host can serve, not whether its Pulp pool is enabled now; re-check M1, M3, and M5 live rather than carrying an incident snapshot forward.
The names pulp-gate-fast, "local M1s", persistent Studio runners, and
busy-count overflow below describe superseded implementations or historical
incidents unless a section explicitly says otherwise. They are not the current
required-gate topology. The authoritative declarative surface is
tools/scripts/runner_topology.json; reconcile it with live variables using
python3 tools/scripts/runner_topology_check.py --mode=report.
The same checker accepts read-only --fleet-profile, --fleet-receipt, and
--fleet-source-manifest fixtures. Use them to prove that a TartCI source
profile serves both classes, the loaded receipt binds its exact digest, and the
private desired-fleet manifest agrees. Keep Pulp labels and host declarations in
those repo/private inputs, not generic Shipyard or TartCI code.
The canonical .github/workflows/build.yml Build and Test pull-request run
is excluded from broad stale-run and superseded-run janitors. Its narrow
old-predecessor/current-zero-job concurrency wedge is owned by Shipyard's
default-off, receipt-fenced recovery command. A generic age sweep or shell
cleanup must fail closed on a missing workflow path and must never cancel that
path; otherwise two cancellation actuators can race and make restart evidence
ambiguous. This exclusion does not authorize recovery by itself—the dedicated
Shipyard invocation remains separately enabled only after its pinned release,
receipt namespace protection, and canary are in place. Pulp pins the bounded
primitive since Shipyard v0.143.0; the pin supplies the command but does not turn
on apply mode. The protected-main worker must stay repository-serialized,
perform a dry run first, and prove one live exact-head canary before scheduled
activation.
tools/cmake/check_control_shipping_artifact.cmake reads each linked image
with file(READ) and searches the bytes with string(FIND). Two CMake
behaviours make that correct only as written:
${var} in a -P script with no
cmake_minimum_required on 3.x (old CMP0053 rules), set(... PARENT_SCOPE)
on every version (a 44 MB image returned from a function arrived as 5 bytes
while the function's own length check passed), and string(REPLACE) /
string(REGEX) on every version. string(LENGTH) and string(FIND) see
the whole value. Truncation fails OPEN for the forbidden-marker checks. So
the scanner pins cmake_minimum_required(VERSION 3.24), reads with a macro
(the bytes land in the caller's scope), touches the bytes only with LENGTH
and FIND, fails closed when the read is shorter than half the file, and has
_pulp_binary_contains re-check the searched length against the recorded
<var>_length. Never remove any of these; a test host on 4.x cannot catch
the 3.x case by itself.file(READ) turns each CRLF pair into LF, so the value is
shorter than the file by the number of folded pairs, at most half of it.
Markers contain no CR or LF, so the fold cannot hide or create one.The matrix test carries a NUL-before-marker and a CRLF-before-marker leak, and
_pulp_binary_contains refuses markers that are under 14 bytes, contain
whitespace or contain ; (-DPULP_CONTROL_MARKER_SELFTEST=<marker> exercises
the refusal).
unregistered-tests-check fails when a tracked tools/**/test_*.py is invoked by
no configured ctest (an entry in test/ctest_script_inputs/), no
source-selftest, and no workflow or CMake file (comments excluded; a directory
handed whole to pytest or discover counts). A file nothing runs passes forever:
its assertions never execute, and a local break-confirm is its only evidence.
Files that predated the check are in tools/scripts/unregistered_tests_baseline.json,
which only shrinks: registering or deleting one fails the check until its row is
removed. Register a new test file in the same PR that adds it.
external/ no patch explainstools/scripts/dead_test_guard.py is the C++ counterpart: it fails when a .cpp
under test/ (or core/<module>/test(s)/) is named by no CMake file, so a test
that was never added to a target cannot sit in the tree looking like coverage.
It reads CMake text, not the configured graph, so a source registered through a
foreach that computes the file name is listed with a reason in
tools/scripts/dead_test_guard.json; a stale entry fails too. When it flags a
file, register it (pulp_add_test_suite(pulp-test-<name> derives
test_<name>.cpp) or delete it and say why in the commit.
tools/deps/check_patches.py reads tools/deps/patches.json, copies the touched
vendored files to scratch, reverse-applies the patch series last to first, and
requires the result to match the recorded upstream hash. A local fix to a file
under external/ therefore needs a patch under tools/deps/patches/<name>/ and a
manifest entry in the same change. --verify-upstream re-downloads each file at
its upstream commit to prove the recorded hash. tools/scripts/examples_index_guard.py
keeps examples/README.md listing every examples/ directory once. All three run
in gates.sh and in the source-selftest suites.
The Linux build job has no display, so an X11 test that opens one with
XOpenDisplay(nullptr) either skips or, written as WARN(); return;, passes
having asserted nothing. The Linux job installs xvfb, and where xvfb-run is
found at configure time pulp-test-plugin-view-host-factory runs every case
through xvfb-run -a (the target's CROSSCOMPILING_EMULATOR, which Pulp's
Catch discovery passes to each generated test), under RESOURCE_LOCK pulp_xvfb
(-a races when several start at once) and a 120 s timeout. Those cases also
get PULP_TEST_REQUIRE_X11_DISPLAY=1, so a missing display there fails instead
of skipping. A new X11 suite needs the same wiring, or its skip is the only
evidence it has. A case that holds a server grab must do nothing that waits on
the server: the Linux plug-in host builds GPU surfaces regardless of
Options::use_gpu, and they make X round trips on resize and paint, so such a
case sets PULP_TEST_X11_HOST_CPU_ONLY=1 and stays unattached.
When asked whether Pulp's local runners are fast, stuck, regressing, or worth
monitoring, query Shipyard's metrics surface before guessing. Pulp does not
mirror these records into pulp CLI or pulp-mcp; Shipyard is the metrics
store and tartci is an optional VM runtime emitter.
This metrics surface requires a Shipyard build that includes the
shipyard metrics subcommand, which every pin since v0.83.0 provides, so the
pinned binary in tools/shipyard.toml is sufficient. Those pins also make
formal GitHub stacks fail closed at every Shipyard merge-queue mutation
boundary, including shipyard runner steward; use the native gh stack
lifecycle for an explicit pilot rather than routing stack members through the
unstacked enqueue path.
shipyard metrics gate-cost --since 7d needs no flags in a Pulp checkout:
.shipyard/config.toml [metrics.gate_cost] names the repo, build.yml and the
macos gate. Quote that command, not a hand-typed flag set, so two gate-cost
numbers are comparable.
Use these commands as the normal agent loop:
shipyard metrics import github --repo Generous-Corp/pulp --limit 50 --json
tartci runtime export --repo Generous-Corp/pulp --since-days 14 \
| shipyard metrics import tartci --json
shipyard metrics summary --project pulp --json
shipyard metrics watch --project pulp --since 14d --json
shipyard metrics advise --project pulp --json
Read watch as a triage signal, not as a hard failure. insufficient_samples
means the lane does not have enough history yet; drift, failure-rate, or slowest
findings are the useful prompts to inspect runner logs, VM boot behavior, cache
state, or GitHub queue time. If tartci is not installed for a repo, skip the
tartci runtime export import and still use the GitHub import plus Shipyard
summary/watch commands.
If a PR's required
macoscheck has been queued >30 min or the repo's PRs are all inmergeable_state=blockedwith no movement, jump to "Self-hosted runner ops" near the end of this file. One-shot recovery of a queued run isshipyard rescue <PR>(Shipyard v0.53.0+) (until Shipyard's rescue re-runspull_requestruns, it dispatches a branch-tipworkflow_dispatchreplacement, which is the wrong proof for a required check under strict protection; for a requiredpull_requestrun,ghapp run cancel <run>if it is still running, thenghapp run rerun <run> --failed). Continuous prevention isshipyard runner watch --kill-hung-workers(v0.54.0+). Keep Shipyard itself current withshipyard update(v0.55.0+; Pulp currently pins v0.56.2+). All three replace the legacyplanning/scripts/runner-watchdog.sh --fixworkflow, which is now an anti-pattern (cancels queued runs but registersfailureon required checks).
The macOS lane writes a reuse record every run (reuse_record = true,
tools/ci/lane_reuse_record.py; see docs/guides/local-ci.md). The record's
per-object dependencies come from Ninja's .ninja_deps; the Makefiles
generator keeps nothing equivalent, so a Makefiles lane records
"object deps unavailable" and every executable reads as unrecorded, which
reuses nothing. Before the pin, 27 of 30 lane build directories on m3 were
Makefiles because the configure passed no -G and the daemon's environment
decided. tools/ci/require_build_generator.sh build Ninja runs before the
configure and removes a directory on another generator (CMake will not switch
in place), so the first lane run on an old worktree is a cold build. A record
that failed to write never changes the lane's verdict; read the run log's last
=== reuse-record: ... === line to know whether one exists.
[targets.mac.changed_surface_selection.executable_reuse] makes Shipyard copy
derivation_paths from the protected base into a bare directory and run the
key code there with python3 -I. Four mistakes do not error at configure
time; they make every keyed run fail to derive or every re-derivation refuse:
derivation_paths is exactly the key code's import closure plus the
adapter, no more and no less. The bare copy holds only the listed files, so
a missing import fails every derivation; an extra file is also a selector
policy path, so every base that moves it plans full as
selector_policy_drift (the receipts shadow was 5 of 38 such drifts before
the shared name pattern moved to tools/ci/always_run_names.py).
KeyCodeClosureTests in tools/ci/test_executable_keys.py derives the
closure from the imports and pins the list and KEY_CODE_PATHS to it; run it
after any import change in the key code.load_record must digest a record in byte order of its relative paths
(a.b before a/b), as Shipyard's record_digest does. Sorting Path
objects orders by parts and gives a different digest on any record whose
names straddle . and /; every derivation then refuses "not the record
Shipyard bound". The shared fixture's value is e35428c1…88fb.deny_unknown_fields. A host whose
Shipyard predates executable_reuse cannot parse the policy at all, so the
changed-surface plan falls back to full on every PR. Bump the pinned
Shipyard on the lane hosts before the table lands on main.rederive command lands with the key code that accepts
it. The host re-derives with the base's command against the base's copy,
so --audit-report {audit_report} on a main whose executable_keys.py
lacks the argument makes argparse exit 2 on every re-derivation, and the
second refusal turns PULP_REUSE_LIVE off.
test_the_configured_rederive_command_parses_with_this_key_code parses the
configured command with the same copy's parser.A new third-party dependency needs an entry in tools/ci/dependency_pin_map.json
(its FetchContent directory, or the archive paths of a prebuilt), or every
change to its pin reruns every executable as dependency_pin. A header-only
dependency has no target to reach, so it stays unmapped on purpose. Check a
pin-file change with dependency_pins.attribute over the base and head copies
before assuming what it rekeys.
dsp-throughput-bench.yml (weekly + workflow_dispatch) is the model for any
timing lane: it builds a Release PULP_BENCHMARK target on GitHub-hosted
runners, asserts only that the JSON is well-formed and came from an optimized
NDEBUG binary, uploads the artifact, and writes a bench_diff.py table to the
job summary. It never compares a number to a threshold, and it must stay off
required_status_checks: timing on shared hosts flakes, and decisions contract
policy is that DSP perf is tracked, not gated. Its first dispatch after landing
must be ghapp workflow run dsp-throughput-bench.yml --ref main (a new
workflow is dispatchable only once it exists on the default branch).
toolchain warnings on a build leg are drift reports, not the failureEvery build.yml leg runs tools/toolchain/check_env.py --format github
before configuring and annotates the run with ::warning title=toolchain ...
lines: one per tool whose version differs from tools/toolchain/manifest.toml.
While the manifest is in warn mode the step never fails a leg, so a red leg
with toolchain warnings failed somewhere else; read the failing step, not the
annotations. Use the warnings when a failure reproduces on one host or runner
and not another: they name the version each one actually ran (for example the
hosted Linux leg's apt CMake 3.x against the 4.3.3 pin, which is how a
CMake-4-only script fails only there).
The build.yml build legs set RUSTUP_AUTO_INSTALL=0, so a rustup proxy
never downloads the toolchain rust-toolchain.toml names mid-build.
rust-toolchain.toml is generated from tools/toolchain/manifest.toml and
names an exact Rust (rustup toolchain 1.97.1, not stable, even when
stable is the same release), so a golden that only has stable lacks it. The
"Provide the pinned Rust toolchain" step (tools/ci/provide_pinned_rust.sh --fallback-to-default) installs it before configure; a ::warning title=toolchain::could not install the pinned Rust means that download failed
and the job built with the runner default (RUSTUP_TOOLCHAIN). Fix the golden
(install the manifest's Rust by name, as tools/ci/mise-golden-layer.sh
does), never by re-enabling auto-install in the workflow or deleting the step.
The step logs rust: branch=present|stable-alias|install|fallback and writes
a JSON receipt plus a step summary line. Gate VMs cannot download Rust at all
(their egress proxy refuses static.rust-lang.org: "tunnel error:
unsuccessful"), and self-hosted legs never fall back, so a gate VM whose image
has neither the pin by name nor an identical stable FAILS the step: rebake
the golden, do not add a fallback (contract row 29). Only GitHub-hosted legs
may fall back, loudly and with an uploaded receipt. rustup toolchain link cannot alias an official
release name, which is why an identical stable is selected with
RUSTUP_TOOLCHAIN=stable instead.
.githooks/post-checkout trusts a new worktree's own .mise.toml (null old
sha and branch flag 1 only) and never fails the checkout. Do not widen it to a
parent directory or add trusted_config_paths roots (contract row 28).
The macpro x64 slot rolls every disk back to its golden before and after each
job, and the m5s ARM64 lane discards its overlay, so actions/cache and any
"warm build dir" idea do nothing there. Caches reach a local Windows job only
through the runner's job environment: PULP_SKIA_CACHE_ROOT and
PULP_SHARED_FETCHCONTENT_SOURCE_DIR (pointing into the golden), and
PULP_CCACHE_REMOTE_STORAGE (a host-served ccache;
tools/ci/ccache_remote_storage.py makes non-main jobs read-only). The jobs
build with Ninja and cl (tools/ci/windows_build_env.ps1), because the Visual
Studio generator ignores the ccache launcher. If a Windows job's ccache per-job
line reads cacheable 0, check for -- Building for: Visual Studio in its
configure log before checking the cache. The bake and server steps are in
docs/guides/local-ci.md, "Windows build caches".
A GitHub-hosted Windows leg is the opposite case: it starts empty with no remote
ccache, so cross-platform-check.yml restores and saves a .ccache directory
with actions/cache there (skipped on a self-hosted runner). It is capped at 1 GB, keyed on toolchain plus dependency pins, and saved only by the nightly on main, because the repository's 10 GB Actions cache is already full. A cold hosted
build is about 2.5 hours and the suite 30 minutes, so its timeout-minutes is
300; when a hosted Windows run is cancelled at the limit, read the step timings
before blaming the test step.
A hosted Windows checkout must keep LF bytes: Git for Windows defaults to
core.autocrlf=true, so cross-platform-check.yml sets core.autocrlf=false
and core.eol=lf before actions/checkout. Without it, tests that diff a
committed artifact against a regenerated one fail on CRLF nobody committed.
cross-platform-check.yml's Windows ctest excludes the source-selftest label.
Those Python registrations read only the checkout and run on ubuntu-latest in
the required Enforce version & skill sync job, so the Windows copy added
failures from POSIX-only fixtures and about 48 minutes of serial time, not
coverage. A Windows-specific script belongs outside that manifest.
The same ctest also excludes browser-capture and windows-pr-quarantine.
Hosted Windows images do carry Chrome, but its CDP capability probe times out
under the -j8 load, so those tests report a missing browser that is really a
slow one; the macOS gate runs them on every merge group. windows-pr-quarantine
is the label build.yml's Windows PR lane already excludes. When a Windows
failure group looks like "no browser", read the probe's timeout line before
concluding the runner lacks Chrome.
The Android workflow compiles and links the public aligned DSP buffer for both
shipping ABIs at API 26 and 28 immediately after NDK installation. Keep the
API-floor case: compiling only the newer API hides unavailable libc functions
such as aligned_alloc. The probe accepts the NDK host's clang++ or
clang++.exe; its workflow step uses Bash explicitly so the SDK environment
path expands on both macOS and Windows. A passing probe is not APK or emulator
acceptance; the following Gradle build and artifact checks remain required.
android-run-fixtures runs the same probe on the NDK it already installs, so
the API floor is one of the few Android facts a pull request actually proves.
That job's cross-compiled fixture runners are not a substitute: their target
closure is narrower than the APK's, so they compiled clean throughout the
API-26 aligned_alloc outage. Anything that keeps a core header out of the
fixture runners' closure keeps it out of the pre-merge signal too, and the probe
covers only simd_buffer.hpp. tools/scripts/test_android_premerge_probe.py
(run from workflow-lint.yml) fails if the probe step, its affected gate, or
the dependency closure that reaches it is dropped, or if the job stops running
on pull_request.
android-build declares needs: resolve-runners, and resolve-runners is
gated on github.event_name != 'pull_request' && github.event_name != 'merge_group'.
So on a pull request resolve-runners, android-build and
android-emulator-test all report skipped, and the workflow's overall
conclusion comes from android-run-fixtures alone. The check named
"Android Build" therefore goes green on a PR that never built an APK.
The APK build runs only on push to main (behind the paths filter), on the
nightly schedule, and on workflow_dispatch. Consequences worth holding:
core/** can still reach main with every pre-merge
signal green, and only the post-merge push run turns red. That is how an
API-26 std::aligned_alloc break sat on main from 2026-07-29 to 2026-09-19
with nobody assigned to it. The API-floor probe now runs pre-merge in
android-run-fixtures, which closes that specific class; a general Android
compile break still has no pre-merge gate.workflow_dispatch) and read android-build there. A PR run cannot tell you.event — mixing pull_request runs into
a health count inflates the pass rate with runs that skipped the build.Coverage report (Linux, Clang) goes red when its C++ build fails, because
"Verify Cobertura XML exists" then finds no XML. The Python tools pass is
continue-on-error, so a list of failing tools/scripts/test_*.py there is
real but is not what turned the job red. When the C++ build fails,
scripts/run_coverage.sh prints the error lines from the full build log
(build.log for stderr, build.stdout.log for stdout) before the last 200
lines; under a parallel build, the tail alone is warnings from sibling
targets that kept compiling.
The Windows coverage leg builds RelWithDebInfo (with /Od /Ob0 from
PulpInstrumentation.cmake), never Debug. Pulp links the static MSVC
runtime, so a Debug build is /MTd with _ITERATOR_DEBUG_LEVEL=2, and the
prebuilt release Skia (/MT, level 0) then fails every Skia-linking target
with lld-link: error: /failifmismatch. The failure extract prints three lines
after each lld-link: error:; those lines name the two objects that disagree.
A hosted Linux leg that dies with "No space left on device" leaves no job log
(the runner's own log write fails). Read the disk-sample: lines the coverage
step prints every five minutes, and the before/after df of "Reclaim hosted
Linux coverage disk", to see which writer grew. Do not move the leg to a larger
or paid runner.
A tools test that fails in the Linux Python pass with ShallowCheckoutError,
HEAD^ or origin/main..HEAD errors is reading git history. The leg fetches
full history before that pass; if one still fails that way, check that the
fetch step ran before suspecting the test.
core/**Before you read a green PR as "this compiles everywhere": every Linux lane in PR
CI is Clang (public-headers, IWYU, RealtimeSanitizer). macOS is Clang.
Windows is MSVC. GCC used to appear in exactly one place —
release-path-pr-gate.yml, path-triggered on release files — so a GCC-only
error in core/ could sit on main until an unrelated PR happened to touch a
Skia pin or a Pulp*.cmake.
gcc-compile-gate.yml now covers core/**: it compiles the core libraries with
g++, with PULP_ENABLE_GPU=OFF (no Dawn/Skia — that is what keeps it in
minutes) and tests/examples/design-import/inspector off.
Two things to know when it goes red:
core/host/src/signal_graph.cpp's binder list
has acquired one four separate times (git log -S '.custom_latency_for'),
because it is long and sits where merges collide. If you resolve a conflict in
a { .a = …, .b = … } block, check you did not keep both sides of the same
field.What it does not cover is GCC behavior — nothing is executed, so a construct both compilers accept but implement differently is still only caught by the Clang test lanes.
MSVC sees PR code in one place: windows-cli-compile.yml, scoped to the CLI and
MCP targets (see "Windows is nightly-only" below). Everything else Windows-only is
compiled by the nightly cross-platform-check.yml and by the release legs.
Release-path configurations use PULP_ENABLE_INSPECTOR=ON starting at the
inspector_sdk_floor in release_product_matrix.json; earlier marker-era
backfills keep it OFF. The option controls whether the optional inspector SDK
archive family is built, while release runtime endpoints still default off.
Keep
release-cli.yml, release-path-pr-gate.yml, and the Windows MSVC
release-path configure in build.yml aligned; forcing the option OFF makes the
tag build succeed but the archive verifier fail after the expensive build.
It also guards one option combination, for free. The lane configures with
PULP_ENABLE_DESIGN_IMPORT=OFF — the option's own documented "release/ship"
setting — and that configuration was once unlinkable: tools/import-design was
added on PROJECT_IS_TOP_LEVEL alone while the pulp::view design-IR sources
it links sit behind the option, so all died in a wall of undefined
references. The discovery step now runs
list_core_library_targets.py --assert-absent pulp-import-design against the
codemodel the lane already produces, so a re-broken guard fails here instead of
in someone's release build. Because the guard lives in the top-level
CMakeLists.txt, that path is one of the lane's triggers alongside core/**.
If you add a target that links option-gated sources, gate the add_subdirectory
on the same option. A target whose implementation is compiled out still
participates in all.
ASan and UBSan add interception and shadow-memory work to every memory access.
A throughput or latency assertion calibrated for an ordinary build therefore
cannot hold under them, and its failure says nothing about the code. The nightly
Sanitizer Tests lane sat red on main for days largely on this: bench::modal bank throughput scales to large banks in real time and slow::Analog VCF stays finite at worst-case drive and oversampling fail there and nowhere else.
The ASan and UBSan broad passes therefore exclude
validation|slow|performance|bench|quality-lab — the same label groups the
required macos gate excludes, for the same underlying reason. On the gate the
noise source is a shared runner's load; under a sanitizer it is the instrument
itself.
Two things worth keeping straight when reading that lane:
[threads],
[rt-safety] and the TSan name-regex lane all still run, because catching
that class is the reason the lane exists. A failing race test there is a
finding, not label noise.sdk / installed-sdk test stages
a full instrumented install prefix inside the build tree. On a hosted macOS
runner that exhausted the disk (No space left on device) late in the ASan
pass, so ASan excludes those labels and UBSan keeps them. A consumer script
must pass the producer's build type, PULP_PARENT_INSTRUMENTATION_* flags and
sanitizer to its configure, or the link fails on missing runtime symbols.graph-paced-timing-matrix-selftest is unlabelled; its zero-miss control
fails under instrumentation, so both lanes exclude it by name.Runtime clock transitions preserve invariant measured latency ([clock][latency]) and drift wanders the pitch slowly at ~the commanded RMS ([drift]) time out under ASan while
carrying no timing label, so the exclusion does not reach them. Grep the
registration, not the name: a bench:: or slow:: prefix comes from
catch_discover_tests(... TEST_PREFIX ... LABELS ...), and a Catch2 tag alone
does not become a ctest label.Environment failures in the same lane (visual-python-deps-present, a missing
numpy/Pillow on the host, cmake-*-sdk-consumer,
pulp-browser-capture-node-integration) are host gaps, not timing. They each
want their own fix; a label would only hide them.
macos checkFor native pull requests, Shipyard workflow_dispatch validation, and merge
groups, the macOS matrix child publishes the literal required macos context
directly. It must not wait on the combined matrix: Linux and Windows are
advisory during the macOS-focused product phase and may continue after queue
admission. The macos and macos-merge-group bootstrap jobs own the required
name only for an intentional native skip or a fail-closed provider/classifier
failure; their inactive names end in -unused.
An exact unchanged merge group may also use macos-merge-group after
protected-receipt-reuse authenticates one unexpired successful PR artifact
and runs the verifier loaded from the exact protected-base parent. The receipt
binds base/head/tree, policy blobs, platform/toolchain, and hashed tested
executables; the bootstrap consumes only the newly derived merge-group
decision. Missing, ambiguous, expired, or mutated evidence must leave the
original matrix entry in place. Never make the PR receipt itself a required
context, and never execute the candidate's verifier as the authority.
Every required job on a hosted label can eject a group when GitHub cannot
assign hosted runners. The job is cancelled after about fifteen minutes with
no runner_name, and the queue ejects on that non-success. drift-fast and the
wclap job route through PULP_DRIFT_FAST_RUNS_ON_JSON / PULP_WCLAP_RUNS_ON_JSON
(unset = ubuntu-latest). A self-hosted target must admit the workflow in its
runner group: pulp-trusted-build admits neither, and refuses the wclap
workflow because it holds a deploy secret; a job routed to a group that does
not admit it waits forever. version-skill-check.yml and
vellum-freeze-check.yml route only when github.workflow_ref is the main
definition, which a merge_group or pull_request event never is, so they run
hosted in practice.
tools/scripts/test_required_macos_alias.py and
test_windows_runner_policy.py pin this topology. Do not reintroduce a reporter
whose needs contains the combined build job.
A cancelled preamble is not a failed one. When classify is CANCELLED
because GitHub never assigned it a runner (the check run's annotation says "The
job was not acquired by Runner of type hosted even after multiple attempts"),
the merge-group bootstrap classifies the group in-job with the classify job's
scripts (tools/ci/macos_merge_group_bootstrap.sh, logging "preamble not
acquired (infrastructure)") and proceeds: skip-safe passes, a native group
fails closed (its leg never started), a failing in-job classifier fails closed.
Failing closed on every cancel made GitHub eject the PR, re-batch, and hit the
same wait in a loop. Cancelling the run instead does not help: a cancelled
required check is another non-success, and the queue ejects on any.
failure, skipped and a missing result still fail closed. Before blaming a
change for a 2-4 s macos red in a merge group, read the preamble jobs'
runner_name and annotations: an empty runner is infrastructure.
A merge group can skip macos/linux entirely by reusing the pull-request
run's protected-validation receipt. The job then reads as validated even
though nothing ran in the group. A receipt that states success
({"conclusion": "success", "ctest_exit": 0} written as a constant), checked
by a verifier comparing against that same constant, is circular: it stays
green after the pull-request run stops running tests, and red code lands
behind a green gate. Receipts carry the CTest selection, the selected
inventory, JUnit per-test results and the recorded exit status. They are
issued only when the ctest step ran and succeeded, and a narrowed tier (an
include label or regex) can never be reused. When changing which tests a
pull-request run executes, check tools/scripts/test_build_workflow.py and
tools/scripts/test_protected_merge_receipt.py (both run from
workflow-lint.yml).
A receipt must also cover the group's slow-affected proofs. The signed
selection is the record: an anchored ^slow$ label set means they ran. The
reuse step hands the group's classify output to the protected verifier as
--affected-slow-required, gated on the protected verifier accepting the
flag, because the verifier runs from the base and an older one rejects an
unknown argument. Add new verifier inputs the same way: accept the argument
first, then enforce it once the accepting version is the protected base.
A merge group runs the workflow YAML its PR carries, and every required context
is posted by a GitHub Actions workflow. So a PR that edits build.yml can pass
macos by forcing macos_reused=true or by rewriting the job. A base-sourced
verifier called from PR-controlled control flow does not fix this: the PR
decides whether it runs. Pinning a context to the Shipyard App does not fix it
either, because that App's key is a repo secret that merge_group jobs can read.
Only an org-level required workflow or required code-owner review would close
it. By Daniel's decision on 2026-09-30 neither is used, and the risk is visible
instead: the advisory Required-check machinery (advisory) check run
(required-check-machinery.yml, pull_request_target, protected-main
definition) names every changed file that can decide a required check, with
conclusion neutral when it flags anything. It reads the required contexts
from main's committed .github/rulesets/main-protection.json, not from branch
protection: a workflow token cannot read branch protection (it needs
administration access), and an App token with that scope was declined. Do not
propose an in-workflow "unforgeable" gate; read that status and review the
named files.
Over the 7 days to 2026-09-28, 30 merge-group macos failures (about 560 gate
minutes plus every batch-mate they ejected) were a PR's OWN test failing in the
queue instead of on its head: pulp-browser-capture-node-unit (#8912),
ios-compile-gate-legs (#8966), wide-non-native-selftest (#8963) and others.
Test what this pull request reaches (build.yml, after the fast tier) runs
tools/ci/pr_head_affected_tests.py: pulp affected's projection of the
base→head diff, never its all fallback, nothing for a docs/skills/workflow-only
diff, plus two path families the build graph cannot see (tools/cmake/** → the
cmake-* fixtures; the wide tier's manifest, classifier or any test/ CMake
registration → wide-non-native-selftest; any source-selftest lane entry
script → the source-selftest-lane-* contract; a GPU-audio provider-identity
producer — core/gpu_audio/CMakeLists.txt, PulpGpuAudioProvider*.cmake, the
identity script, the deps manifest — → the pulp-gpu-* provider probes, whose
compiled-in Dawn identity no source edge reaches; any file under
experimental/pulp-rs/ except its top-level README.md/UPSTREAM_SYNC.md,
plus the out-of-crate files it compiles in (PULP_RS_EXTERNAL_INPUTS:
include_str!/include_bytes! targets and build.rs rerun-if-changed
inputs, kept honest by a test that scans the crate) and the hand-listed files
its tests open at run time (PULP_RS_TEST_TIME_INPUTS, the stated coverage
boundary) → every pulp-rust-* test,
because cargo, not a CMake target, builds that crate, so the projection never
reaches it and a Rust failure otherwise surfaces only in the merge group; it is
a required family, so a leg that stops registering those tests fails the step).
A test is tied to a target when any path its command names is that target's artifact or a bundle directory (.clap, .vst3, .app, ...) holding it, including the value of -D<VAR>=, --flag= or NAME= assignments and |/; lists (changed_surface_inventory.command_path_refs): exact-argument matching alone missed every CMake-script test that takes its binary as -DCLI=, so they ran only in the merge group. A test that reads what CMake records about a target rather than an artifact of it (a generated link or flags file, a header boundary) declares the targets with set_tests_properties(<t> PROPERTIES PULP_SELECT_WITH_TARGETS "a;b"). On the PR head, a test whose command names an edited file (-DGUARD=<file>) or whose cmake -P script includes an edited .cmake module by name runs first as a merge-only check, because an edit under tools/cmake/ makes the projection too wide to use. cmake -E env ... <script> and python -m unittest discover -s -p registrations are declared in test/ctest_script_inputs/ like any other script test. Direct edges are added even when
the projection is too wide or the diff is docs-only: tests whose declared inputs
(test/ctest_script_inputs/) the diff touches, script tests the gates.sh
rules select, the tests running a program whose own source changed, and the
registrations a test/ CMake hunk reaches (cmake_registration_impact.py: the
touched call's test/target, a touched block, and the readers of any variable a
changed or removed line writes, including prefix_${key} templates; only
within that manifest). Budget: ten minutes of batches, the rest listed as
skipped. Replayed on 20 clean PRs it selected a median of 8.5 tests (max ~217
test-seconds); on 16 known PR-culprit ejections it catches every one that is
neither a pr-fast member (already run on the head) nor source-selftest
labelled (run on the head by Enforce version & skill sync). A red here is the
PR's own test, so fix it on the branch. The selection needs Configure to write the codemodel query; if a
future configure loses it, the step reports no CMake codemodel reply and
selects nothing, so check the annotation's mode before trusting a green.
While main is red the step would block every PR whose diff reaches the red
test (on 2026-09-28 a wide-non-native-selftest red on main failed #9018's
head). A failing script-driven test is therefore re-run from a checkout of the
merge ref's first parent, with the source-selftest lane's base verdict; when
every test it fails also fails there, it prints PRE-EXISTING ON BASE as a
warning and does not fail the check. Compiled tests are never exempted: their
binary is the pull request's own build, so a base run would compare it with
itself.
The ten-minute budget is why the merge group used to be the first place a large
diff's affected tests ran: in the week to 2026-11-09, 9 of 10 "passes on the
head, fails merged" ejections failed on the head alone, in tests its run had
deferred (#11471's head deferred 111). deferred-tests-admission.yml closes
that without a new required context or a new merge writer (contract row 32):
on a green Review verdict run, the fleet App's APPROVE comment (a wake-up only;
it waits up to three minutes for review-verdict to turn green, which stays the
only approval), or a Build and Test completion for an approved head, it re-runs
the head's macos job when the budgeted attempt's summary artifact
(pr-head-affected-tests-a<attempt>, written by --summary-json on the macos
leg only, because an artifact name is unique per run and the Linux leg runs the
same step) reports skipped_for_budget > 0. The re-run's affected step sees a
green review-verdict (deferred_admission.py probe), passes --admission
(40-minute budget) and --prior-summary: it runs this attempt's plan plus the
earlier attempt's deferred tests, minus what that attempt passed on the same
tested commit. The union matters: a warm re-run rebuilds less, so the
rebuilt-executable edge alone would silently drop tests the first attempt
deferred. The queue state is read again just before the re-run request. Its result
is the head's macos check, which branch protection already requires, so the
steward cannot arm the head while it runs or after it fails. It never touches
an armed or queued head, never re-runs a red macos (contract row 14), and
re-runs a run at most once (the admission attempt's summary says
admission: true; attempt 3 is the hard limit). Every unreadable fact decides
"no re-run", which is the old behaviour. The repository variable
PULP_DEFERRED_ADMISSION must be enforce for the re-run and the wider budget;
unset is shadow, which logs deferred-tests-admission notices only. Gotchas:
the summary file lives in the warm build dir, so the step deletes it before the
selector runs or an earlier run's summary would be uploaded; and nothing relies
on whether a re-run requested with GITHUB_TOKEN fires workflow_run
consumers: if it does, the admission attempt's summary stops a second re-run,
and if it does not, macos-tier-record.yml publishes no record for that
attempt, which matters only once [queue] tiered_required_checks is set.
unusable(), and an unlisted object counts as changedThe reuse record's link-members and object-deps files each have an
unusable() function (tools/ci/link_members.py, tools/ci/object_deps.py).
Every reader calls it first and treats any reason it returns as "no record".
A new reader that skips the check reads an incomplete map as complete. In
object deps, an object that is missing from objects or listed in stale
has unknown headers. The macOS gate VM can leave Ninja STALE entries after an
interrupted build, so treat that object as changed, never as "includes
nothing".
A usable link map can still hold build-produced shared libraries, and their
loaders must never be keyed. Call link_members.shared_scope() and run those
loaders (always_run shared_link); a new reader that skips it would reuse a
loader whose dylib changed.
pulp_test_data is a static claim; the nightly read audit measures itA compiled test's data: declared / data: none in
test/ctest_script_inputs/ comes from scanning its sources, and the
selector trusts it to skip the test when nothing declared changed. A path
assembled at run time, a fixture opened by a helper library, or a file a
spawned tool reads never shows up in that scan. read-audit-nightly.yml
(tools/ci/read_audit.py) runs every compiled test under strace -f on Linux
and reports each tracked checkout file a test opened, listed or probed without
declaring it. To fix a finding, add the path to the test's pulp_test_data().
Never treat a clean audit as proof for macOS-only tests: Linux does not
register them, and the report lists them as not covered. A run whose control
was not flagged has no verdict, because strace saw nothing, and it fails for
that reason. Once the first run came back clean the nightly
switched to --fail-on-findings: its exit follows the read-audit stage0:
verdict (clean 0, findings 1, incomplete 2). A red nightly is a broken
Stage 0 streak, not a flake. Read the stage0 line before rerunning it. The streak counts clean cron DAYS, not runs,
and only the day's scheduled run counts (the day is the date GitHub created
it, hours after the cron), or a same-sha dispatch that cancelled and replaced
it. Any other dispatch is a control, never a day, so dispatching the nightly
cannot repair the streak. The read-audit-cadence-check ledger
judges each counted run by its report's stage0 verdict, not by the run's
conclusion: before the fail-on-findings flip (2026-10-03 23:42Z) a green run
could carry findings. GitHub fires daily crons hours late or drops them, so a
day with no counted run is a gap, resets the streak, and is named by that
check's tracking issue.
A pull-request head's gate is build + pr-fast. The full suite also runs on
it, non-gating, only when tools/ci/ctest_gate_args.py --pr-suite finds the
pull request armed for auto-merge, still at this head, and merged onto the
current main tip. That full run is what issues the receipt. Three traps:
continue-on-error on pull requests, so its conclusion
is always success. Anything that must know whether the tests passed (the
issuer, Surface ctest failures) reads steps.ctest.outcome.
Because of that, Surface ctest failures must always exit 0: it runs on
a non-gating PR-head failure, and under bash -e -o pipefail a grep that
matched no Catch2 assertion once made the reporter the job's only red step.auto_merge is non-null only while an armed PR waits on its checks; it
reads null once the queue holds the PR. Arming a PR whose checks are already
green enqueues it at once and starts no new run, so it gets no receipt.
That is expected, not a bug.download requires the whole PR workflow run to have concluded success, so
a PR run still finishing its Linux leg, or with a red advisory leg, refuses
reuse for macOS too.main (or "update branch") to earn a receipt. A
BEHIND head deliberately gets the fast tier and validates in full in the
queue; a refresh push cancels the running gate, and a cancelled full run is
pure waste. Merge main only when the PR is DIRTY or a required check fails
because of a stale base.When measuring reuse from job logs, read only the emitted ##[notice] lines.
The protected-receipt-reuse log also echoes the step's whole script, so a
plain grep finds every refusal message in every run, including runs that made
no decision. A merge group with no native build input is one of those: it
publishes no shipyard-receipt-decision annotation, only a
receipt reuse not evaluated notice, and its macos check is the
near-instant bootstrap. The job writes decision notes for macos and linux
in file-name order, so the log prints linux first; shipyard landing shows
both.
Enforce version & skill sync runs that pre-push also runstext_encoding_lint.py --base and migration_note_guard.py --base run in the
pre-push hook and gates.sh as well as in this job, and
script_inputs_precheck.py --base runs there as a build-free stand-in for the
script-test-inputs-drift ctest: a new script-driven add_test() must have a
test/ctest_script_inputs/ entry. script_inputs_offline.py --base runs
beside it for the stale half: it rebuilds each fragment the diff reaches (a
script test whose entry, imports or registration changed; a new suite; a
source that starts spawning in a target an entry compiles) with the
generator's own functions and fails with the exact fragment diff plus a
--write fix, or the configure command when only a configure can write the
record. A command that names a configure-only variable, a registration in a
function or foreach body, or a suite under an unevaluable guard is printed as
NOT CHECKED; the configured check stays the authority for those. A new Python
module can resolve an import without changing the importer, so selection also
checks the generator's newly resolved inputs. Shared spawning sources in a
CMake list do not prove a target consumes that list; uncertain membership is
NOT CHECKED, never grounds for declaring a fragment stale. CMake diff lines
are not source removals: subtract sources added back in the same file, then
check whether the recorded target still names them before flagging removal
(another target can drop a shared source independently). Three PRs on 2026-10-22
went red here on the encoding lint after the local gates reported clean,
because only CI ran it. A new lint in this job that needs no build belongs in
the hook too.
Enforce version & skill sync compares against the merge-baseThe workflow's "Resolve diff base" step hands every gate git merge-base origin/<base> HEAD, not origin/<base>. The checked-out PR merge ref can lag
the live base by hours, so any gate that reads a file at the base tip blames
the PR for what main changed since: a PR that never touched
plugin_slot.hpp failed the Node ABI check because main had appended a
virtual after its merge ref was built. node_abi_gate.py and
skill_path_map_lint.py also resolve the merge-base themselves (via
gate_common.resolve_git_comparison), so the pre-push hook agrees. A new gate
that reads git show <base>:<path> must do the same, and its fixture test needs
a "branch behind main" case. If such a gate still names a file the PR's diff
does not contain, check the step's diff base: log line before merging main
in.
source-selftest tests gate on Enforce version & skill sync, not on macosThe gate events also exclude source-selftest: ~140 Python registrations that
read only the checkout, listed in tools/ci/source_selftests.json and run by
the required Enforce version & skill sync job
(tools/ci/source_selftests.py run). So a red selftest such as
governed-build-selftest or gpu-dpr-runner-selftest shows up on THAT context,
on Linux with Python 3.12, and a green macos says nothing about it. Two
consequences worth knowing before you debug:
darwin, platform.system(), shutil.which("codesign") and
similar) or imports yaml/numpy/PIL: on Linux such a test skips its macOS half
and still exits 0, which is a pass it never earned. Reproduce with
python3.12 tools/ci/source_selftests.py run after temporarily renaming
build/, which is the lane's condition.Version & skill sync checks runs the shared part.
Exclusive source selftests 1/2 and 2/2 run the PROCESSORS > 1 entries,
each alone on its own runner. The required Enforce version & skill sync
job only collects the result of the other two. When it is red, open the
needed job that failed: the aggregator's log names it but holds no test
output. EXCLUSIVE_SHARD_PLAN in tools/ci/source_selftests.py names the
shard for each PROCESSORS > 1 entry, balanced on measured wall time, not
on manifest timeouts (the timeouts are all 300 s and put the two GPU DPR
tests together, a 200 s shard). A new such entry still runs, on the lightest
shard, but the contract fails until the plan places it. Changing the shard
count means changing the plan and the workflow matrix together.source-selftest-lane-contract on the gate; run
python3 tools/ci/source_selftests.py write --build-dir build. The protected
merge receipt pins the same label string as ctest_gate_args.py
(REQUIRED_LABEL_EXCLUDE), so change both or receipts stop being reused.gates.sh run consumption_census.py --check in the
generated-manifest lane (gates_script_inputs.py), so a stale
docs/status/consumption-profiles.json fails locally instead of as
consumption-census-drift on macos, drift-fast and linux. The header list is
read from git's index: git add the new header before regenerating with
python3 tools/scripts/consumption_census.py --build-dir <build> --write. A
host that cannot configure reports it NOT CHECKED. The pre-push hook's own
merge-tree script-state check does not run it.gates.sh now runs this lane scoped to your diff
(source_selftests.py run --changed-from "$BASE"): an entry runs when its own
script changed or its source names a changed file (full path, a distinctive
basename, or a changed module's stem); a change to the lane itself runs all of
them. Before that, a .githooks/pre-push edit passed gates.sh and still
failed prepush-gate-output on the required context. Measured 2026-09-27 on m3:
a hook + governed-build.sh diff selects 9 of 140 entries (57 s); a wider
tools/** diff 27 (138 s); the whole lane is ~190 s. The selection is a textual
heuristic that over-selects rather than under-selects, and the required lane
still runs everything. PULP_SKIP_SOURCE_SELFTESTS=1 skips it.gates.sh block also runs every python3 <script> line of
.github/workflows/workflow-lint.yml (source_selftests.py run --workflow ... --changed-from "$BASE"), read from the workflow file so the list cannot drift.
Those contracts (e.g. test_ci_throughput_workflows.py, which pins ctest
properties in test/cmake/*.cmake) ran nowhere else before merge, so a
ctest-property change passed gates.sh and turned workflow-lint red on main.
A checker handed directories (shell_portability_check.py tools/ci ...) is
selected by any change inside them. All 69 locally runnable suites take ~13 s;
test_generated_version_bump_check.py is listed in WORKFLOW_LOCAL_SKIPS and
printed as NOT CHECKED, because on a full-history checkout it runs past 600 s
(CI's shallow clone does its whole step in ~105 s).$TMPDIR, where
governed-build and configure refuse it) and removed afterwards. When every
failing test it names also fails there, gates.sh prints PRE-EXISTING ON BASE: <suite> fails on origin/main too — not caused by this branch and does
not fail. A new failing test in that suite, a suite absent on the base, a
timeout, or output with no nameable failing tests still fails, so the label is
never a way to hide a branch-caused red. The re-run cost ~2 min for one suite
on a full checkout (mostly the worktree checkout itself). A suite whose
failures cannot be named counts as pre-existing only when it fails with the
same output on the base, paths and timings aside.pr-fast
tier runs (--ctest-label pr-fast): from build/'s registrations when it is
configured, otherwise parsed from test/cmake/*.cmake (73 of 95 members run
without a build; the rest need ${CMAKE_BINARY_DIR} and print NOT CHECKED),
about 15 s. Every other ctest that runs a checkout Python script
(--ctest-python, 122 of them) runs when the diff can reach it. A contract
that walks a directory (rglob, os.walk) is selected by any change under a
directory its source names; that is how wide-non-native-selftest, which
reads every test/**/*.cmake and runs only in the merge group, is picked for
a test/cmake change. Every lane also follows repo imports: a changed
module selects each suite that loads it directly or through repo helpers
(sys.path siblings, from tools.scripts import x, relative imports), using
gate_python_imports_check.local_import_closure. Across the 338 helper
modules under tools/scripts and tools/ci, that reaches suites the name
match misses for 33 of them.NOT CHECKED locally line from every lane is gathered into its own summary section with a
count, and the verdict reads PASSED WITH N NOT CHECKED — not a full pass
instead of the plain green line; NO USABLE BUILD is named in the verdict
too. The pr-fast lane picks its build with --build-dir auto:
PULP_GATES_BUILD_DIR first, else the most recently configured Ninja
build*/ whose test manifests are current, printed as build dir: <path>.
A stale Makefiles build/ beside a current build-gate once made
script-test-inputs-drift print NOT CHECKED mid-log under a green summary,
and the branch was pushed red three times.test/ctest_script_inputs/ (the list itself, a
declared entry/input, a script under a declared input directory, or CMake
that registers tests) and no current Ninja build exists, gates.sh
configures build-gate (configure only, no compile, ~40 s) and runs the
diff-scoped script-test-inputs-drift check, printing the exact --write
command on drift (tools/scripts/gates_script_inputs.py). A diff that cannot
drift the list configures nothing. PULP_GATES_NO_CONFIGURE=1 keeps the old
NOT CHECKED behaviour with a loud warning. Without this, a hand-edited list
passed gates.sh as NOT CHECKED and failed only on the PR head.consumption-census-drift and the others that
pass --build-dir) only mean something against a build of the scope the
census measured. Each profile in docs/status/consumption-profiles.json
records a build_scope (tests ON, examples OFF); a local build with the same
feature switches but examples ON gets the same profile key and a bigger link
closure (Pulp::inspect-protocol went 19→23 nodes on a pristine main). The
pr-fast lane now reads the build's consumption-census-facts.json, and when
its scope differs it sets those tests aside as NOT CHECKED (build config ≠ census profile <key>: PULP_BUILD_EXAMPLES=ON (profile OFF)); --build-dir auto prefers a build that matches the profile. There is no host-detected
input behind that closure: pulp-events (with CoreServices, Foundation and
UserNotifications) links into Pulp::inspect-protocol unconditionally on
Apple since the "make Apple SDK CLI link complete" change, and across 115
first-parent main commits the census count (19 before, 23 after) tracks that
change exactly. A 19↔23 red locally means the build and the census came from
different trees, so a build counts as stale when ANY checkout file CMake read
(build.ninja's RERUN_CMAKE inputs) is newer than its configure, not only a
test manifest. Host-specific suites (rack-plugin-loads) are in
WORKFLOW_LOCAL_SKIPS and print NOT CHECKED. A build/ configured before
the test manifests last changed is treated as stale and the tier is read from
the manifests instead, and a merge-base re-run keeps build-tree paths pointed
at the branch's build (the base checkout has none), so an inventory check that
fails on a local build's options (examples ON duplicates ctest-unique-names)
is labelled pre-existing rather than blamed on the branch.The gate VM's Python has the standard library plus exactly
tools/motion/visual/requirements.lock (build.yml's visual-analysis step). A
test that imports anything else, often yaml inside a helper or a function the
full suite reaches, passes locally and on the PR-head fast tier, then dies with
ModuleNotFoundError in the merge group and ejects the batch. The pr-fast
gate-python-imports ctest (tools/scripts/gate_python_imports_check.py --build-dir) reads every Python script the configured ctest inventory runs and
follows every import statement through repo helpers; the allowlist is derived
from that lock, and the check refuses to run if build.yml stops installing it.
The source-selftest lane installs nothing, so its scripts are held to the
standard library. An import under try/except ImportError, in an except ImportError fallback, under if TYPE_CHECKING, or under a sys.version_info
branch is allowed. Needing a new third-party package means adding it to the lock
(and the wheelhouse), not to the check.
drift-fast catches tree-reading drift before the build, and is requiredThe hosted drift-fast job (.github/workflows/drift-fast.yml) configures the
tip-plus-head tree without building and runs tools/ci/drift_fast.json's
selection (the pr-fast tier plus wide-non-native-selftest, the census,
tools-registry, rack, lane-contract and scheduling checks) in a few minutes.
When a merge group ejects on one of those, its drift-fast run on the same
group should already name the test, minutes earlier; read it before the
macos log. It IS
required (classic branch protection, mirrored in the checked-in ruleset and
[governance]), so a red run blocks the PR and ejects the group by itself.
Never add a paths: filter to its trigger or a job-level if:: a required
check that does not report holds every PR on "Expected" forever, and
drift_fast.py check fails on either. Its one open caveat is that no merge
group has yet been genuinely drifted since it went green, so its merge-group
true-catch rate is unproven. On its Linux configure the census
comparison skips (only darwin-arm64 profiles are recorded) and
ios-compile-gate-legs is not registered; both print as NOT CHECKED. A new
tree-reading check that can pass from a configure alone belongs in the
manifest. See docs/guides/local-ci.md.
build.yml computes label_exclude from the event, and the two values are far
apart. A push (and the nightly) excludes only validation. A pull_request,
workflow_dispatch, or merge_group excludes
validation|slow|performance|bench|quality-lab. So the lane that reports on a
queued merge deliberately does not run the CPU-budget, benchmark, or slow
tests at all — a perf ratio cannot gate a merge on a runner that correctly hosts
two concurrent build VMs.
The trap is that this is invisible in the result. A merge-group Linux job prints
100% tests passed, 0 tests failed out of 20587
which reads as total coverage, and the excluded tests leave no line behind
saying they were skipped. Three tests under investigation as live main failures
appeared 1, 0 and 0 times in that job's 90k-line log, against 8, 2 and 4 hits
for the identical greps on a push-event log from the same day — and the single
hit was the workflow step's own comment text, not a test result.
Before reading any ctest job as evidence about a specific test, check the event and the label:
ghapp api "repos/Generous-Corp/pulp/actions/runs/<id>" --jq .event # push? merge_group?
grep -a "label_exclude=" <job.log> | tail -2 # what it actually excluded
grep -ac "<test-name>" <job.log> # 0 means NOT RUN, not passed
A zero from that last grep is the instrument, not the finding. Pair it with the
same grep against a push-event log, which must return non-zero: if both are
zero the test name is wrong, and if only the first is zero the test was excluded
and the green job says nothing about it. To confirm a slow/performance fix
actually landed, read the push run created by the merge commit, never the
merge-group run that admitted it.
api-contracts.yml runs the public-header doc-contract pass on its own
(tools/build-api-docs.sh --contract-only, ~3 s). It exists because that check
used to live only inside docs-material.yml, a preview-site build that is not a
required context. On 2026-08-16 it reported FAILURE on a PR before the
merge, naming the exact undocumented symbols, and the PR merged anyway. Main's
docs build then failed for eight hours and four unrelated PRs carried a red
build none of them caused — so every agent triaging a red check in that window
was debugging someone else's defect, and each one learned to trust red a little
less.
Two properties make it promotable to required, and both fail silently if
someone tidies them away — tools/scripts/test_api_contracts_workflow.py pins
them, so change the test deliberately or not at all:
merge_group trigger. A required context that does not report for a queued
group leaves the queue waiting on a result that never arrives.paths filter. GitHub treats a required context that never reports as
permanently pending, so a path-filtered required check blocks every PR outside
its filter. Run it unconditionally; it is cheap.It is still advisory until api-contracts is in main's
required_status_checks, which means today it can name the defect and not stop
it — the same position the old check was in. The promotion command is in
docs/guides/test-lanes.md.
Do not promote the whole docs-material.yml workflow instead: its ~51 s
Material-site render is a preview artifact and has no business on the merge
critical path. That is the mistake this repo already made with example
validators.
.shipyard/config.toml stated the macro-gated-header ODR class was "Guarded by
tools/scripts/test_odr_macro_gated_headers.py". The script existed, worked, and
ran nowhere: not a ctest, not a workflow, not tools/check-docs.sh. The claim
was true of the file and false of its execution, and nothing in the repo could tell
the difference — a prose reference in a config comment reads exactly like
enforcement.
That left the class enforced only by the Shipyard mac lane's Debug build, which is
backend = local — so the signal existed on a host large enough to finish the
build and was simply absent on one that was not. The gate you got depended on which
machine typed shipyard pr, which is the same divergent-semantics class
.agents/contract.toml #6 was bought with, reached through host capacity instead
of tool version.
It is now add_test(NAME odr-macro-gated-headers …) in
test/cmake/quality_tests.cmake, so it rides the required macos gate and the
enforcement no longer depends on the shipping host.
The generalizable check: when a comment, doc, or config says a class is "guarded by X", confirm X is invoked somewhere —
git grep -l "X" -- test tools .github # references
git grep -n "X" -- test/cmake .github/workflows tools/check-docs.sh # invocations
If every hit is prose, the guard is decorative. tools/scripts/tools_registry_check.py
enforces this property for the tools registry; nothing enforces it for guards named
in passing.
The same hole swallows a whole test file. tools/scripts/ holds Python suites
that are executed by being named in .github/workflows/workflow-lint.yml — there
is no directory sweep, so a suite is registered or it is dead. A test file can be
tracked, importable, green when you run it by hand, and invoked by nothing:
test_fetch_skia_for_release_extra.py sat that way while its sibling
test_fetch_skia_for_release.py was named in ten places. Adding a case to an
existing file is therefore not enough to make it run. Before trusting a
tools/scripts/test_*.py suite as coverage, count its references outside itself,
and pair that count against a sibling you know is wired:
git grep -l "<suite-name>" -- .github tools test | grep -v "tools/scripts/<suite-name>"
git grep -l "test_fetch_skia_for_release\.py" -- .github tools test # control: must be many
A zero there is the file never running, not the file having no dependents.
tools/scripts/test_workflow_lint.py asserts the registration of each suite the
lint gate runs, so a newly registered suite belongs in both the workflow and that
test.
tools/scripts/timeline_fixture_coverage_check.py fails when a
pulp.timeline.sequence schema version lacks an indexed document fixture under
test/fixtures/timeline/v<N>/ — the check a schema bump without fixtures used
to slip past. It executes in three places with different force:
timeline-fixture-coverage (registered in
test/cmake/timeline_tests.cmake, no LABELS) — unlabeled, so it rides the
required macos gate on every PR. This is the surface that blocks.timeline-fixture-coverage-selftest — drives the script over
synthetic corpora and proves it goes red on a missing version, on a version
dir carrying only non-document kinds, and on an unindexed fixture, and that
operational errors stay exit 2. Without it the gate could silently never
fire, the same class as the ODR guard above.fixture-coverage in timeline-hardening.yml — a no-build second
opinion on the lane the corpus already cares about. That lane is advisory and
paths-filtered (timeline
cores, the fixture tree, the gate scripts, its own workflow file), so a PR
outside the filter never runs it; the required-gate ctest is what every PR
answers to.gates.sh before committing can be a false greenconfig_doc_check.py, skill_sync_check.py, and version_bump_check.py all diff a
commit range (origin/main...HEAD). Staged-but-uncommitted work is invisible to
them, so a pre-commit gates.sh reports no mapped config paths touched and exits
0 on a change that will fail the moment it is committed. Commit first, then run
gates — a green run over an empty range is not evidence about your change.
background, everything else interactivePULP_BUILD_CLASS=background is set on every .shipyard/config.toml stage that
calls governed-build.sh; anything else (a pulp build, a manual
governed-build.sh, a release build) runs interactive: normal QoS always,
partial lease or a short local wait instead of the background-QoS floor. Do not
drop the prefix from a new Shipyard stage — a validation running interactive
competes with the person waiting on their own build, which is the exact
2026-09-30 MacBook incident (two validations held the whole non-gate budget and
an awaited Spectr build ran background-throttled). Read a host's knobs with
tartci governor show; tartci governor explain says what each class would get
now, which is the first thing to run when a build reports a small -j.
On a host whose cores are leased to gate VMs, governed-build.sh pins a build at
its -j2 floor, and the pre-push diff-coverage build then runs for hours (m5,
7 days to 2026-09-27: 18 sessions, 12.6 agent-hours, one push waited 12,300 s)
for a check CI runs anyway. The hook now sets PULP_DIFF_COVER_SKIP_WHEN_STARVED=1;
local_diff_cover.sh asks governed-build.sh --probe-jobs (acquires nothing) and,
when the answer is at or below PULP_DIFF_COVER_STARVED_MAX_JOBS (default 2),
exits 4 having built nothing. The hook prints DIFF COVERAGE SKIPPED (host starved): NOT checked for this push and lets the push through. Count that line;
never read it as coverage evidence. PULP_DIFF_COVER_IGNORE_STARVATION=1 forces the
build, and a direct tools/scripts/local_diff_cover.sh or pulp coverage diff
never skips.
gpu-vellum-handoff.yaml — the version bot doesdocs/status/gpu-vellum-handoff.yaml pins every referenced Pulp path to an
exact revision, object id and object type, and
docs/validation/gpu-handoff-provenance/receipt.json binds itself to that
ledger's exact bytes. Editing any pinned path stales both. That used to make
every such PR carry a hand-run re-pin as a second commit, and the cost was
larger than it looked: ~148 non-merge commits in 25 days changed only those
two files, in 124 distinct subject spellings. They also collide on
github.com, where the local pulp-gpu-ledger merge driver cannot run — so two
PRs that both re-pinned went DIRTY against each other, serializing on a
generated artifact neither author had opinions about.
version_at_land._refresh_derived now regenerates the pair inside the
chore: bump versions commit the release bot writes to main. That commit
advances main by itself, so a re-pin there costs nobody a rebase.
So: edit a pinned path and push. Do not re-pin. The rows go stale, and
stale is survivable — provenance is ancestral, and currency is opt-in behind
PULP_GPU_HANDOFF_REQUIRE_CURRENT, which nothing in .github sets.
"Survivable" is about gates, not about truth. gpu_handoff_provenance.py check
is the strong currency claim — the one that asserts every pinned row names the
blob HEAD actually holds — and between a merge that touches a pinned path and
the next chore: bump versions commit it is expected to be red on main.
That is the designed steady state, not a defect and not something to repair by
hand: the bot's next bump regenerates the pair. No gate runs check (nothing in
.github/, .shipyard/config.toml or a ctest command invokes it; the
gpu-handoff-provenance-selftest ctest carries the currency assertion but skips
it unless PULP_GPU_HANDOFF_REQUIRE_CURRENT=1), so a red check blocks nothing
— it just means the ledger is between refreshes. Run it when you want the
stronger claim, and read a red one against the clock rather than as a bug.
Two things still belong to the PR:
An editorial ledger change — adding, removing or re-stating a pinned
path, and equally an edit to authorities, upstream, cutover_trigger,
self_binding, stop_rules, or an entry's vellum_paths,
terminal_evidence, input_receipts or accepted_dispositions. The bot
regenerates identities; it cannot make any of those decisions. Editorial is
the whole document minus the three derived identity fields, and all of it is
a legitimate in-PR ledger edit that still owes the regeneration:
python3 tools/scripts/gpu_handoff_provenance.py write --receipt # regenerate both
python3 tools/scripts/gpu_handoff_provenance.py check # verify (~25s, git log per row)
Pass --receipt. A bare write leaves the receipt naming bytes that no
longer exist. Hand-resolving either file is the trap: it passes the merge
conflict and then fails the receipt's own checker. Merge first, then
regenerate against the merged tree.
A pinned path you deleted or renamed. Staleness survives; a missing path does not — the required gate goes red on it. Drop or move the row in the same PR and regenerate.
gpu_handoff_pin_freshness.py enforces exactly those two shapes, from both
gates.sh and the pre-push hook: it fails an identity-only re-pin (ledger or
receipt moved, the ledger's editorial content did not) and a pinned path
deleted or renamed while the inventory still lists it. Diff-scoped and
sub-second — an ls-tree/show pair per side and one git diff --name-status. It does not re-verify the identity fields; the check command
above is what proves those.
It reports three outcomes, and 2 is one of them. 0 is checked-and-clean,
1 is a violation, and 2 is git could not answer, so nothing was checked —
an unresolvable --base, a deleted branch, a shallow clone, a typo. That third
code exists because the gate reads its subject through git, and an empty
changed-path list is how it spells clean: a swallowed non-zero return therefore
reads as a pass, and the violation sails through with the gate looking green.
The same split is in silent_revert_guard.py, which prints HISTORY UNAVAILABLE and exits 2 for the same reason.
That matters when wiring it, because the two local surfaces route exit codes
differently. gates.sh uses if ! "$PYTHON" …, so every non-zero already
fails. The pre-push hook enumerates codes in a case, and its *) arm prints
"internal error" WITHOUT setting fail — so an unmapped 2) would print a
line and let the push through, putting the blind spot back one layer out from
the script that just closed it. Map every non-zero code a gate can return, and
when you add an outcome to a gate, add its arm to the hook in the same change.
gates.sh and .githooks/pre-push both run
tools/scripts/vellum_watch_preflight.py --enforce. When the pushed range owes
a .github/vellum-expansion-watch-events/*.json file it does not carry, both
FAIL (the hook's failure is demotable with PULP_DISABLE_PREPUSH_GATES=1, like
every primary gate) and the script prints the exact event JSON that satisfies
the checker: the missing families, the acceptance id and sha256, suggested
covering tests derived from the test files the range touches, and the
watch-only/no-authority disposition. Write it in one step instead with:
python3 tools/scripts/vellum_watch_preflight.py --write-event \
--rationale "what changed, and that no authority moves"
git add .github/vellum-expansion-watch-events/ && git commit -m "ci: record a Vellum watch event"
--write-event refuses a missing, short, or <placeholder> rationale, and
writes nothing when no event is owed. It used to be an advisory hint; advisory
output did not stop #9143, #9275 and #9283 each going red on both required
Vellum checks on 2026-10-02, a CI round trip apiece.
The trigger is changed paths, not intent: the checker globs the changed-file
list against pinned capability-family selectors and reads nothing of the diff,
so a one-line #include under test/test_browser_capture*, or an ordinary edit
under tools/import-design/**, owes a hand-authored event. Coverage is compared
for equality: an event that claims a family the range does not touch fails
too, and the gate names the over-claimed family.
The authoritative check stays in CI, from a trusted root.
.github/workflows/vellum-trusted-gate.yml runs the checker from a trusted root
rather than the pull request's copy, and .github/CODEOWNERS lists the events
directory, the checker and its test. A local refusal does not weaken that: it
can only stop a push the required checks would also refuse, and it never
accepts anything on CI's behalf. The real risk of a local copy is a FALSE red,
so three properties are load-bearing, all asserted by
tools/scripts/test_vellum_watch_preflight.py:
origin/main's tip. Using the
tip manufactures watch events are append-only on any branch that is merely
stale.$VELLUM_HINT variable rather than grepping for the filename, because the
literal path appears only in the assignment.It also verifies the freeze job's inventories (--inventories): the
Vellum freeze job's "Verify extraction and tooling inventories" step runs
generate_vellum_cut_manifest.py --verify,
generate_vellum_ownership_projection.py --verify and
pulp_tooling_disposition.py, and a stale one fails the required check. A new
CLI flag or command is enough to stale docs/status/pulp-tooling-disposition.json
(#9283's Sparkle appcast options did). The gate runs the same three and prints
the regenerate command (python3 tools/scripts/pulp_tooling_disposition.py --write, and so on) for whichever is stale.
It also checks two things that used to fail only in CI. Exit 14 is the real
vellum_freeze_check.py --receipt-mode verdict for an exported path changed
without a vellum_inherits decision, with the export-event skeleton printed (or
written by --fix-export-event --inherits true|false --rationale ...). Exit 15
is a public header under core/runtime, canvas, events, platform or simd that is
missing from its PULP_*_UNIT_HEADERS list, or listed but gone (the
pulp.vellum-closure* ctests need a configured build), with the exact line to
add. See the pulp-vellum-change-routing skill.
"Could not be verified" is not "stale". pulp_tooling_disposition.py
reads cli-commands.yaml and needs PyYAML. Without it, the generator exits 3,
naming the interpreter, and the gate prints "could not be verified" (exit 13)
instead of a regenerate command. Regenerating would change nothing. Put a
python3 that has PyYAML first on PATH, or set PYTHON=, and push again.
Before this change the same failure printed "is stale", and three agents in
one day went to regenerate a file that was current.
Reading that step's log: the line vellum-ownership-projection: error: ownership projection is stale used to be printed by a passing negative
control in test_generate_vellum_ownership_projection.py, so it appeared in
every log and pointed at the wrong file. The test now captures it. The real
failure is the last tool line before Process completed with exit code 1.
Exit codes: 0 nothing owed · 10 event owed · 11 inventory stale · 20 no
verdict · 2 --write-event refused. Both callers block on 10 and 11 only.
The hook runs tools/ci/prepush_fixtures.py --base <base>. The candidates are
the commands of the workflow's "Gate-script fixture tests" step and the
source-only selftests in tools/ci/source_selftests.json. An aggregate suite
such as test_gates.py (about two minutes) is split into the classes it
imports, one candidate per module, so a CMake module change runs
test_version_bump_surfaces.py (about 2 s) instead of the whole aggregate.
The step runs a candidate only when the range changes one of these:
tools/ci/prepush_triggers.json;A test that select_for_changes reaches only because its source names a
changed file is left to CI. Add a declared read only from what the test's
code scans, globs or loads. select_for_changes (the selector
gates.sh --changed-from uses) also selects a test whose source writes a glob
the change matches ("tools/cmake/Pulp*.cmake").
The cap is a hard 60 s wall clock, selection included, on at most 4 workers.
PULP_PREPUSH_FIXTURE_BUDGET can lower it, never raise it. A test the cap
stops is killed with its whole process group. Its output pipe is abandoned
after a second, so a child that left the group cannot hold the step.
A failure prints one line: ✗ fixture test <name>: <first failing item> | repro: <command> (base: <verdict>). Before refusing, the step re-runs the
failing test on the merge base within what is left of the cap. A failure the
base shares is printed as PRE-EXISTING ON BASE and does not block, as in
gates.sh.
A test the cap stops or never starts makes the step exit 3, NOT CHECKED, and
prints each such test's own command. That command is the remedy, because
gates.sh does not run these suites on a gate host. The hook writes a
skipped fixture-tests receipt event and ends with gates passed except fixture tests: N NOT CHECKED, never gates clean. The step is plain Python,
with no configure, compile or receipt of its own, so gate hosts run it too.
A tag-only or delete-only push skips it.
Exit codes: 0 every selected test ran and nothing new failed, 1 a test failed, 2 could not run, 3 NOT CHECKED.
gates.sh and the pre-push hook are two lists, not onegates.sh describes itself as running the gates .githooks/pre-push runs, and
that is no longer true in either direction — the hook does not invoke
gates.sh, and each has gates the other lacks (framework_neutrality_check.py
is in gates.sh only). So adding a gate to one adds it to neither the other nor
the push path. Wire a new local gate into both files, and check the other list
rather than assuming it inherits.
The f-string floor (python_floor_syntax_check.py) and the worker-thread
assertion check (thread_assert_check.py) were in gates.sh only, and each
reddened a required check on a PR head that skipped gates.sh. The hook now
runs both with --changed-from <base> (only the files the pushed commit
changed, read from the commit), and its agent skip floor keeps them blocking
when an agent (SHIPYARD_AGENT_ID set) pushes with PULP_SKIP_PREPUSH=1 or
PULP_DISABLE_PREPUSH_GATES=1. Diff scope is deliberate: a whole-tree check in
the agent floor would block every agent push the moment main itself went red
on it. The agent floor runs only when the push sends HEAD (not a deletion,
tag or other branch), and diffs against the LOCAL origin/main: a stale one
widens the diff, so git fetch origin main before blaming a refusal on lines
the branch never touched. Exit 2 (no merge-base, interpreter below 3.11, an
internal error) is "could not run", never a violation. git push --no-verify
still skips everything; CI is the only backstop for that.
The sequencer registries are wired into both:
sequencer_exposure_check.py — the cross-surface exposure ledger at
docs/status/sequencer-exposure.json. Run base-aware, matching the CI
invocation, so the append-only history and tombstone rules apply; dropping
--base silently checks a weaker subset. This is the slowest gate in the
local lane (~20s), and the cost is inherent rather than accidental: it
resolves every released row's evidence out of git, hundreds of short git
invocations, which is exactly what catches a row citing evidence that has
since been deleted. Do not "optimize" it by skipping that read. It watches a
changed path three ways: a sequencer-name substring, a ledger row that claims
the path in owned_paths, and newly added sequencer semantics. A path claimed
by two or more rows is watched by none of them, because no single row can be
the one asked to cover it; registration manifests and wholesale-regenerated
artifacts are never claimed whole, so a manifest edit never needs a row.
negative_capability_check.py — the compile-refusal registry. Whole-tree
and sub-second. A ctest already covered it, which meant it was only reachable
from a full build; the local lane now fails in under a second instead.
agent_capability_manifest.py --check — the installed public surface and
the two counters a branch reserves while the base keeps moving. Diff-scoped to
installed public headers and the capability registry/manifest, ~15s when it
runs, and it prints its reason when it skips. Both surfaces pass
PULP_AGENT_CAPABILITY_BASE_REF as a resolved commit: a bare run takes the
merge base while CI forces the base tip, and the two have disagreed by
enough to send a branch into the merge queue holding a counter another branch
had already taken.
This one is worth the seconds even though it is the second-slowest here,
because it is the only local gate whose failure cannot be repaired after the
push. Nothing but the merge group sees a stale counter, and a pull request
already in the merge queue refuses a push with GH006: … Branches that are queued for merging cannot be updated. So the repair is locked out by the
queue that is about to reject the branch, and dequeuing is separately gated
(queue-removal-guard: refusing unaudited merge-queue removal) — leaving
"wait for the eviction" as the only unprivileged route. The silent shape is
the common one: two branches holding the same counter write byte-identical
constant lines, so git merges them without a conflict and each passes
--check alone.
A --repo-root is required for the refusal registry; it defaults to a path two
levels up from the script, which is not the worktree when the hook runs.
Do not set the build.yml classify checkout back to fetch-depth: 0. GitHub
already supplies the immutable PR, merge-group, or push base SHA. The workflow
checks out the exact head at depth 1, fetches only that base object when absent,
and calls classify_changes.py --comparison=trees; an unavailable base fails
closed to the native build. This matters especially on a roaming reusable Mac:
a full-history preamble was observed entering a 70 GiB .git directory with
286 packs before doing any classification. Keep the 10-minute job timeout too.
Workflows whose actual release/audit algorithm traverses historical ranges may
still require full history; changed-path classification does not.
The preamble also cannot inherit its Python contract from an interactive shell.
macOS LaunchAgents default to /usr/bin:/bin:/usr/sbin:/sbin; on hosts where
/usr/bin/python3 is 3.9, importing the classifier fails before it can request
the conservative full build because .shipyard/config.toml requires
tomllib. Keep the classifier step's explicit Homebrew/user-bin PATH, resolve
one interpreter through tools/ci/find_python311.py, and use that exact
interpreter for the base resolver, policy classifier, JSON extraction, and
protected-base version-bump verifier. A result that depends on whether M3 or M5
claimed pulp-preamble is a fleet fault, not a retryable check failure.
The GPU provenance selftests read real per-path Git history, so a shallow checkout fails them on the checkout shape rather than on any defect. Every lane that runs them therefore carries a hydration step immediately after checkout:
- name: Hydrate bounded GPU provenance commits
shell: bash
run: python3 tools/scripts/hydrate_gpu_provenance_commits.py
It is wired into build.yml, cross-platform-check.yml, intel-portability.yml,
nightly-full-build.yml, nightly-intel.yml, sanitizers.yml (asan, ubsan and
rtsan; tsan does not run the suite) and validate.yml. Adding a lane that runs
a broad ctest means adding this step too —
tools/scripts/test_gpu_provenance_ci_wiring.py is the cover that fails when a
lane is missing it, so the omission surfaces locally instead of as a red lane. It runs in workflow-lint.yml, not as a ctest: it parses the workflow
YAML, and the required macOS CTest hosts carry no PyYAML.
build-macos.yml is the exception, and deliberately so: its hardened checkout
sets persist-credentials: false (no credential remains for a fetch) and pins
ref: ${{ github.sha }} (so GITHUB_REF no longer names the checked-out
commit). The hydration script needs both, so that lane clones full history with
fetch-depth: 0 instead. This does not reopen the classify preamble question
above — that job classifies changed paths and still wants exact trees at depth 1.
git rev-parse --is-shallow-repository is a remedy trigger, not a failure
predicate. A warm self-hosted checkout can retain every object it ever fetched
while actions/checkout rewrites the shallow boundary, so object presence does
not prove ancestry, and a repository reporting false can still be missing the
connection a selftest walks. The predicate that actually decides the outcome is
whether each pinned revision resolves and is an ancestor of HEAD — which is
what the script asserts after hydrating, and what its
gpu-provenance-hydration: PASS total=<n> fetched=<n> cap=128 line reports. A
guard written against the shallow flag alone passes on a hydrated clone and on a
warm dirty one alike.
A shallow checkout does not announce itself. What a failing lane prints is a
test error, and the nine GPU selftests that walk history print four
different-looking ones — a missing revision, a git log that returns nothing, an
empty provenance set, and:
error: pathspec 'HEAD^' did not match any file(s) known to git
That last line is the unambiguous one. A repository with exactly one commit has
no HEAD^, so a lane emitting it has a depth-1 actions/checkout and is missing
the hydration step above — it is not a defect in the test that printed it. Check
the lane's checkout before reading any of the other three as a real failure; a
single missing hydration step accounts for all of them at once.
Hydration is not a bounded fetch of the named revisions. The script fetches with
--unshallow, which reconnects the entire event history, so every ancestor is
reachable afterwards, not just the pinned set. MAX_COMMITS bounds the
verification set — the revisions the script proves resolvable and ancestral —
and says nothing about fetch depth. A selftest that walks HEAD^ is therefore
covered by the same step that covers one naming an explicit SHA.
Generic agent HTML uses a real browser capture as its source reference before
Skia/native lowering. The local ARM runner images deliberately do not retain a
mutable system browser, so build.yml installs the checksum-pinned Chrome for
Testing archive into the job temp directory and exports PULP_DESIGN_BROWSER.
When a browser-source test is added or changed, keep that bootstrap intact and
fail on download, checksum, extraction, or executable discovery. Do not
convert a missing browser into a skipped fidelity test: that would let a PR
claim source-to-native validation that never occurred.
Browser-capture Node coverage has three distinct CTest entries. Keep the
dependency-free unit aggregate separate from the real-Chromium integration
file, whose serial browser cases have their own 600-second bound. The
esbuild-backed materialized-runtime canonicalization test is registered only
when tools/import-design/jsx-runtime/node_modules/esbuild exists, so the
required Linux build.yml leg must run the locked npm ci --prefix tools/import-design/jsx-runtime step before CMake configure. Do not fold the
integration file back into the unit aggregate or remove that install step: the
former exhausts the aggregate deadline before later tests run, while the latter
turns canonicalization into either ERR_MODULE_NOT_FOUND or missing coverage.
Before regenerating test/ctest_script_inputs/ or
.shipyard/changed-surface-families.toml, run that same locked install and
reconfigure from the gate profile so both materialized-runtime tests remain
registered. script_test_inputs.py --write refuses (exit 2, list unchanged)
when it would delete a checked-in test or executable your configure does not
produce, such as the generated-name "Pulp UI Script Fixture" executable. Fix
the configure; pass --allow-delete only when the registration really was
removed.
After merging main, reconfigure the build tree before any --write of
consumption_census.py or script_test_inputs.py: both read facts only a configure
rewrites, and a stale tree silently reverts main's newer entries. The census
refuses (exit 2) when its facts file predates a tracked CMake input, and
--check drift output names the stale tree.
Full model: docs/guides/test-lanes.md. Operationally, when a PR's required
macos check goes red on a test unrelated to the diff, check the label:
slow and validation-labeled tests are excluded from the required gate
(.shipyard/config.toml test = "ctest ... --label-exclude \"validation|slow\"",
matching build.yml's PR ctest and cross-platform-check.yml). The required
gate also runs --repeat until-pass:2, so a single timing-flake self-heals.
A slow proof can still gate an affected diff explicitly: the roughly
12-minute agent-capability-installed-sdk test (label slow-affected) is
restored INTO the main suite, started first by its COST, not as a step after
it (ctest_gate_args.py --affected-slow), by the
fail-closed classifier on parallel macOS and Linux matrix legs for
capability/install surfaces and CMake target/export definitions, while unrelated PRs and merge
groups avoid that cost. A selected skip-safe documentation path must still
force allocation of the native job that owns the proof. Do not remove
that explicit affected step when maintaining the broad slow exclusion,
and do not run it again on unfiltered main/nightly corpora that already own it.PULP_CLASSIFY_WIDE_NON_NATIVE=1, default off) lets a
tools/scripts / tools/testing / tools/import-validation change skip the
native matrix only when a reference search proves no gate-side test names it
(tools/scripts/wide_non_native.py). Gotchas: a data file that lists paths
(e.g. skill_path_map.json) is itself a referrer, so a script it names stays
native until that file's readers are proven gate-silent; the gate's tree
scanners run from tools/ci/wide_non_native_checks.json on Enforce version & skill sync, and a new tools-walking gate scanner must be added there or to
REVIEWED_SCANNERS in test_wide_non_native.py. The big remaining lever is
moving gate-side Python ctests (runner-topology, trace-span lint) into the
source-selftest lane, which then makes their scripts admissible here too.validation is example-only — the pluginval-* / auval-* /
clap-dlopen-* validators under examples/. They do NOT gate core PRs; they
run on the example-validation lane
(.github/workflows/examples-validation.yml), which reports on relevant PRs
and internally skips otherwise (required-safe: always reports). The lane
remains advisory until the promotion described below.macos gate does NOT compile the examples. build.yml (and
cross-platform-check.yml, the windows gates) configure with
PULP_BUILD_EXAMPLES=OFF. The path-filtered example-validation workflow
compiles the full examples tree on Linux and macOS for relevant changes;
Shipyard's separate blocking [validation.default] temporarily retains
PULP_BUILD_EXAMPLES=ON until that stable context is promoted to required.
release-cli.yml also compiles them at release time. Do not assume a green
required gate by itself means the examples build.So a red required gate should NOT be an example pluginval/auval timeout — if
it is, the exclusion regressed. The example-validation lane is not yet in
required_status_checks; promote it once it is green on a real examples/**
run.
main and breaks the RELEASE buildBecause the required gate builds PULP_BUILD_EXAMPLES=OFF and only release-cli
builds examples, an example that fails to compile can merge green and then fail
every release build until it is fixed — silently making the SDK unpublishable.
The nastiest form is a compiler disagreement: an out-of-declaration-order
designated initializer (.kind before .range) is a hard error under GCC
but only a warning under Clang. It compiled clean on every macOS/Clang check,
then killed both Linux (GCC) legs of the release (#6082, the .kind/.range
swap; it stranded ~10 tags).
Guard (build(examples) PR): examples/CMakeLists.txt promotes
-Wreorder-init-list to an error under Clang (GCC already errors by default), so
the reorder now fails wherever examples compile — release-cli AND the
example-validation lane — on every compiler. examples-validation.yml also
triggers on core/state/include/** + core/format/include/**, because a field
reorder in a header the examples brace-initialize breaks their inits without
touching examples/**. Proven by the cmake-examples-reorder-init-guard ctest.
If you add a NEW example struct pattern that a compiler tolerates but the release
compiler rejects, extend that guard rather than discovering it at release time.
PULP_BUILD_EXAMPLES=OFF — and which must notPULP_BUILD_EXAMPLES defaults ON (CMakeLists.txt), and examples/ is 89
add_executable targets. A workflow that configures the ROOT project and then
builds with no narrowing --target compiles all 89 — usually to throw them away.
That is not free: every Linux, Linux ARM64 and Windows leg of
cross-platform-check.yml was cancelled at its 60-minute job limit, so the
cross-platform backstop delivered no cross-platform signal at all until
examples were turned off there.
Four rules before you add or remove the flag:
-S argument and the step's working-directory first. Only a
root configure is affected. web-plugins.yml (8 configures) and
wclap-cloudflare.yml (5) look like the biggest wins and are not wins at
all — every one targets an examples/web-demos/* tree that declares its own
project() and never includes the Pulp root, so the option is simply unused
there.--target. If it does, the flag
trims configure work only — say so rather than claiming a build-time win
(release-path-pr-gate.yml, non-skia-build-guard.yml).format-baseline-diff.yml (PulpEffect_AU|VST3|CLAP — with none built it
exits 1) and nightly-intel.yml's universal cross-check
(PulpGain_VST3 PulpGain_AU PulpGain_CLAP, feeding lipo -archs + auval).build/{VST3,CLAP,AU}/* come
from pulp_add_plugin, and every caller wired from the root lives under
examples/. validate.yml globs those directories — with examples OFF the
globs go empty and it validates nothing, silently and green.Deliberately examples-ON, do not "fix": examples-validation.yml (its entire
purpose) and nightly-full-build.yml (whose configure step says so in a
comment). Shipyard's [validation.default] likewise keeps them ON on purpose.
Every GPU case in the native suite skips when no adapter is present, which is
correct on a developer laptop and on the hosted runners that carry no
representative GPU. The cost is that a green macos check reads identically
whether the self-hosted runner rendered anything or quietly lost its adapter:
the skipped cases are the only difference, and nothing fails.
The repo does not know which of those two it is. test_subtree_cache_gpu.cpp
says so in its own comment ("Dawn init succeeding is not proof the adapter
renders"), and it skips on a near-blank readback for exactly that reason. So
do not promote a GPU assertion to a required gate on the assumption that the
Studios have a working Metal adapter; on a wrong guess that reddens every PR
in the fleet at once.
Two environment switches exist to make the skip falsifiable, one per lane, and they are the same idea in two places:
PULP_REQUIRE_WEBGPU=1 — the browser/node GPU-audio proof in
web-plugins.yml. A null adapter becomes a hard failure instead of a
named skip.PULP_REQUIRE_GPU_ADAPTER=1 — the native Catch2 case
A lane that requires a GPU adapter has one (test/test_gpu_surface.cpp).
It also rejects Dawn's Null backend, which validates API calls and
composites nothing, so AdapterInfo::null_backend is the discriminator to
check rather than adapter_type alone (Null can report a CPU adapter type).Both are a lane's promise, not a device probe: read from the environment, inert where unset. That is what makes them safe to ship into a repo whose lanes have heterogeneous GPU capability.
When the runner's real state is unknown, wire the switch as an observation
first: a step with continue-on-error: true, so the answer lands in the log
while the required check stays independent of it. Promotion is then deleting
one line, and the same run history tells you whether promoting is honest. (This
is step-level continue-on-error on an ordinary test failure, which GitHub
covers; it is not the job-level timeout gamble warned about above, where a
timeout surfaces as cancelled rather than failed.) web-plugins.yml
already uses the non-gating-probe shape on its Linux leg for the same reason.
The self-hosted macOS leg is selected with matrix.key == 'macos' && runner.environment == 'self-hosted'. The second clause matters: when
PULP_LOCAL_MACOS_RUNS_ON_JSON is unset the leg falls back to hosted
macos-15, which has no representative GPU and must not opt in.
build.yml's ctest call passes --output-junit, and an if: always() step
turns that report into a job-summary table of every notrun/disabled case.
Read it before concluding a green macos check means the suite ran: ctest
returns 0 whether every test passed or every skip-capable test declined, so the
required check is green either way and the table is the only place the
difference appears.
Two traps in reading it:
ctest -N is the control
for what is registered, and the step prints both. A gap between them is
real information rather than a fault: label exclusions, --exclude-regex, and
configure-time absence remove tests from the report entirely, and a test that
was never configured is not a skip at all.<skipped message=...> is the mechanism, not the reason. It reads
SKIP_RETURN_CODE=4 for every Catch2 skip in the suite. The author's reason
lives in the captured console output, under <file>:<line>: SKIPPED: /
explicitly with message:, which is where tools/scripts/ctest_nonruns.py
recovers it from. A row that shows the bare mechanism is a non-Catch2 skip,
typically a script exiting SKIP_RETURN_CODE.The step asserts nothing, deliberately. Skipping is frequently correct (no GPU,
no device, no vendor SDK, wrong platform) and a rule that made skips fail has
already caused an iOS-gate outage once; the defect being addressed is
invisibility, not skipping. In test source the corresponding rule is that an
unmet precondition uses Catch2's SKIP(), never SUCCEED/WARN/a bare
return;, all of which leave the case passing and therefore invisible here.
tools/scripts/check_skip_not_pass.py enforces that mechanically.
SKIP_RETURN_CODE is the right tool — a test needing a GPU, a device, an absent
platform or a vendor SDK should skip rather than fail — but the required macos
check reports the skip and the pass identically. A suite that has never executed
once therefore looks exactly like a suite that executes and passes on every PR,
and a real failure inside it is invisible for as long as the precondition is
missing.
build.yml's non-Windows test step makes the non-runs readable without making
them fail: --output-junit writes a report, and an always() observation step
renders the notrun tests — name, skip reason, labels, and the skipping
command's output — into the job summary, with the XML kept in the
ctest-logs-<key> artifact on green runs too. Same shape as the GPU-adapter
observation above: continue-on-error: true, records the answer, asserts
nothing.
The renderer is tools/scripts/ctest_nonruns.py, shared with local artifact
inspection and registered in docs/status/tools.yaml. Pass an explicit CTest
JUnit path and --json for bounded structured non-runs, counts, and the input
digest. Pass --baseline <known-good.xml> to surface duplicate-safe status
transitions and cases present in only one artifact. Same-name duplicates are
compared as status-count groups, never guessed per case. CI publishes the v2
JSON beside the original XML in each non-Windows ctest-logs-<key>. Exit 0 means the observation is
readable, even when tests failed or skipped; exit 2 means unavailable/incomplete
evidence, not a CTest verdict. Empty reports never claim that every test ran.
A leg whose full suite was skipped (a pull-request head on the fast tier, a
build that stopped first) has no ctest.junit.xml by design; the step then
passes --fallback <ctest-pr-fast.junit.xml> --not-run-reason ..., so it
observes the fast tier's report or records observation: not_run with the
reason and exits 0. Before that, every fast-tier PR head carried a red
exit code 2 annotation that meant nothing. A suite that ran and left no
report still exits 2. No
test is executed, provisioned, or selected by this helper.
Four things bite when touching this:
--output-junit path must be ABSOLUTE. With --test-dir, ctest
resolves a relative report path against the build dir, so
--output-junit "$PULP_BUILD_DIR/ctest.junit.xml" lands at
$PULP_BUILD_DIR/$PULP_BUILD_DIR/ctest.junit.xml. Nothing errors, and the
upload step's if-no-files-found: ignore swallows the miss — the observation
silently observes nothing.run / fail / notrun / disabled.
A failing test ran; only notrun and disabled are non-runs. Filtering on
status != "run" files every failure under "did not run".ctest -N is the control for the flag itself. It is the registered
population; the report's tests= is the attempted one. Any gap is created by
-LE label exclusions, --exclude-regex, or configure-time absence, which
remove a test from the report entirely — a strictly larger blind spot that a
JUnit report cannot see. No <testcase> entries provides no execution
evidence; it can also be the honest result of an empty selection.tools/scripts/test_ios_gate_skip_contract.py exists to prevent, after doing
it in the Build step took the iOS gate out. Visibility and enforcement are
separate changes; make the skip readable first, and promote only against a
measured population.When agent-capability-installed-sdk is required for an ARM64 macOS capability
change, build.yml installs the tested Release build and publishes
pulp-gpu-audio-sdk-<sha>-macos. The archive and adjacent JSON receipt contain
the same checkout's PulpConfig.cmake, public headers, libraries, source SHA,
and per-file hashes. Downstream validation must use that exact prefix and the
receipt's source_sha; a build-tree target check or an unbound SDK directory is
not installed-SDK evidence.
An upload reset after green tests is not a test failure. ECONNRESET from
actions/upload-artifact has failed the required gate on m5 after every test
passed. The ctest-logs-<key> upload is now continue-on-error (a missing
log artifact on a green run means the upload failed); the SDK upload retries
once after 90 s with overwrite: true and only then fails the job, because a
green job must imply the artifact exists.
Before making any other upload non-gating, map its readers first. The macOS
plugins-<key> bundles have none, and the ios-gate-ok-<digest> marker only
saves a rebuild, so both are continue-on-error. Receipts and A2T evidence
are read by merge decisions and must keep failing the job.
Configure should not clone. setup.sh primes every dependency
PulpDependencies.cmake fetches unconditionally into the shared FetchContent
cache, at CMake's exact GIT_TAG and in the directory its
pulp_register_fetchcontent_source REF names. Configure-time clones have no
retry, so a Failed to clone repository / Could not resolve host in a
configure log (often the iOS-simulator configure, which resolves dependencies
a second time) means a new unconditional FetchContent_Declare was added
without a registration and a setup.sh priming call.
test_setup_source_cache.sh fails on that drift, and on any setup.sh curl
that lacks --retry-all-errors.
pulp-view-audio archives are immutable release assetsview-audio-archive.yml runs only when dispatched on main and builds only
the commit it runs on, so the commit a consumer re-pins to is whichever main
commit was dispatched. It publishes
libpulp-view-audio.a, its manifest, symbol floor, floor-gate verdict,
SHA256SUMS and the Sigstore bundle as an immutable prerelease tagged
artifact/pulp-view-audio/<sha>. Things that look optional are not:
github.sha removes the input, so an archive exists only for main commits
someone dispatched it on. It has no push trigger on purpose: a prerelease per
main push would also crowd SDK versions out of pulp sdk's release list.setup.sh and build in a job whose actions can write the default branch's
cache scope. A contract test fails on any actions/cache, setup-* action
or cache input in that job.ZERO_AR_DATE=1 is load-bearing. Apple ar/ranlib stamp member and
symbol-table times. The workflow's rebuild field records a second clean
configure and build of the same checkout into a separate build directory on
the same runner (kind: separate-build-dir); without the variable that
second archive differs. It says nothing about another runner image.nm through tools/scripts/nm_symbols.py. The floor
is a contamination check and uses defined_any() (every type but U/w/v, so
weak W/V, GNU unique u and indirect i all count): a class's typeinfo
or vtable is often weak and is still the archive's. The closure gate uses
defined_strong(), because two archives emitting the same inline function
do not depend on each other.view_audio_archive_manifest.py verify-release --dir <assets> --source-sha <sha> --repository Generous-Corp/pulp is the whole check in one command, and
the publish job runs it on the staged draft before publishing. It runs gh attestation verify on all five attested files with --bundle (the only
reason it works without a token), --source-ref refs/heads/main (the only
thing that rejects a modified copy of the workflow dispatched from a branch)
and --source-digest <sha>, then verify with the floor, the gate output,
--require-gate-pass and --require-identical-rebuild, which carry what the
signature alone does not.contents: read
and no token or OIDC grant, so nothing setup.sh fetches can sign; the
publish job re-verifies the uploaded bytes before attesting them. A failing
floor gate, or a rebuild that is not byte-identical, stops in the build job
before any tag exists.v*, and is therefore unprotected. v* is the
protected release-tag ruleset and the trigger for release-cli.yml /
sign-and-release.yml; a tag such as view-audio-... would match that glob.
Because artifact/* has no ruleset, the publish job refuses an existing tag
or draft that does not point at the commit (or a draft with unexpected
assets), creates the tag itself, verifies the staged draft (tag, exact
assets, attestation of what was downloaded back) and only then flips
--draft=false; immutable: true can only be checked after that flip. A
run that finds the commit already published verifies that release instead
of trusting it. Keep the release a prerelease with --latest=false so
/releases/latest and pulp upgrade never see it..github/workflows/dependency-requests.yml checks that a Pulp-only configure
(GPU off) requests no UI stack: no Skia, Dawn, wgpu-native, Vellum, RmlUi, Lua
or FreeType. Don't replace it with a download log. A shared FetchContent cache
satisfies a request without downloading anything, so "nothing was downloaded"
reads the same whether a dependency was unneeded or already cached.
tools/ci/dependency_request_recorder.cmake, injected with
CMAKE_PROJECT_TOP_LEVEL_INCLUDES, logs what was REQUESTED instead.
Three things it cannot see on its own:
FETCHCONTENT_SOURCE_DIR_<NAME> override,
which is exactly how setup.sh wires in the shared source cache. An
end-of-configure pass records those, but only for dependencies that were
actually populated.file(DOWNLOAD) are logged only where the
project calls dependency_request_recorder_note(). Skia and Dawn do.The job's second configure is the control: GPU on, with
PULP_SKIA_AUTOFETCH=OFF so it skips the download. It must show Skia and
WebGPU. A forbidden-list pass without a green control proves nothing.
The Pulp-only configure runs under tools/ci/run_without_network.sh (a fresh
network namespace on Linux, sandbox-exec on macOS), so a download path that
makes no note fails instead of passing unseen. Two controls go with it:
--probe must see github.com blocked inside and reachable outside, and a GPU
configure against an empty PULP_SKIA_CACHE_ROOT must fail at the Skia
download. Be precise about what this proves. The configure downloads
nothing, but the bootstrap step before it (setup.sh --deps-only) still primes
the shared caches with the network on, so it is not proof that a dependency
was never fetched on the runner.
Making a skip visible is safe. Removing the skip is not, and the two must not ride in one change — the second can redden the required gate for the whole fleet while the first reddens nothing.
pulp-rust-gpu-trace-analysis-integration is the worked example. It is the only
registration that runs the GPU trace-analysis acceptance tests, and it skips
whenever the pinned trace_processor_shell is absent, which is always: nothing
in .github/** or .shipyard/** installs it (0 files mention
PULP_TRACE_PROCESSOR, trace fetch, or trace_processor_shell, against a
control of 79 workflow files matching runs-on).
One measured run with a pulp trace fetch step added established the facts,
and they are worth keeping even though the step was withdrawn:
pulp trace fetch returned success on
studio-pulp-gate-01. Network access was never the blocker.untagged_tooling_failure_cannot_hide_behind_a_tagged_healthy_probe,
and it fails on main independently of any branch. So provisioning the
dependency turns the required macos gate red for every PR until that test's
probe semantics are settled.Hence: land the reporting, hold the provisioning until the failure it exposes has an owner. A skip that is reported costs nothing; a skip that is removed spends the fleet's merge capacity on somebody else's open question.
Note when reasoning about persistence: the required macOS gate is an
ephemeral lane (tools/scripts/runner_topology.json lanes[0]), a Tart clone
destroyed after one job, so nothing a job writes to $HOME — a fetched
~/.pulp/tools/... included — survives into the next run.
The section above says a ctest SKIP reads as a PASS. The corollary bites on the other side: installing the dependency those tests skip on is also invisible. An install step that silently targets the wrong interpreter, or covers less than the declared set, exits 0 and leaves every dependent test skipping — so the lane reports green twice, once for the install and once for the tests that never ran.
Three things make that failure mode concrete, and the third is the only real fix.
The interpreter must be the one CMake configured, not the one the shell
resolves. ctest launches a Python test through Python3_EXECUTABLE, which
find_package(Python3 COMPONENTS Interpreter) baked into the cache at configure
time. A runner can easily carry several interpreters, and python3 -m pip install in a workflow step resolves whichever is first on PATH. Read the
cache entry instead and install into that:
py="$(sed -n 's/^Python3_EXECUTABLE:[^=]*=//p' "$PULP_BUILD_DIR/CMakeCache.txt" | head -1)"
Fail the step when that comes back empty rather than falling back to python3:
a fallback is exactly the silent no-op this is guarding against. Note also that
nothing in build.yml runs setup-python, so the interpreter is the runner's
own — there is no pinned version to reason from, only the cache entry.
The declared set is wider than any single skip message admits. A skip
message names the dependency its guard checked, which is the first guard, not
the last. The motion visual self-checks guard on Pillow and say so, then call an
analyzer that imports numpy, Pillow and skimage.metrics.structural_similarity
before it will run. Installing what the message named moves them from a Pillow
skip to a scikit-image skip: still notrun, new message, no progress. Install
from the declared file (tools/motion/visual/requirements.txt, which
tools/deps/manifest.json already carries and audits) rather than from a
hand-listed pair read off a skip line.
CI installs the lock, not the ranges. After the no-network
--dry-run --no-index satisfied check (which still runs first and ends the
step when the floor is already met), build.yml installs
tools/motion/visual/requirements.lock — the pip-compile --generate-hashes
resolution of requirements.txt — under --require-hashes. Adding a
requirement means regenerating the lock (command in its header);
test_visual_python_deps_step.py fails if a declared name is missing from it or
a pin lacks a hash. The step installs from a host wheelhouse first when a tartci
guest declares TARTCI_PIP_WHEELHOUSE, then from the index with three spaced
attempts. A Tunnel connection failed: 403 Forbidden in this step is the guest
egress relay refusing PyPI, not a package problem: 27 m5 gate jobs failed that
way on 2026-09-22/23 until tartci allowed pypi.org and
files.pythonhosted.org. PEP 668 is probed once (EXTERNALLY-MANAGED beside
the stdlib) rather than by retrying each install, so an index outage is not paid
twice per attempt.
Crates and Chrome are fetched before the build, not inside it. A red
macos whose Build or pulp-rust-* ctest shows Could not resolve host: index.crates.io / static.crates.io, or whose Chrome step exits 6 or 56, is
the gate VM's network, not the diff. Fetch pulp-rs crates runs cargo fetch
on experimental/pulp-rs/Cargo.lock with three spaced attempts and only warns
on exhaustion; PULP_CARGO_NET_OFFLINE=1 (repo variable, off by default) then
exports CARGO_NET_OFFLINE=true. The Chrome download uses
--retry-all-errors, because plain --retry skips resolve and reset errors.
test_build_fetch_resilience.py fails on a curl in the build job without
--retry-all-errors, so a new unretried download cannot creep back in.
Required workflows retry pip and git through tools/ci/net-retry.sh. The
same test fails on a pip install or git fetch/git clone in
vellum-freeze-check.yml, vellum-trusted-gate.yml or version-skill-check.yml
that neither goes through the helper nor sits in a step with its own
for attempt loop. Wrap only the network command, never a check whose failure
is a verdict. Watch out: a job that checks out a different commit than the
workflow file came from (the trusted merge-group job checks out
merge_group.base_sha) cannot call a helper this PR adds, because the base
commit predates it; the first merge group would fail with No such file. Keep
such retries inline. The macOS ccache step uses an installed ccache (the gate
golden bakes it) and never calls brew install then.
apt installs in workflows go through tools/ci/apt-install-retry.sh. A
mirror publishing a security update mid-job leaves the fetched index pointing at
a 404 .deb; the helper reruns apt-get update and retries the install, 3
attempts (test_apt_install_retry.py stubs apt-get to prove it). Call it with
sudo. A step that runs before checkout (the release-cli.yml container
pre-setup) carries the same loop inline as apt_install.
A deleted gh-readonly-queue/... branch is merge group gone, not a red.
hydrate_gpu_provenance_commits.py prints a ::notice:: for it and falls back
to the event commit; only other fetch errors print bounded fetch failed.
Before attributing a hydrate-step red to a vanished queue branch, check that the
run's workflow commit carries the event-commit fallback at all.
Every job that runs a broad ctest installs the set through
tools/ci/install_visual_python_deps.sh <build-dir>; a workflow that runs ctest
without it makes visual-python-deps-present red in every run (the sanitizer
jobs did, main-wide). The Shipyard mac lane runs ctest outside any workflow,
so it calls the script at the end of its macOS configure stage in
.shipyard/config.toml. test_visual_python_deps_step.py pins both the
script's behaviour and which jobs and lanes call it.
relay_contract_check.py scans a shell script a gate step runs (bash tools/...sh) as part of the step, so moving the install into the script kept
pypi.org derived; without that, the relay contract would have stopped
requiring PyPI egress for the gate.
Comments are stripped first (comment lines and a trailing # that starts a
word outside quotes), so a script, URL or package manager named only in a
comment never adds a required host.
test-pch-wiring reads compile flags back from the generator. Ninja lists one
compile line per object; the Makefile generator, which the hosted sanitizer jobs
use by default, writes a target's PCH flags per object as a # PCH options:
comment in flags.make, not in CXX_FLAGS. Reading only CXX_FLAGS reported
every consumer of a correctly wired Makefiles tree as "flags name no PCH".
One registration in the set must not be allowed to skip. Everything above is
still unfalsifiable on its own — a wrong interpreter and a short dependency list
both produce a green step. visual-python-deps-present exists for that: it
imports every distribution the requirements file declares, carries no
SKIP_RETURN_CODE, fails when any are missing, and names all of them in one run
rather than one per round trip. It also fails when the requirements file is
absent or declares nothing, so an emptied file cannot pass it vacuously. Its own
coverage (visual-python-deps-selftest) is deliberately pure stdlib: the
selftest of the one check that must not skip must not acquire a dependency that
could make it skip.
The general shape, worth reaching for whenever a lane's health depends on something being installed: pair the provisioning step with one non-skippable test that asserts the provisioning worked. The install step reports that it ran; only the test reports that it landed.
Build-time npm is installed before the build (PULP_OFFLINE_BUILD). The
Three.js bundler used to npm install esbuild mid-build whenever
tools/scripts/node_modules was absent, which on an ephemeral gate VM is every
run; a getaddrinfo ENOTFOUND registry.npmjs.org then red the required macos
check as an iOS compile gate exit 65 (3 jobs, 2026-09-27..29, m1/m3/m5). The
build job now sets PULP_OFFLINE_BUILD=1 (bundler exits 3 naming
npm ci --prefix tools/scripts instead of fetching) and the Install
build-time Node dependencies step runs npm ci from the lockfile with three
spaced attempts before Build. An npm error in that step is the registry or
the guest's egress, not the diff. Any new build step or ctest that fetches must
follow the same split: provision in a retried step, refuse under
PULP_OFFLINE_BUILD. Known remaining in-build fetches: cargo (Rust CLI build
and pulp-rust-* cargo ctests pull crates) and the iOS gate's Skia simulator
slice (fetch_skia_for_release.py, which retries transient download errors
itself but is fetched fresh into the gate build tree each run).
.githooks/pre-push used to pass itEvery gate script here fails closed on its own: a missing or unreadable config exits 2, having checked nothing. The hook then threw that away. Each gate's catch-all branch was
case $? in
0) ;;
1) fail=1 ;;
*) echo "[pre-push] <gate>: internal error" >&2 ;; # prints, does NOT set fail
esac
so any exit code above 1 printed a line and fell through as a pass. A gate that could not find its config reported SUCCESS, which is indistinguishable in the output from a gate that ran and was happy. That false green let a missing version bump ride: no tag, no release.
The exit-code contract every Pulp gate now follows, and every caller must honour:
| code | meaning | caller must |
|---|---|---|
| 0 | ran, check passed | continue |
| 1 | ran, check FAILED | block — a real verdict |
| 2+ | could NOT run — config missing/unreadable, empty corpus, crash | block |
.githooks/lib/gate-output.sh exports gate_could_not_run; every catch-all
branch routes through it and sets fail=1. The gate's status is captured into
$gate_rc before case consumes $? — a branch that reads a bare $?
inside the case gets the wrong value, so test_prepush_cannot_measure.py
asserts the capture count equals the branch count.
Two things are worth knowing before you touch this:
format_changed is the one deliberate exemption. It is advisory by
contract and carries its own documented 3) SKIPPED branch for a machine
with no clang-format. The test pins it as the single exemption by name, so a
future gate quietly adopting the old fall-open shape is a test failure rather
than a silent drift.The sibling shape is a gate whose corpus comes back empty.
build_parallelism_guard printed OK — 0 build surface(s) bounded and exited
0 when its sweep matched nothing — the reading it gives when pointed at the
wrong tree. An empty scan is not a clean scan; it now exits 2 naming what it
searched. When you write a whole-tree gate, decide explicitly what a zero means
and assert a floor.
Shipyard carries the same two scripts and had the same hook shape. Its copies
additionally hard-coded Pulp's tools/scripts/versioning.json, so a bare
invocation in that repo never found its config at all; they now resolve
scripts/versioning.json first and name every path searched on failure.
A LABELS "slow" exclusion at least leaves the test visible in a ctest listing.
A test registered inside if(PULP_ENABLE_<FEATURE>) on a lane that never sets
the flag is not skipped and not excluded — it is never registered, so it appears
in no output, no label names it, and no count changes when it disappears.
PULP_ENABLE_SCENE3D defaults OFF (CMakeLists.txt), and for a long time
nothing in .github/workflows/ or .shipyard/config.toml set it. The whole
Renderer3D and scene3d surface — 205 tests — ran on no lane at all while the
required macos gate stayed green. PULP_ENABLE_GPU defaults ON, which is why
the neighbouring GPU tests never showed the same hole.
The check is one line, and it needs its control:
grep -rn "PULP_ENABLE_SCENE3D" .github/workflows/ .shipyard/config.toml # 0
grep -rc "PULP_ENABLE_GPU" .github/workflows/build.yml # 2
Without the second line a zero is ambiguous between "not wired" and "bad grep".
.github/workflows/scene3d-advisory.yml now covers that surface: path-filtered,
advisory, macos-15, SCENE3D ON, not on merge_group. The Vellum SDK consumer lane also turns SCENE3D ON, for integrations/pulp-vellum-renderer3d
(the scene3d renderer on gpu-runtime's device) and integrations/pulp-vellum-scene
(Vellum's Draco decoder behind the glTF loader hook): those packages refuse to
configure without pulp::scene. Three things about the scene3d lane
generalize to any lane you add:
ctest -R is case-sensitive and grep -i is not, so a regex checked with
grep can select far less than you think. -R 'renderer3d|scene3d' takes 144
tests; -R '[Rr]enderer3[Dd]|[Ss]cene3[Dd]' takes 205. The short form exits 0.--no-tests=error, and assert a floor
on the count from ctest -N: the flag catches a selection that matched
nothing, the floor catches one that merely shrank.SUCCEED() on absence
reports a pass for a case that never ran; SKIP() reports Skipped, because
PulpCatch.cmake sets SKIP_RETURN_CODE 4 for any suite that does not opt
into SKIP_IS_FAILURE. Check that before trusting a new lane's green.The private planning/ submodule is unavailable to every hosted lane by
construction — submodules: false appears throughout .github/workflows/ and
submodules: true|recursive appears nowhere. A test that reads from it can only
be excluded, never fixed, on such a lane. Check the transitive dependency: of
the two scene3d-native-slice-handoff tests, only one names the plan file in
its ctest arguments; the other reaches it through a verifier that hardcodes the
path, so excluding the obvious one alone leaves a permanent red.
The Build step skips the iOS compile gate when tools/ci/ios_gate_digest.py decide finds a PASS receipt (ios-gate-ok-<digest>) for the exact input
digest written by a TRUSTED run: this repo's build.yml, merge_group or
same-repository pull_request, marker naming the same digest and run
(decisions contract row 23). One run id in ten and every schedule/push run is
a control that runs anyway; any lookup error runs it, and says so: a failed
request reads receipt lookup failed: <status> (summary, an
ios-gate-receipt-lookup warning, and lookup_error in the notice), never
"no trusted receipt". Receipt artifacts must be downloaded through
protected_merge_receipt.download_archive(): the archive URL redirects to blob
storage, and plain urllib.urlopen forwards the Bearer token, which the blob
host rejects with 401 on every download. pulp-ios-gate-shadow/v1
notices record skipped / control_run / would_skip / run, then
ran_ok / ran_failed. A control_run or would_skip followed by
ran_failed means the input set missed a file: set the repository variable
PULP_IOS_GATE_DIGEST_MODE=shadow (no workflow edit), widen INPUT_PATTERNS
/ CONFIGURE_REACHED_DIRS, then re-enable. The set must stay a SUPERSET of
what the gate reads: anything the gate or its configures execute (the GPU
leg's AUv3 post-build runs tools/scripts/bundle_threejs_for_jsc.mjs, which
npm installs from tools/scripts/package-lock.json) belongs in it, and a
narrowing change needs a new shadow window. The gate's own network fetches
(npm, Skia) are NOT inputs; a same-digest fail-then-pass is a flake, not a
missing input, when the log shows a fetch error.
would_skip_failed is the numbertools/ci/test_receipts_shadow.py (a fourth instrument in
merge_group_shadows.py) keys every ctest entry on its executable, named
files, properties, toolchain, CI policy, and declared inputs (script tests) or
runtime surface + build products (compiled tests — they read the source and
build trees through PULP_SOURCE_DIR/PULP_BUILD_DIR, which their bytes do
not capture). Merge-group runs upload test-receipts-macos; each run reports
what the last 20 trusted receipts WOULD have skipped. Nothing is skipped. The
always-run rules (drift/lint/guard/probe names, pr-fast/GPU/host labels,
top-level-directory declarers, unkeyed tests, recent failures) and the forced
full run on a CMake change or control run id are the contract any enforcement
inherits. Do not enforce while would_skip_failed is ever nonzero or binary
identity (binary_identity_shadow.py report) is below ~100%: an unreproducible
binary only means zero hits, but a missed runtime input means a false skip.
The shadow step sits on the required merge-group job's critical path (about
3.2 min median). Only binary identity's hashes (our-identity.json) and the
receipts' keys (test-keys.json) feed the reuse record; the affected-test and
flake-exoneration instruments only annotate. Before moving or dropping any of
them, read the merge-group shadows timing: line the runner prints after its
summary (each instrument's wall seconds, also flushed as <label> took <s>s
when it finishes), not the step total.
pulp_test_data()A compiled test that opens checkout files at run time (fixtures, schemas,
scripts it shells out to) reads inputs no build edge records, so a result
keyed on build inputs alone would reuse a verdict whose data changed.
Declare the reads next to the registration in test/cmake/*_tests.cmake:
pulp_test_data(<suite-or-exe> PATHS <repo-relative files, dirs, globs>)
(tools/cmake/PulpTestData.cmake). It defines PULP_SOURCE_DIR for that
suite's sources (grouped members: only their own sources), so drop the
COMPILE_DEFINITIONS PULP_SOURCE_DIR=... it replaces, and every path must
match something at configure or configure fails. The generator folds the
configure evidence into the same test/ctest_script_inputs/ under
executables (kind: compiled); regenerate it as for script tests.
A source that names PULP_SOURCE_DIR, test/fixtures, or a definition
pointing into the checkout, with no declaration covering it, marks its
executable data: undeclared (the shadow selects it on every change). The
pr-fast script-test-inputs-drift check fails a PR head that adds a NEW
undeclared source (one not undeclared in the base list); the backlog can only
shrink. A test that reaches its data through its own definition
(PULP_REPO_ROOT, a fixture-dir macro, a walk up from its working
directory) declares with NO_DEFINE so its flags stay identical. Never build
a fixture path from __FILE__: the self-hosted Macs set ccache base_dir,
which rewrites __FILE__ relative to the compiler's cwd (Ninja's build
tree), so path(__FILE__).parent_path() becomes ../test and resolves only
from build/, never from build/test where ctest runs. Hosts without
base_dir (GitHub runners) keep the absolute path, so only the local lanes
fail. Use pulp_test::fixture_root() (test/support/fixture_root.hpp, which
checks the root holds test/ and names it and the cwd when not) with the
PULP_SOURCE_DIR definition; the test-file-paths-lint ctest rejects
__FILE__ path forms under test/.
SOURCES narrows a declaration to some of an executable's sources (a group
or multi-source target), and NONE records a reviewed source whose
test/fixtures text is only a comment or a temp-staged fixture. A test that
spawns the pulp / import-design CLI or a compiler against the checkout
stays undeclared: the child's reads are not the test's to bound. Declare only what the code opens: a test that hands the whole
checkout to a CLI subprocess or doctor walk is not boundable and stays
undeclared. Declaring a subset is worse than not declaring, because it
makes an unsound key look sound. Count with
script_test_inputs.py --build-dir <dir> --data-summary.
A compiled test that runs or loads another target this tree builds (a CLI,
tool, fixture executable or MODULE) declares it with
pulp_test_spawns(<test> <target>...) (same module). Never write
if(TARGET <tool>) add_dependencies(...) in test/cmake: the test directory
is read before tools/cli, tools/import-design and examples/, so the
guard is false and the edge silently never exists (cli-import-design ran
against whatever pulp-cpp was lying around for that reason).
pulp_test_spawns adds the edge once the whole tree is read. The configure
fails when a definition names $<TARGET_FILE:x> without an edge to x.
script_test_inputs.py scans each test's sources and the test/ headers they
include, comments stripped, for process API calls and for runtime loads
(PluginSlot::load, the CLAP bundle scanner, dlopen and its shim,
LoadLibrary, CFBundle). One with no edge and no reviewed
pulp_test_spawns(<test> NONE REASON "<why>") (it starts only system tools, a fork of
itself, or an in-process plugin) is spawns: undeclared, and the shadow
never skips it. The REASON is required at configure time and must state a
claim; a NONE test that reads a build-path environment variable or walks a
build directory also needs a review in tools/ci/spawn_none_build_path_reviews.json.
A public function that reaches a loader must itself be in LOAD_APIS or in
tools/ci/load_api_exemptions.json with the mechanism that covers it. Pass a built artifact's path in from
CMake ($<TARGET_FILE:x>, or the bundle path beside its edge); never find it
by a path relative to the working directory. pulp-test-host's PulpSynth case
did that and silently skipped for its whole life. The scan cannot see a
spawn inside linked library code (the MCP audio tools shell out from
tools/mcp), and "declared" means one edge, not all of them, so read what a
test runs before marking it. The MCP audio tests now stage this build's CLI
under a temp project root (CliProjectRoot) and assert text only a real run
prints.
One edge is not enough. Configure writes
<build>/test/test-data/runtime-targets.json (every program or module the
tree builds, by artifact file name, with its own runtime targets). The scan
checks every string-literal path component in a spawning test's code that
names one of those artifacts ("pulp-cpp"): it must be reached by an edge,
directly or through a program the test runs, or be reviewed with
pulp_test_spawns(<test> NOT_RUN <target>...) (named but never run, e.g. a
fake staged at the real tool's name). Otherwise the test is spawns: undeclared with unmatched_programs. A built test whose declared tool this
configuration does not build is recorded as absent_spawns, named in the
configure output, and stays undeclared there; Linux and Windows build fewer
tools than macOS, so the same test can be declared on one and undeclared on
another.
test/ctest_script_inputs/The list is one fragment file per entry, not one document.
tests/<slug>.json holds one script test, executables/<slug>.json one
scanned test executable, meta.json the schema
(tools/scripts/script_inputs_store.py). The single generated file was the
most conflicted path in the repository (75 commits on main in one week);
fragments let two PRs that add different tests merge without a conflict.
Every reader goes through script_inputs_store.load() / load_ref(), which
assemble the combined document and fall back to the old single file at
revisions that predate the split. A fragment named for the wrong entry, a
stray file or a conflict marker raises StoreError, and the drift check
fails closed on it (cause_class=INCONSISTENT_FRAGMENTS). A conflict in a
fragment means both PRs changed the SAME test: regenerate, never hand-merge.
Never re-create test/ctest_script_inputs.json. hotspot_edit_guard.py
(pre-push, gates.sh, and the pr-fast hotspot-edit-guard ctest that
drift-fast runs) refuses any branch that adds or modifies a path registered
in tools/scripts/hotspot_edit_guard.json, and the drift check refuses the
single file beside the directory (cause_class=AGGREGATE_REINTRODUCED). A
branch cut before the split that edited the old file: merge origin/main,
take main's deletion, then --write. Register another aggregate in the
guard only after its fragments exist, or every legitimate edit is refused.
The build graph cannot see what a Python, Node or shell ctest reads, so the
affected-test shadow used to count all ~400 of them affected on any script
change (44% of gate test-seconds). tools/scripts/script_test_inputs.py
generates their inputs (Chromium's .pydeps pattern) and the pr-fast
script-test-inputs-drift check is DIFF-SCOPED: it fails a PR head only for
drift in scripts the PR's own diff touches (entry script or a listed input;
base = origin/$GITHUB_BASE_REF, or HEAD^1 in a merge group) and reports
drift from main's own movement as an advisory note. A generated file drifts
every time main moves; failing every PR for someone else's script was a
treadmill. Regenerate with --write against a configured build dir and
commit the file; --check --full shows every stale entry.
A test the generator cannot bound (cmake-driven, no command) has no entry
and stays fail-closed; do not hand-edit entries to make a test look narrower.
Never hand-edit test/ctest_script_inputs/; regenerate it with
--write against a configured build-gate.
Every PR that adds or changes a script-driven test must regenerate the
list (python3 tools/scripts/script_test_inputs.py --build-dir <dir> --write, then commit test/ctest_script_inputs/) as its LAST step;
the diff-scoped check fails the PR head otherwise and prints that command.
Run it after every rebase onto main too: main's new script tests are
advisory drift, but a rebase that touches one of yours is blocking.
The check blocks only on the PULL-REQUEST HEAD (pr-fast, every push, where
you see it); in a merge group it reports the same drift as a ::warning
and lets the batch land, because ejecting a batch over a stale generated
list cost two groups on 2026-09-29 for a PR whose head predated the check.
--write does not depend on the local configure: a test registered from
examples/** (the gate builds PULP_BUILD_EXAMPLES=OFF; the scope comes
from docs/status/consumption-profiles.json) is dropped by its ctest
backtrace, and an entry script generated into the build tree is recorded as
${CMAKE_BINARY_DIR}/..., never under the build directory's name. An
examples-ON Debug build/ and a Release examples-OFF build-gate/ of the
same tree write byte-identical lists, so never hand-drop auval-* entries
or rename a build-dir path; if the two differ, the generator is wrong.
PULP_SCRIPT_INPUTS_STRICT=1 makes it block anywhere.
Merge-group macos jobs carry a pulp-affected-tests-shadow/v1 notice
(tools/ci/affected_tests_shadow.py): the ctest entries the Ninja graph says
the change reached, plus failed_outside_selection. It is evidence for a
future selector, read as a count that must be zero over a long window, and
its fail-closed rules (CMake change selects all; script-driven tests are
affected whenever a script surface changed; a changed file no edge reads
selects all) are the contract any real selector inherits. The ctest step takes
no input from it; do not wire it into -R/-L without a contract decision.
A test that spawns another built program (pulp-cli, pulp-import-design, a
fixture runner) or loads a module at run time is reached only through the
add_dependencies(<test> <tool>) edge, which Ninja records as order-only and
the graph drops. tools/ci/spawn_closure.py reads that edge from the CMake
codemodel's dependencies, and any consumer of "which tests does this change
reach" (the shadow today) must go through it rather than walk the codemodel
itself. Give every spawned tool or loaded module an add_dependencies on its
test, or the closure cannot see it.
ccache --show-stats counts for the life of the cache directory, and the
gate VMs mount one directory per host. Across 13 merge-group jobs that each
compiled the same ~10k TUs the denominator ran from 4,315 to 67,142, so that
line cannot show a cold or poisoned cache on the job that printed it (the
09-26 poisoned-ccache incident, 18 red jobs on one host, was invisible in
it). Read the ccache per-job: line the same step prints instead:
tools/ci/ccache_job_delta.py diffs --print-stats snapshots taken before
and after the Build step. No per-job line means the instrument failed (exit
2), never that the cache hit; the cumulative line stays for continuity.
Typical healthy job: misses 13–315 of ~10k calls.
continue-on-error step's conclusion is not its outcomeThe jobs API reports conclusion: success for a continue-on-error step that
FAILED; only outcome (visible to later steps' if:) says it failed. This
is how the PR-head receipt issuer failed on every full-suite run for days
("CTest selection lists a test twice", 21 duplicated ctest names) while the
API read success and the Publish step was merely "skipped": 12 runs should
have issued, 0 did, 0 annotations named why. Two rules follow. A
continue-on-error step must announce its own failure (::warning with the
reason plus a job-summary line; the receipt step now does). And when a
downstream step is unexpectedly skipped, read the upstream step's LOG, not
its API conclusion. The pr-fast ctest-unique-names guard now catches the
original cause on the PR head.
pulp-binary-identity-shadow/v1 on merge-group macos jobs compares the
group's own test-binary sha256 list with the PR head's receipt. Until
tools/ci/binary_identity_shadow.py report shows n >= 20 tree-identical
groups at ~100% identical, no design may assume two VMs link the same bytes;
a differing path names the linker input to normalise (embedded path, UUID,
timestamp) before any per-binary reuse is proposed.
reuse-record-macos, not ctest-logs-macosEntry-delta attribution uses main-push observations made before each merge group's creation and recorded predecessor links to recover its historical batch base. Today's main ancestry does not establish that base. Missing history stays unknown. Input declarations, source scans, and deterministic tiers come only from the tested checkout; an unavailable checkout cannot use its parent or today's main as a substitute.
ctest-logs-macos expires in 7 days, and its LastTest.log is NOT the suite's:
every ctest call after the run (the --show-only listing, the GPU-adapter
probe) replaces that file, so the artifact holds only the last probe's block.
For outcome, attempts, duration and executable per test over 90 days, read the
reuse-record-macos artifact (tests.jsonl, identity.json, job.json;
tools/ci/reuse_record.py), which every macos job writes. attempts is null
where a --repeat suite left no log (the pull-request affected-test batches),
never guessed as 1. A missing record announces itself as reuse-record NOT written; count those annotations before calling the record complete.
Link maps (-DPULP_RECORD_LINK_MAPS=ON) run through a linker launcher, so
two traps apply. add_custom_command(TARGET ... POST_BUILD) cannot attach to
a target from another directory, which is why the map is post-processed by
the launcher rather than a post-build step; and a launcher is copied into a
target when it is defined, so PulpLinkMaps.cmake must be included before
the first target (and before FetchContent). The launcher must exit with the
linker's status and fall back to the plain command whenever it cannot write
its record: recording may never fail a link.
codemodel-<sha>.json digests only named codemodel fields: never hash a raw
target record, whose backtrace indices move whenever an unrelated line of
CMake moves. A ctest registration belongs to the target whose artifact is its
command[0]; on an unbuilt tree Catch2 discovery has listed nothing, so every
compiled test is missing and only script tests (owned by no target) appear.
Key a generated file by its CONTENT, never its path: configure_file keeps
the path when VERSION moves, and the control-shipping / inspector marker
sources carry a per-configure build nonce. Do not widen "what a target can
include" to every header under a build-tree include directory: core/runtime's
generated build_info.hpp (configure timestamp) sits in an include directory
629 targets inherit, which re-keys 560 of 789 targets on every configure; the
Ninja dependency log says which few actually include it.
file(GENERATE) whose CONTENT holds a per-configuration generator expression
($<TARGET_FILE:...>, $<CONFIG>, anything under a config-dependent output
directory) breaks every multi-config generator: Xcode and Ninja Multi-Config
evaluate the file once per configuration, and the configure fails with
"Evaluation file to be written multiple times with different content". The
macOS gate is single-config Ninja, so only the iOS compile gate (Xcode) sees
it. Write configuration-free content (a target NAME, resolved later through
the codemodel), or put $<CONFIG> in the OUTPUT path. Reproduce with a
-G "Ninja Multi-Config" configure before pushing; tools/ci/
test_commit_bound_cmake.py carries that case.
A byte difference between two builds of identical recorded inputs is not
automatically a link or host artifact. Release links carry no N_OSO debug map,
and LC_UUID and the code signature follow content, so strip (strip -S) and
unsign (codesign --remove-signature) copies and map the remaining offsets to
sections before naming a cause. pulp-test-runtime differed by one __text
instruction: REQUIRE(kGitSha.size() >= 7) captures the length of
git rev-parse --short HEAD (build_info.hpp), and git's abbreviation length
grows with the clone's object count, so the same commit stamped 7 characters
in a shallow clone and 10 in a full one. core/runtime now pins
--short=12; a new length-dependent stamp must pin its length too. The v2
codemodel digest keys build_info.hpp's content either way, so such a target
re-keys rather than being normalised.
Adding or changing a Python selftest or script drifts three generated files,
and each one fails a different check on the PR head if it is hand-edited:
test/ctest_script_inputs/ (script-test-inputs-drift),
tools/ci/source_selftests.json (source-selftest-lane-contract, which also
compares each entry's TIMEOUT, RESOURCE_LOCK and argv to the registration), and
the changed-surface script families file .shipyard/changed-surface-families.toml
(changed-surface-script-families-drift, which must map every new script and
list every new reader of .agents/skills/*/SKILL.md). Regenerate all three from
a configured build: script_test_inputs.py --build-dir B --write,
source_selftests.py write --build-dir B (--add <name> for a new entry), and
changed_surface_script_families.py --build-dir B --write (the build needs a
codemodel reply: touch B/.cmake/api/v1/query/codemodel-v2 and reconfigure).
No build dir at hand, or on a gate / dev-overflow host? Regenerate without
one: changed_surface_script_families.py --configure-only --write (about a
minute; on m3 the families file regenerated byte-identical to main), or for all
of them in one configure,
python3 tools/scripts/configure_only.py -- bash -c 'python3 tools/scripts/script_test_inputs.py --build-dir {build} --write && python3 tools/ci/source_selftests.py write --build-dir {build} && python3 tools/scripts/changed_surface_script_families.py --build-dir {build} --write'.
It runs setup.sh --deps-only, installs tools/import-design/jsx-runtime's
node_modules when missing (without them the configure omits two Node tests and
the generators refuse the tree as INCOMPLETE_CONFIGURE), configures with the
gate's switches, and deletes the tree; it refuses cmake --build/ninja/make
as the command. Keep the temporary tree under the worktree, never /tmp, and
named build-*, so CMake globs and git ignore it.
git add a new script or test before regenerating: the generator maps
tracked files only, so a regeneration run while test_foo.py is untracked
leaves it unmapped and the next --static check reports it newly mapped.
Still no configure possible? When script-test-inputs
fails in drift-fast, the run uploads the script-inputs-expected artifact:
the exact fragments --write would produce for the drifted entries
(--emit-expected DIR, default $RUNNER_TEMP/script-inputs-expected). Download
it and cp -R <artifact-dir>/. test/ctest_script_inputs/, then commit; the
failure log prints this recipe.
gates.sh runs all three checks in one lane (gates_script_inputs.py) whenever
the diff touches a Python file under tools/, test/cmake/, a skill doc or one
of the generated files, configuring build-gate without compiling if no current
build exists; any check it cannot run is listed NOT CHECKED, never passed.
The families check also has a build-free half, because a fresh worktree has no
codemodel reply and twice a new tools/scripts/test_*.py reached the required
gate unregistered (tools/scripts/<script>.py: newly mapped, ~40 min later).
changed_surface_script_families.py --static --base origin/main predicts each
added, removed or re-read script's mapping from the committed script-inputs list
at the merge base and at HEAD, and blocks a mapping flip the families file does
not carry. It runs in the pre-push hook (about a second) and first in the
gates.sh lane; the configured --check decides when the two disagree. When
gates.sh cannot run the configured check (PULP_GATES_NO_CONFIGURE=1, a
failed configure, a skip) and the diff touches a surface the families check
blocks (a top-level tools/scripts/*.py, a skill doc, the script-inputs list,
the generator, the config or the families file), it FAILS with the commands to
run instead of reporting NOT CHECKED. Your own new script needs the
regeneration too.
a2t-scope-history-headroom warning means: schedule the re-pinThe merge-group and full-suite macos jobs carry one
a2t-scope-history-headroom annotation (tools/ci/a2t_headroom_annotation.py,
fed by the guard test via PULP_A2T_HEADROOM_OUT). A ::warning from 60% of
A2T_SCOPE_HISTORY_LIMIT is advance notice; past 75% the required gate is
already red on every PR for a reason unrelated to any change. Re-pin only
A2T_SCOPE_HISTORY_BASE on protected main (contract row 22), choosing the base
from a full-history checkout: m3's primary checkout is shallow and a blob:none
partial clone, so a local walk there can miscount. Do not re-pin the GPU
handoff ledger in the PR; the version bot regenerates it. A missing annotation
on a job that ran the suite means the measurement broke, not that there is
room.
The same warning also exists as an issue. Each push to main runs the advisory
a2t-headroom-issue job (a2t_headroom_annotation.py --reconcile-issue, fed
by the Linux leg's a2t-scope-headroom artifact). It keeps ONE open issue
titled a2t-scope-history-headroom: <count>/<limit> ... from the 60% mark, and
closes it on the first push after a re-pin. When that issue is open, the re-pin
is due: do it then. Do not wait for the guard to go red. The job finds its issue by a
hidden marker. Closing the issue by hand does nothing useful, because the next
push reopens it while the count stays high.
A failed merge group carries pulp-flake-exoneration-shadow/v1
(tools/ci/flake_exoneration_shadow.py) on its advisory
flake-exoneration-shadow (advisory) job, not on macos: the job needs
build and reads the macOS leg's ctest-logs-macos JUnit, so the red
macos verdict (and the queue's ejection of the group) no longer waits
~95 s for the shadow's API reads. Look for the annotation there. Per failing test, would_exonerate
when it failed on >= 2 other heads in 24 h AND passes on main's tip, judged
by the tip's required gate job. It is evidence, not a verdict:
base_poison_detector.py records why cross-batch corroboration alone was
measured unsafe, and this shadow inherits that by requiring the main pass and
acting on nothing. Read exonerated-only failures ÷ failures; do not wire it
into the job outcome. The enforced verdict is the separate, stricter
tools/ci/flake_exoneration.py (decisions contract row 34).
Gotcha from its Step Zero window (2026-10-26..11-09): all 3 shadow
would-exonerate verdicts were one deterministic source-scan test
(every hosted format adapter builds its editor from hosted_editor()) failing
in three consecutive groups behind a broken queue entry. "Other heads" counted
merge groups that all carried the same culprit. The enforced rule therefore
counts only other pull requests' own head runs, by pull request number,
excluding every pull request in the group; never merge-group runs.
tools/ci/flake_exoneration.py gate runs inside the merge-group macos ctest
step after a failure. It returns 0 only when every failing test failed on >= 2
other pull requests in 24 h, passed by name in main's tip JUnit, is not
pr-fast/drift-fast, is not touched by compare/main...<sha>, and is not a
build failure, with ctest exit 8 and LastTestsFailed.log matching the
report. It then runs the tests --stop-on-failure skipped and judges the
union. Gotchas:
Test (non-Windows) ran;
ctest.junit.xml). A PR head's LastTestsFailed.log usually comes from the
pr-fast, pr-guard or affected tiers, which run that PR's own tests, so a
failure there is the PR breaking the test, not a flake signal. A
corroborating run whose head carries a group PR's head, or whose PR diff
touches the test, does not count either.pull_requests is empty on App-opened PR runs; the PR comes from
commits/<head_sha>/pulls, and a commit on two PRs counts as none.LastTestsFailed.log; the gate merges the remainder's
JUnit into ctest.junit.xml and rewrites LastTestsFailed.log as the union,
because other runs' evidence reads that file from the artifact.status="notrun" with "Unable to find
executable", not a failure, so the old shadow parser never saw it. Any
notrun that is not a deliberate skip is a build failure.Testing/Temporary after its own
ctest run for the same reason.PULP_FLAKE_EXONERATION_MODE=enforce acts; unset is shadow, and so is
the kill switch. Graduation to enforce is on evidence, not a date: at least 5 days in shadow AND at least 8 would-excuse decisions, each confirmed by a same-head retry pass, with zero false excusals. Any false excusal resets the count and keeps shadow mode. Quarantine state is
the open bot-authored flake-quarantine issues; a failed read quarantines
nothing.Gotcha: it used to judge "passes on main" from the latest merge group's
whole-run conclusion (an advisory Linux red counts) and read an undownloadable
failing-test list as "nothing failed", so 3 of its first 4 exonerations were
script-test-inputs-drift, a deterministic test, on a red main. Now evidence
that was not read (no executed gate, unreadable or empty list) is "main
unknown" and never exonerates, main_evidence_read is on every verdict, and
tests labelled pr-fast or named in tools/ci/drift_fast.json are never
eligible. Do not reuse artifact_failing_tests() where "unreadable" must
differ from "empty"; it returns () for both.
On a pull request the Test (non-Windows) step is continue-on-error, so a
failed full suite showed as a green step whose only trace was a skipped
receipt (4 of 6 full-suite PR heads on 2026-09-28). The step after it now
emits ::warning title=PR-head full suite failed (non-gating)::<failing tests> plus a job-summary line whenever steps.ctest.outcome == 'failure'.
Read the OUTCOME, never the API conclusion, for any continue-on-error step.
pull_requests; receipts bind through the commitGitHub leaves pull_requests: [] on workflow runs of App-opened pull
requests, which is most of this repository's, so protected_merge_receipt.py download could never match "exactly one pull request" and every receipt was
refused ("artifact workflow run is not the exact successful pull request";
PR 9001, 0 of 49 reuse). When the list is empty the verifier now re-derives
the binding from commits/{head_sha}/pulls and accepts only: exactly one
PR, open, head sha equal to the run's, head and base repos this repository
(never a fork), base sha the protected base, run from build.yml with
conclusion success, and the PR number equal to the merge-group entry parsed
from the queue ref (--entry-pr). Every refusal is prefixed commit-pull lookup: so it is countable in shipyard-receipt-decision reasons. The
reuse step runs the verifier from the PROTECTED BASE, so a change here takes
effect only after it lands on main. The verifier judges the receipt's own
target JOB (macos concluded success, issue and publish steps success), not
the run-level conclusion: an advisory hosted-Linux red turned the run red
while the receipt was sound (PR 9024). Every REQUIRED context from
.github/rulesets/main-protection.json must still be green on the head
(skipped/neutral count as green, as branch protection counts them); a red or
absent one refuses and is named. Preamble refusals name their field (workflow
name, event, head_sha, path).
Before debugging what a failing gate test does, check whether it failed on
elapsed time rather than behavior. A subprocess-spawning test that reddens
macos on PRs that cannot possibly have caused it — a docs-only or CI-only PR —
is the tell. pulp ship sign discovers desktop bundles via env and config identities read as a signing/keychain break for exactly this reason; it was a
10s cap on a case that spawns codesign three times, runs ~2s unloaded, and
loses its margin under a -j8 run over 13k tests. The symptom is a bare
REQUIRE_FALSE(x.timed_out) → !true, which names neither the subprocess nor
the duration — so it reads like a logic failure.
The layering rule that prevents this class:
ctest --timeout is the binding guard. build.yml runs
ctest … --repeat until-pass:2 -j8 --timeout 120: a per-test hang guard plus
one automatic retry. An in-test subprocess cap must stay comfortably looser
than it, so a slow machine fails at the outer layer — which reports the test
name and elapsed time — instead of at the inner one, which reports neither. An
inner cap tighter than the outer guard is strictly harmful: it fires first and
diagnoses worse.Root cause of the drift: the CLI shellout suites each hand-roll their own helper and hardcode a timeout, so there is no shared default to inherit and a codesign-heavy suite could sit at 10s while its siblings used 30-60s. When adding a shellout test, reuse the shared helper rather than picking a number.
A self-hosted macos job has no step or job timeout-minutes of its own for
most steps, so a hung step runs until the host's tartci job_timeout (7200 s)
tears the VM down. GitHub then records failure, never timed_out, so a query
for timed-out jobs finds nothing. Read the job's steps: the last step still
in_progress is the one that hung (on 2026-09-26 it was "Bootstrap repository
dependencies", which normally takes 0.3 min). Bound a setup step that can only
hang on the network with a step timeout-minutes well above its measured max,
so the VM is freed in minutes instead of hours.
tools/cmake/PulpReleaseArtifactScan.cmake)One list, tools/cmake/release_artifact_forbidden.json, names every byte
pattern a release artifact must not contain, keyed by the build condition
(gate) that forbids it: js-off, tracing-off, reload-ship,
bridge-exec-off, dev-env-off, control-stripped. AssertNoJsSymbols,
AssertNoTracingSymbols, reload_ship_symbol_check and
check_control_shipping_artifact are wrappers over it, and the required gate
runs release-artifact-forbidden-list-selftest,
release-artifact-scan-negative-control (a generated fixture carrying every
marker must be flagged; a clean one must pass) and the per-class scans over
the SDK libraries, the C++ CLI and the fixture plug-in/standalone. A red
release-artifact-scan-* names the marker id, kind and pattern; the reason it
is forbidden is the entry's reason in the JSON. Add a marker by adding an
entry; the selftest rejects an unknown gate, a duplicate pattern or an
unused gate, and the negative control fails if the scanner cannot see it.
The ship skill has the full model. The ctest registrations live in
test/cmake/release_artifact_tests.cmake (included from
cmake_smoke_tests.cmake); the class scans register through
cmake_language(DEFER) because PULP_SDK_TARGETS and the CLI target are
defined after test/.
tools/scripts/framework_neutrality_check.py)Hard-fails a PR when Pulp's own source names another UI framework — in a
comment, a doc-comment, an identifier, or a test name — or adopts one of its
class names into a Pulp API. Runs in gates.sh (gate 14), in CI, and as a
ctest.
Two halves, and the second is the one that catches the deeper problem:
It doubles as a design check: if a doc-comment needs a foreign framework's vocabulary to make sense, the API is a compatibility shim wearing a feature's clothes — redesign it rather than renaming it.
Three carve-outs, each of which would be a bug to "clean up":
core/format/host_quirks/** and the tests that pin its LessonOnly rows.
The prior-art citation IS the audit trail the Reference-Lineage trailer
policy requires; removing it destroys the provenance it exists to record.test/test_cli_import*.cpp — those files carry the importer's own
denylist literals. Strip the framework names and the check that rejects
vendored foreign code silently passes everything.IPlugView, IPluginFactory). Word
boundaries keep them out of the net — they are Steinberg's names, spoken by
necessity.Translation tables (SomeFramework::Widget → pulp::view::Widget) are data and
belong in the importer that owns them, never in core/.
If you hit it: rewrite the comment to say what the code does, in units a
reader who has never seen that framework can act on. Rename an adopted type and
ship a [[deprecated]] alias so downstream keeps compiling — lines containing
[[deprecated are skipped, since naming a foreign name in order to point
away from it is the mechanism that makes a rename shippable.
--selftest proves the gate can fail (8 cases). A gate that cannot fail is not
a gate.
tools/scripts/gpu_ledger_sentinel_check.py)Rejects a push whose docs/status/gpu-vellum-handoff.yaml or
docs/validation/gpu-handoff-provenance/receipt.json still contains the literal
regenerate-me. That value is written by the pulp-gpu-ledger merge driver,
which resolves the collision those two generated files produce on every branch
that outlives a main move. The repair is one command, and it is in the failure
text:
python3 tools/scripts/gpu_handoff_provenance.py resolve # regenerate + decide + prove the binding
resolve is the preferred form: it regenerates pinned to HEAD (a commit that
already exists — the receipt names its own source commit, so pinning to the one
the write is about to create cannot converge), then decides whether regeneration
actually changed what HEAD committed (MOVED), left it alone with the receipt
already binding (CHURN, writes nothing), or left it alone with the receipt
bound to other bytes (REBIND, receipt only) — and refuses rather than guessing
on anything else. It reports BINDS: with a mutated-ledger control. The
lower-level write --source-commit HEAD --receipt is what it performs.
This gate also reports an unregistered driver. .gitattributes names
pulp-gpu-ledger; Git resolves that name against local config and does not
error on one it cannot resolve — it text-merges in silence. A checkout
bootstrapped before the driver landed therefore has working automation that is
inert, with the attribute still in place to make it look installed. The repair
is tools/scripts/install-githooks.sh, which is idempotent.
Why an invalid value rather than a merged one. A stale-but-ancestral pin
passes the always-on provenance tier, so any driver that computes a plausible
merge — merge=ours included — produces something Git commits in silence. The
sentinel is chosen so that nothing accepts it.
Why it needed its own gate. The two guards that look closest both miss it, and each misses it for a structural reason rather than an oversight:
gpu_handoff_pin_freshness.py no longer looks at staleness at all — it
rejects an in-PR re-pin and an orphaned pinned path. A sentinel merge leaves
the inventory unchanged, so the most it could say is "do not re-pin", which
is the opposite of the repair a sentinel needs.conflict_marker_check.py looks for <<<<<<<. The driver's entire purpose is
that there are none.Which left CI twenty minutes downstream — the roundtrip the driver exists to remove.
It runs from the pre-push hook as well as gates.sh, and that distinction is
load-bearing. gates.sh is run by convention; it is not invoked by
.githooks/pre-push, and .shipyard/config.toml [validation.gates] runs its own
explicit script list rather than the file. A rule wired only into gates.sh
therefore holds only for whoever remembered to run it —
gpu_handoff_pin_freshness.py (gate 6b2) sat in exactly that state until it was
wired into the hook too, so neither surface can be assumed to inherit the other.
hydrate_gpu_provenance_commits.py --verify-only)Rejects a push whose GPU provenance ledger pins a commit that will not exist on
the remote. It reads the same two surfaces gpu-ledger-sentinel guards —
docs/status/gpu-vellum-handoff.yaml and the handoff receipt — and asks a
different question of them: not whether the recorded sha is a real object in
this store, but whether that object is reachable from HEAD or from any
remote-tracking branch.
Presence cannot answer that, and the gap is the whole reason the gate
exists. The failure shape is an amend or rebase that rewrites the commit
carrying the ledger, after the ledger already named a sha. The named commit is
orphaned by that rewrite, yet it is still in the local object store, so
is_commit() answers yes, cat-file -e answers yes, and every existing
provenance check is satisfied. Nothing on the remote will ever reference it, so
it is gone the moment the push lands. The rewrite happens after authoring,
which is why no authoring-time regeneration or --check can catch it: the push
is the only place downstream of the rewrite.
Reachability, not ancestry. hydrate()'s own HEAD-ancestry test is correct
in CI and is deliberately untouched — --verify-only is an additive arm, not a
refactor of it. Ancestry is the wrong question for a push: a developer on a
branch cut before a pin landed is not a descendant of that pin, which is
ordinary work rather than a defect. Measured on this repo's primary checkout, a
plain git rev-list HEAD ancestry test reports 61 of the 67 required pins as
failures. HEAD covers what is being pushed, the remote-tracking refs cover
what is already published, and a commit rewritten away before its first push is
reachable from neither — so git rev-list HEAD --remotes is the reference set,
and it reports zero failures on a healthy checkout.
A truncated clone refuses rather than inventing a finding. The primary
checkout is shallow, so "this pin is unreachable" and "this clone never fetched
that history" look identical here. When a graft boundary exists, a pin whose
committer date is older than the boundary is reported as SKIP rather than a
failure; only a pin dated past the horizon — which truncation cannot explain —
is reported broken. That allowance is what keeps the gate from failing every
push on a shallow clone, and the discriminating case (two unreachable pins in
one shallow checkout, one skipped and one reported) is covered by
tools/scripts/test_hydrate_real_git.py so the allowance cannot quietly swallow
every real defect.
It must not repair what it was asked to judge, and on a partial clone that
takes an env var. This checkout is blob:none with promisor = true, so an
ordinary presence probe fetches the missing object through the promisor with
no fetch anywhere in its argv — the check would silently heal the orphan and
pass. Every object-reading call therefore runs with GIT_NO_LAZY_FETCH=1, which
also makes a missing-object probe about 145x faster (4.34s to 0.03s here). The
whole verification is two git reads, no network, and measured at 0.373s
end-to-end.
python3 tools/scripts/hydrate_gpu_provenance_commits.py --root . --verify-only
#
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub generous-corp/pulp --plugin pulp73 skills in this plugin
/aaxOptional AAX support for Pulp, including developer-supplied Avid SDK setup, CMake enablement, DigiShell/AAX Validator workflows, and local AAX builds on macOS or Windows./ableton-linkConfigure, implement, and test Pulp's optional desktop Ableton Link tempo-sync adapter while preserving the developer-supplied SDK, licensing, realtime, latency-compensation, and no-install boundaries./agent-capabilitiesMaintain Pulp's installed design-time agent capability manifest and public-surface ledger. Use when adding, removing, renaming, or materially changing public audio, MIDI, signal, timebase, or sequence APIs; registering a new algorithm for generators; changing capability support or deprecation state; or repairing agent-capabilities freshness, schema, fingerprint, tombstone, or installed-SDK tests./androidAndroid platform development for Pulp — NDK cross-compilation, Oboe audio, Dawn/Skia GPU rendering, JNI bridge, touch interaction, emulator workflows, and end-to-end smoke validation. Covers build, deploy, debug, and the gotchas discovered during bringup./api-designDesign rules for new public headers and APIs in Pulp: layering of the audio core, strong types for quantities, small composable processors, separation of processing, model and presentation, lean includes, and docs order. Consult before adding or reshaping a public header under core/*/include/, a new pulp::signal processor, or a new top-level API./araOptional ARA support for Pulp, including developer-supplied ARA SDK setup, CMake enablement, adapter companion APIs, validation, and ARA-aware plugin implementation guidance.Other plugins' skills for the same job