Skip to content

bug(windows): main's Windows lane is red on path-separator assertions in disk-preflight / rebuild-signature tests (blocks every canary) #1780

Closed

Description

@zackees

Summary

The Windows lane is red on main for reasons unrelated to any feature: three test assertions hard-code POSIX path literals that never appear in fbuild's normalised/rendered Windows paths. Any ci-full run — and therefore any setup-soldr promotion canary — fails on full / windows / Check (windows-latest), which cascades into full / Full coverage and CI selected coverage.

Evidence

Canary PR #1779 (pins only, no logic changes), run 40831033208, job full / windows / Check (windows-latest):

failures:
  disk_preflight_tests::a_root_that_does_not_exist_yet_is_measured_on_its_volume
    panicked at crates\fbuild-build-engine\src\disk_preflight_tests.rs:274:5
    assertion `left == right` failed: the missing root is asked first, then its ancestor
  disk_preflight_tests::only_the_short_root_is_named_on_failure
    panicked at crates\fbuild-build-engine\src\disk_preflight_tests.rs:149:5
  rebuild_signature::tests::prefix_map_flags_normalize_their_source_path
    panicked at crates\fbuild-build-engine\src\rebuild_signature.rs:430:9
    assertion `left == right` failed

Cause: assertions like error.contains("/project") / !error.contains("/cache has") and path.display().to_string() assume /-separated text. On Windows the message carries D:\..., so the substring is absent (or a different root is named) and the test fails.

Fix exists, stranded in an open canary PR

PR #1771 (chore/setup-soldr-exact-canary) already contains exactly this fix — NormalizedPath::new(...) + display() / display_slash() instead of literals, in disk_preflight_tests.rs and crates/fbuild-cli/src/daemon_client/tests.rs. Its run 40741645899 is green on full / windows / Check (windows-latest), full / Full coverage and CI selected coverage.

That fix is currently only reachable by taking a canary branch, which is why it keeps being re-derived: PR #1779 had to port those two files out of #1771 to get past Windows.

Ask

Land the two test-file fixes on main independently of any canary — they are test-only, cross-platform-safe (NormalizedPath is the production type) and unblock every future ci-full run and every setup-soldr v0 promotion canary. PR #1771 can then shrink to pins only, or be closed.

Activity

  1. zackees commented on Oct 29, 2026

    @zackees
    MemberAuthor

    Fixed by #1782 (agent/windows-path-assertions), merged as 2ba57549 at 2026-10-29T12:29:18Z.

    What was actually wrong

    Three assertions hard-coded POSIX separators (/home/..., /proj/...) that never appear in fbuild's normalised or rendered Windows paths:

    • disk_preflight tests compared Path::display() output instead of the platform renderer (display() -> display_slash() expectations).
    • daemon-owner claim test asserted .exe path via Path::display().
    • rebuild_signature treated /home/... as absolute on Windows.

    While fixing the third one I found it was not only a test bug: debug_prefix_map_args used Path::display(), so the same project emitted backslash-bearing -fdebug-prefix-map values on Windows and broke cross-host core-cache sharing. #1782 changed production code to NormalizedPath::display_slash().

    Evidence

    Closing: the Windows lane is no longer red on main for path-separator assertions.

  2. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Status: two of the three cases are already fixed on main — disk_preflight_tests (NormalizedPath-based assertions) and rebuild_signature (host-native fabricated roots, which cites this issue). The last one, debug_prefix_map_covers_an_external_build_root, is fixed in #1794 by asserting the flag's meaning (starts_with('-fdebug-prefix-map='), ends_with('=fbuild-build'), names the override root, mapped path ends_with('uno/quick')) instead of a separator style.

    With that, the full / windows lane should be clean for canaries that don't need branch-local test patches. If you'd rather close this once #1794 lands, that's the last piece.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions