Skip to content

fix(agent): make the fleet-wide DB freeze absolute, drop the per-repo bypass - #5912

Merged
JSONbored merged 2 commits into
mainfrom
fix/fleet-freeze-config-only
Jul 14, 2026
Merged

fix(agent): make the fleet-wide DB freeze absolute, drop the per-repo bypass#5912
JSONbored merged 2 commits into
mainfrom
fix/fleet-freeze-config-only

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • global_agent_controls.frozen (the fleet-wide DB kill-switch) had a per-repo escape hatch, repository_settings.agent_global_freeze_override / .loopover.yml's settings.agentGlobalFreezeOverride (operator-only, source: "api_record"), that let one repo opt out of the freeze while every other repo stayed frozen.
  • That mechanism required either a raw DB write or an operator-only config field with no config-as-code parity with any other repo setting, and made "is this repo frozen" depend on two independently mutable sources of truth (a DB row that has to exist and stay in sync with a container-private config file) instead of one.
  • This PR removes agentGlobalFreezeOverride entirely. global_agent_controls.frozen is now an absolute brake, the same tier as the AGENT_ACTIONS_PAUSED env var — no per-repo setting can bypass it anymore. Day-to-day per-repo enable/disable is settings.agentPaused, which is already resolved through the normal global-default + per-repo-override .loopover.yml config layering with zero DB coupling.
  • Includes a small, unrelated doc-drift fix (separate commit): .loopover.yml.example still said "gittensory" in several prose comments after the repo rename while config/examples/loopover.full.yml already said "loopover" — fixed to unblock the local gate.

What changed

  • Dropped repository_settings.agent_global_freeze_override (migration 0150), the Drizzle column, the FocusManifestSettings field and its source-gated parser branch in packages/loopover-engine/src/focus-manifest.ts, the OpenAPI field, and the now-unnecessary stripMaintainerFocusManifestSettings maintainer-write guard (nothing left to strip).
  • Replaced every isDbFrozenForRepo(env, settings.agentGlobalFreezeOverride) call site with isGlobalAgentFrozen(env) directly (mcp/server.ts, github/client.ts, queue/review-evasion.ts, queue/processors.ts ×15, services/contributor-issue-draft.ts, services/agent-action-executor.ts ×2) — isDbFrozenForRepo itself is deleted.
  • Updated/removed the tests that exercised the removed bypass; added regression coverage confirming the freeze is now unconditional and that AGENT_ACTIONS_PAUSED still wins independently.

Context

This was the root cause of a live incident: reviews stopped running on JSONbored/loopover after the gittensory→loopover repo rename. The fleet-wide DB freeze (set 2026-07-09 for an unrelated scope-leak incident) was still on, and the per-repo override wasn't taking effect for the renamed repo in production despite matching in every static/isolated test. The freeze has already been cleared directly (global_agent_controls.frozen = 0) to unblock production immediately; this PR is the follow-up architectural fix so the DB row can never again be the sole thing standing between "frozen" and "not frozen" for a repo.

Test plan

.loopover.yml.example had drifted from config/examples/loopover.full.yml
after the repo rename -- several prose comments (CLA gate description,
autonomy-outcome label names, the plugins/registry-lane section) still
said "gittensory" while the full example already said "loopover".
… bypass

global_agent_controls.frozen (isGlobalAgentFrozen) previously had a
per-repo escape hatch: repository_settings.agent_global_freeze_override
(also settable from an operator's private .loopover.yml, source:
"api_record") let one repo opt out of the fleet-wide freeze while every
other repo stayed frozen. That mechanism required either a raw DB write
or an operator-only config field with no config-as-code parity with any
other repo setting, and made the freeze state depend on two independently
mutable sources of truth instead of one.

Remove agentGlobalFreezeOverride entirely. global_agent_controls.frozen
is now an absolute brake, same tier as the AGENT_ACTIONS_PAUSED env var --
no per-repo setting can bypass it. Day-to-day per-repo enable/disable is
settings.agentPaused instead, which is already resolved through the
normal global-default + per-repo-override .loopover.yml config layering
with no DB coupling.

Drops the repository_settings.agent_global_freeze_override column
(migrations/0150), the FocusManifestSettings field and its source-gated
parser branch, the OpenAPI field, the now-unnecessary
stripMaintainerFocusManifestSettings maintainer-write guard, and every
isDbFrozenForRepo call site (now isGlobalAgentFrozen directly).
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored JSONbored self-assigned this Jul 14, 2026
@JSONbored
JSONbored merged commit 951c4f3 into main Jul 14, 2026
8 checks passed
@JSONbored
JSONbored deleted the fix/fleet-freeze-config-only branch July 14, 2026 22:42
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 14, 2026
This was referenced Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Development

Successfully merging this pull request may close these issues.

1 participant