Skip to content

Name-lookup test counts only its own game's lookups - #155

Merged
Omar-VF merged 1 commit into
dev-publicfrom
fix/presets-resolver-test
Nov 11, 2026
Merged

Omar-VF merged 1 commit into
dev-publicfrom
fix/presets-resolver-test

Conversation

@Omar-VF

@Omar-VF Omar-VF commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

TestResolveNames_UsesResolverAndCachesResult failed on any PC with a Steam game installed that the offline name dictionary doesn't know. CI has no Steam, so it passed there.

Why: the scan also reads the real Steam install on the machine running the test, since the registry isn't isolated, and looks up names for unknown games there too. The test counted every lookup:

  • 2 lookups on the first scan
  • 3 by the second, because a name that isn't found isn't cached

Fix: count only lookups for the test's own game, with an atomic counter, as lookups run concurrently. Test-only, no code change.

Testing: the test passes 5 times in a row on a PC where it failed every time before, and go test ./internal/presets passes.

The scan also reads the real Steam install on the machine running the
test, and looks up any game there the offline dictionary lacks. Every
lookup was counted, so the test failed on a PC with such a game
installed: two lookups on the first scan, and a third on the second,
since a name that is not found is not cached. The count now covers only
the test's own game, and is atomic, as lookups run concurrently.
@vercel

vercel Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
open-save Ready Ready Preview Nov 11, 2026 9:28am UTC

@Omar-VF
Omar-VF merged commit 8adb01e into dev-public Nov 11, 2026
22 checks passed
@Omar-VF
Omar-VF deleted the fix/presets-resolver-test branch November 11, 2026 09:46

This branch was successfully deployed

1 active deployment
Preview — dde15509 Deployed Nov 11, 2026 by vercel[bot]
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.

1 participant