Skip to content

fix(scm): re-land review-body fetch/mapping on main (recover stranded #3010)#3049

Merged
illegalcall merged 1 commit into
mainfrom
feat/scm-fetch-review-body-onto-main
Jul 23, 2026
Merged

fix(scm): re-land review-body fetch/mapping on main (recover stranded #3010)#3049
illegalcall merged 1 commit into
mainfrom
feat/scm-fetch-review-body-onto-main

Conversation

@codebanditssss

Copy link
Copy Markdown
Collaborator

Summary

Re-lands #3010's provider review-body fetch/mapping onto main. Addresses the [P1] on #3046: like #3011, #3010 (3da9fff85) was merged into its stacked base (feat/persist-pr-review-body), not main — confirmed 3da9fff85 is not an ancestor of main, and SCMReviewSummaryObservation has no Body field there.

So even after #3046, the pipeline was broken end to end: the API copies review.Body into the response, but nothing populated it — real GitHub refreshes persisted Body == "" and omitempty dropped it from the response. Reviewer/verdict showed, the summary body did not. #3046's tests injected Body above the missing fetch layer, so they didn't catch it (fair call by the reviewer).

This cherry-picks 3da9fff85 (the five-file fetch/mapping commit, including its provider test):

  • request body in the GitHub review-summary GraphQL and map it in scmReviewSummaryFromGraphQL
  • add Body to ports.SCMReviewSummaryObservation
  • carry Body through domainFromObservation (observer) and claimRowsFromSCM (session claim)

With this + #3009 (persist) + #3046 (expose) all on main, the review-summary body flows end to end for the first time.

Verification

  • 3da9fff85 cherry-picked cleanly onto current main (no conflicts)
  • cd backend && go build ./... clean; gofmt clean
  • go test ./internal/adapters/scm/github/ ./internal/observe/scm/ ./internal/service/session/ pass — the github provider test asserts the query requests body and maps it through, which is exactly the check the injected-Body fix(api): re-land review-summaries API on main (recover stranded #3011) #3046 tests lacked

Request the review `body` in the GitHub review-summary GraphQL selection
and carry it through the SCM observation into the domain review rows, so
the body column persisted in #3009 is actually populated.

- add Body to ports.SCMReviewSummaryObservation
- request body in the reviewSummaries GraphQL node and map it in
  scmReviewSummaryFromGraphQL
- carry Body through domainFromObservation (observer) and claimRowsFromSCM
  (session claim path)

Bounds are unchanged: still only the decisive submitted reviews capped by
githubReviewSummaryLimit. Exposing the body through the session PR API is
the next PR. Part of the reviews-tab revamp (#2433).
@illegalcall
illegalcall merged commit 2731f7f into main Jul 23, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants