feat(review): tag AI review findings with a category taxonomy#3634
Conversation
Adds a category field (security/correctness/performance/ maintainability/tests/style) to each inline finding: the model self-categorizes when asked, and a deterministic path/keyword classifier (classifyFindingCategory) supplies a safe default for whatever it omits, so a caller with the feature on never sees a partial tag. Surfaced in the inline-comment label and a new "Finding categories" collapsible in the unified comment. Gated by review.finding_categories in .gittensory.yml (default off, layered on review.inline_comments like review.suggestions) -- no new global env var, no DB/OpenAPI surface.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-05 20:39:35 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 6 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 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.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3634 +/- ##
==========================================
+ Coverage 93.20% 93.23% +0.02%
==========================================
Files 313 314 +1
Lines 31910 31952 +42
Branches 11677 11698 +21
==========================================
+ Hits 29741 29789 +48
Misses 1517 1517
+ Partials 652 646 -6
🚀 New features to boost your workflow:
|
Summary
categoryfield to inline AI review findings — one ofsecurity,correctness,performance,maintainability,tests,style. The model self-categorizes when asked; a new deterministic path/keyword classifier (classifyFindingCategoryinsrc/review/finding-category-classify.ts) supplies a safe default for whatever it omits or mis-emits, so a caller with the feature on always has a category to render — never a sometimes-present field.**Nit (security):** ...) and a new "Finding categories" collapsible in the unified comment (a count per category).review.finding_categoriesmanifest toggle (default off), layered on top ofreview.inline_commentsbeing on already (mirrorsreview.suggestionsexactly — a category has nothing to categorize without an inline finding) — no new global env var, no DB/OpenAPI surface.Closes #1958.
Example inline comment label:
**Nit (security):** This query is vulnerable to SQL injection.Example unified-comment collapsible:
Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally — 100% line + branch coverage on every changed line, verified via a targeted v8 coverage pass across every touched file (processors.ts's finding-categories gating ternary,ai-review.ts's category parsing + system-prompt suffix,inline-comments.ts's category-tag rendering,unified-comment-bridge.ts's new collapsible) in addition to the full unsharded run.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderatetest/unit/finding-category-classify.test.ts(the new pure classifier),test/unit/finding-category-collapsible.test.ts(the new bridge collapsible + wiring, mirroringvisual-collapsible.test.ts),test/unit/ai-review.test.ts(category parsing, system-prompt gating,composeInlineFindingscarry-through),test/unit/inline-comments.test.ts(label rendering, model-provided vs. fallback category, end-to-end),test/unit/focus-manifest.test.ts(parse/serialize/round-trip/resolve for the new manifest field), and a newtest/unit/queue.test.tsend-to-end webhook test with a mocked AI response asserting both surfaces render the category.Safety
review.*field likereview.suggestions/review.changed_files_summary.)apps/gittensory-uichanges.)UI Evidencesection below with screenshots. (N/A — the visible output is a category tag inside a bot-posted GitHub PR comment, not anapps/gittensory-uipage; see the example labels above instead.)README.md's "Inline review comments" bullet extended to mention the new toggle.)Notes
categoryis parsed but never defaulted insideparseModelReview/composeInlineFindings— the deterministic fallback is applied at render time (formatInlineBody,buildFindingCategoryCollapsible), mirroring howreview.suggestionsalready separates parsing (always capture what the model gives) from rendering (gate on the manifest toggle).