Skip to content

chore(review): deprecate gateCheckMode as a computed read-back value (#4618) - #4749

Merged
JSONbored merged 1 commit into
mainfrom
chore/4618-deprecate-gate-check-mode
Jul 10, 2026
Merged

chore(review): deprecate gateCheckMode as a computed read-back value (#4618)#4749
JSONbored merged 1 commit into
mainfrom
chore/4618-deprecate-gate-check-mode

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Part of #4618's item 2 (config-surface-reduction epic). gateCheckMode was a legacy shadow of reviewCheckMode (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 yml gate: resolver.

  • gateCheckMode is dropped from every write schema (maintainer dashboard PUT, internal full-replace POST) and is no longer an accepted upsertRepositorySettings input.
  • On every read (DB row mapping, yml gate: block resolution), gateCheckMode is now always recomputed from reviewCheckMode"enabled" when reviewCheckMode !== "disabled", else "off".
  • The yml settings.gateCheckMode key still parses for back-compat with existing .gittensory.yml files, but now derives reviewCheckMode from it (the historical effect), rather than the old reverse direction.
  • 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 (showing "off" while the check was actually publishing, or vice versa).
  • The maintainer dashboard's "Review agent check" toggle now writes reviewCheckMode directly instead of the deprecated field (same off/enabled UX, real field underneath).
  • Refreshed README/CONTRIBUTING/docs references that described gateCheckMode as the "master switch".

No DB migration: the gate_check_mode column is left in place (still written, now always self-consistent with reviewCheckMode) since nothing reads it independently anymore.

Test plan

  • npx tsc --noEmit (root + apps/gittensory-ui) — clean
  • Full unit + integration suite: 685 files / 13,635 tests passing
  • npm run test:coverage (unsharded) — zero uncovered statements/branches in any changed line range across src/db/repositories.ts, src/api/routes.ts, src/services/maintainer-activation.ts, src/signals/focus-manifest.ts
  • npm 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 pass
  • npm run ui:lint (0 errors) + npm audit --audit-level=moderate (0 vulnerabilities)

…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.
@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 2a5d82b Commit Preview URL

Branch Preview URL
Jul 10 2026, 10:22 PM

@JSONbored JSONbored self-assigned this Jul 10, 2026
@JSONbored
JSONbored merged commit 327aefb into main Jul 10, 2026
9 checks passed
@JSONbored
JSONbored deleted the chore/4618-deprecate-gate-check-mode branch July 10, 2026 22:23
@JSONbored JSONbored linked an issue Jul 10, 2026 that may be closed by this pull request
4 tasks
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.21%. Comparing base (12147aa) to head (2a5d82b).
⚠️ Report is 6 commits behind head on main.
✅ All tests successful. No failed tests found.

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     
Files with missing lines Coverage Δ
packages/gittensory-engine/src/focus-manifest.ts 99.11% <100.00%> (+<0.01%) ⬆️
src/api/routes.ts 94.25% <ø> (-0.01%) ⬇️
src/db/repositories.ts 96.72% <100.00%> (ø)
src/services/maintainer-activation.ts 100.00% <ø> (ø)
src/signals/focus-manifest.ts 99.64% <100.00%> (ø)
src/types.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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reduce redundant config surface: linked-issue knob, gateCheckMode, label fields

1 participant