Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge NotesBoth previously flagged issues have been resolved in the latest commits:
The PR cleanly implements dual-mode code review orchestration (cloud-agent SSE vs cloud-agent-next WebSocket) behind a PostHog feature flag. Key observations:
Files Reviewed (16 files)
|
0ddfdee to
2bb6bf7
Compare
| const prepareResponse = await fetch(`${this.env.CLOUD_AGENT_NEXT_URL}/trpc/prepareSession`, { | ||
| method: 'POST', | ||
| headers, | ||
| body: JSON.stringify(prepareInput), | ||
| }); |
There was a problem hiding this comment.
Lets use src/lib/cloud-agent-next/cloud-agent-client.ts, it should have all methods
| /** | ||
| * Payload from cloud-agent-next callback (ExecutionCallbackPayload). | ||
| */ | ||
| type CloudAgentNextCallbackPayload = { | ||
| sessionId?: string; | ||
| cloudAgentSessionId?: string; | ||
| executionId?: string; | ||
| kiloSessionId?: string; | ||
| status: 'completed' | 'failed' | 'interrupted'; | ||
| errorMessage?: string; | ||
| lastSeenBranch?: string; | ||
| }; |
There was a problem hiding this comment.
is there a type in cloud agent that we can re-use here?
| const manager = createWebSocketManager({ | ||
| url: url.toString(), | ||
| ticket, | ||
| onEvent: handleEvent, |
There was a problem hiding this comment.
cloud agent next has event processor that can aggregate cli events etc and will send a callback when there is an update
may be handy to use here
| @@ -0,0 +1 @@ | |||
| ALTER TABLE "cloud_agent_code_reviews" ADD COLUMN "use_cloud_agent_next" boolean DEFAULT false; No newline at end of file | |||
There was a problem hiding this comment.
wonder if we want "version" or something to future proof a bit?
|
|
||
| // 2. Prepare complete payload for cloud agent | ||
| // 2. Evaluate feature flag: use cloud-agent-next? | ||
| const flagDistinctId = owner.type === 'org' ? owner.id : owner.userId; |
There was a problem hiding this comment.
is owner.id an org id? Do we not always feature flag based on user?
No description provided.