Skip to content

Studio: Windows — the system map reads and prints paths in one form (#936) #970

Backlog

Description

@danielrispler

Parent

#936

What to build

plotkeeper map check, system-map check and the extractors give on Windows what they give on macOS and Linux (#936, User Stories 13). On the Windows job, 16 system-map tests fail on path spellings. #938 (PR #968) ignores them on Windows with the reason "the system map's extractors spell paths with backslashes on Windows (no Phase 1 ticket yet)". This ticket makes them pass there and removes those ignores.

What the Windows runs showed (run 46394903858, both legs, verified from the job logs):

  • extract::tests::an_untrusted_commit_s_cargo_folder_holds_no_toolchain_file: the commit mode's file list holds src\lib.rs where src/lib.rs is expected.
  • The cargo extractor finds no pairs (extract::contract::the_pairs_from_a_file_importing_another_are_exactly_that_one, and 12 rows of system-map/tests/edges.rs that expect alpha>beta and get nothing).
  • dotnet::an_absolute_path_gives_nothing panics with InvalidFilename (os error 123) when it writes its fixture.

The cause is unverified. A first reading: cargo::metadata canonicalises the root (system-map/src/extract/cargo.rs:126-127), which on Windows gives a \\?\C:\… path, while cargo metadata reports C:\…. So relative_to's strip_prefix (:132-135) never matches, and a path the extractors join gets \. Confirm before fixing. The rule is the same as for the rest of Phase 1: compare in one spelling, and give the map's paths with /. #947 owns the core's path rule, and system-map does not depend on the core.

Acceptance criteria

  • The 16 tests carrying the "(no Phase 1 ticket yet)" ignore pass on both legs of windows.yml, with the ignore removed, and the PR names each one.
  • Each fix's row was red on Windows first, an assertion failure. These 16 are those rows.
  • macOS and Linux output of system-map check and --json is unchanged (the existing tests).
  • npm run check and npm run check:windows pass.

Reading

Touches

  • Files: system-map/src/extract/cargo.rs, system-map/src/extract/mod.rs, system-map/src/commit.rs, system-map/src/lib.rs, system-map/src/extract/contract.rs, system-map/src/extract/tests.rs, system-map/tests/edges.rs, system-map/tests/dotnet.rs, system-map/tests/common.rs
  • Session: auto mode
  • Route: medium · effort medium — path spelling in one crate, with its tests already red on Windows; no stored type

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentwindows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions