Context
The architecture & security review (Section 9 - Testing Coverage) flagged a medium-severity test coverage gap:
Environment.swift contains complex async state management with no unit tests. This includes:
- Multiple caches:
repoInfoCache, pathValidityCache, branchNameCache, gitRepoCache, worktreeStateCache, activePortCache, taskDescriptionCache, githubRemoteCache, githubRepoCache, githubPRCache
- Adaptive throttling (10s/60s intervals)
refresh(), refreshRepoInfo(), refreshAllRepoInfo(), refreshWorktreeState(), refreshPathValidity() logic
Suggested action
Add EnvironmentTests.swift covering caching behavior, throttle timing, and refresh logic.
Context
The architecture & security review (Section 9 - Testing Coverage) flagged a medium-severity test coverage gap:
Environment.swiftcontains complex async state management with no unit tests. This includes:repoInfoCache,pathValidityCache,branchNameCache,gitRepoCache,worktreeStateCache,activePortCache,taskDescriptionCache,githubRemoteCache,githubRepoCache,githubPRCacherefresh(),refreshRepoInfo(),refreshAllRepoInfo(),refreshWorktreeState(),refreshPathValidity()logicSuggested action
Add
EnvironmentTests.swiftcovering caching behavior, throttle timing, and refresh logic.