Repository navigation
ci: Cook the workspace dev-dependencies for the test lanes (#2661) - #2675
Conversation
…2661) RED. The cook for the lanes that build tests must include the workspace's dev-dependencies, and a member's `default-features = true` override is dropped by the cargo-chef recipe (the #2603/#2604 defect), so the cook either fails or serves the wrong feature set. `test_cook_profiles.py` now pins: - `--profile dev -- --tests` for `rust-tests-linux` (its non-core branch) and `rust-tests`; - an explicit feature list equal to each crate's own `default` for the `proptest`/`base64`/`memchr`/`sha2` member entries, instead of `{ workspace = true, default-features = true }`. Fails on master: 2 profile-flag assertions and 12 manifest assertions.
GREEN. The lanes that build tests now cook the workspace's dev-dependencies, and the member manifests declare the re-enabled defaults as explicit feature lists so the cargo-chef recipe keeps them. - `.github/workflows/build-project.yaml`: `rust-tests-linux` (its non-core branch) and `rust-tests` pass `--profile dev -- --tests`. The `core` branch keeps `--release`, and the cross-lint/cross-compile/container/tier2 lanes are unchanged. - ten member manifests: `proptest`, `base64`, `memchr` and `sha2` use the #2604 pattern (`features = [...]` equal to the crate's own `default`) instead of `{ workspace = true, default-features = true }`, which the cargo-chef recipe drops for a `[workspace.dependencies]` entry declared with `default-features = false` (#2603). Local evidence: `ci/test_cook_profiles.py`, `test_feature_sets.py`, `test_test_binary_cap.py`, `test_workspace_dependencies.py`, `test_rust_cache_policy.py`, `test_cook_cache_budget.py` and `test_ci_toml.py` pass; `soldr cargo metadata --locked` resolves (the feature names are valid) and reports the same effective feature closure per crate as `default`. `ruff check` clean.
|
Handed off to the coordinator — CI Gate ✅ green, auto-merge queued. |
|
Re-measured on the PR commits (plan item 3). This PR's CI run does not exercise the new path: the PR changes Setup: Linux x86_64, soldr 0.9.43 (the CI pin). For each case: delete
The GREEN head meets the target (≤ 10). One note on the method: with soldr's local auto-hydrate on, the GREEN cook restored an older pack with the same recipe hash from an earlier cook on this host and skipped its compile phase ( |
zackees
left a comment
There was a problem hiding this comment.
Review: the manifests and the RED/GREEN are right; one gap in the lane expression (not a blocker for this unit)
I re-derived the parts that can be checked without the pinned toolchain.
Feature lists match upstream defaults exactly. I read the vendored manifests of the versions this tree locks (Cargo.lock: base64 0.23.1, memchr 2.8.3, proptest 1.11.0, sha2 0.11.0) and compared each default with the lists added here:
| Crate | Upstream default |
Added list | Match |
|---|---|---|---|
proptest 1.11.0 |
std, fork, timeout, bit-set |
same | ✅ |
base64 0.23.1 |
std, simd-unsafe |
same | ✅ |
memchr 2.8.3 |
std |
same | ✅ |
sha2 0.11.0 |
alloc, oid |
same | ✅ |
And the premise holds: every one of the four is declared in the root Cargo.toml [workspace.dependencies] with default-features = false (lines 17/25/27/30), so { workspace = true, default-features = true } is exactly the form cargo-chef drops. The ten manifests are the complete set of members that re-enabled a default — the new test's assertEqual(seen, set(crate_defaults)) makes a miss fail loudly, which is the right shape.
RED → GREEN re-run here. On the RED head I checked out c6d9b8ad9 (test-only, 1 file, 32+/2-) and uv run python -m unittest ci.test_cook_profiles FAILS with failures=14 — the 2 lane-flag assertions plus 12 manifest assertions, matching the PR body. On fbc042ffa the same 5 tests pass. 👍
Lane flags. soldr cook [OPTIONS] [ARGS]... with "everything else: pass after --" is the documented surface, so --profile dev -- --tests reaches cargo chef cook --tests; that is the flag that makes the cook build dev-dependencies. prebuild-deps-flags is documented as "forwarded to soldr cook", so no quoting surprise, and the flags are hashed into the cache key, so the new layer is a new key rather than a poisoned old one.
The two changed lanes are the ones that build tests; cross-compile and both rust-cross-lint lanes keep --profile dev and are clippy-only (--all-targets absent), so dev-dependencies genuinely are not built there. That reasoning checks out against the workflow.
The gap worth recording
This PR's own CI run cooked --release, not --profile dev -- --tests: in the Fast Gate job (run 40562861335, job 122396562373) the resolved input at 18:46:27Z is prebuild-deps-flags: --release and the cook at 18:46:42Z is soldr cook --release. That is the core == 'true' branch of the new expression, and check-event selected it for this PR.
The consequence is measurable in the same job: the cook compiled 48 external crates, none of them proptest or criterion, and the unit-test step then compiled 81 external crates, including the whole proptest/criterion/ciborium/clap stack (42 crates the cook never covered). So on a core run, the acceptance criterion from #2661's Decided: note ("at most 10 external crates in the Fast Gate test compile") is still not met — the cook profile and the test profile still differ, exactly the mismatch cause 3 describes.
This is consistent with the PR body ("the core branch keeps --release"), so I am reading it as a deliberate scope cut rather than a defect in the unit. Two things would make it airtight:
- Say in the PR (or a follow-up issue) that the
corebranch keeps its--releasecook and therefore still recompiles the dev-dependency stack — otherwise the next reader will assume the ≤10 criterion was demonstrated by this run. - If the criterion is meant to hold for core runs too, the core branch needs
--release -- --testsat minimum, and arguably the wholecoredev/release split is its own layer question from the follow-up PR (option 4.1/4.2), not this one.
Not asking for a change in this PR; the unit as scoped is correct and the follow-up is already planned.
Checked, nothing to fix
- No
docs/features.mdline: correct — CI configuration only. - No new workflow, so no
ci.toml[allow] workflowsentry is owed. ci/test_cook_profiles.pykeeps the file's existing no-shebang, stdlib-only shape — it scans the workflow text withreand reads the manifests, no PyYAML — which is theci/rule (#1199).- The RED commit's stat is the test file alone — no port or wiring swallowed into it.
CI is otherwise green; Rust Tier 2 Linux (tests ON) was still running when I reviewed. Queueing once it lands.
…2675) * ci: Pin the cook dev-dependency features and the test lanes' --tests (#2661) RED. The cook for the lanes that build tests must include the workspace's dev-dependencies, and a member's `default-features = true` override is dropped by the cargo-chef recipe (the #2603/#2604 defect), so the cook either fails or serves the wrong feature set. `test_cook_profiles.py` now pins: - `--profile dev -- --tests` for `rust-tests-linux` (its non-core branch) and `rust-tests`; - an explicit feature list equal to each crate's own `default` for the `proptest`/`base64`/`memchr`/`sha2` member entries, instead of `{ workspace = true, default-features = true }`. Fails on master: 2 profile-flag assertions and 12 manifest assertions. * ci: Cook the workspace dev-dependencies for the test lanes (#2661) GREEN. The lanes that build tests now cook the workspace's dev-dependencies, and the member manifests declare the re-enabled defaults as explicit feature lists so the cargo-chef recipe keeps them. - `.github/workflows/build-project.yaml`: `rust-tests-linux` (its non-core branch) and `rust-tests` pass `--profile dev -- --tests`. The `core` branch keeps `--release`, and the cross-lint/cross-compile/container/tier2 lanes are unchanged. - ten member manifests: `proptest`, `base64`, `memchr` and `sha2` use the #2604 pattern (`features = [...]` equal to the crate's own `default`) instead of `{ workspace = true, default-features = true }`, which the cargo-chef recipe drops for a `[workspace.dependencies]` entry declared with `default-features = false` (#2603). Local evidence: `ci/test_cook_profiles.py`, `test_feature_sets.py`, `test_test_binary_cap.py`, `test_workspace_dependencies.py`, `test_rust_cache_policy.py`, `test_cook_cache_budget.py` and `test_ci_toml.py` pass; `soldr cargo metadata --locked` resolves (the feature names are valid) and reports the same effective feature closure per crate as `default`. `ruff check` clean.
…ypes (obs-rust#2624) (obs-rust#2678) * build(cmake): RED: enable -Wmissing-prototypes and -Wstrict-prototypes (obs-rust#2624) Drops the two -Wno-* pins and adds the positive forms to the C-only flag lists (clang common->C list; the GNU C line). The warnings are not in -Wall/-Wextra, so the pin cannot simply be removed. * build(cmake): GREEN: first-party prototypes + vendored-dep exemptions (obs-rust#2624) Drops the two -Wno-* pins from the C flag lists and satisfies the strict pair everywhere they now reach: - first-party: declare each function before its definition (libobs, libobs-opengl, plugins/*, shared/*, 46 files), and use (void) for the empty-parameter declarations and definitions that -Wstrict-prototypes flags. - test/cmocka: target-scoped -Wno-missing-prototypes / -Wno-strict-prototypes, as the obs-rust#2624 decision asks. No C test is edited. - vendored: deps/glad and rnnoise publish their include dir as SYSTEM (their headers declare with empty parameter lists, so a target-scoped option cannot reach the consumers that include them), and librtmp's and rnnoise's own sources extend their existing per-file / per-target exemptions next to deps/glad and deps/libcaption. Verified locally. `uv run ci/local_gate.py --lane tier2-linux` reports clean but cannot see a flag-list change: zccache does not key on the compile flags, so the C objects are served from cache and never recompiled (no `Building C object …` lines in the run's tree.build.log). The honest check is a zccache- bypassed `-fsyntax-only` replay of every C translation unit in the Tier 2 tree (the tree's own flags, one TU at a time): on this branch it reports **0 findings and 0 compile errors** over 1255 TUs, down from **255 findings across 177 sites** on the same tree before this commit. `./lint` is ok. Refs obs-rust#2624 * libobs: Guard the level and texture getters (obs-rust#2569) * test: Check getters with no core obs_get_video_info() returns false when there is no core (obs-rust#1509), but obs_get_video_sdr_white_level(), obs_get_video_hdr_nominal_peak_level(), obs_get_audio_info() (and obs_get_audio_info2() through it), obs_nv12_tex_active() and obs_p010_tex_active() read through the NULL core before obs_startup() or after obs_shutdown(). test_no_core_getters calls each of them without starting the core, one case each. On master, every case but obs_get_video_info's crashes. Refs obs-rust#2566. * libobs: Guard the level and texture getters With no core (before obs_startup() or after obs_shutdown()), give the answer each getter already gives with no video or no audio, as obs_get_video_info() does since obs-rust#1509: - obs_get_video_sdr_white_level(): 300; - obs_get_video_hdr_nominal_peak_level(): 1000; - obs_get_audio_info(): false, the out-struct untouched, so obs_get_audio_info2() returns false too; - obs_nv12_tex_active() and obs_p010_tex_active(): false. Nothing changes while the core exists. Fixes obs-rust#2566. Local-Gate: v1 tree=7c46ca3f9f044da99de6a02ef6d71197be09b705 secs=2361 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run Ci-Attestation: {"at":1793087831,"gate":"rust/all/fmt","host":"linux-x86_64","key":"2cab03d3eb9db6e60c5e4e4c2fe2abd64f0e96fd82b99c68fc828e1eaf1c10fe","lane":"lint","parents":["9a8f0540cdfcae093066cba16f9711741c1be603"],"secs":48,"stamp":"3cb8a1a86c5e88a21471c14b149c2316","tree":"7c46ca3f9f044da99de6a02ef6d71197be09b705","v":1,"via":"run"} Ci-Attestation: {"at":1793087831,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"2cab03d3eb9db6e60c5e4e4c2fe2abd64f0e96fd82b99c68fc828e1eaf1c10fe","lane":"lint","parents":["9a8f0540cdfcae093066cba16f9711741c1be603"],"secs":48,"stamp":"2ad58fcba46ec4d8bec7ffeb235b6408","tree":"7c46ca3f9f044da99de6a02ef6d71197be09b705","v":1,"via":"run"} Ci-Attestation: {"at":1793087831,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"4e02e5fb00c2bba76a8b54d9804314fd893b4a7651b50d82c224c1c10ff88f20","lane":"rust-test","parents":["9a8f0540cdfcae093066cba16f9711741c1be603"],"secs":222,"stamp":"d452f5fe974f4411a393fae94b11a5f1","tree":"7c46ca3f9f044da99de6a02ef6d71197be09b705","v":1,"via":"run"} Ci-Attestation: {"at":1793087831,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"4f291d63669d098462de945660e7ed5042ca0d393321fcef77c635813bcca169","lane":"cross","parents":["9a8f0540cdfcae093066cba16f9711741c1be603"],"secs":71,"stamp":"b6e8a2b6337beac5183d5a395b9b9767","tree":"7c46ca3f9f044da99de6a02ef6d71197be09b705","v":1,"via":"run"} Ci-Attestation: {"at":1793087831,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"4f291d63669d098462de945660e7ed5042ca0d393321fcef77c635813bcca169","lane":"cross","parents":["9a8f0540cdfcae093066cba16f9711741c1be603"],"secs":71,"stamp":"2e8568072390af1df4e660265a492d1f","tree":"7c46ca3f9f044da99de6a02ef6d71197be09b705","v":1,"via":"run"} Ci-Attestation: {"at":1793087831,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"4f291d63669d098462de945660e7ed5042ca0d393321fcef77c635813bcca169","lane":"cross","parents":["9a8f0540cdfcae093066cba16f9711741c1be603"],"secs":71,"stamp":"b9fe35d949f1291f099c0daf6d74873b","tree":"7c46ca3f9f044da99de6a02ef6d71197be09b705","v":1,"via":"run"} Ci-Attestation: {"at":1793087831,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"4f291d63669d098462de945660e7ed5042ca0d393321fcef77c635813bcca169","lane":"cross","parents":["9a8f0540cdfcae093066cba16f9711741c1be603"],"secs":71,"stamp":"1db5eb4dda49b2e54fe29965193e784d","tree":"7c46ca3f9f044da99de6a02ef6d71197be09b705","v":1,"via":"run"} Ci-Attestation: {"at":1793087831,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"1107a9b363febecf6deee7b41414302795d6d8b673a5361e6b640814be90eb97","lane":"tier2-linux","parents":["9a8f0540cdfcae093066cba16f9711741c1be603"],"secs":2021,"stamp":"b20646a7b4538eef9546ff296e492121","tree":"7c46ca3f9f044da99de6a02ef6d71197be09b705","v":1,"via":"run"} * test: Skip the no-core cases when a core exists A group setup that refused a started core turned the file into seven failures. Skip each case instead, and say in the header that only the never-started case runs: after obs_shutdown() the getters take the same no-core branch. Refs obs-rust#2566. * docs: Mark the no-core getters line pending The ledger dates an entry when it merges. Refs obs-rust#2566. * ci: Cook the workspace dev-dependencies for the test lanes (obs-rust#2661) (obs-rust#2675) * ci: Pin the cook dev-dependency features and the test lanes' --tests (obs-rust#2661) RED. The cook for the lanes that build tests must include the workspace's dev-dependencies, and a member's `default-features = true` override is dropped by the cargo-chef recipe (the obs-rust#2603/obs-rust#2604 defect), so the cook either fails or serves the wrong feature set. `test_cook_profiles.py` now pins: - `--profile dev -- --tests` for `rust-tests-linux` (its non-core branch) and `rust-tests`; - an explicit feature list equal to each crate's own `default` for the `proptest`/`base64`/`memchr`/`sha2` member entries, instead of `{ workspace = true, default-features = true }`. Fails on master: 2 profile-flag assertions and 12 manifest assertions. * ci: Cook the workspace dev-dependencies for the test lanes (obs-rust#2661) GREEN. The lanes that build tests now cook the workspace's dev-dependencies, and the member manifests declare the re-enabled defaults as explicit feature lists so the cargo-chef recipe keeps them. - `.github/workflows/build-project.yaml`: `rust-tests-linux` (its non-core branch) and `rust-tests` pass `--profile dev -- --tests`. The `core` branch keeps `--release`, and the cross-lint/cross-compile/container/tier2 lanes are unchanged. - ten member manifests: `proptest`, `base64`, `memchr` and `sha2` use the obs-rust#2604 pattern (`features = [...]` equal to the crate's own `default`) instead of `{ workspace = true, default-features = true }`, which the cargo-chef recipe drops for a `[workspace.dependencies]` entry declared with `default-features = false` (obs-rust#2603). Local evidence: `ci/test_cook_profiles.py`, `test_feature_sets.py`, `test_test_binary_cap.py`, `test_workspace_dependencies.py`, `test_rust_cache_policy.py`, `test_cook_cache_budget.py` and `test_ci_toml.py` pass; `soldr cargo metadata --locked` resolves (the feature names are valid) and reports the same effective feature closure per crate as `default`. `ruff check` clean. * ci: Delete the dead upstream sparkle-appcast composite action (obs-rust#2676) (obs-rust#2677) * test(ci): Pin the dead sparkle-appcast action and its exception as gone (obs-rust#2676) RED: test_upstream_appcast_jobs_are_gone asserts the unreferenced .github/actions/sparkle-appcast composite action and its ci-lint GEN-005 exception are gone; it fails on master, where both are still present. * ci: Delete the dead upstream sparkle-appcast composite action (obs-rust#2676) Nothing references .github/actions/sparkle-appcast/: the fork removed upstream's Sparkle appcast jobs from publish.yaml (pinned by ci/test_no_upstream_updater.py::test_upstream_appcast_jobs_are_gone) and left the action behind. Delete it and its ci-lint GEN-005 exception. GREEN: ci-lint precheck 505 -> 497 approved exceptions (GEN-005 265 -> 257), 11 violations / 10 needs_review unchanged; ci/test_no_upstream_updater.py OK. * ci: Delete the dead run-clang-format and run-gersemi composite actions (obs-rust#2676) (obs-rust#2679) * test(ci): Pin the dead run-clang-format and run-gersemi actions as gone (obs-rust#2676) RED: DeadFormatActionsTest asserts both composite actions (and their ci.toml GEN-005 exceptions) are gone; it fails on master, which still carries both. obs-rust#984 moved the checks to `ci/local_gate.py --only clang-format|gersemi` and left the actions behind, unreferenced. * ci: Delete the dead run-clang-format and run-gersemi composite actions (obs-rust#2676) obs-rust#984 moved both checks to the local gate's pinned uvx tools (`uv run --no-project ci/local_gate.py --only clang-format|gersemi`) and left upstream's composite actions behind. Nothing in .github/workflows references them: the only `uses: ./.github/actions/run-*` in check-format.yaml is run-swift-format, which stays. `build-aux/run-clang-format` and `build-aux/run-gersemi` are different files and stay. GREEN: ci-lint precheck 497 -> 491 approved exceptions (GEN-005 257 -> 251), 11 violations / 10 needs_review unchanged; ci/test_format_jobs.py OK. * build(cmake): Give frontend-tools.c.h strict prototypes (obs-rust#2624) The Qt Frontend Linux lane now compiles C with -Wstrict-prototypes, and this first-party header declared its four module functions with empty parameter lists. Declare them (void) so the lane builds. Refs obs-rust#2624 * build(cmake): Give find-font.c.h a strict prototype (obs-rust#2624) The C-only -Wstrict-prototypes flags this remaining empty-parameter declaration in the text-freetype2 unity source; declare it (void) to match the definitions in the windows/cocoa variants. Refs obs-rust#2624 --------- Co-authored-by: Ryan Doupe <[email protected]>
Refs #2661
What and why
The Rust test lanes cook the workspace's dev-dependencies, so that a warm cache
turns a test run into a plain recompile instead of a from-scratch one. Today
they cook the dev-dependency set with
default-featureshandling that thecargo-chef recipe drops, so the cook either fails or serves the wrong feature
set (the #2603/#2604 defect), and the lanes that build tests do not pass
-- --teststo the cook at all.Two changes:
.github/workflows/build-project.yaml:rust-tests-linux(its non-corebranch) and
rust-testsnow pass--profile dev -- --tests. Thecorebranch keeps
--release; the cross-lint, cross-compile, container and tier2lanes are unchanged.
proptest,base64,memchrandsha2use the build: Name serde_json's std feature so soldr cook builds again (#2603) #2604pattern — an explicit
features = [...]equal to the crate's owndefault—instead of
{ workspace = true, default-features = true }, which the recipedrops for a
[workspace.dependencies]entry declared withdefault-features = false.Infra/CI only: no
docs/features.mdline.RED → GREEN
c6d9b8ad9—ci/test_cook_profiles.pypins the new lane flagsand the explicit feature lists. On master it fails 14 assertions (2 lane-flag +
12 manifest); on the GREEN head
uv run python -m unittest ci/test_cook_profiles.pyis OK.
fbc042ffa. Local suite green:test_cook_profiles.py,test_feature_sets.py,test_test_binary_cap.py,test_workspace_dependencies.py,test_rust_cache_policy.py,test_cook_cache_budget.py,test_ci_toml.py, and the fullci/test_*.pysweep (256 files).
ruff check(C901/RUF100) clean.soldr cargo metadata --lockedresolves, and the resolved feature closure foreach crate equals the crate's
default— the explicit lists reproduce today'seffective feature set, so there is no dependency-graph change.
The end-to-end cook measurement (external
Compilingcount for the test lanes)is this PR's CI run — the host
soldris 0.9.35, older than the pinned 0.9.43,so the cook cannot be reproduced locally. The target comes from vpacher's
measurement: RED ~55 external crates, GREEN ≤10 (case D cited: 1,
foldhash).Checklist
masterc6d9b8ad9, thenfbc042ffa)docs/features.mdlineNotes for the reviewer
rust-tests-linux,rust-cross-lintandrust-cross-lint-releaseshare thelinux-host-v1cache suffix/journal. This PR gives onlyrust-tests-linux'sdev branch
-- --tests; the two cross-lint lanes keep--profile dev(theyrun clippy without
--all-targets, so they do not build dev-dependencies).If the janitor's
deps.shape.linuxbudget now evicts between the two linuxdev/release layers, fold the cross-lint lanes onto the same
-- --testslayer— that is the "one layer per lane" question from the issue.