refactor(runtime): delete the dead in-place ApplyDelta seam; config change = respawn only (#665)
Since #516 a DriverConfig change is stop + respawn, so DriverSpawnPlan.ToApplyDelta was always empty and the in-place path had no producer. #663 and #664 were both latent bugs in it. This deletes it: - host: ApplyChildDelta, _pendingDelta, HandleApplyResult and HandleDeltaApplied - plan: DriverSpawnPlan.ToApplyDelta - actor: the ApplyDelta, ApplyResult and DeltaApplied messages, the Connected reinit handler and the mid-connect AdoptConfigDuringInit - tests: the actor tests that drove the seam IDriver.ReinitializeAsync and each driver's implementation and unit tests stay. Comments and docs that cited AdoptConfigDuringInit as the reason a driver must release prior state at init now cite the IDriver contract and overlapping retries, which still apply. Claude-Session: https://claude.ai/code/session_01Ef2ozxS7QPanGT8uoATbTe
This commit is contained in:
+3
-4
@@ -265,9 +265,8 @@ public sealed class MTConnectDriverLifecycleTests
|
||||
[Fact]
|
||||
public async Task Initialize_honours_the_config_json_over_the_constructor_options()
|
||||
{
|
||||
// The runtime delivers a config change ONLY through this argument (DriverInstanceActor
|
||||
// ApplyDelta -> ReinitializeAsync(json) on the LIVE instance). Ignoring it would make every
|
||||
// MTConnect config change a silent no-op that still seals the deployment green.
|
||||
// The IDriver contract: the driver serves the config document it is handed, not only its
|
||||
// constructor options — ignoring it would turn an in-place config change into a silent no-op.
|
||||
MTConnectDriverOptions? seen = null;
|
||||
var driver = new MTConnectDriver(Opts(), "mt1", o =>
|
||||
{
|
||||
@@ -533,7 +532,7 @@ public sealed class MTConnectDriverLifecycleTests
|
||||
[Fact]
|
||||
public async Task Reinitialize_with_an_unreadable_config_keeps_the_running_driver_serving()
|
||||
{
|
||||
// Blast radius: an unparseable config edit fails the DEPLOYMENT (ApplyResult(false)); it must
|
||||
// Blast radius: an unparseable in-place config edit fails the reinitialize call; it must
|
||||
// not down a driver that is happily serving its previous, valid configuration.
|
||||
var (driver, client) = await InitializedDriverAsync();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user