test(build): #231 follow-up -- AVR Uno tar-extract e2e regression gate#233
Conversation
Adds `cache_survives_tar_extract_uno` to `crates/fbuild-build/tests/avr_build.rs` as the integration-level companion to the hermetic unit test landed in #232. The unit test exercises the watch-set hash and `build_rebuild_signature` directly; this test drives a real AVR Uno build through `AvrOrchestrator.build()`, tars the resulting project tree, extracts it under a different parent directory, stomps mtimes, and rebuilds. It then asserts the warm rebuild hits the fast-path (`reused cached artifacts` in `BuildResult::message`), produces a byte-identical firmware.hex, and runs faster than the cold build. Catches failure modes the unit test cannot: - orchestrator state persisted outside the watch set - fast-path predicate bugs that pass per-layer unit tests but reject a legitimately-cached `BuildResult` - absolute paths baked into `build_fingerprint.json` or other artifacts the predicate reads Test sets `FBUILD_NO_ZCCACHE=1` (via an RAII guard) on purpose: zccache has its own fingerprint-state machinery that is covered by `zccache_hit_across_workspace_rename.rs`, and decoupling lets this test focus on the fbuild-owned fast-path predicate that the #147 fix actually changed. Gated `#[ignore]` per the established AVR-test pattern (downloads avr-gcc + Arduino-AVR core on first run). Also re-adds `tar = { workspace = true }` to fbuild-build dev-deps (the dependency was introduced on the #232 branch and the test on this branch also uses it). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Follow-up to #232. Adds an
#[ignore]-gated integration test that drives a real AVR Uno build end-to-end through the tar-extract scenario described in #147 / #231:proj_a/viaAvrOrchestrator.build()-- assert no fast-path hit (cold).proj_a/into memory, extract under a different parent directory (tmp_b/nested/run-b/deeper/), stomp mtimes to 2020-01-01.proj_b/. Assert: fast-path hit (reused cached artifactsinBuildResult::message), firmware.hex byte-identical to cold output, wall-clock faster than cold.What this catches that #232's unit test cannot
BuildResult.build_fingerprint.jsonor compile DB that the predicate actually reads.FBUILD_NO_ZCCACHE
The test sets
FBUILD_NO_ZCCACHE=1(via an RAII env-var guard). zccache has its own fingerprint-state machinery already covered byzccache_hit_across_workspace_rename.rs, and decoupling it here keeps this test focused on the fbuild-owned fast-path predicate that the #147 fix actually changed. If we ever observe zccache state failing to survive tar-restore in CI, that is a separate bug.Test plan
FBUILD_NO_ZCCACHE=1 uv run --script ci/test.py -p fbuild-build --test avr_build -- --ignored cache_survives_tar_extract_uno --nocapture-- passes locally (Windows): cold 1.50s, same-project warm 0.06s, post-tar-extract warm 0.06suv run --script ci/test.py -p fbuild-build-- still green (new test correctly#[ignore]'d in default runs)uv run soldr cargo clippy --workspace --all-targets -- -D warnings-- clean🤖 Generated with Claude Code