refactor(settings): drop Batch A's 9 config-as-code-only DB columns - #6557
Conversation
Removes commentMode, publicAudienceMode, publicSignalLevel, checkRunMode, checkRunDetailLevel, regateSweepOrderMode, publicSurface, includeMaintainerAuthors, and backfillEnabled from repository_settings entirely (migration 0158) -- resolveEffectiveSettings's existing manifest-over-DB spread needed zero changes, since dbSettings itself now just returns the same built-in default for these fields unconditionally, collapsing the merge to "manifest override, else built-in default": pure config-as-code, no dual-source ambiguity. badgeEnabled/publicQualityMetrics are deliberately excluded and stay DB-only forever: loadPublicRepoBadge/loadPublicRepoQualityMetrics (src/api/routes.ts) read them via a direct getRepositorySettings call that bypasses the manifest overlay entirely, a documented perf tradeoff for two unauthenticated, high-frequency public routes. Also: - Removes the 9 fields from repositorySettingsSchema/maintainerSettingsSchema and the internal/maintainer settings write paths (silent no-op on input). - Switches GET /v1/repos/:owner/:repo/settings to resolveRepositorySettings (was the raw DB row, which would otherwise always show the hardcoded default regardless of a repo's real .loopover.yml). - Overlays the true effective value for just these 9 fields onto the registration-readiness / gittensor-config-recommendation "DB vs yml" advisory builders, preserving their #2912 comparison intent for every other still-DB-backed field. - Drops checkRunMode from the one-click "enable advisory mode" activation patch (writing it is now a no-op) with a comment on why. - Updates the maintainer dashboard UI (removes 7 dead form fields/editable keys) and the affected tests. Part of #6440, part of #6442
Bundle ReportChanges will decrease total bundle size by 4.15kB (-0.06%) ⬇️. 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 #6557 +/- ##
=======================================
Coverage 93.60% 93.60%
=======================================
Files 675 675
Lines 67742 67728 -14
Branches 18618 18602 -16
=======================================
- Hits 63409 63397 -12
Misses 3360 3360
+ Partials 973 971 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…ponse Its recommended-settings patch no longer sets checkRunMode (#6442), so echoing updated.checkRunMode here would always report the hardcoded default regardless of what the activation actually did.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-16 14:24:00 UTC
Review summary Nits — 5 non-blocking
Concerns raised — review before merging
📋 Copy for AI agents — paste into your coding agentDecision drivers
Context & advisory signals — never blocks the verdict
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy · Diff highlights exactly what changed. 🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Batch A (JSONbored#6442, merged as JSONbored#6557) deliberately excluded these two fields because loadPublicRepoBadge/loadPublicRepoQualityMetrics read them via a raw getRepositorySettings call that bypasses the manifest overlay -- a perf tradeoff for two unauthenticated, high-frequency public routes. Per maintainer direction, finish the migration instead: both routes now read resolveRepositorySettings, accepting the manifest-cache lookup (and occasional cold-cache GitHub fetch) so .loopover.yml is honored here like every other settings.* field. Drops the two columns (migration 0158), removes them from the dashboard/ internal write paths and the maintainer settings panel, and updates the tests that seeded them via the DB to seed the focus manifest instead. Each live repo's current effective value (false) was already backfilled into its private .loopover.yml config before this drop. Part of JSONbored#6442, epic JSONbored#6440.



Summary
Batch A Phase 2 (#6442, epic #6440): drops the 9 fields confirmed safe to migrate off
repository_settingsentirely --commentMode,publicAudienceMode,publicSignalLevel,checkRunMode,checkRunDetailLevel,regateSweepOrderMode,publicSurface,includeMaintainerAuthors,backfillEnabled(migration 0158).resolveEffectiveSettingsneeded zero changes: its existing{...dbSettings, ...manifestSettings}spread already overlays manifest over DB unconditionally. OncedbSettingsitself just returns the same built-in default for these fields (no real column to read), the merge collapses to "manifest override, else built-in default" -- genuine config-as-code, no dual-source ambiguity.Deliberately excluded, stay DB-only forever:
badgeEnabled/publicQualityMetrics.loadPublicRepoBadge/loadPublicRepoQualityMetrics(src/api/routes.ts) read them via a directgetRepositorySettingscall that bypasses the manifest overlay entirely -- a documented perf tradeoff for two unauthenticated, high-frequency public routes (no manifest-cache lookup, no possible cold-cache GitHub fetch, on every image/API load).Changes
src/db/schema.ts+ a real migration; removes their read/write/default-fill logic fromsrc/db/repositories.tsand the now-deadparseXhelpers.repositorySettingsSchema/maintainerSettingsSchemaand the internal/maintainer settings write paths (a caller-supplied value is now a silent no-op, since there's nothing left to persist it to).GET /v1/repos/:owner/:repo/settingstoresolveRepositorySettings(was the raw DB row, which would otherwise always show the hardcoded default regardless of a repo's real.loopover.yml).checkRunModefrom the one-click "enable advisory mode" activation patch (writing it is now a no-op), with a comment explaining why.Scope
wantedPathsapps/loopover-ui/public/openapi.json0158_drop_batch_a_config_as_code_columns.sql, next contiguous numberValidation
npm run test:ci(full local gate, green)npm run typecheck(backend + UI, clean)npm run ui:test(292/292 passed)npm audit --audit-level=moderate(0 vulnerabilities)src/api/routes.ts,src/db/repositories.ts,src/db/schema.ts,src/services/maintainer-activation.ts(cross-referencedcoverage/lcov.infoagainst the diff)