Repository navigation
Effect Service Conventions: 6 tracing issues
Posted inline findings on six changed locations: per-message spans in apps/server/src/htmlRender/headlessChrome.ts and apps/server/src/preview/ServerBrowserStream.ts; redundant spans in apps/desktop/src/wsl/DesktopWslEnvironment.ts, apps/server/src/auth/EnvironmentAuth.ts, apps/server/src/auth/EnvironmentAuthPolicy.ts, and packages/client-runtime/src/authorization/service.ts.
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 206 changed files (merge base moved)
π Agent activity β 38 tool calls
π Identifying issues in services I need to pinpoint concrete issues within the services. It seems like the runPromise in the ServerBrowser domain service and the credentialStoreβs named imperative adapter might be allowed if that adapter bridges the Promise API without depending on the Effect service. The ServerBrowser already has a runPromise in place, but changing runPromiseWith context within the service constructor might worsen boundaries. Additionally, there's a malformed parentheses issue in the GitHubPullRequestApi's setPullRequestFilesViewed function.
1. browse_code β packages/source-control-github/src/server/GitHubPullRequestApi.ts
2. browse_code β apps/server/src/preview/ServerBrowser.ts
π Investigating service violations Iβm looking into the existing functions runForkWith and runPromiseWith, which seem to just consolidate without providing a report. I think itβs important to check for any service conventions violations. Iβm specifically curious if Effect.fn is wrapping a non-effect logger. Iβll need to inspect this further to ensure everything aligns with expectations and to avoid any potential issues. Letβs see what I can find!
3. browse_code β apps/server/src/htmlRender/headlessChrome.ts
π Evaluating event spans I'm considering how the per-event receive named spans are creating excessive spans. I wonder if the rule is explicitly untraced for per-event when there's a nearby reason for new uses. One option could be to suggest using Effect.fnUntraced along with that reason. I also think about how the ServerBrowserStream is processing chunks and whether the scripts logger should handle per event. Hmm, should I group comments or separate them inline?
4. browse_code β apps/server/src/preview/ServerBrowserStream.ts
π Considering behavioral issues I'm trying to analyze a behavioral issue that seems to stem from a failure caused by an outside service rule. It looks like the target is 2. I think a suggested fix could be to use an inline, self-contained adjustment with Effect.fnUntraced. However, the nearby reason might need a comment. I should suggest adding two lines to replace the existing line with a comment and a wrapper. Let's ensure everything is clear and complete!
5. modify_pr β Submitted review with 2 inline comments
6. browse_code β apps/server/scripts/record-codex-app-server-replay-fixture.ts
7. browse_code β apps/server/src/mcp/McpHttpServer.ts
8. browse_code β In changed apps/server/src/preview/ServerBrowserStream.ts and apps/server/src/htmlRender/headlessChrome.ts, are receive callbacks invoked per chunk/message? confirm hot paths and tracing context briefly.
9. browse_code β apps/server/src/preview/ServerBrowserStream.ts
10. browse_code β Check whether apps/server/src/preview/ServerBrowserStream.ts makeHandler uses explicit injected ServerBrowser service rather than yield from environment and whether existing code before PR had same parameter; answer brief.
11. browse_code β Assess whether changed packages/provider-cursor/src/server/credentialStore.ts newly introduces runPromiseWith inside a service constructor and is used as an imperative SDK callback; concise.
12. browse_code β Check apps/server/scripts/record-codex-app-server-replay-fixture.ts logger changed to Effect.fn logger: how often invoked and whether named span for event callback is hot path? concise.
13. browse_code β Check newly changed packages/provider-acp-registry/src/server/driver.ts enrichSnapshot Effect.fn: does it return Effect or plain value, and whether span per event? brief.
14. browse_code β Does packages/provider-acp/src/server/adapter.ts scheduleDeferredFinalize Effect.fn named function run per event or once per turn? brief.
15. browse_code β Check newly changed apps/server/src/orchestration-v2/http.ts decode cursor Effect.try Result handling whether Result failure cause is original thrown error or wrapper; brief.
16. browse_code β Check apps/server/src/htmlRender/headlessChrome.ts how CDP receive effect is run: confirms each complete message and span per invocation.
17. browse_code β Does named Effect.fn cause duplicate span in packages/client-runtime/src/authorization/service.ts authorizeDpop operations existing withSpan? confirm.
18. modify_pr β Submitted review with 1 inline comment β not performed: the agent's request was refused before it ran
19. modify_pr β POST repos/{owner}/{repo}/pulls/{pull_number}/comments
20. browse_code β Are named Effect.fn and existing Effect.withSpan duplicated in packages/client-runtime/src/authorization/service.ts? answer succinctly.
21. browse_code β Does apps/desktop/src/wsl/DesktopWslEnvironment.ts new named Effect.fn preWarm and prepareRuntime etc contain existing withSpan, creating redundant tracing? brief.
22. modify_pr β POST repos/{owner}/{repo}/pulls/{pull_number}/comments
23. modify_pr β POST repos/{owner}/{repo}/pulls/{pull_number}/comments
24. modify_pr β POST repos/{owner}/{repo}/pulls/{pull_number}/comments
25. browse_code β Among changed service method Effect.fn wrappers in apps and packages shown in PR #25099, identify ones wrapping pre-existing Effect.withSpan in same returned effect besides EnvironmentAuth, EnvironmentAuthPolicy, desktop WSL, client authorization. Give paths and lines briefly.
26. browse_code β packages/client-runtime/src/connection/onboarding.ts
27. browse_code β apps/server/src/orchestration-v2/CheckpointCaptureService.ts
28. browse_code β Does apps/server/src/device/EasDeviceHost.ts ensureAgentReady returned effect have explicit span? brief.
29. browse_code β Does packages/client-runtime/src/authorization/service.ts withRelayClientTracing introduce another explicit span? don't need.
30. browse_code β Does apps/server/src/provider/ProviderHostLive.ts credentials named wrapper duplicate existing span? brief.
31. browse_code β Does apps/server/src/orchestration-v2/ResourceCleanupService.ts newly wrapped methods withSpan same names? concise.
32. browse_code β No-op.
33. browse_code β No-op.
34. browse_code β No-op.
35. browse_code β No-op.
36. browse_code β No-op.
37. browse_code β No-op.
38. browse_code β No-op.
Agent Credits: 202 credits
Token usage: 324 uncached input Β· 5,202,253 cache-read input Β· 308,892 cache-write input Β· 10,892 output
Agent Credits may also include non-token charges from external tools such as web research.