feat(review): migrate grounding onto the per-repo feature-activation resolver#4117
Conversation
…resolver Adds "grounding" to CONVERGED_FEATURE_KEYS and FEATURE_GLOBAL_FLAG, and migrates both real call sites in processors.ts from the raw isGroundingEnabled(env) && isConvergenceRepoAllowed(env, repo) check to resolveConvergedFeature, so an operator can now turn grounding on/off per-repo through .gittensory.yml alone. The original "coupled to the merge/close disposition path" blocker was the removed AI CI-refutation path (grounding-wire.ts's aiCiRefutationActive is now a vestigial compatibility helper with zero real callers) -- grounding today only shapes reviewer prompt content, same shape as rag/reputation. Closes #4100.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | f85de86 | Commit Preview URL Branch Preview URL |
Jul 08 2026, 01:41 AM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4117 +/- ##
=======================================
Coverage 93.64% 93.64%
=======================================
Files 384 384
Lines 35856 35856
Branches 13159 13158 -1
=======================================
Hits 33579 33579
Misses 1618 1618
Partials 659 659
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-08 01:51:57 UTC
⏸️ Suggested Action - Manual Review
Review summary Blockers
Nits — 7 non-blocking
Concerns raised — review before merging
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.
|
|
Reviewed the flagged blocker — it's a false positive, overriding. The claim is that `reviewManifest` (used at the `dynamicReviewFeatures.grounding` call site in `maybePublishPrPublicSurface`, via `resolveReviewManifestForAiReview(env, repoFullName, reviewManifestForAutoReview)` at processors.ts:9219) can be null for a grounding-only repo because its load condition "still only checks rag/reputation." That's not the actual shape. `reviewManifestForAutoReview` comes from `resolveAutoReviewSkipForPullRequest` (processors.ts:6802-6847), whose manifest load at line 6818 is: — unconditional, no rag/reputation/grounding gate at all. Confirmed via `git diff origin/main` that this line is byte-identical before and after this PR; it was never conditionally gated. So there's no "pre-PR pattern this mirrors" of a rag/reputation-only load condition to widen — the premise doesn't hold, and `dynamicReviewFeatures.grounding`'s `resolveConvergedFeature(env, reviewManifest, "grounding", repoFullName)` call gets a real (or genuinely-absent-on-load-failure) manifest exactly like every other feature in that object, with no per-call-site drift. (This is a different function from `runAiReviewForAdvisory`'s `featureManifest`, which — correctly, per the same comment thread — DOES have a conditional load that was widened with `|| isGroundingEnabled(env)`. The two manifests are loaded by different helpers with different shapes; only one of them was ever conditional.) CI green, mergeable clean, no other blockers — merging. |
Summary
isGroundingEnabled(env) && isConvergenceRepoAllowed(env, repo)(raw, coarse allowlist-only) is nowresolveConvergedFeature(env, manifest, "grounding", repo)at both real call sites insrc/queue/processors.ts— the same precedence every other converged feature uses (env kill-switch → per-repo.gittensory.ymlfeatures.groundingoverride → allowlist default)."grounding"toCONVERGED_FEATURE_KEYS(packages/gittensory-engine/src/focus-manifest.ts) andFEATURE_GLOBAL_FLAG(src/review/feature-activation.ts).feature-activation.ts's own header comment: it referred to the now-removed AI CI-refutation path —grounding-wire.ts'saiCiRefutationActiveis a vestigial historical-compatibility helper with zero real callers (confirmed via repo-wide grep). Grounding today only shapes reviewer PROMPT content (CI status + full file context), the same shape asrag/reputation— safe to migrate.isReputationEnabled(env) || isRagEnabled(env)) to also include|| isGroundingEnabled(env), so grounding-only repos still get the manifest loaded for their own override to take effect.Scope
CONTRIBUTING.md.Validation
git diff --checknpm run typecheck— clean.npm run build --workspace @jsonbored/gittensory-engine(required after editing the shared package).test/unit/feature-activation.test.ts,test/unit/focus-manifest.test.ts,test/unit/config-templates.test.ts,test/unit/signals-coverage.test.ts,test/unit/grounding-wiring.test.ts— all green (626 tests).test/unit/queue.test.tsintegration suite — green (697 tests).src/review/feature-activation.tsat 100% line/branch; the newprocessors.tslines (the widened||condition, the newgroundingActiveresolution, and its two consumption sites) confirmed via lcov BRDA records — all branches hit.npm audit --audit-level=moderate— 0 vulnerabilities.Safety