feat: Fix babysit gaps#3806
Conversation
Soffi AI SummaryThis PR bundles several related improvements across the AI agent run feature set, persona configuration, and log viewing UX. Fix GitHub review comment fetching in agent "babysit" loop: The core bug fix addresses a gap where the agent's reprompt/babysit cycle was not fetching GitHub review comments (a distinct comment type in the GitHub data model, used for PR inline comments and Terraform plan failures) — only regular issue comments were being retrieved. This caused agents to miss critical feedback when responding to failing Terraform plan outputs. Agent run token/cost usage accounting: A new Persona settings — Flows and Workbenches visibility controls: The Log viewing improvements: The Workbench model selector refactor: The Dependency and CI updates: Dockerfile base image is bumped, the Commits
Updated: 2026-07-08 21:52 UTC |
Greptile SummaryFixes a gap in the babysit reprompt loop where GitHub PR review summaries (a separate comment type from issue and inline review comments) were not being fetched, causing the agent to miss bot-posted feedback such as failing Terraform plan reports.
Confidence Score: 4/5Safe to merge; the new review-summary fetch path is additive, well-tested, and guarded against misuse at the reaction endpoint. All changed code paths are covered by new unit tests, and the only non-test finding is a stale doc comment on ReactableID() that now undersells the non-reactable case. go/deployment-operator/pkg/scm/scm.go — the ReactableID() doc comment should be updated to reflect the new non-reactable type.
|
| Filename | Overview |
|---|---|
| go/deployment-operator/pkg/scm/github.go | Adds a third pagination loop to fetch PR review summaries via ListReviews, skipping empty bodies, and sorts the combined result by CreatedAt; correctly short-circuits ReactToComment for the new type. |
| go/deployment-operator/pkg/scm/scm.go | Adds PRCommentTypeReviewSummary constant and Reactable() helper; updates PRStateHash to key on ReactableID() instead of bare ID; doc comment on ReactableID() is now slightly misleading for the new non-reactable type. |
| go/deployment-operator/pkg/agentrun-harness/controller/controller.go | buildBabysitPrompt now branches on Reactable() to emit 'not reactable' label for review summaries, consistent with the getprstate tool. |
| go/deployment-operator/internal/mcpserver/agent/tool/getprstate.go | Comment rendering branches on Reactable() to distinguish reactable vs non-reactable IDs in the prompt shown to the agent. |
| go/deployment-operator/internal/mcpserver/agent/tool/reacttocomment.go | Description and tool description updated to clarify review summaries cannot be passed to reactToComment. |
| go/deployment-operator/pkg/scm/github_test.go | New test verifying allComments fetches review summaries, skips empty-body reviews, and sorts results; covers the new Reactable() == false path. |
| go/deployment-operator/pkg/agentrun-harness/controller/analysis_gate_test.go | New integration test confirming review summary comments surface in babysit context with 'not reactable' label and correct review_summary: prefix. |
Comments Outside Diff (1)
-
go/deployment-operator/pkg/scm/scm.go, line 56-59 (link)The
ReactableID()doc comment still says this value is what the agent should pass toreactToComment, but that is no longer universally true — callingreactToCommentwith areview_summary:…ID now returns an error. The misleading doc could cause a developer to call this method and then pass the result directly toReactToCommentwithout checkingReactable()first.
Reviews (1): Last reviewed commit: "Fix babysit gaps" | Re-trigger Greptile
904f20f to
ed5a4da
Compare
ed5a4da to
33ed788
Compare
|
plural deploy this |
|
plural deploy this |
613fc05 to
e68f605
Compare
|
plural deploy this |
e68f605 to
a28f93e
Compare
|
plural deploy this |
2 similar comments
|
plural deploy this |
|
plural deploy this |
1be5fb0 to
6b48841
Compare
|
plural deploy this |
Currently this was not fetching review comments on reprompts, which are another form of comments in the github data model (and which we send for failing terraform plans).
ac281c1 to
bc28808
Compare
|
plural deploy this |
bc28808 to
37dad4a
Compare
37dad4a to
3e7dd03
Compare
|
plural deploy this |
95f787f to
2fc9f78
Compare
2fc9f78 to
2e726b3
Compare
Currently this was not fetching review comments on reprompts, which are another form of comments in the github data model (and which we send for failing terraform plans).
Test Plan
Test environment: https://console.plrldemo.onplural.sh/cd/clusters/a1748282-ce8b-48ab-ae7e-326e74fce04e/services/f3f89a54-d1a7-4bc8-9152-daa07ede918d/components
Checklist
Plural Flow: console