Repository navigation
fix: retry benchmark cold builds, unify tracing/log for per-crate clippy, sync uv.lock - #2059
Merged
Merged
Conversation
195f5e9 bumped pyproject.toml to 2.5.52 but left uv.lock at 2.5.51, so `uv lock --check` fails on main and every `uv run` in the project rewrites uv.lock, dirtying the tree (which ci/local_gate.py then refuses to run on). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…load failures Benchmark run 44094404157 failed after 105 minutes because one TCP reset broke PlatformIO's 347 MB esp32-core-libs download on the shaped 10 Mbit/s link (ChunkedEncodingError / IncompleteRead). Arduino CLI's cold install has been retried since 8943ee9, but the PlatformIO and fbuild cold builds, which download their packages inside the timed build, got a single attempt. Retry them up to COLD_INSTALL_ATTEMPTS times inside the timer, like the Arduino install, so a retry can only make that tool's cold time look worse. Arduino's compile downloads nothing and keeps one attempt. timed_cold_build takes timed_build's arguments so measure_tool (which carries a too_many_lines expect) does not grow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hes the workspace axum's default tower-log feature turns on tracing/log, but only in graphs that contain axum (fbuild-daemon, fbuild-cli, and fbuild-core's dev-dependencies). tracing/log adds branches to every tracing::*! macro expansion, which clippy counts toward cognitive_complexity. The workspace lint therefore measured crates/fbuild-core/src/usb/data.rs:193 (try_install_online_cache) over 25, and its #[expect(clippy::cognitive_complexity)] held. A per-crate run measured it under 25, so the expectation was unfulfilled. The same applied to crates/fbuild-packages-fetch/src/disk_cache/gc.rs:49 and downloader.rs:624. On main, `soldr cargo clippy -p <crate> --all-targets -- -D warnings` failed with 'this lint expectation is unfulfilled' for 14 of 21 workspace members. The single-file lint mode and the PostToolUse lint hook both run that command, so editing any file in those crates failed the hook. Turning the feature on at the workspace dependency gives every graph the same expansion. fbuild-cli and fbuild-daemon already ship with it on. fbuild-python installs no log logger and no global tracing dispatcher, so its events go to the log facade's no-op default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
zackees
added a commit
that referenced
this pull request
Nov 18, 2026
Brings #2051 (reroot relative spelling), #2057 (rp2040 large future), #2058 (respell has_root / native tool spelling / renesas OnceCell), #2059 (bench framework + tracing feature) and #2063/#2067. Only conflict was fbuild-toolchain esp32.rs test fixture, resolved to main's #2058 native-spelling semantics (explicit native_name let-binding).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An automation asked to "reproduce the build error and fix it" without saying which build. I ran every repo gate. Plain
cargo check, CI, and the windows-msvc cross-clippy were green onmainbf798aa8. Three real failures turned up, one commit each.1. Benchmark run failed: no retry on PlatformIO/fbuild cold builds
Failure. Benchmark run 44094404157 on
bf798aa8failed after 105 minutes:The benchmark log artifact shows the cause. One TCP reset hit PlatformIO's 347 MB
esp32-core-3.3.12-libs.tar.xzdownload on the 10 Mbit/s shaped link:The same run had already survived a
connection reset by peerduringarduino-cli core install. That install has been retried since 8943ee9. The PlatformIO and fbuild cold builds download their packages inside the timed build, and they got only one attempt.Fix.
timed_cold_buildretriestimed_buildup toCOLD_INSTALL_ATTEMPTStimes for PlatformIO and fbuild.retryis now generic over its return value.measure_toolcarries#[expect(too_many_lines)], so its call site only swaps the function name and the function does not grow.Tests. Two new tests, written RED first:
retry_returns_the_successful_attempts_valueandevery_downloading_cold_build_is_retried.I did not re-run the 10 Mbit/s benchmark locally. It needs the CI network namespace and takes about 100 minutes. The next scheduled or push run is the end-to-end check.
2. Per-crate clippy fails for 14 of 21 workspace members
Failure. On clean
main,soldr cargo clippy -p <crate> --all-targets -- -D warningsexited 101 for 14 crates: fbuild-config, -paths, -serial, -build, -build-engine, -build-esp, -build-arm, -build-mcu, -deploy, -python, -test-support, -header-scan, -library-select and bench-fastled-examples.Once that error was cleared, the same problem showed in
crates/fbuild-packages-fetch/src/disk_cache/gc.rs:49anddownloader.rs:624.This is the command that
uv run --script lint <file.rs>runs, and so does the PostToolUse lint hook (ci/hooks/lint.py). Editing any file in those crates therefore failed the hook. The workspace-widelintand CI stayed green, which hid it.Root cause.
tower-logfeature turns ontracing/log, but only in graphs that contain axum: fbuild-daemon, fbuild-cli, and fbuild-core's dev-dependencies.tracing/logadds branches to everytracing::*!expansion, and clippy counts them towardcognitive_complexity.#[expect]is unfulfilled.Fix. Enable
tracing'slogfeature at the workspace dependency, so every graph expands the macros the same way.Cargo.lockis unchanged.loglogger and no global tracing dispatcher, so its events go tolog's no-op default.I first tried extracting a helper from
try_install_online_cache. Withlogon, the macros alone still score 31/25, so a refactor cannot fix this. I reverted it.3. Stale
uv.lock195f5e9 bumped
pyproject.tomlto 2.5.52 but leftuv.lockat 2.5.51.uv lock --checkexits 1 onmain.uv runin the project rewritesuv.lockand dirties the tree, andci/local_gate.pythen refuses to run.The fix is a one-line lock sync.
Gates, before and after
mainbf798aasoldr cargo clippy -p <each of 21 members> --all-targets -- -D warningsuv run --script lint crates/fbuild-config/src/lib.rs(single-file / hook)uv lock --checkuv run --script lint(fmt + workspace clippy + dylint)bash testsoldr cargo clippy --workspace --all-targets --target x86_64-pc-windows-msvc -- -D warningsLOCAL_UNITTEST_MODULES, withlocal_gate.py's deps)The
bash test"before" cell is blank because I first ran it with the bench change already applied. Onmainalone it would have run 2 fewer tests.Not reproducible here
bash lint --cpp:lintis auv run --scriptPython entry point. It has no--cppmode, andbash lintis not how it runs.🤖 Generated with Claude Code