-
Notifications
You must be signed in to change notification settings - Fork 2
Review engine: multi-pass pipeline, publishing, tool-backed evidence #191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
979cb95
9283aec
1af9712
e3f5610
1a74b7d
4f97ef7
5e397c2
1f962a9
e2d726d
7728552
60c4239
d52d225
69bc7b3
085d56d
47692da
457b4ef
de33f49
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,7 @@ export function resolveLaneLaunchContext(args: { | |
| laneService: ReturnType<typeof createLaneService>; | ||
| laneId: string; | ||
| requestedCwd?: string | null; | ||
| allowExternalCwd?: boolean; | ||
| purpose: string; | ||
| }): LaneLaunchContext { | ||
| const laneId = String(args.laneId ?? "").trim(); | ||
|
|
@@ -51,6 +52,16 @@ export function resolveLaneLaunchContext(args: { | |
| }; | ||
| } | ||
|
|
||
| if (args.allowExternalCwd === true && path.isAbsolute(requestedCwd)) { | ||
| return { | ||
| laneWorktreePath: laneRoot, | ||
| cwd: ensureDirectoryExists( | ||
| path.resolve(requestedCwd), | ||
| `Requested cwd '${requestedCwd}' is not an existing directory.`, | ||
| ), | ||
| }; | ||
| } | ||
|
Comment on lines
+55
to
+63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reintroduce a boundary for external CWDs. This branch now skips As per coding guidelines 🤖 Prompt for AI Agents |
||
|
|
||
| const requestedTarget = path.isAbsolute(requestedCwd) | ||
| ? requestedCwd | ||
| : path.resolve(laneRoot, requestedCwd); | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2532,6 +2532,11 @@ export function createLaneService({ | |||||||||||
| db.run("delete from pr_pipeline_settings where pr_id in (select id from pull_requests where lane_id = ? and project_id = ?)", [laneId, projectId]); | ||||||||||||
| db.run("delete from pr_issue_inventory where pr_id in (select id from pull_requests where lane_id = ? and project_id = ?)", [laneId, projectId]); | ||||||||||||
| db.run("delete from pull_requests where lane_id = ? and project_id = ?", [laneId, projectId]); | ||||||||||||
| db.run("delete from review_run_publications where run_id in (select id from review_runs where lane_id = ? and project_id = ?)", [laneId, projectId]); | ||||||||||||
| db.run("delete from review_finding_feedback where run_id in (select id from review_runs where lane_id = ? and project_id = ?)", [laneId, projectId]); | ||||||||||||
| db.run("delete from review_findings where run_id in (select id from review_runs where lane_id = ? and project_id = ?)", [laneId, projectId]); | ||||||||||||
|
Comment on lines
+2535
to
+2537
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [🟡 Medium] [🔵 Bug] The lane deletion cleanup explicitly deletes // laneService.ts — missing line before review_findings deletion:
db.run("delete from review_run_publications where run_id in (select id from review_runs where lane_id = ? and project_id = ?)", [laneId, projectId]);
db.run("delete from review_findings where run_id in (select id from review_runs where lane_id = ? and project_id = ?)", [laneId, projectId]);
// ↑ review_finding_feedback should be deleted BEFORE review_findingsAdd:
Suggested change
|
||||||||||||
| db.run("delete from review_run_artifacts where run_id in (select id from review_runs where lane_id = ? and project_id = ?)", [laneId, projectId]); | ||||||||||||
| db.run("delete from review_runs where lane_id = ? and project_id = ?", [laneId, projectId]); | ||||||||||||
|
coderabbitai[bot] marked this conversation as resolved.
|
||||||||||||
| db.run("delete from session_deltas where lane_id = ?", [laneId]); | ||||||||||||
| db.run("delete from terminal_sessions where lane_id = ?", [laneId]); | ||||||||||||
| db.run("delete from operations where lane_id = ?", [laneId]); | ||||||||||||
|
|
||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dispose
reviewServicein the fast-shutdown path too.Lines 3707-3709 cover normal context teardown, but Line 4233's
runImmediateProcessCleanup()still skips the newctx.reviewService. OnuncaughtException,SIGTERM, or forced exit, an in-flight review can keep running/publishing while the rest of the project context is already being torn down.Suggested follow-up
for (const ctx of contexts) { try { + ctx.reviewService?.dispose?.(); + } catch { + // ignore + } + try { ctx.aiOrchestratorService?.dispose?.(); } catch { // ignore }🤖 Prompt for AI Agents