feat(enrichment): PR history analyzer + engine context passthrough#1701
feat(enrichment): PR history analyzer + engine context passthrough#1701kiannidev wants to merge 6 commits into
Conversation
Add REES history analyzer for author track record and linked-issue alignment. Pass author, body, and installation token through enrichment-wire so webhook reviews can run historical analysis during the AI review path. Fixes JSONbored#1697 Co-authored-by: Cursor <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1701 +/- ##
==========================================
- Coverage 95.58% 95.48% -0.10%
==========================================
Files 204 207 +3
Lines 22295 22493 +198
Branches 8053 8124 +71
==========================================
+ Hits 21310 21477 +167
- Misses 408 430 +22
- Partials 577 586 +9
🚀 New features to boost your workflow:
|
Exercise null author/body, missing installation id, allowlist-off path, and installation-token resolution in enrichment wiring tests. Fixes JSONbored#1697 Co-authored-by: Cursor <[email protected]>
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review — held for maintainer review
⏸️ Held for maintainer review — Large change — held for manual review; Touches a guarded path — held for manual review Review summary
Nits — 9 non-blocking
Review context
Contributor next steps
Signal definitions
Review detailsGenerated from public PR metadata and the diff. Advisory only; deterministic signals remain authoritative. This change correctly moves GitHub-backed enrichment into the engine-side prefetch path and keeps raw credentials out of the REES request body. The new history analyzer, CODEOWNERS passthrough contract, and processor wiring are coherent with the stated security model. The main concern is prompt quality/noise: the history path now emits an author-history section even when it has no actual history or linked-issue signal. Nits (5)
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
… to REES Move history GitHub API calls into enrichment-prefetch.ts so installation tokens stay in the engine process. REES receives structured prefetch findings only; githubToken is removed from the enrich wire contract. Fixes JSONbored#1697 Co-authored-by: Cursor <[email protected]>
Fixes JSONbored#1697 Co-authored-by: Cursor <[email protected]>
Engine-side CODEOWNERS scan restores the prefetch contract without sending tokens to REES; expanded prefetch unit tests cover abort signals and branches. Co-authored-by: Cursor <[email protected]>
…n try Relocate engine-side CODEOWNERS fetch/match into src/review so vitest covers the patch; wrap prefetch in buildReviewEnrichment's fail-safe try. Co-authored-by: Cursor <[email protected]>
JSONbored
left a comment
There was a problem hiding this comment.
Please fix merge conflicts before resubmitting - please note, these enrichment PRs tend to overlap so I suggest only submitting one at a time, or ensure you build them in a way where they won't cause merge conflicts.
This branch has conflicts that must be resolved
Use the [web editor](https://github.com/JSONbored/gittensory/pull/1701/conflicts) or the command line to resolve conflicts before continuing.
review-enrichment/src/brief.ts
review-enrichment/src/render.ts
review-enrichment/src/types.ts
|
Hi, @JSONbored |
Summary
author,body, andgithubTokento REESrunAiReviewForAdvisoryviaresolveEnrichmentGithubToken(same best-effort pattern as grounding/RAG)Fixes #1697
Validation
Test plan
org/repo#N)