feat(composer): show provider account usage in the composer - #6080
gfsaaser24 wants to merge 1 commit into
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 — reasoning, no tool calls
💭 The previous violations around split files have been resolved—the code now consolidates the Services and Layers into single files with inline interfaces and proper Effect patterns. I'm checking the new files for other potential issues, starting with import conventions and how they're using the Context and Service types. Looking at
ProviderUsageLimits.ts, it's usingLayer.effectwith a scoped Effect, which depends on the Effect version—in v4 the Layer automatically provides scope, but I need to verify the repo's conventions. Meanwhile,ProviderUsageRefresher.tsimportsServerSettingsServiceas a named import rather than as a namespace, which might violate the service boundary convention that prefers importing the module as a whole and accessing its public shape. TheProviderUsageIngestionLivelayer in the Layers directory is layer-only (usingLayer.effectDiscard), which is acceptable even though it has aLivesuffix typically reserved for services. Looking at how consumers import these—ws.tsimportsProviderUsageRefresheras a named import rather than a namespace import, which technically contradicts the convention about importing service modules as namespaces, though the existing codebase seems to do this widely with tags likeProviderRegistry. TheProviderUsageRefresher.makefunction acquires dependencies from the environment and provides them into the refresh effect, which exposes requirements in the layer type rather than hiding them in closures, so that's acceptable.… Now I'm reviewing the relocated service files and checking the head versions for any remaining violations. Looking at ProviderUsageRefresher.ts, the imports from the contracts package and the effect library appear to be in order. But I'm noticing some inconsistency in how service tags are imported across the codebase — some files use named imports likeServerSettingsServicedirectly, while others use namespace imports likeimport * as ProviderUsageLimits. I need to check whether the named tag imports in this file align… The repo uses named tag imports as standard, which is fine. I'm noticing thatHostProcessEnvironmentgets yielded insiderefreshClaudebut isn't required at construction time—that suggests the dependency requirement might be leaking into the returned Effect, thoughrefreshitself returnsEffect.Effect<void>according to the interface. TherunRefreshfunction provides several dependencies like HttpClient, FileSystem, Path, and ChildProcessSpawner, butHostProcessEnvironmentis being yielded somewhere inside the refresh logic.… Both service modules are now aligned with the canonical pattern: single file, inline interface, usingmakeandlayer, with the service exported asFoo["Service"]. I'm looking at the remaining candidates, starting withProviderUsageIngestion.tsin theLayers/directory—it's currently a daemon-only layer namedProviderUsageIngestionLiveexported viaLayer.effectDiscard, but it doesn't follow the standard service export convention. The repo has many similar...Livelayers in… Checking the recent changes for any new violations — the type definitions inclaudeUsageFetch.ts` look good with… I'm working through a conflict between the instruction to output "All clear" when there are no findings and the requirement to return JSON formatted results. The schema expects…
Agent Credits: 113 credits