Skip to content

epic: eliminate DB-as-settings-base dual-source ambiguity, make .loopover.yml authoritative #6440

Description

@JSONbored

Problem

Per-repo settings resolve via `resolveEffectiveSettings(dbSettings, manifest, ...)`: the DB row (`repository_settings`) is the base, and `.loopover.yml`'s `settings:`/`gate:` blocks overlay it. This means knowing the true effective value of most settings requires checking both the DB and the config file — which is exactly the ambiguity that caused the live autonomy bug (JSONbored/loopover had no DB row and no manifest override for `autonomy`, so merge/close/approve silently defaulted to `observe` — see #6401, #6402).

A full audit (85 `repository_settings` fields) found:

  • 72 fields already parse from `.loopover.yml`'s `settings:` block and are genuinely applied (zero silent-discard bugs found)
  • 6 more are reachable only via the `gate:` block (parity gap vs. `settings:`, unconfirmed wiring)
  • 3 fields are genuinely fine as DB-only (`repoFullName`, `createdAt`, `updatedAt` — identity/audit metadata, not settings)
  • 1 dead field (`firstTimeContributorGrace`, marked RESERVED/INERT fix(review): gate.firstTimeContributorGrace is documented as softening blockers but is dead/inert #2266 — parsed but never read by the gate evaluator)

Goal

For every config-as-code-eligible field, pick exactly one canonical source — no more DB-base-plus-manifest-overlay merging for the same field. Two buckets:

  1. Manifest-only (the vast majority): drop the DB column, remove the dashboard/API write path, .loopover.yml becomes the sole read AND write path.
  2. DB/dashboard-only, on purpose (small explicit set): agentPaused, agentDryRun, and the system_flags circuit-breakers (holdonly:*/closehold:*) — these are incident kill-switches that must take effect instantly without a PR+CI+merge cycle. No manifest path should exist for these at all, so there's no illusion that setting them in .loopover.yml does anything. Also excluded: BYOK AI keys (secrets, already DB-only).

Already done

  • settings.autonomy added to JSONbored/loopover's .loopover.yml directly (pure config, unblocks the live merge-automation bug immediately) — see the linked PR.

Sub-issues (batches, smallest safe unit per PR)

Each batch PR: (1) backfill each live repo's current effective DB value into that repo's .loopover.yml if not already set, (2) stop reading the DB column in resolveEffectiveSettings for those fields, (3) drop the DB column via migration, (4) remove the fields from the dashboard PUT /v1/repos/:owner/:repo/settings write path, (5) update .loopover.yml.example/config/examples/loopover.full.yml docs, (6) full test coverage.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions