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:
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.
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 sharedsrc/utils/env.tsdual-prefix helper, but deliberately left out the much largerGITTENSORY_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.exampleand each gated by anisXEnabled(env)helper using the same/^(1|true|yes|on)$/i.test(...)pattern already generalized intodualPrefixEnvFlag.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
dualPrefixEnvFlaghelper (fromsrc/utils/env.ts, already merged) to each of the 22GITTENSORY_REVIEW_*flags, withLOOPOVER_REVIEW_*winning when both are set. Regenerateapps/gittensory-ui/src/lib/selfhost-env-reference.tslast, after all 22 are converted (the generator's AST scanner was already taught to recognizedualPrefixEnvFlagcalls as part of the prior PR).Deliverables:
GITTENSORY_REVIEW_*flags.Acceptance criteria:
.envusing onlyGITTENSORY_REVIEW_*names keeps every feature flag working unchanged.Boundaries:
LOOPOVER_wins if both set, falls back toGITTENSORY_otherwise.Follow-up to #4774. Part of #4761.