Skip to content

fix(clients): older clients skip event types they don't know instead …

MacroscopeApp / Macroscope - Effect Service Conventions completed Sep 27, 2026 in 11m 15s

Effect Service Conventions: unsafe log annotation

packages/client-runtime/src/state/threads.ts:460 logs an unchecked, unbounded event type from the wire. An inline review suggests logging its length instead.

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 2 changed files (no prior completed review)


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

πŸ’­ Assessing service conventions I think I need to evaluate the changes to service conventions. It might be useful to look into how threads.ts are being used and their consumption patterns. I’ll inspect those details to understand better what adjustments might be necessary. It’s always on my mind to ensure I'm providing the best possible support, so digging into these specifics could help clarify the direction to take!

1. browse_code β€” packages/client-runtime/src/state/threads.ts

2. browse_code β€” packages/client-runtime/src/state/threads.ts

3. browse_code β€” packages/contracts/src/orchestrationV2.ts

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

5. browse_code β€” In packages/client-runtime/src/state/threads.ts changed event handling, identify any newly introduced violations of Effect service conventions specifically service dependency acquisition, runtime boundaries, unsafe logging, service errors. Only changed lines, excluding tests.

6. browse_code β€” Does the unknown-event eventType schema impose a maximum length or safe format before item.eventType is logged? Cite relevant schema lines.

7. browse_code β€” What is the purpose and architecture of makeEnvironmentThreadState in packages/client-runtime/src/state/threads.ts? Is it an Effect service constructor or state synchronization effect?

8. browse_code β€” Does packages/contracts/src/orchestrationV2.ts OrchestrationV2UnknownThreadStreamEvent permit arbitrary strings in event.type and pass verbatim to unknown-event eventType? concise.

9. browse_code β€” Are there any new service definitions, dependency injection patterns or runtime bridging in changed lines of packages/contracts/src/orchestrationV2.ts and packages/client-runtime/src/state/threads.ts from PR #13941? Answer concise based on provided changed code if diff unavailable.

10. browse_code β€” Check whether Effect.logDebug annotated eventType is sanitized elsewhere in packages/client-runtime/src/state/threads.ts prior to logging; respond yes/no.

11. browse_code β€” In changed lines of threads.ts, could logging unknown event type reveal raw wire input and violate safe bounded log annotations? Answer concise.


Agent Credits: 50 credits

Token usage: 105 uncached input Β· 274,065 cache-read input Β· 149,807 cache-write input Β· 3,837 output
Agent Credits may also include non-token charges from external tools such as web research.