Problem
The REES history analyzer already accepts body and linkedIssue on /v1/enrich so it can:
- parse
Fixes #123 references from the PR body when no token is available
- measure diff coverage against the linked issue's stated requirement without an extra GitHub fetch
The engine's buildReviewEnrichment path never forwards those fields today — only author, files, and diff reach REES.
Proposal
- Extend
buildReviewEnrichment to POST body when present
- Resolve the PR's primary linked issue from the engine cache (
getIssue) and send a compact linkedIssue envelope { number, title?, body? }
- Wire
runAiReviewForAdvisory to pass pr.body and pr.linkedIssues
Acceptance criteria
Notes
Parent capability: #1478 / #1697. This is the remaining engine-side passthrough after the REES history analyzer landed on main.
Problem
The REES
historyanalyzer already acceptsbodyandlinkedIssueon/v1/enrichso it can:Fixes #123references from the PR body when no token is availableThe engine's
buildReviewEnrichmentpath never forwards those fields today — onlyauthor, files, and diff reach REES.Proposal
buildReviewEnrichmentto POSTbodywhen presentgetIssue) and send a compactlinkedIssueenvelope{ number, title?, body? }runAiReviewForAdvisoryto passpr.bodyandpr.linkedIssuesAcceptance criteria
bodywhen the PR has onelinkedIssuewhen the PR links an issue the engine has cachedlinkedIssue(history analyzer degrades gracefully)Notes
Parent capability: #1478 / #1697. This is the remaining engine-side passthrough after the REES history analyzer landed on
main.