Skip to content

feat(config): add review.auto_merge_summary read-only knob (#2051) - #3829

Closed
Lang-bt wants to merge 1 commit into
JSONbored:mainfrom
Lang-bt:feat/review-auto-merge-summary-2051-v2-lang-bt
Closed

feat(config): add review.auto_merge_summary read-only knob (#2051)#3829
Lang-bt wants to merge 1 commit into
JSONbored:mainfrom
Lang-bt:feat/review-auto-merge-summary-2051-v2-lang-bt

Conversation

@Lang-bt

@Lang-bt Lang-bt commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Closes #2051

Summary

  • Parse review.auto_merge_summary in the focus manifest and resolve it via resolveReviewPromptOverrides.
  • When enabled, append a read-only Auto-merge conditions collapsible to the unified review comment (CI green, gate passing, mergeable-clean, linked issue) — display-only, never changes merge decisions.
  • Wire through processors.tsbuildUnifiedCommentBody (after Impact map, before Visual preview).
  • Document the knob in .gittensory.yml.example and config/examples/gittensory.full.yml (kept in sync).

Scope

Validation

  • git diff --check
  • npm run typecheck
  • npm run test:coverage -- test/unit/auto-merge-summary-collapsible.test.ts test/unit/focus-manifest.test.ts test/unit/queue.test.ts -t "auto_merge|auto-merge|resolveReviewPromptOverrides|renders the unified PR-review comment when the flag is on" (targeted regression + queue wiring)
  • Local patch coverage on changed src/** lines/branches: 100% (15/15 lines, 36/36 branches)
  • npm audit --audit-level=moderate (0 vulnerabilities)

Skipped (not touched by this diff):

  • npm run actionlint, npm run test:workers, npm run build:mcp, npm run test:mcp-pack, UI toolchain — no workflow/MCP/UI paths changed.

codecov/patch applies to changed src/** lines/branches (≥99% target). Added unit tests for all four condition flags, mergeReadiness-omitted path, visual-preview coexistence, manifest parse/round-trip, and queue integration with .gittensory.yml opt-in.

Safety

  • No secrets, auth, or UI changes.
  • Public GitHub text stays sanitized; the collapsible is read-only and never alters gate/merge decisions.
  • New behavior has unit/integration tests for derive/build helpers, bridge wiring branches, manifest resolution, and processor forwarding.

UI Evidence

N/A — backend review-comment rendering only; no visible UI changes.

Notes

Supersedes closed #3793 / #3806 on current main (rebases cleanly; integrates with impactMap / cultureProfile / commentVerbosity additions since the original branch).

Made with Cursor

…#2051)

Expose a manifest toggle that appends a display-only Auto-merge conditions
collapsible to the unified review comment, derived from CI/gate/merge/linked-issue
signals already on the comment path.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Lang-bt
Lang-bt requested a review from JSONbored as a code owner July 6, 2026 13:29
@superagent-security

Copy link
Copy Markdown
Contributor

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

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 6, 2026
@loopover-orb

loopover-orb Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Warning

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

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-06 14:48:11 UTC

9 files · 1 AI reviewer · no blockers · readiness 100/100 · CI pending · dirty

⏸️ Suggested Action - Manual Review

Review summary
This PR adds a fully config-driven, read-only 'Auto-merge conditions' collapsible to the unified review comment, gated by a new `review.auto_merge_summary` manifest flag that is threaded consistently through focus-manifest parsing/round-trip, `resolveReviewPromptOverrides`, `processors.ts`, and `buildUnifiedCommentBody` (inserted between Impact map and Visual preview). The derivation logic reuses signals already computed for the comment (mergeReadiness, gate conclusion, panel rows) rather than re-deriving merge decisions, and default-off/null behavior preserves byte-identical output when unset. Test coverage is thorough (unit tests for all four condition flags, missing-mergeReadiness path, visual-preview coexistence, manifest parse/round-trip, and full queue-processor wiring with `.gittensory.yml` opt-in), and the change closes the linked issue #2051 without unrelated scope.

Nits — 4 non-blocking
  • src/review/unified-comment-bridge.ts around the new `withAutoMergeSummary`/`withVisual` ternary has inconsistent indentation (2-space vs 4-space) that should be reformatted for consistency with the surrounding style.
  • The `(feat(config): add review.auto_merge_summary read-only knobs surface #2051)` issue-number references sprinkled through comments in unified-comment-bridge.ts:552 and focus-manifest.ts:394 are fine as historical breadcrumbs but add no behavior — purely a style note, not an issue.
  • Consider extracting the repeated large `review: { ... }` object literal duplicated across EMPTY_MANIFEST, emptyManifest, and parseReviewConfig's `empty` (focus-manifest.ts) into a single shared constant so adding a future field only requires one edit instead of three-plus call sites.
  • In deriveAutoMergeSummaryInput (unified-comment-bridge.ts), consider using `Array.prototype.find` result more defensively documented for the 'row absent' vs 'row present but not green' distinction, since both currently collapse to `false` — this is intentional per the tests but a one-line comment would help future readers.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2051, #3793
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (2 linked issues).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 0 registered-repo PR(s), 0 merged, 0 issue(s).
Contributor context ❌ No public Gittensor match Lang-bt; not a blocker.
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: Lang-bt
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: JavaScript, Python
  • Contributor context: Public profile only; not a blocker.
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

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

  • Re-run Gittensory review

@loopover-orb

loopover-orb Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Gittensory is closing this pull request on the maintainer's behalf (conflicts with the base branch — resolve and open a fresh PR). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

@loopover-orb loopover-orb Bot closed this Jul 6, 2026
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.

feat(config): add review.auto_merge_summary read-only knobs surface

2 participants