|
| 1 | +{"type":"review_context","reviewType":"all","currentBranch":"main","baseBranch":"main","workingDirectory":"/Users/james/dev/t3code"} |
| 2 | +{"type":"status","phase":"connecting","status":"connecting_to_review_service"} |
| 3 | +{"type":"status","phase":"setup","status":"setting_up"} |
| 4 | +{"type":"status","phase":"analyzing","status":"summarizing"} |
| 5 | +{"type":"status","phase":"analyzing","status":"reviewing"} |
| 6 | +{"type":"finding","severity":"trivial","fileName":"apps/server/src/coderabbit/Services/CodeRabbitService.ts","codegenInstructions":"Verify each finding against the current code and only fix it if needed.\n\nIn @apps/server/src/coderabbit/Services/CodeRabbitService.ts around lines 15 - 31, The interface CodeRabbitServiceShape is missing the fixWithAI method present on NativeApi.coderabbit and the RPC surface; either add a fixWithAI entry to CodeRabbitServiceShape (matching the signature used by rpc.ts/NativeApi.coderabbit) or add a clear comment above CodeRabbitServiceShape explaining that fixWithAI is intentionally handled externally via dispatchCodeRabbitFixWithAI (and therefore excluded). Update the interface to include the method name and matching effect/stream types if you choose the stub approach, or add the explanatory comment referencing dispatchCodeRabbitFixWithAI and the RPC symbol names to keep intent clear and consistent.","suggestions":[]} |
| 7 | +{"type":"finding","severity":"trivial","fileName":"apps/server/src/ws.ts","codegenInstructions":"Verify each finding against the current code and only fix it if needed.\n\nIn @apps/server/src/ws.ts around lines 139 - 180, The buildCodeRabbitFixPrompt function is embedding user-controlled fields (e.g., input.snapshot.cwd, input.snapshot.scope, finding.filePath, finding.summary, finding.suggestions, finding.codegenInstructions) directly into the prompt; sanitize or escape those values before concatenation to prevent parsing issues (for example normalize or escape newlines, backticks, and other control characters or wrap values with a safe encoding like JSON.stringify) while keeping the existing prompt shape and the findingSections logic intact; update the map that builds findingSections to run each user field through a single helper sanitizer (e.g., sanitizePromptValue) and use the sanitized values for location, suggestions, summary, id, and codegenInstructions, and also sanitize snapshot fields when embedding them.","suggestions":[]} |
| 8 | +{"type":"finding","severity":"trivial","fileName":"packages/contracts/src/coderabbit.ts","codegenInstructions":"Verify each finding against the current code and only fix it if needed.\n\nIn @packages/contracts/src/coderabbit.ts around lines 42 - 45, The CodeRabbitFindingLineRange schema currently allows any positive start and end independently; add a refinement/validation to ensure start <= end by wrapping or extending the existing Schema.Struct({ start: PositiveInt, end: PositiveInt }) with a check that compares the two fields and rejects (or throws) if start > end so the invariant is enforced whenever CodeRabbitFindingLineRange is parsed/validated.","suggestions":["const CodeRabbitFindingLineRange = Schema.Struct({\n start: PositiveInt,\n end: PositiveInt,\n}).pipe(\n Schema.filter((range) => range.start <= range.end, {\n message: () => \"Line range start must be less than or equal to end\",\n }),\n);"]} |
| 9 | +{"type":"finding","severity":"minor","fileName":"apps/server/src/ws.ts","codegenInstructions":"Verify each finding against the current code and only fix it if needed.\n\nIn @apps/server/src/ws.ts around lines 484 - 503, The thread creation is not rolled back if the subsequent turn start fails; update the logic around dispatchNormalizedCommand({... type: \"thread.create\", ...}) and the follow-up dispatchNormalizedCommand({... type: \"thread.turn.start\", ...}) so that if the turn start call rejects/errors you perform a compensating cleanup (dispatch a \"thread.delete\" or \"thread.terminate\" command using the same threadId via serverCommandId(\"coderabbit-thread-delete\") or similar) and surface the original turn-start error; locate the create call and wrap the turn start in a try/catch or Effect.chain error handler that on failure runs a dispatchNormalizedCommand for deletion (mapping errors with toCodeRabbitRpcError consistent with existing mapError usage) before rethrowing the turn-start failure.","suggestions":[]} |
| 10 | +{"type":"finding","severity":"trivial","fileName":"apps/server/src/coderabbit/Layers/CodeRabbitService.ts","codegenInstructions":"Verify each finding against the current code and only fix it if needed.\n\nIn @apps/server/src/coderabbit/Layers/CodeRabbitService.ts around lines 369 - 381, The attachLineReader currently calls void onLine(line) which launches line handlers fire-and-forget and can process lines out of order; change the listener to ensure sequential handling by awaiting each onLine call (make the \"line\" event handler async and await onLine(line)) or implement a simple per-stream queue/promise-chain (e.g., track lastPromise and chain lastPromise = lastPromise.then(()=>onLine(line))) so each line is fully processed before the next begins; update attachLineReader and any callers relying on onLine to accommodate the awaited behavior (function attachLineReader, the onLine callback reference).","suggestions":[]} |
| 11 | +{"type":"finding","severity":"trivial","fileName":"apps/server/src/coderabbit/parser.ts","codegenInstructions":"Verify each finding against the current code and only fix it if needed.\n\nIn @apps/server/src/coderabbit/parser.ts around lines 179 - 214, In parseCodeRabbitFinding, normalizeSeverity(raw.severity) is called twice—once for createCodeRabbitFindingId and again when constructing the finding object; compute const normalizedSeverity = normalizeSeverity(raw.severity) once near the top (before calling createCodeRabbitFindingId) and use normalizedSeverity in both createCodeRabbitFindingId(...) and the finding.severity field to avoid redundant computation.","suggestions":[]} |
| 12 | +{"type":"finding","severity":"trivial","fileName":"apps/server/src/coderabbit/Layers/CodeRabbitService.ts","codegenInstructions":"Verify each finding against the current code and only fix it if needed.\n\nIn @apps/server/src/coderabbit/Layers/CodeRabbitService.ts around lines 582 - 589, The cleanup in the Effect.catchAll unintentionally deletes a newer review entry for the same cwd; modify the handler so that before calling latestReviewIdByCwd.delete(input.cwd) you check that latestReviewIdByCwd.get(input.cwd) === reviewId (i.e., only remove if the stored latest ID still matches the failed reviewId), keep closing via closeActiveReviewForCwd(record) and removing from recordsById as-is, and apply the same guarded check if you ever set or clear related state elsewhere to avoid the race.","suggestions":[]} |
| 13 | +{"type":"complete","status":"review_completed","findings":7} |
0 commit comments