Skip to content

Windows CI red on master since ecaec0f: two store-types resolver tests assert a POSIX-only path #17

Description

@iceteaSA

Windows CI has been red on master since ecaec0f (2026-08-21). Ubuntu, macOS, and the live Postgres backend are all green on the same commit, so it is Windows-only. Flagging because I noticed it inheriting into an open PR rather than because I hit it in my own work.

Two tests fail, both in cortexkit-store-types:

resolver_tests::empty_env_values_count_as_unset
resolver_tests::module_store_path_defaults_to_home_local_share

  left: "C:\\Users\\runneradmin\\AppData\\Roaming/cortexkit/astrocyte/store.db"
 right: "/tmp/home-test/.local/share/cortexkit/astrocyte/store.db"

The resolver is behaving as written. resolve_data_home_path checks XDG_DATA_HOME, then — under #[cfg(windows)]APPDATA and USERPROFILE, and only then HOME. A GitHub Windows runner always has APPDATA set, so the HOME branch is unreachable there. Both failing tests set HOME and assert the HOME result, so they are asserting a POSIX-only path through a function that deliberately branches on platform.

The sibling tests pass precisely because they set XDG_DATA_HOME, which is checked before the platform branch on every OS.

So this is a test-gating gap rather than a resolver defect — the tests were written against the pre-0.2.1 shape and the #[cfg(windows)] block made two of them platform-specific without their gating following.

Cheapest correct fix is to gate them and add the counterpart, so Windows keeps real coverage instead of just going quiet:

#[cfg(unix)]
#[test]
fn module_store_path_defaults_to_home_local_share() { ... }   // unchanged

#[cfg(windows)]
#[test]
fn module_store_path_prefers_appdata_over_home() {
    // APPDATA wins over HOME on Windows, per resolve_data_home_path
}

Gating alone (#[cfg(not(windows))]) also turns CI green, but it would leave the Windows branch of the resolver with no test at all, which seems like the wrong trade for a crate whose whole job is that this resolution is identical everywhere it runs.

One question I could not answer from this repo, and it decides whether the above is the whole fix. The crate's stated purpose is to mirror the daemon's rules exactly, and the comment on relative_xdg_data_home_is_honored_matching_the_daemon says the authority is subc's default_data_home rather than the XDG spec. Does subc's own resolution consult APPDATA on Windows? If it does, the tests are simply mis-gated and the fix above is complete. If subc falls through to HOME on all platforms, then this crate now resolves a different directory than the daemon serves on Windows — which is the divergence class the crate exists to eliminate, and the tests would be right while the resolver is wrong.

I have no visibility into subc from here, so I am flagging the question rather than assuming the benign branch.

For the record: my open PR (#14) inherits this failure through the merge check, but the failing crate has no dependency relationship with the one that PR touches (cortexkit-model-catalog), and master fails identically on its own without my branch. Not reporting it as a blocker on my side, just as red on yours.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions