fix(agent): make the fleet-wide DB freeze absolute, drop the per-repo bypass - #5912
Merged
Conversation
.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).
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
This was referenced Jul 15, 2026
Closed
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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'ssettings.agentGlobalFreezeOverride(operator-only,source: "api_record"), that let one repo opt out of the freeze while every other repo stayed frozen.agentGlobalFreezeOverrideentirely.global_agent_controls.frozenis now an absolute brake, the same tier as theAGENT_ACTIONS_PAUSEDenv var — no per-repo setting can bypass it anymore. Day-to-day per-repo enable/disable issettings.agentPaused, which is already resolved through the normal global-default + per-repo-override.loopover.ymlconfig layering with zero DB coupling..loopover.yml.examplestill said "gittensory" in several prose comments after the repo rename whileconfig/examples/loopover.full.ymlalready said "loopover" — fixed to unblock the local gate.What changed
repository_settings.agent_global_freeze_override(migration0150), the Drizzle column, theFocusManifestSettingsfield and its source-gated parser branch inpackages/loopover-engine/src/focus-manifest.ts, the OpenAPI field, and the now-unnecessarystripMaintainerFocusManifestSettingsmaintainer-write guard (nothing left to strip).isDbFrozenForRepo(env, settings.agentGlobalFreezeOverride)call site withisGlobalAgentFrozen(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) —isDbFrozenForRepoitself is deleted.AGENT_ACTIONS_PAUSEDstill wins independently.Context
This was the root cause of a live incident: reviews stopped running on
JSONbored/loopoverafter 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
npm run typechecknpm run test:coverage(unsharded)npm run test:ci(full local gate, green)npm audit --audit-level=moderate— 0 vulnerabilitiesnpm run ui:openapiregenerated and committednpm run db:migrations:check/db:schema-drift:check— greennpm run docs:drift-check/manifest:drift-check/engine-parity:drift-check— greenJSONbored/loopoverPRs are receiving reviews again post-unfreeze (docs(core): rename gittensory prose to loopover in remaining src subdirs #5895–docs(engine): rename gittensory prose to loopover in packages/loopover-engine (batch A) #5897 now show labels + comments)