Skip to content

feat!: remove the gateCheckMode field from RepositorySettings entirely - #5459

Merged
JSONbored merged 1 commit into
mainfrom
chore/gatecheckmode-final-removal-stage2-9
Jul 12, 2026
Merged

feat!: remove the gateCheckMode field from RepositorySettings entirely#5459
JSONbored merged 1 commit into
mainfrom
chore/gatecheckmode-final-removal-stage2-9

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Final stage of #5373's staged removal plan. gateCheckMode is gone from RepositorySettings (src/types.ts), its canonical derivation site (applyGateConfigOverrides in src/signals/focus-manifest.ts), the DB layer's default/read population (src/db/repositories.ts), and the last OpenAPI schema occurrence (RepositorySettingsSchema) -- the field no longer exists anywhere in the main app's type system.

All prior stages already merged (internal passthroughs #5440, the DB column #5446, registration-readiness/settings-preview responses #5454, the maintainer-activation surface #5455), so this lands the field's last remaining uses. Going forward it can only ever exist as raw JSON request-body noise (silently ignored, same as any other unknown key) or inside gittensory-engine's own separate .gittensory.yml back-compat parser (packages/gittensory-engine/**, deliberately untouched -- a distinct, published npm package with its own removal timeline, tracked as the final #5373 stage).

Updates every test that read/wrote the field directly:

  • Deletes the now-compile-time-impossible "gateCheckMode is a no-op write input" assertions (repository-settings-review-check-mode.test.ts, gate-check-policy.test.ts) -- the type system enforces this more strongly than a runtime test ever could.
  • Replaces "unrelated settings preserved" checks with the real reviewCheckMode value (routes-ai-byok.test.ts, integration/api.test.ts).
  • Updates stale comments referencing a field that no longer exists.

This is an atomic, must-land-together change (removing the field breaks every remaining reference at once) -- cannot be split further without a temporary compatibility shim, consistent with this repo's own precedent for a comparable mechanical field removal (#4012, 27 files in one shot).

Test plan

  • npm run typecheck
  • npm run ui:typecheck
  • npm run docs:drift-check (103 RepositorySettings fields, down from 104)
  • npm run ui:openapi:settings-parity
  • Directly edited test files: focus-manifest.test.ts, gate-check-policy.test.ts, maintainer-activation.test.ts, repository-settings-review-check-mode.test.ts, routes-ai-byok.test.ts, queue-4.test.ts -- 878/878
  • integration/api.test.ts, integration/maintainer-activation.test.ts -- 53/53
  • Broader regression sweep (backfill, queue/queue-2/queue-3/queue-5, queue-lifecycle-guards, registration-readiness, settings-preview, self-dogfood-registration-pack, signals-coverage) -- 1131/1131
  • Repo-wide grep confirms zero remaining gateCheckMode references outside packages/gittensory-engine/** (its own separate, intentionally-untouched copy) and inert request-body/comment mentions

#5373)

Final stage of the #5373 staged removal: gateCheckMode is gone from
RepositorySettings (src/types.ts), its canonical derivation site
(applyGateConfigOverrides in src/signals/focus-manifest.ts), the DB
layer's default/read population (src/db/repositories.ts), and the
last OpenAPI schema occurrence (RepositorySettingsSchema) -- the
field no longer exists anywhere in the main app's type system. All
prior stages (internal passthroughs, the DB column, registration-
readiness/settings-preview responses, the maintainer-activation
surface) already merged, so this lands the field's last remaining
uses: it can now only ever exist as raw JSON request-body noise
(silently ignored, same as any other unknown key) or as the
gittensory-engine package's own separate .gittensory.yml back-compat
parser (packages/gittensory-engine/**, untouched -- a distinct,
published npm package with its own removal timeline).

Updates every test that read/wrote the field directly: deletes the
now-compile-time-impossible "gateCheckMode is a no-op write input"
assertions (repository-settings-review-check-mode.test.ts,
gate-check-policy.test.ts), replaces "unrelated settings preserved"
checks with the real reviewCheckMode value (routes-ai-byok.test.ts,
integration/api.test.ts), and updates stale comments referencing a
field that no longer exists. This is an atomic, must-land-together
change (removing the field breaks every remaining reference at once)
-- cannot be split further without a temporary compatibility shim.
@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 538f59a Commit Preview URL

Branch Preview URL
Jul 12 2026, 08:26 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.44%. Comparing base (4e9ce1a) to head (538f59a).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5459      +/-   ##
==========================================
- Coverage   94.48%   94.44%   -0.04%     
==========================================
  Files         554      554              
  Lines       44453    44451       -2     
  Branches    14662    14660       -2     
==========================================
- Hits        42002    41983      -19     
- Misses       1776     1793      +17     
  Partials      675      675              
Flag Coverage Δ
shard-1 43.85% <ø> (-0.25%) ⬇️
shard-2 35.05% <ø> (+0.10%) ⬆️
shard-3 32.03% <ø> (+0.02%) ⬆️
shard-4 30.95% <ø> (-0.75%) ⬇️
shard-5 33.18% <ø> (+0.45%) ⬆️
shard-6 43.76% <ø> (+0.20%) ⬆️

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

Files with missing lines Coverage Δ
src/api/routes.ts 94.30% <ø> (ø)
src/db/repositories.ts 96.69% <ø> (-0.01%) ⬇️
src/openapi/schemas.ts 100.00% <ø> (ø)
src/review/repo-profile.ts 100.00% <ø> (ø)
src/signals/focus-manifest.ts 99.64% <ø> (-0.01%) ⬇️
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.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 12, 2026
@loopover-orb

loopover-orb Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-12 20:31:55 UTC

15 files · 2 AI reviewers · 2 blockers · readiness 93/100 · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
This is a clean, final-stage mechanical removal of the deprecated gateCheckMode field from RepositorySettings, its type definition, DB read/default population, OpenAPI schemas, and every test that referenced it -- consistent with the staged plan across prior PRs (#5440, #5446, #5454, #5455). The removal is atomic and consistent: type, DB layer, OpenAPI schema, and gate-config derivation are all updated together, and tests are correctly rewritten to assert on reviewCheckMode instead of the removed field rather than being deleted wholesale. CI passing (typecheck, docs:drift-check showing 104->103 fields) corroborates the field is fully gone from the type system with no dangling references.

Nits — 5 non-blocking
  • src/review/repo-profile.ts:62 embeds the bare issue number 5373 in a doc comment; a named constant isn't necessary here but consider a consistent `#NNNN` citation style across the touched comments (already mostly followed).
  • The engine's own `.gittensory.yml` gateCheckMode back-compat parser (packages/gittensory-engine) is explicitly left untouched per the description -- worth double-checking that a follow-up issue is tracked for its removal timeline since this PR's title says 'entirely' but a back-compat parser still exists at that layer.
  • Consider a brief CHANGELOG or migration note pointing self-host operators using the raw .gittensory.yml gateCheckMode key to reviewCheckMode, since this PR removes the main app's last derivation of it.
  • No action needed on openapi.json beyond what's shown -- confirm `ui:openapi:settin...` regen step referenced in the truncated test plan was actually run (docs:drift-check passing suggests yes).
  • nit: `test/unit/focus-manifest.test.ts` still builds partial `RepositorySettings` objects via `as unknown as RepositorySettings`; consider using the local settings fixture pattern from `test/unit/gate-check-policy.test.ts` so future required-field removals/additions are not hidden by casts.

Concerns raised — review before merging

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.
📋 Copy for AI agents — paste into your coding agent
Fix the following blocker(s) from this PR review:

1. No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.

2. Maintainer requires a linked issue — Link the relevant issue (for example `Closes #123`) before opening the PR.
Signal Result Evidence
Code review ❌ 2 blockers 2 reviewers, synthesized
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (no linked issue context).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 44 registered-repo PR(s), 36 merged, 435 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 44 PR(s), 435 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
Improvement ✅ Minor risk: clean · value: minor — Code changes are accompanied by test evidence. LLM value judgment: moderate — This completes a well-scoped, previously-planned multi-stage field removal that reduces API/type surface and dead derivation logic without touching unrelated code.
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 44 PR(s), 435 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Explain no-issue PR.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
[BETA] Chat with Gittensory

Ask Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @gittensory ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @gittensory chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @gittensory mention with a real question is routed to the closest matching read-only command automatically -- no exact syntax required.

Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/ desktop before / after /
/ mobile before / (mobile) after / (mobile)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 12, 2026
@JSONbored
JSONbored merged commit 7a1051c into main Jul 12, 2026
19 checks passed
@JSONbored
JSONbored deleted the chore/gatecheckmode-final-removal-stage2-9 branch July 12, 2026 20:33
JSONbored added a commit that referenced this pull request Jul 12, 2026
…pat parsing (#5373) (#5463)

Final stage of the gateCheckMode removal (stage 2.10/2.10): the
RepositorySettings field itself was removed in #5459, but
@jsonbored/gittensory-engine's own .gittensory.yml parser still
recognized a bare settings.gateCheckMode key and derived
reviewCheckMode from it for back-compat. Remove that derivation,
the FocusManifestSettings type entry, and the deprecated field on
manifest-deps-types.ts's RepositorySettings mirror.

settings.gateCheckMode is now an unrecognized key: it parses into
nothing and derives nothing. settings.reviewCheckMode remains the
sole, unambiguous publish-authority key.

Blast radius: parseFocusManifest/parseFocusManifestContent are the
only public exports touched. @jsonbored/gittensory-mcp doesn't
reference this code path at all; @jsonbored/gittensory-miner calls
parseFocusManifestContent but never reads gateCheckMode/
reviewCheckMode from the result, and isn't itself published to npm.
publish-engine.yml is workflow_dispatch-only, so merging this does
not itself publish anything. The package.json version is already
1.0.0 (#4686, merged, not yet published -- npm still serves 0.2.0)
-- bundling this breaking removal into that not-yet-shipped 1.0.0
is the right time to shed this back-compat parsing before the
package commits to a stable surface, rather than requiring a
separate future major bump for the same change.

Also drops a now-dead SETTINGS_ALIAS_MANIFEST row in
check-docs-drift.mjs left over from the RepositorySettings-level
removal in #5459 (gateCheckMode is no longer iterated as a field to
alias-check at all).
This was referenced Jul 13, 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. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stage and remove the derived-only gateCheckMode field (naming sprawl, #5355 follow-up)

1 participant