From c014770cc5d39a45a79c95b5cfbbb3ba2c2749a9 Mon Sep 17 00:00:00 2001 From: JSONbored <49853598+JSONbored@users.noreply.github.com> Date: Sun, 12 Jul 2026 08:30:02 -0700 Subject: [PATCH] fix(config): warn on ambiguous gate.enabled without gate.checkMode (#5355) gate.enabled is a legacy boolean that only controls whether the "Gittensory Orb Review Agent" check-run publishes -- it has no effect on gate evaluation, spend, comments, labels, audit, or autonomous merge/close, and it silently loses to gate.checkMode whenever both are set. This ambiguity caused a real incident: restoring gate.enabled to recover unrelated behavior unexpectedly republished the check-run as a required CI status on all 3 self-hosted repos. Add a parse-time manifest warning whenever gate.enabled is set without an explicit gate.checkMode, so the ambiguity surfaces to a maintainer via the existing private-config-aware /focus-manifest API route instead of silently doing the wrong thing. Fix the one starter template that itself carried the ambiguous pattern, correct the self-contradicting "gate master switch" documentation across the full reference template and both docs pages, and clarify that the legacy "Gittensory Gate" check-run name is intentional upgrade-migration infrastructure, not dead code. --- .gittensory.minimal.yml | 2 +- .gittensory.yml.example | 10 +++++-- .../docs.self-hosting-configuration.tsx | 4 +-- apps/gittensory-ui/src/routes/docs.tuning.tsx | 15 +++++++--- config/examples/gittensory.full.yml | 10 +++++-- config/examples/gittensory.minimal.yml | 2 +- .../gittensory-engine/src/focus-manifest.ts | 24 ++++++++++++++- src/github/app.ts | 3 ++ src/review/check-names.ts | 6 ++++ test/unit/config-templates.test.ts | 9 ++++-- test/unit/focus-manifest-loader.test.ts | 14 +++++++++ test/unit/focus-manifest.test.ts | 30 +++++++++++++++++-- test/unit/selfhost-config-lint.test.ts | 3 +- 13 files changed, 112 insertions(+), 20 deletions(-) diff --git a/.gittensory.minimal.yml b/.gittensory.minimal.yml index 9b6b7baa04..8781ba9d9e 100644 --- a/.gittensory.minimal.yml +++ b/.gittensory.minimal.yml @@ -19,7 +19,7 @@ # - "src/**" gate: - enabled: false + checkMode: disabled settings: autonomy: diff --git a/.gittensory.yml.example b/.gittensory.yml.example index b33803d766..4d2aa12725 100644 --- a/.gittensory.yml.example +++ b/.gittensory.yml.example @@ -107,9 +107,13 @@ publicNotes: # block — the finding can become a hard `Gittensory Gate` blocker # (always confirmed-contributor-gated). gate: - # Gate master switch. Turns the whole deterministic gate on; the per-dimension - # modes below only refine an already-enabled gate. - # Bool. Default: false (gate off). + # Legacy check-run publish switch (#5355) — despite the name, this does NOT turn the deterministic + # gate itself on or off. Gate evaluation, comments, labels, audit records, spend, and autonomous + # merge/close all run identically whether this is true, false, or unset; the per-dimension modes + # below are what actually configure gate evaluation. `enabled` is only a boolean shorthand for + # `checkMode` below: true maps to `required`, false maps to `disabled`, and it cannot express + # `checkMode`'s third state (`visible`). Prefer setting `checkMode` explicitly instead of this field. + # Bool. Default: unset (falls through to `checkMode`, then to the dashboard `reviewCheckMode` setting). enabled: true # Review-CHECK publish mode (#2852) — controls ONLY whether/how the "Gittensory Orb Review Agent" diff --git a/apps/gittensory-ui/src/routes/docs.self-hosting-configuration.tsx b/apps/gittensory-ui/src/routes/docs.self-hosting-configuration.tsx index a77a772954..4a277c5db9 100644 --- a/apps/gittensory-ui/src/routes/docs.self-hosting-configuration.tsx +++ b/apps/gittensory-ui/src/routes/docs.self-hosting-configuration.tsx @@ -411,7 +411,7 @@ GITHUB_METADATA_CACHE_TTL_SECONDS=600`} { title: "Gate activation (DB or private config)", description: - "Whether the Gittensory check-run and deterministic gate rules run for a repo. Stored in the instance database (control panel, PUT /v1/repos/:owner/:repo/settings, or POST …/activation) and/or in gate.checkMode / gate.enabled in .gittensory.yml. The one-click activation endpoint applies advisory-first defaults: gate on, linked-issue/duplicate/quality rules in advisory mode, AI review still off.", + "The one-click POST …/activation endpoint bundles two independent axes into one advisory-first default: the review-check publish mode (reviewCheckMode: required, checkRunMode: enabled) and the actual per-dimension gate rules (linkedIssueGateMode, duplicatePrGateMode, qualityGateMode: all advisory; AI review still off). .gittensory.yml's gate.checkMode / gate.enabled only ever set the first axis (the check-run publish mode) — the dimension rules themselves are configured separately via gate.linkedIssue, gate.duplicates, gate.readiness.mode, etc. (see Tuning your reviews). Gate rule evaluation itself is never gated by checkMode/enabled/checkRunMode; those only control whether/how the check-run publishes on GitHub.", }, { title: "Gittensor registration (is_registered)", @@ -468,7 +468,7 @@ GITTENSORY_REVIEW_REPUTATION=false`}

- The master switch is gate.enabled (off / enabled). - The per-dimension modes refine an already-enabled gate. The main dimensions: + There is no single gate master switch — each dimension below is independently controlled by + its own mode field (most default to off or advisory; see each + dimension's default below). gate.enabled is a legacy, unrelated field: it is + only a boolean shorthand for gate.checkMode (required /{" "} + visible / disabled), which controls solely whether the{" "} + Gittensory Orb Review Agent check-run publishes on GitHub. Neither field turns + gate evaluation, comments, labels, audit, or autonomous merge/close on or off — set the + dimension modes below directly, and set gate.checkMode explicitly instead of + the ambiguous gate.enabled. The main dimensions: