Finalize terminal PR orchestration notes - #505
Conversation
This comment has been minimized.
This comment has been minimized.
| const uniqueNodeIds = Array.from(new Set( | ||
| nodes | ||
| .filter((node) => !beforeDatabaseId || ( | ||
| Number.isFinite(Number(node.databaseId)) && Number(node.databaseId) < beforeDatabaseId |
There was a problem hiding this comment.
databaseId is nullable, and Number(null) is 0, so this filter treats a node with no ordering evidence as older than the current note. Because marker-bearing final notes are included by the matcher, cleanup can minimize the just-published final note when its node lacks a database ID. Please fail closed by requiring a non-null, positive safe integer before comparing, and add null/missing-ID regression coverage.
| ? `Sepo orchestration finished successfully after \`${sourceAction || "unknown"}\` concluded \`${sourceConclusion || "unknown"}\`.` | ||
| : `Sepo orchestration stopped after \`${sourceAction || "unknown"}\` concluded \`${sourceConclusion || "unknown"}\`.`, | ||
| ); | ||
| const userMessage = normalizeToken(sourceTargetKind) === "pull_request" |
There was a problem hiding this comment.
userMessage is already empty here for a PR that is closed before this step: decidePlannerOrchestration returns on the status check before reading the planner response. Since the workflow runs the planner first, a PR that closes during planning can have a valid stop summary that this final note discards. Please preserve summary fields from a parsed planner stop while still forcing the closed-state stop, with a close-during-planning regression.
This comment has been minimized.
This comment has been minimized.
Rubrics Review
Notes
Findings
Final Rubric VerdictPARTIAL
|
AI Review Synthesis
Summary of PR/IssuePR #505 implements the lean, single-job terminal PR finalization requested by #452 and refined in #496. It reuses the current progress or marker note, mentions human requesters, preserves planner summaries, and conditionally collapses older trusted automation artifacts. Existing permissions, formal reviews, and child-report behavior remain intact, with focused documentation and regression coverage. The current draft is mergeable at ReviewThe rubrics, Claude, and Codex reviews converge on two bounded correctness warnings while finding the primary architecture sound. Both warnings remain present at the current head; two safely deferrable cleanup and summary-quality limitations are informational.
Progress
Issue DetailsMissing ordering IDs can hide the final noteCause: The ordering predicate accepts Candidate solutions:
Comments: The runtime likelihood is low, but this is a small fail-closed guard protecting the PR’s durable final artifact. Closed-PR finalization drops a planner summaryCause: Candidate solutions:
Comments: This affects the Reused fallback notes limit cleanup convergenceCause: Marker upsert can update an old final note whose database ID predates artifacts created afterward. That old ID remains the cleanup boundary. Candidate solutions:
Comments: This safely leaves excess context visible rather than hiding required context, so it does not warrant expanding this PR. Summary-quality gate accepts any non-empty textCause: Candidate solutions:
Comments: Tightening this now risks subjective heuristics and unnecessary scope expansion. Recommended Next Step
Final Verdict
Action Items
|
Summary
Verification
npm --prefix .agent run buildgit diff --checkCloses #452