Skip to content

feat(review): add review.max_findings display caps for blockers/nits (#2049) - #3783

Merged
loopover-orb[bot] merged 2 commits into
JSONbored:mainfrom
Lang-bt:feat/review-max-findings-2049-lang-bt
Jul 6, 2026
Merged

feat(review): add review.max_findings display caps for blockers/nits (#2049)#3783
loopover-orb[bot] merged 2 commits into
JSONbored:mainfrom
Lang-bt:feat/review-max-findings-2049-lang-bt

Conversation

@Lang-bt

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

Copy link
Copy Markdown
Contributor

Closes #2049

Summary

  • Parse review.max_findings.{blockers,nits} in the focus manifest and wire caps through the unified-comment render path.
  • Truncate blocker/nit lists in the public review comment with a deterministic +N more footer; gate logic is unchanged (display-only).
  • 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/focus-manifest.test.ts test/unit/unified-comment.test.ts test/unit/unified-comment-bridge.test.ts test/unit/config-templates.test.ts test/unit/queue.test.ts -t "max_findings|maxFindings|truncates unified-comment blockers" (targeted regression + queue wiring)
  • 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 + queue integration tests for cap=0 render, under-cap, partial manifest round-trip, buildUnifiedReviewInput forwarding, and processor wiring.

Safety

  • No secrets, auth, or UI changes.
  • Public GitHub text stays sanitized; display-only truncation never removes gate blockers from the gate decision.
  • New behavior has unit/integration tests for truncation branches, partial serialize paths, and processor wiring.

UI Evidence

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

Notes

YAML template paths are covered by config-templates.test.ts. Processor always forwards manifest caps (null caps are no-ops in the renderer, byte-identical to unset).

…SONbored#2049)

Parse review.max_findings in the focus manifest and truncate unified-comment
blocker/nit sections with a deterministic +N more footer. Gate logic unchanged.

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

Copy link
Copy Markdown
Contributor

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

@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.30%. Comparing base (fca1628) to head (fc0ef11).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3783   +/-   ##
=======================================
  Coverage   93.30%   93.30%           
=======================================
  Files         317      317           
  Lines       32377    32403   +26     
  Branches    11873    11887   +14     
=======================================
+ Hits        30208    30234   +26     
  Misses       1537     1537           
  Partials      632      632           
Files with missing lines Coverage Δ
src/queue/processors.ts 94.11% <ø> (ø)
src/review/unified-comment-bridge.ts 99.42% <100.00%> (+<0.01%) ⬆️
src/review/unified-comment.ts 99.47% <100.00%> (+0.03%) ⬆️
src/signals/focus-manifest.ts 99.11% <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.

…ONbored#2049)

Add render, serialize, buildUnifiedReviewInput, and queue integration tests
for review.max_findings display caps; always pass manifest caps from the
processor so the wiring line is exercised on every unified-comment publish.

Co-authored-by: Cursor <cursoragent@cursor.com>
@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

Tip

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

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-06 10:01:06 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR threads an optional `review.max_findings.{blockers,nits}` display cap through the focus-manifest parser, `resolveReviewPromptOverrides`, `buildUnifiedReviewInput`/`buildUnifiedCommentBody`, and the queue processor into `renderUnifiedReviewComment`, truncating the public comment's blocker/nit lists with a deterministic '+N more' footer while leaving the gate's actual blocker count/chip and decision logic untouched. The truncation logic in `truncateFindingsForDisplay` (unified-comment.ts) correctly handles null/undefined (no cap), cap=0 (hide all, footer only), and under-cap (no footer) cases, and this is backed by both unit tests and a full processor-wiring integration test asserting byte-identical output when caps are unset. One incidental issue: the diff silently deletes the JSDoc comment above `parseReviewLabelingRules` in focus-manifest.ts, which is unrelated to this feature.

Nits — 4 non-blocking
  • src/signals/focus-manifest.ts: the diff removes the pre-existing JSDoc comment above `parseReviewLabelingRules` (the block starting '/** Parse `review.labeling_rules`...') with no replacement — looks like an accidental deletion unrelated to `max_findings`; restore it or explain why it was dropped.
  • src/review/unified-comment.ts: `appendMoreFooter`/the cap=0 branch duplicate the '_+N more_' string literal in three places (nits, blockers, and the footer helper) — consider always routing through `appendMoreFooter` with an empty base string to avoid the format drifting in one spot but not the others.
  • Consider naming the `feat(config): add review.max_findings caps for blockers/nits #2049` issue-reference magic number as intent-revealing comments already do elsewhere in the file (minor, matches existing convention already used for other `review.*` flags).
  • Double check `normalizeOptionalNonNegativeInt` (used by `parseMaxFindingsConfig` in focus-manifest.ts) applies the same warning/drop semantics as other numeric manifest fields for consistency — not shown in this diff but worth a quick confirmation since it's reused here for a new field.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2049
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: 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 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 e3db85f 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.max_findings caps for blockers/nits

2 participants