Skip to content

feat(selfhost): make global .loopover.yml a real base layer; migrate duplicateWinnerMode off env var #6276

Description

@JSONbored

Summary

Part of #6275 (Phase 1, the proof-of-pattern case). Two changes, same PR:

  1. Make the global .loopover.yml (config-dir root) a genuine base layer: today's loader
    (src/selfhost/private-config.ts) treats it as a fallback candidate only, tried after every
    per-repo candidate path and used only when NONE of them exist. Since every currently-configured
    repo already has its own per-repo file, the global file is never actually consulted for any of
    them. It needs to become a real base layer that a per-repo inherit value defers to.
  2. Migrate duplicateWinnerMode's "inherit" resolution off LOOPOVER_DUPLICATE_WINNER
    (src/settings/duplicate-winner-mode.ts) so it reads the global .loopover.yml's own
    settings.duplicateWinnerMode value first, falling back to the env var only when the global yml
    doesn't specify it either.

Why

PRs #6248/#6249 both linked the same issue; #6248 (created first) should have survived as the
duplicate-cluster winner (#dup-winner) but was auto-closed identically to #6249, because the
winner-adjudication feature was off fleet-wide — controllable only via an env var in .env, with no
way to turn it on from .loopover.yml at all (global or per-repo inherit).

Requirements

  • No behavior change for any existing repo config unless the global .loopover.yml is explicitly
    edited to add settings.duplicateWinnerMode.
  • A per-repo duplicateWinnerMode: off or duplicateWinnerMode: enabled override still wins over
    whatever the global yml says (per-repo always outranks global, matching every other config-as-code
    field's precedence in this codebase).
  • LOOPOVER_DUPLICATE_WINNER keeps working as the final fallback when NEITHER the global yml nor the
    per-repo yml specifies a value — this is additive, not a breaking change to the env var.

Metadata

Metadata

Assignees

Labels

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

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions