Skip to content

chore: remove vestigial GITTENSORY_REVIEW_TEST_GENERATION env var declaration #4108

Description

@JSONbored

Part of #4092.

Context

Corrected 2026-07-08 (see issue comments for the full investigation): review.testGeneration is NOT already a working config-only gate. The entire slice is dead code — resolveTestGenerationManifestToggle (src/signals/focus-manifest.ts) and shouldOfferTestGenerationSpec (src/review/test-generation.ts) are never called anywhere in src/; the "separate slice" that was supposed to wire a generated spec onto a missing-test-evidence finding was never built. GITTENSORY_REVIEW_TEST_GENERATION (src/env.d.ts) is unread for the same reason — not because the manifest field alone became sufficient.

The only LIVE test-generation code paths are the standalone MCP tools gittensory_generate_tests and the boundary-test-generation tool (src/mcp/server.ts, src/mcp/local-write-tools.ts, src/signals/boundary-test-generation.ts) — both ungated by config or env var. This issue does not touch those; they are unaffected.

Fix — full dead-slice removal

Deleting just the env var would leave isTestGenerationEnabled/shouldOfferTestGenerationSpec/resolveTestGenerationManifestToggle as newly-orphaned dead exports with no story at all, so the fix removes the whole never-wired slice:

  • Remove GITTENSORY_REVIEW_TEST_GENERATION from src/env.d.ts (+ regenerate worker-configuration.d.ts via cf-typegen, + wrangler.jsonc vars if present).
  • Remove the orphaned resolveTestGenerationManifestToggle (focus-manifest.ts) and the review.testGeneration manifest field it reads (type + parse + present-check + overlay + serialize).
  • Remove the orphaned isTestGenerationEnabled/shouldOfferTestGenerationSpec (src/review/test-generation.ts) and its dedicated test file.
  • Update .gittensory.yml.example, config/examples/gittensory.full.yml, and the two apps/gittensory-ui/src/routes/docs.* pages that describe the never-shipped behavior as if live.

Deliverables

  • GITTENSORY_REVIEW_TEST_GENERATION removed from src/env.d.ts, regenerated worker-configuration.d.ts committed
  • review.testGeneration manifest field + resolveTestGenerationManifestToggle removed from focus-manifest.ts (full round-trip: type/parse/present-check/overlay/serialize)
  • src/review/test-generation.ts + its test file removed
  • Both .gittensory.yml example files and the two docs pages updated to drop the never-shipped key
  • A grep confirming zero remaining references anywhere in the repo

Expected outcome

No orphaned config surface (env var OR manifest field OR resolver function) implying a review-pipeline test-generation gate exists when it was never actually wired in. The two live, ungated MCP test-generation tools are unaffected.

Effort

S — dead-code removal across 4-5 files + docs, no behavior change (confirmed zero live callers).

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