Skip to content

test: make the suite pass on Windows and run it there in CI - #10

Merged
ephraimduncan merged 1 commit into
telemetry-dev:mainfrom
lofoneh:fix/windows-test-suite
Oct 6, 2026
Merged

ephraimduncan merged 1 commit into
telemetry-dev:mainfrom
lofoneh:fix/windows-test-suite

Conversation

@lofoneh

@lofoneh lofoneh commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

After #9, Windows CI only runs src/lib/usage, and the rest of the suite fails on Windows (12 tests on main).

  • The sync tests isolate everything through HOME, but os.homedir() uses USERPROFILE on Windows, so they were syncing my real agent logs. I stub HOME, USERPROFILE, APPDATA, LOCALAPPDATA and the XDG dirs now, and restore them after each test.
  • The Amp fixtures used POSIX paths and drive-less file:// URLs. They're built from native paths now; the adapter itself is unchanged.
  • The unknown-model test deleted the pricing cache, so it downloaded models.dev for real. On a slow connection it timed out and broke the next test (about half my runs). It's offline now, using the same fetch stub as the pricing tests.
  • The Windows CI job runs the full suite. I kept the job id as is.

All 125 tests pass on Windows across 8 runs. One thing I left out: about 20 agent-specific vars like CODEX_HOME still pass through to the sync tests. Happy to stub those too if you'd like.

Sync tests isolated the agent log locations through HOME only, but
os.homedir() reads USERPROFILE on Windows, so syncs scanned the real
user's logs. Stub HOME, USERPROFILE, APPDATA, LOCALAPPDATA and the XDG
base directories to the temp home, and restore them after each test.

The unknown-model test removed the pricing cache, so its sync fetched
models.dev over the network and could time out on a slow connection,
leaving that sync running into the next test. Keep it offline.

The Amp fixtures used POSIX paths and drive-less file URLs, which
Windows resolves differently. Build them from native paths.

Run the whole suite in the Windows CI job instead of only the project
path tests.
@lofoneh

lofoneh commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Bumping this one — it's the follow-up to #9, same Windows theme. Makes the suite pass on Windows and adds a job so CI catches it there. Green on both, no conflicts with main.

@ephraimduncan you took #9, so this should be familiar ground if you have time.

@ephraimduncan
ephraimduncan merged commit 42b1119 into telemetry-dev:main Oct 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants