feat(review): bypass the AI-review cache when impact-map is active - #3878
Conversation
impact-map computation queries the same live vector index RAG does (computeImpactMap issues its own retrieveContextWithMetrics calls), so it can go stale for the same head SHA without dynamicReviewFeatures' existing booleans flipping, exactly like grounding/rag/enrichment/reputation/ cultureProfile. Adds impactMap to dynamicReviewFeatures and dynamicReviewContextActive, and to AiReviewCacheInput's features shape (bumping the cache-input version so no prior fingerprint is silently reused under the new payload shape). This was implemented once already in the PR that landed the deterministic impact-map foundation, then reverted there because a safe webhook-level test was disproportionate to that PR's scope. Adds that test here.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-07 00:37:46 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 5 non-blocking
Concerns raised — review before merging
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 #3878 +/- ##
=======================================
Coverage 93.54% 93.54%
=======================================
Files 338 338
Lines 33335 33335
Branches 12192 12192
=======================================
Hits 31182 31182
Misses 1528 1528
Partials 625 625
🚀 New features to boost your workflow:
|
Summary
computeImpactMap(src/review/impact-map.ts) issues its ownretrieveContextWithMetricsRAG queries against the live vector index, exactly like RAG's own retrieval -- so it can go stale for an unchanged head SHA without any ofdynamicReviewFeatures' existing booleans (grounding/rag/enrichment/reputation/cultureProfile) flipping. AddsimpactMaptodynamicReviewFeaturesand ORs it intodynamicReviewContextActive(src/queue/processors.ts), following the exact pattern the culture-profile addition (feat(review): infer a cached per-repo quality-culture profile as AI-review grounding context #2995) used.impactMaptoAiReviewCacheInput'sfeaturesshape (src/review/ai-review-cache-input.ts) and bumpsAI_REVIEW_CACHE_INPUT_VERSIONv2->v3, so no prior cached fingerprint is silently reused under the new payload shape.test/unit/queue.test.ts, mirroring the existing culture-profile/grounding cache-bypass tests) asserting that withGITTENSORY_REVIEW_IMPACT_MAPon and the manifest opting in, a cached AI review is marked non-durable (cacheable=0) even when grounding/rag/enrichment/reputation are all off.This exact one-line addition was implemented once already inside the PR that landed the deterministic impact-map foundation (#2182-#2186, merged as #3796), then reverted there before merge because writing a safe webhook-level test for it was disproportionate to that PR's scope. This PR is that follow-up, done properly with its own focused test.
No linked issue: #2182-#2186 are already closed (shipped in #3796); this is a small, self-contained gap-fill on top of already-merged work, not new user-facing scope.
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% branch coverage on every changed line/branch in this diff (verified via targeted lcov branch inspection against the exact diff ranges).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=moderateSafety
UI Evidencesection. (N/A -- backend-only change, no UI.)