Summary
Extend the test infrastructure to cover cross-runtime flows: scenarios
where a file is created on one runtime (Windows) and read/operated on
from another (WSL), or vice versa.
The existing scripts/run-cross-platform-tests.sh runs the suite
independently on both Windows and WSL. This issue adds tests that
require both runtimes to be present and coordinate between them.
Scenarios to cover
- WSL writes, Windows reads: create a file + metadata in WSL,
then verify filekit on Windows sees it correctly (timestamps,
mode, xattrs-translated-to-attribs if any)
- Windows writes, WSL reads: create a file with SDDL ACLs and
NTFS ctime in Windows, verify filekit in WSL sees the POSIX
translation correctly (ctime is lost, SDDL is invisible, but
mtime/size/mode are preserved)
- UNC src, local dst: when unctools is installed, verify the
alias detection from sub-issue #N+5 works end-to-end across real
network boundaries (or a local simulated UNC via net share)
- WSL mount src, Windows-form dst:
/mnt/c/Users/foo/src.txt
and C:\Users\foo\dst.txt -- these are the same underlying
NTFS files, filekit should handle them correctly regardless of
which runtime initiates the copy
- Metadata preservation across runtimes: SDDL on Windows ->
copy to WSL local fs -> SDDL is lost as expected, POSIX mode is
reasonable; copy back to NTFS and SDDL is missing (documented
expected behavior, NOT a bug)
Implementation
Phase A: test fixtures that span runtimes
# tests/cross_runtime/conftest.py
@pytest.fixture
def wsl_writeable_on_c():
"""A path that WSL can write and Windows can read on NTFS."""
# Create via WSL subprocess if running on Windows,
# or natively if running in WSL
...
@pytest.fixture
def windows_writeable_from_wsl():
"""Same thing from the other direction."""
...
Phase B: coordinated test runner
Extend scripts/run-cross-platform-tests.sh:
# New subcommand: cross-runtime tests that coordinate between both sides
./scripts/run-cross-platform-tests.sh --cross-runtime
The runner:
- On Windows: creates a fixture file, records its state
- Invokes WSL to verify the fixture from the Linux side
- Invokes WSL to modify the fixture in a known way
- Returns to Windows and verifies the modifications are visible
Phase C: CI integration (longer term)
GitHub Actions windows-latest runners don't have WSL pre-installed,
but self-hosted runners can. This sub-issue tracks adding a
"cross-runtime" CI job that runs on a self-hosted runner with both
Windows and WSL. For v0.3.0 this is optional; manual local runs are
enough.
Acceptance criteria
Dependencies
- Blocked by: #N+1 (data submodule -- we need something to test),
#N+5 (cross-runtime continuity -- we need the alias detection
that this infrastructure exercises)
- Related to: #N+4 (parse_user_input_path -- needed to handle
path forms that come from the other runtime)
Non-goals
- This issue is NOT about setting up a full CI farm with self-hosted
runners. That's a separate infra project.
- This issue does NOT test Windows-to-macOS or Linux-to-macOS
cross-runtime flows (we don't have macOS hardware in the loop
yet -- community testing welcome per docs/platform-support.md).
Summary
Extend the test infrastructure to cover cross-runtime flows: scenarios
where a file is created on one runtime (Windows) and read/operated on
from another (WSL), or vice versa.
The existing
scripts/run-cross-platform-tests.shruns the suiteindependently on both Windows and WSL. This issue adds tests that
require both runtimes to be present and coordinate between them.
Scenarios to cover
then verify filekit on Windows sees it correctly (timestamps,
mode, xattrs-translated-to-attribs if any)
NTFS ctime in Windows, verify filekit in WSL sees the POSIX
translation correctly (ctime is lost, SDDL is invisible, but
mtime/size/mode are preserved)
alias detection from sub-issue #N+5 works end-to-end across real
network boundaries (or a local simulated UNC via
net share)/mnt/c/Users/foo/src.txtand
C:\Users\foo\dst.txt-- these are the same underlyingNTFS files, filekit should handle them correctly regardless of
which runtime initiates the copy
copy to WSL local fs -> SDDL is lost as expected, POSIX mode is
reasonable; copy back to NTFS and SDDL is missing (documented
expected behavior, NOT a bug)
Implementation
Phase A: test fixtures that span runtimes
Phase B: coordinated test runner
Extend
scripts/run-cross-platform-tests.sh:# New subcommand: cross-runtime tests that coordinate between both sides ./scripts/run-cross-platform-tests.sh --cross-runtimeThe runner:
Phase C: CI integration (longer term)
GitHub Actions
windows-latestrunners don't have WSL pre-installed,but self-hosted runners can. This sub-issue tracks adding a
"cross-runtime" CI job that runs on a self-hosted runner with both
Windows and WSL. For v0.3.0 this is optional; manual local runs are
enough.
Acceptance criteria
tests/cross_runtime/directory with at least 5 scenariosfrom the list above
scripts/run-cross-platform-tests.sh --cross-runtimemode(e.g., on Linux-only CI or on Windows without WSL installed)
round-trip, for example)
Dependencies
#N+5 (cross-runtime continuity -- we need the alias detection
that this infrastructure exercises)
path forms that come from the other runtime)
Non-goals
runners. That's a separate infra project.
cross-runtime flows (we don't have macOS hardware in the loop
yet -- community testing welcome per
docs/platform-support.md).