From 6ab32a04524d26f0e5d99f4e2daf170f87bcee81 Mon Sep 17 00:00:00 2001 From: JSONbored <49853598+JSONbored@users.noreply.github.com> Date: Sun, 12 Jul 2026 12:59:02 -0700 Subject: [PATCH] chore(api): drop gateCheckMode from registration-readiness and settings-preview responses (#5373) Stops copying settings.gateCheckMode into GithubAppBehavior (registration-readiness.ts) and the settings-preview response object, removing the field from both local report types entirely. Neither surface is a documented public API contract for third-party consumers, confirmed via the #5373 discovery audit: not exported from gittensory-engine's public index, no external self-hosted install (all 3 known ones checked directly) references it, and no dedicated test asserted on it in either output. Also fixes 3 OpenAPI schema entries (RepoSettingsPreviewSchema, RegistrationReadinessSchema, and InstallationRepairSchema) that still declared gateCheckMode as present -- InstallationRepairSchema has been stale since #5440 dropped the field from backfill.ts's summarizeRepairSettings but never updated its schema. Regenerated openapi.json; RepositorySettingsSchema itself is untouched since RepositorySettings.gateCheckMode still exists (optional) at this stage. --- apps/gittensory-ui/public/openapi.json | 21 ------------------- src/openapi/schemas.ts | 9 -------- src/signals/registration-readiness.ts | 4 ---- src/signals/settings-preview.ts | 4 ---- .../self-dogfood-registration-pack.test.ts | 3 --- 5 files changed, 41 deletions(-) diff --git a/apps/gittensory-ui/public/openapi.json b/apps/gittensory-ui/public/openapi.json index 3c8a50fff1..e6515b011d 100644 --- a/apps/gittensory-ui/public/openapi.json +++ b/apps/gittensory-ui/public/openapi.json @@ -3862,13 +3862,6 @@ "enabled" ] }, - "gateCheckMode": { - "type": "string", - "enum": [ - "off", - "enabled" - ] - }, "reviewCheckMode": { "type": "string", "enum": [ @@ -9742,13 +9735,6 @@ "enabled" ] }, - "gateCheckMode": { - "type": "string", - "enum": [ - "off", - "enabled" - ] - }, "reviewCheckMode": { "type": "string", "enum": [ @@ -10170,13 +10156,6 @@ "standard" ] }, - "gateCheckMode": { - "type": "string", - "enum": [ - "off", - "enabled" - ] - }, "regateSweepOrderMode": { "type": "string", "enum": [ diff --git a/src/openapi/schemas.ts b/src/openapi/schemas.ts index 00d896473f..ea90a74d2f 100644 --- a/src/openapi/schemas.ts +++ b/src/openapi/schemas.ts @@ -887,9 +887,6 @@ export const RepoSettingsPreviewSchema = z publicSignalLevel: z.enum(["minimal", "standard"]), checkRunMode: z.enum(["off", "enabled"]), checkRunDetailLevel: z.enum(["minimal", "standard"]), - // @deprecated (#4618, tracked for removal in #5373): computed read-back of reviewCheckMode kept only - // for API/dashboard back-compat display -- read reviewCheckMode instead. - gateCheckMode: z.enum(["off", "enabled"]).optional(), regateSweepOrderMode: z.enum(["staleness", "oldest-first"]), reviewCheckMode: z.enum(["required", "visible", "disabled"]), autoProjectMilestoneMatch: z.enum(["off", "suggest", "auto"]).optional(), @@ -1292,9 +1289,6 @@ export const InstallationRepairSchema = z commentMode: z.enum(["off", "detected_contributors_only", "all_prs"]), publicAudienceMode: z.enum(["oss_maintainer", "gittensor_only"]), checkRunMode: z.enum(["off", "enabled"]), - // @deprecated (#4618, tracked for removal in #5373): computed read-back of reviewCheckMode kept only - // for API/dashboard back-compat display -- read reviewCheckMode instead. - gateCheckMode: z.enum(["off", "enabled"]).optional(), reviewCheckMode: z.enum(["required", "visible", "disabled"]), autoProjectMilestoneMatch: z.enum(["off", "suggest", "auto"]).optional(), autoProjectMilestoneMatchBackend: z.enum(["github", "linear"]).optional(), @@ -2213,9 +2207,6 @@ export const RegistrationReadinessSchema = z commentMode: z.enum(["off", "detected_contributors_only", "all_prs"]), publicAudienceMode: z.enum(["oss_maintainer", "gittensor_only"]), checkRunMode: z.enum(["off", "enabled"]), - // @deprecated (#4618, tracked for removal in #5373): computed read-back of reviewCheckMode kept only - // for API/dashboard back-compat display -- read reviewCheckMode instead. - gateCheckMode: z.enum(["off", "enabled"]).optional(), reviewCheckMode: z.enum(["required", "visible", "disabled"]), autoProjectMilestoneMatch: z.enum(["off", "suggest", "auto"]).optional(), autoProjectMilestoneMatchBackend: z.enum(["github", "linear"]).optional(), diff --git a/src/signals/registration-readiness.ts b/src/signals/registration-readiness.ts index 42c9416254..7b3f15aac9 100644 --- a/src/signals/registration-readiness.ts +++ b/src/signals/registration-readiness.ts @@ -36,9 +36,6 @@ export type GithubAppBehavior = { commentMode: RepositorySettings["commentMode"]; publicAudienceMode: RepositorySettings["publicAudienceMode"]; checkRunMode: RepositorySettings["checkRunMode"]; - /** @deprecated (#4618, tracked for removal in #5373) computed read-back of {@link reviewCheckMode} kept - * only for API/dashboard back-compat display -- read `reviewCheckMode` instead. */ - gateCheckMode: RepositorySettings["gateCheckMode"]; reviewCheckMode: RepositorySettings["reviewCheckMode"]; quietByDefault: boolean; behavior: string; @@ -132,7 +129,6 @@ function buildGithubAppBehavior(repo: RepositoryRecord | null, settings: Reposit commentMode: settings.commentMode, publicAudienceMode: settings.publicAudienceMode, checkRunMode: settings.checkRunMode, - gateCheckMode: settings.gateCheckMode, reviewCheckMode: settings.reviewCheckMode, quietByDefault, behavior: !installed diff --git a/src/signals/settings-preview.ts b/src/signals/settings-preview.ts index c0bc9546da..ccbd2022c9 100644 --- a/src/signals/settings-preview.ts +++ b/src/signals/settings-preview.ts @@ -191,9 +191,6 @@ export type RepoSettingsPreview = { publicSignalLevel: RepositorySettings["publicSignalLevel"]; checkRunMode: RepositorySettings["checkRunMode"]; checkRunDetailLevel: RepositorySettings["checkRunDetailLevel"]; - /** @deprecated (#4618, tracked for removal in #5373) computed read-back of {@link reviewCheckMode} - * kept only for API/dashboard back-compat display -- read `reviewCheckMode` instead. */ - gateCheckMode: RepositorySettings["gateCheckMode"]; regateSweepOrderMode: RepositorySettings["regateSweepOrderMode"]; reviewCheckMode: RepositorySettings["reviewCheckMode"]; gatePack: RepositorySettings["gatePack"]; @@ -328,7 +325,6 @@ export function buildRepoSettingsPreview(args: { publicSignalLevel: settings.publicSignalLevel, checkRunMode: settings.checkRunMode, checkRunDetailLevel: settings.checkRunDetailLevel, - gateCheckMode: settings.gateCheckMode, regateSweepOrderMode: settings.regateSweepOrderMode, reviewCheckMode: settings.reviewCheckMode, gatePack: settings.gatePack, diff --git a/test/unit/self-dogfood-registration-pack.test.ts b/test/unit/self-dogfood-registration-pack.test.ts index 043ad8e8d4..9515ff46b6 100644 --- a/test/unit/self-dogfood-registration-pack.test.ts +++ b/test/unit/self-dogfood-registration-pack.test.ts @@ -54,7 +54,6 @@ function settingsFor(repoFullName: string, overrides: Partial = {}): commentMode: "all_prs", publicAudienceMode: "oss_maintainer", checkRunMode: "off", - gateCheckMode: "off", reviewCheckMode: "disabled", quietByDefault: false, behavior: "Gittensory would stay silent because the GitHub App is not installed.", @@ -367,7 +365,6 @@ describe("buildSelfDogfoodRegistrationPack", () => { commentMode: "all_prs", publicAudienceMode: "oss_maintainer", checkRunMode: "off", - gateCheckMode: "off", reviewCheckMode: "disabled", quietByDefault: false, behavior: "Gittensory posts comment and label in oss maintainer mode, for all PRs.",