Phase 6 step 1
All checks were successful
CI / React UI Build (push) Successful in 10s
CI / Native Windows Build And Tests (push) Successful in 2m40s
CI / Windows Release Package (push) Successful in 2m47s

This commit is contained in:
Aiden
2026-05-11 19:44:35 +10:00
parent a91cc91a21
commit 68503256dc
7 changed files with 79 additions and 17 deletions

View File

@@ -62,10 +62,19 @@ void TestRuntimeEventPayloadTypes()
Expect(rejectedMutation.errorMessage == "Unknown layer.", "mutation payload carries rejection error");
RuntimePersistenceRequestedEvent persistence;
persistence.reason = "UpdateLayerParameter";
persistence.debounceAllowed = true;
persistence.request = PersistenceRequest::RuntimeStateRequest("UpdateLayerParameter");
Expect(RuntimeEventPayloadType(persistence) == RuntimeEventType::RuntimePersistenceRequested, "runtime persistence payload maps to persistence event type");
Expect(persistence.debounceAllowed, "runtime persistence payload carries debounce policy");
Expect(persistence.request.targetKind == PersistenceTargetKind::RuntimeState, "runtime persistence payload carries target kind");
Expect(persistence.request.reason == "UpdateLayerParameter", "runtime persistence payload carries request reason");
Expect(persistence.request.debounceAllowed, "runtime persistence payload carries debounce policy");
Expect(persistence.request.debounceKey == "runtime-state", "runtime persistence payload carries debounce key");
PersistenceSnapshot persistenceSnapshot;
persistenceSnapshot.targetKind = PersistenceTargetKind::RuntimeState;
persistenceSnapshot.reason = persistence.request.reason;
persistenceSnapshot.contents = "{}";
Expect(persistenceSnapshot.reason == "UpdateLayerParameter", "persistence snapshot carries capture reason");
Expect(persistenceSnapshot.contents == "{}", "persistence snapshot carries serialized content");
FileChangeDetectedEvent fileChange;
fileChange.path = "PollRuntimeStoreChanges";
@@ -459,8 +468,7 @@ void TestAcceptedMutationFollowUps()
stateChanged.persistenceRequested = true;
RuntimePersistenceRequestedEvent persistence;
persistence.reason = mutation.action;
persistence.debounceAllowed = true;
persistence.request = PersistenceRequest::RuntimeStateRequest(mutation.action);
RuntimeReloadRequestedEvent reload;
reload.reason = mutation.action;
@@ -487,7 +495,8 @@ void TestAcceptedMutationFollowUps()
const RuntimeEvent* persistenceEvent = harness.LastSeen(RuntimeEventType::RuntimePersistenceRequested);
const auto* persistencePayload = persistenceEvent ? std::get_if<RuntimePersistenceRequestedEvent>(&persistenceEvent->payload) : nullptr;
Expect(persistencePayload && persistencePayload->reason == "SetLayerShader", "persistence follow-up preserves mutation action reason");
Expect(persistencePayload && persistencePayload->request.reason == "SetLayerShader", "persistence follow-up preserves mutation action reason");
Expect(persistencePayload && persistencePayload->request.debounceKey == "runtime-state", "persistence follow-up preserves debounce key");
}
void TestAppLevelBroadcastAndBuildCoalescing()

View File

@@ -259,7 +259,7 @@ void TestRuntimeCoordinatorPersistenceEvents()
if (event.type != RuntimeEventType::RuntimePersistenceRequested)
continue;
const auto* payload = std::get_if<RuntimePersistenceRequestedEvent>(&event.payload);
return payload ? payload->reason : std::string();
return payload ? payload->request.reason : std::string();
}
return std::string();
};