refactor(settings): drop 19 contributor-cap/review-nag/rate-limit config-as-code-only DB columns - #6699
Merged
Merged
Conversation
…fig-as-code-only DB columns autoMaintain, contributorOpenPrCap, contributorOpenIssueCap, contributorCapLabel, contributorCapCancelCi, reviewNagPolicy, reviewNagMaxPings, reviewNagCooldownDays, reviewNagLabel, reviewNagMonitoredMentions, autoCloseExemptLogins, accountAgeThresholdDays, newAccountLabel, commandRateLimitPolicy, commandRateLimitMaxPerWindow, commandRateLimitAiMaxPerWindow, commandRateLimitWindowHours, autoProjectMilestoneMatch, and autoProjectMilestoneMatchBackend already resolved correctly from .loopover.yml's settings: block; the repository_settings DB columns were a redundant second source of truth resolveEffectiveSettings's manifest overlay already fully shadowed. Drops the columns (migration 0160), makes getRepositorySettings/upsertRepositorySettings treat them as fixed built-in defaults, and removes autoMaintain (the only one of the 19 with a dashboard write path) from maintainerSettingsSchema and the maintainer settings panel. None of the 19 fields are consumed by the registration-readiness or gittensor-config-recommendation advisory endpoints, so CONFIG_AS_CODE_ONLY_FIELDS needed no extension this time (unlike the prior Batch B migration). Closes #6445, part of epic #6440.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
loopover-ui | 3acc512 | Commit Preview URL Branch Preview URL |
Jul 16 2026, 07:16 PM |
Bundle ReportChanges will decrease total bundle size by 980 bytes (-0.01%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: loopover-uiAssets Changed:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6699 +/- ##
==========================================
- Coverage 93.65% 93.65% -0.01%
==========================================
Files 681 681
Lines 68114 68098 -16
Branches 18706 18695 -11
==========================================
- Hits 63791 63775 -16
Misses 3347 3347
Partials 976 976
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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
autoMaintain,contributorOpenPrCap,contributorOpenIssueCap,contributorCapLabel,contributorCapCancelCi,reviewNagPolicy,reviewNagMaxPings,reviewNagCooldownDays,reviewNagLabel,reviewNagMonitoredMentions,autoCloseExemptLogins,accountAgeThresholdDays,newAccountLabel,commandRateLimitPolicy,commandRateLimitMaxPerWindow,commandRateLimitAiMaxPerWindow,commandRateLimitWindowHours,autoProjectMilestoneMatch, andautoProjectMilestoneMatchBackendfromrepository_settings(migration 0160) — all 19 already resolved correctly from.loopover.yml'ssettings:block viaresolveEffectiveSettings's manifest overlay, making the DB column a redundant, never-authoritative second source of truth.getRepositorySettings/upsertRepositorySettingsnow treat these as fixed built-in defaults (a caller-supplied value on upsert is a silent no-op, matching the prior Batch A/B precedent from config-as-code: migrate comment/audience/public-surface settings off the DB #6442/config-as-code: migrate label/moderation/review-evasion settings off the DB #6443); removesautoMaintain— the only one of the 19 with a dashboard write path — frommaintainerSettingsSchemaand the maintainer settings panel's "Approvals before auto-merge"/"Merge method" controls.buildRegistrationReadinessResponse/buildGittensorConfigRecommendationResponse, soCONFIG_AS_CODE_ONLY_FIELDSneeded no extension this time (unlike the prior Batch B migration, where I found and fixed a real regression there).resolveEffectiveSettingsneeded no special-casing — they already overlay correctly via the generic{...dbSettings, ...restManifestSettings}spread, the same wayautoMaintain/commandAuthorizationalready did before this PR.Closes #6445, part of epic #6440.
Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.md.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally — 100% patch coverage confirmed by hand-checking every added line insrc/api/routes.tsandsrc/db/repositories.tsagainstcoverage/lcov.info(zero 0-hit lines in the diff).npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderate— not run (no dependency changes in this PR).repository-settings-project-milestone-match.test.ts, plus large blocks ofdata-spine.test.ts) to instead verify (a)getRepositorySettingsignores a caller-supplied override and (b)resolveRepositorySettingshonors a.loopover.ymlmanifest override — including a genuine behavior-change regression test (reviewNagCooldownDaysabove the 365-day ceiling is now rejected by the manifest parser, not clamped down to 365 the way the old DB-layer normalizer did). Fixed the resulting fixture/setup breakage acrossqueue-3.test.ts,queue-5.test.ts,queue-lifecycle-guards.test.ts,agent-approval-queue.test.ts,maintainer-activation.test.ts, andtest/integration/api.test.ts.Full local
npm run test:cipassed completely clean end-to-end once (pre-rebase). After rebasing onto amainthat had moved forward with two more concurrent PRs in this same area, I re-verified withtest:changed(100% clean), a fresh unshardedtest:coveragerun (100% clean, patch coverage re-confirmed), and two more fulltest:ciattempts — both showed 100% of my actually-relevant tests green, with only isolated timeouts in unrelated real-subprocess/filesystem tests (ai-summaries.test.ts,miner-attempt-worktree.test.ts,agent-sdk-driver.test.ts,miner-repo-clone.test.ts— different files each run), which I confirmed pass cleanly and quickly in isolation. This is consistent with local machine load from running the gate repeatedly this session, not a regression in this diff — flagging honestly rather than claiming a fully green final run.Safety
ui:openapi:settings-parity: RepositorySettingsSchema still matches the 111-field RepositorySettings type — only the DB source moved, the type didn't).Notes
mainthat had picked up two more concurrent PRs in this exact area: a "Batch C" (config-as-code: migrate gate/quality/AI-review mode settings off the DB (settings: + gate: dedup) #6444) test-prep commit that also touchedqueue-3.test.ts(addedaiReviewMode/reviewCheckModemanifest injections to several of the same test cases my Batch D changes touched) and a separate PR dropping thebadgeEnabled/publicQualityMetricsDB columns (bumping this PR's migration from 0159 to 0160 after a collision). Resolved the resulting real 3-way merge conflict inqueue-3.test.tsby unioning both migrations' field-moves at each affected call site, then verified with a full typecheck + test run of that file (142/142 passing) before committing.