feat(review): surface the test-evidence classifier in the AI review prompt#2635
Conversation
…rompt buildUserPrompt never referenced the engine's own deterministic test-evidence classification (src/signals/test-evidence.ts), even though slop.ts already uses it for the missingTestEvidence finding. The AI reviewer judged test adequacy purely by eyeballing the raw diff. Splice a concise "changed code files with zero test-path evidence" section into the user prompt, reusing the existing isCodeFile/isTestPath classifiers — no new signal, additional context only, never a new blocker/nit rule. Absent when changedFiles isn't supplied, or when the PR has any test-path changes, so the prompt stays byte-identical for the common case. Closes #2558.
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-02 22:03:38 UTC
⏸️ Suggested Action - Manual Review
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 #2635 +/- ##
=======================================
Coverage 96.05% 96.05%
=======================================
Files 234 234
Lines 26280 26286 +6
Branches 9531 9534 +3
=======================================
+ Hits 25244 25250 +6
Misses 425 425
Partials 611 611
🚀 New features to boost your workflow:
|
…mpt section Gate review nit: a repeated file entry in the changed-files list could make the test-evidence prompt section noisier than the actual changed-file set. De-dupe via Set before joining.
Summary
src/services/ai-review.ts'sbuildUserPrompt/REVIEW_SYSTEM_PROMPTnever referenced the engine's own deterministic test-evidence classification (src/signals/test-evidence.ts), even thoughsrc/signals/slop.tsalready reuses it for themissingTestEvidencefinding. The AI reviewer judged test adequacy purely by eyeballing the raw diff.buildTestEvidencePromptSection(exported, pure) toai-review.ts, reusing the existingisCodeFile/isTestPathclassifiers — no new signal. Splices a concise "changed code files with zero test-path evidence" section into the user prompt when applicable; additional context only, never a new blocker/nit rule.changedFiles(the PR's already-loaded file list) throughGittensoryAiReviewInputfrom the one real call site insrc/queue/processors.ts.changedFilesisn't supplied, or when the PR has any test-path changes, so the prompt is byte-identical to today for the common case (a PR that already has tests, or any caller not yet passingchangedFiles).Closes #2558.
Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlint(vianpm run test:ci)npm run typechecknpm run test:coveragelocally — 100% coverage on the newbuildTestEvidencePromptSectionfunction and its wiring; a unit-test suite plus an integration test asserting the section is actually spliced into the real prompt sent to the model.npm run test:workers(vianpm run test:ci)npm run build:mcp(vianpm run test:ci)npm run test:mcp-pack(vianpm run test:ci)npm run ui:openapi:check(vianpm run test:ci) — no OpenAPI-visible changenpm run ui:lint(vianpm run test:ci)npm run ui:typecheck(vianpm run test:ci)npm run ui:build(vianpm run test:ci)npm audit --audit-level=moderateSafety
UI Evidencesection below with screenshots. — N/A, no UI change.Notes