Skip to content

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

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

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

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 ⚠️.
  • Keeps .gittensory.yml.example and config/examples/gittensory.full.yml in sync (fixes config-templates.test.ts).
  • Wires the toggle through processors.ts unconditionally (like changed_files_summary / effort_score).

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
  • queue.test.ts — end-to-end unified comment includes the collapsible when manifest opts in
  • config-templates.test.ts — example + full.yml bodies stay aligned
  • 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:46
@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

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 Gittensory review result - fixes required

Review updated: 2026-07-06 06:52:43 UTC

10 files · 1 AI reviewer · no blockers · readiness 62/100 · CI failing · unstable

🛑 Suggested Action - Fix Blockers

Review summary
This PR adds review.auto_merge_summary — a read-only 'Auto-merge conditions' collapsible built purely from already-computed gate/CI/merge/linked-issue signals, following the exact established pattern used by changed_files_summary/effort_score/finding_categories (manifest field → resolveReviewPromptOverrides → processors.ts wiring → bridge → renderer). The merge-state mapping is appropriately conservative (only explicit 'clean' is ok; dirty/behind fail; everything else warns), collapsible ordering is verified by a test, and both config example files stay in sync. Wiring is fully threaded end-to-end with reasonable test coverage of the main branches (fallback-no-panel-row, dirty/failing states, flag-off parity).

Nits — 5 non-blocking
  • src/review/unified-comment-bridge.ts: the gateConclusion === "action_required" branch and the plain 'CI state was not resolved' (ciState undefined, non-'unverified') branch in deriveAutoMergeConditionsFromSignals aren't directly exercised by a test, which likely explains part of the codecov/patch shortfall (74% vs 99% target).
  • src/review/unified-comment-bridge.ts / unified-comment.ts: the bare `feat(config): add review.auto_merge_summary read-only knobs surface #2051` issue-number references sprinkled through comments could be paired with the human-readable feature name for readability, per the external brief's magic-number note.
  • panelResultToConditionState/panelResultEvidence just delegate to rowState/rowResultText — consider inlining or confirming these thin wrappers pull their weight versus calling the helpers directly.
  • Add a focused unit test for the `action_required` gate-conclusion fallback branch and the truly-unresolved CI state branch in deriveAutoMergeConditionsFromSignals to close the coverage gap flagged by codecov/patch.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.

CI checks failing

  • codecov/patch — 74.00% of diff hit (target 99.00%)
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: Python, C++, JavaScript
  • 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

Codecov Report

❌ Patch coverage is 74.00000% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.26%. Comparing base (8110550) to head (d79fd27).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/review/unified-comment-bridge.ts 63.88% 4 Missing and 9 partials ⚠️

❌ Your patch check has failed because the patch coverage (74.00%) is below the target coverage (99.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3734      +/-   ##
==========================================
- Coverage   93.29%   93.26%   -0.04%     
==========================================
  Files         317      317              
  Lines       32347    32394      +47     
  Branches    11871    11897      +26     
==========================================
+ Hits        30179    30213      +34     
- Misses       1537     1541       +4     
- Partials      631      640       +9     
Files with missing lines Coverage Δ
src/queue/processors.ts 94.08% <100.00%> (+<0.01%) ⬆️
src/review/unified-comment.ts 99.46% <100.00%> (+0.02%) ⬆️
src/signals/focus-manifest.ts 99.10% <100.00%> (+<0.01%) ⬆️
src/review/unified-comment-bridge.ts 93.30% <63.88%> (-6.13%) ⬇️
🚀 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

Gittensory is closing this pull request on the maintainer's behalf (CI is failing (codecov/patch)). 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.

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

1 participant