Repository navigation
test(platform): zero the platform-boundary ledger through the facade - #2119
Merged
Merged
Conversation
The last six baselined occurrences were all test-only OS branches, so the ledger, the Dylint baseline and the research inventory now read zero. Each site asks the facade instead of compiling for one host: - platformio_package_resolution: the file-URL mapping is host-adaptive (`Url::to_file_path` keeps the drive letter on Windows and folds it into a leading `/C:` segment elsewhere), so the expectation is named at run time and the case now covers both hosts instead of compiling for one. - emulator/tests_npm_cache: clearing PATHEXT only means something where PATHEXT exists. - emulator/tests_process: the script-runner shape is a runtime host fact, and the shell's spelling now comes from `platform::executable::native_name` rather than a literal `cmd.exe` inside a host branch. - qemu_linux_runtime: bundle provisioning is a Linux host *policy*, so the file compiles everywhere and skips at run time. Emptying the ledger exposed five validation tests that borrowed row 0 from the committed data; they now build a synthetic row, so they test the validation logic rather than whatever happens to be baselined.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
8 tasks
The cross-target pass derives its package list from baseline.txt and then asserted that list was non-empty. Zeroing the ledger is phase 9's terminal state, so that assert now aborts the whole step under `bash -e` and the job fails with no diagnostic at all (`test 0 -gt 0`, exit 1, no output). An empty ledger means no crate carries target-specific source, so there is nothing a cross-target pass could police: skip those passes and keep the whole-workspace Linux pass. Separate the row count from the derived list so a parse regression still fails - a non-empty ledger must yield packages and every data row must name a crate package.
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.
Part of #1315 (phase 9/9); #1315 stays open for the closing three-host audit.
Why
The platform-boundary ledger reached 40 rows when this pass started and stood at 6 after the QEMU runtime-library migration. Those last six were all test-only OS branches — the one place where
#[cfg(...)]could still be used to avoid asking the facade. This PR removes them, soci/platform_boundary_ledger.tsv,dylints/enforce_platform_boundary/src/baseline.txtand the research inventory all read zero.What changed
fbuild-core/tests/it/platformio_package_resolution.rs#[cfg(windows)]fbuild-daemon/.../emulator/tests_npm_cache.rs#[cfg(windows)]around the PATHEXT clearfbuild-daemon/.../emulator/tests_process.rs#[cfg(windows)]+#[cfg(not(windows))]bodiesplatform::executable::native_nameinstead of a literalcmd.exeinside a host branchfbuild-packages/tests/it/qemu_linux_runtime.rs#![cfg(target_os = "linux")]Emptying the ledger exposed five validation tests that borrowed row 0 from the committed data (
IndexErroron an empty ledger, plus two vacuous assertions). They now build a synthetic row over a real non-exempt source file, so they exercise the validation logic rather than whatever happens to be baselined.Receipts (real output)
enforce_platform_boundary.py --print-totals→rows=0; dylint_rows=0, exit 0platform_boundary_research.py --check→ exit 0 (inventory regenerated:--write, 6 rows removed, no line churn elsewhere)python -m unittest ci.test_enforce_platform_boundary ci.test_platform_boundary_research→ Ran 30 tests … OKsoldr cargo test -p fbuild-core --test it platformio_package_resolution→ 22 passed; 0 failedsoldr cargo test -p fbuild-daemon --lib emulator::→ 47 passed; 0 failed; 3 ignoredsoldr cargo test -p fbuild-packages --test it --no-run→ compiles with the file-level gate gonesoldr cargo clippy -p fbuild-core -p fbuild-daemon --all-targets --no-deps -- -D warnings→ 0 warnings, exit 0soldr cargo fmt --all -- --check→ exit 0wc -l platformio_package_resolution.rs→ 997 (under the 1000 cap; theif/elsewas restructured so rustfmt does not split it into zero headroom)Red proofs
#[cfg(windows)]inplatformio_package_resolution.rsmakes the gate fail withnew occurrence: … #[cfg(windows)] 0 host host_mechanic+Dylint baseline and independent scanner disagree, exit 1 — an empty baseline is still a guard, not a no-op.windows_file_url_maps_to_drive_pathpasses on Linux with the/C:/platforms/customarm, i.e. the host-adaptive expectation is measured, not assumed. The.exespelling fix was forced by the repo's owntest_executable_spelling_does_not_bypass_the_executable_facadeguard, which caught my first draft.Honest limits
cfg(target_os); every symbol the test calls is host-neutral) and by thefull / windows / Checklane, not by a local run.esp_qemu_starts_without_any_host_library_installstays#[ignore]d (it downloads ~20 MB); the compile is the check here, the guard is a one-lineis_linux()skip.python -m unittest discover -s cireports 6 unrelated environmental failures on this box (No module named 'zstandard',No module named 'ci_lint', an external slicer subprocess, and two type-checker fixtures) — none touch this diff.