Skip to content

Dual-read the GITTENSORY_REVIEW_* feature-flag family (env var migration follow-up) #5555

Description

@JSONbored

Problem: Issue #4774 (environment variable family migration) asked for dual-read support for "roughly twenty self-host-facing environment variables, including a whole family of feature-flag variables." The implementing PR covered the 7 operational vars (tokens, version, config dir, notification webhooks: GITTENSORY_API_TOKEN, GITTENSORY_MCP_TOKEN, GITTENSORY_VERSION, GITTENSORY_REPO_CONFIG_DIR, GITTENSORY_ENABLE_PAGERDUTY, GITTENSORY_ENABLE_UNSAFE_CODEX_REVIEWER, GITTENSORY_DISCORD_WEBHOOK) via a shared src/utils/env.ts dual-prefix helper, but deliberately left out the much larger GITTENSORY_REVIEW_* feature-flag family — 22 more variables (CONTENT_LANE, CONTINUOUS, CULTURE_PROFILE, DRAFT, E2E_TESTS, ENRICHMENT, FIX_HANDOFF, GROUNDING, IMPACT_MAP, IMPROVEMENT_SIGNAL, INLINE_COMMENTS, MEMORY, OPS, PARITY_AUDIT, PLANNER, RAG, REPOS, REPUTATION, SAFETY, SCREENSHOTS, SELFTUNE, UNIFIED_COMMENT), each already documented as self-host config in .env.example/.env.selfhost.example and each gated by an isXEnabled(env) helper using the same /^(1|true|yes|on)$/i.test(...) pattern already generalized into dualPrefixEnvFlag.

This is almost certainly "the whole family of feature-flag variables" #4774's own text refers to — split out as its own issue rather than tripling the size of the already-merged PR, matching this repo's small-PR preference.

Proposal: Apply the same dualPrefixEnvFlag helper (from src/utils/env.ts, already merged) to each of the 22 GITTENSORY_REVIEW_* flags, with LOOPOVER_REVIEW_* winning when both are set. Regenerate apps/gittensory-ui/src/lib/selfhost-env-reference.ts last, after all 22 are converted (the generator's AST scanner was already taught to recognize dualPrefixEnvFlag calls as part of the prior PR).

Deliverables:

  • Dual-read support for all 22 GITTENSORY_REVIEW_* flags.
  • Regenerated environment-reference documentation, committed in the same PR.

Acceptance criteria:

  • An existing self-hoster's .env using only GITTENSORY_REVIEW_* names keeps every feature flag working unchanged.
  • The generated reference-documentation drift check passes in CI.

Boundaries:

  • Same precedence rule as the already-merged PR: LOOPOVER_ wins if both set, falls back to GITTENSORY_ otherwise.
  • Never remove the legacy prefix — purely additive, same as the rest of this rebrand's env var work.

Follow-up to #4774. Part of #4761.

Metadata

Metadata

Assignees

Labels

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

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions