From ec8ad402323dede4542dde5eee82191b6fbd021b Mon Sep 17 00:00:00 2001 From: ghost <49853598+JSONbored@users.noreply.github.com> Date: Thu, 9 Jul 2026 01:22:54 -0700 Subject: [PATCH] fix(manifest): keep freeze override operator-only --- .gittensory.yml.example | 7 ------- config/examples/gittensory.full.yml | 7 ------- packages/gittensory-engine/src/focus-manifest.ts | 3 +-- test/unit/focus-manifest.test.ts | 8 +++----- 4 files changed, 4 insertions(+), 21 deletions(-) diff --git a/.gittensory.yml.example b/.gittensory.yml.example index 56320fbc3c..902ac43096 100644 --- a/.gittensory.yml.example +++ b/.gittensory.yml.example @@ -668,13 +668,6 @@ settings: # Bool. Default: false. agentDryRun: false - # Per-repo override of the GLOBAL DB-backed agent freeze (the operator kill-switch an operator flips with - # one row, no redeploy): when true, THIS repo's actions execute even while the global freeze is on, so an - # operator can re-activate one repo at a time without lifting the fleet-wide brake. Never overrides the - # AGENT_ACTIONS_PAUSED env var (that hard stop always wins), and agentPaused above on this same repo still - # wins over this too. Bool. Default: false. - agentGlobalFreezeOverride: false - # Four independent label families, none of which gates or silently disables another (#label-decoupling, # #label-scoping): # 1. Context label (`gittensorLabel`, gated by `autoLabelEnabled` above) — the base per-PR marker shown diff --git a/config/examples/gittensory.full.yml b/config/examples/gittensory.full.yml index 2b85b24e52..6b1fe56bc5 100644 --- a/config/examples/gittensory.full.yml +++ b/config/examples/gittensory.full.yml @@ -681,13 +681,6 @@ settings: # Bool. Default: false. agentDryRun: false - # Per-repo override of the GLOBAL DB-backed agent freeze (the operator kill-switch an operator flips with - # one row, no redeploy): when true, THIS repo's actions execute even while the global freeze is on, so an - # operator can re-activate one repo at a time without lifting the fleet-wide brake. Never overrides the - # AGENT_ACTIONS_PAUSED env var (that hard stop always wins), and agentPaused above on this same repo still - # wins over this too. Bool. Default: false. - agentGlobalFreezeOverride: false - # Four independent label families, none of which gates or silently disables another (#label-decoupling, # #label-scoping): # 1. Context label (`gittensorLabel`, gated by `autoLabelEnabled` above) — the base per-PR marker shown diff --git a/packages/gittensory-engine/src/focus-manifest.ts b/packages/gittensory-engine/src/focus-manifest.ts index 7b0582b235..19f3f9a932 100644 --- a/packages/gittensory-engine/src/focus-manifest.ts +++ b/packages/gittensory-engine/src/focus-manifest.ts @@ -331,7 +331,6 @@ export type FocusManifestSettings = Partial< | "autoMaintain" | "agentPaused" | "agentDryRun" - | "agentGlobalFreezeOverride" | "commandAuthorization" | "contributorBlacklist" | "blacklistLabel" @@ -1660,7 +1659,7 @@ function parseSettingsOverride(value: JsonValue | undefined, warnings: string[]) } const publicSurface = normalizeOptionalEnum(r.publicSurface, "settings.publicSurface", ["off", "comment_and_label", "comment_only", "label_only"] as const, warnings); if (publicSurface !== null) out.publicSurface = publicSurface; - for (const key of ["aiReviewByok", "aiReviewAllAuthors", "closeOwnerAuthors", "autoLabelEnabled", "typeLabelsEnabled", "badgeEnabled", "publicQualityMetrics", "createMissingLabel", "includeMaintainerAuthors", "requireLinkedIssue", "backfillEnabled", "agentPaused", "agentDryRun", "agentGlobalFreezeOverride"] as const) { + for (const key of ["aiReviewByok", "aiReviewAllAuthors", "closeOwnerAuthors", "autoLabelEnabled", "typeLabelsEnabled", "badgeEnabled", "publicQualityMetrics", "createMissingLabel", "includeMaintainerAuthors", "requireLinkedIssue", "backfillEnabled", "agentPaused", "agentDryRun"] as const) { const flag = normalizeOptionalBoolean(r[key], `settings.${key}`, warnings); if (flag !== null) out[key] = flag; } diff --git a/test/unit/focus-manifest.test.ts b/test/unit/focus-manifest.test.ts index d825263431..d63e49b6d9 100644 --- a/test/unit/focus-manifest.test.ts +++ b/test/unit/focus-manifest.test.ts @@ -312,7 +312,6 @@ describe(".gittensory.yml.example field-exhaustiveness (#1670)", () => { autoMaintain: "autoMaintain:", agentPaused: "agentPaused:", agentDryRun: "agentDryRun:", - agentGlobalFreezeOverride: "agentGlobalFreezeOverride:", commandAuthorization: "commandAuthorization:", contributorBlacklist: "contributorBlacklist:", blacklistLabel: "blacklistLabel:", @@ -1856,11 +1855,10 @@ describe("parseFocusManifest settings override + resolveEffectiveSettings", () = includeMaintainerAuthors: true, requireLinkedIssue: true, backfillEnabled: false, - agentGlobalFreezeOverride: true, }); - // #4372: the yml override wins over the DB value via resolveEffectiveSettings's spread, same as every - // other generic settings: field. - expect(resolveEffectiveSettings({ agentGlobalFreezeOverride: false } as unknown as RepositorySettings, m).agentGlobalFreezeOverride).toBe(true); + // Operator-only freeze overrides are deliberately not config-as-code fields; a maintainer-owned + // manifest must not be able to bypass the DB-backed global freeze. + expect(resolveEffectiveSettings({ agentGlobalFreezeOverride: false } as unknown as RepositorySettings, m).agentGlobalFreezeOverride).toBe(false); }); it("drops invalid settings values with warnings and keeps the valid ones", () => {