feat(review): add aggregate fix-handoff block renderer - #5788
Conversation
Adds buildFixHandoffAggregateBlock, the aggregate sibling of the existing per-finding buildFixHandoffBlock/buildFixHandoffBlocks (JSONbored#2175): it combines every InlineFinding into ONE fix-handoff block for a single local-agent run over the whole PR, instead of one run per finding. Mirrors CodeRabbit's split between a per-finding "Prompt for AI Agents" collapsible and its separate aggregate "Fix all issues" prompt. Render slice only, same as buildFixHandoffBlock was before its own wiring PR (JSONbored#4053) -- not wired into the unified comment here. Reuses the exact public-safe/boundary-safe contract already established by the per-finding renderer (InlineFinding fields are sanitized upstream by composeInlineFindings; same LOCAL_WRITE_BOUNDARY text). Closes JSONbored#5102
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5788 +/- ##
=======================================
Coverage 95.06% 95.07%
=======================================
Files 580 580
Lines 46156 46169 +13
Branches 14804 14810 +6
=======================================
+ Hits 43880 43893 +13
Misses 1516 1516
Partials 760 760
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-14 15:56:25 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Linked issue satisfactionPartially addressed Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
buildFixHandoffBlock/buildFixHandoffBlocks, feat(review): fix-handoff block renderer for review findings (boundary-safe, content-only) #2175, wired in feat(review): emit fix-handoff blocks into the unified review comment (#1962) #4053, behindLOOPOVER_REVIEW_FIX_HANDOFF+review.fixHandoff) — one collapsible per inline finding. This PR adds the aggregate half:buildFixHandoffAggregateBlock, which combines every current finding into ONE block for a single agent run over the whole PR, mirroring CodeRabbit's separate "Fix all issues with AI agents" feature.<details><summary>🤖 Prompt for AI Agents</summary>collapsible containing a plain-text (non-diff) fenced instruction — a generic "verify against current code, fix only still-valid issues" preamble followed by an exactfile:linereference and the concrete change, confirmed directly against a livecoderabbitai[bot]review comment (github.com/i18n: Multi-language support with Arabic BAWES-Universe/bawes-new-website#12). The same convention (same emoji, same collapsible shape) also appears from a different vendor bot on github.com/NM-366: handle internet exit nodes via egress gravitl/netmaker#4083, suggesting it's become a de facto format rather than one vendor's invention. I could not find a public example of CodeRabbit's own aggregate "Fix all issues" feature rendered as plain PR text within the search budget for this PR — every aggregate-style feature I found from other vendors (e.g. Datadog's BitsAI) renders as a clickable app link, not embeddable markdown, which is a real, useful data point for the design: an aggregate block that must survive copy-paste (this repo's own constraint, since gittensory has no app UI to link out to) is a different shape than a "click to open our app" button.buildFixHandoffBlockrender slice landed in feat(review): add fix-handoff block renderer + follow-up-issue MCP spec #3834 before its own wiring PR, feat(review): emit fix-handoff blocks into the unified review comment (#1962) #4053).buildFixHandoffAggregateBlockis pure, tested, and reuses the exact same public-safe/boundary-safe contract (InlineFinding.body/suggestionare already sanitized upstream bycomposeInlineFindings; sameLOCAL_WRITE_BOUNDARYno-cloud-write text) — it is not wired intounified-comment-bridge.tsyet.Real example output
For a held PR with 2 blocking findings (
InlineFinding[]— same fixture shape the existingbuildFixHandoffBlocktests use):if (!session.user) return null;
Recommendation (not implemented here — the maintainer's call per #5102)
Wire this alongside the existing per-finding blocks, gated by the SAME
LOOPOVER_REVIEW_FIX_HANDOFF+review.fixHandofftoggle (no new config surface needed) — a repo that already opted into fix-handoff gets both forms, matching CodeRabbit's own choice to ship both rather than pick one. The per-finding blocks stay useful for reviewing one thing at a time inline; the aggregate block is what a contributor would paste for a single "fix everything this PR flagged" agent run. Happy to do the wiring PR once you confirm the shape above is right.Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #5102.Validation
git diff --checknpm run typecheck— cleannpm run test:coverage— full unsharded run green; the new function's lines and branches (empty list, single vs. plural wording, line vs. no-line, suggestion present/absent, both markers) are covered bytest/unit/fix-handoff-render.test.tsvitest rununit suite green (fix-handoff-render,fix-handoff-collapsible,queue-4— the suites that already exercise this feature family)If any required check was skipped, explain why:
npm run test:workers,build:mcp,test:mcp-pack,ui:openapi:check,ui:lint,ui:typecheck,ui:build— not exercised; this change is confined tosrc/review/fix-handoff-render.ts+ its test file, touches no Worker binding, MCP surface, OpenAPI schema, orapps/loopover-ui/**code, and is not wired into any live code path yet.Safety
InlineFindingalready carries, which are made public-safe upstream bycomposeInlineFindingsbefore they ever reach this renderer (same contract as the existing per-finding block).LOCAL_WRITE_BOUNDARY"gittensory does not write to your repository" text every other local-execution artifact carries.apps/loopover-ui.LOOPOVER_REVIEW_FIX_HANDOFFdocs text (which already describes the flag generically) doesn't need updating for a prototype that isn't live.Notes
buildFixHandoffBlock/buildFixHandoffBlocks(src/review/fix-handoff-render.ts, feat(review): fix-handoff block renderer for review findings (boundary-safe, content-only) #2175/feat(review): add fix-handoff block renderer + follow-up-issue MCP spec #3834) for the per-finding precedent and render-slice-before-wiring-PR pattern;buildBetaCollapsible(src/signals/engine.ts, Visually distinguish BETA/experimental review-comment features from stable ones #5096/feat(review): add a shared beta-collapsible convention for the PR comment #5769) for the "shared reusable formatting helper" convention.Closes #5102