Skip to content

Add config-as-code coverage for the grounding feature #4100

Description

@JSONbored

Part of #4092.

Problem

isGroundingEnabled (src/review/grounding-wire.ts, consumed via isConvergenceRepoAllowed directly) is NOT YET migrated onto the existing per-repo feature-activation mechanism. src/review/feature-activation.ts's own header comment confirms this explicitly: "grounding and screenshots stay on the GITTENSORY_REVIEW_REPOS allowlist for now (grounding is coupled to the merge/close DISPOSITION path...) — a follow-up." This issue IS that follow-up.

(Correction from this issue's original scope: feature-activation.tsresolveConvergedFeature/convergedFeatureActive, CONVERGED_FEATURE_KEYS — already exists and already covers rag/reputation/unifiedComment/safety; no new resolver needs building. See #4092's corrected state.)

Fix

  • Add "grounding" to CONVERGED_FEATURE_KEYS (packages/gittensory-engine/src/focus-manifest.ts) and FEATURE_GLOBAL_FLAG (src/review/feature-activation.ts, mapping to isGroundingEnabled).
  • Migrate grounding's real call site(s) from the raw isGroundingEnabled(env) && isConvergenceRepoAllowed(env, repo) pattern to convergedFeatureActive(env, repoFullName, "grounding") (or resolveConvergedFeature if a manifest is already in hand at the call site).
  • Investigate the "coupled to the merge/close DISPOSITION path" note before touching call sites — understand why this was deferred before assuming a naive swap is safe.
  • .gittensory.yml.example + config/examples/gittensory.full.yml document the new features.grounding key.

Deliverables

  • grounding added to CONVERGED_FEATURE_KEYS + FEATURE_GLOBAL_FLAG
  • Real call site(s) migrated to the resolver
  • Written note on the merge/close disposition coupling and why it's safe (or not) to migrate now
  • Tests: config true/false/unset across allowlisted/non-allowlisted repos, mirroring feature-activation.test.ts's existing pattern for rag/reputation/safety/unifiedComment
  • Docs updated

Expected outcome

An operator can turn grounding on/off per-repo purely through .gittensory.yml, using the same mechanism as rag/reputation/safety/unifiedComment.

Effort

S-M — mechanical if the disposition-path coupling turns out to be a non-issue; investigate first.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions