Skip to content

feat(convergence): unified PR review comment — reviewbot renderer ported + wired (default-OFF) - #1007

Merged
JSONbored merged 8 commits into
mainfrom
convergence/reviewbot-migration
Jun 22, 2026
Merged

feat(convergence): unified PR review comment — reviewbot renderer ported + wired (default-OFF)#1007
JSONbored merged 8 commits into
mainfrom
convergence/reviewbot-migration

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

First convergence milestone (Part of #983 · reviewbot → gittensory).

Natively ports reviewbot's unified PR-review-comment renderer into gittensory (src/review/unified-comment.ts — self-contained, zero reviewbot imports, strict-compliant) and wires it into maybePublishPrPublicSurface behind a new UNIFIED_REVIEW_COMMENT env flag (default OFF — fully dormant).

When ON, the PR panel becomes the converged comment: gittensory's readiness signals + reviewbot's review folded into ONE in-place comment (same gittensory-pr-panel:v1 marker), with gittensory's gate authoritative. Flag-OFF is byte-identical to today (only constlet on the legacy path; signals/engine.ts additive 53/0 via a new buildPublicPrPanelSignalRows helper).

Locally verified: typecheck clean · test:unit 2329 pass (1 pre-existing unrelated signals-v2 failure) · test:workers pass · 12 new bridge tests. Safe to merge dormant.

The reviewbot-side reviewTarget seam landed separately in the reviewbot repo. Closed-PR panel left on legacy (follow-up). The full end-to-end convergence plan is being broken into issues under #983.

…n runbook

Native, logic-faithful port of reviewbot's unified PR-comment renderer into gittensory as a self-contained module: src/review/unified-comment.ts (renderUnifiedReviewComment + buildUnifiedReviewInput + deriveUnifiedStatus + extractReviewSummary + inlined minimal types; ZERO reviewbot imports). Only one mechanical strict-flag guard (exactOptionalPropertyTypes conditional spreads). test/unit/unified-comment.test.ts 20/20 (1:1 with reviewbot). typecheck clean. Part of the reviewbot->gittensory convergence — reviewbot's code becomes gittensory's natively. CONVERGENCE_RUNBOOK.md = the staged A-E plan. LOCAL ONLY (not pushed).
…ehind a default-OFF flag

When UNIFIED_REVIEW_COMMENT is truthy AND the gate evaluated, maybePublishPrPublicSurface renders the ONE converged comment (gittensory shape + reviewbot's review folded in) via src/review/unified-comment-bridge.ts buildUnifiedCommentBody, prepending PR_PANEL_COMMENT_MARKER so the existing upsert updates in place. Gate stays authoritative (conclusion -> Verdict -> deriveUnifiedStatus). Flag-OFF (default) keeps the legacy panel byte-identical (only const->let on deterministicBody; signals/engine.ts additive 53/0 via a new buildPublicPrPanelSignalRows helper). 12 bridge tests; typecheck clean. LOCAL ONLY (not pushed).
@JSONbored JSONbored self-assigned this Jun 22, 2026
@dosubot dosubot Bot added the size:XL label Jun 22, 2026
@ghost

ghost commented Jun 22, 2026

Copy link
Copy Markdown

Note

Gittensory Gate skipped

PR closed before full evaluation. No late first comment was created.

Signal Result Evidence Action
Gate result ⚠️ Skipped #1007 is no longer open. No action.

💰 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.

@ghost ghost added the gittensory:reviewed label Jun 22, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored JSONbored linked an issue Jun 22, 2026 that may be closed by this pull request
5 tasks
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 22, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui 4917f3c Commit Preview URL

Branch Preview URL
Jun 22 2026, 09:16 AM

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.33508% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.61%. Comparing base (e03c5ec) to head (126a209).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/queue/processors.ts 55.55% 0 Missing and 4 partials ⚠️
src/signals/engine.ts 87.50% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1007      +/-   ##
==========================================
- Coverage   96.61%   96.61%   -0.01%     
==========================================
  Files         110      112       +2     
  Lines       15079    15269     +190     
  Branches     5451     5536      +85     
==========================================
+ Hits        14569    14752     +183     
  Misses        106      106              
- Partials      404      411       +7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ghost ghost added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jun 22, 2026
@ghost

ghost commented Jun 22, 2026

Copy link
Copy Markdown

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

🛠️ Maintainer review — Held for maintainer review

Reviewed 11 changed file(s) — two independent AI reviewers, synthesized. 🛠️ Request changes. Address the suggestions below before merging.

ℹ️ Recommend CLOSE — A required check is failing. CI failures are closed, not iterated in place — fix it and open a new focused PR. (your PR — not auto-closed; your call.)

Merge readiness: ❌ CI is red — approval withheld until it's green. Failing: see the checks tab.

Summary

The change introduces a pure unified‑comment renderer and a bridge that maps existing gate and panel data onto it. Types and functions are correctly exported and imported, the flag handling respects existing conventions, and no forbidden public terms are introduced. Security‑related handling (public‑safe redaction, SSRF guards, secret env vars) remains unchanged. The implementation appears functionally correct and maintains backward compatibility when the flag is off. The only current issue is the failing code‑coverage check (codecov/patch), which prevents auto‑merge.

🛑 Concerns raised — review before merging (reviewers were not unanimous)

  • The codecov/patch check failed with 96.33% of diff hit (target 96.61%). Ensure that all new code is adequately covered by tests.

💡 Nits — non-blocking, optional

  • The statusChips function uses a middle dot (·) separator; ensure this matches the legacy formatting expectations.
  • The PR_PANEL_COMMENT_MARKER is duplicated in both the legacy comment builder and the bridge – a shared export could reduce maintenance.
  • Add additional unit tests exercising edge cases of the new renderer (e.g., empty signals, long nits list) to raise diff coverage above the required threshold.
  • Consider extracting the panel‑marker constant to a shared module to avoid duplication between legacy and unified comment paths.
  • Consider adding more detailed comments explaining the rationale behind certain design choices, especially in the unified-comment-bridge.ts file.
  • Ensure that all edge cases for the unified comment rendering are covered in the tests, particularly those involving complex PR scenarios.
  • Review the performance implications of the new unified comment rendering, especially for large PRs with many changed files.

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend close (ci_red) — held for your decision

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend close (ci_red) — held for your decision

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend close (ci_red) — held for your decision

@JSONbored
JSONbored merged commit 2527575 into main Jun 22, 2026
19 of 20 checks passed
@JSONbored
JSONbored deleted the convergence/reviewbot-migration branch June 22, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Convergence & migration (reviewbot → gittensory)

1 participant