fix(selfhost): distinguish a stale codex-reviewer flag name from unconfigured and cool down its breaker - #7473
Conversation
…nfigured and cool down its breaker The GITTENSORY_→LOOPOVER_ env rebrand (JSONbored#5652) retired dual-read of GITTENSORY_ENABLE_UNSAFE_CODEX_REVIEWER and hardcoded a strict LOOPOVER_ENABLE_UNSAFE_CODEX_REVIEWER === "1" check. An operator whose .env still uses the legacy name silently reverts to fully-disabled and gets the exact same generic codex_credential_isolation_required error as someone who never opted in at all — no signal telling them to rename the var. Recognize the retired flag name in assertCodexCredentialIsolation (without honoring it) and throw an actionable "rename it to LOOPOVER_ENABLE_UNSAFE_CODEX_REVIEWER" message, but only when the current flag isn't already correctly set so a mounted CODEX_HOME isn't mislabeled a rename problem. The message keeps the codex_credential_isolation_required prefix so the structural circuit breaker still recognizes it. Read via a constant rather than env.GITTENSORY_... so the retired name stays out of the generated self-host env reference. Also widen isStructuralProviderConfigError's regex to match codex_credential_isolation_required (bare or with a ": rename …" suffix). It's a deterministic config failure, so it now earns the hour-long structural cooldown instead of retrying every 60s — the flood pattern that breaker exists to prevent. Closes JSONbored#7466
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7473 +/- ##
=======================================
Coverage 91.36% 91.36%
=======================================
Files 717 717
Lines 73016 73020 +4
Branches 21628 21632 +4
=======================================
+ Hits 66713 66717 +4
Misses 5265 5265
Partials 1038 1038
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-20 11:39:57 UTC
Review summary Nits — 3 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
fix(selfhost): distinguish a stale codex-reviewer flag name from unconfigured and cool down its breaker
The GITTENSORY_→LOOPOVER_ env rebrand (#5652) retired dual-read of
GITTENSORY_ENABLE_UNSAFE_CODEX_REVIEWER and hardcoded a strict
LOOPOVER_ENABLE_UNSAFE_CODEX_REVIEWER === "1" check. An operator whose .env
still uses the legacy name silently reverts to fully-disabled and gets the
exact same generic codex_credential_isolation_required error as someone who
never opted in at all — no signal telling them to rename the var.
Recognize the retired flag name in assertCodexCredentialIsolation (without
honoring it) and throw an actionable "rename it to
LOOPOVER_ENABLE_UNSAFE_CODEX_REVIEWER" message, but only when the current flag
isn't already correctly set so a mounted CODEX_HOME isn't mislabeled a rename
problem. The message keeps the codex_credential_isolation_required prefix so
the structural circuit breaker still recognizes it. Read via a constant rather
than env.GITTENSORY_... so the retired name stays out of the generated
self-host env reference.
Also widen isStructuralProviderConfigError's regex to match
codex_credential_isolation_required (bare or with a ": rename …" suffix). It's
a deterministic config failure, so it now earns the hour-long structural
cooldown instead of retrying every 60s — the flood pattern that breaker exists
to prevent.
Closes #7466