Skip to content

ci: cook Fast Gate's dev-plus-tests profile on every event (#2661) - #3128

Merged
zackees merged 2 commits into
masterfrom
ci/2661-fast-gate-cook-profile
Oct 31, 2026
Merged

zackees merged 2 commits into
masterfrom
ci/2661-fast-gate-cook-profile

Conversation

@zackees

@zackees zackees commented Oct 31, 2026

Copy link
Copy Markdown
Member

Refs #2661

Fast Gate's Rust consumer is cargo test --workspace, which compiles the
test profile. Its cook flags were core == 'true' && '--release' || '--profile dev -- --tests', so every push and merge-group (core) run cooked
release dependencies that the test build never reuses, and then rebuilt the
test profile from scratch anyway.

RED (09e05fe96): ci/test_cook_profiles.py now requires
--profile dev -- --tests for rust-tests-linux and adds
test_fast_gate_cooks_the_profile_its_tests_compile_in, which also rejects a
core-conditional or --release value. Against master it fails 2 of 6 tests:
'prebuild-deps-flags: --profile dev -- --tests' not found in ... and the
core == 'true' && '--release' comparison.

GREEN (aa3bd2cf3): drop the core branch from the cook flags, and
replace #1317's cook-step-only policy paragraph in docs/ci-tooling.md with
the measurement below.

Evidence: 10 Fast Gate jobs, 2026-10-31

Per job: prebuild-deps-flags, the cook-cache-base result, whether the
following workspace test build printed Finished 'test' profile, and the
Compiling line count in the job log.

Run Event Cook flags Test-profile build
41173490105 push --release Finished 'test' 1m09s
41172945798 merge_group --release Finished 'test' 1m37s
41169277992 pull_request --release Finished 'test' 1m34s
41163610144 push --release Finished 'test' 1m24s
41172298003 push --profile dev -- --tests none — warm
41169749876 push --profile dev -- --tests none — warm
41172069604 merge_group --profile dev -- --tests none — warm
41171670038 pull_request --profile dev -- --tests none — warm
41169473302 merge_group --profile dev -- --tests none — warm
41168907172 pull_request --profile dev -- --tests none — warm
  • 4/4 release-cook jobs rebuilt the test profile: 256-442 Compiling lines.
  • 6/6 dev-plus-tests-cook jobs had no test-profile build: 192 Compiling lines.
  • The cook step itself took 11.3-15.6 s in both groups, so the profile choice
    costs nothing at cook time; the release branch was pure waste on core runs.

Local probe (soldr 0.9.47)

Scratch crate depending on regex:

Sequence Result
soldr cook --release then soldr cargo test --no-run 5 crates recompiled, 42.15 s
soldr cook --profile dev -- --tests then soldr cargo test --no-run Finished 'test' profile in 0.03s

That is the same mechanism #2661's earlier comment measured on 0.9.45: the
test profile is not the release profile, so a release cook cannot feed it.

Not claimed

Tiers: Tier 1 is the ci/ self-test. Tiers 2-4 do not apply (workflow and CI
policy only). No docs/features.md line: no user-visible behaviour.

…2661)

Fast Gate's consumer is `cargo test`, so the cook must populate the `test`
profile. Its cook flags were `core == 'true' && '--release' || '--profile dev
-- --tests'`, which made every push and merge-group run cook release
dependencies the test build never reuses.

Measured on 10 Fast Gate jobs on 2026-10-31: 4 of 4 jobs with the release
cook then rebuilt the `test` profile (1m09s-1m37s, 256-442 Compiling lines);
6 of 6 jobs with the dev-plus-tests cook finished that build warm with no
profile line (192 lines). The cook step itself cost the same either way
(11.3-15.6s). A local probe with soldr 0.9.47 reproduces it: `cook --release`
then `cargo test --no-run` recompiles five crates; `cook --profile dev --
--tests` then `cargo test --no-run` finishes in 0.03s.

This fails against the current workflow; the next commit drops the core
branch.
The whole workspace test build in Fast Gate runs in the `test` profile, so
a `--release` cook on core runs was never reused: those jobs cooked release
dependencies and then rebuilt the test profile from scratch. Drop the
`core` branch from the cook flags and update docs/ci-tooling.md with the
measurement that replaced #1317's cook-step-only benchmark.

Evidence (10 Fast Gate jobs, 2026-10-31):
- 4/4 release-cook jobs: `Finished \`test\` profile` at 1m09s-1m37s,
  256-442 Compiling lines.
- 6/6 `--profile dev -- --tests` jobs: no test-profile build at all,
  192 Compiling lines.
- Cook step: 11.3-15.6s in both groups, so the profile choice costs nothing
  at cook time.

Local probe (soldr 0.9.47, regex dep chain): `cook --release` then
`cargo test --no-run` recompiles 5 crates in 42s; `cook --profile dev --
--tests` then `cargo test --no-run` finishes in 0.03s.

Refs #2661

@zackees zackees left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coordinator review: correct and well measured. Fast Gate runs cargo test, so a release cook never helps it, and 10 jobs show the rebuild cost. The RED is the stricter cook-profile test. The docs replace #1317's policy with the measurement. One expected effect: the changed flags give the cook cache a new key, so the first core runs after this lands will be cold until master seeds it.

@zackees
zackees enabled auto-merge October 31, 2026 07:08
@zackees
zackees added this pull request to the merge queue Oct 31, 2026
@zackees

zackees commented Oct 31, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator.

PR CI is green (CI Gate ✅, Fast Gate ✅, Format ✅, Validate Data ✅, Build/Event Data ✅, CI Mode ✅) and #3128 is in the merge queue at position 1 (AWAITING_CHECKS), so the merge-group run will exercise the changed workflow itself.

  • Branch: ci/2661-fast-gate-cook-profile, HEAD aa3bd2cf3 (RED 09e05fe96), rebased on origin/master 88d49a917.
  • No local gate stamp: this tick did not run ./lint/./unittest on the slot; the two changed files are a ci/ self-test, workflow YAML and docs, and the targeted self-tests pass locally (uv run --no-project python -m unittest ci.test_cook_profiles ci.test_rust_cache_policy ci.test_ci_toml → 58 tests OK).
  • Workflow-graph change, so I am watching it through the merge rather than leaving it at the queue.

Merged via the queue into master with commit 81ac46b Oct 31, 2026
36 checks passed
@zackees
zackees deleted the ci/2661-fast-gate-cook-profile branch October 31, 2026 07:15
@zackees

zackees commented Oct 31, 2026

Copy link
Copy Markdown
Member Author

Merged as 81ac46b16. The merge-group run that queued it (41179590735, job 124474170006) is the first core run with the new cook flags, and it behaves like the dev-cook population:

  • prebuild-deps-flags: --profile dev -- --tests
  • no Finished 'test' profile line at all — the workspace test build was warm
  • 192 Compiling lines (release-cook core runs: 256–442)

The archive still MISSed on that run (cook saves are disabled for merge groups), so this only removes the rebuild that followed a cook; the cross-run reuse/eviction half stays open in #2661.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant