Skip to content

chore: remove unused code and brittle tests

MacroscopeApp / Macroscope - Effect Service Conventions succeeded Sep 2, 2026 in 1m 9s

Effect Service Conventions: All clear

All clear

Details

Note

Your check run agent prompt is: .macroscope/check-run-agents/effect-service-conventions.md
More information about how Check Run Agents work can be found in our Help Center.


🔍 Agent activity — 8 tool calls

💭 I'm checking the diff for Effect service conventions - the TextGeneration changes look right, removing the deprecated interface and alias in favor of the Service tag pattern. Now I'm examining whether removing streamChanges from ProviderAdapterRegistry's shape breaks any existing consumers. I'm also noting that the standalone ProviderAdapterRegistryShape interface wasn't introduced by this PR, so flagging it would be scope creep, and I'm weighing whether removing the unused isThemeLibraryStorageError predicate export from themePalette.ts is actually fine since it appears unused. Let me search the codebase for any remaining references to these removed items before drawing conclusions.

1. git_tools — streamChanges

2. git_tools — listProviders

💭 Good, listProviders is fully removed with no consumers left. Checking streamChanges on ProviderAdapterRegistry, I confirm nothing actually calls the adapter registry's streamChanges—the only usage found is on the instance registry's snapshot, so it's safe to remove there too. Now I want to verify the test file lines around 120/139 are typed against the instance registry shape rather than the adapter registry, since if they weren't TypeScript's excess property checks would likely flag them.

3. browse_code — apps/server/src/provider/Layers/ProviderAdapterRegistry.test.ts

4. browse_code — apps/server/src/provider/Services/ProviderAdapterRegistry.ts

💭 These are pre-existing patterns not introduced by the PR, so I shouldn't demand unrelated cleanup. Checking the mock file's removed imports looks fine, and I'm now looking at apps/web changes where themePalette.ts drops a schema predicate export, which the conventions say should be exposed directly. If that predicate is unused, removing it is fine, though I should verify the error type isn't still referenced elsewhere. The linkEnvironment.ts removal of listCloudDevices seems like a safe unused-export cleanup too. But the deleted ThreadTerminalRouteScreen test and terminalRouteBootstrap module concern me more — I need to grep whether resolveTerminalRouteBootstrap is still referenced anywhere, since that could break the build. Similarly I want to verify no remaining references to the removed TextGenerationService interface, and check usages of formatProviderDisplayName, getProviderDisplayName, isProviderEnabled, newCommandId, and isLinuxPlatform before assuming their removal is safe.

5. git_tools — resolveTerminalRouteBootstrap|TextGenerationService|TextGenerationShape|formatProviderDisplayName|isProviderEnabled|getProviderDisplayName|newCommandId|isLinuxPlatform|isThemeLibraryStorageError

6. browse_code — apps/server/src/textGeneration/TextGeneration.ts

💭 TextGeneration.ts looks fine, following conventions properly, and removing the redundant interface and deprecated alias aligns with the rules. Now I want to check if removing @effect/platform-node-shared from the server package.json breaks anything, so I should verify it's not still imported anywhere.

7. git_tools — platform-node-shared

8. git_tools — @noble/hashes

💭 The mobile app's dependency comes transitively, which is fine, and nothing in the diff violates Effect service conventions—the changes are just removals of unused exports, deprecated aliases, and tests, with the TextGeneration change matching conventions well. I also confirmed the provider icon utils removal of AVAILABLE_PROVIDER_OPTIONS is fine. Checking removed comments for lost invariants: the ProviderAdapterRegistry doc comment and mock comment removals both described the now-deleted listProviders behavior, so removing them is correct rather than a loss of documentation. Similarly, the test file's comment about default-instance fixtures is now stale since the Live layer no longer filters by default instance after the listProviders removal, so that deletion is also appropriate. I've found no actual issues here — this is a clean result, so I'll state success concisely in my summary.


Agent Credits: 64 credits

Token usage: 10 uncached input · 225,009 cache-read input · 64,147 cache-write input · 3,749 output
Agent Credits may also include non-token charges from external tools such as web research.