Skip to content

feat(review): read-only auto-merge conditions table via review.auto_merge_summary - #3730

Closed
bohdansolovie wants to merge 2 commits into
JSONbored:mainfrom
bohdansolovie:feat/review-auto-merge-summary-2051-v2
Closed

feat(review): read-only auto-merge conditions table via review.auto_merge_summary#3730
bohdansolovie wants to merge 2 commits into
JSONbored:mainfrom
bohdansolovie:feat/review-auto-merge-summary-2051-v2

Conversation

@bohdansolovie

Copy link
Copy Markdown
Contributor

Summary

  • Adds review.auto_merge_summary (bool, default off) to the focus manifest — parse, serialize, present, and resolveReviewPromptOverrides.
  • When enabled on unified comments, renders a read-only Auto-merge conditions collapsible with four rows: CI green, gate passing, mergeable/clean, and valid linked issue — built from already-computed gate, merge-readiness, and panel signal rows (no decision-path re-derivation).
  • Merge-state row uses a conservative allowlist: only an explicit clean label is ✅; dirty/behind are ❌; all other GitHub states (blocked, unstable, draft, …) are ⚠️.
  • Wires the toggle through processors.ts unconditionally (like changed_files_summary / effort_score) and documents the knob in .gittensory.yml.example.

Fixes #2051

Test plan

  • focus-manifest.test.ts — parse/round-trip/warn/default-off for auto_merge_summary
  • auto-merge-summary-collapsible.test.ts — table rendering, signal derivation, merge-state allowlist, flag-off parity, no deriveUnifiedStatus invocation
  • queue.test.ts — end-to-end unified comment includes the collapsible when manifest opts in
  • npx tsc -p tsconfig.json --noEmit passes locally
  • CI green + codecov patch ≥99%

Made with Cursor

…to_merge_summary

Surfaces CI, gate, merge-state, and linked-issue readiness as a collapsible summary in the unified comment when opted in — display-only, default off.

Fixes JSONbored#2051
…mmary

Conservative merge-row mapping: dirty/behind fail, clean passes, all other GitHub merge states warn instead of a misleading green check.
@bohdansolovie
bohdansolovie requested a review from JSONbored as a code owner July 6, 2026 06:32
@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:bug Gittensor-scored bug fix — scores a 0.05x 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 06:34:20 UTC

10 files · 1 AI reviewer · no blockers · readiness 62/100 · CI pending · blocked

⏸️ Suggested Action - Manual Review

Review summary
This PR adds a config-gated (`review.auto_merge_summary`, default off) read-only 'Auto-merge conditions' collapsible to the unified PR comment, built purely from already-computed gate/CI/merge-readiness/panel signals with no re-derivation of the merge decision. The wiring is threaded consistently through focus-manifest parse/serialize/round-trip, `resolveReviewPromptOverrides`, `processors.ts` (unconditional pass-through matching the `changed_files_summary`/`effort_score` pattern), and the bridge/renderer, with default-off behavior preserved via the `!== null` empty-manifest fixture updates across three test files. The merge-state allowlist (`clean`→ok, `dirty`/`behind`→fail, everything else→warn) is conservative and well-tested including the ordering fix in `unified-comment-bridge.ts` where `withAutoMerge` is correctly threaded into the `withChangedFiles` composition so the new collapsible doesn't get dropped when `changedFilesSummary` is also enabled.

Nits — 6 non-blocking
  • `test/unit/queue.test.ts:16315` was flagged by an automated secret scanner for a generic_secret_assignment — worth a quick look to confirm it's just a test fixture token like the adjacent `"installation-token"` literal and not a real credential.
  • The PR issue-tag `feat(config): add review.auto_merge_summary read-only knobs surface #2051` is repeated as a magic-number-adjacent comment marker across several files (`unified-comment-bridge.ts:541`, `unified-comment.ts:226/234`, `focus-manifest.ts:359`) — consistent with this repo's existing convention of citing issue numbers in comments, so likely not worth changing.
  • `panelResultToConditionState` in `unified-comment-bridge.ts` is a thin one-line wrapper around `rowState` — consider inlining it or documenting why the indirection exists, since the doc comment already explains the mapping.
  • `gateEnabled`/`gateConclusion` local variables in `deriveAutoMergeConditionsFromSignals` are only used in the `gateResultRow`-absent fallback branch; minor readability nit to inline them there instead of destructuring at the top.
  • Double-check the flagged `test/unit/queue.test.ts:16315` line isn't a real secret before merge.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2051
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (1 linked issue).
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 343 registered-repo PR(s), 201 merged, 7 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bohdansolovie; Gittensor profile; 343 PR(s), 7 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: bohdansolovie
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 343 PR(s), 7 issue(s).
  • Related work: Titles/paths share 7 meaningful terms. (issue #2051, issue #2049)
  • Related work: Titles/paths share 7 meaningful terms. (issue #2051, issue #2047)
  • Related work: Titles/paths share 7 meaningful terms. (issue #2051, issue #2048)
Contributor next steps
  • Review top overlaps.
  • Add a concise scope and risk note.
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
  • Check active issues and PRs before submitting.
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

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
10017 1 10016 7
View the top 1 failed test(s) by shortest run time
test/unit/config-templates.test.ts > config/examples review templates (#1682) > gittensory.full.yml body matches .gittensory.yml.example from WHERE IT LIVES onward
Stack Traces | 0.0175s run time
AssertionError: expected '# WHERE IT LIVES (first match wins):\…' to be '# WHERE IT LIVES (first match wins):\…' // Object.is equality

- Expected
+ Received

@@ -385,14 +385,10 @@

    # Display-only floor for inline AI findings (`critical` | `major` | `minor` | `nitpick`). Findings below the
    # configured level are suppressed from inline comments — never from gate blockers. Default: null (show all).
    # min_finding_severity: major

-   # Read-only auto-merge conditions table (#2051): when enabled, the unified review comment includes a
-   # collapsible summary of .../gate/merge-state/linked-issue readiness. Does NOT change merge decisions.
-   # auto_merge_summary: false
-
    # Deterministic label suggestions (#2045). Each rule SUGGESTS a non-scoring label when a PR matches ALL of the
    # `when` criteria it sets (at least one is required): when_paths (any changed path matches a glob), title_contains,
    # description_contains (both case-insensitive). Suggestions are advisory; they are auto-applied only when the repo's
    # autoLabelEnabled is on. Reserved `gittensor:` labels (scoring/type) are refused. Empty/unset ⇒ no suggestions.
    labeling_rules:

 ❯ test/unit/config-templates.test.ts:34:57

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

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

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x 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