Skip to content

feat(review): wire review.auto_merge_summary into the unified comment (#4147) - #4817

Merged
JSONbored merged 1 commit into
mainfrom
feat/4147-wire-auto-merge-summary
Jul 11, 2026
Merged

feat(review): wire review.auto_merge_summary into the unified comment (#4147)#4817
JSONbored merged 1 commit into
mainfrom
feat/4147-wire-auto-merge-summary

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Closes #4147.

Summary

buildAutoMergeSummaryCollapsible (src/review/unified-comment.ts:229, #2051) was a pure, unit-tested render primitive with zero real callers — setting review.auto_merge_summary in .gittensory.yml had no visible effect, unlike every other opt-in render toggle (review.changed_files_summary, review.effort_score, ...), which all flow through resolveReviewPromptOverrides into a real src/queue/processors.ts call site.

  • Added autoMergeSummary to resolveReviewPromptOverrides (src/signals/focus-manifest.ts) — deterministic, no-AI, exact same shape as changedFilesSummary/effortScore.
  • Threaded autoMergeSummaryEnabledForReview through src/queue/processors.ts the same way its siblings are threaded, resolved unconditionally (must render even when the AI review pass itself is skipped).
  • Wired the collapsible into unified-comment-bridge.ts's UnifiedCommentBridgeArgs/buildUnifiedCommentBody extraCollapsibles chain — rendered right after manifest validation, ahead of the structural/visual collapsibles, since it's decision-relevant content.
  • The four signals (ciGreen/gatePassing/mergeableClean/linkedIssueValid) reuse the SAME ciState/mergeStateLabel/gate-conclusion/pr.linkedIssues facts this pass already resolves for the readiness chip and gate verdict — no extra fetch. gatePassing mirrors the gate's own "no hard blocker" definition (conclusion === "success"); linkedIssueValid mirrors missing_linked_issue's own "has at least one linked issue reference" check.

Test plan

  • npx tsc --noEmit — clean
  • Full unit + integration suite: 687 files / 13,710 tests passing
  • npm run docs:drift-check, npm run manifest:drift-check, npm run engine-parity:drift-check — all pass
  • npm audit --audit-level=moderate — 0 vulnerabilities
  • New tests: resolveReviewPromptOverrides's autoMergeSummary field (parse + default-off), buildUnifiedCommentBody renders/omits the collapsible correctly, and a full webhook → processJob → posted-comment e2e test asserting all four condition marks render correctly from a real fixture (CI passed, gate success, mergeable_state: clean, a linked issue in the PR body)

…#4147)

buildAutoMergeSummaryCollapsible (#2051) was a pure, unit-tested render
primitive with zero real callers -- setting review.auto_merge_summary in
.gittensory.yml had no visible effect, unlike every other opt-in render
toggle (changed_files_summary, effort_score, ...), which all flow through
resolveReviewPromptOverrides into a real queue/processors.ts call site.

Adds autoMergeSummary to resolveReviewPromptOverrides (deterministic,
no-AI, same shape as changedFilesSummary/effortScore), threads the flag
through processors.ts the same way, and wires the collapsible into
unified-comment-bridge.ts's extraCollapsibles chain. The four signals
(ciGreen/gatePassing/mergeableClean/linkedIssueValid) reuse facts this
pass already resolves for the readiness chip and gate verdict -- no
extra fetch. Rendered right after manifest validation, ahead of the
structural/visual collapsibles, since it's decision-relevant.
@superagent-security

Copy link
Copy Markdown
Contributor

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

@JSONbored JSONbored self-assigned this Jul 11, 2026
@JSONbored
JSONbored merged commit 62d91f8 into main Jul 11, 2026
7 checks passed
@JSONbored
JSONbored deleted the feat/4147-wire-auto-merge-summary branch July 11, 2026 00:36
@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.22%. Comparing base (9277537) to head (5ce9d0d).
⚠️ Report is 12 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4817   +/-   ##
=======================================
  Coverage   94.22%   94.22%           
=======================================
  Files         441      441           
  Lines       38745    38750    +5     
  Branches    14106    14109    +3     
=======================================
+ Hits        36508    36513    +5     
  Misses       1577     1577           
  Partials      660      660           
Files with missing lines Coverage Δ
src/queue/processors.ts 95.71% <100.00%> (+<0.01%) ⬆️
src/review/unified-comment-bridge.ts 99.57% <100.00%> (+<0.01%) ⬆️
src/signals/focus-manifest.ts 99.64% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

feat(review): wire review.auto_merge_summary to the unified comment, or remove the dead render primitive

1 participant