chore(review): deprecate gateCheckMode as a computed read-back value (#4618) - #4749
Merged
Merged
Conversation
…4618) gateCheckMode was a legacy shadow of reviewCheckMode (the actual check-run publish authority) kept alive only by dual-write sync code scattered across the DB layer, both settings-write API schemas, and the yml gate-config resolver. Reduce redundant config surface by making gateCheckMode a derived, read-only field everywhere: dropped from every write schema (maintainer dashboard PUT, internal full-replace POST), no longer an accepted upsertRepositorySettings input, and always recomputed from reviewCheckMode on read (DB row mapping, yml gate: block resolution, and the settings.gateCheckMode legacy yml key, which still parses for back-compat but now derives reviewCheckMode rather than the reverse). Also fixes a related latent bug: the yml gate: block only re-derived gateCheckMode when gate.enabled was set, so a manifest setting ONLY gate.checkMode could leave the back-compat display field silently stale. Updates the maintainer dashboard's "Review agent check" toggle to write reviewCheckMode directly instead of the deprecated field, and refreshes docs/README/CONTRIBUTING references accordingly.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 2a5d82b | Commit Preview URL Branch Preview URL |
Jul 10 2026, 10:22 PM |
4 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4749 +/- ##
==========================================
- Coverage 94.22% 94.21% -0.01%
==========================================
Files 439 439
Lines 38704 38702 -2
Branches 14100 14098 -2
==========================================
- Hits 36468 36464 -4
- Misses 1576 1577 +1
- Partials 660 661 +1
🚀 New features to boost your workflow:
|
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
Part of #4618's item 2 (config-surface-reduction epic).
gateCheckModewas a legacy shadow ofreviewCheckMode(the actual check-run publish authority), kept in sync only by dual-write logic scattered across the DB layer, both settings-write API schemas, and the ymlgate:resolver.gateCheckModeis dropped from every write schema (maintainer dashboardPUT, internal full-replacePOST) and is no longer an acceptedupsertRepositorySettingsinput.gate:block resolution),gateCheckModeis now always recomputed fromreviewCheckMode—"enabled"whenreviewCheckMode !== "disabled", else"off".settings.gateCheckModekey still parses for back-compat with existing.gittensory.ymlfiles, but now derivesreviewCheckModefrom it (the historical effect), rather than the old reverse direction.gate:block only re-derivedgateCheckModewhengate.enabledwas set, so a manifest setting ONLYgate.checkModecould leave the back-compat display field silently stale (showing"off"while the check was actually publishing, or vice versa).reviewCheckModedirectly instead of the deprecated field (same off/enabled UX, real field underneath).gateCheckModeas the "master switch".No DB migration: the
gate_check_modecolumn is left in place (still written, now always self-consistent withreviewCheckMode) since nothing reads it independently anymore.Test plan
npx tsc --noEmit(root +apps/gittensory-ui) — cleannpm run test:coverage(unsharded) — zero uncovered statements/branches in any changed line range acrosssrc/db/repositories.ts,src/api/routes.ts,src/services/maintainer-activation.ts,src/signals/focus-manifest.tsnpm run engine-parity:drift-check,npm run ui:openapi:check,npm run ui:openapi:settings-parity,npm run docs:drift-check,npm run manifest:drift-check— all passnpm run ui:lint(0 errors) +npm audit --audit-level=moderate(0 vulnerabilities)