fix(review): make review.impactMap fully control activation once the kill-switch is on - #4125
fix(review): make review.impactMap fully control activation once the kill-switch is on#4125JSONbored wants to merge 1 commit into
Conversation
…kill-switch is on (#4102) shouldComputeImpactMap previously required GITTENSORY_REVIEW_IMPACT_MAP AND the per-repo manifest toggle to both be true, forcing callers to pre-collapse an unset manifest value to false before the AND. Move that collapse into the resolver itself, mirroring the inlineComments/fixHandoff shape (#4099): the env flag is an absolute master kill-switch, and manifestToggle === true fully decides once it's on. Behavior is unchanged for every existing repo (impact-map never had a GITTENSORY_REVIEW_REPOS allowlist fallback), but call sites no longer need their own === true coercion.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4125 +/- ##
=======================================
Coverage 93.65% 93.65%
=======================================
Files 384 384
Lines 35865 35866 +1
Branches 13160 13160
=======================================
+ Hits 33589 33590 +1
Misses 1618 1618
Partials 658 658
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-08 02:59:17 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 5 non-blocking
Linked issue satisfactionAddressed 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.
|
|
Closing unmerged — see #4102's closing comment. No behavior gap existed to fix; impactMap never had an allowlist term to bypass, so this is a byte-identical code-shape change, not a real config-as-code fix. |
Summary
shouldComputeImpactMap(src/review/impact-map-wire.ts) previously requiredisImpactMapEnabled(env) && manifestImpactMapEnabled— a required AND where every call site had to pre-collapse the manifest'sboolean | undefinedtoggle to a strictboolean(args.reviewImpactMap === true) before calling in.inlineComments/fixHandoffalready use (Upgrade inlineComments + fixHandoff from required-AND opt-in to full config-as-code substitutes #4099, PR feat(review): upgrade inlineComments + fixHandoff to full config-as-code substitutes #4116): the operator'sGITTENSORY_REVIEW_IMPACT_MAPflag is an absolute master kill-switch (off ⇒ always false, no per-repo bypass), and once it's on, the manifest'sreview.impactMaptoggle (manifestToggle: boolean | undefined) fully decides viamanifestToggle === true. impact-map has never had aGITTENSORY_REVIEW_REPOScutover-allowlist fallback, so there was nothing to "bypass" in that dimension — this PR closes the config-as-code gap by moving the=== truecollapse into the single resolver instead of leaving it scattered at each call site.src/queue/processors.ts(the AI-review prompt gate and the cache-bypassdynamicReviewFeatures.impactMapgate) to pass the raw manifest value straight through instead of pre-coercing it.(env, manifestValue)pair, the old and new resolvers compute the exact same boolean (verified with a regression test asserting an unset manifest toggle still resolves tofalseeven with the env flag on).src/review/ai-review-cache-input.tsandsrc/review/unified-comment-bridge.tswere checked and need no changes — both consume the already-resolved boolean/array after activation, not the activation decision itself.Closes #4102
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.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=moderateIf any required check was skipped, explain why:
src/review+src/queuechange with no UI/MCP/OpenAPI/wrangler surface touched, soui:*,build:mcp/test:mcp-pack,test:workers, andui:openapi:checkwere not run locally (nothing in the diff can affect them).npm run actionlintwas not run locally (no.github/workflows/**changes in this diff). Coverage was measured vianpx vitest run --coverage --pool=forks test/unit/impact-map-wire.test.ts test/unit/queue.test.ts(targeted, not the full unsharded suite) —src/review/impact-map-wire.ts'sshouldComputeImpactMapshows 100% line/branch coverage (LF:19 LH:19,BRF:12 BRH:12incoverage/lcov.info), and the twosrc/queue/processors.tscall-site lines are executed on every AI-review pass (verified hit counts in the same lcov output). The fulltest/unit/queue.test.tssuite (697 tests) was run in full and passes, both before and after rebasing ontoorigin/main.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository. (N/A — no visible UI change.)UI Evidence
N/A — backend-only change, no visible UI/frontend/docs/extension surface touched.
Notes
inlineComments/fixHandoff(Upgrade inlineComments + fixHandoff from required-AND opt-in to full config-as-code substitutes #4099, merged as PR feat(review): upgrade inlineComments + fixHandoff to full config-as-code substitutes #4116) and is one of a set of sibling issues in the same epic (Investigate + close the config-as-code gap for reviewMemory #4101 forreviewMemory, Investigate + close the config-as-code gap for cultureProfile #4103) applying the same precedence pattern to other standalone review-feature toggles.