chore(config): retire ReplicationEnabled, make legacy db paths migration-only

LocalDb Phase 2 deleted the bespoke replicators, so three config keys changed
meaning or died outright:

- ScadaBridge:StoreAndForward:ReplicationEnabled is fully dead. Deleted the
  property, its 10 config entries, and the 5 test references.
- SqliteDbPath / SiteDbPath are now migration-only: they name the legacy files
  SiteLocalDbLegacyMigrator drains at boot, not live databases. Both mandatory
  rules are relaxed accordingly (StartupValidator's Site-only Require, and the
  S&F validator's non-empty rule) — an absent value now means "nothing to
  migrate", so an already-migrated node can drop the key. DatabaseOptions-
  Validator still rejects a present-but-blank value.
- SiteRuntime:ConfigFetchRetryCount's only reader was SiteReplicationActor.
  Deleted with its validator rule.

The two path keys stay present in every config, now with a comment explaining
why: removing them would strand un-migrated data on a node that has not yet
started once.

Both relaxations are pinned by the inverse of the test they replace
(Site_MissingSiteDbPath_IsAccepted..., EmptySqliteDbPath_IsAccepted...), each
verified to fail with the old rule restored.

Note: deploy/wonder-app-vd03/appsettings.Site.json is under a gitignored
deploy/ tree, so its edit is local-only and must be repeated on the box.

Claude-Session: https://claude.ai/code/session_01BL2Vu1ESDQ9SCN4gVKkdts
This commit is contained in:
Joseph Doherty
2026-07-20 04:35:11 -04:00
parent 3364145d63
commit 605e56829e
19 changed files with 126 additions and 57 deletions
@@ -39,13 +39,20 @@ public class StoreAndForwardOptionsValidatorTests
Assert.Contains("RetryTimerInterval", result.FailureMessage);
}
/// <summary>
/// The inverse of the rule this replaces. Before LocalDb Phase 2 an empty
/// SqliteDbPath was rejected, because it was the live buffer file and an empty
/// value failed opaquely at first enqueue. The buffer now lives in the
/// consolidated LocalDb database, so the key is only the legacy migration
/// source and an empty value legitimately means "nothing to migrate" — a node
/// that has already migrated must be able to drop it.
/// </summary>
[Fact]
public void EmptySqliteDbPath_IsRejected()
public void EmptySqliteDbPath_IsAccepted_BecauseThePathIsMigrationOnly()
{
var result = Validate(new StoreAndForwardOptions { SqliteDbPath = "" });
Assert.True(result.Failed);
Assert.Contains("SqliteDbPath", result.FailureMessage);
Assert.False(result.Failed);
}
// ── R2 T9: sweep-tuning eager validation (N4) ──