Skip to content

feat(review): render a deterministic changed-files summary in the unified comment - #3604

Merged
JSONbored merged 1 commit into
mainfrom
feat/changed-files-summary-table
Jul 5, 2026
Merged

feat(review): render a deterministic changed-files summary in the unified comment#3604
JSONbored merged 1 commit into
mainfrom
feat/changed-files-summary-table

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • Adds a deterministic, no-AI "Changed files" collapsible to the unified review comment: one row per file category (source/test/docs/config/generated, via the existing classifyChangedFile classifier from feat(review): deterministic changed-file classifier (source/test/docs/config/generated) #2143), with a file count and +/- totals per category — collapsing an arbitrarily large same-category group into a single row.
  • Gated by a new review.changed_files_summary manifest toggle (default off), on top of the existing unifiedComment convergence flag — no new global env var, no DB/OpenAPI surface, matching the established pattern for other manifest-only review.* fields (review.suggestions, review.tone, etc.).
  • Resolved independently of the AI-review pipeline (not nested inside the aiReviewWillRun-gated closure), since this is purely deterministic and must still render when AI review itself is skipped for a pass (author blacklisted, frozen for manual review, or AI review disabled for the repo).

Closes #1957.

Example rendered table:

| Category | Files | Added | Removed |
| --- | --- | --- | --- |
| Source | 4 | +120 | -18 |
| Test | 2 | +45 | -3 |
| Docs | 1 | +6 | -1 |

Scope

  • The PR title follows type(scope): short summary Conventional Commit format.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked an issue (Changed-files summary table in the unified review comment #1957).

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally — 100% line + branch coverage on every changed line (verified via a targeted v8 coverage pass in addition to the full run: both the new buildChangedFilesSummaryCollapsible pure function and the new changedFilesSummaryEnabledForReview gating ternary in processors.ts are covered on both branches).
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries: test/unit/changed-files-summary-collapsible.test.ts (pure-function + bridge-wiring tests, mirroring visual-collapsible.test.ts), test/unit/focus-manifest.test.ts (parse/serialize/round-trip/resolve for the new manifest field), test/unit/signals-coverage.test.ts (fixture parity), and a new test/unit/queue.test.ts end-to-end webhook test asserting the section renders when .gittensory.yml opts in.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests. (N/A — no auth/session/CORS surface touched.)
  • API/OpenAPI/MCP behavior is updated and tested where needed. (N/A — no API/OpenAPI/MCP schema change; this is a manifest-only review.* field like review.suggestions.)
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks. (N/A — no apps/gittensory-ui changes.)
  • Visible UI changes include a UI Evidence section below with screenshots. (N/A — the only "visible" output is a markdown table rendered inside a bot-posted GitHub PR comment, not an apps/gittensory-ui page; see the example table above instead.)
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs. (README.md's "Unified review comment" bullet extended to mention the new toggle.)

Notes

…fied comment (#1957)

Groups changed files by category (source/test/docs/config/generated via
the existing classifyChangedFile classifier) into one collapsible table
with per-category file counts and +/- totals -- no AI, no extra fetch.

Gated by review.changed_files_summary in .gittensory.yml (default off,
manifest-only like review.suggestions/review.tone) on top of the existing
unifiedComment convergence flag, so it's configurable per-repo without
any new global env var or DB/OpenAPI surface.
@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 5, 2026
@loopover-orb

loopover-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-05 19:24:26 UTC

8 files · 1 AI reviewer · 1 blocker · readiness 82/100 · CI green · clean

⏸️ Suggested Action - Manual Review

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.

Review summary
This PR adds a deterministic, no-AI 'Changed files' collapsible to the unified review comment, grouping changed files by category (source/test/docs/config/generated) via the existing classifyChangedFile classifier, gated by a new review.changed_files_summary manifest toggle that follows the established review.* boolean pattern exactly (parse/round-trip/default-null/warn-on-non-boolean all mirrored from suggestions/inline_comments). The gating is correctly resolved independent of aiReviewWillRun so it still renders when AI review is skipped, and buildUnifiedCommentBody's collapsible-chaining logic (withChangedFiles → extraCollapsibles) correctly composes with the pre-existing visual-preview collapsible without disturbing flag-off byte-identical behavior. Tests cover the pure grouping function, ordering, empty/absent cases, manifest parsing, and full processor wiring; the change is well-scoped to the linked issue (#1957) with no scope creep.

Nits — 5 non-blocking
  • No test exercises the 'config' category row (only source/test/docs/generated are covered in changed-files-summary-collapsible.test.ts), so that flatMap branch for config is implicitly covered by the generic loop but never explicitly asserted.
  • unified-comment-bridge.ts's ChangedFileSummaryInput type doesn't guard against negative additions/deletions, though this can't occur from the real GitHub files API, so it's purely defensive.
  • Consider adding one assertion in changed-files-summary-collapsible.test.ts for a config-classified file (e.g. a `.github/workflows/*.yml` path) to make the row-ordering test exhaustive across all five categories.
  • The processors.ts wiring comment (src/queue/processors.ts around line 8110) is clear and well-justified; no change needed there.
  • PR author also opened the linked issue — Link an issue that was opened by a different contributor, or provide a rationale for why this self-authored issue represents genuine discovery work.

Concerns raised — review before merging

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
Signal Result Evidence
Code review ❌ 1 blocker 1 reviewer
Linked issue ✅ Linked #1957
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 ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 56 registered-repo PR(s), 46 merged, 493 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 56 PR(s), 493 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: Python, TypeScript, JavaScript, Ruby, Go, Kotlin, MDX, Shell
  • Official Gittensor activity: 56 PR(s), 493 issue(s).
  • Related work: Titles/paths share 8 meaningful terms. (issue #2157, issue #2145)
  • Related work: Titles/paths share 6 meaningful terms. (issue #2185, issue #2150)
  • Related work: Titles/paths share 7 meaningful terms. (issue #2185, issue #2145)
  • Additional title-only matches omitted; title-only overlap does not block.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Review top overlaps.
  • Add a concise scope and risk note.
  • No action.
  • 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 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.20%. Comparing base (8662e8f) to head (a549cd2).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3604   +/-   ##
=======================================
  Coverage   93.19%   93.20%           
=======================================
  Files         313      313           
  Lines       31874    31900   +26     
  Branches    11666    11673    +7     
=======================================
+ Hits        29705    29731   +26     
  Misses       1517     1517           
  Partials      652      652           
Files with missing lines Coverage Δ
src/queue/processors.ts 93.59% <100.00%> (+<0.01%) ⬆️
src/review/unified-comment-bridge.ts 97.79% <100.00%> (+0.38%) ⬆️
src/signals/focus-manifest.ts 99.00% <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 added the manual-review Gittensor contributor context label Jul 5, 2026
@JSONbored
JSONbored merged commit 97dbae6 into main Jul 5, 2026
10 checks passed
@JSONbored
JSONbored deleted the feat/changed-files-summary-table branch July 5, 2026 19:29
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. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changed-files summary table in the unified review comment

1 participant