fix(config): reject >3 fuse phases and duplicate site meters - #844
Conversation
ffbad9a to
79bb695
Compare
|
Maintainer review: the validation change is small and the tests cover both failure cases. I am holding the PR rather than rewriting or merging it now because older open PRs #728, #732, #735, #736, and #797 also change go/internal/config/config.go and have file right of way under the repository rules. This branch is also behind current master and has no current check run. Once the older config work is resolved, this is a good candidate to rebase, rerun, and merge as an isolated change. |
miravoss26
left a comment
There was a problem hiding this comment.
Rejects fuse.phases > 3 (previously silently truncated to 3 by the freshness gate while MaxPowerW() kept using the configured value) and rejects a second is_site_meter: true driver (previously the first match silently won). Both are load-time validation errors for configs that were already broken in surprising ways.
- Clean, isolated change. Tests cover all four new branches (1-3 phases accepted, 4 rejected, single/duplicate site meter).
- No secrets, no injection surface, no new deps, no network changes.
Safe to merge from my read.
|
Thank you @Sanjin-Maker. This is a focused fix with a clear failure mode and useful tests, and we want to keep it open. Several older open PRs already own We appreciate this contribution and will keep you included as the blocker clears. |
|
Update to the Aug 8 hold: I rechecked #728, #732, #735, #736, and #797, plus the newer #914/#915, including all reviews and inline threads. #844 only adds two checks in #728 is the only older config PR with current review work; it is behind but mergeable. #732/#735/#736 are conflicted drafts, and #797 is paused with failing Windows CI. #914/#915 are newer and have unresolved P1 threads. I propose giving this narrow safety fix the next rebase-and-CI slot. @HuggeK, please confirm that landing these two checks first will not disrupt your open branches. Once confirmed, @Sanjin-Maker may rebase onto current |
fuse.phases above 3 was silently truncated to 3 by the dispatch freshness gate while MaxPowerW kept multiplying by the configured count, and a second is_site_meter driver was silently ignored in favor of the first. Both misconfigurations now fail at load with a clear message. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Sanjin Naidu <sanjin@sanrowconsulting.com>
79bb695 to
7713d17
Compare
|
Rebased onto current master Head: Local checks passed: @miravoss26 Please give this rebased config-safety change a fresh review when CI is green. There is no CODEOWNER entry for |
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…-looping (#991) A config with two is_site_meter: true drivers crash-looped Core at boot since #844, before the boot-phase HTTP listener binds — the operator loses the very UI they would fix the config with. Field incident 2026-08-29: a driver install on v1.15.0 left two site meters, and the update to v2.3.0 took the box dark until SSH. Parse now keeps the first declared site meter — the same driver older versions silently dispatched against — clears the flag on the rest, and records a LoadWarning that main logs at ERROR so it reaches the log ring and the help report. Validate keeps rejecting the ambiguity, so Settings save and bootstrap stay strict; only a file already on disk is repaired. Closes #988. Claude-Session: https://claude.ai/code/session_01C7xyXX1HYi2i1aax8EsCFx Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Summary
fuse.phases: 4+was accepted and then silently truncated to 3 by the dispatch freshness gate (site_dispatch_safety.go), whileFuse.MaxPowerW()kept multiplying by the configured phase count — the operator believes the extra phases are protected when they aren't. Now rejected atValidate()withfuse.phases must be 1, 2 or 3.is_site_meter: truedriver was silently ignored (SiteMeterDriver()returns the first match) — dispatch could be trusting a different meter than the operator intends. Now rejected with an explicit count in the message.Both are load-time failures for configs that were already broken in surprising ways; the changeset calls this out.
Verification
go test ./internal/config/ -count=1— newvalidate_site_test.gocovers 1–3 phases accepted, 4 rejected, single site meter accepted, duplicate rejected.go build ./..., plus./cmd/ftw/and./internal/control/suites green.🤖 Generated with Claude Code