Skip to content

fix(cli): triage review findings from bugbot and coderabbit

MacroscopeApp / Macroscope - Effect Service Conventions succeeded Aug 14, 2026 in 54s

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

💭 I'm reviewing the new CLI triage files and checking their import conventions against the codebase standards. The imports look mostly aligned, though I'm noticing the use of named imports from the effect/unstable/cli subpath and need to verify whether that matches the established pattern for Effect library imports. Looking at the error classes, TriageAgentSpawnError correctly uses Schema.Defect() for the cause field, and TriageAgentChoiceRequiredError is appropriately minimal as a domain error. The dependency acquisition at the CLI boundary—using Effect.callback with process spawning and Effect.promise with readline—is acceptable for this context. Since this is a CLI command that consumes services like FileSystem and Path, the conventions do apply. I should check how existing CLI commands in the repo handle their imports to ensure consistency, and verify that the imperative process.exitCode assignment is standard practice at the CLI boundary. Looking at how the codebase handles interactive processes and dependency injection — the repo uses Prompt from effect/unstable/cli in pair.ts and connect.ts, but triage.ts bypasses this pattern by using Effect.promise with node:readline directly and spawning child processes through NodeChildProcess.spawn rather than a centralized service. I should check whether other CLI commands follow a consistent approach to process spawning and prompting to understand if this is an intentional deviation or something that should be standardized. I'm checking that the error classes follow the repo conventions—using Schema.TaggedErrorClass with structured attributes for the error messages, and the TriageAgentChoiceRequiredError doesn't need any fields. The Schema.Defect() approach for the cause looks good, and having distinct error classes like TriageAgentUnavailableError and TriageAgentChoiceRequiredError keeps things clean. On the implementation side, I'm using Effect.promise with node's readline module instead of Prompt from the unstable CLI API—the repo uses Prompt elsewhere, but that's more of a style preference than a hard rule. Similarly, I'm calling node:child_process directly rather than wrapping it in an Effect service, which matches what the repo does in other places. The test file is fine since this is a new feature, not just a mechanical refactor. I'm also using NodeOS.release() and process.version directly inside Effect.gen, which is imperative but contained, and pulling HostProcessPlatform from shared. The imports look solid—namespace import for ServerConfig and a pure helper import for resolveBaseDir. Now I'm checking whether serverRuntimeState.ts is a service module that exports a make/layer, since that would suggest using a namespace import instead of the named import for readPersistedServerRuntimeState. Looking at the imports and module patterns, serverRuntimeState.ts is a straightforward helper so named imports work fine, while config.ts is a service module properly imported as a namespace with ServerConfig.deriveServerPaths. The code follows the conventions without issues, but there's a tension between the instruction to respond with just "All clear" and the requirement that the final response be JSON formatted.


Agent Credits: 46 credits