Skip to content

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

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
nickmopen:feat/auto-merge-summary
Jul 6, 2026
Merged

feat(config): add review.auto_merge_summary read-only knobs surface (#2051)#3855
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
nickmopen:feat/auto-merge-summary

Conversation

@nickmopen

Copy link
Copy Markdown
Contributor

Closes #2051 (part of #1959).

Adds review.auto_merge_summary (bool, default off): a read-only collapsible in the unified comment showing which auto-merge conditions currently pass/fail — CI green, gate passing, mergeable-clean, valid linked issue. Surface only — it never changes the merge/close decision. Off ⇒ byte-identical.

What's here

  • focus-manifest.tsautoMergeSummary: boolean | null on FocusManifestReviewConfig (mirrors fixHandoff): normalizeOptionalBoolean parse, default null; round-trip serialize (omitted when null ⇒ byte-identical) + present + EMPTY literals.
  • src/review/unified-comment.tsAutoMergeSummarySignals (already-computed, injected by the host) + pure buildAutoMergeSummaryCollapsible(signals). It renders the conditions table from the injected signals only — no re-derivation, no decision path, no IO. The caller adds it (via the existing extraCollapsibles) only when the knob is on, so off ⇒ nothing added ⇒ byte-identical.
  • Docsreview.auto_merge_summary (marked read-only) in both .gittensory.yml.example and config/examples/gittensory.full.yml.

Validation

Ran the full suite locally (npm run test):

Tests  10569 passed | 7 skipped   (0 failed)

Typecheck clean. Covers config absent/true/false round-trip + non-boolean warn, and the render reflecting exactly the injected signal states (all-pass / mixed), deterministic — with an explicit read-only framing assertion (no merge promise/trigger).

…SONbored#2051)

Config slice for JSONbored#1959: a per-repo boolean (default off) that renders a READ-ONLY
collapsible in the unified comment showing which auto-merge conditions currently
pass/fail (CI green, gate passing, mergeable-clean, valid linked issue). Surface only —
never changes the merge/close decision. Off ⇒ byte-identical.

- focus-manifest.ts: autoMergeSummary: boolean|null on FocusManifestReviewConfig
  (mirror fixHandoff) — normalizeOptionalBoolean parse, default null; round-trip
  serialize (omitted when null ⇒ byte-identical) + present + EMPTY literals.
- unified-comment.ts: AutoMergeSummarySignals (already-computed, injected) +
  pure buildAutoMergeSummaryCollapsible(signals) — renders the conditions table from
  the injected signals ONLY; no re-derivation, no decision path, no IO.
- Documented review.auto_merge_summary (marked read-only) in BOTH
  .gittensory.yml.example and config/examples/gittensory.full.yml.
- Tests: config absent/true/false round-trip + non-boolean warn; render reflects
  exactly the injected signal states (all-pass / mixed), deterministic.

Verified: full suite (npm run test) green — 10569 passed, 0 failed.
@nickmopen
nickmopen requested a review from JSONbored as a code owner July 6, 2026 18:50
@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
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.48%. Comparing base (927001e) to head (4769e4d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3855   +/-   ##
=======================================
  Coverage   93.48%   93.48%           
=======================================
  Files         333      333           
  Lines       33151    33158    +7     
  Branches    12127    12128    +1     
=======================================
+ Hits        30990    30997    +7     
  Misses       1530     1530           
  Partials      631      631           
Files with missing lines Coverage Δ
src/review/unified-comment.ts 99.52% <100.00%> (+0.01%) ⬆️
src/signals/focus-manifest.ts 99.13% <100.00%> (+<0.01%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb

loopover-orb Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-06 18:59:59 UTC

7 files · 1 AI reviewer · no blockers · readiness 100/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This is a clean, well-scoped config-surface addition that mirrors the existing `fixHandoff` pattern precisely: `autoMergeSummary: boolean | null` is threaded through `EMPTY_MANIFEST`, `emptyManifest`, `parseReviewConfig`, and `reviewConfigToJson` with correct null-omission for byte-identical default behavior. The new `buildAutoMergeSummaryCollapsible` is a pure render function with no IO or decision logic, and test coverage is thorough (absent/true/false round-trip, non-boolean warn, all-pass/mixed render, determinism, read-only framing assertion). The one gap is that the diff never shows the actual call site wiring `buildAutoMergeSummaryCollapsible` into the comment's `extraCollapsibles` gated on `review.autoMergeSummary` — since `unified-comment.ts`'s full content wasn't inlined, I can't confirm whether that invocation exists elsewhere in the file or is deferred to the follow-up work tracked under #1959.

Nits — 5 non-blocking
  • Confirm where `buildAutoMergeSummaryCollapsible` is actually invoked and gated on `review.autoMergeSummary` — the diff only adds the builder and the config knob, not the caller wiring; if that's intentionally deferred to feat(review): review.shared_config — operator-level base manifest overlay #1959 follow-up work, say so in the PR description so reviewers don't assume the feature is end-to-end.
  • src/signals/focus-manifest.ts uses `r.fixHandoff` (camelCase) for the existing sibling field but `r.auto_merge_summary` (snake_case) for the new one — pre-existing inconsistency, not introduced here, but worth flagging if you ever normalize manifest key casing.
  • The issue-number literal `2051` in comments (src/signals/focus-manifest.ts:351) is fine as a doc reference but isn't a runtime magic number needing a constant — no action needed.
  • Add a short follow-up note (in the PR body or a TODO near `AutoMergeSummarySignals`) pointing to the exact host call site that will compute and inject the signals, so the read-only/no-decision-path invariant is easy to audit later.
  • Consider a small integration test in the unified-comment builder (once wired) asserting the collapsible is appended only when `review.autoMergeSummary` is true and omitted otherwise, matching the byte-identical-off guarantee already tested at the config layer.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2051
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 (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 142 registered-repo PR(s), 95 merged, 4 issue(s).
Contributor context ✅ Confirmed Gittensor contributor nickmopen; Gittensor profile; 142 PR(s), 4 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: nickmopen
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript
  • Official Gittensor activity: 142 PR(s), 4 issue(s).
  • 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 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit a873a46 into JSONbored:main Jul 6, 2026
8 checks passed
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

1 participant