Dashboardopencode-loreuseTestConfigDir isolateProjectRoot

useTestConfigDir isolateProjectRoot

Category: gotcha
Confidence: 1.00
ID: 01a0a06d-067e-7934-9cab-a8603cac10f0
Project ID: 6f4be9ff-ed84-4cca-a9e7-732a0b0b8677
Cross-project: No
Recalled in other projects: 0
Source session: 0IxrNA1DXwHaouNJs
Created: 2026-09-14 14:58:14
Updated: 2026-09-14 14:58:14

Content

Trap: using useTestConfigDir(prefix) looks isolated, but resolveOrg, detectDsn, or findProjectRoot can walk upward from .test-tmp, discover the real repository .git, scan source for Sentry DSNs, and trigger mocked network calls or 5-second timeouts. Fix: always use useTestConfigDir(prefix, { isolateProjectRoot: true }) for such paths; its temporary .git stops upward traversal.

Move to: