Skip to content

fix(config): warn on ambiguous gate.enabled without gate.checkMode#5375

Merged
JSONbored merged 1 commit into
mainfrom
fix/gate-enabled-checkmode-ambiguity
Jul 12, 2026
Merged

fix(config): warn on ambiguous gate.enabled without gate.checkMode#5375
JSONbored merged 1 commit into
mainfrom
fix/gate-enabled-checkmode-ambiguity

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • gate.enabled is a legacy boolean shorthand for gate.checkMode (truerequired, falsedisabled) that controls only whether the "Gittensory Orb Review Agent" check-run publishes to GitHub -- it has zero effect on gate evaluation, spend, comments, labels, audit, or autonomous merge/close, and it silently loses to gate.checkMode whenever both are set. This exact ambiguity caused a real incident: restoring gate.enabled: true on 2026-07-09 to recover unrelated behavior unexpectedly republished the check-run as a required CI status across all 3 self-hosted repos.
  • Adds a parse-time manifest warning whenever gate.enabled is set without an explicit gate.checkMode, so this reaches a maintainer through the existing private-config-aware GET /v1/repos/:owner/:repo/focus-manifest API route instead of silently doing the wrong thing again.
  • Fixes the one starter template (gittensory.minimal.yml, both copies) that itself carried the ambiguous pattern, and corrects the self-contradicting "gate master switch" documentation in the full reference template and both docs.tuning / docs.self-hosting-configuration pages.
  • Documents that the legacy "Gittensory Gate" check-run name is intentional upgrade-migration infrastructure (finalizes any pre-rename check-run still pending for a self-hoster upgrading mid-flight), not dead code.

Fixes #5355.

Test plan

  • npm run typecheck
  • npm run docs:drift-check
  • npm run ui:typecheck
  • npm run ui:lint
  • New unit tests: focus-manifest.test.ts (warning fires only when checkMode is absent, regardless of enabled's value; does not fire when paired or when both are unset)
  • New unit test: focus-manifest-loader.test.ts (the warning survives the private-config loader path end to end, proving delivery via the maintainer-gated API route)
  • Updated fixtures: config-templates.test.ts, selfhost-config-lint.test.ts (stale ambiguous-pattern fixtures now pair checkMode explicitly)
  • Full local gate (npm run test:ci) green, twice, aside from two transient timeout flakes under local CPU contention from a concurrent sibling-worktree run (unrelated tests, both reproduce as passing cleanly in isolation)

…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.
@superagent-security

Copy link
Copy Markdown
Contributor

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

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui c014770 Commit Preview URL

Branch Preview URL
Jul 12 2026, 03:31 PM

@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.37%. Comparing base (a0639fd) to head (c014770).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5375      +/-   ##
==========================================
- Coverage   94.41%   94.37%   -0.04%     
==========================================
  Files         551      551              
  Lines       44168    44170       +2     
  Branches    14632    14633       +1     
==========================================
- Hits        41702    41687      -15     
- Misses       1791     1808      +17     
  Partials      675      675              
Flag Coverage Δ
shard-1 44.02% <100.00%> (-0.12%) ⬇️
shard-2 34.67% <100.00%> (+0.12%) ⬆️
shard-3 31.97% <100.00%> (+0.42%) ⬆️
shard-4 31.13% <0.00%> (-0.15%) ⬇️
shard-5 33.23% <100.00%> (-0.09%) ⬇️
shard-6 43.35% <100.00%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/gittensory-engine/src/focus-manifest.ts 99.19% <100.00%> (+<0.01%) ⬆️
src/github/app.ts 97.89% <ø> (ø)
src/review/check-names.ts 100.00% <ø> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored JSONbored self-assigned this Jul 12, 2026
@JSONbored
JSONbored merged commit af05e48 into main Jul 12, 2026
20 checks passed
@JSONbored
JSONbored deleted the fix/gate-enabled-checkmode-ambiguity branch July 12, 2026 15:34
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 12, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix gate.enabled/gate.checkMode ambiguity at the code level (root cause of the Orb Review Agent check-run incident)

1 participant