Skip to content

fix(web): cloud account service attaches in an effect, not during render

MacroscopeApp / Macroscope - Effect Service Conventions completed Oct 25, 2026 in 1m 19s

Effect Service Conventions: unsafe log annotation

packages/client-runtime/src/relay/managedRelayState.ts:319 logs an unbounded error message as an annotation. An inline review suggests retaining only safe diagnostic fields.

Details

Warning

  • Invalid effort level "max" in front matter. Fell back to "low". Valid values are: low, medium, high.

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.

Reviewed all 5 changed files (no prior completed review)


πŸ” Agent activity β€” 17 tool calls

πŸ’­ Evaluating cloud service logging I need to inspect the file and see how the conventions apply. The new cloud account service might not violate anything unless the service dependency injection handlers are using deliberate callback strategies. It seems like logging arbitrary error text could be an issue since it might violate safe log annotations. The existing error message arises from the UI, but the new logging annotation could be a concern due to the arbitrary defect text. I’ll need to look into this further.

1. browse_code β€” packages/client-runtime/src/relay/managedRelayState.ts

πŸ’­ Evaluating log annotations I'm analyzing the comment log annotations for defects. Is the annotation strong? Yes, it’s quite explicit. I could suggest removing the message annotation and just keeping traceId, since logging via Effect logError might be simpler. I think an inline suggestion at line 319 to replace annotateLogs({ traceId }) would streamline things, but then the message variable would be unused. I should also check if the traceId is safe, which it likely is.

2. modify_pr β€” Submitted review with 1 inline comment

3. browse_code β€” packages/client-runtime/src/relay/cloudAccountService.ts

4. browse_code β€” In packages/client-runtime/src/relay/cloudAccountService.ts is createCloudAccountService an Effect Context.Service or an imperative integration adapter? Summarize how called and whether handlers are Effect service dependencies versus callbacks, concise.

5. browse_code β€” packages/client-runtime/src/relay/index.ts

6. browse_code β€” Check new logListingFailure in packages/client-runtime/src/relay/managedRelayState.ts: does describeManagedRelayFailure put unbounded arbitrary error.message in Effect.annotateLogs? Are there sanitization/bounds? Give concise evidence.

7. browse_code β€” packages/client-runtime/src/relay/managedRelayState.ts

8. browse_code β€” apps/web/src/cloud/managedRelayState.ts

9. browse_code β€” apps/mobile/src/features/cloud/managedRelayState.ts

10. browse_code β€” packages/client-runtime/src/relay/cloudAccountService.ts

11. browse_code β€” packages/client-runtime/src/relay/errorPresentation.ts

12. browse_code β€” packages/client-runtime/src/relay/managedRelayState.ts

13. browse_code β€” packages/client-runtime/src/relay/managedRelayState.ts

14. browse_code β€” packages/client-runtime/src/relay/index.ts

15. browse_code β€” packages/client-runtime/src/relay/cloudAccountService.ts

16. browse_code β€” packages/client-runtime/src/relay/managedRelayState.ts

17. browse_code β€” packages/client-runtime/src/relay/managedRelayState.ts


Agent Credits: 18 credits

Token usage: 78 uncached input Β· 312,732 cache-read input Β· 32,136 cache-write input Β· 2,264 output
Agent Credits may also include non-token charges from external tools such as web research.