From 1008236b27c6c3c2809e5608471a3b8988bacb68 Mon Sep 17 00:00:00 2001 From: Theauxm <43664045+Theauxm@users.noreply.github.com> Date: Tue, 20 Oct 2026 10:48:21 -0600 Subject: [PATCH 1/6] refactor(machines): move the C# machine projects to Trax.StateMachine/dotnet The engine, its persistence and testing packages and their three test projects leave Trax.Effect for a folder of their own. Everything .NET sits under dotnet/ so the folder can hold the other languages beside it; the guards that enumerate each folder's src/ and tests/ also look there. Names are unchanged in this commit. --- .github/ci/packages.json | 7 +- .../docs/design/phase0-codegen-scope.md | 4 +- ...TraxReferencesAreProjectReferencesTests.cs | 3 +- .../Trax.Api.Tests.StateMachine.E2E.csproj | 4 +- Trax.Cli/src/Trax.Cli/Trax.Cli.csproj | 2 +- ...TraxReferencesAreProjectReferencesTests.cs | 3 +- .../Tests/InteractionMatrixTests.cs | 1 + ...TraxReferencesAreProjectReferencesTests.cs | 3 +- ...nd-only-that-entry-receives-its-outcome.md | 4 +- Trax.Docs/contributing/writing-docs.md | 4 +- .../turn-off-snapshot-change-notices.md | 2 +- .../statemachine-api/add-state-machines.md | 8 +- .../add-trax-state-machine-self-check.md | 4 +- .../statemachine-api/client-manifest.md | 2 +- .../declarative-data-model.md | 18 +-- .../statemachine-api/i-snapshot-effect.md | 4 +- .../statemachine-api/invoked-run.md | 2 +- .../statemachine-api/ir-format.md | 6 +- .../statemachine-api/machine-conformance.md | 6 +- .../statemachine-api/machine-instances.md | 2 +- .../sdk-reference/statemachine-api/machine.md | 10 +- .../statemachine-api/migrations.md | 6 +- .../statemachine-api/persistence-ports.md | 20 +-- .../statemachine-api/result-codes.md | 4 +- .../sdk-reference/statemachine-api/rules.md | 4 +- .../statemachine-api/runtime-integrity.md | 6 +- .../testing/effect-statemachine-testing.md | 4 +- Trax.Docs/statemachine.md | 4 +- Trax.Docs/statemachine/authoring.md | 4 +- Trax.Docs/statemachine/canonical-wire.md | 4 +- Trax.Docs/statemachine/codegen-pipeline.md | 6 +- Trax.Docs/statemachine/context-schemas.md | 4 +- .../statemachine/declarative-authoring.md | 2 +- Trax.Docs/statemachine/generic-mutations.md | 6 +- Trax.Docs/statemachine/invoked-runs.md | 10 +- Trax.Docs/statemachine/invoking-trains.md | 6 +- .../statemachine/spawning-child-machines.md | 6 +- .../Tests/TestExcerptsNameTheirPagesTests.cs | 1 + .../Trax.Docs.Snippets.Tests.csproj | 6 +- .../Infrastructure/Projects.cs | 12 +- .../Tests/CodeLinksToDocsResolveTests.cs | 3 +- .../Tests/PublicApiIsDocumentedTests.cs | 6 +- .../Tests/SdkReferenceFrontMatterTests.cs | 2 +- Trax.Effect/Trax.Effect.slnx | 8 - ...TraxReferencesAreProjectReferencesTests.cs | 3 +- .../Trax.Effect.Tests.Meta.csproj | 6 +- .../src/Trax.Mediator/Trax.Mediator.csproj | 2 +- ...TraxReferencesAreProjectReferencesTests.cs | 3 +- .../Trax.Mediator.Tests.Meta.csproj | 2 +- ...ator.Tests.StateMachine.Integration.csproj | 2 +- .../book/Shopfront/Directory.Build.targets | 4 +- .../Trax.Samples.Recovery.csproj | 4 +- .../Trax.Samples.StateMachine.Api.csproj | 2 +- .../Trax.Samples.StateMachine.csproj | 4 +- .../templates/Trax.Samples.Templates.csproj | 6 +- .../templates/content/Directory.Build.targets | 4 +- .../Utils/ScaffoldFeed.cs | 1 + ...TraxReferencesAreProjectReferencesTests.cs | 3 +- ...TraxReferencesAreProjectReferencesTests.cs | 3 +- Trax.StateMachine/.gitignore | 151 ++++++++++++++++++ Trax.StateMachine/LICENSE | 21 +++ Trax.StateMachine/SECURITY.md | 15 ++ .../dotnet/.config/dotnet-tools.json | 12 ++ .../dotnet/Directory.Build.props | 57 +++++++ Trax.StateMachine/dotnet/README.md | 73 +++++++++ .../dotnet/Trax.StateMachine.slnx | 12 ++ .../Actor.cs | 0 .../CallerAuthorization.cs | 0 .../ChangeFeedStartupValidator.cs | 0 .../CompatibilitySuppressions.xml | 0 .../DraftClaimHold.cs | 0 .../DraftSweeper.cs | 0 .../EfSnapshotStore.cs | 0 .../EffectClaimStore.cs | 0 .../ISnapshotChangeListener.cs | 0 .../IdempotentEffect.cs | 0 .../InvokeOutbox.cs | 0 .../InvokeOutcomeDelivery.cs | 0 .../InvokeOutcomeReconciler.cs | 0 .../InvokedRun.cs | 0 .../InvokedRunCancellation.cs | 0 .../InvokedRunOutcomes.cs | 0 .../InvokedTrainLauncher.cs | 0 .../InvokesStartupValidator.cs | 0 .../Machine.cs | 0 .../MachineCensus.cs | 0 .../MachineGraph.cs | 0 .../MachineIdStartupValidator.cs | 0 .../MachineInstanceStore.cs | 0 .../MachineInstances.cs | 0 .../MachineRulesStartupValidator.cs | 0 .../MachineSchemaStartupValidator.cs | 0 .../Mutations/GenericContracts.cs | 0 .../Mutations/GenericJunctions.cs | 0 .../Mutations/GenericMarkers.cs | 0 .../Mutations/GenericTrains.cs | 0 .../Mutations/StateMachineMutations.cs | 0 .../Ports.cs | 0 .../RequestIdRing.cs | 0 .../SnapshotChangeListener.cs | 0 .../SnapshotDraftService.cs | 0 .../SnapshotEffectRunner.cs | 0 .../SnapshotFingerprint.cs | 0 .../SnapshotLimits.cs | 0 .../SnapshotMachineRegistry.cs | 0 .../SnapshotOwner.cs | 0 .../SnapshotSelfCheck.cs | 0 .../SnapshotWatchHub.cs | 0 .../SnapshotWriteSignal.cs | 0 .../SpawnedEnds.cs | 0 .../SpawnsStartupValidator.cs | 0 .../StartDeclarationValidator.cs | 0 .../StateMachineInstruments.cs | 0 .../StateMachineOptions.cs | 0 .../StateMachineSelfCheckHealthCheck.cs | 0 .../StateMachinesBuilderExtensions.cs | 0 .../TimerFireResult.cs | 0 .../TransitionNote.cs | 0 ...rax.Effect.StateMachine.Persistence.csproj | 4 +- .../packages.lock.json | 0 .../DifferentialCorpus.cs | 0 .../MachineConformance.cs | 0 .../Trax.Effect.StateMachine.Testing.csproj | 0 .../packages.lock.json | 0 .../Trax.Effect.StateMachine/CallerRule.cs | 0 .../Trax.Effect.StateMachine/CanonicalJson.cs | 0 .../ClientManifest.cs | 0 .../CompatibilitySuppressions.xml | 0 .../Trax.Effect.StateMachine/CorpusReplay.cs | 0 .../src/Trax.Effect.StateMachine/Fluent.cs | 0 .../src/Trax.Effect.StateMachine/Invokes.cs | 0 .../MachineDefinition.cs | 0 .../MachineTrigger.cs | 0 .../Trax.Effect.StateMachine/RefusalCode.cs | 0 .../src/Trax.Effect.StateMachine/Results.cs | 0 .../Rules/ContextSchema.cs | 0 .../Rules/DeclarativeModel.cs | 0 .../Rules/IrExporter.cs | 0 .../Rules/MemberPath.cs | 0 .../Rules/Reduction.cs | 0 .../Rules/ReductionEvaluator.cs | 0 .../Trax.Effect.StateMachine/Rules/Rule.cs | 0 .../Rules/RuleEvaluator.cs | 0 .../Trax.Effect.StateMachine/Rules/Rules.cs | 0 .../Rules/SchemaReflection.cs | 0 .../Rules/SchemaValidator.cs | 0 .../Rules/ValueFormats.cs | 0 .../src/Trax.Effect.StateMachine/Snapshot.cs | 0 .../SnapshotMachine.cs | 0 .../StartDeclaration.cs | 0 .../Trax.Effect.StateMachine/StorableJson.cs | 0 .../src/Trax.Effect.StateMachine/Timers.cs | 0 .../TransitionDefinition.cs | 0 .../Trax.Effect.StateMachine.csproj | 2 +- .../packages.lock.json | 0 .../dotnet/tests/Directory.Build.props | 15 ++ .../dotnet/tests/RedAttribute.cs | 87 ++++++++++ .../ActorHierarchyTests.cs | 0 .../AddStateMachinesBuilderTests.cs | 0 .../ChangeFeedStartupValidatorTests.cs | 0 .../ChangeFeedSwitchTests.cs | 0 .../ClientDivergenceMeterTests.cs | 0 .../DiscardEffectTests.cs | 0 .../DiscardRuleTests.cs | 0 .../DiscardTests.cs | 0 .../DraftLifetimeTests.cs | 0 .../DraftMachineScopeTests.cs | 0 .../DraftWriteRulesTests.cs | 0 .../EfSnapshotStoreTests.cs | 0 .../EffectAndHandshakeDefectTests.cs | 0 .../EffectClaimStoreTests.cs | 0 .../EffectCommitIntegrityTests.cs | 0 .../EffectPendingTests.cs | 0 .../EventAuthorizationTests.cs | 0 .../EventRuleStartupTests.cs | 0 .../Fakes/BuildMachine.cs | 0 .../Fakes/DeclarativeTurnstileMachine.cs | 0 .../Fakes/Effects.cs | 0 .../Fakes/FluentMachines.cs | 0 .../Fakes/PendingEffectMachines.cs | 0 .../Fakes/RecordingLauncher.cs | 0 .../Fakes/RevisionMachines.cs | 0 .../Fakes/RuledMachines.cs | 0 .../Fakes/SpawnMachines.cs | 0 .../Fakes/SystemMachines.cs | 0 .../Fakes/TestOrder.cs | 0 .../Fakes/TestTurnstile.cs | 0 .../Fakes/TimerMachines.cs | 0 .../Fakes/TimerSweepMachines.cs | 0 .../Fixtures/CheckTraxInvariantsAttribute.cs | 0 .../Fixtures/CountingDataContextFactory.cs | 0 .../Fixtures/InstanceHost.cs | 0 .../Fixtures/Marked.cs | 0 .../Fixtures/PausingSnapshotStore.cs | 0 .../Fixtures/PendingHarness.cs | 0 .../Fixtures/PostgresSetup.cs | 0 .../Fixtures/RawSql.cs | 0 .../Fixtures/ScratchDatabase.cs | 0 .../Fixtures/SkewedDatabaseClock.cs | 0 .../Fixtures/SnapshotNotices.cs | 0 .../Fixtures/SqliteDb.cs | 0 .../Fixtures/StartingHost.cs | 0 .../Fixtures/TestDb.cs | 0 .../Fixtures/TestPostgres.cs | 0 .../GenericRulesTests.cs | 0 .../GenericSaveTimerTests.cs | 0 .../IdempotentEffectTests.cs | 0 .../InvokeTokenStoreTests.cs | 0 .../InvokedRunLimitTests.cs | 0 .../InvokedRunOutputTests.cs | 0 .../InvokesDraftExpiryTests.cs | 0 .../InvokesReservedStateTests.cs | 0 .../MachineCensusTests.cs | 0 .../MachineConformanceTests.cs | 0 .../MachineEffectRunnerTests.cs | 0 .../MachineExportIrTests.cs | 0 .../MachineInterleavingModelTests.cs | 0 .../MachineSchemaStartupTests.cs | 0 .../MachineTrainHookOutputTests.cs | 0 .../MarkedMachineTests.cs | 0 .../MigrationSchemaTests.cs | 0 .../MutationErrorMessageTests.cs | 0 .../OrderAutosaveTests.cs | 0 .../OrderSendTests.cs | 0 .../PostgresChangeFeedTests.cs | 0 .../RegistryCorruptDataTests.cs | 0 .../RegistryJunctionTests.cs | 0 .../RequestIdControlCharacterTests.cs | 0 .../RequestIdRingSizeTests.cs | 0 .../RequestIdRingTests.cs | 0 .../RequestIdScopeTests.cs | 0 .../RequestRetryAfterServerWriteTests.cs | 0 .../RevisionTests.cs | 0 .../ServerRecordTests.cs | 0 .../ServerlessProviderTests.cs | 0 .../SnapshotAdvanceGuardTests.cs | 0 .../SnapshotChangeListenerTests.cs | 0 .../SnapshotChangeNotifyTests.cs | 0 .../SnapshotDraftExpiryTests.cs | 0 .../SnapshotDraftServiceTests.cs | 0 .../SnapshotDraftServiceTimerTests.cs | 0 .../SnapshotMutationDefectTests.cs | 0 .../SnapshotOwnerKeyTests.cs | 0 .../SnapshotSelfCheckTests.cs | 0 .../SnapshotStoreDefaultMembersTests.cs | 0 .../SnapshotWatchHubTests.cs | 0 .../SpawnedChildTests.cs | 0 .../SpawnsStartupValidatorTests.cs | 0 .../SqliteRevisionTriggerTests.cs | 0 .../SqliteSnapshotChangePollTests.cs | 0 .../SqliteStoreTests.cs | 0 .../StartTests.cs | 0 .../StateMachineSelfCheckHealthCheckTests.cs | 0 .../SystemOwnedInstanceTests.cs | 0 .../TimerDueAtAnswerTests.cs | 0 .../TimerDueAtTests.cs | 0 .../TimerFailureClassificationTests.cs | 0 .../TimerFireConditionTests.cs | 0 .../TimerSweepIsolationTests.cs | 0 .../TransitionHistoryTests.cs | 0 ...tateMachine.Persistence.Integration.csproj | 10 +- .../TriggerInputValidationPathTests.cs | 0 .../packages.lock.json | 0 .../Fakes/CountingCharge.cs | 0 .../Fakes/StressOrder.cs | 0 .../Fixtures/StressFixture.cs | 0 .../Fixtures/StressProfile.cs | 0 .../Fixtures/TestPostgres.cs | 0 .../ClaimContentionStressTests.cs | 0 .../ExactlyOnceStressTests.cs | 0 .../RevisionStoreModelTests.cs | 0 .../IntegrationTests/ThroughputStressTests.cs | 0 .../StressDb.cs | 0 ...ax.Effect.StateMachine.Tests.Stress.csproj | 2 +- .../packages.lock.json | 0 .../Conformance/CheckoutConformanceTests.cs | 0 .../Conformance/ConformanceRunnerTests.cs | 0 .../Conformance/ConformanceTests.cs | 0 .../Conformance/FixturePathsTests.cs | 0 .../Conformance/FluentCheckoutTests.cs | 0 .../Conformance/IrFormatParityTests.cs | 0 .../Conformance/IrSchemaTests.cs | 0 .../Conformance/MigrationGoldenTests.cs | 0 .../Conformance/RefusalCodeParityTests.cs | 0 .../Conformance/StrictInputGoldenTests.cs | 0 .../Differential/DeclarativeTurnstileTests.cs | 0 .../DifferentialConformanceTests.cs | 0 .../DifferentialCorpusReplayTests.cs | 0 .../Differential/StrictInputParityTests.cs | 0 .../Differential/TwinSequenceParityTests.cs | 0 .../Fakes/ConfiguredMachine.cs | 0 .../Fakes/DeclarativeCheckout.cs | 0 .../Fakes/DeclarativeTurnstile.cs | 0 .../Fakes/FaultyMachine.cs | 0 .../Fakes/FluentCheckout.cs | 0 .../Fakes/GaugeMachine.cs | 0 .../Fakes/IngestContracts.cs | 0 .../Fakes/IngestMachine.cs | 0 .../Fakes/RangeMachine.cs | 0 .../Fakes/ReminderMachine.cs | 0 .../Fakes/RichExportMachine.cs | 0 .../Fakes/StrictInputMachine.cs | 0 .../Fakes/TestCheckout.cs | 0 .../Fakes/TestTurnstile.cs | 0 .../Fakes/TestTurnstileV2.cs | 0 .../Fakes/WaitMachine.cs | 0 .../Helpers/ConformanceTestee.cs | 0 .../Helpers/FixturePaths.cs | 0 .../Helpers/TwinEngine.cs | 0 .../Helpers/TypedSurfaceJson.cs | 0 .../Trax.Effect.StateMachine.Tests.csproj | 0 .../UnitTests/AdvanceTests.cs | 0 .../CanonicalizationConformanceTests.cs | 0 .../UnitTests/ClientManifestTests.cs | 0 .../UnitTests/ComparisonRefusalTests.cs | 0 .../DeclarativeAuthoringDefectTests.cs | 0 .../UnitTests/DifferentialAuthoringTests.cs | 0 .../UnitTests/DifferentialBuilderTests.cs | 0 .../UnitTests/EngineContractTests.cs | 0 .../UnitTests/EngineDefensiveTests.cs | 0 .../UnitTests/EngineParityDefectTests.cs | 0 .../UnitTests/EventWriteRuleTests.cs | 0 .../UnitTests/IntrospectionTests.cs | 0 .../UnitTests/InvokesDeclarationTests.cs | 0 .../UnitTests/IrExporterTests.cs | 0 .../UnitTests/MachineBuilderTests.cs | 0 .../UnitTests/MachineInstanceIdTests.cs | 0 .../UnitTests/MigrationTests.cs | 0 .../UnitTests/ReductionEvaluatorTests.cs | 0 .../UnitTests/RefusalPrecedenceTests.cs | 0 .../UnitTests/RehydrateTests.cs | 0 .../UnitTests/RuleEvaluatorTests.cs | 0 .../UnitTests/RulesTests.cs | 0 .../UnitTests/RulesVocabularyTests.cs | 0 .../UnitTests/SchemaFormatTests.cs | 0 .../UnitTests/SchemaStrictnessTests.cs | 0 .../UnitTests/SchemaValidatorTests.cs | 0 .../UnitTests/SerializationRoundTripTests.cs | 0 .../UnitTests/SpawnDeclarationTests.cs | 0 .../UnitTests/StateInvariantTests.cs | 0 .../UnitTests/StorableJsonTests.cs | 0 .../UnitTests/TimerDeclarationTests.cs | 0 .../UnitTests/TotalityTests.cs | 0 .../UnitTests/TriggerInputPropertyTests.cs | 0 .../UnitTests/TriggerInputValidationTests.cs | 0 .../UnitTests/TriggerMetadataTests.cs | 0 .../UnitTests/TypedSchemaTests.cs | 0 .../packages.lock.json | 0 348 files changed, 603 insertions(+), 140 deletions(-) create mode 100644 Trax.StateMachine/.gitignore create mode 100644 Trax.StateMachine/LICENSE create mode 100644 Trax.StateMachine/SECURITY.md create mode 100644 Trax.StateMachine/dotnet/.config/dotnet-tools.json create mode 100644 Trax.StateMachine/dotnet/Directory.Build.props create mode 100644 Trax.StateMachine/dotnet/README.md create mode 100644 Trax.StateMachine/dotnet/Trax.StateMachine.slnx rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/Actor.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/CallerAuthorization.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/ChangeFeedStartupValidator.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/CompatibilitySuppressions.xml (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/DraftClaimHold.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/DraftSweeper.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/EfSnapshotStore.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/EffectClaimStore.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/ISnapshotChangeListener.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/IdempotentEffect.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/InvokeOutbox.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeDelivery.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeReconciler.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/InvokedRun.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/InvokedRunCancellation.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/InvokedRunOutcomes.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/InvokedTrainLauncher.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/InvokesStartupValidator.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/Machine.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/MachineCensus.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/MachineGraph.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/MachineIdStartupValidator.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/MachineInstanceStore.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/MachineInstances.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/MachineRulesStartupValidator.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/MachineSchemaStartupValidator.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericContracts.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericJunctions.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericMarkers.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericTrains.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/Mutations/StateMachineMutations.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/Ports.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/RequestIdRing.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/SnapshotChangeListener.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/SnapshotDraftService.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/SnapshotEffectRunner.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/SnapshotFingerprint.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/SnapshotLimits.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/SnapshotMachineRegistry.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/SnapshotOwner.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/SnapshotSelfCheck.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/SnapshotWatchHub.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/SnapshotWriteSignal.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/SpawnedEnds.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/SpawnsStartupValidator.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/StartDeclarationValidator.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/StateMachineInstruments.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/StateMachineOptions.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/StateMachineSelfCheckHealthCheck.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/StateMachinesBuilderExtensions.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/TimerFireResult.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/TransitionNote.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/Trax.Effect.StateMachine.Persistence.csproj (94%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Persistence/packages.lock.json (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Testing/DifferentialCorpus.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Testing/MachineConformance.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Testing/Trax.Effect.StateMachine.Testing.csproj (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine.Testing/packages.lock.json (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/CallerRule.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/CanonicalJson.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/ClientManifest.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/CompatibilitySuppressions.xml (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/CorpusReplay.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/Fluent.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/Invokes.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/MachineDefinition.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/MachineTrigger.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/RefusalCode.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/Results.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/Rules/ContextSchema.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/Rules/DeclarativeModel.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/Rules/IrExporter.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/Rules/MemberPath.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/Rules/Reduction.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/Rules/ReductionEvaluator.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/Rules/Rule.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/Rules/RuleEvaluator.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/Rules/Rules.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/Rules/SchemaReflection.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/Rules/SchemaValidator.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/Rules/ValueFormats.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/Snapshot.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/SnapshotMachine.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/StartDeclaration.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/StorableJson.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/Timers.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/TransitionDefinition.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/Trax.Effect.StateMachine.csproj (94%) rename {Trax.Effect => Trax.StateMachine/dotnet}/src/Trax.Effect.StateMachine/packages.lock.json (100%) create mode 100644 Trax.StateMachine/dotnet/tests/Directory.Build.props create mode 100644 Trax.StateMachine/dotnet/tests/RedAttribute.cs rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/ActorHierarchyTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/AddStateMachinesBuilderTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/ChangeFeedStartupValidatorTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/ChangeFeedSwitchTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/ClientDivergenceMeterTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardEffectTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardRuleTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftLifetimeTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftMachineScopeTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftWriteRulesTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/EfSnapshotStoreTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectAndHandshakeDefectTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectClaimStoreTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectCommitIntegrityTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectPendingTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/EventAuthorizationTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/EventRuleStartupTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/BuildMachine.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/DeclarativeTurnstileMachine.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/Effects.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/FluentMachines.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/PendingEffectMachines.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RecordingLauncher.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RevisionMachines.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RuledMachines.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/SpawnMachines.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/SystemMachines.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TestOrder.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TestTurnstile.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TimerMachines.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TimerSweepMachines.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/CheckTraxInvariantsAttribute.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/CountingDataContextFactory.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/InstanceHost.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/Marked.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PausingSnapshotStore.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PendingHarness.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PostgresSetup.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/RawSql.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/ScratchDatabase.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SkewedDatabaseClock.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SnapshotNotices.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SqliteDb.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/StartingHost.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/TestDb.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/TestPostgres.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/GenericRulesTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/GenericSaveTimerTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/IdempotentEffectTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokeTokenStoreTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokedRunLimitTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokedRunOutputTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokesDraftExpiryTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokesReservedStateTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineCensusTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineConformanceTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineEffectRunnerTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineExportIrTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineInterleavingModelTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineSchemaStartupTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineTrainHookOutputTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/MarkedMachineTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/MigrationSchemaTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/MutationErrorMessageTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/OrderAutosaveTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/OrderSendTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/PostgresChangeFeedTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/RegistryCorruptDataTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/RegistryJunctionTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdControlCharacterTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdRingSizeTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdRingTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdScopeTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestRetryAfterServerWriteTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/RevisionTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/ServerRecordTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/ServerlessProviderTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotAdvanceGuardTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotChangeListenerTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotChangeNotifyTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftExpiryTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftServiceTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftServiceTimerTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotMutationDefectTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotOwnerKeyTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotSelfCheckTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotStoreDefaultMembersTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotWatchHubTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/SpawnedChildTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/SpawnsStartupValidatorTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteRevisionTriggerTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteSnapshotChangePollTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteStoreTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/StartTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/StateMachineSelfCheckHealthCheckTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/SystemOwnedInstanceTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerDueAtAnswerTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerDueAtTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerFailureClassificationTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerFireConditionTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerSweepIsolationTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/TransitionHistoryTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/Trax.Effect.StateMachine.Persistence.Integration.csproj (79%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/TriggerInputValidationPathTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Persistence.Integration/packages.lock.json (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests.Stress/Fakes/CountingCharge.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests.Stress/Fakes/StressOrder.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/StressFixture.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/StressProfile.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/TestPostgres.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ClaimContentionStressTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ExactlyOnceStressTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/RevisionStoreModelTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ThroughputStressTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests.Stress/StressDb.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests.Stress/Trax.Effect.StateMachine.Tests.Stress.csproj (91%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests.Stress/packages.lock.json (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Conformance/CheckoutConformanceTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Conformance/ConformanceRunnerTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Conformance/ConformanceTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Conformance/FixturePathsTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Conformance/FluentCheckoutTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Conformance/IrFormatParityTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Conformance/IrSchemaTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Conformance/MigrationGoldenTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Conformance/RefusalCodeParityTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Conformance/StrictInputGoldenTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Differential/DeclarativeTurnstileTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Differential/DifferentialConformanceTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Differential/DifferentialCorpusReplayTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Differential/StrictInputParityTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Differential/TwinSequenceParityTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Fakes/ConfiguredMachine.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Fakes/DeclarativeCheckout.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Fakes/DeclarativeTurnstile.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Fakes/FaultyMachine.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Fakes/FluentCheckout.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Fakes/GaugeMachine.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Fakes/IngestContracts.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Fakes/IngestMachine.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Fakes/RangeMachine.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Fakes/ReminderMachine.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Fakes/RichExportMachine.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Fakes/StrictInputMachine.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Fakes/TestCheckout.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Fakes/TestTurnstile.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Fakes/TestTurnstileV2.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Fakes/WaitMachine.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Helpers/ConformanceTestee.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Helpers/FixturePaths.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Helpers/TwinEngine.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Helpers/TypedSurfaceJson.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/Trax.Effect.StateMachine.Tests.csproj (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/AdvanceTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/CanonicalizationConformanceTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/ClientManifestTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/ComparisonRefusalTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/DeclarativeAuthoringDefectTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/DifferentialAuthoringTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/DifferentialBuilderTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineContractTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineDefensiveTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineParityDefectTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/EventWriteRuleTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/IntrospectionTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/InvokesDeclarationTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/IrExporterTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/MachineBuilderTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/MachineInstanceIdTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/MigrationTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/ReductionEvaluatorTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/RefusalPrecedenceTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/RehydrateTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/RuleEvaluatorTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/RulesTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/RulesVocabularyTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaFormatTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaStrictnessTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaValidatorTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/SerializationRoundTripTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/SpawnDeclarationTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/StateInvariantTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/StorableJsonTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/TimerDeclarationTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/TotalityTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerInputPropertyTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerInputValidationTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerMetadataTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/UnitTests/TypedSchemaTests.cs (100%) rename {Trax.Effect => Trax.StateMachine/dotnet}/tests/Trax.Effect.StateMachine.Tests/packages.lock.json (100%) diff --git a/.github/ci/packages.json b/.github/ci/packages.json index 24d8eeb89..e4be84971 100644 --- a/.github/ci/packages.json +++ b/.github/ci/packages.json @@ -13,9 +13,14 @@ "dotnet": { "solution": "Trax.Effect.slnx", "state-machine": true, "pack": true, "coverage": true, "postgres": "trax_data_tests", "rabbitmq": true, "databases": [], "timeout": 15, "test-args": "" }, "adr": { "adr-root": "docs/adr", "known-areas": "migrations,providers,data-model,testing,platform,auth", "census-root": "tests/Trax.Effect.Tests.Meta" } }, + { + "folder": "Trax.StateMachine", + "upstream": ["Trax.Effect", "Trax.Api.StateMachine"], + "dotnet": { "solution": "dotnet/Trax.StateMachine.slnx", "state-machine": true, "pack": true, "coverage": true, "postgres": "trax_data_tests", "rabbitmq": false, "databases": [], "timeout": 15, "test-args": "" } + }, { "folder": "Trax.Mediator", - "upstream": ["Trax.Effect"], + "upstream": ["Trax.StateMachine"], "dotnet": { "solution": "Trax.Mediator.slnx", "pack": true, "coverage": true, "postgres": "trax_data_tests", "rabbitmq": false, "databases": [], "timeout": 15, "test-args": "" }, "adr": { "adr-root": "docs/adr", "known-areas": "auth,platform,testing", "census-root": "tests/Trax.Mediator.Tests.Meta" } }, diff --git a/Trax.Api.StateMachine/docs/design/phase0-codegen-scope.md b/Trax.Api.StateMachine/docs/design/phase0-codegen-scope.md index 90069ccfe..11407028b 100644 --- a/Trax.Api.StateMachine/docs/design/phase0-codegen-scope.md +++ b/Trax.Api.StateMachine/docs/design/phase0-codegen-scope.md @@ -51,7 +51,7 @@ per language runs them. Consequences: ### What is built (Increment A: C# authoring -> IR) -In `Trax.Effect/src/Trax.Effect.StateMachine/Rules/`: +In `Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/`: - `Rule.cs` + `RuleEvaluator.cs` (guard/validator vocabulary as data + a total evaluator). - `Reduction.cs` + `ReductionEvaluator.cs` (reducer vocabulary + non-mutating evaluator). - `MemberPath.cs`, `ContextSchema.cs`, `SchemaReflection.cs`, `SchemaValidator.cs` (typed layer: member @@ -113,7 +113,7 @@ Ordered by priority as it was written then (E before D; see §5 and Decision D): - **Schema validation is stricter than the old twins:** `SchemaValidator` enforces `additionalProperties: false` (matching `machine.json`'s intent and the C# side). A v2 that adds a field needs its own validator (see how `migration.test.ts` overrides the v2 `Unlocked` validator). -- **Run the suites:** C# `dotnet test Trax.Effect/tests/Trax.Effect.StateMachine.Tests/...`; TS +- **Run the suites:** C# `dotnet test Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/...`; TS `cd Trax.Api.StateMachine && npx vitest run` and `npx tsc --noEmit`. ## 1. The baseline this plan started from (grounded, 2026-08-11) diff --git a/Trax.Api/tests/Trax.Api.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs b/Trax.Api/tests/Trax.Api.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs index bfac476c7..063d7e963 100644 --- a/Trax.Api/tests/Trax.Api.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs @@ -46,11 +46,12 @@ public void No_project_references_a_Trax_package_built_in_this_repository() /// /// The package id of every Trax project in the repository: the file name of each csproj under - /// a folder's src/. + /// a folder's src/, or its dotnet/src/ in a folder that holds more than .NET. /// private static HashSet TraxProjects() => Directory .EnumerateDirectories(MonorepoRoot.Path, "Trax.*") + .SelectMany(f => new[] { f, Path.Combine(f, "dotnet") }) .Select(folder => Path.Combine(folder, "src")) .Where(Directory.Exists) .SelectMany(src => diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Trax.Api.Tests.StateMachine.E2E.csproj b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Trax.Api.Tests.StateMachine.E2E.csproj index eae5d6d6d..ab82f6a62 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Trax.Api.Tests.StateMachine.E2E.csproj +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Trax.Api.Tests.StateMachine.E2E.csproj @@ -38,8 +38,8 @@ - - + + diff --git a/Trax.Cli/src/Trax.Cli/Trax.Cli.csproj b/Trax.Cli/src/Trax.Cli/Trax.Cli.csproj index 99f1fdb79..678a0cf8c 100644 --- a/Trax.Cli/src/Trax.Cli/Trax.Cli.csproj +++ b/Trax.Cli/src/Trax.Cli/Trax.Cli.csproj @@ -23,7 +23,7 @@ - + diff --git a/Trax.Cli/tests/Trax.Cli.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs b/Trax.Cli/tests/Trax.Cli.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs index 63e3d35f6..177bceecc 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs @@ -46,11 +46,12 @@ public void No_project_references_a_Trax_package_built_in_this_repository() /// /// The package id of every Trax project in the repository: the file name of each csproj under - /// a folder's src/. + /// a folder's src/, or its dotnet/src/ in a folder that holds more than .NET. /// private static HashSet TraxProjects() => Directory .EnumerateDirectories(MonorepoRoot.Path, "Trax.*") + .SelectMany(f => new[] { f, Path.Combine(f, "dotnet") }) .Select(folder => Path.Combine(folder, "src")) .Where(Directory.Exists) .SelectMany(src => diff --git a/Trax.Core/tests/Trax.Core.Tests.Meta/Tests/InteractionMatrixTests.cs b/Trax.Core/tests/Trax.Core.Tests.Meta/Tests/InteractionMatrixTests.cs index ba13d4eff..5fbe7a444 100644 --- a/Trax.Core/tests/Trax.Core.Tests.Meta/Tests/InteractionMatrixTests.cs +++ b/Trax.Core/tests/Trax.Core.Tests.Meta/Tests/InteractionMatrixTests.cs @@ -617,6 +617,7 @@ private sealed class TestIndex(string monorepoRoot) private readonly Lazy> _sources = new(() => Directory .EnumerateDirectories(monorepoRoot, "Trax.*") + .SelectMany(f => new[] { f, Path.Combine(f, "dotnet") }) .Select(folder => Path.Combine(folder, "tests")) .Where(Directory.Exists) .SelectMany(tests => diff --git a/Trax.Core/tests/Trax.Core.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs b/Trax.Core/tests/Trax.Core.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs index b165a874a..424906115 100644 --- a/Trax.Core/tests/Trax.Core.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs +++ b/Trax.Core/tests/Trax.Core.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs @@ -46,11 +46,12 @@ public void No_project_references_a_Trax_package_built_in_this_repository() /// /// The package id of every Trax project in the repository: the file name of each csproj under - /// a folder's src/. + /// a folder's src/, or its dotnet/src/ in a folder that holds more than .NET. /// private static HashSet TraxProjects() => Directory .EnumerateDirectories(MonorepoRoot.Path, "Trax.*") + .SelectMany(f => new[] { f, Path.Combine(f, "dotnet") }) .Select(folder => Path.Combine(folder, "src")) .Where(Directory.Exists) .SelectMany(src => diff --git a/Trax.Docs/adr/0046-a-machine-state-invokes-a-train-and-only-that-entry-receives-its-outcome.md b/Trax.Docs/adr/0046-a-machine-state-invokes-a-train-and-only-that-entry-receives-its-outcome.md index c5e91bf5f..583602552 100644 --- a/Trax.Docs/adr/0046-a-machine-state-invokes-a-train-and-only-that-entry-receives-its-outcome.md +++ b/Trax.Docs/adr/0046-a-machine-state-invokes-a-train-and-only-that-entry-receives-its-outcome.md @@ -207,7 +207,7 @@ checkpoint. Written first, red, before the code they cover. Each names the class and method it will have. -In `Trax.Effect/tests/Trax.Effect.StateMachine.Tests`: +In `Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests`: - `InvokesDeclarationTests.An_invoking_state_without_OnCancelled_is_refused_at_build` - `InvokesDeclarationTests.A_guarded_OnDone_routes_an_unsure_output_to_its_own_target` - `InvokesDeclarationTests.Outcomes_export_as_their_own_trigger_kind_per_invoke_edge_with_the_output_schema` @@ -215,7 +215,7 @@ In `Trax.Effect/tests/Trax.Effect.StateMachine.Tests`: - `MachineInstanceIdTests.Keys_a_b_c_split_differently_give_different_ids` - `DifferentialCorpusReplayTests.Outcome_triggers_apply_the_same_reduction_in_the_twin` -In `Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration`, on Postgres and Sqlite: +In `Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration`, on Postgres and Sqlite: - `InvokesStartupRefusalTests`, one test per refusal, each naming the offending junction, train or member: `A_plain_Junction_is_refused`, `An_IChain_over_a_non_effect_interface_is_refused`, `A_train_that_is_not_a_ServiceTrain_is_refused`, `A_recorder_refusal_is_refused`, diff --git a/Trax.Docs/contributing/writing-docs.md b/Trax.Docs/contributing/writing-docs.md index 91429a637..95a497d70 100644 --- a/Trax.Docs/contributing/writing-docs.md +++ b/Trax.Docs/contributing/writing-docs.md @@ -140,7 +140,7 @@ with a full GitHub URL only when `source:` cannot carry it. | Test | Fails on | |---|---| -| `CodeLinksToDocsResolveTests` | a `https://traxsharp.net/docs/...` link in a `*.cs` file under a `Trax.*/src/` folder, `Trax.Samples/samples/` or `Trax.Samples/templates/` that does not resolve to a published page (or a `redirect_from` of one), or whose anchor names no heading on it | +| `CodeLinksToDocsResolveTests` | a `https://traxsharp.net/docs/...` link in a `*.cs` file under a `Trax.*/src/` or `Trax.*/dotnet/src/` folder, `Trax.Samples/samples/` or `Trax.Samples/templates/` that does not resolve to a published page (or a `redirect_from` of one), or whose anchor names no heading on it | | `SourceLinksBackTests` | an SDK reference page whose `source:` lists C# files, none of which links to the page | ## SDK reference pages @@ -158,7 +158,7 @@ source: | Field | Value | |---|---| -| `package` | The project name of a packable project: a csproj under a `Trax.*/src/` folder that does not set `IsPackable` false. | +| `package` | The project name of a packable project: a csproj under a `Trax.*/src/` or `Trax.*/dotnet/src/` folder that does not set `IsPackable` false. | | `namespace` | The namespace the type is in, or a list of them. Not needed with `surface`. | | `source` | The files or directories the page documents, relative to the repository root. | | `surface` | `graphql` for the GraphQL schema pages (`package: Trax.Api.GraphQL`), `typescript` for the npm package (`package` then names it, as its `package.json` does). | diff --git a/Trax.Docs/migration-guides/turn-off-snapshot-change-notices.md b/Trax.Docs/migration-guides/turn-off-snapshot-change-notices.md index 92697434d..f936a73ff 100644 --- a/Trax.Docs/migration-guides/turn-off-snapshot-change-notices.md +++ b/Trax.Docs/migration-guides/turn-off-snapshot-change-notices.md @@ -6,7 +6,7 @@ area: data nav_order: 12 source: - Trax.Effect/src/Trax.Effect.Data.Postgres/Migrations/080_snapshot_draft_change_notify_switch.sql - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/ChangeFeedStartupValidator.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/ChangeFeedStartupValidator.cs --- # Turn off state-machine change notices diff --git a/Trax.Docs/sdk-reference/statemachine-api/add-state-machines.md b/Trax.Docs/sdk-reference/statemachine-api/add-state-machines.md index 523c92a47..25e35b962 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/add-state-machines.md +++ b/Trax.Docs/sdk-reference/statemachine-api/add-state-machines.md @@ -9,10 +9,10 @@ nav_order: 1 package: Trax.Effect.StateMachine.Persistence namespace: Trax.Effect.StateMachine.Persistence source: - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/StateMachinesBuilderExtensions.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/StateMachineOptions.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/MachineCensus.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/StateMachineInstruments.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachinesBuilderExtensions.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineOptions.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineCensus.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineInstruments.cs redirect_from: - /docs/sdk-reference/statemachine-api/add-trax-state-machines --- diff --git a/Trax.Docs/sdk-reference/statemachine-api/add-trax-state-machine-self-check.md b/Trax.Docs/sdk-reference/statemachine-api/add-trax-state-machine-self-check.md index ab6719911..7acc77239 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/add-trax-state-machine-self-check.md +++ b/Trax.Docs/sdk-reference/statemachine-api/add-trax-state-machine-self-check.md @@ -9,8 +9,8 @@ nav_order: 12 package: Trax.Effect.StateMachine.Persistence namespace: Trax.Effect.StateMachine.Persistence source: - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/StateMachineSelfCheckHealthCheck.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotSelfCheck.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineSelfCheckHealthCheck.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotSelfCheck.cs --- # AddTraxStateMachineSelfCheck diff --git a/Trax.Docs/sdk-reference/statemachine-api/client-manifest.md b/Trax.Docs/sdk-reference/statemachine-api/client-manifest.md index 299e9a9fa..f0d25a2d1 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/client-manifest.md +++ b/Trax.Docs/sdk-reference/statemachine-api/client-manifest.md @@ -9,7 +9,7 @@ nav_order: 16 package: Trax.Effect.StateMachine namespace: Trax.Effect.StateMachine source: - - Trax.Effect/src/Trax.Effect.StateMachine/ClientManifest.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/ClientManifest.cs - Trax.Effect/src/Trax.Effect/Configuration/ClientExport/TraxClientExport.cs - Trax.Effect/src/Trax.Effect/Configuration/ClientExport/ITraxStartupCheck.cs - Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/Extensions/TraxClientManifestExtensions.cs diff --git a/Trax.Docs/sdk-reference/statemachine-api/declarative-data-model.md b/Trax.Docs/sdk-reference/statemachine-api/declarative-data-model.md index d458b063c..189501bbf 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/declarative-data-model.md +++ b/Trax.Docs/sdk-reference/statemachine-api/declarative-data-model.md @@ -9,15 +9,15 @@ nav_order: 4 package: Trax.Effect.StateMachine namespace: Trax.Effect.StateMachine source: - - Trax.Effect/src/Trax.Effect.StateMachine/Rules/Rule.cs - - Trax.Effect/src/Trax.Effect.StateMachine/Rules/Reduction.cs - - Trax.Effect/src/Trax.Effect.StateMachine/Rules/ContextSchema.cs - - Trax.Effect/src/Trax.Effect.StateMachine/Rules/DeclarativeModel.cs - - Trax.Effect/src/Trax.Effect.StateMachine/Rules/RuleEvaluator.cs - - Trax.Effect/src/Trax.Effect.StateMachine/Rules/ReductionEvaluator.cs - - Trax.Effect/src/Trax.Effect.StateMachine/MachineDefinition.cs - - Trax.Effect/src/Trax.Effect.StateMachine/Fluent.cs - - Trax.Effect/src/Trax.Effect.StateMachine/StorableJson.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/Rule.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/Reduction.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ContextSchema.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/DeclarativeModel.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/RuleEvaluator.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ReductionEvaluator.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/MachineDefinition.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Fluent.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/StorableJson.cs --- # Declarative data model diff --git a/Trax.Docs/sdk-reference/statemachine-api/i-snapshot-effect.md b/Trax.Docs/sdk-reference/statemachine-api/i-snapshot-effect.md index f423b75e3..79d2df69e 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/i-snapshot-effect.md +++ b/Trax.Docs/sdk-reference/statemachine-api/i-snapshot-effect.md @@ -9,8 +9,8 @@ nav_order: 7 package: Trax.Effect.StateMachine.Persistence namespace: Trax.Effect.StateMachine.Persistence source: - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Ports.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotEffectRunner.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Ports.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotEffectRunner.cs redirect_from: - /docs/sdk-reference/statemachine-api/effects --- diff --git a/Trax.Docs/sdk-reference/statemachine-api/invoked-run.md b/Trax.Docs/sdk-reference/statemachine-api/invoked-run.md index 3562d8282..ca68f44fb 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/invoked-run.md +++ b/Trax.Docs/sdk-reference/statemachine-api/invoked-run.md @@ -9,7 +9,7 @@ nav_order: 11 package: Trax.Effect.StateMachine.Persistence namespace: Trax.Effect.StateMachine.Persistence source: - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokedRun.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedRun.cs --- # InvokedRun diff --git a/Trax.Docs/sdk-reference/statemachine-api/ir-format.md b/Trax.Docs/sdk-reference/statemachine-api/ir-format.md index da8aea258..3b431e908 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/ir-format.md +++ b/Trax.Docs/sdk-reference/statemachine-api/ir-format.md @@ -9,9 +9,9 @@ nav_order: 5 package: Trax.Effect.StateMachine namespace: Trax.Effect.StateMachine source: - - Trax.Effect/src/Trax.Effect.StateMachine/Rules/IrExporter.cs - - Trax.Effect/src/Trax.Effect.StateMachine/Rules/SchemaReflection.cs - - Trax.Effect/src/Trax.Effect.StateMachine/Rules/ValueFormats.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/IrExporter.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/SchemaReflection.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ValueFormats.cs --- # IR format diff --git a/Trax.Docs/sdk-reference/statemachine-api/machine-conformance.md b/Trax.Docs/sdk-reference/statemachine-api/machine-conformance.md index 913137c78..d0b290ba9 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/machine-conformance.md +++ b/Trax.Docs/sdk-reference/statemachine-api/machine-conformance.md @@ -9,9 +9,9 @@ nav_order: 15 package: Trax.Effect.StateMachine.Testing namespace: Trax.Effect.StateMachine.Testing source: - - Trax.Effect/src/Trax.Effect.StateMachine.Testing/MachineConformance.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Testing/DifferentialCorpus.cs - - Trax.Effect/src/Trax.Effect.StateMachine/CorpusReplay.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/MachineConformance.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/DifferentialCorpus.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CorpusReplay.cs --- # MachineConformance diff --git a/Trax.Docs/sdk-reference/statemachine-api/machine-instances.md b/Trax.Docs/sdk-reference/statemachine-api/machine-instances.md index 58cd67e3e..a3aa9e0c3 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/machine-instances.md +++ b/Trax.Docs/sdk-reference/statemachine-api/machine-instances.md @@ -9,7 +9,7 @@ nav_order: 13 package: Trax.Effect.StateMachine.Persistence namespace: Trax.Effect.StateMachine.Persistence source: - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/MachineInstances.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineInstances.cs --- # IMachineInstances diff --git a/Trax.Docs/sdk-reference/statemachine-api/machine.md b/Trax.Docs/sdk-reference/statemachine-api/machine.md index 60b885324..bd2fc9a20 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/machine.md +++ b/Trax.Docs/sdk-reference/statemachine-api/machine.md @@ -9,11 +9,11 @@ nav_order: 2 package: Trax.Effect.StateMachine.Persistence namespace: Trax.Effect.StateMachine.Persistence source: - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Machine.cs - - Trax.Effect/src/Trax.Effect.StateMachine/Fluent.cs - - Trax.Effect/src/Trax.Effect.StateMachine/Invokes.cs - - Trax.Effect/src/Trax.Effect.StateMachine/Timers.cs - - Trax.Effect/src/Trax.Effect.StateMachine/MachineTrigger.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Machine.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Fluent.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Invokes.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Timers.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/MachineTrigger.cs redirect_from: - /docs/sdk-reference/statemachine-api/fluent-authoring --- diff --git a/Trax.Docs/sdk-reference/statemachine-api/migrations.md b/Trax.Docs/sdk-reference/statemachine-api/migrations.md index 38f6523f9..f95215637 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/migrations.md +++ b/Trax.Docs/sdk-reference/statemachine-api/migrations.md @@ -9,9 +9,9 @@ nav_order: 6 package: Trax.Effect.StateMachine namespace: Trax.Effect.StateMachine source: - - Trax.Effect/src/Trax.Effect.StateMachine/Fluent.cs - - Trax.Effect/src/Trax.Effect.StateMachine/SnapshotMachine.cs - - Trax.Effect/src/Trax.Effect.StateMachine/MachineDefinition.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Fluent.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/SnapshotMachine.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/MachineDefinition.cs --- # Migrations diff --git a/Trax.Docs/sdk-reference/statemachine-api/persistence-ports.md b/Trax.Docs/sdk-reference/statemachine-api/persistence-ports.md index d1ba4be7c..df0c14594 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/persistence-ports.md +++ b/Trax.Docs/sdk-reference/statemachine-api/persistence-ports.md @@ -9,16 +9,16 @@ nav_order: 8 package: Trax.Effect.StateMachine.Persistence namespace: Trax.Effect.StateMachine.Persistence source: - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Ports.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotDraftService.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Actor.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/CallerAuthorization.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/EfSnapshotStore.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/EffectClaimStore.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/IdempotentEffect.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/RequestIdRing.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotLimits.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotMachineRegistry.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Ports.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotDraftService.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Actor.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/CallerAuthorization.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/EfSnapshotStore.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/EffectClaimStore.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/IdempotentEffect.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/RequestIdRing.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotLimits.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotMachineRegistry.cs --- # Persistence ports diff --git a/Trax.Docs/sdk-reference/statemachine-api/result-codes.md b/Trax.Docs/sdk-reference/statemachine-api/result-codes.md index bf6a27231..b478afb21 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/result-codes.md +++ b/Trax.Docs/sdk-reference/statemachine-api/result-codes.md @@ -9,8 +9,8 @@ nav_order: 9 package: Trax.Effect.StateMachine namespace: Trax.Effect.StateMachine source: - - Trax.Effect/src/Trax.Effect.StateMachine/RefusalCode.cs - - Trax.Effect/src/Trax.Effect.StateMachine/Results.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/RefusalCode.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Results.cs --- # Result codes diff --git a/Trax.Docs/sdk-reference/statemachine-api/rules.md b/Trax.Docs/sdk-reference/statemachine-api/rules.md index 66074928e..dad0a8f1f 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/rules.md +++ b/Trax.Docs/sdk-reference/statemachine-api/rules.md @@ -9,8 +9,8 @@ nav_order: 3 package: Trax.Effect.StateMachine namespace: Trax.Effect.StateMachine source: - - Trax.Effect/src/Trax.Effect.StateMachine/Rules/Rules.cs - - Trax.Effect/src/Trax.Effect.StateMachine/Rules/MemberPath.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/Rules.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/MemberPath.cs --- # Rules diff --git a/Trax.Docs/sdk-reference/statemachine-api/runtime-integrity.md b/Trax.Docs/sdk-reference/statemachine-api/runtime-integrity.md index 732934d61..932f2445a 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/runtime-integrity.md +++ b/Trax.Docs/sdk-reference/statemachine-api/runtime-integrity.md @@ -9,9 +9,9 @@ nav_order: 10 package: Trax.Effect.StateMachine.Persistence namespace: Trax.Effect.StateMachine.Persistence source: - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotSelfCheck.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotMachineRegistry.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Machine.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotSelfCheck.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotMachineRegistry.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Machine.cs --- # Runtime integrity diff --git a/Trax.Docs/sdk-reference/testing/effect-statemachine-testing.md b/Trax.Docs/sdk-reference/testing/effect-statemachine-testing.md index d24ee9bd6..5dab8bed6 100644 --- a/Trax.Docs/sdk-reference/testing/effect-statemachine-testing.md +++ b/Trax.Docs/sdk-reference/testing/effect-statemachine-testing.md @@ -6,8 +6,8 @@ area: testing package: Trax.Effect.StateMachine.Testing namespace: Trax.Effect.StateMachine.Testing source: - - Trax.Effect/src/Trax.Effect.StateMachine.Testing/MachineConformance.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Testing/DifferentialCorpus.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/MachineConformance.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/DifferentialCorpus.cs parent: Testing grand_parent: SDK Reference nav_order: 5 diff --git a/Trax.Docs/statemachine.md b/Trax.Docs/statemachine.md index 1294b8c5c..b3d398987 100644 --- a/Trax.Docs/statemachine.md +++ b/Trax.Docs/statemachine.md @@ -5,8 +5,8 @@ type: explanation area: machines nav_order: 1 source: - - Trax.Effect/src/Trax.Effect.StateMachine - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence --- # State machines diff --git a/Trax.Docs/statemachine/authoring.md b/Trax.Docs/statemachine/authoring.md index 63c2c6dc9..e9b9bd7a9 100644 --- a/Trax.Docs/statemachine/authoring.md +++ b/Trax.Docs/statemachine/authoring.md @@ -5,8 +5,8 @@ type: how-to area: machines nav_order: 1 source: - - Trax.Effect/src/Trax.Effect.StateMachine/Fluent.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/StateMachinesBuilderExtensions.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Fluent.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachinesBuilderExtensions.cs --- # Author and serve a machine diff --git a/Trax.Docs/statemachine/canonical-wire.md b/Trax.Docs/statemachine/canonical-wire.md index e11271f5e..d0fb5fd22 100644 --- a/Trax.Docs/statemachine/canonical-wire.md +++ b/Trax.Docs/statemachine/canonical-wire.md @@ -5,8 +5,8 @@ type: reference area: machines nav_order: 20 source: - - Trax.Effect/src/Trax.Effect.StateMachine/CanonicalJson.cs - - Trax.Effect/src/Trax.Effect.StateMachine/StorableJson.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CanonicalJson.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/StorableJson.cs --- # Canonical wire diff --git a/Trax.Docs/statemachine/codegen-pipeline.md b/Trax.Docs/statemachine/codegen-pipeline.md index 5b0dddcb7..dc81e3cf2 100644 --- a/Trax.Docs/statemachine/codegen-pipeline.md +++ b/Trax.Docs/statemachine/codegen-pipeline.md @@ -5,9 +5,9 @@ type: explanation area: machines nav_order: 2 source: - - Trax.Effect/src/Trax.Effect.StateMachine/Rules/IrExporter.cs - - Trax.Effect/src/Trax.Effect.StateMachine/CorpusReplay.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Testing + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/IrExporter.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CorpusReplay.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing --- # The codegen pipeline diff --git a/Trax.Docs/statemachine/context-schemas.md b/Trax.Docs/statemachine/context-schemas.md index dccd03093..afb411d13 100644 --- a/Trax.Docs/statemachine/context-schemas.md +++ b/Trax.Docs/statemachine/context-schemas.md @@ -5,8 +5,8 @@ type: reference area: machines nav_order: 21 source: - - Trax.Effect/src/Trax.Effect.StateMachine/Rules/SchemaReflection.cs - - Trax.Effect/src/Trax.Effect.StateMachine/Rules/ContextSchema.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/SchemaReflection.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ContextSchema.cs --- # Context and input schemas diff --git a/Trax.Docs/statemachine/declarative-authoring.md b/Trax.Docs/statemachine/declarative-authoring.md index be6808a05..2b48d75c1 100644 --- a/Trax.Docs/statemachine/declarative-authoring.md +++ b/Trax.Docs/statemachine/declarative-authoring.md @@ -5,7 +5,7 @@ type: how-to area: machines nav_order: 2 source: - - Trax.Effect/src/Trax.Effect.StateMachine/Rules + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules --- # Write guards and reducers as data diff --git a/Trax.Docs/statemachine/generic-mutations.md b/Trax.Docs/statemachine/generic-mutations.md index d6ffe5150..5b62a4656 100644 --- a/Trax.Docs/statemachine/generic-mutations.md +++ b/Trax.Docs/statemachine/generic-mutations.md @@ -5,9 +5,9 @@ type: reference area: machines nav_order: 22 source: - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericContracts.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericTrains.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/StateMachineOptions.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericContracts.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericTrains.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineOptions.cs --- # Generic state-machine mutations diff --git a/Trax.Docs/statemachine/invoked-runs.md b/Trax.Docs/statemachine/invoked-runs.md index be8b4abdb..ae66ec5dc 100644 --- a/Trax.Docs/statemachine/invoked-runs.md +++ b/Trax.Docs/statemachine/invoked-runs.md @@ -5,11 +5,11 @@ type: reference area: machines nav_order: 23 source: - - Trax.Effect/src/Trax.Effect.StateMachine/Invokes.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeDelivery.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeReconciler.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokedRunOutcomes.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokesStartupValidator.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Invokes.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeDelivery.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeReconciler.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedRunOutcomes.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokesStartupValidator.cs - Trax.Mediator/src/Trax.Mediator/Services/InvokedTrains/InvokedTrainLauncher.cs --- diff --git a/Trax.Docs/statemachine/invoking-trains.md b/Trax.Docs/statemachine/invoking-trains.md index baf8e6723..9e247f19a 100644 --- a/Trax.Docs/statemachine/invoking-trains.md +++ b/Trax.Docs/statemachine/invoking-trains.md @@ -5,9 +5,9 @@ type: how-to area: machines nav_order: 3 source: - - Trax.Effect/src/Trax.Effect.StateMachine/Invokes.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokedTrainLauncher.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokesStartupValidator.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Invokes.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedTrainLauncher.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokesStartupValidator.cs --- # Invoke a train from a state diff --git a/Trax.Docs/statemachine/spawning-child-machines.md b/Trax.Docs/statemachine/spawning-child-machines.md index 5f946a3c4..375c5e417 100644 --- a/Trax.Docs/statemachine/spawning-child-machines.md +++ b/Trax.Docs/statemachine/spawning-child-machines.md @@ -5,9 +5,9 @@ type: how-to area: machines nav_order: 4 source: - - Trax.Effect/src/Trax.Effect.StateMachine/Invokes.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokeOutbox.cs - - Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SpawnsStartupValidator.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Invokes.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokeOutbox.cs + - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SpawnsStartupValidator.cs --- # Spawn a child machine from a state diff --git a/Trax.Docs/tests/Trax.Docs.Snippets.Tests/Tests/TestExcerptsNameTheirPagesTests.cs b/Trax.Docs/tests/Trax.Docs.Snippets.Tests/Tests/TestExcerptsNameTheirPagesTests.cs index 57db7681e..c7c1f9761 100644 --- a/Trax.Docs/tests/Trax.Docs.Snippets.Tests/Tests/TestExcerptsNameTheirPagesTests.cs +++ b/Trax.Docs/tests/Trax.Docs.Snippets.Tests/Tests/TestExcerptsNameTheirPagesTests.cs @@ -147,6 +147,7 @@ private static IEnumerable LibraryTestFiles() => Directory .EnumerateDirectories(RepoRoot.Monorepo, "Trax.*") .Where(folder => Path.GetFileName(folder) is not ("Trax.Samples" or "Trax.Docs")) + .SelectMany(f => new[] { f, Path.Combine(f, "dotnet") }) .Select(folder => Path.Combine(folder, "tests")) .Where(Directory.Exists) .SelectMany(tests => diff --git a/Trax.Docs/tests/Trax.Docs.Snippets.Tests/Trax.Docs.Snippets.Tests.csproj b/Trax.Docs/tests/Trax.Docs.Snippets.Tests/Trax.Docs.Snippets.Tests.csproj index 56e11b2a1..ac8e3b8ef 100644 --- a/Trax.Docs/tests/Trax.Docs.Snippets.Tests/Trax.Docs.Snippets.Tests.csproj +++ b/Trax.Docs/tests/Trax.Docs.Snippets.Tests/Trax.Docs.Snippets.Tests.csproj @@ -59,9 +59,9 @@ - - - + + + diff --git a/Trax.Docs/tests/Trax.Docs.Tests/Infrastructure/Projects.cs b/Trax.Docs/tests/Trax.Docs.Tests/Infrastructure/Projects.cs index ad4a30520..9404ef135 100644 --- a/Trax.Docs/tests/Trax.Docs.Tests/Infrastructure/Projects.cs +++ b/Trax.Docs/tests/Trax.Docs.Tests/Infrastructure/Projects.cs @@ -54,7 +54,11 @@ private static IReadOnlyDictionary Load() var baselines = Baselines(); var packages = new Dictionary(StringComparer.Ordinal); - foreach (var folder in Directory.EnumerateDirectories(RepoRoot.Monorepo, "Trax.*")) + foreach ( + var folder in Directory + .EnumerateDirectories(RepoRoot.Monorepo, "Trax.*") + .SelectMany(f => new[] { f, Path.Combine(f, "dotnet") }) + ) { var src = Path.Combine(folder, "src"); if (!Directory.Exists(src)) @@ -96,7 +100,11 @@ private static IReadOnlyDictionary Load() private static Dictionary Baselines() { var baselines = new Dictionary(StringComparer.Ordinal); - foreach (var folder in Directory.EnumerateDirectories(RepoRoot.Monorepo, "Trax.*")) + foreach ( + var folder in Directory + .EnumerateDirectories(RepoRoot.Monorepo, "Trax.*") + .SelectMany(f => new[] { f, Path.Combine(f, "dotnet") }) + ) { var tests = Path.Combine(folder, "tests"); if (!Directory.Exists(tests)) diff --git a/Trax.Docs/tests/Trax.Docs.Tests/Tests/CodeLinksToDocsResolveTests.cs b/Trax.Docs/tests/Trax.Docs.Tests/Tests/CodeLinksToDocsResolveTests.cs index 30bc1e4de..3e99447b5 100644 --- a/Trax.Docs/tests/Trax.Docs.Tests/Tests/CodeLinksToDocsResolveTests.cs +++ b/Trax.Docs/tests/Trax.Docs.Tests/Tests/CodeLinksToDocsResolveTests.cs @@ -10,7 +10,7 @@ namespace Trax.Docs.Tests.Tests; /// page they name was renamed, and nothing on the docs side knew they existed. A page that moves /// claims its old path in redirect_from, which this accepts, as the site does. /// -/// Scanned: every *.cs under a Trax.*/src/ folder (the packages, the analyzer +/// Scanned: every *.cs under a Trax.*/src/ or Trax.*/dotnet/src/ folder (the packages, the analyzer /// included), and under Trax.Samples/samples/ and Trax.Samples/templates/; and every /// *.ts and *.tsx of the operations console's app, whose help links and empty states /// send an operator to the docs (each term's glossary entry among them). @@ -135,6 +135,7 @@ string source { var roots = Directory .EnumerateDirectories(RepoRoot.Monorepo, "Trax.*") + .SelectMany(f => new[] { f, Path.Combine(f, "dotnet") }) .Select(folder => Path.Combine(folder, "src")) .Append(Path.Combine(RepoRoot.Monorepo, "Trax.Samples", "samples")) .Append(Path.Combine(RepoRoot.Monorepo, "Trax.Samples", "templates")); diff --git a/Trax.Docs/tests/Trax.Docs.Tests/Tests/PublicApiIsDocumentedTests.cs b/Trax.Docs/tests/Trax.Docs.Tests/Tests/PublicApiIsDocumentedTests.cs index 8ab818b21..81ff4d257 100644 --- a/Trax.Docs/tests/Trax.Docs.Tests/Tests/PublicApiIsDocumentedTests.cs +++ b/Trax.Docs/tests/Trax.Docs.Tests/Tests/PublicApiIsDocumentedTests.cs @@ -462,7 +462,11 @@ private static HashSet PublishedWords() private static IEnumerable<(string Assembly, string Path)> Baselines() { var monorepo = Directory.GetParent(RepoRoot.Path)!.FullName; - foreach (var folder in Directory.EnumerateDirectories(monorepo, "Trax.*")) + foreach ( + var folder in Directory + .EnumerateDirectories(monorepo, "Trax.*") + .SelectMany(f => new[] { f, Path.Combine(f, "dotnet") }) + ) { var tests = Path.Combine(folder, "tests"); if (!Directory.Exists(tests)) diff --git a/Trax.Docs/tests/Trax.Docs.Tests/Tests/SdkReferenceFrontMatterTests.cs b/Trax.Docs/tests/Trax.Docs.Tests/Tests/SdkReferenceFrontMatterTests.cs index e0fe897cc..b2b89a359 100644 --- a/Trax.Docs/tests/Trax.Docs.Tests/Tests/SdkReferenceFrontMatterTests.cs +++ b/Trax.Docs/tests/Trax.Docs.Tests/Tests/SdkReferenceFrontMatterTests.cs @@ -548,7 +548,7 @@ IReadOnlySet npm wrong.Add( surface == "typescript" ? $"package {package} is neither a packable project nor an npm package in the repository" - : $"package {package} is not a packable project (a csproj under a Trax.*/src/ folder)" + : $"package {package} is not a packable project (a csproj under a Trax.*/src/ or Trax.*/dotnet/src/ folder)" ); var namespaces = frontMatter.List("namespace"); diff --git a/Trax.Effect/Trax.Effect.slnx b/Trax.Effect/Trax.Effect.slnx index d4dd0da67..1d4673bf5 100644 --- a/Trax.Effect/Trax.Effect.slnx +++ b/Trax.Effect/Trax.Effect.slnx @@ -9,11 +9,6 @@ - - - - - @@ -38,8 +33,5 @@ - - - diff --git a/Trax.Effect/tests/Trax.Effect.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs b/Trax.Effect/tests/Trax.Effect.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs index f4c021f19..5cb9d1792 100644 --- a/Trax.Effect/tests/Trax.Effect.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs +++ b/Trax.Effect/tests/Trax.Effect.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs @@ -46,11 +46,12 @@ public void No_project_references_a_Trax_package_built_in_this_repository() /// /// The package id of every Trax project in the repository: the file name of each csproj under - /// a folder's src/. + /// a folder's src/, or its dotnet/src/ in a folder that holds more than .NET. /// private static HashSet TraxProjects() => Directory .EnumerateDirectories(MonorepoRoot.Path, "Trax.*") + .SelectMany(f => new[] { f, Path.Combine(f, "dotnet") }) .Select(folder => Path.Combine(folder, "src")) .Where(Directory.Exists) .SelectMany(src => diff --git a/Trax.Effect/tests/Trax.Effect.Tests.Meta/Trax.Effect.Tests.Meta.csproj b/Trax.Effect/tests/Trax.Effect.Tests.Meta/Trax.Effect.Tests.Meta.csproj index 820f1fe86..31a995632 100644 --- a/Trax.Effect/tests/Trax.Effect.Tests.Meta/Trax.Effect.Tests.Meta.csproj +++ b/Trax.Effect/tests/Trax.Effect.Tests.Meta/Trax.Effect.Tests.Meta.csproj @@ -35,9 +35,9 @@ - - - + + + diff --git a/Trax.Mediator/src/Trax.Mediator/Trax.Mediator.csproj b/Trax.Mediator/src/Trax.Mediator/Trax.Mediator.csproj index 6e0762132..c32bc3c65 100644 --- a/Trax.Mediator/src/Trax.Mediator/Trax.Mediator.csproj +++ b/Trax.Mediator/src/Trax.Mediator/Trax.Mediator.csproj @@ -24,6 +24,6 @@ - + diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs b/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs index 75a9d348b..9fc4775db 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs @@ -46,11 +46,12 @@ public void No_project_references_a_Trax_package_built_in_this_repository() /// /// The package id of every Trax project in the repository: the file name of each csproj under - /// a folder's src/. + /// a folder's src/, or its dotnet/src/ in a folder that holds more than .NET. /// private static HashSet TraxProjects() => Directory .EnumerateDirectories(MonorepoRoot.Path, "Trax.*") + .SelectMany(f => new[] { f, Path.Combine(f, "dotnet") }) .Select(folder => Path.Combine(folder, "src")) .Where(Directory.Exists) .SelectMany(src => diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/Trax.Mediator.Tests.Meta.csproj b/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/Trax.Mediator.Tests.Meta.csproj index 8323b832a..99b5fe613 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/Trax.Mediator.Tests.Meta.csproj +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/Trax.Mediator.Tests.Meta.csproj @@ -22,7 +22,7 @@ - + diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Trax.Mediator.Tests.StateMachine.Integration.csproj b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Trax.Mediator.Tests.StateMachine.Integration.csproj index 682d9cf33..98b21ecee 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Trax.Mediator.Tests.StateMachine.Integration.csproj +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Trax.Mediator.Tests.StateMachine.Integration.csproj @@ -28,7 +28,7 @@ - + diff --git a/Trax.Samples/book/Shopfront/Directory.Build.targets b/Trax.Samples/book/Shopfront/Directory.Build.targets index 5b772abbd..fffa19e43 100644 --- a/Trax.Samples/book/Shopfront/Directory.Build.targets +++ b/Trax.Samples/book/Shopfront/Directory.Build.targets @@ -9,8 +9,8 @@ --> <_TraxSourceProject - Include="$(MSBuildThisFileDirectory)../../../Trax.*/src/**/*.csproj" - Exclude="$(MSBuildThisFileDirectory)../../../Trax.*/src/**/bin/**;$(MSBuildThisFileDirectory)../../../Trax.*/src/**/obj/**" + Include="$(MSBuildThisFileDirectory)../../../Trax.*/src/**/*.csproj;$(MSBuildThisFileDirectory)../../../Trax.*/dotnet/src/**/*.csproj" + Exclude="$(MSBuildThisFileDirectory)../../../Trax.*/src/**/bin/**;$(MSBuildThisFileDirectory)../../../Trax.*/src/**/obj/**;$(MSBuildThisFileDirectory)../../../Trax.*/dotnet/src/**/bin/**;$(MSBuildThisFileDirectory)../../../Trax.*/dotnet/src/**/obj/**" ProjectPath="%(FullPath)" /> diff --git a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trax.Samples.Recovery.csproj b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trax.Samples.Recovery.csproj index b0ee2c02a..49a901a29 100644 --- a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trax.Samples.Recovery.csproj +++ b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trax.Samples.Recovery.csproj @@ -13,8 +13,8 @@ - - + + diff --git a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine.Api/Trax.Samples.StateMachine.Api.csproj b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine.Api/Trax.Samples.StateMachine.Api.csproj index 46ce929f9..cb0f4edb4 100644 --- a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine.Api/Trax.Samples.StateMachine.Api.csproj +++ b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine.Api/Trax.Samples.StateMachine.Api.csproj @@ -15,7 +15,7 @@ - + diff --git a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/Trax.Samples.StateMachine.csproj b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/Trax.Samples.StateMachine.csproj index 4a7af9ff6..bb5f7dba5 100644 --- a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/Trax.Samples.StateMachine.csproj +++ b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/Trax.Samples.StateMachine.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/Trax.Samples/templates/Trax.Samples.Templates.csproj b/Trax.Samples/templates/Trax.Samples.Templates.csproj index 19e6f11ee..c614fac70 100644 --- a/Trax.Samples/templates/Trax.Samples.Templates.csproj +++ b/Trax.Samples/templates/Trax.Samples.Templates.csproj @@ -48,10 +48,10 @@ $([System.String]::Copy('%(RecursiveDir)').Replace('\', '/').Split('/')[0]) - + <_TraxPackageProject - Include="../../Trax.*/src/**/*.csproj" - Exclude="../../Trax.*/src/**/bin/**;../../Trax.*/src/**/obj/**" + Include="../../Trax.*/src/**/*.csproj;../../Trax.*/dotnet/src/**/*.csproj" + Exclude="../../Trax.*/src/**/bin/**;../../Trax.*/src/**/obj/**;../../Trax.*/dotnet/src/**/bin/**;../../Trax.*/dotnet/src/**/obj/**" /> <_TraxPackageId Include="@(_TraxPackageProject->'%(Filename)')" /> diff --git a/Trax.Samples/templates/content/Directory.Build.targets b/Trax.Samples/templates/content/Directory.Build.targets index ed0383f5b..b5558984d 100644 --- a/Trax.Samples/templates/content/Directory.Build.targets +++ b/Trax.Samples/templates/content/Directory.Build.targets @@ -9,8 +9,8 @@ --> <_TraxSourceProject - Include="$(MSBuildThisFileDirectory)../../../Trax.*/src/**/*.csproj" - Exclude="$(MSBuildThisFileDirectory)../../../Trax.*/src/**/bin/**;$(MSBuildThisFileDirectory)../../../Trax.*/src/**/obj/**" + Include="$(MSBuildThisFileDirectory)../../../Trax.*/src/**/*.csproj;$(MSBuildThisFileDirectory)../../../Trax.*/dotnet/src/**/*.csproj" + Exclude="$(MSBuildThisFileDirectory)../../../Trax.*/src/**/bin/**;$(MSBuildThisFileDirectory)../../../Trax.*/src/**/obj/**;$(MSBuildThisFileDirectory)../../../Trax.*/dotnet/src/**/bin/**;$(MSBuildThisFileDirectory)../../../Trax.*/dotnet/src/**/obj/**" ProjectPath="%(FullPath)" /> diff --git a/Trax.Samples/tests/Trax.Samples.Templates.Tests/Utils/ScaffoldFeed.cs b/Trax.Samples/tests/Trax.Samples.Templates.Tests/Utils/ScaffoldFeed.cs index 03b82255c..035cb0d89 100644 --- a/Trax.Samples/tests/Trax.Samples.Templates.Tests/Utils/ScaffoldFeed.cs +++ b/Trax.Samples/tests/Trax.Samples.Templates.Tests/Utils/ScaffoldFeed.cs @@ -205,6 +205,7 @@ private static string TraxProject(string id) var monorepo = Path.GetDirectoryName(RepoRoot())!; return Directory .EnumerateDirectories(monorepo, "Trax.*") + .SelectMany(f => new[] { f, Path.Combine(f, "dotnet") }) .Select(folder => Path.Combine(folder, "src", id, id + ".csproj")) .SingleOrDefault(File.Exists) ?? throw new InvalidOperationException( diff --git a/Trax.Samples/tests/Trax.Samples.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs b/Trax.Samples/tests/Trax.Samples.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs index a80579839..5ea73cc55 100644 --- a/Trax.Samples/tests/Trax.Samples.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs +++ b/Trax.Samples/tests/Trax.Samples.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs @@ -47,11 +47,12 @@ public void No_project_references_a_Trax_package_built_in_this_repository() /// /// The package id of every Trax project in the repository: the file name of each csproj under - /// a folder's src/. + /// a folder's src/, or its dotnet/src/ in a folder that holds more than .NET. /// private static HashSet TraxProjects() => Directory .EnumerateDirectories(MonorepoRoot.Path, "Trax.*") + .SelectMany(f => new[] { f, Path.Combine(f, "dotnet") }) .Select(folder => Path.Combine(folder, "src")) .Where(Directory.Exists) .SelectMany(src => diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs index d9c77bc8a..e04e526ea 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs @@ -46,11 +46,12 @@ public void No_project_references_a_Trax_package_built_in_this_repository() /// /// The package id of every Trax project in the repository: the file name of each csproj under - /// a folder's src/. + /// a folder's src/, or its dotnet/src/ in a folder that holds more than .NET. /// private static HashSet TraxProjects() => Directory .EnumerateDirectories(MonorepoRoot.Path, "Trax.*") + .SelectMany(f => new[] { f, Path.Combine(f, "dotnet") }) .Select(folder => Path.Combine(folder, "src")) .Where(Directory.Exists) .SelectMany(src => diff --git a/Trax.StateMachine/.gitignore b/Trax.StateMachine/.gitignore new file mode 100644 index 000000000..2eaf8b12e --- /dev/null +++ b/Trax.StateMachine/.gitignore @@ -0,0 +1,151 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +[Bb]in/ +[Oo]bj/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*_i.h +*.ilk +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.svclog +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml +*.pubxml +*.azurePubxml + +# NuGet Packages Directory +## TODO: If you have NuGet Package Restore enabled, uncomment the next line +packages/ +## TODO: If the tool you use requires repositories.config, also uncomment the next line +!packages/repositories.config + +# Windows Azure Build Output +csx/ +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +![Ss]tyle[Cc]op.targets +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml + +*.publishsettings + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + +# ========================= +# Windows detritus +# ========================= + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac desktop service store files +.DS_Store + +_NCrunch* + +*.idea + +.vscode/* + +# VSCode extension packages +*.vsix + +# BenchmarkDotNet +BenchmarkDotNet.Artifacts/ +# Semantic Release version file +.release-version + +# Node modules (semantic-release) +node_modules/ + +# MSBuild static graph restore cache +*.csproj.lscache + diff --git a/Trax.StateMachine/LICENSE b/Trax.StateMachine/LICENSE new file mode 100644 index 000000000..7aa0abaed --- /dev/null +++ b/Trax.StateMachine/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Theaux Masquelier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Trax.StateMachine/SECURITY.md b/Trax.StateMachine/SECURITY.md new file mode 100644 index 000000000..07ecba48a --- /dev/null +++ b/Trax.StateMachine/SECURITY.md @@ -0,0 +1,15 @@ +# Security Policy + +## Reporting a vulnerability + +Report security issues privately through GitHub's [private vulnerability reporting](https://github.com/TraxSharp/Trax/security/advisories/new), not a public issue. We aim to acknowledge within 3 business days. + +Where possible, include the affected package and version, a description, reproduction steps or a proof of concept, and the impact. + +## Supported versions + +Fixes ship against the latest version published to NuGet. Older major versions are not backported. + +## Supply-chain posture + +Trax builds and publishes through a defense-in-depth pipeline: SHA-pinned actions, isolated release credentials, OIDC trusted publishing with SLSA provenance, and locked + audited dependencies (a known-vulnerability advisory fails the build). See the [Supply Chain Security](https://traxsharp.net/docs/security/supply-chain) guide. diff --git a/Trax.StateMachine/dotnet/.config/dotnet-tools.json b/Trax.StateMachine/dotnet/.config/dotnet-tools.json new file mode 100644 index 000000000..83bcc1bc6 --- /dev/null +++ b/Trax.StateMachine/dotnet/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "csharpier": { + "version": "1.3.0", + "commands": [ + "csharpier" + ] + } + } +} \ No newline at end of file diff --git a/Trax.StateMachine/dotnet/Directory.Build.props b/Trax.StateMachine/dotnet/Directory.Build.props new file mode 100644 index 000000000..3af1e1b72 --- /dev/null +++ b/Trax.StateMachine/dotnet/Directory.Build.props @@ -0,0 +1,57 @@ + + + 1.99.99 + + all + $(WarningsAsErrors);NU1901;NU1902;NU1903;NU1904 + + + + + true + + + + + Theauxm,mark-keaton + MIT + https://github.com/TraxSharp/Trax + git + https://traxsharp.net/docs + trax;dotnet;effects;trains;junctions;railway-oriented-programming + README.md + + + + + + + + + + true + 1.63.1 + + true + + + + + + diff --git a/Trax.StateMachine/dotnet/README.md b/Trax.StateMachine/dotnet/README.md new file mode 100644 index 000000000..c15917744 --- /dev/null +++ b/Trax.StateMachine/dotnet/README.md @@ -0,0 +1,73 @@ +# Trax.Effect.StateMachine + +[![Build](https://github.com/TraxSharp/Trax/actions/workflows/release.yml/badge.svg?branch=main)](https://github.com/TraxSharp/Trax/actions/workflows/release.yml?query=branch%3Amain) +[![NuGet](https://img.shields.io/nuget/v/Trax.Effect.StateMachine)](https://www.nuget.org/packages/Trax.Effect.StateMachine) +[![codecov](https://codecov.io/gh/TraxSharp/Trax/branch/main/graph/badge.svg?flag=Trax.StateMachine)](https://app.codecov.io/gh/TraxSharp/Trax?flags%5B0%5D=Trax.StateMachine) +[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/TraxSharp/Trax/blob/main/Trax.StateMachine/LICENSE) +[![Docs](https://img.shields.io/badge/docs-traxsharp.net-blue)](https://traxsharp.net/docs/statemachine) + +> Part of [Trax .NET](https://github.com/TraxSharp): business logic you can call, schedule, or serve as an API, with every +> run recorded in your Postgres. [Docs](https://traxsharp.net/docs) · [Getting started](https://traxsharp.net/docs/getting-started) · [Repository](https://github.com/TraxSharp/Trax) + +Trax.Effect.StateMachine is the portable state-machine engine: a multi-step flow's state as language-neutral JSON, with +each event's guard, reducer and caller rule declared as data. `Trax.Effect.StateMachine.Persistence` stores each +instance per user, runs a machine's one irreversible effect exactly once, and lets a state invoke a train. +`@traxsharp/state-machine` on npm runs the same machine in the browser. + +## Install + +```bash +dotnet add package Trax.Effect.StateMachine.Persistence +dotnet add package Trax.Effect.StateMachine.Testing # in a test project +``` + +## Example + +From [Author and serve a machine](https://traxsharp.net/docs/statemachine/authoring): + +```csharp +[TraxMachine] +public sealed class CheckoutMachine : Machine +{ + protected override void Configure(IMachineBuilder m) + { + m.Id("checkout").Version(1) /* start, rules on Get, Watch and Discard */; + + m.In(CheckoutState.Review) + .Context() + .On(CheckoutTrigger.Pay) + .AnyAuthenticated() + .WithInput() + .RunsOnce("checkout:charge") + .To(CheckoutState.Paid); + + m.In(CheckoutState.Paid).Context().Committed(); + } +} + +builder.Services.AddTrax(trax => + trax.AddEffects(effects => effects.UsePostgres(connectionString)) + .AddStateMachines(typeof(CheckoutMachine).Assembly) + .AddMediator(typeof(CheckoutMachine).Assembly)); +``` + +The server runs `ICharge` once per send and fires `Pay` with its receipt. A client never fires `Pay` itself. + +## Where this fits + +This folder sits between Trax.Effect, whose trains a machine invokes and whose tables it is stored in, and +Trax.Mediator, which launches those trains. It holds the C# engine (`dotnet/`), the TypeScript engine (`ts/`) and the +conformance kit both are checked against (`conformance/`). Docs are at +[traxsharp.net/docs/statemachine](https://traxsharp.net/docs/statemachine). + +## Contributing + +Read [AGENTS.md](https://github.com/TraxSharp/Trax/blob/main/Trax.StateMachine/AGENTS.md) before changing code. Report +vulnerabilities privately as described in [SECURITY.md](https://github.com/TraxSharp/Trax/blob/main/Trax.StateMachine/SECURITY.md). + +## License + +MIT. There is no commercial edition, and there will not be one. + +Trax .NET is an independent open-source project and is not affiliated with the Utah Transit Authority, Trax Retail, or any +other organization using the Trax name. diff --git a/Trax.StateMachine/dotnet/Trax.StateMachine.slnx b/Trax.StateMachine/dotnet/Trax.StateMachine.slnx new file mode 100644 index 000000000..924a61a09 --- /dev/null +++ b/Trax.StateMachine/dotnet/Trax.StateMachine.slnx @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Actor.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Actor.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Actor.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Actor.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/CallerAuthorization.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/CallerAuthorization.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/CallerAuthorization.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/CallerAuthorization.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/ChangeFeedStartupValidator.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/ChangeFeedStartupValidator.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/ChangeFeedStartupValidator.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/ChangeFeedStartupValidator.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/CompatibilitySuppressions.xml b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/CompatibilitySuppressions.xml similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/CompatibilitySuppressions.xml rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/CompatibilitySuppressions.xml diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/DraftClaimHold.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/DraftClaimHold.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/DraftClaimHold.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/DraftClaimHold.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/DraftSweeper.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/DraftSweeper.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/DraftSweeper.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/DraftSweeper.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/EfSnapshotStore.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/EfSnapshotStore.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/EfSnapshotStore.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/EfSnapshotStore.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/EffectClaimStore.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/EffectClaimStore.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/EffectClaimStore.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/EffectClaimStore.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/ISnapshotChangeListener.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/ISnapshotChangeListener.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/ISnapshotChangeListener.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/ISnapshotChangeListener.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/IdempotentEffect.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/IdempotentEffect.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/IdempotentEffect.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/IdempotentEffect.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokeOutbox.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokeOutbox.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokeOutbox.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokeOutbox.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeDelivery.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeDelivery.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeDelivery.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeDelivery.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeReconciler.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeReconciler.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeReconciler.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeReconciler.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokedRun.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedRun.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokedRun.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedRun.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokedRunCancellation.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedRunCancellation.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokedRunCancellation.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedRunCancellation.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokedRunOutcomes.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedRunOutcomes.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokedRunOutcomes.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedRunOutcomes.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokedTrainLauncher.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedTrainLauncher.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokedTrainLauncher.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedTrainLauncher.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokesStartupValidator.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokesStartupValidator.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/InvokesStartupValidator.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokesStartupValidator.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Machine.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Machine.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Machine.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Machine.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/MachineCensus.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineCensus.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/MachineCensus.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineCensus.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/MachineGraph.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineGraph.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/MachineGraph.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineGraph.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/MachineIdStartupValidator.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineIdStartupValidator.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/MachineIdStartupValidator.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineIdStartupValidator.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/MachineInstanceStore.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineInstanceStore.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/MachineInstanceStore.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineInstanceStore.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/MachineInstances.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineInstances.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/MachineInstances.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineInstances.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/MachineRulesStartupValidator.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineRulesStartupValidator.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/MachineRulesStartupValidator.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineRulesStartupValidator.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/MachineSchemaStartupValidator.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineSchemaStartupValidator.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/MachineSchemaStartupValidator.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineSchemaStartupValidator.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericContracts.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericContracts.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericContracts.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericContracts.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericJunctions.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericJunctions.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericJunctions.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericJunctions.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericMarkers.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericMarkers.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericMarkers.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericMarkers.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericTrains.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericTrains.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericTrains.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericTrains.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Mutations/StateMachineMutations.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/StateMachineMutations.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Mutations/StateMachineMutations.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/StateMachineMutations.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Ports.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Ports.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Ports.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Ports.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/RequestIdRing.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/RequestIdRing.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/RequestIdRing.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/RequestIdRing.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotChangeListener.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotChangeListener.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotChangeListener.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotChangeListener.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotDraftService.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotDraftService.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotDraftService.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotDraftService.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotEffectRunner.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotEffectRunner.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotEffectRunner.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotEffectRunner.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotFingerprint.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotFingerprint.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotFingerprint.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotFingerprint.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotLimits.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotLimits.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotLimits.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotLimits.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotMachineRegistry.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotMachineRegistry.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotMachineRegistry.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotMachineRegistry.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotOwner.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotOwner.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotOwner.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotOwner.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotSelfCheck.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotSelfCheck.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotSelfCheck.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotSelfCheck.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotWatchHub.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotWatchHub.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotWatchHub.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotWatchHub.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotWriteSignal.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotWriteSignal.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SnapshotWriteSignal.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotWriteSignal.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SpawnedEnds.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SpawnedEnds.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SpawnedEnds.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SpawnedEnds.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SpawnsStartupValidator.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SpawnsStartupValidator.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/SpawnsStartupValidator.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SpawnsStartupValidator.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/StartDeclarationValidator.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StartDeclarationValidator.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/StartDeclarationValidator.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StartDeclarationValidator.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/StateMachineInstruments.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineInstruments.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/StateMachineInstruments.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineInstruments.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/StateMachineOptions.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineOptions.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/StateMachineOptions.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineOptions.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/StateMachineSelfCheckHealthCheck.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineSelfCheckHealthCheck.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/StateMachineSelfCheckHealthCheck.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineSelfCheckHealthCheck.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/StateMachinesBuilderExtensions.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachinesBuilderExtensions.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/StateMachinesBuilderExtensions.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachinesBuilderExtensions.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/TimerFireResult.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/TimerFireResult.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/TimerFireResult.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/TimerFireResult.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/TransitionNote.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/TransitionNote.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/TransitionNote.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/TransitionNote.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Trax.Effect.StateMachine.Persistence.csproj b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Trax.Effect.StateMachine.Persistence.csproj similarity index 94% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Trax.Effect.StateMachine.Persistence.csproj rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Trax.Effect.StateMachine.Persistence.csproj index 2d8c13f80..22c46862e 100644 --- a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/Trax.Effect.StateMachine.Persistence.csproj +++ b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Trax.Effect.StateMachine.Persistence.csproj @@ -10,9 +10,9 @@ - + - + diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Persistence/packages.lock.json b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/packages.lock.json similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Persistence/packages.lock.json rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/packages.lock.json diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Testing/DifferentialCorpus.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/DifferentialCorpus.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Testing/DifferentialCorpus.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/DifferentialCorpus.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Testing/MachineConformance.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/MachineConformance.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Testing/MachineConformance.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/MachineConformance.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Testing/Trax.Effect.StateMachine.Testing.csproj b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/Trax.Effect.StateMachine.Testing.csproj similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Testing/Trax.Effect.StateMachine.Testing.csproj rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/Trax.Effect.StateMachine.Testing.csproj diff --git a/Trax.Effect/src/Trax.Effect.StateMachine.Testing/packages.lock.json b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/packages.lock.json similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine.Testing/packages.lock.json rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/packages.lock.json diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/CallerRule.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CallerRule.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/CallerRule.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CallerRule.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/CanonicalJson.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CanonicalJson.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/CanonicalJson.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CanonicalJson.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/ClientManifest.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/ClientManifest.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/ClientManifest.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/ClientManifest.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/CompatibilitySuppressions.xml b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CompatibilitySuppressions.xml similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/CompatibilitySuppressions.xml rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CompatibilitySuppressions.xml diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/CorpusReplay.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CorpusReplay.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/CorpusReplay.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CorpusReplay.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/Fluent.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Fluent.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/Fluent.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Fluent.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/Invokes.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Invokes.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/Invokes.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Invokes.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/MachineDefinition.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/MachineDefinition.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/MachineDefinition.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/MachineDefinition.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/MachineTrigger.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/MachineTrigger.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/MachineTrigger.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/MachineTrigger.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/RefusalCode.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/RefusalCode.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/RefusalCode.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/RefusalCode.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/Results.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Results.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/Results.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Results.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/Rules/ContextSchema.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ContextSchema.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/Rules/ContextSchema.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ContextSchema.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/Rules/DeclarativeModel.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/DeclarativeModel.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/Rules/DeclarativeModel.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/DeclarativeModel.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/Rules/IrExporter.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/IrExporter.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/Rules/IrExporter.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/IrExporter.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/Rules/MemberPath.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/MemberPath.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/Rules/MemberPath.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/MemberPath.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/Rules/Reduction.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/Reduction.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/Rules/Reduction.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/Reduction.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/Rules/ReductionEvaluator.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ReductionEvaluator.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/Rules/ReductionEvaluator.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ReductionEvaluator.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/Rules/Rule.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/Rule.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/Rules/Rule.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/Rule.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/Rules/RuleEvaluator.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/RuleEvaluator.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/Rules/RuleEvaluator.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/RuleEvaluator.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/Rules/Rules.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/Rules.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/Rules/Rules.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/Rules.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/Rules/SchemaReflection.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/SchemaReflection.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/Rules/SchemaReflection.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/SchemaReflection.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/Rules/SchemaValidator.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/SchemaValidator.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/Rules/SchemaValidator.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/SchemaValidator.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/Rules/ValueFormats.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ValueFormats.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/Rules/ValueFormats.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ValueFormats.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/Snapshot.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Snapshot.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/Snapshot.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Snapshot.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/SnapshotMachine.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/SnapshotMachine.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/SnapshotMachine.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/SnapshotMachine.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/StartDeclaration.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/StartDeclaration.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/StartDeclaration.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/StartDeclaration.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/StorableJson.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/StorableJson.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/StorableJson.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/StorableJson.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/Timers.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Timers.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/Timers.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Timers.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/TransitionDefinition.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/TransitionDefinition.cs similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/TransitionDefinition.cs rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/TransitionDefinition.cs diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/Trax.Effect.StateMachine.csproj b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Trax.Effect.StateMachine.csproj similarity index 94% rename from Trax.Effect/src/Trax.Effect.StateMachine/Trax.Effect.StateMachine.csproj rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Trax.Effect.StateMachine.csproj index c5f0d2561..8545de595 100644 --- a/Trax.Effect/src/Trax.Effect.StateMachine/Trax.Effect.StateMachine.csproj +++ b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Trax.Effect.StateMachine.csproj @@ -9,7 +9,7 @@ - + diff --git a/Trax.Effect/src/Trax.Effect.StateMachine/packages.lock.json b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/packages.lock.json similarity index 100% rename from Trax.Effect/src/Trax.Effect.StateMachine/packages.lock.json rename to Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/packages.lock.json diff --git a/Trax.StateMachine/dotnet/tests/Directory.Build.props b/Trax.StateMachine/dotnet/tests/Directory.Build.props new file mode 100644 index 000000000..a78cd345a --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Directory.Build.props @@ -0,0 +1,15 @@ + + + + + + + + + + diff --git a/Trax.StateMachine/dotnet/tests/RedAttribute.cs b/Trax.StateMachine/dotnet/tests/RedAttribute.cs new file mode 100644 index 000000000..c5b9e685a --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/RedAttribute.cs @@ -0,0 +1,87 @@ +// Linked into every test project of this folder by tests/Directory.Build.props. Each folder keeps its own +// identical copy, because a folder never references another folder's tests. +using NUnit.Framework; +using NUnit.Framework.Interfaces; +using NUnit.Framework.Internal; +using NUnit.Framework.Internal.Commands; + +namespace Trax.Testing.Red; + +/// +/// Marks a test written before the code it tests: it runs, and its verdict is inverted. A red test that fails or +/// errors is reported as passed, with the original failure's first line in the message; a red test that passes is +/// reported as failed, because the code has arrived and the attribute must come off. A skipped, ignored or +/// inconclusive result is left as it is. The test also carries the category Red and the property +/// red holding . +/// +/// +/// NUnit reads a method wrapper from the test method only, so the attribute goes on each test method; it cannot +/// be put on a fixture. It applies to every case of a [TestCase] or [TestCaseSource] method, and +/// to an async test once its task has completed. +/// +/// What the test is waiting for, shown in its result message. +[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] +internal sealed class RedAttribute(string because) : Attribute, IWrapTestMethod, IApplyToTest +{ + /// The category every red test carries. + public const string Category = "Red"; + + /// The name of the property holding why the test is red. + public const string PropertyName = "red"; + + /// What the test is waiting for. + public string Because { get; } = because; + + /// + public void ApplyToTest(Test test) + { + test.Properties.Add(PropertyNames.Category, Category); + test.Properties.Add(PropertyName, Because); + } + + /// + public TestCommand Wrap(TestCommand command) => new InvertedVerdictCommand(command, Because); + + private sealed class InvertedVerdictCommand(TestCommand inner, string because) + : DelegatingTestCommand(inner) + { + public override TestResult Execute(TestExecutionContext context) + { + try + { + context.CurrentResult = innerCommand.Execute(context); + } + catch (Exception ex) + { + // The test method's own exception (an assertion included) reaches here: nothing inside the + // wrapper records it. + context.CurrentResult.RecordException(ex); + } + + var result = context.CurrentResult; + var state = result.ResultState; + + if (state.Status == TestStatus.Failed && state.Label != ResultState.Cancelled.Label) + result.SetResult( + ResultState.Success, + $"Red as expected ({because}): {FirstLine(result.Message)}" + ); + else if (state.Status == TestStatus.Passed) + result.SetResult( + ResultState.Failure, + $"Passed while marked [Red] ({because}): remove the attribute" + ); + + return result; + } + + private static string FirstLine(string? message) + { + if (string.IsNullOrWhiteSpace(message)) + return "(no message)"; + var trimmed = message.TrimStart(); + var end = trimmed.IndexOfAny(['\r', '\n']); + return end < 0 ? trimmed : trimmed[..end]; + } + } +} diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/ActorHierarchyTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ActorHierarchyTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/ActorHierarchyTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ActorHierarchyTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/AddStateMachinesBuilderTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/AddStateMachinesBuilderTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/AddStateMachinesBuilderTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/AddStateMachinesBuilderTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/ChangeFeedStartupValidatorTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ChangeFeedStartupValidatorTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/ChangeFeedStartupValidatorTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ChangeFeedStartupValidatorTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/ChangeFeedSwitchTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ChangeFeedSwitchTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/ChangeFeedSwitchTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ChangeFeedSwitchTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/ClientDivergenceMeterTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ClientDivergenceMeterTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/ClientDivergenceMeterTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ClientDivergenceMeterTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardEffectTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardEffectTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardEffectTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardEffectTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardRuleTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardRuleTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardRuleTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardRuleTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftLifetimeTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftLifetimeTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftLifetimeTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftLifetimeTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftMachineScopeTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftMachineScopeTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftMachineScopeTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftMachineScopeTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftWriteRulesTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftWriteRulesTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftWriteRulesTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftWriteRulesTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/EfSnapshotStoreTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EfSnapshotStoreTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/EfSnapshotStoreTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EfSnapshotStoreTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectAndHandshakeDefectTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectAndHandshakeDefectTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectAndHandshakeDefectTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectAndHandshakeDefectTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectClaimStoreTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectClaimStoreTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectClaimStoreTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectClaimStoreTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectCommitIntegrityTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectCommitIntegrityTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectCommitIntegrityTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectCommitIntegrityTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectPendingTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectPendingTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectPendingTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectPendingTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/EventAuthorizationTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EventAuthorizationTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/EventAuthorizationTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EventAuthorizationTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/EventRuleStartupTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EventRuleStartupTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/EventRuleStartupTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EventRuleStartupTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/BuildMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/BuildMachine.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/BuildMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/BuildMachine.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/DeclarativeTurnstileMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/DeclarativeTurnstileMachine.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/DeclarativeTurnstileMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/DeclarativeTurnstileMachine.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/Effects.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/Effects.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/Effects.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/Effects.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/FluentMachines.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/FluentMachines.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/FluentMachines.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/FluentMachines.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/PendingEffectMachines.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/PendingEffectMachines.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/PendingEffectMachines.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/PendingEffectMachines.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RecordingLauncher.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RecordingLauncher.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RecordingLauncher.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RecordingLauncher.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RevisionMachines.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RevisionMachines.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RevisionMachines.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RevisionMachines.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RuledMachines.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RuledMachines.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RuledMachines.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RuledMachines.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/SpawnMachines.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/SpawnMachines.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/SpawnMachines.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/SpawnMachines.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/SystemMachines.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/SystemMachines.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/SystemMachines.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/SystemMachines.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TestOrder.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TestOrder.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TestOrder.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TestOrder.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TestTurnstile.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TestTurnstile.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TestTurnstile.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TestTurnstile.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TimerMachines.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TimerMachines.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TimerMachines.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TimerMachines.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TimerSweepMachines.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TimerSweepMachines.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TimerSweepMachines.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TimerSweepMachines.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/CheckTraxInvariantsAttribute.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/CheckTraxInvariantsAttribute.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/CheckTraxInvariantsAttribute.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/CheckTraxInvariantsAttribute.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/CountingDataContextFactory.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/CountingDataContextFactory.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/CountingDataContextFactory.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/CountingDataContextFactory.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/InstanceHost.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/InstanceHost.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/InstanceHost.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/InstanceHost.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/Marked.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/Marked.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/Marked.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/Marked.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PausingSnapshotStore.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PausingSnapshotStore.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PausingSnapshotStore.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PausingSnapshotStore.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PendingHarness.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PendingHarness.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PendingHarness.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PendingHarness.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PostgresSetup.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PostgresSetup.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PostgresSetup.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PostgresSetup.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/RawSql.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/RawSql.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/RawSql.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/RawSql.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/ScratchDatabase.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/ScratchDatabase.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/ScratchDatabase.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/ScratchDatabase.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SkewedDatabaseClock.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SkewedDatabaseClock.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SkewedDatabaseClock.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SkewedDatabaseClock.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SnapshotNotices.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SnapshotNotices.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SnapshotNotices.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SnapshotNotices.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SqliteDb.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SqliteDb.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SqliteDb.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SqliteDb.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/StartingHost.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/StartingHost.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/StartingHost.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/StartingHost.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/TestDb.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/TestDb.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/TestDb.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/TestDb.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/TestPostgres.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/TestPostgres.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/TestPostgres.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/TestPostgres.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/GenericRulesTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/GenericRulesTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/GenericRulesTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/GenericRulesTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/GenericSaveTimerTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/GenericSaveTimerTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/GenericSaveTimerTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/GenericSaveTimerTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/IdempotentEffectTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/IdempotentEffectTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/IdempotentEffectTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/IdempotentEffectTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokeTokenStoreTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokeTokenStoreTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokeTokenStoreTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokeTokenStoreTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokedRunLimitTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokedRunLimitTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokedRunLimitTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokedRunLimitTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokedRunOutputTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokedRunOutputTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokedRunOutputTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokedRunOutputTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokesDraftExpiryTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokesDraftExpiryTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokesDraftExpiryTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokesDraftExpiryTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokesReservedStateTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokesReservedStateTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokesReservedStateTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokesReservedStateTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineCensusTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineCensusTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineCensusTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineCensusTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineConformanceTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineConformanceTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineConformanceTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineConformanceTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineEffectRunnerTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineEffectRunnerTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineEffectRunnerTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineEffectRunnerTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineExportIrTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineExportIrTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineExportIrTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineExportIrTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineInterleavingModelTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineInterleavingModelTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineInterleavingModelTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineInterleavingModelTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineSchemaStartupTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineSchemaStartupTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineSchemaStartupTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineSchemaStartupTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineTrainHookOutputTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineTrainHookOutputTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineTrainHookOutputTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineTrainHookOutputTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/MarkedMachineTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MarkedMachineTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/MarkedMachineTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MarkedMachineTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/MigrationSchemaTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MigrationSchemaTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/MigrationSchemaTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MigrationSchemaTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/MutationErrorMessageTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MutationErrorMessageTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/MutationErrorMessageTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MutationErrorMessageTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/OrderAutosaveTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/OrderAutosaveTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/OrderAutosaveTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/OrderAutosaveTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/OrderSendTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/OrderSendTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/OrderSendTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/OrderSendTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/PostgresChangeFeedTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/PostgresChangeFeedTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/PostgresChangeFeedTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/PostgresChangeFeedTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/RegistryCorruptDataTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RegistryCorruptDataTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/RegistryCorruptDataTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RegistryCorruptDataTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/RegistryJunctionTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RegistryJunctionTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/RegistryJunctionTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RegistryJunctionTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdControlCharacterTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdControlCharacterTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdControlCharacterTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdControlCharacterTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdRingSizeTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdRingSizeTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdRingSizeTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdRingSizeTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdRingTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdRingTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdRingTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdRingTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdScopeTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdScopeTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdScopeTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdScopeTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestRetryAfterServerWriteTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestRetryAfterServerWriteTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestRetryAfterServerWriteTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestRetryAfterServerWriteTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/RevisionTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RevisionTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/RevisionTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RevisionTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/ServerRecordTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ServerRecordTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/ServerRecordTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ServerRecordTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/ServerlessProviderTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ServerlessProviderTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/ServerlessProviderTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ServerlessProviderTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotAdvanceGuardTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotAdvanceGuardTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotAdvanceGuardTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotAdvanceGuardTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotChangeListenerTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotChangeListenerTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotChangeListenerTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotChangeListenerTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotChangeNotifyTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotChangeNotifyTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotChangeNotifyTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotChangeNotifyTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftExpiryTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftExpiryTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftExpiryTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftExpiryTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftServiceTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftServiceTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftServiceTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftServiceTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftServiceTimerTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftServiceTimerTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftServiceTimerTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftServiceTimerTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotMutationDefectTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotMutationDefectTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotMutationDefectTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotMutationDefectTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotOwnerKeyTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotOwnerKeyTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotOwnerKeyTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotOwnerKeyTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotSelfCheckTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotSelfCheckTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotSelfCheckTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotSelfCheckTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotStoreDefaultMembersTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotStoreDefaultMembersTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotStoreDefaultMembersTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotStoreDefaultMembersTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotWatchHubTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotWatchHubTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotWatchHubTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotWatchHubTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SpawnedChildTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SpawnedChildTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SpawnedChildTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SpawnedChildTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SpawnsStartupValidatorTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SpawnsStartupValidatorTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SpawnsStartupValidatorTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SpawnsStartupValidatorTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteRevisionTriggerTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteRevisionTriggerTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteRevisionTriggerTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteRevisionTriggerTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteSnapshotChangePollTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteSnapshotChangePollTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteSnapshotChangePollTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteSnapshotChangePollTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteStoreTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteStoreTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteStoreTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteStoreTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/StartTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/StartTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/StartTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/StartTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/StateMachineSelfCheckHealthCheckTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/StateMachineSelfCheckHealthCheckTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/StateMachineSelfCheckHealthCheckTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/StateMachineSelfCheckHealthCheckTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SystemOwnedInstanceTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SystemOwnedInstanceTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/SystemOwnedInstanceTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SystemOwnedInstanceTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerDueAtAnswerTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerDueAtAnswerTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerDueAtAnswerTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerDueAtAnswerTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerDueAtTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerDueAtTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerDueAtTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerDueAtTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerFailureClassificationTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerFailureClassificationTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerFailureClassificationTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerFailureClassificationTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerFireConditionTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerFireConditionTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerFireConditionTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerFireConditionTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerSweepIsolationTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerSweepIsolationTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerSweepIsolationTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerSweepIsolationTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/TransitionHistoryTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TransitionHistoryTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/TransitionHistoryTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TransitionHistoryTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Trax.Effect.StateMachine.Persistence.Integration.csproj b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Trax.Effect.StateMachine.Persistence.Integration.csproj similarity index 79% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Trax.Effect.StateMachine.Persistence.Integration.csproj rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Trax.Effect.StateMachine.Persistence.Integration.csproj index 6bcfaa0d7..584007a4a 100644 --- a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/Trax.Effect.StateMachine.Persistence.Integration.csproj +++ b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Trax.Effect.StateMachine.Persistence.Integration.csproj @@ -33,15 +33,15 @@ - + - + - - + + - + diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/TriggerInputValidationPathTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TriggerInputValidationPathTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/TriggerInputValidationPathTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TriggerInputValidationPathTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/packages.lock.json b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/packages.lock.json similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Persistence.Integration/packages.lock.json rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/packages.lock.json diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/Fakes/CountingCharge.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fakes/CountingCharge.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/Fakes/CountingCharge.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fakes/CountingCharge.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/Fakes/StressOrder.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fakes/StressOrder.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/Fakes/StressOrder.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fakes/StressOrder.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/StressFixture.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/StressFixture.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/StressFixture.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/StressFixture.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/StressProfile.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/StressProfile.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/StressProfile.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/StressProfile.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/TestPostgres.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/TestPostgres.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/TestPostgres.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/TestPostgres.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ClaimContentionStressTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ClaimContentionStressTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ClaimContentionStressTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ClaimContentionStressTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ExactlyOnceStressTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ExactlyOnceStressTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ExactlyOnceStressTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ExactlyOnceStressTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/RevisionStoreModelTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/RevisionStoreModelTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/RevisionStoreModelTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/RevisionStoreModelTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ThroughputStressTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ThroughputStressTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ThroughputStressTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ThroughputStressTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/StressDb.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/StressDb.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/StressDb.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/StressDb.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/Trax.Effect.StateMachine.Tests.Stress.csproj b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Trax.Effect.StateMachine.Tests.Stress.csproj similarity index 91% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/Trax.Effect.StateMachine.Tests.Stress.csproj rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Trax.Effect.StateMachine.Tests.Stress.csproj index b863dfa5a..957e43b74 100644 --- a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/Trax.Effect.StateMachine.Tests.Stress.csproj +++ b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Trax.Effect.StateMachine.Tests.Stress.csproj @@ -29,6 +29,6 @@ - + diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/packages.lock.json b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/packages.lock.json similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests.Stress/packages.lock.json rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/packages.lock.json diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Conformance/CheckoutConformanceTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/CheckoutConformanceTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Conformance/CheckoutConformanceTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/CheckoutConformanceTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Conformance/ConformanceRunnerTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/ConformanceRunnerTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Conformance/ConformanceRunnerTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/ConformanceRunnerTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Conformance/ConformanceTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/ConformanceTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Conformance/ConformanceTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/ConformanceTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Conformance/FixturePathsTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/FixturePathsTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Conformance/FixturePathsTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/FixturePathsTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Conformance/FluentCheckoutTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/FluentCheckoutTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Conformance/FluentCheckoutTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/FluentCheckoutTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Conformance/IrFormatParityTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/IrFormatParityTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Conformance/IrFormatParityTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/IrFormatParityTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Conformance/IrSchemaTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/IrSchemaTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Conformance/IrSchemaTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/IrSchemaTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Conformance/MigrationGoldenTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/MigrationGoldenTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Conformance/MigrationGoldenTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/MigrationGoldenTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Conformance/RefusalCodeParityTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/RefusalCodeParityTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Conformance/RefusalCodeParityTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/RefusalCodeParityTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Conformance/StrictInputGoldenTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/StrictInputGoldenTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Conformance/StrictInputGoldenTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/StrictInputGoldenTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Differential/DeclarativeTurnstileTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/DeclarativeTurnstileTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Differential/DeclarativeTurnstileTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/DeclarativeTurnstileTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Differential/DifferentialConformanceTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/DifferentialConformanceTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Differential/DifferentialConformanceTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/DifferentialConformanceTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Differential/DifferentialCorpusReplayTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/DifferentialCorpusReplayTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Differential/DifferentialCorpusReplayTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/DifferentialCorpusReplayTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Differential/StrictInputParityTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/StrictInputParityTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Differential/StrictInputParityTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/StrictInputParityTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Differential/TwinSequenceParityTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/TwinSequenceParityTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Differential/TwinSequenceParityTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/TwinSequenceParityTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/ConfiguredMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/ConfiguredMachine.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/ConfiguredMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/ConfiguredMachine.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/DeclarativeCheckout.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/DeclarativeCheckout.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/DeclarativeCheckout.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/DeclarativeCheckout.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/DeclarativeTurnstile.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/DeclarativeTurnstile.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/DeclarativeTurnstile.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/DeclarativeTurnstile.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/FaultyMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/FaultyMachine.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/FaultyMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/FaultyMachine.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/FluentCheckout.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/FluentCheckout.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/FluentCheckout.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/FluentCheckout.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/GaugeMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/GaugeMachine.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/GaugeMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/GaugeMachine.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/IngestContracts.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/IngestContracts.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/IngestContracts.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/IngestContracts.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/IngestMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/IngestMachine.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/IngestMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/IngestMachine.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/RangeMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/RangeMachine.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/RangeMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/RangeMachine.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/ReminderMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/ReminderMachine.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/ReminderMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/ReminderMachine.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/RichExportMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/RichExportMachine.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/RichExportMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/RichExportMachine.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/StrictInputMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/StrictInputMachine.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/StrictInputMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/StrictInputMachine.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/TestCheckout.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/TestCheckout.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/TestCheckout.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/TestCheckout.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/TestTurnstile.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/TestTurnstile.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/TestTurnstile.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/TestTurnstile.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/TestTurnstileV2.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/TestTurnstileV2.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/TestTurnstileV2.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/TestTurnstileV2.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/WaitMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/WaitMachine.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Fakes/WaitMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/WaitMachine.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Helpers/ConformanceTestee.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/ConformanceTestee.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Helpers/ConformanceTestee.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/ConformanceTestee.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Helpers/FixturePaths.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/FixturePaths.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Helpers/FixturePaths.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/FixturePaths.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Helpers/TwinEngine.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/TwinEngine.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Helpers/TwinEngine.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/TwinEngine.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Helpers/TypedSurfaceJson.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/TypedSurfaceJson.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Helpers/TypedSurfaceJson.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/TypedSurfaceJson.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Trax.Effect.StateMachine.Tests.csproj b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Trax.Effect.StateMachine.Tests.csproj similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/Trax.Effect.StateMachine.Tests.csproj rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Trax.Effect.StateMachine.Tests.csproj diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/AdvanceTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/AdvanceTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/AdvanceTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/AdvanceTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/CanonicalizationConformanceTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/CanonicalizationConformanceTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/CanonicalizationConformanceTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/CanonicalizationConformanceTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/ClientManifestTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/ClientManifestTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/ClientManifestTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/ClientManifestTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/ComparisonRefusalTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/ComparisonRefusalTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/ComparisonRefusalTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/ComparisonRefusalTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/DeclarativeAuthoringDefectTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/DeclarativeAuthoringDefectTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/DeclarativeAuthoringDefectTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/DeclarativeAuthoringDefectTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/DifferentialAuthoringTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/DifferentialAuthoringTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/DifferentialAuthoringTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/DifferentialAuthoringTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/DifferentialBuilderTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/DifferentialBuilderTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/DifferentialBuilderTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/DifferentialBuilderTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineContractTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineContractTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineContractTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineContractTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineDefensiveTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineDefensiveTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineDefensiveTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineDefensiveTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineParityDefectTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineParityDefectTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineParityDefectTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineParityDefectTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/EventWriteRuleTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/EventWriteRuleTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/EventWriteRuleTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/EventWriteRuleTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/IntrospectionTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/IntrospectionTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/IntrospectionTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/IntrospectionTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/InvokesDeclarationTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/InvokesDeclarationTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/InvokesDeclarationTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/InvokesDeclarationTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/IrExporterTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/IrExporterTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/IrExporterTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/IrExporterTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/MachineBuilderTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/MachineBuilderTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/MachineBuilderTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/MachineBuilderTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/MachineInstanceIdTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/MachineInstanceIdTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/MachineInstanceIdTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/MachineInstanceIdTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/MigrationTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/MigrationTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/MigrationTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/MigrationTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/ReductionEvaluatorTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/ReductionEvaluatorTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/ReductionEvaluatorTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/ReductionEvaluatorTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/RefusalPrecedenceTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RefusalPrecedenceTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/RefusalPrecedenceTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RefusalPrecedenceTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/RehydrateTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RehydrateTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/RehydrateTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RehydrateTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/RuleEvaluatorTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RuleEvaluatorTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/RuleEvaluatorTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RuleEvaluatorTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/RulesTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RulesTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/RulesTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RulesTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/RulesVocabularyTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RulesVocabularyTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/RulesVocabularyTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RulesVocabularyTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaFormatTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaFormatTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaFormatTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaFormatTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaStrictnessTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaStrictnessTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaStrictnessTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaStrictnessTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaValidatorTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaValidatorTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaValidatorTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaValidatorTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/SerializationRoundTripTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SerializationRoundTripTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/SerializationRoundTripTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SerializationRoundTripTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/SpawnDeclarationTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SpawnDeclarationTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/SpawnDeclarationTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SpawnDeclarationTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/StateInvariantTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/StateInvariantTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/StateInvariantTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/StateInvariantTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/StorableJsonTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/StorableJsonTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/StorableJsonTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/StorableJsonTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/TimerDeclarationTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TimerDeclarationTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/TimerDeclarationTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TimerDeclarationTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/TotalityTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TotalityTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/TotalityTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TotalityTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerInputPropertyTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerInputPropertyTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerInputPropertyTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerInputPropertyTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerInputValidationTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerInputValidationTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerInputValidationTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerInputValidationTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerMetadataTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerMetadataTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerMetadataTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerMetadataTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/TypedSchemaTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TypedSchemaTests.cs similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/UnitTests/TypedSchemaTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TypedSchemaTests.cs diff --git a/Trax.Effect/tests/Trax.Effect.StateMachine.Tests/packages.lock.json b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/packages.lock.json similarity index 100% rename from Trax.Effect/tests/Trax.Effect.StateMachine.Tests/packages.lock.json rename to Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/packages.lock.json From 4e1428777dcb3a7fa4d82ce71436b7df7e02ff2f Mon Sep 17 00:00:00 2001 From: Theauxm <43664045+Theauxm@users.noreply.github.com> Date: Tue, 20 Oct 2026 10:52:22 -0600 Subject: [PATCH 2/6] refactor(machines): move the TypeScript engine to ts/ and the kit to conformance/ Trax.Api.StateMachine becomes Trax.StateMachine/ts; @traxsharp/state-machine keeps its name. The conformance kit, the shared machines/ corpus and the runner (run.mjs, kit.mjs, node builtins only) move to Trax.StateMachine/conformance, beside the engines rather than inside one. The C# tests that run or read the TypeScript engine are marked CrossEngine, so CI can run them apart from the C#-only suite. --- .github/ci/packages.json | 13 ++++---- .github/dependabot.yml | 2 +- .github/release/release-workflow.test.mjs | 4 +-- .github/workflows/ci.yml | 30 +++++++++---------- .github/workflows/release.yml | 10 +++---- Trax.Cli/AGENTS.md | 2 +- .../src/Trax.Cli/Clients/ClientGenerator.cs | 2 +- .../src/Trax.Cli/Machines/MachineGenerator.cs | 2 +- Trax.Cli/src/Trax.Cli/Trax.Cli.csproj | 2 +- .../Fakes/DeclarativeIngestMachine.cs | 2 +- .../Fakes/DeclarativeTurnstileMachine.cs | 2 +- .../MachineGenerateFromPackedToolTests.cs | 10 +++---- .../MachineGeneratorNodeTests.cs | 11 +++---- .../IntegrationTests/NodePrerequisite.cs | 2 +- .../UnitTests/ClientGeneratorTests.cs | 4 +-- ...and-the-server-applies-every-transition.md | 4 +-- Trax.Docs/contributing/test-conventions.md | 2 +- Trax.Docs/samples/recovery/state-machines.md | 2 +- Trax.Docs/samples/recovery/tests.md | 2 +- .../statemachine-api/ir-format.md | 2 +- .../statemachine-api/migrations.md | 2 +- .../statemachine-api/result-codes.md | 2 +- .../statemachine-api/typescript-package.md | 10 +++---- .../Tests/SdkReferenceFrontMatterTests.cs | 2 +- .../TypeScriptExportsAreDocumentedTests.cs | 5 ++-- Trax.Samples/AGENTS.md | 4 +-- Trax.Samples/samples/Recovery/README.md | 6 ++-- .../tsconfig.json | 6 ++-- .../vite.config.ts | 2 +- .../samples/StateMachine/web/tsconfig.json | 6 ++-- .../samples/StateMachine/web/vite.config.ts | 2 +- .../Fixtures/RecoveryClientBuild.cs | 7 +++-- .../conformance/PROTOCOL.md | 10 +++++-- .../conformance/canonical-wire.json | 0 .../conformance/ir.schema.json | 0 .../conformance/kit.mjs | 5 ++-- .../machines/checkout/checkout.ir.json | 0 .../machines/checkout/differential.json | 0 .../advance/01-cart-next-reviews.json | 0 .../02-cart-next-empty-guard-failed.json | 0 .../fixtures/advance/03-review-pay-pays.json | 0 ...4-review-pay-no-receipt-invalid-input.json | 0 .../advance/05-review-back-to-cart.json | 0 .../advance/06-paid-restart-fresh.json | 0 .../fixtures/advance/pay-missing-input.json | 0 .../advance/pay-number-as-string.json | 0 .../fixtures/advance/pay-proto-key.json | 0 .../fixtures/advance/pay-unknown-field.json | 0 .../fixtures/rehydrate/01-valid-cart.json | 0 .../fixtures/rehydrate/02-valid-review.json | 0 .../fixtures/rehydrate/03-valid-paid.json | 0 .../rehydrate/04-invalid-paid-no-receipt.json | 0 .../05-invalid-review-empty-items.json | 0 .../rehydrate/06-version-mismatch.json | 0 .../fixtures/rehydrate/07-unknown-state.json | 0 .../machines/checkout/structure.json | 0 .../machines/checkout/wire-handoff.json | 0 .../machines/gauge/differential.json | 0 .../conformance}/machines/gauge/gauge.ir.json | 0 .../machines/ingest/differential.json | 0 .../machines/ingest/ingest.ir.json | 0 .../machines/reminder/differential.json | 0 .../machines/reminder/reminder.ir.json | 0 .../machines/turnstile/differential.json | 0 .../01-locked-coin-quarter-unlocks.json | 0 .../02-locked-coin-dollar-unlocks.json | 0 .../03-locked-coin-penny-guard-failed.json | 0 .../advance/04-locked-push-no-transition.json | 0 .../05-unlocked-coin-no-transition.json | 0 .../06-unlocked-push-locks-and-clears.json | 0 .../fixtures/advance/coin-missing-input.json | 0 .../advance/coin-number-as-string.json | 0 .../fixtures/advance/coin-proto-key.json | 0 .../fixtures/advance/coin-unknown-field.json | 0 .../fixtures/rehydrate/01-valid-locked.json | 0 .../fixtures/rehydrate/02-valid-unlocked.json | 0 .../fixtures/rehydrate/03-malformed.json | 0 .../rehydrate/04-unknown-machine.json | 0 .../rehydrate/05-version-mismatch.json | 0 .../fixtures/rehydrate/06-unknown-state.json | 0 .../rehydrate/07-invalid-context-missing.json | 0 .../08-invalid-context-forbidden.json | 0 .../machines/turnstile/migration.json | 0 .../machines/turnstile/structure.json | 0 .../machines/turnstile/turnstile.ir.json | 0 .../machines/turnstile/wire-handoff.json | 0 .../conformance/refusal-codes.json | 0 .../conformance/run.mjs | 2 +- .../conformance/strict-input/cases.json | 0 .../conformance/strict-input/strict.ir.json | 0 .../Rules/IrExporter.cs | 2 +- .../Conformance/ConformanceRunnerTests.cs | 3 +- .../Conformance/FixturePathsTests.cs | 4 +-- .../Conformance/IrFormatParityTests.cs | 5 ++-- .../Conformance/IrSchemaTests.cs | 1 + .../Differential/StrictInputParityTests.cs | 1 + .../Differential/TwinSequenceParityTests.cs | 7 +++-- .../Fakes/IngestMachine.cs | 2 +- .../Helpers/Categories.cs | 12 ++++++++ .../Helpers/ConformanceTestee.cs | 2 +- .../Helpers/FixturePaths.cs | 18 +++++++---- .../Helpers/TwinEngine.cs | 18 +++++------ .../UnitTests/TriggerInputPropertyTests.cs | 1 + .../ts}/.gitignore | 0 .../ts}/.prettierignore | 0 .../ts}/AGENTS.md | 0 .../ts}/README.md | 2 +- .../ts}/docs/design/phase0-codegen-scope.md | 0 .../ts}/docs/design/tier1-machine-codegen.md | 0 .../ts}/package-lock.json | 0 .../ts}/package.json | 4 +-- .../src/__snapshots__/exports.test.ts.snap | 0 .../src/canonicalization.conformance.test.ts | 0 .../ts}/src/client/client.test.ts | 0 .../ts}/src/client/draftSession.ts | 0 .../ts}/src/client/index.ts | 0 .../ts}/src/client/machineServer.test.ts | 0 .../ts}/src/client/machineServer.ts | 0 .../ts}/src/client/machines.test.ts | 0 .../ts}/src/client/machines.ts | 0 .../ts}/src/client/transport.ts | 0 .../ts}/src/clientFormat.test.ts | 0 .../ts}/src/clientFormat.ts | 0 .../ts}/src/controller.ts | 0 .../ts}/src/dependencies.test.ts | 0 .../ts}/src/devtools.test.ts | 0 .../ts}/src/devtools.ts | 0 .../ts}/src/differential.entrypoints.test.ts | 0 .../ts}/src/differential.enumerate.test.ts | 0 .../ts}/src/differential.test.ts | 0 .../ts}/src/differential.timers.test.ts | 0 .../ts}/src/differential.ts | 0 .../ts}/src/duration.ts | 0 .../ts}/src/exports.test.ts | 0 .../ts}/src/fixtures.ts | 15 ++++------ .../ts}/src/formView.test.ts | 0 .../ts}/src/formView.ts | 0 .../ts}/src/index.ts | 0 .../ts}/src/irSchema.conformance.test.ts | 0 .../ts}/src/machine.contract.test.ts | 0 .../ts}/src/machine.inputTotality.test.ts | 0 .../ts}/src/machine.totality.test.ts | 0 .../ts}/src/machine.ts | 0 .../machines/checkout/checkout.contexts.g.ts | 0 .../machines/checkout/checkout.machine.g.ts | 0 .../ts}/src/machines/checkout/checkout.ts | 0 .../src/machines/checkout/conformance.test.ts | 0 .../src/machines/checkout/roundtrip.test.ts | 0 .../src/machines/gauge/gauge.contexts.g.ts | 0 .../ts}/src/machines/gauge/gauge.machine.g.ts | 0 .../ts}/src/machines/gauge/gauge.ts | 0 .../src/machines/ingest/ingest.contexts.g.ts | 0 .../src/machines/ingest/ingest.machine.g.ts | 0 .../ts}/src/machines/ingest/ingest.ts | 0 .../ts}/src/machines/ingest/outcomes.test.ts | 0 .../machines/reminder/reminder.contexts.g.ts | 0 .../machines/reminder/reminder.machine.g.ts | 0 .../ts}/src/machines/reminder/reminder.ts | 0 .../ts}/src/machines/reminder/timers.test.ts | 0 .../machines/turnstile/conformance.test.ts | 0 .../src/machines/turnstile/controller.test.ts | 0 .../src/machines/turnstile/migration.test.ts | 0 .../src/machines/turnstile/roundtrip.test.ts | 0 .../src/machines/turnstile/totality.test.ts | 0 .../turnstile/turnstile.contexts.g.ts | 0 .../machines/turnstile/turnstile.machine.g.ts | 0 .../ts}/src/machines/turnstile/turnstile.ts | 0 .../ts}/src/machines/turnstile/typed.test.ts | 0 .../ts}/src/problem.test.ts | 0 .../ts}/src/problem.ts | 0 .../ts}/src/react.ts | 0 .../ts}/src/refusalCodes.conformance.test.ts | 0 .../ts}/src/results.ts | 0 .../ts}/src/rules/formats.test.ts | 0 .../ts}/src/rules/formats.ts | 0 .../ts}/src/rules/generateTypes.test.ts | 0 .../ts}/src/rules/generateTypes.ts | 0 .../ts}/src/rules/interpreter.input.test.ts | 0 .../ts}/src/rules/interpreter.test.ts | 0 .../ts}/src/rules/interpreter.ts | 0 .../ts}/src/rules/irFormat.test.ts | 0 .../ts}/src/rules/irFormat.ts | 0 .../ts}/src/rules/irMachine.test.ts | 0 .../ts}/src/rules/irMachine.ts | 0 .../ts}/src/rules/schemaStrictness.test.ts | 0 .../ts}/src/rules/testing/rangeMachine.ts | 0 .../ts}/src/server/serverController.test.ts | 0 .../ts}/src/server/serverController.ts | 0 .../server/testing/FakeMachineServer.test.ts | 0 .../src/server/testing/FakeMachineServer.ts | 0 .../src/server/useRememberedMachine.test.tsx | 0 .../ts}/src/server/useRememberedMachine.ts | 0 .../ts}/src/server/useServerMachine.test.tsx | 0 .../ts}/src/server/useServerMachine.ts | 0 .../ts}/src/strictInput.conformance.test.ts | 0 .../ts}/src/typed.snapshot.test.ts | 0 .../ts}/src/typed.ts | 0 .../ts}/src/types.ts | 0 .../ts}/tools/bundle-cli.mjs | 0 .../ts}/tools/codegen.test.mjs | 12 ++++---- .../ts}/tools/conformance/ir-schema.mjs | 4 +-- .../ts}/tools/conformance/run.test.mjs | 7 +++-- .../ts}/tools/conformance/testee-ts.mjs | 0 .../ts}/tools/generate-corpus.mjs | 0 .../ts}/tools/generate-twin.mjs | 0 .../ts}/tools/lib/args.mjs | 0 .../ts}/tools/lib/engine-bundled.mjs | 0 .../ts}/tools/lib/engine-loader.mjs | 0 .../ts}/tools/replay-sequences.mjs | 0 .../ts}/tsconfig.json | 0 .../ts}/tsup.config.ts | 0 .../ts}/vitest.config.ts | 0 212 files changed, 164 insertions(+), 137 deletions(-) rename {Trax.Api.StateMachine => Trax.StateMachine}/conformance/PROTOCOL.md (90%) rename {Trax.Api.StateMachine => Trax.StateMachine}/conformance/canonical-wire.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine}/conformance/ir.schema.json (100%) rename {Trax.Api.StateMachine/tools => Trax.StateMachine}/conformance/kit.mjs (97%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/checkout/checkout.ir.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/checkout/differential.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/checkout/fixtures/advance/01-cart-next-reviews.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/checkout/fixtures/advance/02-cart-next-empty-guard-failed.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/checkout/fixtures/advance/03-review-pay-pays.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/checkout/fixtures/advance/04-review-pay-no-receipt-invalid-input.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/checkout/fixtures/advance/05-review-back-to-cart.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/checkout/fixtures/advance/06-paid-restart-fresh.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/checkout/fixtures/advance/pay-missing-input.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/checkout/fixtures/advance/pay-number-as-string.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/checkout/fixtures/advance/pay-proto-key.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/checkout/fixtures/advance/pay-unknown-field.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/checkout/fixtures/rehydrate/01-valid-cart.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/checkout/fixtures/rehydrate/02-valid-review.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/checkout/fixtures/rehydrate/03-valid-paid.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/checkout/fixtures/rehydrate/04-invalid-paid-no-receipt.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/checkout/fixtures/rehydrate/05-invalid-review-empty-items.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/checkout/fixtures/rehydrate/06-version-mismatch.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/checkout/fixtures/rehydrate/07-unknown-state.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/checkout/structure.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/checkout/wire-handoff.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/gauge/differential.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/gauge/gauge.ir.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/ingest/differential.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/ingest/ingest.ir.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/reminder/differential.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/reminder/reminder.ir.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/differential.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/fixtures/advance/01-locked-coin-quarter-unlocks.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/fixtures/advance/02-locked-coin-dollar-unlocks.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/fixtures/advance/03-locked-coin-penny-guard-failed.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/fixtures/advance/04-locked-push-no-transition.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/fixtures/advance/05-unlocked-coin-no-transition.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/fixtures/advance/06-unlocked-push-locks-and-clears.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/fixtures/advance/coin-missing-input.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/fixtures/advance/coin-number-as-string.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/fixtures/advance/coin-proto-key.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/fixtures/advance/coin-unknown-field.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/fixtures/rehydrate/01-valid-locked.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/fixtures/rehydrate/02-valid-unlocked.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/fixtures/rehydrate/03-malformed.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/fixtures/rehydrate/04-unknown-machine.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/fixtures/rehydrate/05-version-mismatch.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/fixtures/rehydrate/06-unknown-state.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/fixtures/rehydrate/07-invalid-context-missing.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/fixtures/rehydrate/08-invalid-context-forbidden.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/migration.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/structure.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/turnstile.ir.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/conformance}/machines/turnstile/wire-handoff.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine}/conformance/refusal-codes.json (100%) rename {Trax.Api.StateMachine/tools => Trax.StateMachine}/conformance/run.mjs (97%) rename {Trax.Api.StateMachine => Trax.StateMachine}/conformance/strict-input/cases.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine}/conformance/strict-input/strict.ir.json (100%) create mode 100644 Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/Categories.cs rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/.gitignore (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/.prettierignore (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/AGENTS.md (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/README.md (98%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/docs/design/phase0-codegen-scope.md (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/docs/design/tier1-machine-codegen.md (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/package-lock.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/package.json (96%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/__snapshots__/exports.test.ts.snap (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/canonicalization.conformance.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/client/client.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/client/draftSession.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/client/index.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/client/machineServer.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/client/machineServer.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/client/machines.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/client/machines.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/client/transport.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/clientFormat.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/clientFormat.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/controller.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/dependencies.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/devtools.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/devtools.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/differential.entrypoints.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/differential.enumerate.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/differential.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/differential.timers.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/differential.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/duration.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/exports.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/fixtures.ts (84%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/formView.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/formView.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/index.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/irSchema.conformance.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machine.contract.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machine.inputTotality.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machine.totality.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machine.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/checkout/checkout.contexts.g.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/checkout/checkout.machine.g.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/checkout/checkout.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/checkout/conformance.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/checkout/roundtrip.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/gauge/gauge.contexts.g.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/gauge/gauge.machine.g.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/gauge/gauge.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/ingest/ingest.contexts.g.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/ingest/ingest.machine.g.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/ingest/ingest.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/ingest/outcomes.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/reminder/reminder.contexts.g.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/reminder/reminder.machine.g.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/reminder/reminder.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/reminder/timers.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/turnstile/conformance.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/turnstile/controller.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/turnstile/migration.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/turnstile/roundtrip.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/turnstile/totality.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/turnstile/turnstile.contexts.g.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/turnstile/turnstile.machine.g.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/turnstile/turnstile.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/machines/turnstile/typed.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/problem.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/problem.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/react.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/refusalCodes.conformance.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/results.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/rules/formats.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/rules/formats.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/rules/generateTypes.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/rules/generateTypes.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/rules/interpreter.input.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/rules/interpreter.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/rules/interpreter.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/rules/irFormat.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/rules/irFormat.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/rules/irMachine.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/rules/irMachine.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/rules/schemaStrictness.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/rules/testing/rangeMachine.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/server/serverController.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/server/serverController.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/server/testing/FakeMachineServer.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/server/testing/FakeMachineServer.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/server/useRememberedMachine.test.tsx (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/server/useRememberedMachine.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/server/useServerMachine.test.tsx (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/server/useServerMachine.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/strictInput.conformance.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/typed.snapshot.test.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/typed.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/src/types.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/tools/bundle-cli.mjs (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/tools/codegen.test.mjs (97%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/tools/conformance/ir-schema.mjs (92%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/tools/conformance/run.test.mjs (90%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/tools/conformance/testee-ts.mjs (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/tools/generate-corpus.mjs (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/tools/generate-twin.mjs (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/tools/lib/args.mjs (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/tools/lib/engine-bundled.mjs (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/tools/lib/engine-loader.mjs (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/tools/replay-sequences.mjs (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/tsconfig.json (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/tsup.config.ts (100%) rename {Trax.Api.StateMachine => Trax.StateMachine/ts}/vitest.config.ts (100%) diff --git a/.github/ci/packages.json b/.github/ci/packages.json index e4be84971..83a5fdc52 100644 --- a/.github/ci/packages.json +++ b/.github/ci/packages.json @@ -1,5 +1,5 @@ { - "_comment": "One entry per folder CI builds. 'upstream' names the folders whose change can break this one; the change detector runs a folder when it or anything upstream of it changes. 'dotnet' configures the .NET job (absent for a folder with no .NET build; 'release-pack' names the one project a release packs instead of the solution; 'state-machine' installs Trax.Api.StateMachine's npm packages first, for tests that run its generators under node; 'playwright' installs chromium, and the npm packages of Trax.Api.StateMachine and the Recovery page, which the browser tests build, Trax.Docs/adr/0049; 'api-dashboard' installs the npm packages of Trax.Api.Dashboard's React app before the build, which compiles it into the package); 'adr' configures the ADR guard over that folder's corpus. 'suites' are test projects carved out of a folder into a job of their own: one runs when anything in its 'upstream' (closed over like a folder's) or under one of its 'paths' changed, its folder's own job leaves it out with that row's 'test-args' filter, and its 'dotnet' takes the same keys as a folder's, with 'chromium' to install the browser, 'postgres-user'/'postgres-password' and 'rabbitmq-user'/'rabbitmq-password' for services that log in as someone other than trax, and 'web' for an npm folder (relative to the folder) whose tests and build run after the .NET tests.", + "_comment": "One entry per folder CI builds. 'upstream' names the folders whose change can break this one; the change detector runs a folder when it or anything upstream of it changes. 'dotnet' configures the .NET job (absent for a folder with no .NET build; 'release-pack' names the one project a release packs instead of the solution; 'state-machine' installs the npm packages of Trax.StateMachine/ts, the TypeScript engine, first, for tests that run its generators under node; 'playwright' installs chromium, and the npm packages of Trax.StateMachine/ts and the Recovery page, which the browser tests build, Trax.Docs/adr/0049; 'api-dashboard' installs the npm packages of Trax.Api.Dashboard's React app before the build, which compiles it into the package); 'adr' configures the ADR guard over that folder's corpus. 'suites' are test projects carved out of a folder into a job of their own: one runs when anything in its 'upstream' (closed over like a folder's) or under one of its 'paths' changed, its folder's own job leaves it out with that row's 'test-args' filter, and its 'dotnet' takes the same keys as a folder's, with 'chromium' to install the browser, 'postgres-user'/'postgres-password' and 'rabbitmq-user'/'rabbitmq-password' for services that log in as someone other than trax, and 'web' for an npm folder (relative to the folder) whose tests and build run after the .NET tests.", "packages": [ { "folder": "Trax.Core", @@ -9,13 +9,13 @@ }, { "folder": "Trax.Effect", - "upstream": ["Trax.Core", "Trax.Api.StateMachine"], - "dotnet": { "solution": "Trax.Effect.slnx", "state-machine": true, "pack": true, "coverage": true, "postgres": "trax_data_tests", "rabbitmq": true, "databases": [], "timeout": 15, "test-args": "" }, + "upstream": ["Trax.Core"], + "dotnet": { "solution": "Trax.Effect.slnx", "pack": true, "coverage": true, "postgres": "trax_data_tests", "rabbitmq": true, "databases": [], "timeout": 15, "test-args": "" }, "adr": { "adr-root": "docs/adr", "known-areas": "migrations,providers,data-model,testing,platform,auth", "census-root": "tests/Trax.Effect.Tests.Meta" } }, { "folder": "Trax.StateMachine", - "upstream": ["Trax.Effect", "Trax.Api.StateMachine"], + "upstream": ["Trax.Effect"], "dotnet": { "solution": "dotnet/Trax.StateMachine.slnx", "state-machine": true, "pack": true, "coverage": true, "postgres": "trax_data_tests", "rabbitmq": false, "databases": [], "timeout": 15, "test-args": "" } }, { @@ -38,7 +38,7 @@ }, { "folder": "Trax.Cli", - "upstream": ["Trax.Scheduler", "Trax.Api.StateMachine"], + "upstream": ["Trax.Scheduler", "Trax.StateMachine"], "dotnet": { "solution": "Trax.Cli.slnx", "state-machine": true, "pack": true, "coverage": true, "postgres": "", "rabbitmq": false, "databases": [], "timeout": 15, "test-args": "" }, "adr": { "adr-root": "docs/adr", "known-areas": "tooling,platform,testing", "census-root": "tests/Trax.Cli.Tests.Meta" } }, @@ -54,8 +54,7 @@ "dotnet": { "solution": "Trax.Docs.slnx", "pack": false, "coverage": false, "postgres": "", "rabbitmq": false, "databases": [], "timeout": 15, "test-args": "" }, "adr": { "adr-root": "adr", "known-areas": "testing,platform,packaging,ci,naming,data-model,graphql,docs,migrations,providers", "known-repos": "core,effect,mediator,scheduler,dashboard,api,cli,samples,docs,website", "require-repos-key": "true", "census-root": "tests/Trax.Docs.Tests" } }, - { "folder": "Trax.Website", "upstream": ["Trax.Docs", "Trax.Api"] }, - { "folder": "Trax.Api.StateMachine", "upstream": [] } + { "folder": "Trax.Website", "upstream": ["Trax.Docs", "Trax.Api"] } ], "suites": [ { diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 47ae95c40..c16b88b85 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -75,7 +75,7 @@ updates: directories: # The release tooling. - "/" - - "/Trax.Api.StateMachine" + - "/Trax.StateMachine/ts" # The operations dashboard that Trax.Api.Dashboard ships. - "/Trax.Api/src/Trax.Api.Dashboard/ClientApp" - "/Trax.Core/plugins/vscode/trax-hints" diff --git a/.github/release/release-workflow.test.mjs b/.github/release/release-workflow.test.mjs index ff0e6838f..658e1aa9f 100644 --- a/.github/release/release-workflow.test.mjs +++ b/.github/release/release-workflow.test.mjs @@ -80,12 +80,12 @@ describe('build job', () => { it('packs the engine at the released version, without re-running the tests CI ran', () => { const pack = step(build, 'Pack the TypeScript engine'); - assert.equal(pack['working-directory'], 'Trax.Api.StateMachine'); + assert.equal(pack['working-directory'], 'Trax.StateMachine/ts'); assert.equal(pack.env.PKG_VERSION, '${{ needs.release.outputs.version }}'); assert.match(pack.run, /npm ci --ignore-scripts/); assert.doesNotMatch(pack.run, /npm test|npm run typecheck/); assert.match(pack.run, /npm version "\$PKG_VERSION" --no-git-tag-version/); - assert.match(pack.run, /npm pack --pack-destination \.\.\/npm/); + assert.match(pack.run, /npm pack --pack-destination \.\.\/\.\.\/npm/); }); it('versions the engine before the NuGet packs, which bundle it into Trax.Cli', () => { diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d7712a78..d52b268c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -164,16 +164,16 @@ jobs: working-directory: ${{ matrix.package.folder }} run: ../.github/scripts/check-deprecated-packages.sh - name: Setup Node - # Tests that drive Trax.Api.StateMachine's generators run them under node, packing Trax.Cli + # Tests that drive the TypeScript engine's generators (Trax.StateMachine/ts) run them under node, packing Trax.Cli # bundles them into it, the browser tests build the page they drive with vite, and building # Trax.Api.Dashboard compiles its React app. Before the build for that last reason. if: matrix.package['state-machine'] || matrix.package.playwright || matrix.package['api-dashboard'] uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: '24' - - name: Install Trax.Api.StateMachine (locked, no install scripts) + - name: Install Trax.StateMachine/ts (locked, no install scripts) if: matrix.package['state-machine'] || matrix.package.playwright - working-directory: Trax.Api.StateMachine + working-directory: Trax.StateMachine/ts run: npm ci --ignore-scripts - name: Install the API dashboard (locked, no install scripts) # With its packages installed, building Trax.Api.Dashboard compiles the app and embeds it, @@ -200,7 +200,7 @@ jobs: run: dotnet pack "$SOLUTION" --configuration Release --no-build --output "$RUNNER_TEMP/nupkg" - name: Install the Recovery page (locked, no install scripts) # The browser tests build the page with vite before they open it; it compiles the engine - # from Trax.Api.StateMachine/src, installed above. + # from Trax.StateMachine/ts/src, installed above. if: matrix.package.playwright working-directory: Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Client run: npm ci --ignore-scripts @@ -621,7 +621,7 @@ jobs: run: npm audit --omit=dev --audit-level=high # The Recovery sample's page (Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Client), its own - # npm project. It builds the engine from Trax.Api.StateMachine/src, which is upstream of + # npm project. It builds the engine from Trax.StateMachine/ts/src, which is upstream of # Trax.Samples through Trax.Cli, so it runs whenever the Samples job does. Besides its lint, tests # and build, it regenerates the topic map's twin and differential corpus from the C# machine with # `trax machine generate`, as the sample's README says to, and fails when that changes a file: a @@ -671,9 +671,9 @@ jobs: uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: '24' - - name: Install Trax.Api.StateMachine (locked, no install scripts) + - name: Install Trax.StateMachine/ts (locked, no install scripts) # The twin generator runs under node from this folder's tools. - working-directory: Trax.Api.StateMachine + working-directory: Trax.StateMachine/ts run: npm ci --ignore-scripts - name: Install the API dashboard (locked, no install scripts) # The Recovery host serves the console, and a build without the app refuses to start, so @@ -706,7 +706,7 @@ jobs: --assembly Trax.Samples/samples/Recovery/Trax.Samples.Recovery/bin/Release/net10.0/Trax.Samples.Recovery.dll \ --machine Trax.Samples.Recovery.Machines.TopicMapMachine \ --ir-out "$out" --twin-out "$out" --corpus-out "$out" \ - --engine-src Trax.Api.StateMachine/src --import-style specifier + --engine-src Trax.StateMachine/ts/src --import-style specifier # Only the generated files: the folder also holds the page's own hook. if [ -n "$(git status --porcelain -- "$out/topic-map.*" "$out/differential.json")" ]; then git --no-pager diff -- "$out/topic-map.*" "$out/differential.json" @@ -718,7 +718,7 @@ jobs: run: | api=Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Api dotnet restore "$api" --locked-mode - node Trax.Api.StateMachine/tools/bundle-cli.mjs --out "$RUNNER_TEMP/engine" + node Trax.StateMachine/ts/tools/bundle-cli.mjs --out "$RUNNER_TEMP/engine" (cd "$api" && ConnectionStrings__TraxDatabase="Host=127.0.0.1;Port=1;Database=none;Username=none;Password=none" \ dotnet run --no-restore -- --trax-export-client "$RUNNER_TEMP/manifest.json") # From the page's folder, so the documents' sources are the paths trax.documents.json records. @@ -730,7 +730,7 @@ jobs: # The StateMachine sample's page (Trax.Samples/samples/StateMachine/web), its own npm project on # the client `trax client` generated from the host. It builds the engine from - # Trax.Api.StateMachine/src, as the Recovery page does. Besides its build, it exports the host's + # Trax.StateMachine/ts/src, as the Recovery page does. Besides its build, it exports the host's # client manifest and runs `trax client --check` over the committed client, and fails when they # differ: a client out of step with the host sends ids the host answers CLIENT_OUTDATED. statemachine-client: @@ -778,9 +778,9 @@ jobs: uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: '24' - - name: Install Trax.Api.StateMachine (locked, no install scripts) + - name: Install Trax.StateMachine/ts (locked, no install scripts) # The page builds the engine from its source, and the twin generator is bundled from it. - working-directory: Trax.Api.StateMachine + working-directory: Trax.StateMachine/ts run: npm ci --ignore-scripts - name: Install (locked, no install scripts) working-directory: ${{ env.WEB }} @@ -801,7 +801,7 @@ jobs: api=Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine.Api dotnet restore "$api" --locked-mode dotnet restore Trax.Cli/src/Trax.Cli --locked-mode - node Trax.Api.StateMachine/tools/bundle-cli.mjs --out "$RUNNER_TEMP/engine" + node Trax.StateMachine/ts/tools/bundle-cli.mjs --out "$RUNNER_TEMP/engine" dotnet run --project "$api" --no-restore -- --trax-export-client "$RUNNER_TEMP/manifest.json" cli="$PWD/Trax.Cli/src/Trax.Cli" (cd "$WEB" && dotnet run --project "$cli" --no-restore -- client \ @@ -814,14 +814,14 @@ jobs: # folders list it upstream. state-machine: needs: changes - if: contains(fromJSON(needs.changes.outputs.folders), 'Trax.Api.StateMachine') + if: contains(fromJSON(needs.changes.outputs.folders), 'Trax.StateMachine') runs-on: ubuntu-latest timeout-minutes: 10 permissions: contents: read defaults: run: - working-directory: Trax.Api.StateMachine + working-directory: Trax.StateMachine/ts steps: - name: Harden runner uses: step-security/harden-runner@ccd8616d44fd3846e67624a50d5aad6d37bf2d25 # v2.22.1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d0a14d252..4180827cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -192,18 +192,18 @@ jobs: # into this checkout only, and never committed. prepack builds dist/ from this tree. # build-test already typechecked and tested this commit's engine. It runs before the # NuGet packs because packing Trax.Cli bundles the generators from this install. - working-directory: Trax.Api.StateMachine + working-directory: Trax.StateMachine/ts env: PKG_VERSION: ${{ needs.release.outputs.version }} run: | npm ci --ignore-scripts npm version "$PKG_VERSION" --no-git-tag-version - mkdir -p ../npm - npm pack --pack-destination ../npm + mkdir -p ../../npm + npm pack --pack-destination ../../npm # Exactly one tarball, at the released version. - if [ "$(cd ../npm && ls)" != "traxsharp-state-machine-$PKG_VERSION.tgz" ]; then - echo "::error::Expected only traxsharp-state-machine-$PKG_VERSION.tgz, packed: $(ls ../npm)" + if [ "$(cd ../../npm && ls)" != "traxsharp-state-machine-$PKG_VERSION.tgz" ]; then + echo "::error::Expected only traxsharp-state-machine-$PKG_VERSION.tgz, packed: $(ls ../../npm)" exit 1 fi - name: Install the API dashboard (locked, no install scripts) diff --git a/Trax.Cli/AGENTS.md b/Trax.Cli/AGENTS.md index cd90fbaa4..ff6b52f1e 100644 --- a/Trax.Cli/AGENTS.md +++ b/Trax.Cli/AGENTS.md @@ -68,7 +68,7 @@ The machine unit tests drive a fake `INodeRunner` and spawn no process at all. O byte-parity integration test and `MachineGenerateFromPackedToolTests` spawn real node, and they skip themselves at runtime when node is not on PATH, which is what lets the suite run without node installed. The second packs this folder's tool, which bundles the engine's generators -into it, so it also skips until `npm ci --ignore-scripts` has run in `Trax.Api.StateMachine`. +into it, so it also skips until `npm ci --ignore-scripts` has run in `Trax.StateMachine/ts`. Under CI (`CI` set) both fail instead of skipping, since CI installs node and the engine. Packing (`dotnet pack`, and CI's pack step) needs both, and fails saying so. `NodeRunnerTests` does spawn a real process, using `dotnet` as a stand-in executable. diff --git a/Trax.Cli/src/Trax.Cli/Clients/ClientGenerator.cs b/Trax.Cli/src/Trax.Cli/Clients/ClientGenerator.cs index 179cdec6b..34313dd8c 100644 --- a/Trax.Cli/src/Trax.Cli/Clients/ClientGenerator.cs +++ b/Trax.Cli/src/Trax.Cli/Clients/ClientGenerator.cs @@ -40,7 +40,7 @@ internal sealed partial class ClientGenerator { /// /// The client format this generator writes, held equal to the runtime's clientFormat - /// (Trax.Api.StateMachine/src/clientFormat.ts) by ClientFormatParityTests. + /// (Trax.StateMachine/ts/src/clientFormat.ts) by ClientFormatParityTests. /// public const int ClientFormat = 2; diff --git a/Trax.Cli/src/Trax.Cli/Machines/MachineGenerator.cs b/Trax.Cli/src/Trax.Cli/Machines/MachineGenerator.cs index 62e5a1e67..27e376a95 100644 --- a/Trax.Cli/src/Trax.Cli/Machines/MachineGenerator.cs +++ b/Trax.Cli/src/Trax.Cli/Machines/MachineGenerator.cs @@ -434,7 +434,7 @@ private string ToolScript(MachineGenerateOptions o, string script, string what) throw new InvalidOperationException( $"Generating {what} needs the TypeScript engine, and this trax has none bundled ({bundled} is " + "missing): it was built from source, not installed from its package. Pass --engine-src " - + "with the engine's src/ directory (Trax.Api.StateMachine/src, after `npm ci` there)." + + "with the engine's src/ directory (Trax.StateMachine/ts/src, after `npm ci` there)." ); return bundled; } diff --git a/Trax.Cli/src/Trax.Cli/Trax.Cli.csproj b/Trax.Cli/src/Trax.Cli/Trax.Cli.csproj index 678a0cf8c..cfa880922 100644 --- a/Trax.Cli/src/Trax.Cli/Trax.Cli.csproj +++ b/Trax.Cli/src/Trax.Cli/Trax.Cli.csproj @@ -41,7 +41,7 @@ needs neither. --> $(TargetsForTfmSpecificContentInPackage);PackBundledEngine - $([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', '..', '..', '..', 'Trax.Api.StateMachine')) + $([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', '..', '..', '..', 'Trax.StateMachine', 'ts')) diff --git a/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeIngestMachine.cs b/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeIngestMachine.cs index 83a88878a..745dda134 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeIngestMachine.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeIngestMachine.cs @@ -44,7 +44,7 @@ public enum IngestTrigger /// /// A machine whose Fetching state invokes a train, identical to the committed ingest machine in - /// Trax.Api.StateMachine, so the CLI's IR, twin and corpus for a machine with outcome triggers can be + /// Trax.StateMachine/ts, so the CLI's IR, twin and corpus for a machine with outcome triggers can be /// byte-compared against the committed artifacts. /// public sealed class DeclarativeIngestMachine : Machine diff --git a/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeTurnstileMachine.cs b/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeTurnstileMachine.cs index 86e6e68ea..8437c3f17 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeTurnstileMachine.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeTurnstileMachine.cs @@ -20,7 +20,7 @@ public enum TurnstileTrigger /// /// A declaratively-authored turnstile, identical to the committed turnstile machine in -/// Trax.Api.StateMachine, so the CLI's generated IR / twin / corpus can be byte-compared against the committed +/// Trax.StateMachine/ts, so the CLI's generated IR / twin / corpus can be byte-compared against the committed /// artifacts. The CLI test points --assembly at this test assembly and loads this machine by reflection, /// exercising the exact path a real consumer uses. /// diff --git a/Trax.Cli/tests/Trax.Cli.Tests/IntegrationTests/MachineGenerateFromPackedToolTests.cs b/Trax.Cli/tests/Trax.Cli.Tests/IntegrationTests/MachineGenerateFromPackedToolTests.cs index 4f511d22e..9baef6ece 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/IntegrationTests/MachineGenerateFromPackedToolTests.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/IntegrationTests/MachineGenerateFromPackedToolTests.cs @@ -28,11 +28,11 @@ public void SetUp() ); if ( !Directory.Exists( - Path.Combine(RepoFolder("Trax.Api.StateMachine"), "node_modules", "esbuild") + Path.Combine(RepoFolder(Path.Combine("Trax.StateMachine", "ts")), "node_modules", "esbuild") ) ) NodePrerequisite.Missing( - "Trax.Api.StateMachine has no node_modules; run `npm ci` there to pack the tool." + "Trax.StateMachine/ts has no node_modules; run `npm ci` there to pack the tool." ); _root = Path.Combine(Path.GetTempPath(), $"trax-packed-tool-{Guid.NewGuid():N}"); @@ -90,7 +90,7 @@ public void The_packed_tool_generates_a_twin_and_a_corpus_the_CSharp_engine_repl public void The_published_engine_and_tool_typecheck_together_in_an_empty_project() { var tool = PackAndUnpackTheTool(); - var work = OutsideProject(RepoFolder("Trax.Api.StateMachine")); + var work = OutsideProject(RepoFolder(Path.Combine("Trax.StateMachine", "ts"))); var (generated, generateOutput) = Run( "dotnet", @@ -196,7 +196,7 @@ export function useRunPage(runId: string | null) { public void The_generated_client_typechecks_under_a_vite_react_ts_tsconfig() { var tool = PackAndUnpackTheTool(); - var work = OutsideProject(RepoFolder("Trax.Api.StateMachine")); + var work = OutsideProject(RepoFolder(Path.Combine("Trax.StateMachine", "ts"))); GenerateClient(tool, work); File.WriteAllText( Path.Combine(work, "main.ts"), @@ -261,7 +261,7 @@ export function usePage(runId: string | null) { public void The_generated_hooks_behave_in_an_outside_project() { var tool = PackAndUnpackTheTool(); - var engine = RepoFolder("Trax.Api.StateMachine"); + var engine = RepoFolder(Path.Combine("Trax.StateMachine", "ts")); var work = OutsideProject( engine, $"react-dom@{EngineDevDependency(engine, "react-dom")}", diff --git a/Trax.Cli/tests/Trax.Cli.Tests/IntegrationTests/MachineGeneratorNodeTests.cs b/Trax.Cli/tests/Trax.Cli.Tests/IntegrationTests/MachineGeneratorNodeTests.cs index e0fc644c8..306fada76 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/IntegrationTests/MachineGeneratorNodeTests.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/IntegrationTests/MachineGeneratorNodeTests.cs @@ -6,7 +6,7 @@ namespace Trax.Cli.Tests.IntegrationTests; /// -/// End-to-end byte-parity: the CLI, running real node against the sibling Trax.Api.StateMachine engine, must +/// End-to-end byte-parity: the CLI, running real node against the sibling Trax.StateMachine/ts engine, must /// reproduce the committed turnstile artifacts exactly. This is the whole point of the tool, so it is proven /// against the real generators, not a fake. Skipped at runtime when node is unavailable or the sibling engine is /// not checked out beside this repo, except under CI, where that fails the test. @@ -29,7 +29,7 @@ public void SetUp() var engineRoot = FindEngineRoot(); if (engineRoot is null) NodePrerequisite.Missing( - "Trax.Api.StateMachine is not checked out beside Trax.Cli; skipping byte-parity test." + "Trax.StateMachine/ts is not checked out beside Trax.Cli; skipping byte-parity test." ); _engineSrc = Path.Combine(engineRoot!, "src"); @@ -146,9 +146,10 @@ private void AssertByteParityWithCommitted(IMachine machine, string id) ); var engineRoot = Directory.GetParent(_engineSrc)!.FullName; + var machinesRoot = Path.Combine(engineRoot, "..", "conformance", "machines"); FilesShouldMatch( Path.Combine(irOut, $"{id}.ir.json"), - Path.Combine(engineRoot, "machines", id, $"{id}.ir.json") + Path.Combine(machinesRoot, id, $"{id}.ir.json") ); FilesShouldMatch( Path.Combine(twinOut, $"{id}.contexts.g.ts"), @@ -160,7 +161,7 @@ private void AssertByteParityWithCommitted(IMachine machine, string id) ); FilesShouldMatch( Path.Combine(corpusOut, "differential.json"), - Path.Combine(engineRoot, "machines", id, "differential.json") + Path.Combine(machinesRoot, id, "differential.json") ); } @@ -201,7 +202,7 @@ private static void FilesShouldMatch(string generated, string committed) var dir = new DirectoryInfo(AppContext.BaseDirectory); while (dir is not null) { - var candidate = Path.Combine(dir.FullName, "Trax.Api.StateMachine"); + var candidate = Path.Combine(dir.FullName, "Trax.StateMachine", "ts"); if (Directory.Exists(Path.Combine(candidate, "src", "rules"))) return candidate; dir = dir.Parent; diff --git a/Trax.Cli/tests/Trax.Cli.Tests/IntegrationTests/NodePrerequisite.cs b/Trax.Cli/tests/Trax.Cli.Tests/IntegrationTests/NodePrerequisite.cs index 61290a94d..b441c42c8 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/IntegrationTests/NodePrerequisite.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/IntegrationTests/NodePrerequisite.cs @@ -11,7 +11,7 @@ public static void Missing(string why) { if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("CI"))) Assert.Fail( - $"{why} CI installs node and runs `npm ci` in Trax.Api.StateMachine for this folder, so a " + $"{why} CI installs node and runs `npm ci` in Trax.StateMachine/ts for this folder, so a " + "test that skipped here would prove nothing." ); Assert.Ignore(why); diff --git a/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/ClientGeneratorTests.cs b/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/ClientGeneratorTests.cs index 47434b8ea..3583dcca9 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/ClientGeneratorTests.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/ClientGeneratorTests.cs @@ -792,11 +792,11 @@ private static string EngineSrc() dir = dir.Parent ) { - var candidate = Path.Combine(dir.FullName, "Trax.Api.StateMachine", "src"); + var candidate = Path.Combine(dir.FullName, "Trax.StateMachine", "ts", "src"); if (Directory.Exists(candidate)) return candidate; } - Assert.Ignore("Trax.Api.StateMachine not found (isolated build)."); + Assert.Ignore("Trax.StateMachine/ts not found (isolated build)."); return ""; } diff --git a/Trax.Docs/adr/0048-a-machine-is-served-as-a-typed-api-and-the-server-applies-every-transition.md b/Trax.Docs/adr/0048-a-machine-is-served-as-a-typed-api-and-the-server-applies-every-transition.md index e1bf2a305..d77f24ddc 100644 --- a/Trax.Docs/adr/0048-a-machine-is-served-as-a-typed-api-and-the-server-applies-every-transition.md +++ b/Trax.Docs/adr/0048-a-machine-is-served-as-a-typed-api-and-the-server-applies-every-transition.md @@ -510,7 +510,7 @@ In `Trax.Scheduler.Tests.Integration`: - `TimerVersionChangeTests`: `A_v2_without_the_timer_clears_a_stale_due_at_and_does_not_fire`, `A_changed_duration_keeps_the_due_at_set_at_entry`, `A_v1_host_does_not_fire_a_row_written_by_v2`, `A_migrated_snapshot_keeps_its_due_at_when_the_state_survives` - `TimersModelTests`: `Generated_events_fires_and_races_keep_due_at_revision_and_row_id_in_step_with_the_model` -In `Trax.Api.StateMachine` (vitest; each was written `it.fails` and is now an ordinary test): +In `Trax.StateMachine/ts` (vitest; each was written `it.fails` and is now an ordinary test): - `src/rules/interpreter.input.test.ts`: `validateInput refuses` a missing required field, a number sent as a string, an unknown field, a PascalCase field, a non-object input, a constraint broken by the input, unknown fields on a trigger without input, a fraction in an integer field, a number beyond double range, a lone surrogate, a nested record. @@ -536,7 +536,7 @@ golden is committed, as it is). ## Exemplars **Enforced elsewhere:** the tests listed under *Tests*, in each folder's test projects and in -`Trax.Api.StateMachine`; `InteractionMatrixTests` in `Trax.Core.Tests.Meta`, which requires the `After` row of the +`Trax.StateMachine/ts`; `InteractionMatrixTests` in `Trax.Core.Tests.Meta`, which requires the `After` row of the machine-features table and the *Machine API features* table to name a test for every cell; and the startup refusals themselves (an undeclared event, an unexposed raw-delegate machine, the opt-in without a policy), which stop a host that breaks the rule from starting. diff --git a/Trax.Docs/contributing/test-conventions.md b/Trax.Docs/contributing/test-conventions.md index 0d818ecaf..3e8a82b95 100644 --- a/Trax.Docs/contributing/test-conventions.md +++ b/Trax.Docs/contributing/test-conventions.md @@ -127,7 +127,7 @@ One survives, on its exceptions list: a Trax.Samples E2E test waiting on an unre scheduler feature. Do not read it as precedent for a second. When CI provides what the test needs (a service in `.github/ci/packages.json`, node and the -`Trax.Api.StateMachine` packages for `"state-machine": true`), the check fails instead of +`Trax.StateMachine/ts` packages for `"state-machine": true`), the check fails instead of skipping when the `CI` environment variable is set, so a broken job cannot report a skipped suite as green. `PersistedOperationCrossNodeTests` and `TwinSequenceParityTests` do this. diff --git a/Trax.Docs/samples/recovery/state-machines.md b/Trax.Docs/samples/recovery/state-machines.md index 5aa5727c7..28d1014a7 100644 --- a/Trax.Docs/samples/recovery/state-machines.md +++ b/Trax.Docs/samples/recovery/state-machines.md @@ -155,7 +155,7 @@ dotnet run --project Trax.Cli/src/Trax.Cli -- machine generate \ --ir-out Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Client/src/topicMap \ --twin-out Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Client/src/topicMap \ --corpus-out Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Client/src/topicMap \ - --engine-src Trax.Api.StateMachine/src --import-style specifier + --engine-src Trax.StateMachine/ts/src --import-style specifier ``` The topic map is marked `[TraxMachine]`, so it is served as its own typed operations diff --git a/Trax.Docs/samples/recovery/tests.md b/Trax.Docs/samples/recovery/tests.md index 785dc3559..6083e1d22 100644 --- a/Trax.Docs/samples/recovery/tests.md +++ b/Trax.Docs/samples/recovery/tests.md @@ -84,7 +84,7 @@ database, never a delay, and `TraxInvariants` is checked after every one: | `A_placed_order_is_delivered_and_its_run_followed_by_its_owner` | A placed order's delivery run is the one the order's answer names (`invokedRun`), followed to its end, with nothing under `operations` | | `Built_bundle_holds_no_operator_key` | The built page holds no operator key and no retired `recovery_*` id | -They need the page's npm packages (`npm ci` in `Trax.Samples.Recovery.Client` and in `Trax.Api.StateMachine`) and +They need the page's npm packages (`npm ci` in `Trax.Samples.Recovery.Client` and in `Trax.StateMachine/ts`) and chromium (`pwsh tests/Trax.Samples.Recovery.Browser/bin/Debug/net10.0/playwright.ps1 install chromium` after a build): diff --git a/Trax.Docs/sdk-reference/statemachine-api/ir-format.md b/Trax.Docs/sdk-reference/statemachine-api/ir-format.md index 3b431e908..3e9eae209 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/ir-format.md +++ b/Trax.Docs/sdk-reference/statemachine-api/ir-format.md @@ -128,7 +128,7 @@ reads, saying whether to upgrade the package or regenerate. An IR without `irFor ## The schema The format is also written as a JSON Schema (draft 2020-12), -[`conformance/ir.schema.json`](https://github.com/TraxSharp/Trax/blob/main/Trax.Api.StateMachine/conformance/ir.schema.json), +[`conformance/ir.schema.json`](https://github.com/TraxSharp/Trax/blob/main/Trax.StateMachine/conformance/ir.schema.json), and the schema is normative: an engine reads every document it accepts, and the exporter writes nothing it refuses. Every object in it is closed, so a field it does not name is refused rather than ignored. Both runtimes' tests check every IR the exporter writes against it, so a field added to the IR without the schema fails them. diff --git a/Trax.Docs/sdk-reference/statemachine-api/migrations.md b/Trax.Docs/sdk-reference/statemachine-api/migrations.md index f95215637..a2760883a 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/migrations.md +++ b/Trax.Docs/sdk-reference/statemachine-api/migrations.md @@ -55,7 +55,7 @@ the current definition's schema. Every path that reads a snapshot rehydrates it: A draft whose version has no migration path to the current definition, or is newer than it, rehydrates as [`VERSION_MISMATCH`](/docs/sdk-reference/statemachine-api/result-codes). -The machines in `Trax.Api.StateMachine/machines/` pin a migration with a migration golden, +The machines in `Trax.StateMachine/conformance/machines/` pin a migration with a migration golden, `machines//migration.json`: a committed set of stored older-version snapshots and the exact [canonical wire](/docs/statemachine/canonical-wire) each must become. The tests of both runtimes replay it, so a migration that drops, renames or reorders a surviving field fails, and the two runtimes cannot upgrade the same draft differently. diff --git a/Trax.Docs/sdk-reference/statemachine-api/result-codes.md b/Trax.Docs/sdk-reference/statemachine-api/result-codes.md index b478afb21..883f1c4b8 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/result-codes.md +++ b/Trax.Docs/sdk-reference/statemachine-api/result-codes.md @@ -25,7 +25,7 @@ snake case (`GUARD_FAILED`), the spelling GraphQL gives the enum: `RefusalCode.G `RefusalCode.GuardFailed` in TypeScript. `RefusalCodes.TryParse` also reads the kebab-case spelling the codes had before (`guard-failed`), so a request id an older node recorded still replays. `RefusalCodes.All` lists the members in order, and `RefusalCodeJsonConverter`, which the enum carries, writes and reads the wire spelling in -`System.Text.Json`. The set is also written as data, `Trax.Api.StateMachine/conformance/refusal-codes.json`, and +`System.Text.Json`. The set is also written as data, `Trax.StateMachine/conformance/refusal-codes.json`, and every engine checks itself against that file, so the C# and TypeScript sets are equal member for member and in order. ## Members diff --git a/Trax.Docs/sdk-reference/statemachine-api/typescript-package.md b/Trax.Docs/sdk-reference/statemachine-api/typescript-package.md index aa62a2697..a446ea398 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/typescript-package.md +++ b/Trax.Docs/sdk-reference/statemachine-api/typescript-package.md @@ -9,15 +9,15 @@ nav_order: 14 surface: typescript package: "@traxsharp/state-machine" source: - - Trax.Api.StateMachine/src/index.ts - - Trax.Api.StateMachine/src/client/index.ts - - Trax.Api.StateMachine/src/react.ts - - Trax.Api.StateMachine/package.json + - Trax.StateMachine/ts/src/index.ts + - Trax.StateMachine/ts/src/client/index.ts + - Trax.StateMachine/ts/src/react.ts + - Trax.StateMachine/ts/package.json --- # TypeScript package -`@traxsharp/state-machine` is the TypeScript twin of `Trax.Effect.StateMachine`, published from `Trax.Api.StateMachine`. +`@traxsharp/state-machine` is the TypeScript twin of `Trax.Effect.StateMachine`, published from `Trax.StateMachine/ts`. Its exports are pinned by a committed baseline (`src/exports.test.ts`). ```bash diff --git a/Trax.Docs/tests/Trax.Docs.Tests/Tests/SdkReferenceFrontMatterTests.cs b/Trax.Docs/tests/Trax.Docs.Tests/Tests/SdkReferenceFrontMatterTests.cs index b2b89a359..10bf6c546 100644 --- a/Trax.Docs/tests/Trax.Docs.Tests/Tests/SdkReferenceFrontMatterTests.cs +++ b/Trax.Docs/tests/Trax.Docs.Tests/Tests/SdkReferenceFrontMatterTests.cs @@ -453,7 +453,7 @@ public void Check_ReportsMissingFieldsApart_FromWrongOnes() var typescript = Check( FrontMatter.Of( - "---\npackage: \"@traxsharp/state-machine\"\nsurface: typescript\nsource:\n - Trax.Api.StateMachine\n---\n" + "---\npackage: \"@traxsharp/state-machine\"\nsurface: typescript\nsource:\n - Trax.StateMachine/ts\n---\n" ), npm ); diff --git a/Trax.Docs/tests/Trax.Docs.Tests/Tests/TypeScriptExportsAreDocumentedTests.cs b/Trax.Docs/tests/Trax.Docs.Tests/Tests/TypeScriptExportsAreDocumentedTests.cs index eceeabf5b..8c0ed7b93 100644 --- a/Trax.Docs/tests/Trax.Docs.Tests/Tests/TypeScriptExportsAreDocumentedTests.cs +++ b/Trax.Docs/tests/Trax.Docs.Tests/Tests/TypeScriptExportsAreDocumentedTests.cs @@ -7,7 +7,7 @@ namespace Trax.Docs.Tests.Tests; /// The .NET packages are held to this by PublicApiIsDocumentedTests; the npm package has no public API /// baseline that test reads, so an export, a type above all, could ship with nowhere to learn it but its /// .d.ts. The exports are read from the package's committed snapshot -/// (Trax.Api.StateMachine/src/__snapshots__/exports.test.ts.snap), which its own +/// (Trax.StateMachine/ts/src/__snapshots__/exports.test.ts.snap), which its own /// exports.test.ts keeps equal to what each entry point exports. An export counts as documented when its name /// is a word inside a code span on that page. That proves the name appears, not that the page describing it is /// right. @@ -38,7 +38,8 @@ public void Every_export_of_the_npm_package_is_named_on_its_reference_page() var snapshot = File.ReadAllText( System.IO.Path.Combine( RepoRoot.Monorepo, - "Trax.Api.StateMachine", + "Trax.StateMachine", + "ts", "src", "__snapshots__", "exports.test.ts.snap" diff --git a/Trax.Samples/AGENTS.md b/Trax.Samples/AGENTS.md index 0bf8288fc..361a40641 100644 --- a/Trax.Samples/AGENTS.md +++ b/Trax.Samples/AGENTS.md @@ -89,10 +89,10 @@ can drive goes in its exclusion list, with the reason. `tests/Trax.Samples.Recovery.Browser/` drives the Recovery page in chromium with Playwright for .NET. It builds the page with vite, so it needs `npm ci` in the page's folder and in -`Trax.Api.StateMachine`, and chromium installed with the `playwright.ps1` beside its build output. +`Trax.StateMachine/ts`, and chromium installed with the `playwright.ps1` beside its build output. `samples/StateMachine/web` runs vitest (`npm test`) over its committed twins, after `npm ci` there and in -`Trax.Api.StateMachine`. +`Trax.StateMachine/ts`. `tests/Trax.Samples.ApiDashboard.Browser/` opens the dashboard Trax.Api.Dashboard serves in chromium, against a host it builds in-process on the in-memory provider, and fails on any diff --git a/Trax.Samples/samples/Recovery/README.md b/Trax.Samples/samples/Recovery/README.md index 49c65e256..a9f92817b 100644 --- a/Trax.Samples/samples/Recovery/README.md +++ b/Trax.Samples/samples/Recovery/README.md @@ -204,9 +204,9 @@ ChoosingFields ◀──StartOver── Building, Built, BuildFailed, BuildCance ``` The page's twin of the machine (`Trax.Samples.Recovery.Client/src/topicMap/`) is generated by the `trax machine` -CLI from the C# machine, and the client builds the engine, `@traxsharp/state-machine`, from `Trax.Api.StateMachine/src` +CLI from the C# machine, and the client builds the engine, `@traxsharp/state-machine`, from `Trax.StateMachine/ts/src` in this repository. After changing the machine, build the sample and regenerate it from the repository root (the -engine needs `npm ci` in `Trax.Api.StateMachine` once): +engine needs `npm ci` in `Trax.StateMachine/ts` once): ```bash dotnet run --project Trax.Cli/src/Trax.Cli -- machine generate \ @@ -215,7 +215,7 @@ dotnet run --project Trax.Cli/src/Trax.Cli -- machine generate \ --ir-out Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Client/src/topicMap \ --twin-out Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Client/src/topicMap \ --corpus-out Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Client/src/topicMap \ - --engine-src Trax.Api.StateMachine/src --import-style specifier + --engine-src Trax.StateMachine/ts/src --import-style specifier ``` The host runs only persisted documents, as a production host would: an ad-hoc document, and introspection, are diff --git a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Client/tsconfig.json b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Client/tsconfig.json index 56c804778..b253af29c 100644 --- a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Client/tsconfig.json +++ b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Client/tsconfig.json @@ -18,9 +18,9 @@ "noUncheckedSideEffectImports": true, "resolveJsonModule": true, "paths": { - "@traxsharp/state-machine": ["../../../../Trax.Api.StateMachine/src/index.ts"], - "@traxsharp/state-machine/client": ["../../../../Trax.Api.StateMachine/src/client/index.ts"], - "@traxsharp/state-machine/react": ["../../../../Trax.Api.StateMachine/src/react.ts"] + "@traxsharp/state-machine": ["../../../../Trax.StateMachine/ts/src/index.ts"], + "@traxsharp/state-machine/client": ["../../../../Trax.StateMachine/ts/src/client/index.ts"], + "@traxsharp/state-machine/react": ["../../../../Trax.StateMachine/ts/src/react.ts"] } }, "include": ["src"] diff --git a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Client/vite.config.ts b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Client/vite.config.ts index d8472b55b..cfc472585 100644 --- a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Client/vite.config.ts +++ b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Client/vite.config.ts @@ -5,7 +5,7 @@ import react from "@vitejs/plugin-react"; // The state-machine engine, @traxsharp/state-machine, built from its source in this repository. The topic // map's generated twin imports it, and so do the draft's server and its React hook. The hook's source imports // react from beside it, so react is deduplicated: the page and the hook share one copy. -const engine = fileURLToPath(new URL("../../../../Trax.Api.StateMachine/src", import.meta.url)); +const engine = fileURLToPath(new URL("../../../../Trax.StateMachine/ts/src", import.meta.url)); export default defineConfig({ plugins: [react()], diff --git a/Trax.Samples/samples/StateMachine/web/tsconfig.json b/Trax.Samples/samples/StateMachine/web/tsconfig.json index 42aa67877..0a6889fc9 100644 --- a/Trax.Samples/samples/StateMachine/web/tsconfig.json +++ b/Trax.Samples/samples/StateMachine/web/tsconfig.json @@ -22,13 +22,13 @@ "resolveJsonModule": true, "paths": { "@traxsharp/state-machine": [ - "../../../../Trax.Api.StateMachine/src/index.ts" + "../../../../Trax.StateMachine/ts/src/index.ts" ], "@traxsharp/state-machine/client": [ - "../../../../Trax.Api.StateMachine/src/client/index.ts" + "../../../../Trax.StateMachine/ts/src/client/index.ts" ], "@traxsharp/state-machine/react": [ - "../../../../Trax.Api.StateMachine/src/react.ts" + "../../../../Trax.StateMachine/ts/src/react.ts" ] } }, diff --git a/Trax.Samples/samples/StateMachine/web/vite.config.ts b/Trax.Samples/samples/StateMachine/web/vite.config.ts index 6b11ecc6e..e22d22731 100644 --- a/Trax.Samples/samples/StateMachine/web/vite.config.ts +++ b/Trax.Samples/samples/StateMachine/web/vite.config.ts @@ -5,7 +5,7 @@ import react from "@vitejs/plugin-react"; // The state-machine engine, @traxsharp/state-machine, built from its source in this repository. The generated client // in src/trax imports it. The engine's source imports react from beside it, so react is deduplicated: the page and // the engine share one copy. -const engine = fileURLToPath(new URL("../../../../Trax.Api.StateMachine/src", import.meta.url)); +const engine = fileURLToPath(new URL("../../../../Trax.StateMachine/ts/src", import.meta.url)); export default defineConfig({ plugins: [react()], diff --git a/Trax.Samples/tests/Trax.Samples.Recovery.Browser/Fixtures/RecoveryClientBuild.cs b/Trax.Samples/tests/Trax.Samples.Recovery.Browser/Fixtures/RecoveryClientBuild.cs index 07c50eb7f..e1b5fea4b 100644 --- a/Trax.Samples/tests/Trax.Samples.Recovery.Browser/Fixtures/RecoveryClientBuild.cs +++ b/Trax.Samples/tests/Trax.Samples.Recovery.Browser/Fixtures/RecoveryClientBuild.cs @@ -5,7 +5,7 @@ namespace Trax.Samples.Recovery.Browser.Fixtures; /// /// The Recovery page, built once per run with vite build into this project's output, as a deploy would -/// build it. Its npm packages must be installed (npm ci in the client and in Trax.Api.StateMachine, whose +/// build it. Its npm packages must be installed (npm ci in the client and in Trax.StateMachine/ts, whose /// engine source the page compiles); CI installs them before the tests. /// public static class RecoveryClientBuild @@ -26,13 +26,14 @@ public static async Task BuildAsync() "..", "..", "..", - "Trax.Api.StateMachine", + "Trax.StateMachine", + "ts", "node_modules" ); if (!File.Exists(vite) || !Directory.Exists(engineModules)) throw new InvalidOperationException( "The Recovery page's npm packages are not installed. Run `npm ci --ignore-scripts` in " - + $"{ClientFolder} and in Trax.Api.StateMachine before the browser tests." + + $"{ClientFolder} and in Trax.StateMachine/ts before the browser tests." ); var output = Path.Combine(AppContext.BaseDirectory, "recovery-client"); diff --git a/Trax.Api.StateMachine/conformance/PROTOCOL.md b/Trax.StateMachine/conformance/PROTOCOL.md similarity index 90% rename from Trax.Api.StateMachine/conformance/PROTOCOL.md rename to Trax.StateMachine/conformance/PROTOCOL.md index 4b005311c..ec640cee5 100644 --- a/Trax.Api.StateMachine/conformance/PROTOCOL.md +++ b/Trax.StateMachine/conformance/PROTOCOL.md @@ -1,17 +1,21 @@ # The conformance runner and its testee protocol -`tools/conformance/run.mjs` turns every case in `machines/` and `conformance/` into requests, sends them to one +`run.mjs`, in this directory, turns every case in `machines/` and the tables beside it into requests, sends them to one engine, the **testee**, and compares what it answers with what the case expects. An engine in any language joins by implementing the testee side of this protocol over its public API, not over its internals, so a bug in how a binding marshals a value is caught too. Only codes and wire bytes are compared; messages are never sent. ## Running it +From `Trax.StateMachine/`: + ```bash -node tools/conformance/run.mjs --testee node tools/conformance/testee-ts.mjs # spawn a testee command -node tools/conformance/run.mjs --stdio # be spawned by one +node conformance/run.mjs --testee node ts/tools/conformance/testee-ts.mjs # spawn a testee command +node conformance/run.mjs --stdio # be spawned by one ``` +The runner and `kit.mjs` use only node's own modules, so they run without an `npm ci`. + With `--testee`, the runner starts the command and talks to it over the command's stdin and stdout. With `--stdio`, the roles on the pipes are reversed: the runner writes requests on its own stdout and reads answers on its stdin, so a test in another language (the C# `ConformanceRunnerTests`) can start the runner and answer from inside its own diff --git a/Trax.Api.StateMachine/conformance/canonical-wire.json b/Trax.StateMachine/conformance/canonical-wire.json similarity index 100% rename from Trax.Api.StateMachine/conformance/canonical-wire.json rename to Trax.StateMachine/conformance/canonical-wire.json diff --git a/Trax.Api.StateMachine/conformance/ir.schema.json b/Trax.StateMachine/conformance/ir.schema.json similarity index 100% rename from Trax.Api.StateMachine/conformance/ir.schema.json rename to Trax.StateMachine/conformance/ir.schema.json diff --git a/Trax.Api.StateMachine/tools/conformance/kit.mjs b/Trax.StateMachine/conformance/kit.mjs similarity index 97% rename from Trax.Api.StateMachine/tools/conformance/kit.mjs rename to Trax.StateMachine/conformance/kit.mjs index 5dd139366..73f27ce21 100644 --- a/Trax.Api.StateMachine/tools/conformance/kit.mjs +++ b/Trax.StateMachine/conformance/kit.mjs @@ -5,9 +5,8 @@ import { fileURLToPath } from "node:url"; // The conformance kit as requests: every case in machines/ and conformance/, each a request for the testee and the // answer it must give (conformance/PROTOCOL.md). Engine-independent: nothing here imports the engine. -const root = fileURLToPath(new URL("../..", import.meta.url)); -const machinesDir = join(root, "machines"); -const conformanceDir = join(root, "conformance"); +const conformanceDir = fileURLToPath(new URL(".", import.meta.url)); +const machinesDir = join(conformanceDir, "machines"); const readJson = (path) => JSON.parse(readFileSync(path, "utf8")); diff --git a/Trax.Api.StateMachine/machines/checkout/checkout.ir.json b/Trax.StateMachine/conformance/machines/checkout/checkout.ir.json similarity index 100% rename from Trax.Api.StateMachine/machines/checkout/checkout.ir.json rename to Trax.StateMachine/conformance/machines/checkout/checkout.ir.json diff --git a/Trax.Api.StateMachine/machines/checkout/differential.json b/Trax.StateMachine/conformance/machines/checkout/differential.json similarity index 100% rename from Trax.Api.StateMachine/machines/checkout/differential.json rename to Trax.StateMachine/conformance/machines/checkout/differential.json diff --git a/Trax.Api.StateMachine/machines/checkout/fixtures/advance/01-cart-next-reviews.json b/Trax.StateMachine/conformance/machines/checkout/fixtures/advance/01-cart-next-reviews.json similarity index 100% rename from Trax.Api.StateMachine/machines/checkout/fixtures/advance/01-cart-next-reviews.json rename to Trax.StateMachine/conformance/machines/checkout/fixtures/advance/01-cart-next-reviews.json diff --git a/Trax.Api.StateMachine/machines/checkout/fixtures/advance/02-cart-next-empty-guard-failed.json b/Trax.StateMachine/conformance/machines/checkout/fixtures/advance/02-cart-next-empty-guard-failed.json similarity index 100% rename from Trax.Api.StateMachine/machines/checkout/fixtures/advance/02-cart-next-empty-guard-failed.json rename to Trax.StateMachine/conformance/machines/checkout/fixtures/advance/02-cart-next-empty-guard-failed.json diff --git a/Trax.Api.StateMachine/machines/checkout/fixtures/advance/03-review-pay-pays.json b/Trax.StateMachine/conformance/machines/checkout/fixtures/advance/03-review-pay-pays.json similarity index 100% rename from Trax.Api.StateMachine/machines/checkout/fixtures/advance/03-review-pay-pays.json rename to Trax.StateMachine/conformance/machines/checkout/fixtures/advance/03-review-pay-pays.json diff --git a/Trax.Api.StateMachine/machines/checkout/fixtures/advance/04-review-pay-no-receipt-invalid-input.json b/Trax.StateMachine/conformance/machines/checkout/fixtures/advance/04-review-pay-no-receipt-invalid-input.json similarity index 100% rename from Trax.Api.StateMachine/machines/checkout/fixtures/advance/04-review-pay-no-receipt-invalid-input.json rename to Trax.StateMachine/conformance/machines/checkout/fixtures/advance/04-review-pay-no-receipt-invalid-input.json diff --git a/Trax.Api.StateMachine/machines/checkout/fixtures/advance/05-review-back-to-cart.json b/Trax.StateMachine/conformance/machines/checkout/fixtures/advance/05-review-back-to-cart.json similarity index 100% rename from Trax.Api.StateMachine/machines/checkout/fixtures/advance/05-review-back-to-cart.json rename to Trax.StateMachine/conformance/machines/checkout/fixtures/advance/05-review-back-to-cart.json diff --git a/Trax.Api.StateMachine/machines/checkout/fixtures/advance/06-paid-restart-fresh.json b/Trax.StateMachine/conformance/machines/checkout/fixtures/advance/06-paid-restart-fresh.json similarity index 100% rename from Trax.Api.StateMachine/machines/checkout/fixtures/advance/06-paid-restart-fresh.json rename to Trax.StateMachine/conformance/machines/checkout/fixtures/advance/06-paid-restart-fresh.json diff --git a/Trax.Api.StateMachine/machines/checkout/fixtures/advance/pay-missing-input.json b/Trax.StateMachine/conformance/machines/checkout/fixtures/advance/pay-missing-input.json similarity index 100% rename from Trax.Api.StateMachine/machines/checkout/fixtures/advance/pay-missing-input.json rename to Trax.StateMachine/conformance/machines/checkout/fixtures/advance/pay-missing-input.json diff --git a/Trax.Api.StateMachine/machines/checkout/fixtures/advance/pay-number-as-string.json b/Trax.StateMachine/conformance/machines/checkout/fixtures/advance/pay-number-as-string.json similarity index 100% rename from Trax.Api.StateMachine/machines/checkout/fixtures/advance/pay-number-as-string.json rename to Trax.StateMachine/conformance/machines/checkout/fixtures/advance/pay-number-as-string.json diff --git a/Trax.Api.StateMachine/machines/checkout/fixtures/advance/pay-proto-key.json b/Trax.StateMachine/conformance/machines/checkout/fixtures/advance/pay-proto-key.json similarity index 100% rename from Trax.Api.StateMachine/machines/checkout/fixtures/advance/pay-proto-key.json rename to Trax.StateMachine/conformance/machines/checkout/fixtures/advance/pay-proto-key.json diff --git a/Trax.Api.StateMachine/machines/checkout/fixtures/advance/pay-unknown-field.json b/Trax.StateMachine/conformance/machines/checkout/fixtures/advance/pay-unknown-field.json similarity index 100% rename from Trax.Api.StateMachine/machines/checkout/fixtures/advance/pay-unknown-field.json rename to Trax.StateMachine/conformance/machines/checkout/fixtures/advance/pay-unknown-field.json diff --git a/Trax.Api.StateMachine/machines/checkout/fixtures/rehydrate/01-valid-cart.json b/Trax.StateMachine/conformance/machines/checkout/fixtures/rehydrate/01-valid-cart.json similarity index 100% rename from Trax.Api.StateMachine/machines/checkout/fixtures/rehydrate/01-valid-cart.json rename to Trax.StateMachine/conformance/machines/checkout/fixtures/rehydrate/01-valid-cart.json diff --git a/Trax.Api.StateMachine/machines/checkout/fixtures/rehydrate/02-valid-review.json b/Trax.StateMachine/conformance/machines/checkout/fixtures/rehydrate/02-valid-review.json similarity index 100% rename from Trax.Api.StateMachine/machines/checkout/fixtures/rehydrate/02-valid-review.json rename to Trax.StateMachine/conformance/machines/checkout/fixtures/rehydrate/02-valid-review.json diff --git a/Trax.Api.StateMachine/machines/checkout/fixtures/rehydrate/03-valid-paid.json b/Trax.StateMachine/conformance/machines/checkout/fixtures/rehydrate/03-valid-paid.json similarity index 100% rename from Trax.Api.StateMachine/machines/checkout/fixtures/rehydrate/03-valid-paid.json rename to Trax.StateMachine/conformance/machines/checkout/fixtures/rehydrate/03-valid-paid.json diff --git a/Trax.Api.StateMachine/machines/checkout/fixtures/rehydrate/04-invalid-paid-no-receipt.json b/Trax.StateMachine/conformance/machines/checkout/fixtures/rehydrate/04-invalid-paid-no-receipt.json similarity index 100% rename from Trax.Api.StateMachine/machines/checkout/fixtures/rehydrate/04-invalid-paid-no-receipt.json rename to Trax.StateMachine/conformance/machines/checkout/fixtures/rehydrate/04-invalid-paid-no-receipt.json diff --git a/Trax.Api.StateMachine/machines/checkout/fixtures/rehydrate/05-invalid-review-empty-items.json b/Trax.StateMachine/conformance/machines/checkout/fixtures/rehydrate/05-invalid-review-empty-items.json similarity index 100% rename from Trax.Api.StateMachine/machines/checkout/fixtures/rehydrate/05-invalid-review-empty-items.json rename to Trax.StateMachine/conformance/machines/checkout/fixtures/rehydrate/05-invalid-review-empty-items.json diff --git a/Trax.Api.StateMachine/machines/checkout/fixtures/rehydrate/06-version-mismatch.json b/Trax.StateMachine/conformance/machines/checkout/fixtures/rehydrate/06-version-mismatch.json similarity index 100% rename from Trax.Api.StateMachine/machines/checkout/fixtures/rehydrate/06-version-mismatch.json rename to Trax.StateMachine/conformance/machines/checkout/fixtures/rehydrate/06-version-mismatch.json diff --git a/Trax.Api.StateMachine/machines/checkout/fixtures/rehydrate/07-unknown-state.json b/Trax.StateMachine/conformance/machines/checkout/fixtures/rehydrate/07-unknown-state.json similarity index 100% rename from Trax.Api.StateMachine/machines/checkout/fixtures/rehydrate/07-unknown-state.json rename to Trax.StateMachine/conformance/machines/checkout/fixtures/rehydrate/07-unknown-state.json diff --git a/Trax.Api.StateMachine/machines/checkout/structure.json b/Trax.StateMachine/conformance/machines/checkout/structure.json similarity index 100% rename from Trax.Api.StateMachine/machines/checkout/structure.json rename to Trax.StateMachine/conformance/machines/checkout/structure.json diff --git a/Trax.Api.StateMachine/machines/checkout/wire-handoff.json b/Trax.StateMachine/conformance/machines/checkout/wire-handoff.json similarity index 100% rename from Trax.Api.StateMachine/machines/checkout/wire-handoff.json rename to Trax.StateMachine/conformance/machines/checkout/wire-handoff.json diff --git a/Trax.Api.StateMachine/machines/gauge/differential.json b/Trax.StateMachine/conformance/machines/gauge/differential.json similarity index 100% rename from Trax.Api.StateMachine/machines/gauge/differential.json rename to Trax.StateMachine/conformance/machines/gauge/differential.json diff --git a/Trax.Api.StateMachine/machines/gauge/gauge.ir.json b/Trax.StateMachine/conformance/machines/gauge/gauge.ir.json similarity index 100% rename from Trax.Api.StateMachine/machines/gauge/gauge.ir.json rename to Trax.StateMachine/conformance/machines/gauge/gauge.ir.json diff --git a/Trax.Api.StateMachine/machines/ingest/differential.json b/Trax.StateMachine/conformance/machines/ingest/differential.json similarity index 100% rename from Trax.Api.StateMachine/machines/ingest/differential.json rename to Trax.StateMachine/conformance/machines/ingest/differential.json diff --git a/Trax.Api.StateMachine/machines/ingest/ingest.ir.json b/Trax.StateMachine/conformance/machines/ingest/ingest.ir.json similarity index 100% rename from Trax.Api.StateMachine/machines/ingest/ingest.ir.json rename to Trax.StateMachine/conformance/machines/ingest/ingest.ir.json diff --git a/Trax.Api.StateMachine/machines/reminder/differential.json b/Trax.StateMachine/conformance/machines/reminder/differential.json similarity index 100% rename from Trax.Api.StateMachine/machines/reminder/differential.json rename to Trax.StateMachine/conformance/machines/reminder/differential.json diff --git a/Trax.Api.StateMachine/machines/reminder/reminder.ir.json b/Trax.StateMachine/conformance/machines/reminder/reminder.ir.json similarity index 100% rename from Trax.Api.StateMachine/machines/reminder/reminder.ir.json rename to Trax.StateMachine/conformance/machines/reminder/reminder.ir.json diff --git a/Trax.Api.StateMachine/machines/turnstile/differential.json b/Trax.StateMachine/conformance/machines/turnstile/differential.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/differential.json rename to Trax.StateMachine/conformance/machines/turnstile/differential.json diff --git a/Trax.Api.StateMachine/machines/turnstile/fixtures/advance/01-locked-coin-quarter-unlocks.json b/Trax.StateMachine/conformance/machines/turnstile/fixtures/advance/01-locked-coin-quarter-unlocks.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/fixtures/advance/01-locked-coin-quarter-unlocks.json rename to Trax.StateMachine/conformance/machines/turnstile/fixtures/advance/01-locked-coin-quarter-unlocks.json diff --git a/Trax.Api.StateMachine/machines/turnstile/fixtures/advance/02-locked-coin-dollar-unlocks.json b/Trax.StateMachine/conformance/machines/turnstile/fixtures/advance/02-locked-coin-dollar-unlocks.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/fixtures/advance/02-locked-coin-dollar-unlocks.json rename to Trax.StateMachine/conformance/machines/turnstile/fixtures/advance/02-locked-coin-dollar-unlocks.json diff --git a/Trax.Api.StateMachine/machines/turnstile/fixtures/advance/03-locked-coin-penny-guard-failed.json b/Trax.StateMachine/conformance/machines/turnstile/fixtures/advance/03-locked-coin-penny-guard-failed.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/fixtures/advance/03-locked-coin-penny-guard-failed.json rename to Trax.StateMachine/conformance/machines/turnstile/fixtures/advance/03-locked-coin-penny-guard-failed.json diff --git a/Trax.Api.StateMachine/machines/turnstile/fixtures/advance/04-locked-push-no-transition.json b/Trax.StateMachine/conformance/machines/turnstile/fixtures/advance/04-locked-push-no-transition.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/fixtures/advance/04-locked-push-no-transition.json rename to Trax.StateMachine/conformance/machines/turnstile/fixtures/advance/04-locked-push-no-transition.json diff --git a/Trax.Api.StateMachine/machines/turnstile/fixtures/advance/05-unlocked-coin-no-transition.json b/Trax.StateMachine/conformance/machines/turnstile/fixtures/advance/05-unlocked-coin-no-transition.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/fixtures/advance/05-unlocked-coin-no-transition.json rename to Trax.StateMachine/conformance/machines/turnstile/fixtures/advance/05-unlocked-coin-no-transition.json diff --git a/Trax.Api.StateMachine/machines/turnstile/fixtures/advance/06-unlocked-push-locks-and-clears.json b/Trax.StateMachine/conformance/machines/turnstile/fixtures/advance/06-unlocked-push-locks-and-clears.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/fixtures/advance/06-unlocked-push-locks-and-clears.json rename to Trax.StateMachine/conformance/machines/turnstile/fixtures/advance/06-unlocked-push-locks-and-clears.json diff --git a/Trax.Api.StateMachine/machines/turnstile/fixtures/advance/coin-missing-input.json b/Trax.StateMachine/conformance/machines/turnstile/fixtures/advance/coin-missing-input.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/fixtures/advance/coin-missing-input.json rename to Trax.StateMachine/conformance/machines/turnstile/fixtures/advance/coin-missing-input.json diff --git a/Trax.Api.StateMachine/machines/turnstile/fixtures/advance/coin-number-as-string.json b/Trax.StateMachine/conformance/machines/turnstile/fixtures/advance/coin-number-as-string.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/fixtures/advance/coin-number-as-string.json rename to Trax.StateMachine/conformance/machines/turnstile/fixtures/advance/coin-number-as-string.json diff --git a/Trax.Api.StateMachine/machines/turnstile/fixtures/advance/coin-proto-key.json b/Trax.StateMachine/conformance/machines/turnstile/fixtures/advance/coin-proto-key.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/fixtures/advance/coin-proto-key.json rename to Trax.StateMachine/conformance/machines/turnstile/fixtures/advance/coin-proto-key.json diff --git a/Trax.Api.StateMachine/machines/turnstile/fixtures/advance/coin-unknown-field.json b/Trax.StateMachine/conformance/machines/turnstile/fixtures/advance/coin-unknown-field.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/fixtures/advance/coin-unknown-field.json rename to Trax.StateMachine/conformance/machines/turnstile/fixtures/advance/coin-unknown-field.json diff --git a/Trax.Api.StateMachine/machines/turnstile/fixtures/rehydrate/01-valid-locked.json b/Trax.StateMachine/conformance/machines/turnstile/fixtures/rehydrate/01-valid-locked.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/fixtures/rehydrate/01-valid-locked.json rename to Trax.StateMachine/conformance/machines/turnstile/fixtures/rehydrate/01-valid-locked.json diff --git a/Trax.Api.StateMachine/machines/turnstile/fixtures/rehydrate/02-valid-unlocked.json b/Trax.StateMachine/conformance/machines/turnstile/fixtures/rehydrate/02-valid-unlocked.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/fixtures/rehydrate/02-valid-unlocked.json rename to Trax.StateMachine/conformance/machines/turnstile/fixtures/rehydrate/02-valid-unlocked.json diff --git a/Trax.Api.StateMachine/machines/turnstile/fixtures/rehydrate/03-malformed.json b/Trax.StateMachine/conformance/machines/turnstile/fixtures/rehydrate/03-malformed.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/fixtures/rehydrate/03-malformed.json rename to Trax.StateMachine/conformance/machines/turnstile/fixtures/rehydrate/03-malformed.json diff --git a/Trax.Api.StateMachine/machines/turnstile/fixtures/rehydrate/04-unknown-machine.json b/Trax.StateMachine/conformance/machines/turnstile/fixtures/rehydrate/04-unknown-machine.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/fixtures/rehydrate/04-unknown-machine.json rename to Trax.StateMachine/conformance/machines/turnstile/fixtures/rehydrate/04-unknown-machine.json diff --git a/Trax.Api.StateMachine/machines/turnstile/fixtures/rehydrate/05-version-mismatch.json b/Trax.StateMachine/conformance/machines/turnstile/fixtures/rehydrate/05-version-mismatch.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/fixtures/rehydrate/05-version-mismatch.json rename to Trax.StateMachine/conformance/machines/turnstile/fixtures/rehydrate/05-version-mismatch.json diff --git a/Trax.Api.StateMachine/machines/turnstile/fixtures/rehydrate/06-unknown-state.json b/Trax.StateMachine/conformance/machines/turnstile/fixtures/rehydrate/06-unknown-state.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/fixtures/rehydrate/06-unknown-state.json rename to Trax.StateMachine/conformance/machines/turnstile/fixtures/rehydrate/06-unknown-state.json diff --git a/Trax.Api.StateMachine/machines/turnstile/fixtures/rehydrate/07-invalid-context-missing.json b/Trax.StateMachine/conformance/machines/turnstile/fixtures/rehydrate/07-invalid-context-missing.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/fixtures/rehydrate/07-invalid-context-missing.json rename to Trax.StateMachine/conformance/machines/turnstile/fixtures/rehydrate/07-invalid-context-missing.json diff --git a/Trax.Api.StateMachine/machines/turnstile/fixtures/rehydrate/08-invalid-context-forbidden.json b/Trax.StateMachine/conformance/machines/turnstile/fixtures/rehydrate/08-invalid-context-forbidden.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/fixtures/rehydrate/08-invalid-context-forbidden.json rename to Trax.StateMachine/conformance/machines/turnstile/fixtures/rehydrate/08-invalid-context-forbidden.json diff --git a/Trax.Api.StateMachine/machines/turnstile/migration.json b/Trax.StateMachine/conformance/machines/turnstile/migration.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/migration.json rename to Trax.StateMachine/conformance/machines/turnstile/migration.json diff --git a/Trax.Api.StateMachine/machines/turnstile/structure.json b/Trax.StateMachine/conformance/machines/turnstile/structure.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/structure.json rename to Trax.StateMachine/conformance/machines/turnstile/structure.json diff --git a/Trax.Api.StateMachine/machines/turnstile/turnstile.ir.json b/Trax.StateMachine/conformance/machines/turnstile/turnstile.ir.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/turnstile.ir.json rename to Trax.StateMachine/conformance/machines/turnstile/turnstile.ir.json diff --git a/Trax.Api.StateMachine/machines/turnstile/wire-handoff.json b/Trax.StateMachine/conformance/machines/turnstile/wire-handoff.json similarity index 100% rename from Trax.Api.StateMachine/machines/turnstile/wire-handoff.json rename to Trax.StateMachine/conformance/machines/turnstile/wire-handoff.json diff --git a/Trax.Api.StateMachine/conformance/refusal-codes.json b/Trax.StateMachine/conformance/refusal-codes.json similarity index 100% rename from Trax.Api.StateMachine/conformance/refusal-codes.json rename to Trax.StateMachine/conformance/refusal-codes.json diff --git a/Trax.Api.StateMachine/tools/conformance/run.mjs b/Trax.StateMachine/conformance/run.mjs similarity index 97% rename from Trax.Api.StateMachine/tools/conformance/run.mjs rename to Trax.StateMachine/conformance/run.mjs index fae79ef0c..16d2021c1 100644 --- a/Trax.Api.StateMachine/tools/conformance/run.mjs +++ b/Trax.StateMachine/conformance/run.mjs @@ -4,7 +4,7 @@ import { fileURLToPath } from "node:url"; import { canonical, kitCases } from "./kit.mjs"; const USAGE = - "Usage: node tools/conformance/run.mjs [--only ] (--testee [args...] | --stdio)\n" + + "Usage: node conformance/run.mjs [--only ] (--testee [args...] | --stdio)\n" + "See conformance/PROTOCOL.md."; /** diff --git a/Trax.Api.StateMachine/conformance/strict-input/cases.json b/Trax.StateMachine/conformance/strict-input/cases.json similarity index 100% rename from Trax.Api.StateMachine/conformance/strict-input/cases.json rename to Trax.StateMachine/conformance/strict-input/cases.json diff --git a/Trax.Api.StateMachine/conformance/strict-input/strict.ir.json b/Trax.StateMachine/conformance/strict-input/strict.ir.json similarity index 100% rename from Trax.Api.StateMachine/conformance/strict-input/strict.ir.json rename to Trax.StateMachine/conformance/strict-input/strict.ir.json diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/IrExporter.cs b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/IrExporter.cs index 21c62abe6..c9cdfe198 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/IrExporter.cs +++ b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/IrExporter.cs @@ -16,7 +16,7 @@ public static class IrExporter /// The IR format this exporter writes: the contract the TypeScript engine reads it by. A twin generated with /// specifier imports records it, and the installed @traxsharp/state-machine refuses a format it cannot /// read. It is not written into the IR, so it moves no committed ir.json and no schema hash. Bump it, - /// with irFormatVersion in Trax.Api.StateMachine/src/rules/irFormat.ts, when the IR gains + /// with irFormatVersion in Trax.StateMachine/ts/src/rules/irFormat.ts, when the IR gains /// something an engine reading the previous format would misread or ignore; IrFormatParityTests holds /// the two equal. /// diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/ConformanceRunnerTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/ConformanceRunnerTests.cs index c0d0026d3..6a1a8ace2 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/ConformanceRunnerTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/ConformanceRunnerTests.cs @@ -5,9 +5,10 @@ namespace Trax.Effect.StateMachine.Tests.Conformance; /// /// The C# engine through the conformance runner, the same runner and the same cases every other engine is checked -/// with (Trax.Api.StateMachine/conformance/PROTOCOL.md). The runner is started with --stdio and this +/// with (Trax.StateMachine/conformance/PROTOCOL.md). The runner is started with --stdio and this /// process answers its requests, so no separate C# executable is needed. /// +[Category(Categories.CrossEngine)] public class ConformanceRunnerTests { [Test] diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/FixturePathsTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/FixturePathsTests.cs index 84ce13939..4dfc66c5b 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/FixturePathsTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/FixturePathsTests.cs @@ -4,7 +4,7 @@ namespace Trax.Effect.StateMachine.Tests.Conformance; /// -/// The conformance tests read Trax.Api.StateMachine/machines, which is part of the repository. A build that +/// The conformance tests read Trax.StateMachine/conformance/machines, which is part of the repository. A build that /// cannot find it must fail them rather than skip them, or every cross-engine check reports green unchecked. /// public class FixturePathsTests @@ -20,7 +20,7 @@ public void A_directory_with_no_machines_folder_above_it_throws_naming_where_it_ find.Should() .Throw() - .WithMessage($"*{Path.Combine(start, "Trax.Api.StateMachine", "machines")}*"); + .WithMessage($"*{Path.Combine(start, "Trax.StateMachine", "conformance", "machines")}*"); } finally { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/IrFormatParityTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/IrFormatParityTests.cs index 758457f8a..1b0d81569 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/IrFormatParityTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/IrFormatParityTests.cs @@ -6,17 +6,18 @@ namespace Trax.Effect.StateMachine.Tests.Conformance; /// /// The IR format is the contract between the IR this engine exports and the TypeScript engine that reads it. A twin -/// records the TypeScript side's irFormatVersion (in Trax.Api.StateMachine/src/rules/irFormat.ts), and +/// records the TypeScript side's irFormatVersion (in Trax.StateMachine/ts/src/rules/irFormat.ts), and /// an installed engine refuses a format it cannot read, so the two sides must name the same format: a change to /// what writes that bumps one bumps both. /// +[Category(Categories.CrossEngine)] public partial class IrFormatParityTests { [Test] public void The_TypeScript_engine_reads_the_IR_format_this_engine_exports() { var irFormatTs = Path.Combine( - Directory.GetParent(FixturePaths.MachinesRoot)!.FullName, + FixturePaths.TypeScriptEngineRoot, "src", "rules", "irFormat.ts" diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/IrSchemaTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/IrSchemaTests.cs index 0f54f7f08..d384b6e9e 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/IrSchemaTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/IrSchemaTests.cs @@ -13,6 +13,7 @@ namespace Trax.Effect.StateMachine.Tests.Conformance; public class IrSchemaTests { [Test] + [Category(Categories.CrossEngine)] public void Every_IR_the_exporter_writes_for_the_test_machines_validates() { var irs = ExportedIrs(); diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/StrictInputParityTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/StrictInputParityTests.cs index 15cf86e53..f656df43c 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/StrictInputParityTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/StrictInputParityTests.cs @@ -13,6 +13,7 @@ namespace Trax.Effect.StateMachine.Tests.Differential; /// refuse though the CLR reads it says why, and is checked to be one the CLR does read. /// [Property("adr", Adr)] +[Category(Categories.CrossEngine)] public class StrictInputParityTests { private const string Adr = diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/TwinSequenceParityTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/TwinSequenceParityTests.cs index 758848dc2..618c9f43b 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/TwinSequenceParityTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/TwinSequenceParityTests.cs @@ -11,11 +11,12 @@ namespace Trax.Effect.StateMachine.Tests.Differential; /// /// Random sequences of events, outcomes and timers, run through the C# engine here and through the TypeScript -/// twin by Trax.Api.StateMachine/tools/replay-sequences.mjs: the canonical snapshot and the answer agree +/// twin by Trax.StateMachine/ts/tools/replay-sequences.mjs: the canonical snapshot and the answer agree /// after every step, and both engines refuse an outcome or a timer trigger sent through advance. Skipped /// at runtime when node, or the engine's installed dependencies, are absent. /// [Property("adr", UnitTests.TriggerInputValidationTests.Adr)] +[Category(Categories.CrossEngine)] public class TwinSequenceParityTests { private const string Adr = UnitTests.TriggerInputValidationTests.Adr; @@ -241,7 +242,7 @@ public void Random_event_sequences_with_timers_fired_at_random_points_agree() if (!NodeIsAvailable()) Unavailable("node is not on PATH."); var machinesRoot = FixturePaths.MachinesRoot; - var engineRoot = Directory.GetParent(machinesRoot)!.FullName; + var engineRoot = FixturePaths.TypeScriptEngineRoot; // An empty request first: it skips the test when the engine's dependencies are absent, which cannot be // done from inside a sample. @@ -389,7 +390,7 @@ private static string RunTool(string engineRoot, string request) if (process.ExitCode == MissingDependencies) Unavailable( - "The engine's dependencies are not installed (npm ci in Trax.Api.StateMachine)." + "The engine's dependencies are not installed (npm ci in Trax.StateMachine/ts)." ); process .ExitCode.Should() diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/IngestMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/IngestMachine.cs index 10bc8125d..2cdab5f6b 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/IngestMachine.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/IngestMachine.cs @@ -28,7 +28,7 @@ public enum IngestTrigger /// One stage of an ingest: Fetching invokes , a sure output goes to /// Fetched, an unsure one to NeedsReview, a failure to FetchFailed (retried by entering /// Fetching again) and a cancel to Cancelled. Its IR is committed under -/// Trax.Api.StateMachine/machines/ingest/, and the TypeScript twin's differential corpus of it is replayed +/// Trax.StateMachine/conformance/machines/ingest/, and the TypeScript twin's differential corpus of it is replayed /// here. /// public static class IngestMachine diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/Categories.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/Categories.cs new file mode 100644 index 000000000..353ebb72b --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/Categories.cs @@ -0,0 +1,12 @@ +namespace Trax.Effect.StateMachine.Tests.Helpers; + +/// The test categories CI selects on. +public static class Categories +{ + /// + /// A test that runs or reads the TypeScript engine in Trax.StateMachine/ts, so a change on either side + /// can break it. CI runs these in the conformance suite, which runs for a change anywhere in the folder; the C# + /// suite leaves them out, so a change to the TypeScript engine alone does not rebuild the C# one. + /// + public const string CrossEngine = "CrossEngine"; +} diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/ConformanceTestee.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/ConformanceTestee.cs index d2760c87b..afa0ab145 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/ConformanceTestee.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/ConformanceTestee.cs @@ -4,7 +4,7 @@ namespace Trax.Effect.StateMachine.Tests.Helpers; /// -/// The C# engine as a conformance testee (Trax.Api.StateMachine/conformance/PROTOCOL.md). It cannot build a +/// The C# engine as a conformance testee (Trax.StateMachine/conformance/PROTOCOL.md). It cannot build a /// machine from an IR, so it serves the test machines whose IRs the kit holds, by name, and a load checks that /// the IR it is given is the one its machine exports, apart from the test-only differential block: a committed IR /// that drifted from its C# source fails there. diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/FixturePaths.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/FixturePaths.cs index d2f661fe1..38f300f4f 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/FixturePaths.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/FixturePaths.cs @@ -1,7 +1,8 @@ namespace Trax.Effect.StateMachine.Tests.Helpers; /// -/// Locates the shared, language-neutral fixtures in Trax.Api.StateMachine/machines, which both engines drive. +/// Locates the shared, language-neutral fixtures in Trax.StateMachine/conformance/machines, which both engines +/// drive, and the TypeScript engine beside them in Trax.StateMachine/ts. /// The folder is part of the repository, so a build that cannot find it is broken: every member throws rather than /// letting the conformance tests skip, which would report green without comparing the engines. /// @@ -30,8 +31,13 @@ public static string IrFile(string machine) => /// The engine-neutral conformance kit beside machines/: tables and cases any engine, in any language, /// replays. /// - public static string ConformanceRoot => - Path.Combine(Directory.GetParent(MachinesRoot)!.FullName, "conformance"); + public static string ConformanceRoot => Directory.GetParent(MachinesRoot)!.FullName; + + /// The folder that holds the conformance kit and every engine, Trax.StateMachine/. + public static string FolderRoot => Directory.GetParent(ConformanceRoot)!.FullName; + + /// The TypeScript engine, Trax.StateMachine/ts. + public static string TypeScriptEngineRoot => Path.Combine(FolderRoot, "ts"); /// The shared migration golden for a machine: stored older-version snapshots and the exact /// canonical wire each must become after forward migration. @@ -40,7 +46,7 @@ public static string MigrationFile(string machine) => /// /// Walks up from to the first directory holding - /// Trax.Api.StateMachine/machines/turnstile/fixtures, and throws, naming every directory it tried, when + /// Trax.StateMachine/conformance/machines/turnstile/fixtures, and throws, naming every directory it tried, when /// there is none. /// public static string Find(string start) @@ -49,7 +55,7 @@ public static string Find(string start) var dir = new DirectoryInfo(start); while (dir is not null) { - var candidate = Path.Combine(dir.FullName, "Trax.Api.StateMachine", "machines"); + var candidate = Path.Combine(dir.FullName, "Trax.StateMachine", "conformance", "machines"); if (Directory.Exists(Path.Combine(candidate, "turnstile", "fixtures"))) return candidate; searched.Add(candidate); @@ -57,7 +63,7 @@ public static string Find(string start) } throw new DirectoryNotFoundException( - "The shared state-machine fixtures (Trax.Api.StateMachine/machines) were not found. They are part of the " + "The shared state-machine fixtures (Trax.StateMachine/conformance/machines) were not found. They are part of the " + "repository, so the build or the copy that ran these tests left them out. Searched: " + string.Join(", ", searched) ); diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/TwinEngine.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/TwinEngine.cs index 0902d1c0e..66ff5e0b4 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/TwinEngine.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/TwinEngine.cs @@ -6,7 +6,7 @@ namespace Trax.Effect.StateMachine.Tests.Helpers; /// -/// The TypeScript twin, run from a C# test: Trax.Api.StateMachine/tools/replay-sequences.mjs bundles the +/// The TypeScript twin, run from a C# test: Trax.StateMachine/ts/tools/replay-sequences.mjs bundles the /// engine's source with esbuild and replays one-step-or-longer sequences against a machine built from its IR, /// answering each step's outcome, reason and canonical wire. When node, the engine's source or its installed /// dependencies are missing, the test is skipped on a developer's machine and fails under CI (the CI @@ -114,16 +114,16 @@ public static IReadOnlyList> ValidateIrs(IReadOnlyList - /// Runs the conformance runner (tools/conformance/run.mjs --stdio) with as its + /// Runs the conformance runner (conformance/run.mjs --stdio) with as its /// testee: each request line the runner writes is answered with the line returns. /// Returns the runner's exit code (0 when every case passed) and its report. /// public static (int ExitCode, string Report) RunConformance(Func answer) { - var engineRoot = EngineRoot(); - var start = new ProcessStartInfo("node", "tools/conformance/run.mjs --stdio") + EngineRoot(); + var start = new ProcessStartInfo("node", "conformance/run.mjs --stdio") { - WorkingDirectory = engineRoot, + WorkingDirectory = FixturePaths.FolderRoot, RedirectStandardInput = true, RedirectStandardOutput = true, RedirectStandardError = true, @@ -144,7 +144,7 @@ public static (int ExitCode, string Report) RunConformance(Func if (!conversation.Wait(NodeTimeout) || !process.WaitForExit(NodeTimeout)) { process.Kill(entireProcessTree: true); - Assert.Fail($"tools/conformance/run.mjs did not finish within {NodeTimeout}."); + Assert.Fail($"conformance/run.mjs did not finish within {NodeTimeout}."); } return (process.ExitCode, stderr.GetAwaiter().GetResult()); } @@ -153,7 +153,7 @@ private static string EngineRoot() { if (!NodeIsAvailable()) Unavailable("node is not on PATH."); - return Directory.GetParent(FixturePaths.MachinesRoot)!.FullName; + return FixturePaths.TypeScriptEngineRoot; } // Skips the test on a developer's machine; fails it under CI, where the engine is always installed. @@ -161,7 +161,7 @@ private static void Unavailable(string why) { if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("CI"))) Assert.Fail( - $"The TypeScript twin cannot run: {why} CI installs it (npm ci in Trax.Api.StateMachine), so a " + $"The TypeScript twin cannot run: {why} CI installs it (npm ci in Trax.StateMachine/ts), so a " + "parity test that skips there proves nothing." ); Assert.Ignore($"The TypeScript twin cannot run: {why} Skipping the cross-engine check."); @@ -191,7 +191,7 @@ private static string Run(string engineRoot, string script, string request) } if (process.ExitCode == MissingDependencies) - Unavailable("its dependencies are not installed (npm ci in Trax.Api.StateMachine)."); + Unavailable("its dependencies are not installed (npm ci in Trax.StateMachine/ts)."); process.ExitCode.Should().Be(0, $"{script} failed: {stderr.GetAwaiter().GetResult()}"); return stdout.GetAwaiter().GetResult(); } diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerInputPropertyTests.cs b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerInputPropertyTests.cs index 3aac1b48d..d933e8328 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerInputPropertyTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerInputPropertyTests.cs @@ -13,6 +13,7 @@ namespace Trax.Effect.StateMachine.Tests.UnitTests; /// well, and gets the same verdict there. /// [Property("adr", TriggerInputValidationTests.Adr)] +[Category(Categories.CrossEngine)] public class TriggerInputPropertyTests { private const string Adr = TriggerInputValidationTests.Adr; diff --git a/Trax.Api.StateMachine/.gitignore b/Trax.StateMachine/ts/.gitignore similarity index 100% rename from Trax.Api.StateMachine/.gitignore rename to Trax.StateMachine/ts/.gitignore diff --git a/Trax.Api.StateMachine/.prettierignore b/Trax.StateMachine/ts/.prettierignore similarity index 100% rename from Trax.Api.StateMachine/.prettierignore rename to Trax.StateMachine/ts/.prettierignore diff --git a/Trax.Api.StateMachine/AGENTS.md b/Trax.StateMachine/ts/AGENTS.md similarity index 100% rename from Trax.Api.StateMachine/AGENTS.md rename to Trax.StateMachine/ts/AGENTS.md diff --git a/Trax.Api.StateMachine/README.md b/Trax.StateMachine/ts/README.md similarity index 98% rename from Trax.Api.StateMachine/README.md rename to Trax.StateMachine/ts/README.md index bf4aefa45..cf94e66f8 100644 --- a/Trax.Api.StateMachine/README.md +++ b/Trax.StateMachine/ts/README.md @@ -66,7 +66,7 @@ prediction at once and replaces it with what the server stored. The same machine ## Contributing -Read [AGENTS.md](https://github.com/TraxSharp/Trax/blob/main/Trax.Api.StateMachine/AGENTS.md) before changing code. +Read [AGENTS.md](https://github.com/TraxSharp/Trax/blob/main/Trax.StateMachine/ts/AGENTS.md) before changing code. Report vulnerabilities privately as described in [SECURITY.md](https://github.com/TraxSharp/Trax/blob/main/SECURITY.md). ## License diff --git a/Trax.Api.StateMachine/docs/design/phase0-codegen-scope.md b/Trax.StateMachine/ts/docs/design/phase0-codegen-scope.md similarity index 100% rename from Trax.Api.StateMachine/docs/design/phase0-codegen-scope.md rename to Trax.StateMachine/ts/docs/design/phase0-codegen-scope.md diff --git a/Trax.Api.StateMachine/docs/design/tier1-machine-codegen.md b/Trax.StateMachine/ts/docs/design/tier1-machine-codegen.md similarity index 100% rename from Trax.Api.StateMachine/docs/design/tier1-machine-codegen.md rename to Trax.StateMachine/ts/docs/design/tier1-machine-codegen.md diff --git a/Trax.Api.StateMachine/package-lock.json b/Trax.StateMachine/ts/package-lock.json similarity index 100% rename from Trax.Api.StateMachine/package-lock.json rename to Trax.StateMachine/ts/package-lock.json diff --git a/Trax.Api.StateMachine/package.json b/Trax.StateMachine/ts/package.json similarity index 96% rename from Trax.Api.StateMachine/package.json rename to Trax.StateMachine/ts/package.json index 7171d440b..f9a4ed03a 100644 --- a/Trax.Api.StateMachine/package.json +++ b/Trax.StateMachine/ts/package.json @@ -7,7 +7,7 @@ "repository": { "type": "git", "url": "git+https://github.com/TraxSharp/Trax.git", - "directory": "Trax.Api.StateMachine" + "directory": "Trax.StateMachine/ts" }, "bugs": { "url": "https://github.com/TraxSharp/Trax/issues" @@ -44,7 +44,7 @@ "scripts": { "build": "tsup", "bundle:cli": "node tools/bundle-cli.mjs", - "prepack": "npm run build && node -e \"require('node:fs').copyFileSync('../LICENSE', 'LICENSE')\"", + "prepack": "npm run build && node -e \"require('node:fs').copyFileSync('../../LICENSE', 'LICENSE')\"", "postpack": "node -e \"require('node:fs').rmSync('LICENSE', { force: true })\"", "test": "vitest run", "test:watch": "vitest", diff --git a/Trax.Api.StateMachine/src/__snapshots__/exports.test.ts.snap b/Trax.StateMachine/ts/src/__snapshots__/exports.test.ts.snap similarity index 100% rename from Trax.Api.StateMachine/src/__snapshots__/exports.test.ts.snap rename to Trax.StateMachine/ts/src/__snapshots__/exports.test.ts.snap diff --git a/Trax.Api.StateMachine/src/canonicalization.conformance.test.ts b/Trax.StateMachine/ts/src/canonicalization.conformance.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/canonicalization.conformance.test.ts rename to Trax.StateMachine/ts/src/canonicalization.conformance.test.ts diff --git a/Trax.Api.StateMachine/src/client/client.test.ts b/Trax.StateMachine/ts/src/client/client.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/client/client.test.ts rename to Trax.StateMachine/ts/src/client/client.test.ts diff --git a/Trax.Api.StateMachine/src/client/draftSession.ts b/Trax.StateMachine/ts/src/client/draftSession.ts similarity index 100% rename from Trax.Api.StateMachine/src/client/draftSession.ts rename to Trax.StateMachine/ts/src/client/draftSession.ts diff --git a/Trax.Api.StateMachine/src/client/index.ts b/Trax.StateMachine/ts/src/client/index.ts similarity index 100% rename from Trax.Api.StateMachine/src/client/index.ts rename to Trax.StateMachine/ts/src/client/index.ts diff --git a/Trax.Api.StateMachine/src/client/machineServer.test.ts b/Trax.StateMachine/ts/src/client/machineServer.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/client/machineServer.test.ts rename to Trax.StateMachine/ts/src/client/machineServer.test.ts diff --git a/Trax.Api.StateMachine/src/client/machineServer.ts b/Trax.StateMachine/ts/src/client/machineServer.ts similarity index 100% rename from Trax.Api.StateMachine/src/client/machineServer.ts rename to Trax.StateMachine/ts/src/client/machineServer.ts diff --git a/Trax.Api.StateMachine/src/client/machines.test.ts b/Trax.StateMachine/ts/src/client/machines.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/client/machines.test.ts rename to Trax.StateMachine/ts/src/client/machines.test.ts diff --git a/Trax.Api.StateMachine/src/client/machines.ts b/Trax.StateMachine/ts/src/client/machines.ts similarity index 100% rename from Trax.Api.StateMachine/src/client/machines.ts rename to Trax.StateMachine/ts/src/client/machines.ts diff --git a/Trax.Api.StateMachine/src/client/transport.ts b/Trax.StateMachine/ts/src/client/transport.ts similarity index 100% rename from Trax.Api.StateMachine/src/client/transport.ts rename to Trax.StateMachine/ts/src/client/transport.ts diff --git a/Trax.Api.StateMachine/src/clientFormat.test.ts b/Trax.StateMachine/ts/src/clientFormat.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/clientFormat.test.ts rename to Trax.StateMachine/ts/src/clientFormat.test.ts diff --git a/Trax.Api.StateMachine/src/clientFormat.ts b/Trax.StateMachine/ts/src/clientFormat.ts similarity index 100% rename from Trax.Api.StateMachine/src/clientFormat.ts rename to Trax.StateMachine/ts/src/clientFormat.ts diff --git a/Trax.Api.StateMachine/src/controller.ts b/Trax.StateMachine/ts/src/controller.ts similarity index 100% rename from Trax.Api.StateMachine/src/controller.ts rename to Trax.StateMachine/ts/src/controller.ts diff --git a/Trax.Api.StateMachine/src/dependencies.test.ts b/Trax.StateMachine/ts/src/dependencies.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/dependencies.test.ts rename to Trax.StateMachine/ts/src/dependencies.test.ts diff --git a/Trax.Api.StateMachine/src/devtools.test.ts b/Trax.StateMachine/ts/src/devtools.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/devtools.test.ts rename to Trax.StateMachine/ts/src/devtools.test.ts diff --git a/Trax.Api.StateMachine/src/devtools.ts b/Trax.StateMachine/ts/src/devtools.ts similarity index 100% rename from Trax.Api.StateMachine/src/devtools.ts rename to Trax.StateMachine/ts/src/devtools.ts diff --git a/Trax.Api.StateMachine/src/differential.entrypoints.test.ts b/Trax.StateMachine/ts/src/differential.entrypoints.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/differential.entrypoints.test.ts rename to Trax.StateMachine/ts/src/differential.entrypoints.test.ts diff --git a/Trax.Api.StateMachine/src/differential.enumerate.test.ts b/Trax.StateMachine/ts/src/differential.enumerate.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/differential.enumerate.test.ts rename to Trax.StateMachine/ts/src/differential.enumerate.test.ts diff --git a/Trax.Api.StateMachine/src/differential.test.ts b/Trax.StateMachine/ts/src/differential.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/differential.test.ts rename to Trax.StateMachine/ts/src/differential.test.ts diff --git a/Trax.Api.StateMachine/src/differential.timers.test.ts b/Trax.StateMachine/ts/src/differential.timers.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/differential.timers.test.ts rename to Trax.StateMachine/ts/src/differential.timers.test.ts diff --git a/Trax.Api.StateMachine/src/differential.ts b/Trax.StateMachine/ts/src/differential.ts similarity index 100% rename from Trax.Api.StateMachine/src/differential.ts rename to Trax.StateMachine/ts/src/differential.ts diff --git a/Trax.Api.StateMachine/src/duration.ts b/Trax.StateMachine/ts/src/duration.ts similarity index 100% rename from Trax.Api.StateMachine/src/duration.ts rename to Trax.StateMachine/ts/src/duration.ts diff --git a/Trax.Api.StateMachine/src/exports.test.ts b/Trax.StateMachine/ts/src/exports.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/exports.test.ts rename to Trax.StateMachine/ts/src/exports.test.ts diff --git a/Trax.Api.StateMachine/src/fixtures.ts b/Trax.StateMachine/ts/src/fixtures.ts similarity index 84% rename from Trax.Api.StateMachine/src/fixtures.ts rename to Trax.StateMachine/ts/src/fixtures.ts index b1ee1e29e..fc2b66846 100644 --- a/Trax.Api.StateMachine/src/fixtures.ts +++ b/Trax.StateMachine/ts/src/fixtures.ts @@ -10,13 +10,10 @@ import { fileURLToPath } from "node:url"; function machinesRoot(): string { let dir = path.dirname(fileURLToPath(import.meta.url)); for (let i = 0; i < 10; i++) { - // The repo root is the directory that holds both package.json and the shared machines/ tree — - // this disambiguates it from the src/machines/ code directory of the same shape. - if ( - fs.existsSync(path.join(dir, "package.json")) && - fs.existsSync(path.join(dir, "machines")) - ) { - return path.join(dir, "machines"); + // The folder that holds the conformance kit, whose machines/ tree is the shared one; src/machines/ + // is the code directory of the same name. + if (fs.existsSync(path.join(dir, "conformance", "machines"))) { + return path.join(dir, "conformance", "machines"); } const parent = path.dirname(dir); if (parent === dir) break; @@ -64,6 +61,6 @@ export function rehydrateInput(fixture: Record): string { if (typeof fixture.raw === "string") return fixture.raw; return JSON.stringify(fixture.json); } -/** A file of the engine-neutral conformance kit, `conformance/` beside `machines/`. */ +/** A file of the engine-neutral conformance kit, `conformance/`, which holds `machines/`. */ export const conformanceFile = (...parts: string[]): string => - path.join(path.dirname(machinesRoot()), "conformance", ...parts); + path.join(path.dirname(machinesRoot()), ...parts); diff --git a/Trax.Api.StateMachine/src/formView.test.ts b/Trax.StateMachine/ts/src/formView.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/formView.test.ts rename to Trax.StateMachine/ts/src/formView.test.ts diff --git a/Trax.Api.StateMachine/src/formView.ts b/Trax.StateMachine/ts/src/formView.ts similarity index 100% rename from Trax.Api.StateMachine/src/formView.ts rename to Trax.StateMachine/ts/src/formView.ts diff --git a/Trax.Api.StateMachine/src/index.ts b/Trax.StateMachine/ts/src/index.ts similarity index 100% rename from Trax.Api.StateMachine/src/index.ts rename to Trax.StateMachine/ts/src/index.ts diff --git a/Trax.Api.StateMachine/src/irSchema.conformance.test.ts b/Trax.StateMachine/ts/src/irSchema.conformance.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/irSchema.conformance.test.ts rename to Trax.StateMachine/ts/src/irSchema.conformance.test.ts diff --git a/Trax.Api.StateMachine/src/machine.contract.test.ts b/Trax.StateMachine/ts/src/machine.contract.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/machine.contract.test.ts rename to Trax.StateMachine/ts/src/machine.contract.test.ts diff --git a/Trax.Api.StateMachine/src/machine.inputTotality.test.ts b/Trax.StateMachine/ts/src/machine.inputTotality.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/machine.inputTotality.test.ts rename to Trax.StateMachine/ts/src/machine.inputTotality.test.ts diff --git a/Trax.Api.StateMachine/src/machine.totality.test.ts b/Trax.StateMachine/ts/src/machine.totality.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/machine.totality.test.ts rename to Trax.StateMachine/ts/src/machine.totality.test.ts diff --git a/Trax.Api.StateMachine/src/machine.ts b/Trax.StateMachine/ts/src/machine.ts similarity index 100% rename from Trax.Api.StateMachine/src/machine.ts rename to Trax.StateMachine/ts/src/machine.ts diff --git a/Trax.Api.StateMachine/src/machines/checkout/checkout.contexts.g.ts b/Trax.StateMachine/ts/src/machines/checkout/checkout.contexts.g.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/checkout/checkout.contexts.g.ts rename to Trax.StateMachine/ts/src/machines/checkout/checkout.contexts.g.ts diff --git a/Trax.Api.StateMachine/src/machines/checkout/checkout.machine.g.ts b/Trax.StateMachine/ts/src/machines/checkout/checkout.machine.g.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/checkout/checkout.machine.g.ts rename to Trax.StateMachine/ts/src/machines/checkout/checkout.machine.g.ts diff --git a/Trax.Api.StateMachine/src/machines/checkout/checkout.ts b/Trax.StateMachine/ts/src/machines/checkout/checkout.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/checkout/checkout.ts rename to Trax.StateMachine/ts/src/machines/checkout/checkout.ts diff --git a/Trax.Api.StateMachine/src/machines/checkout/conformance.test.ts b/Trax.StateMachine/ts/src/machines/checkout/conformance.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/checkout/conformance.test.ts rename to Trax.StateMachine/ts/src/machines/checkout/conformance.test.ts diff --git a/Trax.Api.StateMachine/src/machines/checkout/roundtrip.test.ts b/Trax.StateMachine/ts/src/machines/checkout/roundtrip.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/checkout/roundtrip.test.ts rename to Trax.StateMachine/ts/src/machines/checkout/roundtrip.test.ts diff --git a/Trax.Api.StateMachine/src/machines/gauge/gauge.contexts.g.ts b/Trax.StateMachine/ts/src/machines/gauge/gauge.contexts.g.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/gauge/gauge.contexts.g.ts rename to Trax.StateMachine/ts/src/machines/gauge/gauge.contexts.g.ts diff --git a/Trax.Api.StateMachine/src/machines/gauge/gauge.machine.g.ts b/Trax.StateMachine/ts/src/machines/gauge/gauge.machine.g.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/gauge/gauge.machine.g.ts rename to Trax.StateMachine/ts/src/machines/gauge/gauge.machine.g.ts diff --git a/Trax.Api.StateMachine/src/machines/gauge/gauge.ts b/Trax.StateMachine/ts/src/machines/gauge/gauge.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/gauge/gauge.ts rename to Trax.StateMachine/ts/src/machines/gauge/gauge.ts diff --git a/Trax.Api.StateMachine/src/machines/ingest/ingest.contexts.g.ts b/Trax.StateMachine/ts/src/machines/ingest/ingest.contexts.g.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/ingest/ingest.contexts.g.ts rename to Trax.StateMachine/ts/src/machines/ingest/ingest.contexts.g.ts diff --git a/Trax.Api.StateMachine/src/machines/ingest/ingest.machine.g.ts b/Trax.StateMachine/ts/src/machines/ingest/ingest.machine.g.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/ingest/ingest.machine.g.ts rename to Trax.StateMachine/ts/src/machines/ingest/ingest.machine.g.ts diff --git a/Trax.Api.StateMachine/src/machines/ingest/ingest.ts b/Trax.StateMachine/ts/src/machines/ingest/ingest.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/ingest/ingest.ts rename to Trax.StateMachine/ts/src/machines/ingest/ingest.ts diff --git a/Trax.Api.StateMachine/src/machines/ingest/outcomes.test.ts b/Trax.StateMachine/ts/src/machines/ingest/outcomes.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/ingest/outcomes.test.ts rename to Trax.StateMachine/ts/src/machines/ingest/outcomes.test.ts diff --git a/Trax.Api.StateMachine/src/machines/reminder/reminder.contexts.g.ts b/Trax.StateMachine/ts/src/machines/reminder/reminder.contexts.g.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/reminder/reminder.contexts.g.ts rename to Trax.StateMachine/ts/src/machines/reminder/reminder.contexts.g.ts diff --git a/Trax.Api.StateMachine/src/machines/reminder/reminder.machine.g.ts b/Trax.StateMachine/ts/src/machines/reminder/reminder.machine.g.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/reminder/reminder.machine.g.ts rename to Trax.StateMachine/ts/src/machines/reminder/reminder.machine.g.ts diff --git a/Trax.Api.StateMachine/src/machines/reminder/reminder.ts b/Trax.StateMachine/ts/src/machines/reminder/reminder.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/reminder/reminder.ts rename to Trax.StateMachine/ts/src/machines/reminder/reminder.ts diff --git a/Trax.Api.StateMachine/src/machines/reminder/timers.test.ts b/Trax.StateMachine/ts/src/machines/reminder/timers.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/reminder/timers.test.ts rename to Trax.StateMachine/ts/src/machines/reminder/timers.test.ts diff --git a/Trax.Api.StateMachine/src/machines/turnstile/conformance.test.ts b/Trax.StateMachine/ts/src/machines/turnstile/conformance.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/turnstile/conformance.test.ts rename to Trax.StateMachine/ts/src/machines/turnstile/conformance.test.ts diff --git a/Trax.Api.StateMachine/src/machines/turnstile/controller.test.ts b/Trax.StateMachine/ts/src/machines/turnstile/controller.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/turnstile/controller.test.ts rename to Trax.StateMachine/ts/src/machines/turnstile/controller.test.ts diff --git a/Trax.Api.StateMachine/src/machines/turnstile/migration.test.ts b/Trax.StateMachine/ts/src/machines/turnstile/migration.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/turnstile/migration.test.ts rename to Trax.StateMachine/ts/src/machines/turnstile/migration.test.ts diff --git a/Trax.Api.StateMachine/src/machines/turnstile/roundtrip.test.ts b/Trax.StateMachine/ts/src/machines/turnstile/roundtrip.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/turnstile/roundtrip.test.ts rename to Trax.StateMachine/ts/src/machines/turnstile/roundtrip.test.ts diff --git a/Trax.Api.StateMachine/src/machines/turnstile/totality.test.ts b/Trax.StateMachine/ts/src/machines/turnstile/totality.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/turnstile/totality.test.ts rename to Trax.StateMachine/ts/src/machines/turnstile/totality.test.ts diff --git a/Trax.Api.StateMachine/src/machines/turnstile/turnstile.contexts.g.ts b/Trax.StateMachine/ts/src/machines/turnstile/turnstile.contexts.g.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/turnstile/turnstile.contexts.g.ts rename to Trax.StateMachine/ts/src/machines/turnstile/turnstile.contexts.g.ts diff --git a/Trax.Api.StateMachine/src/machines/turnstile/turnstile.machine.g.ts b/Trax.StateMachine/ts/src/machines/turnstile/turnstile.machine.g.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/turnstile/turnstile.machine.g.ts rename to Trax.StateMachine/ts/src/machines/turnstile/turnstile.machine.g.ts diff --git a/Trax.Api.StateMachine/src/machines/turnstile/turnstile.ts b/Trax.StateMachine/ts/src/machines/turnstile/turnstile.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/turnstile/turnstile.ts rename to Trax.StateMachine/ts/src/machines/turnstile/turnstile.ts diff --git a/Trax.Api.StateMachine/src/machines/turnstile/typed.test.ts b/Trax.StateMachine/ts/src/machines/turnstile/typed.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/machines/turnstile/typed.test.ts rename to Trax.StateMachine/ts/src/machines/turnstile/typed.test.ts diff --git a/Trax.Api.StateMachine/src/problem.test.ts b/Trax.StateMachine/ts/src/problem.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/problem.test.ts rename to Trax.StateMachine/ts/src/problem.test.ts diff --git a/Trax.Api.StateMachine/src/problem.ts b/Trax.StateMachine/ts/src/problem.ts similarity index 100% rename from Trax.Api.StateMachine/src/problem.ts rename to Trax.StateMachine/ts/src/problem.ts diff --git a/Trax.Api.StateMachine/src/react.ts b/Trax.StateMachine/ts/src/react.ts similarity index 100% rename from Trax.Api.StateMachine/src/react.ts rename to Trax.StateMachine/ts/src/react.ts diff --git a/Trax.Api.StateMachine/src/refusalCodes.conformance.test.ts b/Trax.StateMachine/ts/src/refusalCodes.conformance.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/refusalCodes.conformance.test.ts rename to Trax.StateMachine/ts/src/refusalCodes.conformance.test.ts diff --git a/Trax.Api.StateMachine/src/results.ts b/Trax.StateMachine/ts/src/results.ts similarity index 100% rename from Trax.Api.StateMachine/src/results.ts rename to Trax.StateMachine/ts/src/results.ts diff --git a/Trax.Api.StateMachine/src/rules/formats.test.ts b/Trax.StateMachine/ts/src/rules/formats.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/rules/formats.test.ts rename to Trax.StateMachine/ts/src/rules/formats.test.ts diff --git a/Trax.Api.StateMachine/src/rules/formats.ts b/Trax.StateMachine/ts/src/rules/formats.ts similarity index 100% rename from Trax.Api.StateMachine/src/rules/formats.ts rename to Trax.StateMachine/ts/src/rules/formats.ts diff --git a/Trax.Api.StateMachine/src/rules/generateTypes.test.ts b/Trax.StateMachine/ts/src/rules/generateTypes.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/rules/generateTypes.test.ts rename to Trax.StateMachine/ts/src/rules/generateTypes.test.ts diff --git a/Trax.Api.StateMachine/src/rules/generateTypes.ts b/Trax.StateMachine/ts/src/rules/generateTypes.ts similarity index 100% rename from Trax.Api.StateMachine/src/rules/generateTypes.ts rename to Trax.StateMachine/ts/src/rules/generateTypes.ts diff --git a/Trax.Api.StateMachine/src/rules/interpreter.input.test.ts b/Trax.StateMachine/ts/src/rules/interpreter.input.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/rules/interpreter.input.test.ts rename to Trax.StateMachine/ts/src/rules/interpreter.input.test.ts diff --git a/Trax.Api.StateMachine/src/rules/interpreter.test.ts b/Trax.StateMachine/ts/src/rules/interpreter.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/rules/interpreter.test.ts rename to Trax.StateMachine/ts/src/rules/interpreter.test.ts diff --git a/Trax.Api.StateMachine/src/rules/interpreter.ts b/Trax.StateMachine/ts/src/rules/interpreter.ts similarity index 100% rename from Trax.Api.StateMachine/src/rules/interpreter.ts rename to Trax.StateMachine/ts/src/rules/interpreter.ts diff --git a/Trax.Api.StateMachine/src/rules/irFormat.test.ts b/Trax.StateMachine/ts/src/rules/irFormat.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/rules/irFormat.test.ts rename to Trax.StateMachine/ts/src/rules/irFormat.test.ts diff --git a/Trax.Api.StateMachine/src/rules/irFormat.ts b/Trax.StateMachine/ts/src/rules/irFormat.ts similarity index 100% rename from Trax.Api.StateMachine/src/rules/irFormat.ts rename to Trax.StateMachine/ts/src/rules/irFormat.ts diff --git a/Trax.Api.StateMachine/src/rules/irMachine.test.ts b/Trax.StateMachine/ts/src/rules/irMachine.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/rules/irMachine.test.ts rename to Trax.StateMachine/ts/src/rules/irMachine.test.ts diff --git a/Trax.Api.StateMachine/src/rules/irMachine.ts b/Trax.StateMachine/ts/src/rules/irMachine.ts similarity index 100% rename from Trax.Api.StateMachine/src/rules/irMachine.ts rename to Trax.StateMachine/ts/src/rules/irMachine.ts diff --git a/Trax.Api.StateMachine/src/rules/schemaStrictness.test.ts b/Trax.StateMachine/ts/src/rules/schemaStrictness.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/rules/schemaStrictness.test.ts rename to Trax.StateMachine/ts/src/rules/schemaStrictness.test.ts diff --git a/Trax.Api.StateMachine/src/rules/testing/rangeMachine.ts b/Trax.StateMachine/ts/src/rules/testing/rangeMachine.ts similarity index 100% rename from Trax.Api.StateMachine/src/rules/testing/rangeMachine.ts rename to Trax.StateMachine/ts/src/rules/testing/rangeMachine.ts diff --git a/Trax.Api.StateMachine/src/server/serverController.test.ts b/Trax.StateMachine/ts/src/server/serverController.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/server/serverController.test.ts rename to Trax.StateMachine/ts/src/server/serverController.test.ts diff --git a/Trax.Api.StateMachine/src/server/serverController.ts b/Trax.StateMachine/ts/src/server/serverController.ts similarity index 100% rename from Trax.Api.StateMachine/src/server/serverController.ts rename to Trax.StateMachine/ts/src/server/serverController.ts diff --git a/Trax.Api.StateMachine/src/server/testing/FakeMachineServer.test.ts b/Trax.StateMachine/ts/src/server/testing/FakeMachineServer.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/server/testing/FakeMachineServer.test.ts rename to Trax.StateMachine/ts/src/server/testing/FakeMachineServer.test.ts diff --git a/Trax.Api.StateMachine/src/server/testing/FakeMachineServer.ts b/Trax.StateMachine/ts/src/server/testing/FakeMachineServer.ts similarity index 100% rename from Trax.Api.StateMachine/src/server/testing/FakeMachineServer.ts rename to Trax.StateMachine/ts/src/server/testing/FakeMachineServer.ts diff --git a/Trax.Api.StateMachine/src/server/useRememberedMachine.test.tsx b/Trax.StateMachine/ts/src/server/useRememberedMachine.test.tsx similarity index 100% rename from Trax.Api.StateMachine/src/server/useRememberedMachine.test.tsx rename to Trax.StateMachine/ts/src/server/useRememberedMachine.test.tsx diff --git a/Trax.Api.StateMachine/src/server/useRememberedMachine.ts b/Trax.StateMachine/ts/src/server/useRememberedMachine.ts similarity index 100% rename from Trax.Api.StateMachine/src/server/useRememberedMachine.ts rename to Trax.StateMachine/ts/src/server/useRememberedMachine.ts diff --git a/Trax.Api.StateMachine/src/server/useServerMachine.test.tsx b/Trax.StateMachine/ts/src/server/useServerMachine.test.tsx similarity index 100% rename from Trax.Api.StateMachine/src/server/useServerMachine.test.tsx rename to Trax.StateMachine/ts/src/server/useServerMachine.test.tsx diff --git a/Trax.Api.StateMachine/src/server/useServerMachine.ts b/Trax.StateMachine/ts/src/server/useServerMachine.ts similarity index 100% rename from Trax.Api.StateMachine/src/server/useServerMachine.ts rename to Trax.StateMachine/ts/src/server/useServerMachine.ts diff --git a/Trax.Api.StateMachine/src/strictInput.conformance.test.ts b/Trax.StateMachine/ts/src/strictInput.conformance.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/strictInput.conformance.test.ts rename to Trax.StateMachine/ts/src/strictInput.conformance.test.ts diff --git a/Trax.Api.StateMachine/src/typed.snapshot.test.ts b/Trax.StateMachine/ts/src/typed.snapshot.test.ts similarity index 100% rename from Trax.Api.StateMachine/src/typed.snapshot.test.ts rename to Trax.StateMachine/ts/src/typed.snapshot.test.ts diff --git a/Trax.Api.StateMachine/src/typed.ts b/Trax.StateMachine/ts/src/typed.ts similarity index 100% rename from Trax.Api.StateMachine/src/typed.ts rename to Trax.StateMachine/ts/src/typed.ts diff --git a/Trax.Api.StateMachine/src/types.ts b/Trax.StateMachine/ts/src/types.ts similarity index 100% rename from Trax.Api.StateMachine/src/types.ts rename to Trax.StateMachine/ts/src/types.ts diff --git a/Trax.Api.StateMachine/tools/bundle-cli.mjs b/Trax.StateMachine/ts/tools/bundle-cli.mjs similarity index 100% rename from Trax.Api.StateMachine/tools/bundle-cli.mjs rename to Trax.StateMachine/ts/tools/bundle-cli.mjs diff --git a/Trax.Api.StateMachine/tools/codegen.test.mjs b/Trax.StateMachine/ts/tools/codegen.test.mjs similarity index 97% rename from Trax.Api.StateMachine/tools/codegen.test.mjs rename to Trax.StateMachine/ts/tools/codegen.test.mjs index 7533cbfab..81cd63a40 100644 --- a/Trax.Api.StateMachine/tools/codegen.test.mjs +++ b/Trax.StateMachine/ts/tools/codegen.test.mjs @@ -17,9 +17,10 @@ import { generateTwin } from "./generate-twin.mjs"; // equals what the engine's own tests produce. const repoRoot = fileURLToPath(new URL("..", import.meta.url)); const engineSrc = join(repoRoot, "src"); +// The shared corpus and fixtures, beside the engines in the folder's conformance kit. +const machinesRoot = join(repoRoot, "..", "conformance", "machines"); const turnstileIr = join( - repoRoot, - "machines", + machinesRoot, "turnstile", "turnstile.ir.json", ); @@ -38,8 +39,7 @@ const committedMachine = join( "turnstile.machine.g.ts", ); const committedCorpus = join( - repoRoot, - "machines", + machinesRoot, "turnstile", "differential.json", ); @@ -48,7 +48,7 @@ const read = (path) => readFileSync(path, "utf8"); // A machine whose state invokes a train: its IR carries outcome triggers, which the twin and the corpus // generators must carry through to the committed artifacts unchanged. -const ingestIr = join(repoRoot, "machines", "ingest", "ingest.ir.json"); +const ingestIr = join(machinesRoot, "ingest", "ingest.ir.json"); const ingestTwin = join(repoRoot, "src", "machines", "ingest"); describe("generate-twin entrypoint", () => { @@ -175,7 +175,7 @@ describe("generate-corpus entrypoint", () => { const outPath = join(out, "differential.json"); await generateCorpus({ irPath: ingestIr, engineSrc, outPath }); expect(read(outPath)).toBe( - read(join(repoRoot, "machines", "ingest", "differential.json")), + read(join(machinesRoot, "ingest", "differential.json")), ); expect(read(outPath)).toContain(`"trigger": "Fetching.done"`); }); diff --git a/Trax.Api.StateMachine/tools/conformance/ir-schema.mjs b/Trax.StateMachine/ts/tools/conformance/ir-schema.mjs similarity index 92% rename from Trax.Api.StateMachine/tools/conformance/ir-schema.mjs rename to Trax.StateMachine/ts/tools/conformance/ir-schema.mjs index 9f1e78212..5f45c62b8 100644 --- a/Trax.Api.StateMachine/tools/conformance/ir-schema.mjs +++ b/Trax.StateMachine/ts/tools/conformance/ir-schema.mjs @@ -13,11 +13,11 @@ try { ({ default: Ajv2020 } = await import("ajv/dist/2020.js")); } catch (err) { if (!invokedDirectly) throw err; - console.error("ajv is not installed: run npm ci in Trax.Api.StateMachine."); + console.error("ajv is not installed: run npm ci in Trax.StateMachine/ts."); process.exit(MISSING_DEPENDENCIES); } -const schemaPath = join(dirname(fileURLToPath(import.meta.url)), "..", "..", "conformance", "ir.schema.json"); +const schemaPath = join(dirname(fileURLToPath(import.meta.url)), "..", "..", "..", "conformance", "ir.schema.json"); /** * Compiles conformance/ir.schema.json once and returns a function that checks one IR document, answering the diff --git a/Trax.Api.StateMachine/tools/conformance/run.test.mjs b/Trax.StateMachine/ts/tools/conformance/run.test.mjs similarity index 90% rename from Trax.Api.StateMachine/tools/conformance/run.test.mjs rename to Trax.StateMachine/ts/tools/conformance/run.test.mjs index f6b141e97..4fb6ff967 100644 --- a/Trax.Api.StateMachine/tools/conformance/run.test.mjs +++ b/Trax.StateMachine/ts/tools/conformance/run.test.mjs @@ -1,8 +1,8 @@ import { spawnSync } from "node:child_process"; import { fileURLToPath } from "node:url"; import { beforeAll, describe, expect, it } from "vitest"; -import { kitCases } from "./kit.mjs"; -import { report, runCases } from "./run.mjs"; +import { kitCases } from "../../../conformance/kit.mjs"; +import { report, runCases } from "../../../conformance/run.mjs"; import { createTestee, loadEngine } from "./testee-ts.mjs"; // The conformance runner over the TypeScript engine: the kit passes through the engine's public exports, both @@ -10,6 +10,7 @@ import { createTestee, loadEngine } from "./testee-ts.mjs"; // fails with that case named. const here = (file) => fileURLToPath(new URL(file, import.meta.url)); +const runner = here("../../../conformance/run.mjs"); const cases = kitCases(); let engine; @@ -58,7 +59,7 @@ describe("the conformance kit", () => { it("drives a spawned testee over the protocol", () => { const run = spawnSync( process.execPath, - [here("run.mjs"), "--testee", process.execPath, here("testee-ts.mjs")], + [runner, "--testee", process.execPath, here("testee-ts.mjs")], { encoding: "utf8", timeout: 120_000 }, ); expect(run.stderr).toContain(`${cases.length} of ${cases.length} cases passed.`); diff --git a/Trax.Api.StateMachine/tools/conformance/testee-ts.mjs b/Trax.StateMachine/ts/tools/conformance/testee-ts.mjs similarity index 100% rename from Trax.Api.StateMachine/tools/conformance/testee-ts.mjs rename to Trax.StateMachine/ts/tools/conformance/testee-ts.mjs diff --git a/Trax.Api.StateMachine/tools/generate-corpus.mjs b/Trax.StateMachine/ts/tools/generate-corpus.mjs similarity index 100% rename from Trax.Api.StateMachine/tools/generate-corpus.mjs rename to Trax.StateMachine/ts/tools/generate-corpus.mjs diff --git a/Trax.Api.StateMachine/tools/generate-twin.mjs b/Trax.StateMachine/ts/tools/generate-twin.mjs similarity index 100% rename from Trax.Api.StateMachine/tools/generate-twin.mjs rename to Trax.StateMachine/ts/tools/generate-twin.mjs diff --git a/Trax.Api.StateMachine/tools/lib/args.mjs b/Trax.StateMachine/ts/tools/lib/args.mjs similarity index 100% rename from Trax.Api.StateMachine/tools/lib/args.mjs rename to Trax.StateMachine/ts/tools/lib/args.mjs diff --git a/Trax.Api.StateMachine/tools/lib/engine-bundled.mjs b/Trax.StateMachine/ts/tools/lib/engine-bundled.mjs similarity index 100% rename from Trax.Api.StateMachine/tools/lib/engine-bundled.mjs rename to Trax.StateMachine/ts/tools/lib/engine-bundled.mjs diff --git a/Trax.Api.StateMachine/tools/lib/engine-loader.mjs b/Trax.StateMachine/ts/tools/lib/engine-loader.mjs similarity index 100% rename from Trax.Api.StateMachine/tools/lib/engine-loader.mjs rename to Trax.StateMachine/ts/tools/lib/engine-loader.mjs diff --git a/Trax.Api.StateMachine/tools/replay-sequences.mjs b/Trax.StateMachine/ts/tools/replay-sequences.mjs similarity index 100% rename from Trax.Api.StateMachine/tools/replay-sequences.mjs rename to Trax.StateMachine/ts/tools/replay-sequences.mjs diff --git a/Trax.Api.StateMachine/tsconfig.json b/Trax.StateMachine/ts/tsconfig.json similarity index 100% rename from Trax.Api.StateMachine/tsconfig.json rename to Trax.StateMachine/ts/tsconfig.json diff --git a/Trax.Api.StateMachine/tsup.config.ts b/Trax.StateMachine/ts/tsup.config.ts similarity index 100% rename from Trax.Api.StateMachine/tsup.config.ts rename to Trax.StateMachine/ts/tsup.config.ts diff --git a/Trax.Api.StateMachine/vitest.config.ts b/Trax.StateMachine/ts/vitest.config.ts similarity index 100% rename from Trax.Api.StateMachine/vitest.config.ts rename to Trax.StateMachine/ts/vitest.config.ts From b0ace0495052575100b4df77a94c63ae55cfc363 Mon Sep 17 00:00:00 2001 From: Theauxm <43664045+Theauxm@users.noreply.github.com> Date: Tue, 20 Oct 2026 10:59:33 -0600 Subject: [PATCH 3/6] refactor(machines): rename the packages and namespaces to Trax.StateMachine Trax.Effect.StateMachine, .Persistence and .Testing become Trax.StateMachine, .Persistence and .Testing, with their namespaces and test projects. The new ids have no release on nuget.org yet, so package validation is off for them until their first one, and the old ids' CompatibilitySuppressions go. Shipped migrations keep the old names in their comments. --- .github/workflows/ci.yml | 2 +- AGENTS.md | 2 +- .../Trax.Api.Auth.ApiKey/packages.lock.json | 20 +- .../packages.lock.json | 24 +- .../packages.lock.json | 24 +- .../packages.lock.json | 20 +- .../src/Trax.Api.Auth.Jwt/packages.lock.json | 20 +- .../src/Trax.Api.Auth.Oidc/packages.lock.json | 20 +- Trax.Api/src/Trax.Api.Auth/packages.lock.json | 20 +- .../src/Trax.Api.Dashboard/packages.lock.json | 26 +- .../Trax.Api.GraphQL.Audit/packages.lock.json | 26 +- .../packages.lock.json | 24 +- .../Middleware/MachineDocumentMiddleware.cs | 4 +- .../Services/ClientManifestExport.cs | 4 +- .../Services/MachineDocuments.cs | 2 +- .../Startup/MachineDocumentRegistration.cs | 2 +- .../packages.lock.json | 26 +- .../packages.lock.json | 32 +- .../Extensions/GraphQLServiceExtensions.cs | 2 +- .../MachineRegistrationOrderValidator.cs | 2 +- .../Subscriptions/LifecycleStreamRule.cs | 12 +- .../TypeModules/MachineChanged.cs | 4 +- .../TypeModules/MachineEnums.cs | 4 +- .../TypeModules/MachineInvokedRun.cs | 2 +- .../MachineJsonNamingInterceptor.cs | 2 +- .../TypeModules/MachineResolvers.cs | 6 +- .../TypeModules/MachineSurface.cs | 4 +- .../TypeModules/MachineTypeModule.cs | 4 +- .../TypeModules/RunProgress.cs | 4 +- .../src/Trax.Api.GraphQL/packages.lock.json | 26 +- .../Extensions/ApiServiceExtensions.cs | 2 +- .../Authorization/HttpCallerAuthorization.cs | 2 +- Trax.Api/src/Trax.Api/packages.lock.json | 26 +- .../packages.lock.json | 32 +- .../Trax.Api.Tests.Meta/packages.lock.json | 32 +- .../ClientDocumentsE2ETests.cs | 2 +- .../ClientManifestExportTests.cs | 2 +- .../E2EHost.cs | 2 +- .../Trax.Api.Tests.StateMachine.E2E/E2ESql.cs | 2 +- .../Fakes/MemoMachine.cs | 6 +- .../Fakes/ServedMachines.cs | 2 +- .../Fakes/ShelfMachine.cs | 6 +- .../Fakes/SnoozeMachine.cs | 6 +- .../Fakes/TicketMachine.cs | 6 +- .../Fakes/WizardMachine.cs | 6 +- .../GeneratedTrainDocumentsRemovedE2ETests.cs | 2 +- .../GenericOptInE2ETests.cs | 4 +- .../MachineChangedE2ETests.cs | 4 +- .../MachineClientResultE2ETests.cs | 4 +- .../MachineDocumentCrossNodeTests.cs | 4 +- .../MachineDocumentStorageTests.cs | 2 +- .../MachineDocumentsE2ETests.cs | 4 +- .../MachineEventsE2ETests.cs | 4 +- .../MachinePushE2ETests.cs | 2 +- .../MachineRegistrationE2ETests.cs | 2 +- .../MachineRequestIdE2ETests.cs | 4 +- .../MachineRulesE2ETests.cs | 4 +- .../MachineRunRecordE2ETests.cs | 2 +- .../Machines.cs | 4 +- .../MachinesRootSchemaTests.cs | 2 +- .../OperatorMachineDefinitionsE2ETests.cs | 2 +- .../OperatorMachineFeedE2ETests.cs | 2 +- .../OperatorMachineInstancesE2ETests.cs | 2 +- .../ShelfHosts.cs | 2 +- .../StateMachineGraphQLE2ETests.cs | 4 +- .../Trax.Api.Tests.StateMachine.E2E.csproj | 4 +- .../TraxCallerSnapshotPrincipal.cs | 2 +- .../packages.lock.json | 26 +- .../MachineChangedStressTests.cs | 2 +- .../MachineEventStressTests.cs | 8 +- .../Trax.Api.Tests.Stress/packages.lock.json | 32 +- .../ClientManifestQueryModelsE2ETests.cs | 2 +- .../AuthE2E/RunProgressE2ETests.cs | 2 +- .../AuthE2E/RunProgressInvokedRunE2ETests.cs | 6 +- .../Trax.Api.Tests/Fakes/EnumMachines.cs | 4 +- .../tests/Trax.Api.Tests/Fakes/Machines.cs | 6 +- .../MachineChangedOrderTests.cs | 4 +- .../MachineExposureCensusTests.cs | 6 +- .../MachineExposureStartupTests.cs | 2 +- .../tests/Trax.Api.Tests/MachineSchemaHost.cs | 2 +- .../Trax.Api.Tests/MachineTypeModuleTests.cs | 4 +- .../MarkedMachineSchemaTests.cs | 2 +- .../OperationCapUnderNamespacesTests.cs | 2 +- .../UnitTests/ProgressDocumentsTests.cs | 2 +- .../Trax.Api.Tests/RunProgressStreamTests.cs | 2 +- .../Trax.Api.Tests/SchemaRebuildTests.cs | 2 +- .../tests/Trax.Api.Tests/packages.lock.json | 32 +- ...he-machine-toolchain-is-half-in-process.md | 2 +- .../src/Trax.Cli/Clients/ClientDocumentSet.cs | 2 +- .../Clients/ClientGenerator.Documents.cs | 2 +- .../src/Trax.Cli/Clients/ClientGenerator.cs | 2 +- .../src/Trax.Cli/Commands/ClientCommand.cs | 2 +- .../src/Trax.Cli/Commands/MachineCommand.cs | 6 +- .../src/Trax.Cli/Machines/MachineGenerator.cs | 2 +- .../src/Trax.Cli/Machines/MachineLoader.cs | 6 +- .../src/Trax.Cli/Machines/MachineRenderer.cs | 2 +- .../Trax.Cli/Templates/MachineScaffold.sbn | 6 +- Trax.Cli/src/Trax.Cli/Trax.Cli.csproj | 2 +- Trax.Cli/src/Trax.Cli/packages.lock.json | 6 +- .../Trax.Cli.Tests.Meta/packages.lock.json | 8 +- .../Trax.Cli.Tests/Fakes/ClientManifests.cs | 4 +- .../Fakes/DeclarativeCheckoutMachine.cs | 6 +- .../Fakes/DeclarativeGaugeMachine.cs | 6 +- .../Fakes/DeclarativeIngestMachine.cs | 8 +- .../Fakes/DeclarativeReminderMachine.cs | 4 +- .../Fakes/DeclarativeTurnstileMachine.cs | 6 +- .../MachineGenerateFromPackedToolTests.cs | 8 +- .../MachineGeneratorNodeTests.cs | 2 +- .../ClientDocumentsGeneratorTests.cs | 2 +- .../UnitTests/ClientGeneratorTests.cs | 2 +- .../UnitTests/MachineCommandTests.cs | 4 +- .../UnitTests/MachineGeneratorTests.cs | 4 +- .../UnitTests/MachineLoaderTests.cs | 2 +- .../MachineLoaderUnloadableTypeTests.cs | 4 +- .../UnitTests/MachineScaffolderTests.cs | 8 +- .../UnitTests/ScaffoldCompilationTests.cs | 2 +- .../UnitTests/SelectionTypesTests.cs | 2 +- .../tests/Trax.Cli.Tests/packages.lock.json | 8 +- ...re-tables-ship-in-the-core-provider-set.md | 2 +- ...nd-only-that-entry-receives-its-outcome.md | 8 +- ...and-the-server-applies-every-transition.md | 12 +- ...s-a-child-machine-as-it-invokes-a-train.md | 4 +- .../the-hub-serves-the-storefront.md | 2 +- .../checkout-is-a-state-machine/packages.md | 10 +- .../checkout-is-a-state-machine/serve-it.md | 4 +- .../checkout-is-a-state-machine/test-it.md | 2 +- .../the-machine.md | 6 +- .../book/deploy/migrate-the-shops-schema.md | 6 +- Trax.Docs/book/deploy/the-hub.md | 2 +- .../make-the-hub-refuse.md | 2 +- .../require-persisted-operations/test-it.md | 4 +- .../the-checkout-invokes-and-spawns.md | 6 +- .../the-parcel.md | 4 +- .../what-an-invoked-run-is.md | 2 +- Trax.Docs/effect/data-model.md | 2 +- .../turn-off-snapshot-change-notices.md | 4 +- Trax.Docs/reference/acknowledgments.md | 4 +- Trax.Docs/reference/cli.md | 2 +- Trax.Docs/reference/glossary.md | 2 +- Trax.Docs/reference/packages.md | 6 +- Trax.Docs/sdk-reference/statemachine-api.md | 6 +- .../statemachine-api/add-state-machines.md | 14 +- .../add-trax-state-machine-self-check.md | 10 +- .../statemachine-api/client-manifest.md | 8 +- .../declarative-data-model.md | 22 +- .../statemachine-api/i-snapshot-effect.md | 10 +- .../statemachine-api/invoked-run.md | 10 +- .../statemachine-api/ir-format.md | 12 +- .../statemachine-api/machine-conformance.md | 16 +- .../statemachine-api/machine-instances.md | 8 +- .../sdk-reference/statemachine-api/machine.md | 20 +- .../statemachine-api/migrations.md | 10 +- .../statemachine-api/persistence-ports.md | 24 +- .../statemachine-api/result-codes.md | 8 +- .../sdk-reference/statemachine-api/rules.md | 10 +- .../statemachine-api/runtime-integrity.md | 10 +- .../statemachine-api/typescript-package.md | 2 +- Trax.Docs/sdk-reference/testing.md | 2 +- .../testing/effect-statemachine-testing.md | 22 +- Trax.Docs/statemachine.md | 12 +- Trax.Docs/statemachine/authoring.md | 20 +- Trax.Docs/statemachine/canonical-wire.md | 4 +- Trax.Docs/statemachine/codegen-pipeline.md | 6 +- Trax.Docs/statemachine/context-schemas.md | 4 +- .../statemachine/declarative-authoring.md | 8 +- Trax.Docs/statemachine/generic-mutations.md | 6 +- Trax.Docs/statemachine/invoked-runs.md | 10 +- Trax.Docs/statemachine/invoking-trains.md | 16 +- .../statemachine/spawning-child-machines.md | 6 +- Trax.Docs/statemachine/undo-an-effect.md | 8 +- .../statemachine-api/_section.cs | 6 +- .../Trax.Docs.Snippets.Tests.csproj | 6 +- .../packages.lock.json | 52 +- .../Tests/PackagesPageTests.cs | 6 +- Trax.Docs/what-trax-does.md | 4 +- Trax.Effect/AGENTS.md | 4 +- ...migrated-domain-tables-are-bootstrapped.md | 2 +- .../Services/DataContext/DataContext.cs | 4 +- .../Services/DataContext/IDataContext.cs | 6 +- .../InvokedRunListener/IInvokedRunListener.cs | 2 +- .../SnapshotNotices/ISnapshotNoticeSource.cs | 2 +- .../Trax.Effect.Data/Trax.Effect.Data.csproj | 4 +- .../Models/EffectClaim/EffectClaim.cs | 2 +- .../Models/SnapshotDraft/SnapshotDraft.cs | 2 +- .../SnapshotTransition/SnapshotTransition.cs | 2 +- .../src/Trax.Effect/Trax.Effect.csproj | 6 +- .../SqliteEveryTableIsModelledTests.cs | 2 +- .../EveryTableIsModelledTests.cs | 2 +- ...fect.StateMachine.Persistence.received.txt | 601 ---------------- ...x.Effect.StateMachine.Testing.received.txt | 16 - .../Trax.Effect.StateMachine.received.txt | 643 ------------------ ...Trax.StateMachine.Persistence.received.txt | 601 ++++++++++++++++ .../Trax.StateMachine.Testing.received.txt | 16 + .../PublicApi/Trax.StateMachine.received.txt | 643 ++++++++++++++++++ .../Tests/PublicApiSurfaceTests.cs | 14 +- .../Trax.Effect.Tests.Meta.csproj | 6 +- .../Trax.Effect.Tests.Meta/packages.lock.json | 12 +- .../Extensions/BuilderOrderExtensions.cs | 4 +- .../Extensions/ServiceExtensions.cs | 2 +- .../InvokedTrains/InvokedTrainLauncher.cs | 4 +- .../TrainExecution/TrainExecutionService.cs | 2 +- .../src/Trax.Mediator/Trax.Mediator.csproj | 2 +- .../src/Trax.Mediator/packages.lock.json | 6 +- .../packages.lock.json | 36 +- .../Tests/BuilderOrderDiagnosticsTests.cs | 2 +- .../Trax.Mediator.Tests.Meta.csproj | 2 +- .../packages.lock.json | 36 +- .../packages.lock.json | 36 +- .../Fakes/Callers.cs | 2 +- .../Fakes/Machines.cs | 4 +- .../Fakes/ObservedLauncher.cs | 2 +- .../Fakes/RuleMachines.cs | 4 +- .../Fixtures/InvokeHost.cs | 4 +- .../InvokedTrainOutboxTests.cs | 4 +- .../InvokesAuthorizationTests.cs | 4 +- .../InvokesRuntimeRefusalTests.cs | 4 +- .../SnapshotChangeOutcomeNotifyTests.cs | 2 +- .../SystemInstanceAdvanceTests.cs | 4 +- .../SystemInstanceStartFailureTests.cs | 4 +- ...ator.Tests.StateMachine.Integration.csproj | 2 +- .../packages.lock.json | 24 +- .../book/Shopfront/Directory.Packages.props | 4 +- .../Machines/Checkout/CheckoutMachine.cs | 6 +- .../Shopfront.Core/Machines/InvokedRuns.cs | 2 +- .../Machines/Parcel/ParcelMachine.cs | 4 +- .../Shopfront.Core/Shopfront.Core.csproj | 2 +- .../Shopfront.Core/packages.lock.json | 20 +- .../Auth/TraxCallerSnapshotPrincipal.cs | 2 +- .../book/Shopfront/Shopfront.Hub/Program.cs | 2 +- .../Shopfront.Hub/packages.lock.json | 30 +- .../Shopfront.Worker/packages.lock.json | 30 +- .../PersistedOperationsTests.cs | 2 +- .../Shopfront.Tests/Shopfront.Tests.csproj | 2 +- .../UnitTests/CheckoutMachineTests.cs | 2 +- .../tests/Shopfront.Tests/packages.lock.json | 50 +- .../Auth/Trax.Samples.Auth/packages.lock.json | 26 +- .../packages.lock.json | 34 +- .../packages.lock.json | 38 +- .../Trax.Samples.Bookworm/packages.lock.json | 38 +- .../packages.lock.json | 34 +- .../packages.lock.json | 30 +- .../packages.lock.json | 34 +- .../packages.lock.json | 34 +- .../Trax.Samples.EnergyHub/packages.lock.json | 26 +- .../packages.lock.json | 34 +- .../packages.lock.json | 38 +- .../packages.lock.json | 20 +- .../packages.lock.json | 26 +- .../packages.lock.json | 34 +- .../packages.lock.json | 26 +- .../packages.lock.json | 20 +- .../packages.lock.json | 32 +- .../packages.lock.json | 20 +- .../Trax.Samples.Recovery.Api/Program.cs | 2 +- .../TraxCallerSnapshotPrincipal.cs | 2 +- .../packages.lock.json | 36 +- .../Machines/OrderMachine.cs | 6 +- .../Machines/SourcePartitionMachine.cs | 6 +- .../Machines/TopicMapMachine.cs | 6 +- .../Junctions/StartPartitionMachines.cs | 2 +- .../Order/Junctions/SendToRestaurant.cs | 2 +- .../Trains/OrderDemo/OrderTroubleTrain.cs | 2 +- .../Trains/OrderDemo/TabletCallsTrain.cs | 2 +- .../Junctions/AdvancePartition.cs | 4 +- .../Trax.Samples.Recovery.csproj | 4 +- .../Trax.Samples.Recovery/packages.lock.json | 26 +- .../packages.lock.json | 32 +- .../packages.lock.json | 26 +- .../packages.lock.json | 20 +- .../Trax.Samples.StateMachine.Api/Program.cs | 2 +- .../Trax.Samples.StateMachine.Api.csproj | 2 +- .../packages.lock.json | 34 +- .../Trax.Samples.StateMachine/Machines.cs | 6 +- .../MachinesQuery.cs | 2 +- .../Trax.Samples.StateMachine/Payments.cs | 2 +- .../SnapshotPrincipal.cs | 2 +- .../Trax.Samples.StateMachine.csproj | 4 +- .../packages.lock.json | 24 +- .../Trax.Samples.Api/packages.lock.json | 26 +- .../Trax.Samples.Api.Tests/packages.lock.json | 38 +- .../Trax.Samples.Hub/packages.lock.json | 26 +- .../Trax.Samples.Hub.Tests/packages.lock.json | 38 +- .../Trax.Samples.Scheduler/packages.lock.json | 26 +- .../packages.lock.json | 38 +- .../Factories/ConsoleHost.cs | 2 +- .../Fixtures/Seed.cs | 2 +- .../Host/BrowserHostModel.cs | 4 +- .../Tests/ApiDashboardBrowserTests.cs | 2 +- .../packages.lock.json | 34 +- .../Trax.Samples.Auth.E2E/packages.lock.json | 38 +- .../packages.lock.json | 38 +- .../packages.lock.json | 38 +- .../packages.lock.json | 38 +- .../packages.lock.json | 38 +- .../packages.lock.json | 38 +- .../packages.lock.json | 38 +- .../packages.lock.json | 38 +- .../Tests/TopicMapBrowserTests.cs | 2 +- .../packages.lock.json | 44 +- .../ClientManifestExportTests.cs | 2 +- .../RecoveryTests/OrderMachineTests.cs | 2 +- .../SourcePartitionMachineTests.cs | 2 +- .../TopicMapDifferentialTests.cs | 2 +- .../RecoveryTests/TopicMapDocumentsTests.cs | 4 +- .../RecoveryTests/TopicMapMachineTests.cs | 4 +- .../RecoveryTests/TriggerMetadataTests.cs | 4 +- .../Trax.Samples.Recovery.E2E.csproj | 2 +- .../Utilities/PartitionMachines.cs | 2 +- .../Utilities/TopicMapArtifacts.cs | 2 +- .../packages.lock.json | 58 +- .../packages.lock.json | 38 +- .../packages.lock.json | 36 +- .../Fixtures/StateMachineTestFixture.cs | 4 +- .../Tests/ForwardMigrationTests.cs | 4 +- .../Utilities/RecordingCharge.cs | 2 +- .../Utilities/StateMachineClient.cs | 2 +- .../packages.lock.json | 46 +- .../GlobalUsings.cs | 4 +- .../UnitTests/TurnstileMachineTests.cs | 2 +- .../packages.lock.json | 36 +- .../packages.lock.json | 38 +- .../MachineAuthorizationCensusTests.cs | 4 +- .../packages.lock.json | 48 +- .../packages.lock.json | 38 +- .../src/Trax.Runner.Lambda/packages.lock.json | 26 +- .../Trax.Scheduler.Lambda/packages.lock.json | 32 +- .../src/Trax.Scheduler.Sqs/packages.lock.json | 32 +- .../SchedulerConfigurationBuilder.Build.cs | 2 +- .../Extensions/JobRunnerExtensions.cs | 2 +- .../OperationsService.MachineInstances.cs | 2 +- .../Operations/OperationsService.Machines.cs | 2 +- .../Junctions/RunScheduledTrainJunction.cs | 2 +- .../src/Trax.Scheduler/packages.lock.json | 20 +- .../Fakes/InvokedTrains/FaultingLauncher.cs | 2 +- .../InvokedTrains/InvokedFeatureMachine.cs | 6 +- .../InvokedTrains/InvokedStepMachines.cs | 6 +- .../Fakes/InvokedTrains/InvokedStepTrain.cs | 2 +- .../Fakes/InvokedTrains/StaleReadStore.cs | 4 +- .../Fakes/Timers/PausingSnapshotStore.cs | 4 +- .../Fakes/Timers/TimerMachines.cs | 4 +- .../Fixtures/InvokeCluster.cs | 2 +- .../Fixtures/TimerRig.cs | 4 +- .../InvokeOutcomeDeliveryTests.cs | 2 +- .../InvokedTrains/InvokeOutcomeNoticeTests.cs | 2 +- .../InvokeOutcomeReconcilerTests.cs | 2 +- .../InvokedTrains/InvokedRunFeatureTests.cs | 2 +- .../InvokedRunOperationsTests.cs | 2 +- .../InvokedTrains/InvokedRunTests.cs | 2 +- .../InvokedTrains/InvokesModelTests.cs | 4 +- .../SnapshotChangeOutcomeNotifyTests.cs | 2 +- .../Timers/TimerDraftLifetimeTests.cs | 2 +- .../Timers/TimerFiringTests.cs | 4 +- .../Timers/TimerVersionChangeTests.cs | 2 +- .../Timers/TimersModelTests.cs | 4 +- .../packages.lock.json | 38 +- .../packages.lock.json | 38 +- .../packages.lock.json | 38 +- .../packages.lock.json | 38 +- .../Trax.Scheduler.Tests/packages.lock.json | 38 +- Trax.StateMachine/dotnet/README.md | 12 +- .../dotnet/Trax.StateMachine.slnx | 12 +- .../CompatibilitySuppressions.xml | 147 ---- .../CompatibilitySuppressions.xml | 63 -- .../Actor.cs | 2 +- .../CallerAuthorization.cs | 2 +- .../ChangeFeedStartupValidator.cs | 2 +- .../DraftClaimHold.cs | 2 +- .../DraftSweeper.cs | 2 +- .../EfSnapshotStore.cs | 4 +- .../EffectClaimStore.cs | 2 +- .../ISnapshotChangeListener.cs | 2 +- .../IdempotentEffect.cs | 2 +- .../InvokeOutbox.cs | 2 +- .../InvokeOutcomeDelivery.cs | 2 +- .../InvokeOutcomeReconciler.cs | 2 +- .../InvokedRun.cs | 2 +- .../InvokedRunCancellation.cs | 2 +- .../InvokedRunOutcomes.cs | 2 +- .../InvokedTrainLauncher.cs | 2 +- .../InvokesStartupValidator.cs | 2 +- .../Machine.cs | 2 +- .../MachineCensus.cs | 2 +- .../MachineGraph.cs | 2 +- .../MachineIdStartupValidator.cs | 2 +- .../MachineInstanceStore.cs | 4 +- .../MachineInstances.cs | 2 +- .../MachineRulesStartupValidator.cs | 2 +- .../MachineSchemaStartupValidator.cs | 2 +- .../Mutations/GenericContracts.cs | 2 +- .../Mutations/GenericJunctions.cs | 2 +- .../Mutations/GenericMarkers.cs | 2 +- .../Mutations/GenericTrains.cs | 2 +- .../Mutations/StateMachineMutations.cs | 2 +- .../Ports.cs | 4 +- .../RequestIdRing.cs | 2 +- .../SnapshotChangeListener.cs | 2 +- .../SnapshotDraftService.cs | 4 +- .../SnapshotEffectRunner.cs | 4 +- .../SnapshotFingerprint.cs | 2 +- .../SnapshotLimits.cs | 2 +- .../SnapshotMachineRegistry.cs | 2 +- .../SnapshotOwner.cs | 2 +- .../SnapshotSelfCheck.cs | 2 +- .../SnapshotWatchHub.cs | 2 +- .../SnapshotWriteSignal.cs | 2 +- .../SpawnedEnds.cs | 2 +- .../SpawnsStartupValidator.cs | 2 +- .../StartDeclarationValidator.cs | 2 +- .../StateMachineInstruments.cs | 2 +- .../StateMachineOptions.cs | 2 +- .../StateMachineSelfCheckHealthCheck.cs | 2 +- .../StateMachinesBuilderExtensions.cs | 4 +- .../TimerFireResult.cs | 2 +- .../TransitionNote.cs | 2 +- .../Trax.StateMachine.Persistence.csproj} | 13 +- .../packages.lock.json | 2 +- .../DifferentialCorpus.cs | 2 +- .../MachineConformance.cs | 4 +- .../Trax.StateMachine.Testing.csproj} | 9 +- .../packages.lock.json | 6 +- .../CallerRule.cs | 2 +- .../CanonicalJson.cs | 2 +- .../ClientManifest.cs | 2 +- .../CorpusReplay.cs | 2 +- .../Fluent.cs | 2 +- .../Invokes.cs | 6 +- .../MachineDefinition.cs | 2 +- .../MachineTrigger.cs | 2 +- .../RefusalCode.cs | 2 +- .../Results.cs | 2 +- .../Rules/ContextSchema.cs | 2 +- .../Rules/DeclarativeModel.cs | 2 +- .../Rules/IrExporter.cs | 2 +- .../Rules/MemberPath.cs | 2 +- .../Rules/Reduction.cs | 2 +- .../Rules/ReductionEvaluator.cs | 2 +- .../Rules/Rule.cs | 2 +- .../Rules/RuleEvaluator.cs | 2 +- .../Rules/Rules.cs | 4 +- .../Rules/SchemaReflection.cs | 2 +- .../Rules/SchemaValidator.cs | 2 +- .../Rules/ValueFormats.cs | 2 +- .../Snapshot.cs | 2 +- .../SnapshotMachine.cs | 2 +- .../StartDeclaration.cs | 2 +- .../StorableJson.cs | 2 +- .../Timers.cs | 2 +- .../TransitionDefinition.cs | 2 +- .../Trax.StateMachine.csproj} | 11 +- .../packages.lock.json | 0 .../ActorHierarchyTests.cs | 6 +- .../AddStateMachinesBuilderTests.cs | 8 +- .../ChangeFeedStartupValidatorTests.cs | 2 +- .../ChangeFeedSwitchTests.cs | 6 +- .../ClientDivergenceMeterTests.cs | 8 +- .../DiscardEffectTests.cs | 6 +- .../DiscardRuleTests.cs | 6 +- .../DiscardTests.cs | 6 +- .../DraftLifetimeTests.cs | 6 +- .../DraftMachineScopeTests.cs | 6 +- .../DraftWriteRulesTests.cs | 8 +- .../EfSnapshotStoreTests.cs | 4 +- .../EffectAndHandshakeDefectTests.cs | 8 +- .../EffectClaimStoreTests.cs | 4 +- .../EffectCommitIntegrityTests.cs | 8 +- .../EffectPendingTests.cs | 8 +- .../EventAuthorizationTests.cs | 6 +- .../EventRuleStartupTests.cs | 8 +- .../Fakes/BuildMachine.cs | 4 +- .../Fakes/DeclarativeTurnstileMachine.cs | 4 +- .../Fakes/Effects.cs | 2 +- .../Fakes/FluentMachines.cs | 2 +- .../Fakes/PendingEffectMachines.cs | 4 +- .../Fakes/RecordingLauncher.cs | 2 +- .../Fakes/RevisionMachines.cs | 4 +- .../Fakes/RuledMachines.cs | 4 +- .../Fakes/SpawnMachines.cs | 4 +- .../Fakes/SystemMachines.cs | 2 +- .../Fakes/TestOrder.cs | 2 +- .../Fakes/TestTurnstile.cs | 2 +- .../Fakes/TimerMachines.cs | 4 +- .../Fakes/TimerSweepMachines.cs | 2 +- .../Fixtures/CheckTraxInvariantsAttribute.cs | 4 +- .../Fixtures/CountingDataContextFactory.cs | 2 +- .../Fixtures/InstanceHost.cs | 4 +- .../Fixtures/Marked.cs | 2 +- .../Fixtures/PausingSnapshotStore.cs | 2 +- .../Fixtures/PendingHarness.cs | 4 +- .../Fixtures/PostgresSetup.cs | 4 +- .../Fixtures/RawSql.cs | 2 +- .../Fixtures/ScratchDatabase.cs | 2 +- .../Fixtures/SkewedDatabaseClock.cs | 2 +- .../Fixtures/SnapshotNotices.cs | 2 +- .../Fixtures/SqliteDb.cs | 2 +- .../Fixtures/StartingHost.cs | 4 +- .../Fixtures/TestDb.cs | 2 +- .../Fixtures/TestPostgres.cs | 2 +- .../GenericRulesTests.cs | 8 +- .../GenericSaveTimerTests.cs | 8 +- .../IdempotentEffectTests.cs | 6 +- .../InvokeTokenStoreTests.cs | 4 +- .../InvokedRunLimitTests.cs | 4 +- .../InvokedRunOutputTests.cs | 2 +- .../InvokesDraftExpiryTests.cs | 6 +- .../InvokesReservedStateTests.cs | 6 +- .../MachineCensusTests.cs | 4 +- .../MachineConformanceTests.cs | 6 +- .../MachineEffectRunnerTests.cs | 6 +- .../MachineExportIrTests.cs | 4 +- .../MachineInterleavingModelTests.cs | 6 +- .../MachineSchemaStartupTests.cs | 6 +- .../MachineTrainHookOutputTests.cs | 4 +- .../MarkedMachineTests.cs | 6 +- .../MigrationSchemaTests.cs | 4 +- .../MutationErrorMessageTests.cs | 8 +- .../OrderAutosaveTests.cs | 6 +- .../OrderSendTests.cs | 6 +- .../PostgresChangeFeedTests.cs | 6 +- .../RegistryCorruptDataTests.cs | 8 +- .../RegistryJunctionTests.cs | 8 +- .../RequestIdControlCharacterTests.cs | 8 +- .../RequestIdRingSizeTests.cs | 6 +- .../RequestIdRingTests.cs | 6 +- .../RequestIdScopeTests.cs | 8 +- .../RequestRetryAfterServerWriteTests.cs | 8 +- .../RevisionTests.cs | 8 +- .../ServerRecordTests.cs | 6 +- .../ServerlessProviderTests.cs | 4 +- .../SnapshotAdvanceGuardTests.cs | 8 +- .../SnapshotChangeListenerTests.cs | 6 +- .../SnapshotChangeNotifyTests.cs | 6 +- .../SnapshotDraftExpiryTests.cs | 6 +- .../SnapshotDraftServiceTests.cs | 6 +- .../SnapshotDraftServiceTimerTests.cs | 8 +- .../SnapshotMutationDefectTests.cs | 8 +- .../SnapshotOwnerKeyTests.cs | 8 +- .../SnapshotSelfCheckTests.cs | 4 +- .../SnapshotStoreDefaultMembersTests.cs | 2 +- .../SnapshotWatchHubTests.cs | 6 +- .../SpawnedChildTests.cs | 6 +- .../SpawnsStartupValidatorTests.cs | 6 +- .../SqliteRevisionTriggerTests.cs | 6 +- .../SqliteSnapshotChangePollTests.cs | 6 +- .../SqliteStoreTests.cs | 4 +- .../StartTests.cs | 6 +- .../StateMachineSelfCheckHealthCheckTests.cs | 4 +- .../SystemOwnedInstanceTests.cs | 6 +- .../TimerDueAtAnswerTests.cs | 6 +- .../TimerDueAtTests.cs | 6 +- .../TimerFailureClassificationTests.cs | 2 +- .../TimerFireConditionTests.cs | 6 +- .../TimerSweepIsolationTests.cs | 6 +- .../TransitionHistoryTests.cs | 6 +- ...ateMachine.Persistence.Integration.csproj} | 6 +- .../TriggerInputValidationPathTests.cs | 8 +- .../packages.lock.json | 12 +- .../Fakes/CountingCharge.cs | 6 +- .../Fakes/StressOrder.cs | 6 +- .../Fixtures/StressFixture.cs | 2 +- .../Fixtures/StressProfile.cs | 6 +- .../Fixtures/TestPostgres.cs | 2 +- .../ClaimContentionStressTests.cs | 6 +- .../ExactlyOnceStressTests.cs | 8 +- .../RevisionStoreModelTests.cs | 8 +- .../IntegrationTests/ThroughputStressTests.cs | 8 +- .../StressDb.cs | 6 +- .../Trax.StateMachine.Tests.Stress.csproj} | 4 +- .../packages.lock.json | 6 +- .../Conformance/CheckoutConformanceTests.cs | 6 +- .../Conformance/ConformanceRunnerTests.cs | 4 +- .../Conformance/ConformanceTests.cs | 6 +- .../Conformance/FixturePathsTests.cs | 8 +- .../Conformance/FluentCheckoutTests.cs | 6 +- .../Conformance/IrFormatParityTests.cs | 4 +- .../Conformance/IrSchemaTests.cs | 4 +- .../Conformance/MigrationGoldenTests.cs | 6 +- .../Conformance/RefusalCodeParityTests.cs | 6 +- .../Conformance/StrictInputGoldenTests.cs | 6 +- .../Differential/DeclarativeTurnstileTests.cs | 8 +- .../DifferentialConformanceTests.cs | 8 +- .../DifferentialCorpusReplayTests.cs | 8 +- .../Differential/StrictInputParityTests.cs | 6 +- .../Differential/TwinSequenceParityTests.cs | 8 +- .../Fakes/ConfiguredMachine.cs | 4 +- .../Fakes/DeclarativeCheckout.cs | 4 +- .../Fakes/DeclarativeTurnstile.cs | 4 +- .../Fakes/FaultyMachine.cs | 2 +- .../Fakes/FluentCheckout.cs | 2 +- .../Fakes/GaugeMachine.cs | 4 +- .../Fakes/IngestContracts.cs | 0 .../Fakes/IngestMachine.cs | 4 +- .../Fakes/RangeMachine.cs | 4 +- .../Fakes/ReminderMachine.cs | 2 +- .../Fakes/RichExportMachine.cs | 4 +- .../Fakes/StrictInputMachine.cs | 4 +- .../Fakes/TestCheckout.cs | 2 +- .../Fakes/TestTurnstile.cs | 2 +- .../Fakes/TestTurnstileV2.cs | 2 +- .../Fakes/WaitMachine.cs | 2 +- .../Helpers/Categories.cs | 2 +- .../Helpers/ConformanceTestee.cs | 4 +- .../Helpers/FixturePaths.cs | 9 +- .../Helpers/TwinEngine.cs | 2 +- .../Helpers/TypedSurfaceJson.cs | 2 +- .../Trax.StateMachine.Tests.csproj} | 6 +- .../UnitTests/AdvanceTests.cs | 4 +- .../CanonicalizationConformanceTests.cs | 6 +- .../UnitTests/ClientManifestTests.cs | 2 +- .../UnitTests/ComparisonRefusalTests.cs | 6 +- .../DeclarativeAuthoringDefectTests.cs | 2 +- .../UnitTests/DifferentialAuthoringTests.cs | 6 +- .../UnitTests/DifferentialBuilderTests.cs | 4 +- .../UnitTests/EngineContractTests.cs | 6 +- .../UnitTests/EngineDefensiveTests.cs | 4 +- .../UnitTests/EngineParityDefectTests.cs | 4 +- .../UnitTests/EventWriteRuleTests.cs | 6 +- .../UnitTests/IntrospectionTests.cs | 6 +- .../UnitTests/InvokesDeclarationTests.cs | 8 +- .../UnitTests/IrExporterTests.cs | 4 +- .../UnitTests/MachineBuilderTests.cs | 2 +- .../UnitTests/MachineInstanceIdTests.cs | 4 +- .../UnitTests/MigrationTests.cs | 4 +- .../UnitTests/ReductionEvaluatorTests.cs | 2 +- .../UnitTests/RefusalPrecedenceTests.cs | 4 +- .../UnitTests/RehydrateTests.cs | 4 +- .../UnitTests/RuleEvaluatorTests.cs | 2 +- .../UnitTests/RulesTests.cs | 4 +- .../UnitTests/RulesVocabularyTests.cs | 8 +- .../UnitTests/SchemaFormatTests.cs | 4 +- .../UnitTests/SchemaStrictnessTests.cs | 4 +- .../UnitTests/SchemaValidatorTests.cs | 2 +- .../UnitTests/SerializationRoundTripTests.cs | 4 +- .../UnitTests/SpawnDeclarationTests.cs | 4 +- .../UnitTests/StateInvariantTests.cs | 4 +- .../UnitTests/StorableJsonTests.cs | 4 +- .../UnitTests/TimerDeclarationTests.cs | 6 +- .../UnitTests/TotalityTests.cs | 4 +- .../UnitTests/TriggerInputPropertyTests.cs | 6 +- .../UnitTests/TriggerInputValidationTests.cs | 4 +- .../UnitTests/TriggerMetadataTests.cs | 6 +- .../UnitTests/TypedSchemaTests.cs | 2 +- .../packages.lock.json | 12 +- Trax.StateMachine/ts/AGENTS.md | 2 +- Trax.StateMachine/ts/README.md | 2 +- .../ts/docs/design/phase0-codegen-scope.md | 14 +- .../ts/docs/design/tier1-machine-codegen.md | 2 +- Trax.StateMachine/ts/package.json | 2 +- Trax.StateMachine/ts/src/client/transport.ts | 2 +- Trax.StateMachine/ts/src/index.ts | 4 +- Trax.StateMachine/ts/src/machine.ts | 2 +- Trax.StateMachine/ts/src/rules/interpreter.ts | 2 +- Trax.StateMachine/ts/src/rules/irFormat.ts | 2 +- Trax.StateMachine/ts/src/types.ts | 2 +- .../src/components/landing/LayerDiagram.tsx | 2 +- .../src/components/landing/PackageList.tsx | 6 +- Trax.Website/src/data/order-recordings.json | 2 +- 656 files changed, 3848 insertions(+), 4042 deletions(-) delete mode 100644 Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.Effect.StateMachine.Persistence.received.txt delete mode 100644 Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.Effect.StateMachine.Testing.received.txt delete mode 100644 Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.Effect.StateMachine.received.txt create mode 100644 Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.StateMachine.Persistence.received.txt create mode 100644 Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.StateMachine.Testing.received.txt create mode 100644 Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.StateMachine.received.txt delete mode 100644 Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/CompatibilitySuppressions.xml delete mode 100644 Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CompatibilitySuppressions.xml rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/Actor.cs (97%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/CallerAuthorization.cs (98%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/ChangeFeedStartupValidator.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/DraftClaimHold.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/DraftSweeper.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/EfSnapshotStore.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/EffectClaimStore.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/ISnapshotChangeListener.cs (98%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/IdempotentEffect.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/InvokeOutbox.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/InvokeOutcomeDelivery.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/InvokeOutcomeReconciler.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/InvokedRun.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/InvokedRunCancellation.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/InvokedRunOutcomes.cs (98%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/InvokedTrainLauncher.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/InvokesStartupValidator.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/Machine.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/MachineCensus.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/MachineGraph.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/MachineIdStartupValidator.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/MachineInstanceStore.cs (98%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/MachineInstances.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/MachineRulesStartupValidator.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/MachineSchemaStartupValidator.cs (98%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/Mutations/GenericContracts.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/Mutations/GenericJunctions.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/Mutations/GenericMarkers.cs (96%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/Mutations/GenericTrains.cs (98%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/Mutations/StateMachineMutations.cs (93%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/Ports.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/RequestIdRing.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/SnapshotChangeListener.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/SnapshotDraftService.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/SnapshotEffectRunner.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/SnapshotFingerprint.cs (94%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/SnapshotLimits.cs (97%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/SnapshotMachineRegistry.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/SnapshotOwner.cs (97%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/SnapshotSelfCheck.cs (96%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/SnapshotWatchHub.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/SnapshotWriteSignal.cs (96%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/SpawnedEnds.cs (97%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/SpawnsStartupValidator.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/StartDeclarationValidator.cs (97%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/StateMachineInstruments.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/StateMachineOptions.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/StateMachineSelfCheckHealthCheck.cs (98%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/StateMachinesBuilderExtensions.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/TimerFireResult.cs (97%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/TransitionNote.cs (98%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence/Trax.Effect.StateMachine.Persistence.csproj => Trax.StateMachine.Persistence/Trax.StateMachine.Persistence.csproj} (84%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Persistence => Trax.StateMachine.Persistence}/packages.lock.json (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Testing => Trax.StateMachine.Testing}/DifferentialCorpus.cs (97%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Testing => Trax.StateMachine.Testing}/MachineConformance.cs (98%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Testing/Trax.Effect.StateMachine.Testing.csproj => Trax.StateMachine.Testing/Trax.StateMachine.Testing.csproj} (62%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine.Testing => Trax.StateMachine.Testing}/packages.lock.json (98%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/CallerRule.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/CanonicalJson.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/ClientManifest.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/CorpusReplay.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/Fluent.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/Invokes.cs (98%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/MachineDefinition.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/MachineTrigger.cs (97%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/RefusalCode.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/Results.cs (98%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/Rules/ContextSchema.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/Rules/DeclarativeModel.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/Rules/IrExporter.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/Rules/MemberPath.cs (98%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/Rules/Reduction.cs (98%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/Rules/ReductionEvaluator.cs (98%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/Rules/Rule.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/Rules/RuleEvaluator.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/Rules/Rules.cs (98%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/Rules/SchemaReflection.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/Rules/SchemaValidator.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/Rules/ValueFormats.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/Snapshot.cs (98%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/SnapshotMachine.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/StartDeclaration.cs (98%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/StorableJson.cs (98%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/Timers.cs (99%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/TransitionDefinition.cs (98%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine/Trax.Effect.StateMachine.csproj => Trax.StateMachine/Trax.StateMachine.csproj} (76%) rename Trax.StateMachine/dotnet/src/{Trax.Effect.StateMachine => Trax.StateMachine}/packages.lock.json (100%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/ActorHierarchyTests.cs (94%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/AddStateMachinesBuilderTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/ChangeFeedStartupValidatorTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/ChangeFeedSwitchTests.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/ClientDivergenceMeterTests.cs (93%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/DiscardEffectTests.cs (94%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/DiscardRuleTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/DiscardTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/DraftLifetimeTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/DraftMachineScopeTests.cs (94%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/DraftWriteRulesTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/EfSnapshotStoreTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/EffectAndHandshakeDefectTests.cs (95%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/EffectClaimStoreTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/EffectCommitIntegrityTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/EffectPendingTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/EventAuthorizationTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/EventRuleStartupTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fakes/BuildMachine.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fakes/DeclarativeTurnstileMachine.cs (95%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fakes/Effects.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fakes/FluentMachines.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fakes/PendingEffectMachines.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fakes/RecordingLauncher.cs (95%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fakes/RevisionMachines.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fakes/RuledMachines.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fakes/SpawnMachines.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fakes/SystemMachines.cs (91%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fakes/TestOrder.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fakes/TestTurnstile.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fakes/TimerMachines.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fakes/TimerSweepMachines.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fixtures/CheckTraxInvariantsAttribute.cs (91%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fixtures/CountingDataContextFactory.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fixtures/InstanceHost.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fixtures/Marked.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fixtures/PausingSnapshotStore.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fixtures/PendingHarness.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fixtures/PostgresSetup.cs (95%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fixtures/RawSql.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fixtures/ScratchDatabase.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fixtures/SkewedDatabaseClock.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fixtures/SnapshotNotices.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fixtures/SqliteDb.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fixtures/StartingHost.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fixtures/TestDb.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/Fixtures/TestPostgres.cs (86%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/GenericRulesTests.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/GenericSaveTimerTests.cs (93%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/IdempotentEffectTests.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/InvokeTokenStoreTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/InvokedRunLimitTests.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/InvokedRunOutputTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/InvokesDraftExpiryTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/InvokesReservedStateTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/MachineCensusTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/MachineConformanceTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/MachineEffectRunnerTests.cs (93%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/MachineExportIrTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/MachineInterleavingModelTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/MachineSchemaStartupTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/MachineTrainHookOutputTests.cs (93%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/MarkedMachineTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/MigrationSchemaTests.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/MutationErrorMessageTests.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/OrderAutosaveTests.cs (95%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/OrderSendTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/PostgresChangeFeedTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/RegistryCorruptDataTests.cs (93%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/RegistryJunctionTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/RequestIdControlCharacterTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/RequestIdRingSizeTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/RequestIdRingTests.cs (95%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/RequestIdScopeTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/RequestRetryAfterServerWriteTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/RevisionTests.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/ServerRecordTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/ServerlessProviderTests.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/SnapshotAdvanceGuardTests.cs (95%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/SnapshotChangeListenerTests.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/SnapshotChangeNotifyTests.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/SnapshotDraftExpiryTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/SnapshotDraftServiceTests.cs (95%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/SnapshotDraftServiceTimerTests.cs (95%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/SnapshotMutationDefectTests.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/SnapshotOwnerKeyTests.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/SnapshotSelfCheckTests.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/SnapshotStoreDefaultMembersTests.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/SnapshotWatchHubTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/SpawnedChildTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/SpawnsStartupValidatorTests.cs (95%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/SqliteRevisionTriggerTests.cs (92%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/SqliteSnapshotChangePollTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/SqliteStoreTests.cs (95%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/StartTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/StateMachineSelfCheckHealthCheckTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/SystemOwnedInstanceTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/TimerDueAtAnswerTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/TimerDueAtTests.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/TimerFailureClassificationTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/TimerFireConditionTests.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/TimerSweepIsolationTests.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/TransitionHistoryTests.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration/Trax.Effect.StateMachine.Persistence.Integration.csproj => Trax.StateMachine.Persistence.Integration/Trax.StateMachine.Persistence.Integration.csproj} (88%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/TriggerInputValidationPathTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Persistence.Integration => Trax.StateMachine.Persistence.Integration}/packages.lock.json (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests.Stress => Trax.StateMachine.Tests.Stress}/Fakes/CountingCharge.cs (83%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests.Stress => Trax.StateMachine.Tests.Stress}/Fakes/StressOrder.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests.Stress => Trax.StateMachine.Tests.Stress}/Fixtures/StressFixture.cs (95%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests.Stress => Trax.StateMachine.Tests.Stress}/Fixtures/StressProfile.cs (90%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests.Stress => Trax.StateMachine.Tests.Stress}/Fixtures/TestPostgres.cs (88%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests.Stress => Trax.StateMachine.Tests.Stress}/IntegrationTests/ClaimContentionStressTests.cs (94%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests.Stress => Trax.StateMachine.Tests.Stress}/IntegrationTests/ExactlyOnceStressTests.cs (94%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests.Stress => Trax.StateMachine.Tests.Stress}/IntegrationTests/RevisionStoreModelTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests.Stress => Trax.StateMachine.Tests.Stress}/IntegrationTests/ThroughputStressTests.cs (92%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests.Stress => Trax.StateMachine.Tests.Stress}/StressDb.cs (95%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests.Stress/Trax.Effect.StateMachine.Tests.Stress.csproj => Trax.StateMachine.Tests.Stress/Trax.StateMachine.Tests.Stress.csproj} (86%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests.Stress => Trax.StateMachine.Tests.Stress}/packages.lock.json (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Conformance/CheckoutConformanceTests.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Conformance/ConformanceRunnerTests.cs (88%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Conformance/ConformanceTests.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Conformance/FixturePathsTests.cs (82%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Conformance/FluentCheckoutTests.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Conformance/IrFormatParityTests.cs (93%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Conformance/IrSchemaTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Conformance/MigrationGoldenTests.cs (93%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Conformance/RefusalCodeParityTests.cs (95%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Conformance/StrictInputGoldenTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Differential/DeclarativeTurnstileTests.cs (90%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Differential/DifferentialConformanceTests.cs (90%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Differential/DifferentialCorpusReplayTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Differential/StrictInputParityTests.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Differential/TwinSequenceParityTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Fakes/ConfiguredMachine.cs (87%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Fakes/DeclarativeCheckout.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Fakes/DeclarativeTurnstile.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Fakes/FaultyMachine.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Fakes/FluentCheckout.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Fakes/GaugeMachine.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Fakes/IngestContracts.cs (100%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Fakes/IngestMachine.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Fakes/RangeMachine.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Fakes/ReminderMachine.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Fakes/RichExportMachine.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Fakes/StrictInputMachine.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Fakes/TestCheckout.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Fakes/TestTurnstile.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Fakes/TestTurnstileV2.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Fakes/WaitMachine.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Helpers/Categories.cs (91%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Helpers/ConformanceTestee.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Helpers/FixturePaths.cs (93%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Helpers/TwinEngine.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/Helpers/TypedSurfaceJson.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests/Trax.Effect.StateMachine.Tests.csproj => Trax.StateMachine.Tests/Trax.StateMachine.Tests.csproj} (76%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/AdvanceTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/CanonicalizationConformanceTests.cs (94%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/ClientManifestTests.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/ComparisonRefusalTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/DeclarativeAuthoringDefectTests.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/DifferentialAuthoringTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/DifferentialBuilderTests.cs (94%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/EngineContractTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/EngineDefensiveTests.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/EngineParityDefectTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/EventWriteRuleTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/IntrospectionTests.cs (93%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/InvokesDeclarationTests.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/IrExporterTests.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/MachineBuilderTests.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/MachineInstanceIdTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/MigrationTests.cs (93%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/ReductionEvaluatorTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/RefusalPrecedenceTests.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/RehydrateTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/RuleEvaluatorTests.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/RulesTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/RulesVocabularyTests.cs (93%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/SchemaFormatTests.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/SchemaStrictnessTests.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/SchemaValidatorTests.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/SerializationRoundTripTests.cs (97%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/SpawnDeclarationTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/StateInvariantTests.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/StorableJsonTests.cs (95%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/TimerDeclarationTests.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/TotalityTests.cs (96%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/TriggerInputPropertyTests.cs (98%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/TriggerInputValidationTests.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/TriggerMetadataTests.cs (95%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/UnitTests/TypedSchemaTests.cs (99%) rename Trax.StateMachine/dotnet/tests/{Trax.Effect.StateMachine.Tests => Trax.StateMachine.Tests}/packages.lock.json (97%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d52b268c2..57fa5b72c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -809,7 +809,7 @@ jobs: --tools-dir "$RUNNER_TEMP/engine" --documents 'src/graphql/*.graphql' --check) \ || { echo "::error::The StateMachine sample's generated client is out of date. Regenerate it with the commands at the top of $api/Program.cs and commit the result."; exit 1; } - # The TypeScript twin of Trax.Effect.StateMachine. Its machines/ corpus is also read by the + # The TypeScript twin of Trax.StateMachine. Its machines/ corpus is also read by the # Trax.Effect conformance tests and the Trax.Cli byte-parity tests, which is why those # folders list it upstream. state-machine: diff --git a/AGENTS.md b/AGENTS.md index 104103c47..e18610096 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -91,7 +91,7 @@ title, the body below it. A security change or an open hotspot uses GitHub's `> | 🟨 | Data (`data`) | `Trax.Effect.Data.*` (Postgres, Sqlite, InMemory), migrations, SQL, the run-record tables | | 🟫 | Plumbing (`plumbing`) | Effect providers, junction providers, broadcasters (RabbitMQ, SignalR), lifecycle hooks | | 🟩 | Trains (`trains`) | `Train` (Core), `ServiceTrain` (Effect), junctions, chains, Memory, decisions, `Parallel` | -| 🟪 | Machines (`machines`) | `Trax.Effect.StateMachine*` and `@traxsharp/state-machine`, its TypeScript twin | +| 🟪 | Machines (`machines`) | `Trax.StateMachine*` and `@traxsharp/state-machine`, its TypeScript twin | | 🟧 | Dispatch (`dispatch`) | Mediator (train bus, authorization), Scheduler (jobs, manifests, recovery), remote runners, Lambda | | 🟦 | Surface (`surface`) | Api (GraphQL, auth, persisted operations, generated clients, the React operations console) | | ⬛ | Tooling (`tooling`) | CLI, analyzers, architecture and ADR guards, CI, release, docs | diff --git a/Trax.Api/src/Trax.Api.Auth.ApiKey/packages.lock.json b/Trax.Api/src/Trax.Api.Auth.ApiKey/packages.lock.json index d73248f0f..4f3bda649 100644 --- a/Trax.Api/src/Trax.Api.Auth.ApiKey/packages.lock.json +++ b/Trax.Api/src/Trax.Api.Auth.ApiKey/packages.lock.json @@ -42,28 +42,28 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Microsoft.EntityFrameworkCore": { diff --git a/Trax.Api/src/Trax.Api.Auth.Jwt.Cognito.Issuer/packages.lock.json b/Trax.Api/src/Trax.Api.Auth.Jwt.Cognito.Issuer/packages.lock.json index 5f251b41a..a01a27b4f 100644 --- a/Trax.Api/src/Trax.Api.Auth.Jwt.Cognito.Issuer/packages.lock.json +++ b/Trax.Api/src/Trax.Api.Auth.Jwt.Cognito.Issuer/packages.lock.json @@ -186,31 +186,31 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Microsoft.AspNetCore.Authentication.JwtBearer": { diff --git a/Trax.Api/src/Trax.Api.Auth.Jwt.Cognito/packages.lock.json b/Trax.Api/src/Trax.Api.Auth.Jwt.Cognito/packages.lock.json index 7c6d555e8..91bfd46d6 100644 --- a/Trax.Api/src/Trax.Api.Auth.Jwt.Cognito/packages.lock.json +++ b/Trax.Api/src/Trax.Api.Auth.Jwt.Cognito/packages.lock.json @@ -174,31 +174,31 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Microsoft.AspNetCore.Authentication.JwtBearer": { diff --git a/Trax.Api/src/Trax.Api.Auth.Jwt.Testing/packages.lock.json b/Trax.Api/src/Trax.Api.Auth.Jwt.Testing/packages.lock.json index f4f05ae23..19a484c3c 100644 --- a/Trax.Api/src/Trax.Api.Auth.Jwt.Testing/packages.lock.json +++ b/Trax.Api/src/Trax.Api.Auth.Jwt.Testing/packages.lock.json @@ -104,28 +104,28 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Microsoft.AspNetCore.Authentication.JwtBearer": { diff --git a/Trax.Api/src/Trax.Api.Auth.Jwt/packages.lock.json b/Trax.Api/src/Trax.Api.Auth.Jwt/packages.lock.json index 3492c7326..800583b45 100644 --- a/Trax.Api/src/Trax.Api.Auth.Jwt/packages.lock.json +++ b/Trax.Api/src/Trax.Api.Auth.Jwt/packages.lock.json @@ -106,28 +106,28 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Microsoft.EntityFrameworkCore": { diff --git a/Trax.Api/src/Trax.Api.Auth.Oidc/packages.lock.json b/Trax.Api/src/Trax.Api.Auth.Oidc/packages.lock.json index 1f7e2cfe9..425da66b3 100644 --- a/Trax.Api/src/Trax.Api.Auth.Oidc/packages.lock.json +++ b/Trax.Api/src/Trax.Api.Auth.Oidc/packages.lock.json @@ -106,28 +106,28 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Microsoft.EntityFrameworkCore": { diff --git a/Trax.Api/src/Trax.Api.Auth/packages.lock.json b/Trax.Api/src/Trax.Api.Auth/packages.lock.json index f6806707d..3db8a9058 100644 --- a/Trax.Api/src/Trax.Api.Auth/packages.lock.json +++ b/Trax.Api/src/Trax.Api.Auth/packages.lock.json @@ -36,28 +36,28 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Microsoft.EntityFrameworkCore": { diff --git a/Trax.Api/src/Trax.Api.Dashboard/packages.lock.json b/Trax.Api/src/Trax.Api.Dashboard/packages.lock.json index f1358c1f0..85e128e80 100644 --- a/Trax.Api/src/Trax.Api.Dashboard/packages.lock.json +++ b/Trax.Api/src/Trax.Api.Dashboard/packages.lock.json @@ -533,37 +533,37 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Api/src/Trax.Api.GraphQL.Audit/packages.lock.json b/Trax.Api/src/Trax.Api.GraphQL.Audit/packages.lock.json index f1358c1f0..85e128e80 100644 --- a/Trax.Api/src/Trax.Api.GraphQL.Audit/packages.lock.json +++ b/Trax.Api/src/Trax.Api.GraphQL.Audit/packages.lock.json @@ -533,37 +533,37 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Api/src/Trax.Api.GraphQL.Client.Trax/packages.lock.json b/Trax.Api/src/Trax.Api.GraphQL.Client.Trax/packages.lock.json index 8c3cd87b9..0b13b9573 100644 --- a/Trax.Api/src/Trax.Api.GraphQL.Client.Trax/packages.lock.json +++ b/Trax.Api/src/Trax.Api.GraphQL.Client.Trax/packages.lock.json @@ -570,31 +570,31 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "GraphQL": { diff --git a/Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/Middleware/MachineDocumentMiddleware.cs b/Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/Middleware/MachineDocumentMiddleware.cs index f5e95b767..ab1e6cf19 100644 --- a/Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/Middleware/MachineDocumentMiddleware.cs +++ b/Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/Middleware/MachineDocumentMiddleware.cs @@ -4,8 +4,8 @@ using Microsoft.Extensions.DependencyInjection; using Trax.Api.GraphQL.PersistedOperations.Services; using Trax.Api.GraphQL.PersistedOperations.Storage; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Api.GraphQL.PersistedOperations.Middleware; diff --git a/Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/Services/ClientManifestExport.cs b/Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/Services/ClientManifestExport.cs index 760934540..4caa7018f 100644 --- a/Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/Services/ClientManifestExport.cs +++ b/Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/Services/ClientManifestExport.cs @@ -10,9 +10,9 @@ using Trax.Api.GraphQL.Configuration; using Trax.Api.GraphQL.TypeModules; using Trax.Effect.Configuration.ClientExport; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Services.TrainDiscovery; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Api.GraphQL.PersistedOperations.Services; diff --git a/Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/Services/MachineDocuments.cs b/Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/Services/MachineDocuments.cs index 85f442989..7cc72bdfd 100644 --- a/Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/Services/MachineDocuments.cs +++ b/Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/Services/MachineDocuments.cs @@ -5,7 +5,7 @@ using HotChocolate.Types; using Trax.Api.GraphQL.TypeModules; using Trax.Effect.Attributes; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Api.GraphQL.PersistedOperations.Services; diff --git a/Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/Startup/MachineDocumentRegistration.cs b/Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/Startup/MachineDocumentRegistration.cs index 6c3eaf9cb..18e87774a 100644 --- a/Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/Startup/MachineDocumentRegistration.cs +++ b/Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/Startup/MachineDocumentRegistration.cs @@ -9,8 +9,8 @@ using Trax.Api.GraphQL.PersistedOperations.Services; using Trax.Api.GraphQL.PersistedOperations.Storage; using Trax.Api.GraphQL.TypeModules; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Services.TrainDiscovery; +using Trax.StateMachine.Persistence; namespace Trax.Api.GraphQL.PersistedOperations.Startup; diff --git a/Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/packages.lock.json b/Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/packages.lock.json index 0cfeb6ffd..0eedd2fac 100644 --- a/Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/packages.lock.json +++ b/Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/packages.lock.json @@ -549,37 +549,37 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Api/src/Trax.Api.GraphQL.Testing/packages.lock.json b/Trax.Api/src/Trax.Api.GraphQL.Testing/packages.lock.json index 4a4326120..65b783618 100644 --- a/Trax.Api/src/Trax.Api.GraphQL.Testing/packages.lock.json +++ b/Trax.Api/src/Trax.Api.GraphQL.Testing/packages.lock.json @@ -655,40 +655,40 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Api/src/Trax.Api.GraphQL/Extensions/GraphQLServiceExtensions.cs b/Trax.Api/src/Trax.Api.GraphQL/Extensions/GraphQLServiceExtensions.cs index 0df0dfd36..23f866149 100644 --- a/Trax.Api/src/Trax.Api.GraphQL/Extensions/GraphQLServiceExtensions.cs +++ b/Trax.Api/src/Trax.Api.GraphQL/Extensions/GraphQLServiceExtensions.cs @@ -40,10 +40,10 @@ using Trax.Effect.Services.ChangeSignal; using Trax.Effect.Services.TrainEventBroadcaster; using Trax.Effect.Services.TrainLifecycleHookFactory; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Services.TrainDiscovery; using Trax.Scheduler.Services.DeadLetterRequeue; using Trax.Scheduler.Services.Effects; +using Trax.StateMachine.Persistence; namespace Trax.Api.GraphQL.Extensions; diff --git a/Trax.Api/src/Trax.Api.GraphQL/Startup/MachineRegistrationOrderValidator.cs b/Trax.Api/src/Trax.Api.GraphQL/Startup/MachineRegistrationOrderValidator.cs index 93ca78ad8..4e61c227f 100644 --- a/Trax.Api/src/Trax.Api.GraphQL/Startup/MachineRegistrationOrderValidator.cs +++ b/Trax.Api/src/Trax.Api.GraphQL/Startup/MachineRegistrationOrderValidator.cs @@ -1,5 +1,5 @@ using Trax.Api.Auth; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Api.GraphQL.Startup; diff --git a/Trax.Api/src/Trax.Api.GraphQL/Subscriptions/LifecycleStreamRule.cs b/Trax.Api/src/Trax.Api.GraphQL/Subscriptions/LifecycleStreamRule.cs index c6906edc0..f5b53cf00 100644 --- a/Trax.Api/src/Trax.Api.GraphQL/Subscriptions/LifecycleStreamRule.cs +++ b/Trax.Api/src/Trax.Api.GraphQL/Subscriptions/LifecycleStreamRule.cs @@ -47,12 +47,12 @@ TrainLifecycleStreamOptions options StringComparer.Ordinal ) { - typeof(Trax.Effect.StateMachine.Persistence.Mutations.ISaveSnapshot).FullName!, - typeof(Trax.Effect.StateMachine.Persistence.Mutations.IAdvanceSnapshot).FullName!, - typeof(Trax.Effect.StateMachine.Persistence.Mutations.ILoadSnapshot).FullName!, - typeof(Trax.Effect.StateMachine.Persistence.Mutations.ISendSnapshot).FullName!, - typeof(Trax.Effect.StateMachine.Persistence.Mutations.IStartSnapshot).FullName!, - typeof(Trax.Effect.StateMachine.Persistence.Mutations.IDiscardSnapshot).FullName!, + typeof(Trax.StateMachine.Persistence.Mutations.ISaveSnapshot).FullName!, + typeof(Trax.StateMachine.Persistence.Mutations.IAdvanceSnapshot).FullName!, + typeof(Trax.StateMachine.Persistence.Mutations.ILoadSnapshot).FullName!, + typeof(Trax.StateMachine.Persistence.Mutations.ISendSnapshot).FullName!, + typeof(Trax.StateMachine.Persistence.Mutations.IStartSnapshot).FullName!, + typeof(Trax.StateMachine.Persistence.Mutations.IDiscardSnapshot).FullName!, }; /// Whether events of the train named are published. diff --git a/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineChanged.cs b/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineChanged.cs index 16453254a..346eca11d 100644 --- a/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineChanged.cs +++ b/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineChanged.cs @@ -8,8 +8,8 @@ using HotChocolate.Types; using Microsoft.Extensions.DependencyInjection; using Trax.Api.GraphQL.Authorization; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Api.GraphQL.TypeModules; diff --git a/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineEnums.cs b/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineEnums.cs index 670d33276..ed721b711 100644 --- a/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineEnums.cs +++ b/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineEnums.cs @@ -2,8 +2,8 @@ using System.Text.Json; using System.Text.RegularExpressions; using HotChocolate.Types; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Api.GraphQL.TypeModules; diff --git a/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineInvokedRun.cs b/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineInvokedRun.cs index 8acfda79b..4e3a18954 100644 --- a/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineInvokedRun.cs +++ b/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineInvokedRun.cs @@ -5,7 +5,7 @@ using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Data.Services.IDataContextFactory; using Trax.Effect.Enums; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Api.GraphQL.TypeModules; diff --git a/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineJsonNamingInterceptor.cs b/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineJsonNamingInterceptor.cs index 210b8c4d8..34e38715b 100644 --- a/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineJsonNamingInterceptor.cs +++ b/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineJsonNamingInterceptor.cs @@ -2,7 +2,7 @@ using System.Text.Json.Serialization; using HotChocolate.Configuration; using HotChocolate.Types.Descriptors.Configurations; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Api.GraphQL.TypeModules; diff --git a/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineResolvers.cs b/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineResolvers.cs index 2c21a3771..fbd7021dd 100644 --- a/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineResolvers.cs +++ b/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineResolvers.cs @@ -6,11 +6,11 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Trax.Effect.Attributes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using Trax.Effect.StateMachine.Persistence.Mutations; using Trax.Effect.Utils; using Trax.Mediator.Services.TrainExecution; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using Trax.StateMachine.Persistence.Mutations; namespace Trax.Api.GraphQL.TypeModules; diff --git a/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineSurface.cs b/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineSurface.cs index 3c975bf49..d647a0fbb 100644 --- a/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineSurface.cs +++ b/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineSurface.cs @@ -2,8 +2,8 @@ using System.Text.Json; using System.Text.Json.Serialization; using System.Text.Json.Serialization.Metadata; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Api.GraphQL.TypeModules; diff --git a/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineTypeModule.cs b/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineTypeModule.cs index eef698157..853f8aae5 100644 --- a/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineTypeModule.cs +++ b/Trax.Api/src/Trax.Api.GraphQL/TypeModules/MachineTypeModule.cs @@ -8,8 +8,8 @@ using HotChocolate.Types; using HotChocolate.Types.Descriptors; using Trax.Api.GraphQL.Validation; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Api.GraphQL.TypeModules; diff --git a/Trax.Api/src/Trax.Api.GraphQL/TypeModules/RunProgress.cs b/Trax.Api/src/Trax.Api.GraphQL/TypeModules/RunProgress.cs index 31055f8f9..fc6447498 100644 --- a/Trax.Api/src/Trax.Api.GraphQL/TypeModules/RunProgress.cs +++ b/Trax.Api/src/Trax.Api.GraphQL/TypeModules/RunProgress.cs @@ -22,10 +22,10 @@ using Trax.Effect.Data.Services.IDataContextFactory; using Trax.Effect.Enums; using Trax.Effect.Models; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Services.Principal; using Trax.Mediator.Services.TrainDiscovery; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Api.GraphQL.TypeModules; diff --git a/Trax.Api/src/Trax.Api.GraphQL/packages.lock.json b/Trax.Api/src/Trax.Api.GraphQL/packages.lock.json index edaa9f1bc..79ed066aa 100644 --- a/Trax.Api/src/Trax.Api.GraphQL/packages.lock.json +++ b/Trax.Api/src/Trax.Api.GraphQL/packages.lock.json @@ -596,37 +596,37 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Api/src/Trax.Api/Extensions/ApiServiceExtensions.cs b/Trax.Api/src/Trax.Api/Extensions/ApiServiceExtensions.cs index 80eb8f7e3..7f60d5112 100644 --- a/Trax.Api/src/Trax.Api/Extensions/ApiServiceExtensions.cs +++ b/Trax.Api/src/Trax.Api/Extensions/ApiServiceExtensions.cs @@ -4,9 +4,9 @@ using Trax.Api.Services.HealthCheck; using Trax.Api.Services.Metrics; using Trax.Api.Services.Principal; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Services.Principal; using Trax.Mediator.Services.TrainAuthorization; +using Trax.StateMachine.Persistence; namespace Trax.Api.Extensions; diff --git a/Trax.Api/src/Trax.Api/Services/Authorization/HttpCallerAuthorization.cs b/Trax.Api/src/Trax.Api/Services/Authorization/HttpCallerAuthorization.cs index 242bb0038..5199c0e8a 100644 --- a/Trax.Api/src/Trax.Api/Services/Authorization/HttpCallerAuthorization.cs +++ b/Trax.Api/src/Trax.Api/Services/Authorization/HttpCallerAuthorization.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Api.Services.Authorization; diff --git a/Trax.Api/src/Trax.Api/packages.lock.json b/Trax.Api/src/Trax.Api/packages.lock.json index 954b13137..08ccc1ea8 100644 --- a/Trax.Api/src/Trax.Api/packages.lock.json +++ b/Trax.Api/src/Trax.Api/packages.lock.json @@ -36,37 +36,37 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Api/tests/Trax.Api.GraphQL.Testing.Tests/packages.lock.json b/Trax.Api/tests/Trax.Api.GraphQL.Testing.Tests/packages.lock.json index 3bf55f196..83eb15639 100644 --- a/Trax.Api/tests/Trax.Api.GraphQL.Testing.Tests/packages.lock.json +++ b/Trax.Api/tests/Trax.Api.GraphQL.Testing.Tests/packages.lock.json @@ -764,40 +764,40 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Api/tests/Trax.Api.Tests.Meta/packages.lock.json b/Trax.Api/tests/Trax.Api.Tests.Meta/packages.lock.json index 825bdcb3a..9ac43ad3d 100644 --- a/Trax.Api/tests/Trax.Api.Tests.Meta/packages.lock.json +++ b/Trax.Api/tests/Trax.Api.Tests.Meta/packages.lock.json @@ -942,40 +942,40 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/ClientDocumentsE2ETests.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/ClientDocumentsE2ETests.cs index e93b4d3e8..d88f1f572 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/ClientDocumentsE2ETests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/ClientDocumentsE2ETests.cs @@ -7,7 +7,7 @@ using Trax.Api.GraphQL.PersistedOperations.Extensions; using Trax.Api.GraphQL.PersistedOperations.Services; using Trax.Api.StateMachine.E2E.Fakes; -using Trax.Effect.StateMachine; +using Trax.StateMachine; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/ClientManifestExportTests.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/ClientManifestExportTests.cs index 19f20f199..44a0889fe 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/ClientManifestExportTests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/ClientManifestExportTests.cs @@ -4,7 +4,7 @@ using Trax.Api.GraphQL.PersistedOperations.Services; using Trax.Api.StateMachine.E2E.Fakes; using Trax.Effect.Configuration.ClientExport; -using Trax.Effect.StateMachine; +using Trax.StateMachine; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/E2EHost.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/E2EHost.cs index fde739765..caaed2a48 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/E2EHost.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/E2EHost.cs @@ -21,7 +21,6 @@ using Trax.Effect.JunctionProvider.Progress.Extensions; using Trax.Effect.Provider.Json.Extensions; using Trax.Effect.Provider.Parameter.Extensions; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Extensions; using Trax.Mediator.Services.TrainDiscovery; using Trax.Mediator.Services.TrainExecution; @@ -29,6 +28,7 @@ using Trax.Scheduler.Services.JobSubmitter; using Trax.Scheduler.Services.Operations; using Trax.Scheduler.Services.TraxScheduler; +using Trax.StateMachine.Persistence; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/E2ESql.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/E2ESql.cs index 6efd6ac2b..f7ca15570 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/E2ESql.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/E2ESql.cs @@ -1,5 +1,5 @@ using Npgsql; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Mutations; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/MemoMachine.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/MemoMachine.cs index a56d203c3..b23987f45 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/MemoMachine.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/MemoMachine.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; namespace Trax.Api.StateMachine.E2E.Fakes; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/ServedMachines.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/ServedMachines.cs index b468020dc..9ef9c5d85 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/ServedMachines.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/ServedMachines.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Attributes; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Api.StateMachine.E2E.Fakes; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/ShelfMachine.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/ShelfMachine.cs index 1190929d6..a6188a7c6 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/ShelfMachine.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/ShelfMachine.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; namespace Trax.Api.StateMachine.E2E.Fakes; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/SnoozeMachine.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/SnoozeMachine.cs index f86a692f8..fff204bcd 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/SnoozeMachine.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/SnoozeMachine.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; namespace Trax.Api.StateMachine.E2E.Fakes; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/TicketMachine.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/TicketMachine.cs index 55430a401..b72294aaa 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/TicketMachine.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/TicketMachine.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; namespace Trax.Api.StateMachine.E2E.Fakes; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/WizardMachine.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/WizardMachine.cs index 5ad8bf0dd..32ee5f5b0 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/WizardMachine.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Fakes/WizardMachine.cs @@ -5,9 +5,9 @@ using Trax.Effect.Attributes; using Trax.Effect.Services.EffectJunction; using Trax.Effect.Services.ServiceTrain; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; namespace Trax.Api.StateMachine.E2E.Fakes; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/GeneratedTrainDocumentsRemovedE2ETests.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/GeneratedTrainDocumentsRemovedE2ETests.cs index f052014e3..0ddf2de98 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/GeneratedTrainDocumentsRemovedE2ETests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/GeneratedTrainDocumentsRemovedE2ETests.cs @@ -5,7 +5,7 @@ using Trax.Api.GraphQL.PersistedOperations.Extensions; using Trax.Api.GraphQL.PersistedOperations.Services; using Trax.Api.StateMachine.E2E.Fakes; -using Trax.Effect.StateMachine; +using Trax.StateMachine; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/GenericOptInE2ETests.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/GenericOptInE2ETests.cs index 737a821a7..d8b5edebc 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/GenericOptInE2ETests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/GenericOptInE2ETests.cs @@ -176,9 +176,7 @@ await start .Which.ToString() .Should() .Contain( - nameof( - Trax.Effect.StateMachine.Persistence.GenericStateMachineMutationOptions.Policy - ) + nameof(Trax.StateMachine.Persistence.GenericStateMachineMutationOptions.Policy) ); } diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineChangedE2ETests.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineChangedE2ETests.cs index 7b87c3b7b..d0ec5976c 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineChangedE2ETests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineChangedE2ETests.cs @@ -19,8 +19,8 @@ using Trax.Effect.Models.Metadata; using Trax.Effect.Models.Metadata.DTOs; using Trax.Effect.Models.WorkQueue.DTOs; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineClientResultE2ETests.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineClientResultE2ETests.cs index 75536829d..bab349215 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineClientResultE2ETests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineClientResultE2ETests.cs @@ -8,8 +8,8 @@ using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Trax.Api.StateMachine.E2E.Fakes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineDocumentCrossNodeTests.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineDocumentCrossNodeTests.cs index 0d5da36cb..77278ffc2 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineDocumentCrossNodeTests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineDocumentCrossNodeTests.cs @@ -8,8 +8,8 @@ using Trax.Api.GraphQL.PersistedOperations.Configuration; using Trax.Api.GraphQL.PersistedOperations.Services; using Trax.Api.StateMachine.E2E.Fakes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineDocumentStorageTests.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineDocumentStorageTests.cs index 86ab59046..45a3dafd9 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineDocumentStorageTests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineDocumentStorageTests.cs @@ -4,7 +4,7 @@ using Trax.Api.GraphQL.PersistedOperations.Configuration; using Trax.Api.GraphQL.PersistedOperations.Services; using Trax.Api.StateMachine.E2E.Fakes; -using Trax.Effect.StateMachine; +using Trax.StateMachine; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineDocumentsE2ETests.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineDocumentsE2ETests.cs index c01a35417..105ce7452 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineDocumentsE2ETests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineDocumentsE2ETests.cs @@ -8,8 +8,8 @@ using Trax.Api.GraphQL.PersistedOperations.Broadcasting; using Trax.Api.GraphQL.PersistedOperations.Services; using Trax.Api.StateMachine.E2E.Fakes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineEventsE2ETests.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineEventsE2ETests.cs index 302d7f91c..1c9e245fb 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineEventsE2ETests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineEventsE2ETests.cs @@ -2,8 +2,8 @@ using AwesomeAssertions; using Microsoft.Extensions.Hosting; using Trax.Api.StateMachine.E2E.Fakes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine; +using Trax.StateMachine.Persistence.Mutations; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachinePushE2ETests.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachinePushE2ETests.cs index 9fe31fee0..d76ee6669 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachinePushE2ETests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachinePushE2ETests.cs @@ -4,7 +4,7 @@ using HotChocolate.Types; using Microsoft.Extensions.Hosting; using Trax.Api.StateMachine.E2E.Fakes; -using Trax.Effect.StateMachine; +using Trax.StateMachine; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineRegistrationE2ETests.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineRegistrationE2ETests.cs index 5b2db7e8e..f1c70c456 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineRegistrationE2ETests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineRegistrationE2ETests.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Trax.Api.StateMachine.E2E.Fakes; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineRequestIdE2ETests.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineRequestIdE2ETests.cs index 506c461a3..1fbabfec7 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineRequestIdE2ETests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineRequestIdE2ETests.cs @@ -9,8 +9,8 @@ using Trax.Effect.Models.Metadata; using Trax.Effect.Models.Metadata.DTOs; using Trax.Effect.Models.WorkQueue.DTOs; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineRulesE2ETests.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineRulesE2ETests.cs index c434d3159..4a08367c2 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineRulesE2ETests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineRulesE2ETests.cs @@ -4,8 +4,8 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Trax.Api.StateMachine.E2E.Fakes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineRunRecordE2ETests.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineRunRecordE2ETests.cs index 00a572f67..a80cfae8a 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineRunRecordE2ETests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachineRunRecordE2ETests.cs @@ -2,7 +2,7 @@ using AwesomeAssertions; using Microsoft.Extensions.Hosting; using Trax.Api.StateMachine.E2E.Fakes; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Mutations; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Machines.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Machines.cs index 709a9be39..bf455448c 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Machines.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Machines.cs @@ -1,7 +1,7 @@ using System.Text.Json; using System.Text.Json.Nodes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachinesRootSchemaTests.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachinesRootSchemaTests.cs index 02f5fa4f4..75c7938fe 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachinesRootSchemaTests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/MachinesRootSchemaTests.cs @@ -3,7 +3,7 @@ using HotChocolate.Types; using Microsoft.Extensions.Hosting; using Trax.Api.StateMachine.E2E.Fakes; -using Trax.Effect.StateMachine; +using Trax.StateMachine; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/OperatorMachineDefinitionsE2ETests.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/OperatorMachineDefinitionsE2ETests.cs index 3a7af9618..3839c613d 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/OperatorMachineDefinitionsE2ETests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/OperatorMachineDefinitionsE2ETests.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Trax.Api.StateMachine.E2E.Fakes; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/OperatorMachineFeedE2ETests.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/OperatorMachineFeedE2ETests.cs index 69642fb89..0febb7d63 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/OperatorMachineFeedE2ETests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/OperatorMachineFeedE2ETests.cs @@ -4,8 +4,8 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Trax.Api.StateMachine.E2E.Fakes; -using Trax.Effect.StateMachine.Persistence; using Trax.Scheduler.Services.Operations; +using Trax.StateMachine.Persistence; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/OperatorMachineInstancesE2ETests.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/OperatorMachineInstancesE2ETests.cs index 49305a930..c044b9cd6 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/OperatorMachineInstancesE2ETests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/OperatorMachineInstancesE2ETests.cs @@ -15,12 +15,12 @@ using Trax.Effect.Extensions; using Trax.Effect.JunctionProvider.Progress.Extensions; using Trax.Effect.Provider.Json.Extensions; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Extensions; using Trax.Mediator.Services.TrainDiscovery; using Trax.Mediator.Services.TrainExecution; using Trax.Scheduler.Configuration; using Trax.Scheduler.Services.Operations; +using Trax.StateMachine.Persistence; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/ShelfHosts.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/ShelfHosts.cs index 71f006875..1b0b7a52b 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/ShelfHosts.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/ShelfHosts.cs @@ -2,7 +2,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Trax.Api.StateMachine.E2E.Fakes; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/StateMachineGraphQLE2ETests.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/StateMachineGraphQLE2ETests.cs index f9a2bf399..edc0d6920 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/StateMachineGraphQLE2ETests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/StateMachineGraphQLE2ETests.cs @@ -2,8 +2,8 @@ using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Trax.Api.Tests.StateMachine.E2E.csproj b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Trax.Api.Tests.StateMachine.E2E.csproj index ab82f6a62..e11ca1ed2 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Trax.Api.Tests.StateMachine.E2E.csproj +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/Trax.Api.Tests.StateMachine.E2E.csproj @@ -38,8 +38,8 @@ - - + + diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/TraxCallerSnapshotPrincipal.cs b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/TraxCallerSnapshotPrincipal.cs index a70c9f3eb..a8f28a8e9 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/TraxCallerSnapshotPrincipal.cs +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/TraxCallerSnapshotPrincipal.cs @@ -1,5 +1,5 @@ using Trax.Api.Auth; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Api.StateMachine.E2E; diff --git a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/packages.lock.json b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/packages.lock.json index f6725f5c1..dc188d2b8 100644 --- a/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/packages.lock.json +++ b/Trax.Api/tests/Trax.Api.Tests.StateMachine.E2E/packages.lock.json @@ -727,37 +727,37 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Api/tests/Trax.Api.Tests.Stress/IntegrationTests/MachineChangedStressTests.cs b/Trax.Api/tests/Trax.Api.Tests.Stress/IntegrationTests/MachineChangedStressTests.cs index a920563b4..24396e6ea 100644 --- a/Trax.Api/tests/Trax.Api.Tests.Stress/IntegrationTests/MachineChangedStressTests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.Stress/IntegrationTests/MachineChangedStressTests.cs @@ -22,7 +22,6 @@ using Trax.Effect.Data.Services.IDataContextFactory; using Trax.Effect.Extensions; using Trax.Effect.Provider.Json.Extensions; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Extensions; using Trax.Mediator.Services.TrainDiscovery; using Trax.Mediator.Services.TrainExecution; @@ -30,6 +29,7 @@ using Trax.Scheduler.Services.JobSubmitter; using Trax.Scheduler.Services.Operations; using Trax.Scheduler.Services.TraxScheduler; +using Trax.StateMachine.Persistence; using OperationResult = HotChocolate.Execution.OperationResult; namespace Trax.Api.Tests.Stress.IntegrationTests; diff --git a/Trax.Api/tests/Trax.Api.Tests.Stress/IntegrationTests/MachineEventStressTests.cs b/Trax.Api/tests/Trax.Api.Tests.Stress/IntegrationTests/MachineEventStressTests.cs index 417995286..f3d6e0676 100644 --- a/Trax.Api/tests/Trax.Api.Tests.Stress/IntegrationTests/MachineEventStressTests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.Stress/IntegrationTests/MachineEventStressTests.cs @@ -21,9 +21,6 @@ using Trax.Effect.Data.Services.IDataContextFactory; using Trax.Effect.Extensions; using Trax.Effect.Provider.Json.Extensions; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using Trax.Effect.StateMachine.Persistence.Mutations; using Trax.Mediator.Extensions; using Trax.Mediator.Services.TrainDiscovery; using Trax.Mediator.Services.TrainExecution; @@ -31,7 +28,10 @@ using Trax.Scheduler.Services.JobSubmitter; using Trax.Scheduler.Services.Operations; using Trax.Scheduler.Services.TraxScheduler; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using Trax.StateMachine.Persistence.Mutations; +using static Trax.StateMachine.Rules; using OperationResult = HotChocolate.Execution.OperationResult; namespace Trax.Api.Tests.Stress.IntegrationTests; diff --git a/Trax.Api/tests/Trax.Api.Tests.Stress/packages.lock.json b/Trax.Api/tests/Trax.Api.Tests.Stress/packages.lock.json index 9821b7c7b..9aff602cd 100644 --- a/Trax.Api/tests/Trax.Api.Tests.Stress/packages.lock.json +++ b/Trax.Api/tests/Trax.Api.Tests.Stress/packages.lock.json @@ -793,40 +793,40 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Api/tests/Trax.Api.Tests/AuthE2E/ClientManifestQueryModelsE2ETests.cs b/Trax.Api/tests/Trax.Api.Tests/AuthE2E/ClientManifestQueryModelsE2ETests.cs index 91be72ce3..690b78e7b 100644 --- a/Trax.Api/tests/Trax.Api.Tests/AuthE2E/ClientManifestQueryModelsE2ETests.cs +++ b/Trax.Api/tests/Trax.Api.Tests/AuthE2E/ClientManifestQueryModelsE2ETests.cs @@ -1,7 +1,7 @@ using AwesomeAssertions; using Microsoft.Extensions.Hosting; using Trax.Api.GraphQL.PersistedOperations.Services; -using Trax.Effect.StateMachine; +using Trax.StateMachine; using static Trax.Api.Tests.AuthE2E.AuthE2EHost; namespace Trax.Api.Tests.AuthE2E; diff --git a/Trax.Api/tests/Trax.Api.Tests/AuthE2E/RunProgressE2ETests.cs b/Trax.Api/tests/Trax.Api.Tests/AuthE2E/RunProgressE2ETests.cs index 33252ed4f..2d1b7acf5 100644 --- a/Trax.Api/tests/Trax.Api.Tests/AuthE2E/RunProgressE2ETests.cs +++ b/Trax.Api/tests/Trax.Api.Tests/AuthE2E/RunProgressE2ETests.cs @@ -27,8 +27,8 @@ using Trax.Effect.Models.ManifestGroup; using Trax.Effect.Services.EffectJunction; using Trax.Effect.Services.ServiceTrain; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Extensions; +using Trax.StateMachine.Persistence; namespace Trax.Api.Tests.AuthE2E; diff --git a/Trax.Api/tests/Trax.Api.Tests/AuthE2E/RunProgressInvokedRunE2ETests.cs b/Trax.Api/tests/Trax.Api.Tests/AuthE2E/RunProgressInvokedRunE2ETests.cs index b8f9d6861..3f18d4582 100644 --- a/Trax.Api/tests/Trax.Api.Tests/AuthE2E/RunProgressInvokedRunE2ETests.cs +++ b/Trax.Api/tests/Trax.Api.Tests/AuthE2E/RunProgressInvokedRunE2ETests.cs @@ -18,11 +18,11 @@ using Trax.Effect.Data.Services.IDataContextFactory; using Trax.Effect.Extensions; using Trax.Effect.JunctionProvider.Progress.Extensions; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Extensions; using Trax.Scheduler.Extensions; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; namespace Trax.Api.Tests.AuthE2E; diff --git a/Trax.Api/tests/Trax.Api.Tests/Fakes/EnumMachines.cs b/Trax.Api/tests/Trax.Api.Tests/Fakes/EnumMachines.cs index a8721ba48..a52171892 100644 --- a/Trax.Api/tests/Trax.Api.Tests/Fakes/EnumMachines.cs +++ b/Trax.Api/tests/Trax.Api.Tests/Fakes/EnumMachines.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; using Trax.Effect.Attributes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Api.Tests.Fakes.Machines { diff --git a/Trax.Api/tests/Trax.Api.Tests/Fakes/Machines.cs b/Trax.Api/tests/Trax.Api.Tests/Fakes/Machines.cs index cbfaad63b..92ec5f92c 100644 --- a/Trax.Api/tests/Trax.Api.Tests/Fakes/Machines.cs +++ b/Trax.Api/tests/Trax.Api.Tests/Fakes/Machines.cs @@ -1,8 +1,8 @@ using System.Text.Json.Nodes; using Trax.Effect.Attributes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; namespace Trax.Api.Tests.Fakes.Machines; diff --git a/Trax.Api/tests/Trax.Api.Tests/MachineChangedOrderTests.cs b/Trax.Api/tests/Trax.Api.Tests/MachineChangedOrderTests.cs index 9333282a0..e22a3508b 100644 --- a/Trax.Api/tests/Trax.Api.Tests/MachineChangedOrderTests.cs +++ b/Trax.Api/tests/Trax.Api.Tests/MachineChangedOrderTests.cs @@ -1,8 +1,8 @@ using AwesomeAssertions; using Trax.Api.GraphQL.TypeModules; using Trax.Api.Tests.Fakes.Machines; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Api.Tests; diff --git a/Trax.Api/tests/Trax.Api.Tests/MachineExposureCensusTests.cs b/Trax.Api/tests/Trax.Api.Tests/MachineExposureCensusTests.cs index 0961c8c14..df95f4741 100644 --- a/Trax.Api/tests/Trax.Api.Tests/MachineExposureCensusTests.cs +++ b/Trax.Api/tests/Trax.Api.Tests/MachineExposureCensusTests.cs @@ -1,7 +1,7 @@ using AwesomeAssertions; using Trax.Api.Tests.Fakes.Machines; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Api.Tests; @@ -45,7 +45,7 @@ public async Task The_GraphQL_exposure_census_covers_machines_as_their_own_kind( message .Should() .NotContain( - "Trax.Effect.StateMachine.Persistence.Mutations", + "Trax.StateMachine.Persistence.Mutations", "the internal snapshot trains are not what a client reaches" ); } diff --git a/Trax.Api/tests/Trax.Api.Tests/MachineExposureStartupTests.cs b/Trax.Api/tests/Trax.Api.Tests/MachineExposureStartupTests.cs index 7c6abcc36..d4686495a 100644 --- a/Trax.Api/tests/Trax.Api.Tests/MachineExposureStartupTests.cs +++ b/Trax.Api/tests/Trax.Api.Tests/MachineExposureStartupTests.cs @@ -4,7 +4,7 @@ using Microsoft.Extensions.DependencyInjection; using Trax.Api.Tests.Fakes.Machines; using Trax.Effect.Attributes; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Api.Tests; diff --git a/Trax.Api/tests/Trax.Api.Tests/MachineSchemaHost.cs b/Trax.Api/tests/Trax.Api.Tests/MachineSchemaHost.cs index 8a5900d10..0c9bfdaff 100644 --- a/Trax.Api/tests/Trax.Api.Tests/MachineSchemaHost.cs +++ b/Trax.Api/tests/Trax.Api.Tests/MachineSchemaHost.cs @@ -18,12 +18,12 @@ using Trax.Effect.Attributes; using Trax.Effect.Data.InMemory.Extensions; using Trax.Effect.Extensions; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Services.TrainDiscovery; using Trax.Mediator.Services.TrainExecution; using Trax.Scheduler.Services.JobSubmitter; using Trax.Scheduler.Services.Operations; using Trax.Scheduler.Services.TraxScheduler; +using Trax.StateMachine.Persistence; namespace Trax.Api.Tests; diff --git a/Trax.Api/tests/Trax.Api.Tests/MachineTypeModuleTests.cs b/Trax.Api/tests/Trax.Api.Tests/MachineTypeModuleTests.cs index 772706261..e529fbdbe 100644 --- a/Trax.Api/tests/Trax.Api.Tests/MachineTypeModuleTests.cs +++ b/Trax.Api/tests/Trax.Api.Tests/MachineTypeModuleTests.cs @@ -4,7 +4,7 @@ using Trax.Api.GraphQL.PersistedOperations.Services; using Trax.Api.GraphQL.Validation; using Trax.Api.Tests.Fakes.Machines; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Api.Tests; @@ -261,7 +261,7 @@ public void Census_ListsEachEventAndReadWithItsRule_ForTheSurfaceAndForHostCode( var entries = MachineCensus.Describe([new ShopMachine()]); entries - .Where(e => e.Kind == nameof(Trax.Effect.StateMachine.TriggerKind.Client)) + .Where(e => e.Kind == nameof(Trax.StateMachine.TriggerKind.Client)) .Select(e => e.Name) .Should() .BeEquivalentTo( diff --git a/Trax.Api/tests/Trax.Api.Tests/MarkedMachineSchemaTests.cs b/Trax.Api/tests/Trax.Api.Tests/MarkedMachineSchemaTests.cs index cb189894c..068e316ce 100644 --- a/Trax.Api/tests/Trax.Api.Tests/MarkedMachineSchemaTests.cs +++ b/Trax.Api/tests/Trax.Api.Tests/MarkedMachineSchemaTests.cs @@ -4,7 +4,7 @@ using Microsoft.Extensions.DependencyInjection; using Trax.Api.Tests.Fakes.Machines; using Trax.Effect.Attributes; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Api.Tests; diff --git a/Trax.Api/tests/Trax.Api.Tests/OperationCapUnderNamespacesTests.cs b/Trax.Api/tests/Trax.Api.Tests/OperationCapUnderNamespacesTests.cs index c2dca48bf..15aa91608 100644 --- a/Trax.Api/tests/Trax.Api.Tests/OperationCapUnderNamespacesTests.cs +++ b/Trax.Api/tests/Trax.Api.Tests/OperationCapUnderNamespacesTests.cs @@ -13,9 +13,9 @@ using Trax.Effect.Data.InMemory.Extensions; using Trax.Effect.Extensions; using Trax.Effect.Services.EffectRegistry; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Services.TrainDiscovery; using Trax.Scheduler.Services.TraxScheduler; +using Trax.StateMachine.Persistence; namespace Trax.Api.Tests; diff --git a/Trax.Api/tests/Trax.Api.Tests/PersistedOperations/UnitTests/ProgressDocumentsTests.cs b/Trax.Api/tests/Trax.Api.Tests/PersistedOperations/UnitTests/ProgressDocumentsTests.cs index df706dba1..0168a0fec 100644 --- a/Trax.Api/tests/Trax.Api.Tests/PersistedOperations/UnitTests/ProgressDocumentsTests.cs +++ b/Trax.Api/tests/Trax.Api.Tests/PersistedOperations/UnitTests/ProgressDocumentsTests.cs @@ -4,8 +4,8 @@ using Microsoft.Extensions.DependencyInjection; using Trax.Api.GraphQL.PersistedOperations.Services; using Trax.Api.GraphQL.TypeModules; -using Trax.Effect.StateMachine; using Trax.Mediator.Services.TrainDiscovery; +using Trax.StateMachine; namespace Trax.Api.Tests.PersistedOperations.UnitTests; diff --git a/Trax.Api/tests/Trax.Api.Tests/RunProgressStreamTests.cs b/Trax.Api/tests/Trax.Api.Tests/RunProgressStreamTests.cs index 79a32b3ee..9c9133130 100644 --- a/Trax.Api/tests/Trax.Api.Tests/RunProgressStreamTests.cs +++ b/Trax.Api/tests/Trax.Api.Tests/RunProgressStreamTests.cs @@ -4,7 +4,7 @@ using Trax.Api.DTOs; using Trax.Api.GraphQL.Subscriptions; using Trax.Api.GraphQL.TypeModules; -using Trax.Effect.StateMachine; +using Trax.StateMachine; namespace Trax.Api.Tests; diff --git a/Trax.Api/tests/Trax.Api.Tests/SchemaRebuildTests.cs b/Trax.Api/tests/Trax.Api.Tests/SchemaRebuildTests.cs index cf25ad476..0ae452819 100644 --- a/Trax.Api/tests/Trax.Api.Tests/SchemaRebuildTests.cs +++ b/Trax.Api/tests/Trax.Api.Tests/SchemaRebuildTests.cs @@ -10,8 +10,8 @@ using Trax.Effect.Data.InMemory.Extensions; using Trax.Effect.Extensions; using Trax.Effect.Services.EffectRegistry; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Services.TrainDiscovery; +using Trax.StateMachine.Persistence; namespace Trax.Api.Tests; diff --git a/Trax.Api/tests/Trax.Api.Tests/packages.lock.json b/Trax.Api/tests/Trax.Api.Tests/packages.lock.json index fe550f368..4387682eb 100644 --- a/Trax.Api/tests/Trax.Api.Tests/packages.lock.json +++ b/Trax.Api/tests/Trax.Api.Tests/packages.lock.json @@ -1044,40 +1044,40 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Cli/docs/adr/0001-the-machine-toolchain-is-half-in-process.md b/Trax.Cli/docs/adr/0001-the-machine-toolchain-is-half-in-process.md index 574e42610..3d8a83c9d 100644 --- a/Trax.Cli/docs/adr/0001-the-machine-toolchain-is-half-in-process.md +++ b/Trax.Cli/docs/adr/0001-the-machine-toolchain-is-half-in-process.md @@ -31,7 +31,7 @@ machine what it is, rather than guessing from syntax. ## Consequences **The CLI is version-coupled to the engine, deliberately.** It references -`Trax.Effect.StateMachine.Persistence` at compile time and loads the machine assembly into +`Trax.StateMachine.Persistence` at compile time and loads the machine assembly into the *default* `AssemblyLoadContext`, not an isolated one, so the machine's reference to that package binds by simple name to the copy the CLI already has. Type identity is preserved, and a machine built against an older engine than the CLI still unifies with the CLI's own diff --git a/Trax.Cli/src/Trax.Cli/Clients/ClientDocumentSet.cs b/Trax.Cli/src/Trax.Cli/Clients/ClientDocumentSet.cs index b915fe866..0577559e3 100644 --- a/Trax.Cli/src/Trax.Cli/Clients/ClientDocumentSet.cs +++ b/Trax.Cli/src/Trax.Cli/Clients/ClientDocumentSet.cs @@ -3,7 +3,7 @@ using GraphQLParser; using GraphQLParser.AST; using GraphQLParser.Visitors; -using Trax.Effect.StateMachine; +using Trax.StateMachine; namespace Trax.Cli.Clients; diff --git a/Trax.Cli/src/Trax.Cli/Clients/ClientGenerator.Documents.cs b/Trax.Cli/src/Trax.Cli/Clients/ClientGenerator.Documents.cs index 0655313a4..c8b83ee27 100644 --- a/Trax.Cli/src/Trax.Cli/Clients/ClientGenerator.Documents.cs +++ b/Trax.Cli/src/Trax.Cli/Clients/ClientGenerator.Documents.cs @@ -1,7 +1,7 @@ using System.Text; using System.Text.Json; using GraphQLParser.AST; -using Trax.Effect.StateMachine; +using Trax.StateMachine; namespace Trax.Cli.Clients; diff --git a/Trax.Cli/src/Trax.Cli/Clients/ClientGenerator.cs b/Trax.Cli/src/Trax.Cli/Clients/ClientGenerator.cs index 34313dd8c..12554bb41 100644 --- a/Trax.Cli/src/Trax.Cli/Clients/ClientGenerator.cs +++ b/Trax.Cli/src/Trax.Cli/Clients/ClientGenerator.cs @@ -4,7 +4,7 @@ using GraphQLParser; using GraphQLParser.AST; using Trax.Cli.Machines; -using Trax.Effect.StateMachine; +using Trax.StateMachine; namespace Trax.Cli.Clients; diff --git a/Trax.Cli/src/Trax.Cli/Commands/ClientCommand.cs b/Trax.Cli/src/Trax.Cli/Commands/ClientCommand.cs index fb1d04569..5dfacc237 100644 --- a/Trax.Cli/src/Trax.Cli/Commands/ClientCommand.cs +++ b/Trax.Cli/src/Trax.Cli/Commands/ClientCommand.cs @@ -1,7 +1,7 @@ using System.CommandLine; using Trax.Cli.Clients; using Trax.Cli.Machines; -using Trax.Effect.StateMachine; +using Trax.StateMachine; namespace Trax.Cli.Commands; diff --git a/Trax.Cli/src/Trax.Cli/Commands/MachineCommand.cs b/Trax.Cli/src/Trax.Cli/Commands/MachineCommand.cs index 92997d3fa..659f4139f 100644 --- a/Trax.Cli/src/Trax.Cli/Commands/MachineCommand.cs +++ b/Trax.Cli/src/Trax.Cli/Commands/MachineCommand.cs @@ -102,7 +102,7 @@ bool force /// internal static string NewNextSteps() { - var version = typeof(Trax.Effect.StateMachine.Persistence.IMachine) + var version = typeof(Trax.StateMachine.Persistence.IMachine) .Assembly.GetCustomAttributes( typeof(System.Reflection.AssemblyInformationalVersionAttribute), false @@ -114,9 +114,9 @@ internal static string NewNextSteps() return string.Join( Environment.NewLine, "Next steps:", - " 1. The machine derives from Machine in Trax.Effect.StateMachine.Persistence. In the", + " 1. The machine derives from Machine in Trax.StateMachine.Persistence. In the", " project that holds this file, reference the version this trax is built against:", - $" dotnet add package Trax.Effect.StateMachine.Persistence{versionFlag}", + $" dotnet add package Trax.StateMachine.Persistence{versionFlag}", " 2. Edit the states, triggers and context, then build the project.", " 3. Export the IR from the built assembly:", " trax machine generate --assembly --ir-out ", diff --git a/Trax.Cli/src/Trax.Cli/Machines/MachineGenerator.cs b/Trax.Cli/src/Trax.Cli/Machines/MachineGenerator.cs index 27e376a95..dc7c483ee 100644 --- a/Trax.Cli/src/Trax.Cli/Machines/MachineGenerator.cs +++ b/Trax.Cli/src/Trax.Cli/Machines/MachineGenerator.cs @@ -1,4 +1,4 @@ -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Cli.Machines; diff --git a/Trax.Cli/src/Trax.Cli/Machines/MachineLoader.cs b/Trax.Cli/src/Trax.Cli/Machines/MachineLoader.cs index 3542ba1f8..ea7ee635b 100644 --- a/Trax.Cli/src/Trax.Cli/Machines/MachineLoader.cs +++ b/Trax.Cli/src/Trax.Cli/Machines/MachineLoader.cs @@ -1,12 +1,12 @@ using System.Reflection; using System.Runtime.Loader; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Cli.Machines; /// /// Loads a compiled machine assembly and hands back the to export. The assembly goes into -/// the default , so its reference to Trax.Effect.StateMachine.Persistence +/// the default , so its reference to Trax.StateMachine.Persistence /// binds by simple name to the copy the CLI already has: type identity is preserved, and a machine built against /// an older engine still unifies with the CLI's own . A machine built against a newer one /// cannot: the default context already holds that simple name at a lower version. How that surfaces has not been @@ -84,7 +84,7 @@ public static IMachine Load(string assemblyPath, string? machineFullName) throw new InvalidOperationException( $"No machines found in {Path.GetFileName(fullPath)}. A machine is a non-abstract " + "IMachine (a Machine subclass) with a parameterless constructor. " - + "If the assembly references a different Trax.Effect.StateMachine version than this CLI, " + + "If the assembly references a different Trax.StateMachine version than this CLI, " + "its machines will not be recognized; rebuild it against the matching version." + DescribeLoaderExceptions(loaderExceptions) ); diff --git a/Trax.Cli/src/Trax.Cli/Machines/MachineRenderer.cs b/Trax.Cli/src/Trax.Cli/Machines/MachineRenderer.cs index c53b1d376..e7faab9b1 100644 --- a/Trax.Cli/src/Trax.Cli/Machines/MachineRenderer.cs +++ b/Trax.Cli/src/Trax.Cli/Machines/MachineRenderer.cs @@ -1,5 +1,5 @@ using System.Text; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Cli.Machines; diff --git a/Trax.Cli/src/Trax.Cli/Templates/MachineScaffold.sbn b/Trax.Cli/src/Trax.Cli/Templates/MachineScaffold.sbn index ce8e1684a..ac930b46c 100644 --- a/Trax.Cli/src/Trax.Cli/Templates/MachineScaffold.sbn +++ b/Trax.Cli/src/Trax.Cli/Templates/MachineScaffold.sbn @@ -5,9 +5,9 @@ using System; using System.Threading; using System.Threading.Tasks; {{- end }} -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; namespace {{ Namespace }}; diff --git a/Trax.Cli/src/Trax.Cli/Trax.Cli.csproj b/Trax.Cli/src/Trax.Cli/Trax.Cli.csproj index cfa880922..0e1c8d1e8 100644 --- a/Trax.Cli/src/Trax.Cli/Trax.Cli.csproj +++ b/Trax.Cli/src/Trax.Cli/Trax.Cli.csproj @@ -23,7 +23,7 @@ - + diff --git a/Trax.Cli/src/Trax.Cli/packages.lock.json b/Trax.Cli/src/Trax.Cli/packages.lock.json index d60f9dd28..ddd27c751 100644 --- a/Trax.Cli/src/Trax.Cli/packages.lock.json +++ b/Trax.Cli/src/Trax.Cli/packages.lock.json @@ -144,13 +144,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.statemachine": { "type": "Project", "dependencies": { "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { "Microsoft.EntityFrameworkCore": "[10.0.12, )", @@ -159,7 +159,7 @@ "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Microsoft.EntityFrameworkCore": { diff --git a/Trax.Cli/tests/Trax.Cli.Tests.Meta/packages.lock.json b/Trax.Cli/tests/Trax.Cli.Tests.Meta/packages.lock.json index 3973bce4f..da1c813e6 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests.Meta/packages.lock.json +++ b/Trax.Cli/tests/Trax.Cli.Tests.Meta/packages.lock.json @@ -253,7 +253,7 @@ "Microsoft.OpenApi.Readers": "[1.6.31, )", "Scriban": "[7.5.0, )", "System.CommandLine": "[2.0.12, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.core": { @@ -287,13 +287,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.statemachine": { "type": "Project", "dependencies": { "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { "Microsoft.EntityFrameworkCore": "[10.0.12, )", @@ -302,7 +302,7 @@ "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "GraphQL-Parser": { diff --git a/Trax.Cli/tests/Trax.Cli.Tests/Fakes/ClientManifests.cs b/Trax.Cli/tests/Trax.Cli.Tests/Fakes/ClientManifests.cs index 9afc1b5a7..c01ac8678 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/Fakes/ClientManifests.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/Fakes/ClientManifests.cs @@ -1,6 +1,6 @@ using System.Text.Json.Nodes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Cli.Tests.Fakes; diff --git a/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeCheckoutMachine.cs b/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeCheckoutMachine.cs index 8c84e9af7..e14541c1a 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeCheckoutMachine.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeCheckoutMachine.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; namespace Trax.Cli.Tests.Fakes; diff --git a/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeGaugeMachine.cs b/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeGaugeMachine.cs index d684f1ef9..b943d0c7b 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeGaugeMachine.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeGaugeMachine.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; namespace Trax.Cli.Tests.Fakes; diff --git a/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeIngestMachine.cs b/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeIngestMachine.cs index 745dda134..09bbdb6c2 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeIngestMachine.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeIngestMachine.cs @@ -1,11 +1,11 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json.Nodes; using Ingest.Contracts; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; -// The train's contract is declared as in Trax.Effect.StateMachine.Tests, so both describe the same machine and +// The train's contract is declared as in Trax.StateMachine.Tests, so both describe the same machine and // export the one committed ingest.ir.json. namespace Ingest.Contracts { diff --git a/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeReminderMachine.cs b/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeReminderMachine.cs index 50b7482c9..c6c4f2617 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeReminderMachine.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeReminderMachine.cs @@ -1,6 +1,6 @@ using System.Text.Json.Nodes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Cli.Tests.Fakes; diff --git a/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeTurnstileMachine.cs b/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeTurnstileMachine.cs index 8437c3f17..e4a8aeeba 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeTurnstileMachine.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/Fakes/DeclarativeTurnstileMachine.cs @@ -1,8 +1,8 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json.Nodes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; namespace Trax.Cli.Tests.Fakes; diff --git a/Trax.Cli/tests/Trax.Cli.Tests/IntegrationTests/MachineGenerateFromPackedToolTests.cs b/Trax.Cli/tests/Trax.Cli.Tests/IntegrationTests/MachineGenerateFromPackedToolTests.cs index 9baef6ece..96d52a027 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/IntegrationTests/MachineGenerateFromPackedToolTests.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/IntegrationTests/MachineGenerateFromPackedToolTests.cs @@ -28,7 +28,11 @@ public void SetUp() ); if ( !Directory.Exists( - Path.Combine(RepoFolder(Path.Combine("Trax.StateMachine", "ts")), "node_modules", "esbuild") + Path.Combine( + RepoFolder(Path.Combine("Trax.StateMachine", "ts")), + "node_modules", + "esbuild" + ) ) ) NodePrerequisite.Missing( @@ -758,7 +762,7 @@ private static void GenerateClient(string tool, string work) { File.WriteAllText( Path.Combine(work, "manifest.json"), - Trax.Effect.StateMachine.ClientManifest.Write(Fakes.ClientManifests.Sample()) + Trax.StateMachine.ClientManifest.Write(Fakes.ClientManifests.Sample()) ); // The page's own document of the train, from which its function is generated. Directory.CreateDirectory(Path.Combine(work, "documents")); diff --git a/Trax.Cli/tests/Trax.Cli.Tests/IntegrationTests/MachineGeneratorNodeTests.cs b/Trax.Cli/tests/Trax.Cli.Tests/IntegrationTests/MachineGeneratorNodeTests.cs index 306fada76..f97f8aec9 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/IntegrationTests/MachineGeneratorNodeTests.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/IntegrationTests/MachineGeneratorNodeTests.cs @@ -1,7 +1,7 @@ using AwesomeAssertions; using Trax.Cli.Machines; using Trax.Cli.Tests.Fakes; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Cli.Tests.IntegrationTests; diff --git a/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/ClientDocumentsGeneratorTests.cs b/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/ClientDocumentsGeneratorTests.cs index d45952bee..32dae3122 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/ClientDocumentsGeneratorTests.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/ClientDocumentsGeneratorTests.cs @@ -3,7 +3,7 @@ using Trax.Cli.Clients; using Trax.Cli.Commands; using Trax.Cli.Tests.Fakes; -using Trax.Effect.StateMachine; +using Trax.StateMachine; namespace Trax.Cli.Tests.UnitTests; diff --git a/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/ClientGeneratorTests.cs b/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/ClientGeneratorTests.cs index 3583dcca9..ad6c2577d 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/ClientGeneratorTests.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/ClientGeneratorTests.cs @@ -4,7 +4,7 @@ using Trax.Cli.Clients; using Trax.Cli.Machines; using Trax.Cli.Tests.Fakes; -using Trax.Effect.StateMachine; +using Trax.StateMachine; namespace Trax.Cli.Tests.UnitTests; diff --git a/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/MachineCommandTests.cs b/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/MachineCommandTests.cs index 85639b3d1..b9d02ae32 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/MachineCommandTests.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/MachineCommandTests.cs @@ -254,9 +254,7 @@ public void New_names_the_package_and_the_prerequisites_of_generate() MachineCommand.RunNew("checkout", _tempDir, "MyApp.Machines", false, false) ); - stdout - .Should() - .Contain("dotnet add package Trax.Effect.StateMachine.Persistence --version "); + stdout.Should().Contain("dotnet add package Trax.StateMachine.Persistence --version "); stdout.Should().Contain("--assembly").And.Contain("Node.js 22").And.Contain("--engine-src"); } diff --git a/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/MachineGeneratorTests.cs b/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/MachineGeneratorTests.cs index c20e9c48d..58b20fa39 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/MachineGeneratorTests.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/MachineGeneratorTests.cs @@ -2,8 +2,8 @@ using AwesomeAssertions; using Trax.Cli.Machines; using Trax.Cli.Tests.Fakes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Cli.Tests.UnitTests; diff --git a/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/MachineLoaderTests.cs b/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/MachineLoaderTests.cs index 23a6a362c..49d2bebee 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/MachineLoaderTests.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/MachineLoaderTests.cs @@ -1,7 +1,7 @@ using AwesomeAssertions; using Trax.Cli.Machines; using Trax.Cli.Tests.Fakes; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Cli.Tests.UnitTests; diff --git a/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/MachineLoaderUnloadableTypeTests.cs b/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/MachineLoaderUnloadableTypeTests.cs index 9d19cf3f1..f3f28d886 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/MachineLoaderUnloadableTypeTests.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/MachineLoaderUnloadableTypeTests.cs @@ -89,8 +89,8 @@ protected override void Configure(IMachineBuilder m) : ""; var source = $$""" using System.Text.Json.Nodes; - using Trax.Effect.StateMachine; - using Trax.Effect.StateMachine.Persistence; + using Trax.StateMachine; + using Trax.StateMachine.Persistence; namespace Consumer; public class PlayersController : Missing.ControllerBase { } {{machine}} diff --git a/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/MachineScaffolderTests.cs b/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/MachineScaffolderTests.cs index ce210cbeb..17d6a60bd 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/MachineScaffolderTests.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/MachineScaffolderTests.cs @@ -2,14 +2,14 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Trax.Cli.Machines; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Cli.Tests.UnitTests; /// /// emits a machine's starter C# file. The scaffold's whole value is that it /// compiles and runs through the rest of the pipeline as-is, so beyond the structural assertions these -/// actually compile the generated source against the real Trax.Effect.StateMachine assemblies. +/// actually compile the generated source against the real Trax.StateMachine assemblies. /// public class MachineScaffolderTests { @@ -152,7 +152,7 @@ public void The_scaffold_compiles_against_the_real_engine_with_an_effect() AssertCompiles(MachineScaffolder.Render("checkout", "Scaffolded", withEffect: true)); } - // Compile the generated source against the real Trax.Effect.StateMachine assemblies. This is the honest + // Compile the generated source against the real Trax.StateMachine assemblies. This is the honest // proof that the scaffold is not just well-shaped text but valid, buildable C#. private static void AssertCompiles(string source) { @@ -186,7 +186,7 @@ private static void AssertCompiles(string source) .BeEmpty(because: "the scaffold must compile:\n" + string.Join("\n", errors)); } - // Referenced so the Trax.Effect.StateMachine.Persistence assembly is copied to the test output for the + // Referenced so the Trax.StateMachine.Persistence assembly is copied to the test output for the // compile references above. private static readonly Type _keepPersistenceReferenced = typeof(IMachine); } diff --git a/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/ScaffoldCompilationTests.cs b/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/ScaffoldCompilationTests.cs index 9d5cd5d59..e47f4985e 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/ScaffoldCompilationTests.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/ScaffoldCompilationTests.cs @@ -15,7 +15,7 @@ namespace Trax.Cli.Tests.UnitTests; /// with. /// /// Those are not the Trax a new scaffold floats to. The tests reference no Trax.Core -/// directly: it arrives transitively through the Trax.Effect.StateMachine.Persistence pin +/// directly: it arrives transitively through the Trax.StateMachine.Persistence pin /// in Directory.Packages.props, which currently resolves Trax.Core 1.6.0, and 1.6.0 still /// has RunInternal and Activate. So in CI a template that goes back to the old shape /// still compiles here, and this only catches that regression once the pin moves to a Trax.Core diff --git a/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/SelectionTypesTests.cs b/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/SelectionTypesTests.cs index bcf5e1e7e..4c5feb94a 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/SelectionTypesTests.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests/UnitTests/SelectionTypesTests.cs @@ -1,7 +1,7 @@ using AwesomeAssertions; using Trax.Cli.Clients; using Trax.Cli.Tests.Fakes; -using Trax.Effect.StateMachine; +using Trax.StateMachine; namespace Trax.Cli.Tests.UnitTests; diff --git a/Trax.Cli/tests/Trax.Cli.Tests/packages.lock.json b/Trax.Cli/tests/Trax.Cli.Tests/packages.lock.json index 1ea896288..127de79ec 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests/packages.lock.json +++ b/Trax.Cli/tests/Trax.Cli.Tests/packages.lock.json @@ -233,7 +233,7 @@ "Microsoft.OpenApi.Readers": "[1.6.31, )", "Scriban": "[7.5.0, )", "System.CommandLine": "[2.0.12, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.core": { @@ -260,13 +260,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.statemachine": { "type": "Project", "dependencies": { "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { "Microsoft.EntityFrameworkCore": "[10.0.12, )", @@ -275,7 +275,7 @@ "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "GraphQL-Parser": { diff --git a/Trax.Docs/adr/0009-feature-tables-ship-in-the-core-provider-set.md b/Trax.Docs/adr/0009-feature-tables-ship-in-the-core-provider-set.md index de6d636d3..9affcef86 100644 --- a/Trax.Docs/adr/0009-feature-tables-ship-in-the-core-provider-set.md +++ b/Trax.Docs/adr/0009-feature-tables-ship-in-the-core-provider-set.md @@ -10,7 +10,7 @@ status: accepted A higher-level feature package does not carry its own migrations. Its table DDL goes into the core `Trax.Effect.Data.` migration set, alongside every other Trax table. `035_persisted_operations.sql`, `040_state_machine_snapshots.sql` and `047_runner_nonce.sql` are -all in the core Postgres provider, and `Trax.Effect.StateMachine.Persistence` has no `Migrations` folder at +all in the core Postgres provider, and `Trax.StateMachine.Persistence` has no `Migrations` folder at all. ## Status diff --git a/Trax.Docs/adr/0046-a-machine-state-invokes-a-train-and-only-that-entry-receives-its-outcome.md b/Trax.Docs/adr/0046-a-machine-state-invokes-a-train-and-only-that-entry-receives-its-outcome.md index 583602552..8c386e48d 100644 --- a/Trax.Docs/adr/0046-a-machine-state-invokes-a-train-and-only-that-entry-receives-its-outcome.md +++ b/Trax.Docs/adr/0046-a-machine-state-invokes-a-train-and-only-that-entry-receives-its-outcome.md @@ -44,7 +44,7 @@ an `OnCancelled(target)` that is required, so a cancel always has a declared edg **There is no `OnDecisionUnsure`.** A run ends in one `Either`, so "unsure" is not an outcome of its own. A train that can be unsure says so in its output, and a guarded `OnDone` routes it (`out is Unsure` to `NeedsReview`). -**The machine package does not depend on the mediator.** Effect.StateMachine declares an `IInvokedTrainLauncher` port +**The machine package does not depend on the mediator.** Trax.StateMachine declares an `IInvokedTrainLauncher` port and Mediator implements it. A host that declares `Invokes` without registering Mediator fails at startup. A new package above Scheduler was the other place it could live, and would have been one more package for a single port. @@ -73,7 +73,7 @@ at most one live run per entry. **A sweep guarantees delivery; the lifecycle hook is the fast path.** Lifecycle hooks run in the process that ran the train and swallow exceptions, and a run failed by the reaper publishes nothing from a train at all, so a hook alone -can lose an outcome. A reconciler, a hosted service in Effect.StateMachine.Persistence started on every host that +can lose an outcome. A reconciler, a hosted service in Trax.StateMachine.Persistence started on every host that registers machines (it needs their definitions), sweeps snapshots whose token names a finished run and applies the outcome. Several hosts sweeping at once is harmless, because the conditional update applies once. A cancelled run maps to `OnCancelled`; a reaped one reaches `OnFailed` through the sweep, and the reaper publishes its own terminal event @@ -207,7 +207,7 @@ checkpoint. Written first, red, before the code they cover. Each names the class and method it will have. -In `Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests`: +In `Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests`: - `InvokesDeclarationTests.An_invoking_state_without_OnCancelled_is_refused_at_build` - `InvokesDeclarationTests.A_guarded_OnDone_routes_an_unsure_output_to_its_own_target` - `InvokesDeclarationTests.Outcomes_export_as_their_own_trigger_kind_per_invoke_edge_with_the_output_schema` @@ -215,7 +215,7 @@ In `Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests`: - `MachineInstanceIdTests.Keys_a_b_c_split_differently_give_different_ids` - `DifferentialCorpusReplayTests.Outcome_triggers_apply_the_same_reduction_in_the_twin` -In `Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration`, on Postgres and Sqlite: +In `Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration`, on Postgres and Sqlite: - `InvokesStartupRefusalTests`, one test per refusal, each naming the offending junction, train or member: `A_plain_Junction_is_refused`, `An_IChain_over_a_non_effect_interface_is_refused`, `A_train_that_is_not_a_ServiceTrain_is_refused`, `A_recorder_refusal_is_refused`, diff --git a/Trax.Docs/adr/0048-a-machine-is-served-as-a-typed-api-and-the-server-applies-every-transition.md b/Trax.Docs/adr/0048-a-machine-is-served-as-a-typed-api-and-the-server-applies-every-transition.md index d77f24ddc..87ffcc1cf 100644 --- a/Trax.Docs/adr/0048-a-machine-is-served-as-a-typed-api-and-the-server-applies-every-transition.md +++ b/Trax.Docs/adr/0048-a-machine-is-served-as-a-typed-api-and-the-server-applies-every-transition.md @@ -385,12 +385,12 @@ In `Trax.Api.Tests.StateMachine.E2E`: - `MachinesRootSchemaTests`: `Machines_root_lists_each_exposed_machine_with_start_events_and_get`, `An_unexposed_declarative_machine_gets_no_field`, `An_event_without_WithInput_has_no_input_argument_and_no_json_scalar`, `Outcome_timer_and_effect_receipt_inputs_never_appear_as_client_arguments`, `Start_takes_its_declared_StartInput_never_the_context_type`, `A_misspelt_event_field_is_a_validation_error_not_a_runtime_problem` - `OperatorMachineFeedE2ETests`: `The_operator_subscription_is_gated_and_shows_state_revision_and_runs`, `A_users_draft_change_appears_to_an_operator_without_its_context`, `Each_host_runs_one_listener_shared_by_the_dashboard_and_GraphQL`, `After_a_listener_reconnect_the_operator_feed_sends_a_reload` -In `Trax.Effect.StateMachine.Persistence.Integration`, on Postgres and SQLite: +In `Trax.StateMachine.Persistence.Integration`, on Postgres and SQLite: - `EffectPendingTests`: `An_event_out_of_the_effects_state_while_it_is_pending_is_refused_effect_in_progress`, `A_reset_and_the_generic_save_are_refused_while_an_effect_is_pending`, `Discard_and_the_draft_sweep_leave_a_row_with_a_pending_effect`, `A_due_timer_waits_for_a_pending_effect_and_fires_after_it_fails`, `The_receipt_the_move_and_the_end_of_the_mark_are_one_write`, `A_failed_effect_leaves_the_row_as_it_was_and_takes_events_again`, `A_mark_past_its_lease_is_finished_by_the_next_send_under_the_same_key`, `A_mark_past_its_lease_is_finished_by_the_reconciler_under_the_same_key`, `A_host_without_the_effect_leaves_an_abandoned_mark_and_meters_it`, `A_completed_ledger_claim_from_before_the_upgrade_is_recorded_by_the_next_send`, `A_send_after_the_effect_was_recorded_and_the_draft_reset_runs_under_a_new_key` - `ServerRecordTests`: `A_row_a_gated_event_moved_is_kept_and_refuses_discard`, `A_row_a_client_event_moved_into_the_same_state_is_a_draft`, `A_client_event_out_of_a_kept_row_makes_it_a_draft_again`, `A_timer_carries_the_record_over`, `Kept_rows_do_not_count_toward_the_draft_cap`, `The_upgrade_marks_rows_in_kept_states_as_kept`, `A_host_upsert_out_of_a_kept_row_leaves_it_judged_by_its_state`, `A_host_update_out_of_a_kept_row_leaves_it_judged_by_its_state` - `MachineInterleavingModelTests`: `Seeded_interleavings_keep_every_invariant` (starts, events, sends, timers, discards, sweeps and a claimant that stops, in random order from a logged seed, with the invariants of *Effects and server records* checked after every step) -In `Trax.Effect.StateMachine.Tests`: +In `Trax.StateMachine.Tests`: - `EventWriteRuleTests`: `An_open_event_copying_a_field_an_effect_writes_refuses_to_build`, `An_open_event_copying_a_field_an_invoked_runs_outcome_writes_refuses_to_build` In `Trax.Api.Tests.Stress`: @@ -423,7 +423,7 @@ In `Trax.Dashboard.Tests.Integration`: In `Trax.Effect.Data.Testing.Tests`: - `TraxInvariantsTests`: `ARevisionBelowOne_IsReportedWithItsRow`, `AUserDraftWithAnEmptyOrBlankOwner_IsReportedWithItsRow`, `TwoRowsWithOneRowId_AreReported`, `ADueTimeInAStateWithNoTimer_IsReportedWithItsRow`, `ATimedStateWithNoDueTime_IsReportedWithItsRow`, `ADueTimeOfAMachineWithNoTimerLeft_IsReportedOnceTheHostsStop`, `AUserDraftOlderThanTheMaximumLifetime_IsReportedWithItsRow` -In `Trax.Effect.StateMachine.Persistence.Integration`: +In `Trax.StateMachine.Persistence.Integration`: - `ActorHierarchyTests`: `A_record_outside_Trax_cannot_derive_from_Actor`, `A_client_is_built_outside_Trax`, `Actor_offers_no_trusted_kind` - `AddStateMachinesBuilderTests`: `Without_the_opt_in_the_internal_trains_route_but_are_not_exposed`, `A_second_AddStateMachines_call_is_refused_rather_than_replacing_the_first`, `A_host_that_registers_no_machine_refuses_to_start`, `A_machine_the_host_registered_before_the_scan_finds_it_is_registered_once`, `The_same_machine_type_registered_twice_is_one_machine_to_the_registry` - `ClientDivergenceMeterTests`: `A_client_divergence_is_refused_and_metered` @@ -461,10 +461,10 @@ In `Trax.Effect.StateMachine.Persistence.Integration`: - `TimerFailureClassificationTests`: `A_fire_failure_is_the_databases_by_its_SQLSTATE_class`, `A_timeout_is_the_databases`, `Any_other_failure_is_the_rows` - `TriggerInputValidationPathTests`: `Every_path_validates_trigger_input_and_refuses_unknown_fields`, `Input_size_is_capped_before_validation_on_every_path`, `An_invalid_input_records_no_request_id_so_a_corrected_retry_fires`, `The_effect_runner_receipt_still_commits_on_an_effect_bound_trigger_with_WithInput` (a guard, green today) -In `Trax.Effect.StateMachine.Tests.Stress`: +In `Trax.StateMachine.Tests.Stress`: - `RevisionStoreModelTests`: `Every_incarnation_commits_revisions_one_to_n_and_replays_to_its_final_row` -In `Trax.Effect.StateMachine.Tests`: +In `Trax.StateMachine.Tests`: - `CheckoutConformanceTests`: `Advance_matches_the_shared_fixture`, which replays the bad-input fixtures with the rest - `ConformanceTests`: `Advance_matches_the_shared_fixture`, which replays the bad-input fixtures with the rest - `DifferentialCorpusReplayTests`: `Timer_triggers_replay_through_AdvanceTimer` @@ -542,7 +542,7 @@ themselves (an undeclared event, an unexposed raw-delegate machine, the opt-in w that breaks the rule from starting. Not covered: nothing can check that a host's own code forwards the right actor; a client is the only kind of actor -(`Trax.Effect.StateMachine.Persistence.Integration.ActorHierarchyTests`, in Trax.Effect), trusted host code reaches only system-owned instances through the named host API, and the +(`Trax.StateMachine.Persistence.Integration.ActorHierarchyTests`, in Trax.Effect), trusted host code reaches only system-owned instances through the named host API, and the census lists what that code can send, but a host that drives a system-owned instance on a client's behalf has chosen to trust it. The twin's prediction is checked against the server only where the differential corpus and `clientResult` reach. diff --git a/Trax.Docs/adr/0052-a-state-spawns-a-child-machine-as-it-invokes-a-train.md b/Trax.Docs/adr/0052-a-state-spawns-a-child-machine-as-it-invokes-a-train.md index 953a7f577..92c73bf05 100644 --- a/Trax.Docs/adr/0052-a-state-spawns-a-child-machine-as-it-invokes-a-train.md +++ b/Trax.Docs/adr/0052-a-state-spawns-a-child-machine-as-it-invokes-a-train.md @@ -68,11 +68,11 @@ draft; once the parent has moved on it is an ordinary instance. ## Exemplars -**Enforced elsewhere:** `SpawnedChildTests` in `Trax.Effect.StateMachine.Persistence.Integration` drives the flow on +**Enforced elsewhere:** `SpawnedChildTests` in `Trax.StateMachine.Persistence.Integration` drives the flow on Postgres and SQLite (the child is created for the parent's owner, its end and its failure move the parent, leaving removes it and what it waits on, the sweep delivers an end its write did not and a child that disappeared, and a waiting parent's child cannot be discarded, saved or answered for by a forged outcome); `SpawnsStartupValidatorTests` -in the same project pins the startup refusals; `SpawnDeclarationTests` in `Trax.Effect.StateMachine.Tests` pins the +in the same project pins the startup refusals; `SpawnDeclarationTests` in `Trax.StateMachine.Tests` pins the builder and the IR export. - [Spawn a child machine from a state](/docs/statemachine/spawning-child-machines) is the rule as published. diff --git a/Trax.Docs/book/a-generated-client/the-hub-serves-the-storefront.md b/Trax.Docs/book/a-generated-client/the-hub-serves-the-storefront.md index 4d9d2ae7a..e5863ae23 100644 --- a/Trax.Docs/book/a-generated-client/the-hub-serves-the-storefront.md +++ b/Trax.Docs/book/a-generated-client/the-hub-serves-the-storefront.md @@ -41,7 +41,7 @@ using Trax.Effect.JunctionProvider.Logging.Extensions; using Trax.Effect.JunctionProvider.Progress.Extensions; using Trax.Effect.Models.Manifest; using Trax.Effect.Provider.Parameter.Extensions; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; using Trax.Mediator.Extensions; using Trax.Scheduler.Extensions; using Trax.Scheduler.Services.JobSubmitter; diff --git a/Trax.Docs/book/checkout-is-a-state-machine/packages.md b/Trax.Docs/book/checkout-is-a-state-machine/packages.md index c7b7fb478..49a88808d 100644 --- a/Trax.Docs/book/checkout-is-a-state-machine/packages.md +++ b/Trax.Docs/book/checkout-is-a-state-machine/packages.md @@ -12,7 +12,7 @@ follows: book/checkout-is-a-state-machine/where-it-lives # 12.3 Packages -The library takes `Trax.Effect.StateMachine.Persistence`, which holds machines and stores their +The library takes `Trax.StateMachine.Persistence`, which holds machines and stores their instances. The hub serves them, which needs persisted operations, and reports a run's progress while a machine waits on it. The tests check the machine against its exported definition. @@ -38,8 +38,8 @@ while a machine waits on it. The tests check the machine against its exported de - - + + @@ -93,7 +93,7 @@ while a machine waits on it. The tests check the machine against its exported de - + @@ -163,7 +163,7 @@ while a machine waits on it. The tests check the machine against its exported de - + diff --git a/Trax.Docs/book/checkout-is-a-state-machine/serve-it.md b/Trax.Docs/book/checkout-is-a-state-machine/serve-it.md index 5ab070077..419b1d65a 100644 --- a/Trax.Docs/book/checkout-is-a-state-machine/serve-it.md +++ b/Trax.Docs/book/checkout-is-a-state-machine/serve-it.md @@ -29,7 +29,7 @@ says how, in one class. ```csharp compile=app file=Shopfront.Hub/Auth/TraxCallerSnapshotPrincipal.cs using Trax.Api.Auth; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Shopfront.Auth; @@ -65,7 +65,7 @@ using Trax.Effect.JunctionProvider.Logging.Extensions; using Trax.Effect.JunctionProvider.Progress.Extensions; using Trax.Effect.Models.Manifest; using Trax.Effect.Provider.Parameter.Extensions; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; using Trax.Mediator.Extensions; using Trax.Scheduler.Extensions; using Trax.Scheduler.Services.JobSubmitter; diff --git a/Trax.Docs/book/checkout-is-a-state-machine/test-it.md b/Trax.Docs/book/checkout-is-a-state-machine/test-it.md index d3a972786..5603bca38 100644 --- a/Trax.Docs/book/checkout-is-a-state-machine/test-it.md +++ b/Trax.Docs/book/checkout-is-a-state-machine/test-it.md @@ -19,7 +19,7 @@ a customer would. ```csharp compile=tests file=tests/Shopfront.Tests/UnitTests/CheckoutMachineTests.cs using Shopfront.Machines.Checkout; -using Trax.Effect.StateMachine.Testing; +using Trax.StateMachine.Testing; namespace Shopfront.Tests.UnitTests; diff --git a/Trax.Docs/book/checkout-is-a-state-machine/the-machine.md b/Trax.Docs/book/checkout-is-a-state-machine/the-machine.md index f62798eba..148987bb1 100644 --- a/Trax.Docs/book/checkout-is-a-state-machine/the-machine.md +++ b/Trax.Docs/book/checkout-is-a-state-machine/the-machine.md @@ -19,9 +19,9 @@ using System.Text.Json.Nodes; using Shopfront.Auth; using Shopfront.Machines.Checkout.Models; using Trax.Effect.Attributes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; namespace Shopfront.Machines.Checkout; diff --git a/Trax.Docs/book/deploy/migrate-the-shops-schema.md b/Trax.Docs/book/deploy/migrate-the-shops-schema.md index 48d8660b6..148484d4a 100644 --- a/Trax.Docs/book/deploy/migrate-the-shops-schema.md +++ b/Trax.Docs/book/deploy/migrate-the-shops-schema.md @@ -49,8 +49,8 @@ dotnet tool install dotnet-ef --version 10.0.12 - - + + @@ -111,7 +111,7 @@ keeps it out of everything that references the library: only the tools use it. - + diff --git a/Trax.Docs/book/deploy/the-hub.md b/Trax.Docs/book/deploy/the-hub.md index 9da3aa513..5ca55a887 100644 --- a/Trax.Docs/book/deploy/the-hub.md +++ b/Trax.Docs/book/deploy/the-hub.md @@ -40,7 +40,7 @@ using Trax.Effect.JunctionProvider.Logging.Extensions; using Trax.Effect.JunctionProvider.Progress.Extensions; using Trax.Effect.Models.Manifest; using Trax.Effect.Provider.Parameter.Extensions; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; using Trax.Mediator.Extensions; using Trax.Scheduler.Extensions; using Trax.Scheduler.Services.JobSubmitter; diff --git a/Trax.Docs/book/require-persisted-operations/make-the-hub-refuse.md b/Trax.Docs/book/require-persisted-operations/make-the-hub-refuse.md index fda792cd8..083f2fa81 100644 --- a/Trax.Docs/book/require-persisted-operations/make-the-hub-refuse.md +++ b/Trax.Docs/book/require-persisted-operations/make-the-hub-refuse.md @@ -38,7 +38,7 @@ using Trax.Effect.JunctionProvider.Logging.Extensions; using Trax.Effect.JunctionProvider.Progress.Extensions; using Trax.Effect.Models.Manifest; using Trax.Effect.Provider.Parameter.Extensions; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; using Trax.Mediator.Extensions; using Trax.Scheduler.Extensions; using Trax.Scheduler.Services.JobSubmitter; diff --git a/Trax.Docs/book/require-persisted-operations/test-it.md b/Trax.Docs/book/require-persisted-operations/test-it.md index 7e6d9f15d..86d670bfc 100644 --- a/Trax.Docs/book/require-persisted-operations/test-it.md +++ b/Trax.Docs/book/require-persisted-operations/test-it.md @@ -74,7 +74,7 @@ test project copies it beside the tests. - + @@ -90,7 +90,7 @@ using System.Text.Json; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc.Testing; using Shopfront.Auth; -using Trax.Effect.StateMachine; +using Trax.StateMachine; namespace Shopfront.Tests.IntegrationTests; diff --git a/Trax.Docs/book/the-machine-places-the-order/the-checkout-invokes-and-spawns.md b/Trax.Docs/book/the-machine-places-the-order/the-checkout-invokes-and-spawns.md index f4ab8dec1..bcc0e5dcf 100644 --- a/Trax.Docs/book/the-machine-places-the-order/the-checkout-invokes-and-spawns.md +++ b/Trax.Docs/book/the-machine-places-the-order/the-checkout-invokes-and-spawns.md @@ -97,9 +97,9 @@ using Shopfront.Machines.Parcel.Models; using Shopfront.Trains.PlaceOrder; using Shopfront.Trains.PlaceOrder.Models; using Trax.Effect.Attributes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; namespace Shopfront.Machines.Checkout; diff --git a/Trax.Docs/book/the-machine-places-the-order/the-parcel.md b/Trax.Docs/book/the-machine-places-the-order/the-parcel.md index fb2af3be8..2d11306fe 100644 --- a/Trax.Docs/book/the-machine-places-the-order/the-parcel.md +++ b/Trax.Docs/book/the-machine-places-the-order/the-parcel.md @@ -75,8 +75,8 @@ public sealed record ParcelResult; ```csharp compile=app file=Shopfront.Core/Machines/Parcel/ParcelMachine.cs using System.Text.Json.Nodes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Shopfront.Machines.Parcel; diff --git a/Trax.Docs/book/the-machine-places-the-order/what-an-invoked-run-is.md b/Trax.Docs/book/the-machine-places-the-order/what-an-invoked-run-is.md index 825bdef19..b0c81d321 100644 --- a/Trax.Docs/book/the-machine-places-the-order/what-an-invoked-run-is.md +++ b/Trax.Docs/book/the-machine-places-the-order/what-an-invoked-run-is.md @@ -92,7 +92,7 @@ A small helper finds it, or nothing. `Shopfront.Core/Machines/InvokedRuns.cs`: ```csharp compile=app file=Shopfront.Core/Machines/InvokedRuns.cs -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Shopfront.Machines; diff --git a/Trax.Docs/effect/data-model.md b/Trax.Docs/effect/data-model.md index 73204630d..35573fc9d 100644 --- a/Trax.Docs/effect/data-model.md +++ b/Trax.Docs/effect/data-model.md @@ -31,7 +31,7 @@ The Postgres and Sqlite data providers create these tables in the `trax` schema | `checkpoint` | `Checkpoint` | One row per run and declared node a run can [resume](/docs/sdk-reference/train-methods/checkpoint) from | | `effect_claim` | `EffectClaim` | An idempotency claim for an exactly-once side effect, with a lease and fence token | | `runner_nonce` | `RunnerNonce` | Nonces a runner accepted on signed requests, so instances sharing the database accept a request once | -| `snapshot_draft` | `SnapshotDraft` | State machine instance drafts, used by `Trax.Effect.StateMachine.Persistence` | +| `snapshot_draft` | `SnapshotDraft` | State machine instance drafts, used by `Trax.StateMachine.Persistence` | | `snapshot_transition` | `SnapshotTransition` | Each state-machine instance's history, one row per snapshot write, deleted with the instance | | `persisted_operation` | `PersistedOperation` | Stored GraphQL operations served by id | | `persisted_operation_history` | `PersistedOperationHistory` | One row per change to a persisted operation | diff --git a/Trax.Docs/migration-guides/turn-off-snapshot-change-notices.md b/Trax.Docs/migration-guides/turn-off-snapshot-change-notices.md index f936a73ff..03ec1747f 100644 --- a/Trax.Docs/migration-guides/turn-off-snapshot-change-notices.md +++ b/Trax.Docs/migration-guides/turn-off-snapshot-change-notices.md @@ -6,7 +6,7 @@ area: data nav_order: 12 source: - Trax.Effect/src/Trax.Effect.Data.Postgres/Migrations/080_snapshot_draft_change_notify_switch.sql - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/ChangeFeedStartupValidator.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/ChangeFeedStartupValidator.cs --- # Turn off state-machine change notices @@ -28,7 +28,7 @@ serves state machines from this database: ```csharp compile using Trax.Effect.Data.Postgres.Extensions; using Trax.Effect.Extensions; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; using Trax.Mediator.Extensions; services.AddTrax(trax => diff --git a/Trax.Docs/reference/acknowledgments.md b/Trax.Docs/reference/acknowledgments.md index c80b4c32c..7fb6b1027 100644 --- a/Trax.Docs/reference/acknowledgments.md +++ b/Trax.Docs/reference/acknowledgments.md @@ -16,7 +16,7 @@ packages and the .NET shared framework: `Trax.Api`, `Trax.Api.Auth`, `Trax.Api.A `Trax.Api.GraphQL.Audit`, `Trax.Api.GraphQL.Client.Typed`, `Trax.Effect.Broadcaster.SignalR`, `Trax.Effect.Decisions.SystemOne`, `Trax.Effect.JunctionProvider.Logging`, `Trax.Effect.JunctionProvider.Progress`, `Trax.Effect.Provider.Parameter`, -`Trax.Effect.StateMachine`, `Trax.Effect.StateMachine.Testing` and `Trax.Samples.Templates`. +`Trax.StateMachine`, `Trax.StateMachine.Testing` and `Trax.Samples.Templates`. ## Trax.Core @@ -98,7 +98,7 @@ packages and the .NET shared framework: `Trax.Api`, `Trax.Api.Auth`, `Trax.Api.A |---|---|---| | [RabbitMQ.Client](https://github.com/rabbitmq/rabbitmq-dotnet-client) | Apache 2.0 or MPL 2.0 | RabbitMQ client for cross-process lifecycle events | -## Trax.Effect.StateMachine.Persistence +## Trax.StateMachine.Persistence | Package | Licence | Used for | |---|---|---| diff --git a/Trax.Docs/reference/cli.md b/Trax.Docs/reference/cli.md index ba5a1f034..a24b6cb35 100644 --- a/Trax.Docs/reference/cli.md +++ b/Trax.Docs/reference/cli.md @@ -344,7 +344,7 @@ trax machine check --assembly ./bin/MyApp.dll \ Scaffolds one declarative C# file, `Machine.cs`: the state and trigger enums, a context record, a guarded transition, and the differential wiring, ready for `trax machine generate`. The machine derives from -`Machine` in `Trax.Effect.StateMachine.Persistence`, so the project holding the file needs +`Machine` in `Trax.StateMachine.Persistence`, so the project holding the file needs that package, at the version the CLI prints (the one it is built against). `generate` then reads the built assembly, not the source. diff --git a/Trax.Docs/reference/glossary.md b/Trax.Docs/reference/glossary.md index 668731cee..238056db9 100644 --- a/Trax.Docs/reference/glossary.md +++ b/Trax.Docs/reference/glossary.md @@ -208,4 +208,4 @@ An EF entity marked `[TraxQueryModel]` (in `Trax.Effect.Attributes`), which `Add *Roughly:* a long-lived record that moves between named states. -A machine deriving `Machine` in `Trax.Effect.StateMachine.Persistence`: states, triggers and a context record, stored as a language-neutral snapshot that the C# engine and its TypeScript twin both read. See [State Machines](/docs/statemachine). +A machine deriving `Machine` in `Trax.StateMachine.Persistence`: states, triggers and a context record, stored as a language-neutral snapshot that the C# engine and its TypeScript twin both read. See [State Machines](/docs/statemachine). diff --git a/Trax.Docs/reference/packages.md b/Trax.Docs/reference/packages.md index ad374a64d..4468c4341 100644 --- a/Trax.Docs/reference/packages.md +++ b/Trax.Docs/reference/packages.md @@ -87,9 +87,9 @@ dotnet add package Trax.Api.Dashboard | [Trax.Effect.Provider.Parameter](https://www.nuget.org/packages/Trax.Effect.Provider.Parameter) | `SaveTrainParameters()`: serializes each train's input and output into its Metadata row, masking members marked `[TraxSensitive]`. See [Parameter Effect](/docs/effect/effect-providers/parameter-effect). | `Trax.Effect.Provider.Parameter.Extensions` | `Trax.Effect` and a data provider. | | [Trax.Effect.Broadcaster.RabbitMQ](https://www.nuget.org/packages/Trax.Effect.Broadcaster.RabbitMQ) | `UseRabbitMq(connectionString)` on the `UseBroadcaster` builder, so lifecycle events raised in one process reach handlers in every other. See [Broadcaster Sinks](/docs/effect/broadcaster-sinks). | `Trax.Effect.Broadcaster.RabbitMQ.Extensions` | `Trax.Effect`. | | [Trax.Effect.Broadcaster.SignalR](https://www.nuget.org/packages/Trax.Effect.Broadcaster.SignalR) | `UseSignalRHub()` on the `UseBroadcaster` builder and `MapTraxTrainEventHub()` for the endpoint, so browser and Blazor clients see train events as they happen. See [UseSignalRHub](/docs/sdk-reference/configuration/use-signalr-hub). | `Trax.Effect.Broadcaster.SignalR.Extensions` | `Trax.Effect`. | -| [Trax.Effect.StateMachine](https://www.nuget.org/packages/Trax.Effect.StateMachine) | The snapshot state-machine engine: state as language-neutral JSON that a C# backend and a TypeScript client agree on, authored through `IMachineBuilder`. No dependencies. See [State Machines](/docs/statemachine). | `Trax.Effect.StateMachine` | Usually `Trax.Effect.StateMachine.Persistence`. | -| [Trax.Effect.StateMachine.Persistence](https://www.nuget.org/packages/Trax.Effect.StateMachine.Persistence) | `Machine`, the user-scoped snapshot store, the draft service, the exactly-once effect primitive, `AddStateMachines` and `AddTraxStateMachineSelfCheck`. See [AddStateMachines](/docs/sdk-reference/statemachine-api/add-state-machines). | `Trax.Effect.StateMachine.Persistence` | `Trax.Effect` and a data provider; `AddStateMachines` refuses to register without one. | -| [Trax.Effect.StateMachine.Testing](https://www.nuget.org/packages/Trax.Effect.StateMachine.Testing) | Replays the differential corpus produced by the TypeScript engine through the C# engine and returns the cases it fails to reproduce, proving the two engines agree. See [Codegen Pipeline](/docs/statemachine/codegen-pipeline). | `Trax.Effect.StateMachine.Testing` | A test project, and the corpus `trax machine generate` writes. | +| [Trax.StateMachine](https://www.nuget.org/packages/Trax.StateMachine) | The snapshot state-machine engine: state as language-neutral JSON that a C# backend and a TypeScript client agree on, authored through `IMachineBuilder`. No dependencies. See [State Machines](/docs/statemachine). | `Trax.StateMachine` | Usually `Trax.StateMachine.Persistence`. | +| [Trax.StateMachine.Persistence](https://www.nuget.org/packages/Trax.StateMachine.Persistence) | `Machine`, the user-scoped snapshot store, the draft service, the exactly-once effect primitive, `AddStateMachines` and `AddTraxStateMachineSelfCheck`. See [AddStateMachines](/docs/sdk-reference/statemachine-api/add-state-machines). | `Trax.StateMachine.Persistence` | `Trax.Effect` and a data provider; `AddStateMachines` refuses to register without one. | +| [Trax.StateMachine.Testing](https://www.nuget.org/packages/Trax.StateMachine.Testing) | Replays the differential corpus produced by the TypeScript engine through the C# engine and returns the cases it fails to reproduce, proving the two engines agree. See [Codegen Pipeline](/docs/statemachine/codegen-pipeline). | `Trax.StateMachine.Testing` | A test project, and the corpus `trax machine generate` writes. | ## Trax.Mediator diff --git a/Trax.Docs/sdk-reference/statemachine-api.md b/Trax.Docs/sdk-reference/statemachine-api.md index f67ab0424..14fb0085d 100644 --- a/Trax.Docs/sdk-reference/statemachine-api.md +++ b/Trax.Docs/sdk-reference/statemachine-api.md @@ -15,7 +15,7 @@ Reference for authoring and hosting portable snapshot state machines. The concep [State machines](/docs/statemachine); the walkthroughs are [Authoring a machine](/docs/statemachine/authoring) and [Declarative authoring](/docs/statemachine/declarative-authoring). -## Trax.Effect.StateMachine +## Trax.StateMachine - [Rules](/docs/sdk-reference/statemachine-api/rules): the string-free vocabulary for declarative guards and reducers. - [Declarative data model](/docs/sdk-reference/statemachine-api/declarative-data-model): `Rule`, `Reduction`, `ContextSchema`, `DeclarativeModel` and the engine definition. @@ -23,7 +23,7 @@ Reference for authoring and hosting portable snapshot state machines. The concep - [Migrations](/docs/sdk-reference/statemachine-api/migrations): `MigrateFrom` and forward-migrating stored drafts. - [Result codes](/docs/sdk-reference/statemachine-api/result-codes): the typed outcomes of advance, rehydrate and the draft operations. -## Trax.Effect.StateMachine.Persistence +## Trax.StateMachine.Persistence - [AddStateMachines](/docs/sdk-reference/statemachine-api/add-state-machines): discovering machines and wiring the subsystem in one call. - [Machine](/docs/sdk-reference/statemachine-api/machine): `Machine` and its builders. @@ -34,7 +34,7 @@ Reference for authoring and hosting portable snapshot state machines. The concep - [Runtime integrity](/docs/sdk-reference/statemachine-api/runtime-integrity): the schema-hash handshake, divergence detection and the self-check. - [AddTraxStateMachineSelfCheck](/docs/sdk-reference/statemachine-api/add-trax-state-machine-self-check): the self-check as an ASP.NET Core health check. -## Trax.Effect.StateMachine.Testing +## Trax.StateMachine.Testing - [MachineConformance](/docs/sdk-reference/statemachine-api/machine-conformance): checking a machine against its committed IR and corpus in a test. diff --git a/Trax.Docs/sdk-reference/statemachine-api/add-state-machines.md b/Trax.Docs/sdk-reference/statemachine-api/add-state-machines.md index 25e35b962..25a64419d 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/add-state-machines.md +++ b/Trax.Docs/sdk-reference/statemachine-api/add-state-machines.md @@ -6,13 +6,13 @@ area: machines parent: State Machine API grand_parent: SDK Reference nav_order: 1 -package: Trax.Effect.StateMachine.Persistence -namespace: Trax.Effect.StateMachine.Persistence +package: Trax.StateMachine.Persistence +namespace: Trax.StateMachine.Persistence source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachinesBuilderExtensions.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineOptions.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineCensus.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineInstruments.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/StateMachinesBuilderExtensions.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/StateMachineOptions.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineCensus.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/StateMachineInstruments.cs redirect_from: - /docs/sdk-reference/statemachine-api/add-trax-state-machines --- @@ -29,7 +29,7 @@ contributes to the mediator scan so Trax routes them by input type. The stores r ## Signatures ```csharp fragment -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; public static class StateMachinesBuilderExtensions { diff --git a/Trax.Docs/sdk-reference/statemachine-api/add-trax-state-machine-self-check.md b/Trax.Docs/sdk-reference/statemachine-api/add-trax-state-machine-self-check.md index 7acc77239..6644b5571 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/add-trax-state-machine-self-check.md +++ b/Trax.Docs/sdk-reference/statemachine-api/add-trax-state-machine-self-check.md @@ -6,11 +6,11 @@ area: machines parent: State Machine API grand_parent: SDK Reference nav_order: 12 -package: Trax.Effect.StateMachine.Persistence -namespace: Trax.Effect.StateMachine.Persistence +package: Trax.StateMachine.Persistence +namespace: Trax.StateMachine.Persistence source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineSelfCheckHealthCheck.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotSelfCheck.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/StateMachineSelfCheckHealthCheck.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotSelfCheck.cs --- # AddTraxStateMachineSelfCheck @@ -22,7 +22,7 @@ with every diff when a machine no longer reproduces it. ## Signature ```csharp fragment -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; public static class StateMachineHealthCheckExtensions { diff --git a/Trax.Docs/sdk-reference/statemachine-api/client-manifest.md b/Trax.Docs/sdk-reference/statemachine-api/client-manifest.md index f0d25a2d1..ef749d7a4 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/client-manifest.md +++ b/Trax.Docs/sdk-reference/statemachine-api/client-manifest.md @@ -6,10 +6,10 @@ area: machines parent: State Machine API grand_parent: SDK Reference nav_order: 16 -package: Trax.Effect.StateMachine -namespace: Trax.Effect.StateMachine +package: Trax.StateMachine +namespace: Trax.StateMachine source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/ClientManifest.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/ClientManifest.cs - Trax.Effect/src/Trax.Effect/Configuration/ClientExport/TraxClientExport.cs - Trax.Effect/src/Trax.Effect/Configuration/ClientExport/ITraxStartupCheck.cs - Trax.Api/src/Trax.Api.GraphQL.PersistedOperations/Extensions/TraxClientManifestExtensions.cs @@ -24,7 +24,7 @@ a frontend's build needs no running server, no database and no credential, and T ## Members -Three namespaces: `ClientManifest` and its records are in `Trax.Effect.StateMachine`; `TraxClientExport` and +Three namespaces: `ClientManifest` and its records are in `Trax.StateMachine`; `TraxClientExport` and `ITraxStartupCheck` in `Trax.Effect.Configuration.ClientExport`; `RunTraxAsync` in `Trax.Api.GraphQL.PersistedOperations.Extensions`. diff --git a/Trax.Docs/sdk-reference/statemachine-api/declarative-data-model.md b/Trax.Docs/sdk-reference/statemachine-api/declarative-data-model.md index 189501bbf..ee1af6212 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/declarative-data-model.md +++ b/Trax.Docs/sdk-reference/statemachine-api/declarative-data-model.md @@ -6,18 +6,18 @@ area: machines parent: State Machine API grand_parent: SDK Reference nav_order: 4 -package: Trax.Effect.StateMachine -namespace: Trax.Effect.StateMachine +package: Trax.StateMachine +namespace: Trax.StateMachine source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/Rule.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/Reduction.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ContextSchema.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/DeclarativeModel.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/RuleEvaluator.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ReductionEvaluator.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/MachineDefinition.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Fluent.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/StorableJson.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/Rule.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/Reduction.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/ContextSchema.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/DeclarativeModel.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/RuleEvaluator.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/ReductionEvaluator.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/MachineDefinition.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Fluent.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/StorableJson.cs --- # Declarative data model diff --git a/Trax.Docs/sdk-reference/statemachine-api/i-snapshot-effect.md b/Trax.Docs/sdk-reference/statemachine-api/i-snapshot-effect.md index 79d2df69e..4f061a8be 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/i-snapshot-effect.md +++ b/Trax.Docs/sdk-reference/statemachine-api/i-snapshot-effect.md @@ -6,11 +6,11 @@ area: machines parent: State Machine API grand_parent: SDK Reference nav_order: 7 -package: Trax.Effect.StateMachine.Persistence -namespace: Trax.Effect.StateMachine.Persistence +package: Trax.StateMachine.Persistence +namespace: Trax.StateMachine.Persistence source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Ports.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotEffectRunner.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Ports.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotEffectRunner.cs redirect_from: - /docs/sdk-reference/statemachine-api/effects --- @@ -24,7 +24,7 @@ its receipt in the snapshot, and does not run it again, a crash and retry includ ## Signature ```csharp fragment -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; public interface ISnapshotEffect { diff --git a/Trax.Docs/sdk-reference/statemachine-api/invoked-run.md b/Trax.Docs/sdk-reference/statemachine-api/invoked-run.md index ca68f44fb..fe520ffc4 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/invoked-run.md +++ b/Trax.Docs/sdk-reference/statemachine-api/invoked-run.md @@ -6,10 +6,10 @@ area: machines parent: State Machine API grand_parent: SDK Reference nav_order: 11 -package: Trax.Effect.StateMachine.Persistence -namespace: Trax.Effect.StateMachine.Persistence +package: Trax.StateMachine.Persistence +namespace: Trax.StateMachine.Persistence source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedRun.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokedRun.cs --- # InvokedRun @@ -19,7 +19,7 @@ The machine instance whose invoking state queued the run going on, and who owns ## Signature ```csharp fragment -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; public sealed record InvokedRun( string Machine, @@ -50,7 +50,7 @@ public sealed record InvokedRun( ```csharp compile using Trax.Core.Exceptions; using Trax.Effect.Services.EffectJunction; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; public record PlayCard(Guid GameId, int Slot); diff --git a/Trax.Docs/sdk-reference/statemachine-api/ir-format.md b/Trax.Docs/sdk-reference/statemachine-api/ir-format.md index 3e9eae209..2de83621b 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/ir-format.md +++ b/Trax.Docs/sdk-reference/statemachine-api/ir-format.md @@ -6,12 +6,12 @@ area: machines parent: State Machine API grand_parent: SDK Reference nav_order: 5 -package: Trax.Effect.StateMachine -namespace: Trax.Effect.StateMachine +package: Trax.StateMachine +namespace: Trax.StateMachine source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/IrExporter.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/SchemaReflection.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ValueFormats.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/IrExporter.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/SchemaReflection.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/ValueFormats.cs --- # IR format @@ -25,7 +25,7 @@ transition's guard and reducer as data. The per-language generators read it. The ## Signature ```csharp fragment -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; public static class IrExporter { diff --git a/Trax.Docs/sdk-reference/statemachine-api/machine-conformance.md b/Trax.Docs/sdk-reference/statemachine-api/machine-conformance.md index d0b290ba9..e1a5aec63 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/machine-conformance.md +++ b/Trax.Docs/sdk-reference/statemachine-api/machine-conformance.md @@ -6,12 +6,12 @@ area: machines parent: State Machine API grand_parent: SDK Reference nav_order: 15 -package: Trax.Effect.StateMachine.Testing -namespace: Trax.Effect.StateMachine.Testing +package: Trax.StateMachine.Testing +namespace: Trax.StateMachine.Testing source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/MachineConformance.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/DifferentialCorpus.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CorpusReplay.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Testing/MachineConformance.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Testing/DifferentialCorpus.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/CorpusReplay.cs --- # MachineConformance @@ -23,7 +23,7 @@ test framework. ## Signature ```csharp fragment -namespace Trax.Effect.StateMachine.Testing; +namespace Trax.StateMachine.Testing; public static class MachineConformance { @@ -57,13 +57,13 @@ public static class DifferentialCorpus - The comparisons ignore a trailing newline: committed files carry one, the in-memory forms do not. - `Replay` compares reason codes and canonical wire, never rejection detail. `CorpusReplay.Replay` in - `Trax.Effect.StateMachine` is the same replay, shipped in the engine so a host can run it at startup; + `Trax.StateMachine` is the same replay, shipped in the engine so a host can run it at startup; `IMachine.SelfCheck()` calls it. ## Example ```csharp compile -using Trax.Effect.StateMachine.Testing; +using Trax.StateMachine.Testing; var problems = MachineConformance.Check( new CheckoutMachine(), diff --git a/Trax.Docs/sdk-reference/statemachine-api/machine-instances.md b/Trax.Docs/sdk-reference/statemachine-api/machine-instances.md index a3aa9e0c3..71917985a 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/machine-instances.md +++ b/Trax.Docs/sdk-reference/statemachine-api/machine-instances.md @@ -6,10 +6,10 @@ area: machines parent: State Machine API grand_parent: SDK Reference nav_order: 13 -package: Trax.Effect.StateMachine.Persistence -namespace: Trax.Effect.StateMachine.Persistence +package: Trax.StateMachine.Persistence +namespace: Trax.StateMachine.Persistence source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineInstances.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineInstances.cs --- # IMachineInstances @@ -22,7 +22,7 @@ scoped. ## Signature ```csharp fragment -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; public interface IMachineInstances { diff --git a/Trax.Docs/sdk-reference/statemachine-api/machine.md b/Trax.Docs/sdk-reference/statemachine-api/machine.md index bd2fc9a20..74b1372b9 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/machine.md +++ b/Trax.Docs/sdk-reference/statemachine-api/machine.md @@ -6,14 +6,14 @@ area: machines parent: State Machine API grand_parent: SDK Reference nav_order: 2 -package: Trax.Effect.StateMachine.Persistence -namespace: Trax.Effect.StateMachine.Persistence +package: Trax.StateMachine.Persistence +namespace: Trax.StateMachine.Persistence source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Machine.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Fluent.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Invokes.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Timers.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/MachineTrigger.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Machine.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Fluent.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Invokes.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Timers.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/MachineTrigger.cs redirect_from: - /docs/sdk-reference/statemachine-api/fluent-authoring --- @@ -22,13 +22,13 @@ redirect_from: A machine is a subclass of `Machine` that declares itself in `Configure`. `TState` and `TTrigger` are the host's own enums. The builder compiles to the same total engine (`SnapshotMachine`) the -conformance fixtures drive. `Machine` ships in `Trax.Effect.StateMachine.Persistence`; the builder -interfaces ship in `Trax.Effect.StateMachine`. +conformance fixtures drive. `Machine` ships in `Trax.StateMachine.Persistence`; the builder +interfaces ship in `Trax.StateMachine`. ## Signature ```csharp fragment -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; public abstract class Machine : IMachine where TState : struct, Enum diff --git a/Trax.Docs/sdk-reference/statemachine-api/migrations.md b/Trax.Docs/sdk-reference/statemachine-api/migrations.md index a2760883a..c328c7616 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/migrations.md +++ b/Trax.Docs/sdk-reference/statemachine-api/migrations.md @@ -6,12 +6,12 @@ area: machines parent: State Machine API grand_parent: SDK Reference nav_order: 6 -package: Trax.Effect.StateMachine -namespace: Trax.Effect.StateMachine +package: Trax.StateMachine +namespace: Trax.StateMachine source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Fluent.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/SnapshotMachine.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/MachineDefinition.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Fluent.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/SnapshotMachine.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/MachineDefinition.cs --- # Migrations diff --git a/Trax.Docs/sdk-reference/statemachine-api/persistence-ports.md b/Trax.Docs/sdk-reference/statemachine-api/persistence-ports.md index df0c14594..12529249f 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/persistence-ports.md +++ b/Trax.Docs/sdk-reference/statemachine-api/persistence-ports.md @@ -6,19 +6,19 @@ area: machines parent: State Machine API grand_parent: SDK Reference nav_order: 8 -package: Trax.Effect.StateMachine.Persistence -namespace: Trax.Effect.StateMachine.Persistence +package: Trax.StateMachine.Persistence +namespace: Trax.StateMachine.Persistence source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Ports.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotDraftService.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Actor.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/CallerAuthorization.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/EfSnapshotStore.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/EffectClaimStore.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/IdempotentEffect.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/RequestIdRing.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotLimits.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotMachineRegistry.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Ports.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotDraftService.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Actor.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/CallerAuthorization.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/EfSnapshotStore.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/EffectClaimStore.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/IdempotentEffect.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/RequestIdRing.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotLimits.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotMachineRegistry.cs --- # Persistence ports diff --git a/Trax.Docs/sdk-reference/statemachine-api/result-codes.md b/Trax.Docs/sdk-reference/statemachine-api/result-codes.md index 883f1c4b8..7984076d2 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/result-codes.md +++ b/Trax.Docs/sdk-reference/statemachine-api/result-codes.md @@ -6,11 +6,11 @@ area: machines parent: State Machine API grand_parent: SDK Reference nav_order: 9 -package: Trax.Effect.StateMachine -namespace: Trax.Effect.StateMachine +package: Trax.StateMachine +namespace: Trax.StateMachine source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/RefusalCode.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Results.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/RefusalCode.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Results.cs --- # Result codes diff --git a/Trax.Docs/sdk-reference/statemachine-api/rules.md b/Trax.Docs/sdk-reference/statemachine-api/rules.md index dad0a8f1f..d7eae144a 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/rules.md +++ b/Trax.Docs/sdk-reference/statemachine-api/rules.md @@ -6,11 +6,11 @@ area: machines parent: State Machine API grand_parent: SDK Reference nav_order: 3 -package: Trax.Effect.StateMachine -namespace: Trax.Effect.StateMachine +package: Trax.StateMachine +namespace: Trax.StateMachine source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/Rules.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/MemberPath.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/Rules.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/MemberPath.cs --- # Rules @@ -23,7 +23,7 @@ produces the `Rule`; the reduction factories produce a `Reduction`. ## Signature ```csharp fragment -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; public static class Rules { diff --git a/Trax.Docs/sdk-reference/statemachine-api/runtime-integrity.md b/Trax.Docs/sdk-reference/statemachine-api/runtime-integrity.md index 932f2445a..7e5e193b3 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/runtime-integrity.md +++ b/Trax.Docs/sdk-reference/statemachine-api/runtime-integrity.md @@ -6,12 +6,12 @@ area: machines parent: State Machine API grand_parent: SDK Reference nav_order: 10 -package: Trax.Effect.StateMachine.Persistence -namespace: Trax.Effect.StateMachine.Persistence +package: Trax.StateMachine.Persistence +namespace: Trax.StateMachine.Persistence source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotSelfCheck.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotMachineRegistry.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Machine.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotSelfCheck.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotMachineRegistry.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Machine.cs --- # Runtime integrity diff --git a/Trax.Docs/sdk-reference/statemachine-api/typescript-package.md b/Trax.Docs/sdk-reference/statemachine-api/typescript-package.md index a446ea398..593de7c20 100644 --- a/Trax.Docs/sdk-reference/statemachine-api/typescript-package.md +++ b/Trax.Docs/sdk-reference/statemachine-api/typescript-package.md @@ -17,7 +17,7 @@ source: # TypeScript package -`@traxsharp/state-machine` is the TypeScript twin of `Trax.Effect.StateMachine`, published from `Trax.StateMachine/ts`. +`@traxsharp/state-machine` is the TypeScript twin of `Trax.StateMachine`, published from `Trax.StateMachine/ts`. Its exports are pinned by a committed baseline (`src/exports.test.ts`). ```bash diff --git a/Trax.Docs/sdk-reference/testing.md b/Trax.Docs/sdk-reference/testing.md index 3a48f4e26..818495463 100644 --- a/Trax.Docs/sdk-reference/testing.md +++ b/Trax.Docs/sdk-reference/testing.md @@ -18,5 +18,5 @@ The test-support packages Trax ships for a consumer's own test projects. The arc | [Trax.Effect.Data.Testing](/docs/sdk-reference/testing/effect-data-testing) | Data-layer guards and fixture, the owner-scope census, and `TraxInvariants` | | [Trax.Mediator.Testing](/docs/sdk-reference/testing/mediator-testing) | The guard that every train has its own train interface | | [Trax.Api.GraphQL.Testing](/docs/sdk-reference/testing/graphql-testing) | Cross-schema GraphQL guards and fixture | -| [Trax.Effect.StateMachine.Testing](/docs/sdk-reference/testing/effect-statemachine-testing) | `MachineConformance` and `DifferentialCorpus` | +| [Trax.StateMachine.Testing](/docs/sdk-reference/testing/effect-statemachine-testing) | `MachineConformance` and `DifferentialCorpus` | | [Trax.Api.Auth.Jwt.Testing](/docs/sdk-reference/api-auth/test-jwks-server) | Signed test tokens for JWT-authenticated hosts | diff --git a/Trax.Docs/sdk-reference/testing/effect-statemachine-testing.md b/Trax.Docs/sdk-reference/testing/effect-statemachine-testing.md index 5dab8bed6..5682f5998 100644 --- a/Trax.Docs/sdk-reference/testing/effect-statemachine-testing.md +++ b/Trax.Docs/sdk-reference/testing/effect-statemachine-testing.md @@ -1,26 +1,26 @@ --- -title: Trax.Effect.StateMachine.Testing -description: "Reference for Trax.Effect.StateMachine.Testing: MachineConformance, which checks a machine against its committed IR and corpus, and DifferentialCorpus replay." +title: Trax.StateMachine.Testing +description: "Reference for Trax.StateMachine.Testing: MachineConformance, which checks a machine against its committed IR and corpus, and DifferentialCorpus replay." type: reference area: testing -package: Trax.Effect.StateMachine.Testing -namespace: Trax.Effect.StateMachine.Testing +package: Trax.StateMachine.Testing +namespace: Trax.StateMachine.Testing source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/MachineConformance.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/DifferentialCorpus.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Testing/MachineConformance.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Testing/DifferentialCorpus.cs parent: Testing grand_parent: SDK Reference nav_order: 5 --- -# Trax.Effect.StateMachine.Testing +# Trax.StateMachine.Testing Checks that keep a state machine, its committed artifacts and the TypeScript twin generated from them from drifting apart. Each returns a list of human-readable problems, empty when everything agrees, for any test framework to assert on. ## Signatures ```csharp fragment -namespace Trax.Effect.StateMachine.Testing; +namespace Trax.StateMachine.Testing; public static class MachineConformance { @@ -48,13 +48,13 @@ public static class DifferentialCorpus | `WriteIr(machine, irPath)` | Writes `machine.ExportIr()` to `irPath`, with a trailing newline | | `DifferentialCorpus.Replay(machine, goldenJson)` | Replays a corpus produced by the `@traxsharp/state-machine` oracle through the C# engine and returns one diff per case it does not reproduce. Only reason codes and canonical wire are compared, not rejection detail. | -`IMachine` is in `Trax.Effect.StateMachine.Persistence`; see [State Machine API](/docs/sdk-reference/statemachine-api). +`IMachine` is in `Trax.StateMachine.Persistence`; see [State Machine API](/docs/sdk-reference/statemachine-api). ## Example ```csharp compile -using Trax.Effect.StateMachine.Persistence; -using Trax.Effect.StateMachine.Testing; +using Trax.StateMachine.Persistence; +using Trax.StateMachine.Testing; public static class ConformanceCheck { diff --git a/Trax.Docs/statemachine.md b/Trax.Docs/statemachine.md index b3d398987..12b5076cf 100644 --- a/Trax.Docs/statemachine.md +++ b/Trax.Docs/statemachine.md @@ -5,13 +5,13 @@ type: explanation area: machines nav_order: 1 source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence + - Trax.StateMachine/dotnet/src/Trax.StateMachine + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence --- # State machines -Trax.Effect.StateMachine represents a multi-step flow (a wizard, an application form, a checkout) as a +Trax.StateMachine represents a multi-step flow (a wizard, an application form, a checkout) as a small, language-neutral snapshot, so a C# backend and a TypeScript client agree on where a user is in the flow and the data that goes with it. The whole runtime state of an instance is a serializable snapshot that can be stored in Postgres and rebuilt from any point, so a user can start on one device and finish on @@ -59,7 +59,7 @@ the declared name, so the value that is stored and served is canonical. ## Two runtimes, one behavior -The engine is implemented twice, once in C# (`Trax.Effect.StateMachine`) and once in TypeScript +The engine is implemented twice, once in C# (`Trax.StateMachine`) and once in TypeScript (`@traxsharp/state-machine`). They are kept identical not by generating one engine from the other but by a shared set of language-neutral conformance fixtures that both engines drive and must agree on. Only the result codes are contract; human-readable detail text is free to differ. [Result codes](/docs/sdk-reference/statemachine-api/result-codes) @@ -142,7 +142,7 @@ terminal step. The [TypeScript package](/docs/sdk-reference/statemachine-api/typ | Piece | Location | | --- | --- | -| C# engine (pure, total, dependency-free) | Trax.Effect.StateMachine | -| C# persistence, exactly-once effects, mutation trains | Trax.Effect.StateMachine.Persistence | +| C# engine (pure, total, dependency-free) | Trax.StateMachine | +| C# persistence, exactly-once effects, mutation trains | Trax.StateMachine.Persistence | | TypeScript engine, typed facade, React hook | the @traxsharp/state-machine package | | Shared machines (the exported IR, differential and migration goldens) and the frontend generators | the shared machines directory and the codegen tools | diff --git a/Trax.Docs/statemachine/authoring.md b/Trax.Docs/statemachine/authoring.md index e9b9bd7a9..c469d720e 100644 --- a/Trax.Docs/statemachine/authoring.md +++ b/Trax.Docs/statemachine/authoring.md @@ -5,8 +5,8 @@ type: how-to area: machines nav_order: 1 source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Fluent.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachinesBuilderExtensions.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Fluent.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/StateMachinesBuilderExtensions.cs --- # Author and serve a machine @@ -30,9 +30,9 @@ client can do: a rule on every event and on its `Start`, and an owner-only or st ```csharp compile=checkout using System.Text.Json.Nodes; using Trax.Effect.Attributes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; public enum CheckoutState { @@ -133,8 +133,8 @@ the effect's key, which is the same for every run of one send; pass it to the sy key. The effect gets the server's stored snapshot, never the client's, so price from what the server holds. ```csharp compile=checkout -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; public interface ICharge : ISnapshotEffect; @@ -161,7 +161,7 @@ Drafts are scoped by a user key, which the host supplies through `ISnapshotPrinc ```csharp compile=checkout using Trax.Api.Auth; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; public sealed class TraxCallerSnapshotPrincipal(TraxCaller caller) : ISnapshotPrincipal { @@ -185,7 +185,7 @@ using Trax.Api.GraphQL.Extensions; using Trax.Api.GraphQL.PersistedOperations.Extensions; using Trax.Effect.Data.Postgres.Extensions; using Trax.Effect.Extensions; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; using Trax.Mediator.Extensions; builder.Services.AddTrax(trax => @@ -240,7 +240,7 @@ default, and the opt-in requires an authorization policy: ```csharp compile using Trax.Effect.Data.Postgres.Extensions; using Trax.Effect.Extensions; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; using Trax.Mediator.Extensions; builder.Services.AddTrax(trax => diff --git a/Trax.Docs/statemachine/canonical-wire.md b/Trax.Docs/statemachine/canonical-wire.md index d0fb5fd22..b3ac991ca 100644 --- a/Trax.Docs/statemachine/canonical-wire.md +++ b/Trax.Docs/statemachine/canonical-wire.md @@ -5,8 +5,8 @@ type: reference area: machines nav_order: 20 source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CanonicalJson.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/StorableJson.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/CanonicalJson.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/StorableJson.cs --- # Canonical wire diff --git a/Trax.Docs/statemachine/codegen-pipeline.md b/Trax.Docs/statemachine/codegen-pipeline.md index dc81e3cf2..9f3c0962c 100644 --- a/Trax.Docs/statemachine/codegen-pipeline.md +++ b/Trax.Docs/statemachine/codegen-pipeline.md @@ -5,9 +5,9 @@ type: explanation area: machines nav_order: 2 source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/IrExporter.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CorpusReplay.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/IrExporter.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/CorpusReplay.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Testing --- # The codegen pipeline diff --git a/Trax.Docs/statemachine/context-schemas.md b/Trax.Docs/statemachine/context-schemas.md index afb411d13..07e115c2e 100644 --- a/Trax.Docs/statemachine/context-schemas.md +++ b/Trax.Docs/statemachine/context-schemas.md @@ -5,8 +5,8 @@ type: reference area: machines nav_order: 21 source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/SchemaReflection.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ContextSchema.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/SchemaReflection.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/ContextSchema.cs --- # Context and input schemas diff --git a/Trax.Docs/statemachine/declarative-authoring.md b/Trax.Docs/statemachine/declarative-authoring.md index 2b48d75c1..23cb1f22c 100644 --- a/Trax.Docs/statemachine/declarative-authoring.md +++ b/Trax.Docs/statemachine/declarative-authoring.md @@ -5,7 +5,7 @@ type: how-to area: machines nav_order: 2 source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules --- # Write guards and reducers as data @@ -49,9 +49,9 @@ property types that refuse to configure. ```csharp compile=turnstile using System.Text.Json.Nodes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; public sealed class TurnstileMachine : Machine { diff --git a/Trax.Docs/statemachine/generic-mutations.md b/Trax.Docs/statemachine/generic-mutations.md index 5b62a4656..bede6e3b7 100644 --- a/Trax.Docs/statemachine/generic-mutations.md +++ b/Trax.Docs/statemachine/generic-mutations.md @@ -5,9 +5,9 @@ type: reference area: machines nav_order: 22 source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericContracts.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericTrains.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineOptions.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Mutations/GenericContracts.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Mutations/GenericTrains.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/StateMachineOptions.cs --- # Generic state-machine mutations diff --git a/Trax.Docs/statemachine/invoked-runs.md b/Trax.Docs/statemachine/invoked-runs.md index ae66ec5dc..fa377a9ff 100644 --- a/Trax.Docs/statemachine/invoked-runs.md +++ b/Trax.Docs/statemachine/invoked-runs.md @@ -5,11 +5,11 @@ type: reference area: machines nav_order: 23 source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Invokes.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeDelivery.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeReconciler.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedRunOutcomes.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokesStartupValidator.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Invokes.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokeOutcomeDelivery.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokeOutcomeReconciler.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokedRunOutcomes.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokesStartupValidator.cs - Trax.Mediator/src/Trax.Mediator/Services/InvokedTrains/InvokedTrainLauncher.cs --- diff --git a/Trax.Docs/statemachine/invoking-trains.md b/Trax.Docs/statemachine/invoking-trains.md index 9e247f19a..da2199abd 100644 --- a/Trax.Docs/statemachine/invoking-trains.md +++ b/Trax.Docs/statemachine/invoking-trains.md @@ -5,9 +5,9 @@ type: how-to area: machines nav_order: 3 source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Invokes.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedTrainLauncher.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokesStartupValidator.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Invokes.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokedTrainLauncher.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokesStartupValidator.cs --- # Invoke a train from a state @@ -42,9 +42,9 @@ context the state was entered with. Every invoking state says where each outcome ```csharp compile=ingest using System.Text.Json.Nodes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; public enum Stage { @@ -151,7 +151,7 @@ The host that registers the machine needs Postgres or SQLite (InMemory has no tr using Trax.Effect.Data.Postgres.Extensions; using Trax.Effect.Extensions; using Trax.Effect.JunctionProvider.Progress.Extensions; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; using Trax.Mediator.Extensions; builder.Services.AddTrax(trax => @@ -217,7 +217,7 @@ instance's invoke token, however many hosts deliver it. To change how often the using Trax.Effect.Data.Postgres.Extensions; using Trax.Effect.Extensions; using Trax.Effect.JunctionProvider.Progress.Extensions; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; using Trax.Mediator.Extensions; builder.Services.AddTrax(trax => diff --git a/Trax.Docs/statemachine/spawning-child-machines.md b/Trax.Docs/statemachine/spawning-child-machines.md index 375c5e417..b5df73ffb 100644 --- a/Trax.Docs/statemachine/spawning-child-machines.md +++ b/Trax.Docs/statemachine/spawning-child-machines.md @@ -5,9 +5,9 @@ type: how-to area: machines nav_order: 4 source: - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Invokes.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokeOutbox.cs - - Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SpawnsStartupValidator.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine/Invokes.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokeOutbox.cs + - Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SpawnsStartupValidator.cs --- # Spawn a child machine from a state diff --git a/Trax.Docs/statemachine/undo-an-effect.md b/Trax.Docs/statemachine/undo-an-effect.md index af915e30d..f6ce63363 100644 --- a/Trax.Docs/statemachine/undo-an-effect.md +++ b/Trax.Docs/statemachine/undo-an-effect.md @@ -37,9 +37,9 @@ whose one effect is the undo, started from the receipt the first machine recorde ```csharp compile=refund using System.Text.Json.Nodes; - using Trax.Effect.StateMachine; - using Trax.Effect.StateMachine.Persistence; - using static Trax.Effect.StateMachine.Rules; + using Trax.StateMachine; + using Trax.StateMachine.Persistence; + using static Trax.StateMachine.Rules; public sealed record RefundStart { @@ -103,7 +103,7 @@ whose one effect is the undo, started from the receipt the first machine recorde key: Trax runs the refund once per refund instance, and two refund instances for one charge are two instances. ```csharp compile=refund - using Trax.Effect.StateMachine; + using Trax.StateMachine; public sealed class GatewayRefund(IPaymentGateway gateway) : IRefund { diff --git a/Trax.Docs/tests/Trax.Docs.Snippets.Tests/Context/sdk-reference/statemachine-api/_section.cs b/Trax.Docs/tests/Trax.Docs.Snippets.Tests/Context/sdk-reference/statemachine-api/_section.cs index b0e69a175..c941275d0 100644 --- a/Trax.Docs/tests/Trax.Docs.Snippets.Tests/Context/sdk-reference/statemachine-api/_section.cs +++ b/Trax.Docs/tests/Trax.Docs.Snippets.Tests/Context/sdk-reference/statemachine-api/_section.cs @@ -6,10 +6,10 @@ global using Trax.Effect.Data.Postgres.Extensions; global using Trax.Effect.Extensions; global using Trax.Effect.Provider.Json.Extensions; -global using Trax.Effect.StateMachine; -global using Trax.Effect.StateMachine.Persistence; -global using static Trax.Effect.StateMachine.Rules; global using Trax.Mediator.Extensions; +global using Trax.StateMachine; +global using Trax.StateMachine.Persistence; +global using static Trax.StateMachine.Rules; public enum CheckoutState { diff --git a/Trax.Docs/tests/Trax.Docs.Snippets.Tests/Trax.Docs.Snippets.Tests.csproj b/Trax.Docs/tests/Trax.Docs.Snippets.Tests/Trax.Docs.Snippets.Tests.csproj index ac8e3b8ef..178721ee7 100644 --- a/Trax.Docs/tests/Trax.Docs.Snippets.Tests/Trax.Docs.Snippets.Tests.csproj +++ b/Trax.Docs/tests/Trax.Docs.Snippets.Tests/Trax.Docs.Snippets.Tests.csproj @@ -59,9 +59,9 @@ - - - + + + diff --git a/Trax.Docs/tests/Trax.Docs.Snippets.Tests/packages.lock.json b/Trax.Docs/tests/Trax.Docs.Snippets.Tests/packages.lock.json index ccc938dac..39cfef5a5 100644 --- a/Trax.Docs/tests/Trax.Docs.Snippets.Tests/packages.lock.json +++ b/Trax.Docs/tests/Trax.Docs.Snippets.Tests/packages.lock.json @@ -1165,38 +1165,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, - "trax.effect.statemachine.testing": { - "type": "Project", - "dependencies": { - "Trax.Effect.StateMachine": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.mediator.testing": { @@ -1238,6 +1213,31 @@ "Trax.Scheduler": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, + "trax.statemachine.testing": { + "type": "Project", + "dependencies": { + "Trax.StateMachine": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" + } + }, "Amazon.Lambda.Core": { "type": "CentralTransitive", "requested": "[3.3.0, )", diff --git a/Trax.Docs/tests/Trax.Docs.Tests/Tests/PackagesPageTests.cs b/Trax.Docs/tests/Trax.Docs.Tests/Tests/PackagesPageTests.cs index 59b34d394..ce1ec46ba 100644 --- a/Trax.Docs/tests/Trax.Docs.Tests/Tests/PackagesPageTests.cs +++ b/Trax.Docs/tests/Trax.Docs.Tests/Tests/PackagesPageTests.cs @@ -38,9 +38,9 @@ public class PackagesPageTests "Trax.Effect.JunctionProvider.Progress", "Trax.Effect.Provider.Json", "Trax.Effect.Provider.Parameter", - "Trax.Effect.StateMachine", - "Trax.Effect.StateMachine.Persistence", - "Trax.Effect.StateMachine.Testing", + "Trax.StateMachine", + "Trax.StateMachine.Persistence", + "Trax.StateMachine.Testing", // Trax.Mediator "Trax.Mediator", "Trax.Mediator.Testing", diff --git a/Trax.Docs/what-trax-does.md b/Trax.Docs/what-trax-does.md index d66d88e77..bcc0cec44 100644 --- a/Trax.Docs/what-trax-does.md +++ b/Trax.Docs/what-trax-does.md @@ -74,8 +74,8 @@ install ([Packages](/docs/reference/packages) has the full list). | Capability | In plain words | Learn it | Understand it | Package | |---|---|---|---|---| -| State machines | A long-lived flow (a checkout, a form) as named states the server and the browser agree on. | [Chapter 12](/docs/book/checkout-is-a-state-machine) | [State machines](/docs/statemachine) | `Trax.Effect.StateMachine` | -| A machine runs a train | A state starts a train and moves on with its result. | [Chapter 13](/docs/book/the-machine-places-the-order) | [Train or machine](/docs/statemachine/train-or-machine) | `Trax.Effect.StateMachine` | +| State machines | A long-lived flow (a checkout, a form) as named states the server and the browser agree on. | [Chapter 12](/docs/book/checkout-is-a-state-machine) | [State machines](/docs/statemachine) | `Trax.StateMachine` | +| A machine runs a train | A state starts a train and moves on with its result. | [Chapter 13](/docs/book/the-machine-places-the-order) | [Train or machine](/docs/statemachine/train-or-machine) | `Trax.StateMachine` | | The browser twin | The same machine in TypeScript, so the browser predicts each move before the server confirms it. | [Chapter 16](/docs/book/checkout-in-the-browser) | [State machines](/docs/statemachine) | `@traxsharp/state-machine` | ## Ship it diff --git a/Trax.Effect/AGENTS.md b/Trax.Effect/AGENTS.md index ec45892c9..08b366b98 100644 --- a/Trax.Effect/AGENTS.md +++ b/Trax.Effect/AGENTS.md @@ -94,7 +94,7 @@ carries `Not ADR-enforcing:` with a reason, and the `adr-guard` job checks it. A unclassified until you choose, and the build says so. Opting out is a normal answer; a reason that reads as a deferral is not. -`tests/Trax.Effect.StateMachine.Persistence.Integration/MigrationSchemaTests.cs` is the +`tests/Trax.StateMachine.Persistence.Integration/MigrationSchemaTests.cs` is the model-versus-DDL drift guard for the state-machine tables, and `EveryTableIsModelledTests` (Postgres) with `SqliteEveryTableIsModelledTests` is the one for the data context: every migrated table is mapped, and every mapped column exists (`0036`). The Postgres ones need a live Postgres. `docker compose up -d` provides one. @@ -109,7 +109,7 @@ entity holding per-user data is filtered through the principal and exposed only run all five without writing a test body. `TraxInvariants.cs` beside them checks a database once every host has stopped (no run in progress, no effect claim left without a receipt, no dispatched queue entry without its run); `CheckTraxInvariantsAttribute` runs it after every test in -`Trax.Effect.Tests.Integration` and `Trax.Effect.StateMachine.Persistence.Integration`, and a test +`Trax.Effect.Tests.Integration` and `Trax.StateMachine.Persistence.Integration`, and a test that leaves such a row on purpose says why with `[LeavesStuckRuns]`. `tests/Trax.Effect.Data.Testing.Tests/` is their own suite, and `DomainDataLayerGuardFixtureSelfTest` there subclasses the fixture the way a consumer would. Changing either file changes what every consumer enforces, so treat diff --git a/Trax.Effect/docs/adr/0002-framework-tables-are-migrated-domain-tables-are-bootstrapped.md b/Trax.Effect/docs/adr/0002-framework-tables-are-migrated-domain-tables-are-bootstrapped.md index 6b7043d06..cde3d4d3f 100644 --- a/Trax.Effect/docs/adr/0002-framework-tables-are-migrated-domain-tables-are-bootstrapped.md +++ b/Trax.Effect/docs/adr/0002-framework-tables-are-migrated-domain-tables-are-bootstrapped.md @@ -69,7 +69,7 @@ Not covered: - **These suites require a live Postgres and fail without one rather than skipping.** In `tests/Trax.Effect.Tests.Integration` it is `UsePostgres` running the migrator at registration time inside `[OneTimeSetUp]`; in - `tests/Trax.Effect.StateMachine.Persistence.Integration` it is `PostgresSetup`, an + `tests/Trax.StateMachine.Persistence.Integration` it is `PostgresSetup`, an assembly-wide `[SetUpFixture]` that opens a connection unconditionally, so even the Sqlite case fails when Postgres is absent. That contradicts `Trax.Docs/adr/0005-a-skipped-test-is-a-runtime-decision.md`, which binds this repo. The diff --git a/Trax.Effect/src/Trax.Effect.Data/Services/DataContext/DataContext.cs b/Trax.Effect/src/Trax.Effect.Data/Services/DataContext/DataContext.cs index 212e99e06..096a58174 100644 --- a/Trax.Effect/src/Trax.Effect.Data/Services/DataContext/DataContext.cs +++ b/Trax.Effect/src/Trax.Effect.Data/Services/DataContext/DataContext.cs @@ -136,12 +136,12 @@ public class DataContext(DbContextOptions options) public DbSet JunctionRuns { get; set; } /// - /// Gets or sets the DbSet for the state-machine drafts Trax.Effect.StateMachine.Persistence stores. + /// Gets or sets the DbSet for the state-machine drafts Trax.StateMachine.Persistence stores. /// public DbSet SnapshotDrafts { get; set; } /// - /// Gets or sets the DbSet for the exactly-once effect claims Trax.Effect.StateMachine.Persistence records. + /// Gets or sets the DbSet for the exactly-once effect claims Trax.StateMachine.Persistence records. /// public DbSet EffectClaims { get; set; } diff --git a/Trax.Effect/src/Trax.Effect.Data/Services/DataContext/IDataContext.cs b/Trax.Effect/src/Trax.Effect.Data/Services/DataContext/IDataContext.cs index 65c052c6d..83a5b885e 100644 --- a/Trax.Effect/src/Trax.Effect.Data/Services/DataContext/IDataContext.cs +++ b/Trax.Effect/src/Trax.Effect.Data/Services/DataContext/IDataContext.cs @@ -163,7 +163,7 @@ public interface IDataContext : IEffectProvider, IAsyncDisposable /// /// The trax.snapshot_draft table: one row per user's state-machine draft or system-owned instance, - /// written by Trax.Effect.StateMachine.Persistence. Filter by OwnerKind and UserKey when querying + /// written by Trax.StateMachine.Persistence. Filter by OwnerKind and UserKey when querying /// directly, because the draft id alone is unique neither across users nor between a user and the system. /// /// @@ -175,7 +175,7 @@ public interface IDataContext : IEffectProvider, IAsyncDisposable /// /// The trax.effect_claim table: one row per exactly-once effect intent, written by - /// Trax.Effect.StateMachine.Persistence. A row with a null receipt is in flight; one with a receipt has run. + /// Trax.StateMachine.Persistence. A row with a null receipt is in flight; one with a receipt has run. /// /// /// declares this set. The default here keeps an implementation written @@ -208,7 +208,7 @@ public interface IDataContext : IEffectProvider, IAsyncDisposable /// /// The trax.snapshot_transition table: a state-machine instance's history, one row for every snapshot - /// Trax.Effect.StateMachine.Persistence writes, with the revision, command, kind, actor and states of that write. + /// Trax.StateMachine.Persistence writes, with the revision, command, kind, actor and states of that write. /// Deleted with the instance's row. /// /// diff --git a/Trax.Effect/src/Trax.Effect.Data/Services/InvokedRunListener/IInvokedRunListener.cs b/Trax.Effect/src/Trax.Effect.Data/Services/InvokedRunListener/IInvokedRunListener.cs index b271e4f91..4f8e90b74 100644 --- a/Trax.Effect/src/Trax.Effect.Data/Services/InvokedRunListener/IInvokedRunListener.cs +++ b/Trax.Effect/src/Trax.Effect.Data/Services/InvokedRunListener/IInvokedRunListener.cs @@ -14,7 +14,7 @@ namespace Trax.Effect.Data.Services.InvokedRunListener; /// SQLite and InMemory register none: on them the run's own host applies the outcome through its lifecycle hook, /// and the sweep covers the rest. /// -/// Infrastructure for Trax.Effect.StateMachine.Persistence, which alone sees it; a host does not +/// Infrastructure for Trax.StateMachine.Persistence, which alone sees it; a host does not /// implement or call it. /// internal interface IInvokedRunListener diff --git a/Trax.Effect/src/Trax.Effect.Data/Services/SnapshotNotices/ISnapshotNoticeSource.cs b/Trax.Effect/src/Trax.Effect.Data/Services/SnapshotNotices/ISnapshotNoticeSource.cs index c90f02651..2b5676dcb 100644 --- a/Trax.Effect/src/Trax.Effect.Data/Services/SnapshotNotices/ISnapshotNoticeSource.cs +++ b/Trax.Effect/src/Trax.Effect.Data/Services/SnapshotNotices/ISnapshotNoticeSource.cs @@ -10,7 +10,7 @@ namespace Trax.Effect.Data.Services.SnapshotNotices; /// (migration 080). SQLite and InMemory register none, /// and the state-machine change listener polls the table instead. /// -/// Infrastructure for Trax.Effect.StateMachine.Persistence, whose change listener holds the host's one +/// Infrastructure for Trax.StateMachine.Persistence, whose change listener holds the host's one /// subscription; a host does not implement or call it. /// internal interface ISnapshotNoticeSource diff --git a/Trax.Effect/src/Trax.Effect.Data/Trax.Effect.Data.csproj b/Trax.Effect/src/Trax.Effect.Data/Trax.Effect.Data.csproj index 500b45b67..d963ce4c7 100644 --- a/Trax.Effect/src/Trax.Effect.Data/Trax.Effect.Data.csproj +++ b/Trax.Effect/src/Trax.Effect.Data/Trax.Effect.Data.csproj @@ -30,7 +30,7 @@ - + @@ -40,6 +40,6 @@ - + diff --git a/Trax.Effect/src/Trax.Effect/Models/EffectClaim/EffectClaim.cs b/Trax.Effect/src/Trax.Effect/Models/EffectClaim/EffectClaim.cs index e8c924a0a..b4ab5c782 100644 --- a/Trax.Effect/src/Trax.Effect/Models/EffectClaim/EffectClaim.cs +++ b/Trax.Effect/src/Trax.Effect/Models/EffectClaim/EffectClaim.cs @@ -9,7 +9,7 @@ namespace Trax.Effect.Models.EffectClaim; /// /// /// EF Core mapping lives in Trax.Effect.Data.Models.EffectClaim.PersistentEffectClaim (in -/// Trax.Effect.Data). The table ships in the core migration set, and Trax.Effect.StateMachine.Persistence reaches +/// Trax.Effect.Data). The table ships in the core migration set, and Trax.StateMachine.Persistence reaches /// it through IDataContext.EffectClaims rather than through a context or SQL of its own. /// public class EffectClaim diff --git a/Trax.Effect/src/Trax.Effect/Models/SnapshotDraft/SnapshotDraft.cs b/Trax.Effect/src/Trax.Effect/Models/SnapshotDraft/SnapshotDraft.cs index 699c2867e..86aa59da1 100644 --- a/Trax.Effect/src/Trax.Effect/Models/SnapshotDraft/SnapshotDraft.cs +++ b/Trax.Effect/src/Trax.Effect/Models/SnapshotDraft/SnapshotDraft.cs @@ -10,7 +10,7 @@ namespace Trax.Effect.Models.SnapshotDraft; /// /// /// EF Core mapping lives in Trax.Effect.Data.Models.SnapshotDraft.PersistentSnapshotDraft (in -/// Trax.Effect.Data). The table ships in the core migration set, and Trax.Effect.StateMachine.Persistence reaches +/// Trax.Effect.Data). The table ships in the core migration set, and Trax.StateMachine.Persistence reaches /// it through IDataContext.SnapshotDrafts rather than through a context or SQL of its own. /// /// Identity names the owner kind. A user's draft is unique by (user_key, machine, id): its diff --git a/Trax.Effect/src/Trax.Effect/Models/SnapshotTransition/SnapshotTransition.cs b/Trax.Effect/src/Trax.Effect/Models/SnapshotTransition/SnapshotTransition.cs index dffda0e5a..003f3e9f8 100644 --- a/Trax.Effect/src/Trax.Effect/Models/SnapshotTransition/SnapshotTransition.cs +++ b/Trax.Effect/src/Trax.Effect/Models/SnapshotTransition/SnapshotTransition.cs @@ -7,7 +7,7 @@ namespace Trax.Effect.Models.SnapshotTransition; /// Base model for trax.snapshot_transition: one write of a state-machine instance's snapshot, in its history. /// /// -/// Trax.Effect.StateMachine.Persistence's store writes one row for every snapshot it writes, in the same +/// Trax.StateMachine.Persistence's store writes one row for every snapshot it writes, in the same /// transaction, with the revision that write gave the instance: its creation, every command, save, timer and outcome. /// A write that leaves the snapshot alone (marking a pending effect, setting a run's token, keeping a draft active) /// writes none, and neither does a writer that goes around the store, so revisions can skip. diff --git a/Trax.Effect/src/Trax.Effect/Trax.Effect.csproj b/Trax.Effect/src/Trax.Effect/Trax.Effect.csproj index c9c062859..f91e70455 100644 --- a/Trax.Effect/src/Trax.Effect/Trax.Effect.csproj +++ b/Trax.Effect/src/Trax.Effect/Trax.Effect.csproj @@ -20,7 +20,7 @@ - + - + - + diff --git a/Trax.Effect/tests/Trax.Effect.Tests.Data.Sqlite.Integration/IntegrationTests/SqliteEveryTableIsModelledTests.cs b/Trax.Effect/tests/Trax.Effect.Tests.Data.Sqlite.Integration/IntegrationTests/SqliteEveryTableIsModelledTests.cs index 484260c63..e1a6f00ac 100644 --- a/Trax.Effect/tests/Trax.Effect.Tests.Data.Sqlite.Integration/IntegrationTests/SqliteEveryTableIsModelledTests.cs +++ b/Trax.Effect/tests/Trax.Effect.Tests.Data.Sqlite.Integration/IntegrationTests/SqliteEveryTableIsModelledTests.cs @@ -196,7 +196,7 @@ public async Task State_machine_tables_are_mapped_column_for_column(string table .Should() .ContainKey( table, - $"Trax.Effect.StateMachine.Persistence reaches {table} through IDataContext. See {Adr}." + $"Trax.StateMachine.Persistence reaches {table} through IDataContext. See {Adr}." ); mapped[table] .Should() diff --git a/Trax.Effect/tests/Trax.Effect.Tests.Integration/IntegrationTests/EveryTableIsModelledTests.cs b/Trax.Effect/tests/Trax.Effect.Tests.Integration/IntegrationTests/EveryTableIsModelledTests.cs index e04555fb5..0cda14eef 100644 --- a/Trax.Effect/tests/Trax.Effect.Tests.Integration/IntegrationTests/EveryTableIsModelledTests.cs +++ b/Trax.Effect/tests/Trax.Effect.Tests.Integration/IntegrationTests/EveryTableIsModelledTests.cs @@ -195,7 +195,7 @@ public async Task State_machine_tables_are_mapped_column_for_column(string table .Should() .ContainKey( table, - $"Trax.Effect.StateMachine.Persistence reaches {table} through IDataContext. See {Adr}." + $"Trax.StateMachine.Persistence reaches {table} through IDataContext. See {Adr}." ); mapped[table] .Should() diff --git a/Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.Effect.StateMachine.Persistence.received.txt b/Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.Effect.StateMachine.Persistence.received.txt deleted file mode 100644 index 5a89255e5..000000000 --- a/Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.Effect.StateMachine.Persistence.received.txt +++ /dev/null @@ -1,601 +0,0 @@ -namespace Trax.Effect.StateMachine.Persistence -{ - public abstract class Actor : System.IEquatable - { - public sealed class Client : Trax.Effect.StateMachine.Persistence.Actor, System.IEquatable - { - public Client(string userKey, params string[] roles) { } - public Client(string UserKey, System.Func IsInRole, System.Func> SatisfiesPolicy) { } - public System.Func IsInRole { get; init; } - public System.Func> SatisfiesPolicy { get; init; } - public string UserKey { get; init; } - } - } - public abstract class AdvanceOutcome : System.IEquatable - { - public sealed class Advanced : Trax.Effect.StateMachine.Persistence.AdvanceOutcome, System.IEquatable - { - public Advanced(Trax.Effect.StateMachine.Snapshot Snapshot) { } - public System.DateTimeOffset? DueAt { get; init; } - public bool DueAtKnown { get; init; } - public long? Revision { get; init; } - public long? RowId { get; init; } - public Trax.Effect.StateMachine.Snapshot Snapshot { get; init; } - } - public sealed class Conflict : Trax.Effect.StateMachine.Persistence.AdvanceOutcome, System.IEquatable - { - public Conflict() { } - } - public sealed class LoadError : Trax.Effect.StateMachine.Persistence.AdvanceOutcome, System.IEquatable - { - public LoadError(Trax.Effect.StateMachine.RefusalCode Code, string Message) { } - public Trax.Effect.StateMachine.RefusalCode Code { get; init; } - public string Message { get; init; } - } - public sealed class NotFound : Trax.Effect.StateMachine.Persistence.AdvanceOutcome, System.IEquatable - { - public NotFound() { } - } - public sealed class Rejected : Trax.Effect.StateMachine.Persistence.AdvanceOutcome, System.IEquatable - { - public Rejected(Trax.Effect.StateMachine.RefusalCode Reason, string? Detail) { } - public string? Detail { get; init; } - public Trax.Effect.StateMachine.RefusalCode Reason { get; init; } - } - } - public sealed class AppliedRequest : System.IEquatable - { - public AppliedRequest(string RequestId, string? Trigger, string? FromState) { } - public string? FromState { get; init; } - public string RequestId { get; init; } - public string? Trigger { get; init; } - } - public abstract class AutosaveResult : System.IEquatable - { - public sealed class Conflict : Trax.Effect.StateMachine.Persistence.AutosaveResult, System.IEquatable - { - public Conflict() { } - } - public sealed class Rejected : Trax.Effect.StateMachine.Persistence.AutosaveResult, System.IEquatable - { - public Rejected(Trax.Effect.StateMachine.RefusalCode Code, string Message) { } - public Trax.Effect.StateMachine.RefusalCode Code { get; init; } - public string Message { get; init; } - } - public sealed class Saved : Trax.Effect.StateMachine.Persistence.AutosaveResult, System.IEquatable - { - public Saved(Trax.Effect.StateMachine.Snapshot Snapshot) { } - public System.DateTimeOffset? DueAt { get; init; } - public long? Revision { get; init; } - public long? RowId { get; init; } - public Trax.Effect.StateMachine.Snapshot Snapshot { get; init; } - } - } - public abstract class ClaimResult : System.IEquatable - { - public sealed class Lost : Trax.Effect.StateMachine.Persistence.ClaimResult, System.IEquatable - { - public Lost() { } - } - public sealed class Won : Trax.Effect.StateMachine.Persistence.ClaimResult, System.IEquatable - { - public Won(System.Guid OwnerToken) { } - public System.Guid OwnerToken { get; init; } - } - } - public sealed class CompletedEffect : System.IEquatable - { - public CompletedEffect(string Receipt, string? ContentFingerprint) { } - public string? ContentFingerprint { get; init; } - public string Receipt { get; init; } - } - public abstract class DiscardOutcome : System.IEquatable - { - public sealed class Discarded : Trax.Effect.StateMachine.Persistence.DiscardOutcome, System.IEquatable - { - public Discarded() { } - } - public sealed class Rejected : Trax.Effect.StateMachine.Persistence.DiscardOutcome, System.IEquatable - { - public Rejected(Trax.Effect.StateMachine.RefusalCode Code, string Message) { } - public Trax.Effect.StateMachine.RefusalCode Code { get; init; } - public string Message { get; init; } - } - } - public sealed class EfEffectClaimStore : Trax.Effect.StateMachine.Persistence.IEffectClaimStore - { - public EfEffectClaimStore(Trax.Effect.Data.Services.DataContext.IDataContext db, Trax.Effect.Data.Services.SqlDialect.ISqlDialect? dialect = null) { } - public System.Threading.Tasks.Task Complete(string effectKey, System.Guid ownerToken, string receipt, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task GetCompleted(string effectKey, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task GetReceipt(string effectKey, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task ReclaimStale(System.DateTimeOffset cutoff, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task Release(string effectKey, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task ReleaseForReset(string effectKey, System.Func receiptRecorded, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task ReleaseOwned(string effectKey, System.Guid ownerToken, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task TryClaim(string effectKey, System.TimeSpan lease, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task TryClaim(string effectKey, System.TimeSpan lease, string? contentFingerprint, System.Threading.CancellationToken cancellationToken = default) { } - } - public sealed class EfSnapshotStore : Trax.Effect.StateMachine.Persistence.ISnapshotStore - { - public EfSnapshotStore(Trax.Effect.Data.Services.DataContext.IDataContext db, Trax.Effect.Data.Services.SqlDialect.ISqlDialect? dialect = null) { } - public System.Threading.Tasks.Task Delete(string userKey, System.Guid id, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task Delete(string userKey, string machine, System.Guid id, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task Get(string userKey, System.Guid id, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task Get(string userKey, string machine, System.Guid id, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task Insert(string userKey, System.Guid id, Trax.Effect.StateMachine.Snapshot snapshot, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task Update(string userKey, System.Guid id, Trax.Effect.StateMachine.Snapshot snapshot, System.Guid expectedToken, string? requestId = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task UpdateWithRequest(string userKey, System.Guid id, Trax.Effect.StateMachine.Snapshot snapshot, System.Guid expectedToken, Trax.Effect.StateMachine.Persistence.AppliedRequest? request, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task Upsert(string userKey, System.Guid id, Trax.Effect.StateMachine.Snapshot snapshot, System.Threading.CancellationToken cancellationToken = default) { } - } - public sealed class EffectClaimSweeper - { - public EffectClaimSweeper(Trax.Effect.StateMachine.Persistence.IEffectClaimStore claims) { } - public System.Threading.Tasks.Task Sweep(System.DateTimeOffset cutoff, System.Threading.CancellationToken cancellationToken = default) { } - } - public abstract class EffectOutcome : System.IEquatable - { - public sealed class AlreadyRan : Trax.Effect.StateMachine.Persistence.EffectOutcome, System.IEquatable - { - public AlreadyRan(string Receipt) { } - public string? ContentFingerprint { get; init; } - public string Receipt { get; init; } - } - public sealed class InProgress : Trax.Effect.StateMachine.Persistence.EffectOutcome, System.IEquatable - { - public InProgress() { } - } - public sealed class Ran : Trax.Effect.StateMachine.Persistence.EffectOutcome, System.IEquatable - { - public Ran(string Receipt) { } - public string Receipt { get; init; } - } - } - public sealed class GenericStateMachineMutationOptions - { - public GenericStateMachineMutationOptions() { } - public string? Policy { get; set; } - } - public interface ICallerAuthorization - { - bool IsInRole(string role); - System.Threading.Tasks.Task IsPolicyRegistered(string policy); - System.Threading.Tasks.Task SatisfiesPolicy(string policy, System.Threading.CancellationToken cancellationToken = default); - } - public interface IEffectClaimStore - { - System.Threading.Tasks.Task Complete(string effectKey, System.Guid ownerToken, string receipt, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task GetCompleted(string effectKey, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task GetReceipt(string effectKey, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task ReclaimStale(System.DateTimeOffset cutoff, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task Release(string effectKey, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task ReleaseForReset(string effectKey, System.Func receiptRecorded, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task ReleaseOwned(string effectKey, System.Guid ownerToken, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task TryClaim(string effectKey, System.TimeSpan lease, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task TryClaim(string effectKey, System.TimeSpan lease, string? contentFingerprint, System.Threading.CancellationToken cancellationToken = default); - } - public interface IMachine - { - string? Corpus { get; } - bool HasEffect { get; } - string Name { get; } - string? SchemaHash { get; } - System.Type? StartInputType { get; } - System.Collections.Generic.IReadOnlyList States { get; } - System.Collections.Generic.IReadOnlyList Triggers { get; } - Trax.Effect.StateMachine.Persistence.ISnapshotEffectRunner? CreateEffectRunner(Trax.Effect.StateMachine.Persistence.ISnapshotDraftService service, Trax.Effect.StateMachine.Persistence.IdempotentEffect idempotent, System.IServiceProvider services); - Trax.Effect.StateMachine.Persistence.ISnapshotDraftService CreateService(Trax.Effect.StateMachine.Persistence.ISnapshotStore store, Trax.Effect.StateMachine.Persistence.IEffectClaimStore? claims, System.TimeSpan? draftTtl = default); - string ExportIr(); - System.Collections.Generic.IReadOnlyList SelfCheck(); - } - public interface IMachineInstances - { - System.Threading.Tasks.Task Advance(System.Guid id, string trigger, System.Text.Json.Nodes.JsonNode? input = null, System.Threading.CancellationToken cancellationToken = default) - where TMachine : Trax.Effect.StateMachine.Persistence.IMachine; - System.Threading.Tasks.Task Advance(Trax.Effect.StateMachine.Persistence.MachineKey key, string trigger, System.Text.Json.Nodes.JsonNode? input = null, System.Threading.CancellationToken cancellationToken = default) - where TMachine : Trax.Effect.StateMachine.Persistence.IMachine; - System.Threading.Tasks.Task Start(Trax.Effect.StateMachine.Persistence.MachineKey key, System.Text.Json.Nodes.JsonObject? context = null, System.Threading.CancellationToken cancellationToken = default) - where TMachine : Trax.Effect.StateMachine.Persistence.IMachine; - } - public interface ISnapshotDraftService - { - System.Threading.Tasks.Task Advance(Trax.Effect.StateMachine.Persistence.Actor actor, System.Guid id, string trigger, System.Text.Json.Nodes.JsonNode? input = null, string? requestId = null, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task Advance(string userKey, System.Guid id, string trigger, System.Text.Json.Nodes.JsonNode? input = null, string? requestId = null, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task Advance(Trax.Effect.StateMachine.Persistence.Actor actor, System.Guid id, string trigger, System.Text.Json.Nodes.JsonNode? input, string? requestId, string? clientResult, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task Advance(string userKey, System.Guid id, string trigger, System.Text.Json.Nodes.JsonNode? input, string? requestId, string? clientResult, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task Autosave(string userKey, System.Guid id, string snapshotJson, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task Discard(Trax.Effect.StateMachine.Persistence.Actor actor, System.Guid id, string requestId, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task Load(Trax.Effect.StateMachine.Persistence.Actor actor, System.Guid id, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task Load(string userKey, System.Guid id, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task Send(Trax.Effect.StateMachine.Persistence.Actor actor, System.Guid id, string requestId, System.Threading.CancellationToken cancellationToken = default); - string Serialize(Trax.Effect.StateMachine.Snapshot snapshot); - System.Threading.Tasks.Task Start(Trax.Effect.StateMachine.Persistence.Actor actor, System.Text.Json.Nodes.JsonObject? input, string requestId, System.Threading.CancellationToken cancellationToken = default); - } - public interface ISnapshotEffect - { - System.Threading.Tasks.Task Run(Trax.Effect.StateMachine.Snapshot snapshot, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task Run(Trax.Effect.StateMachine.Snapshot snapshot, string effectKey, System.Threading.CancellationToken cancellationToken); - } - public interface ISnapshotEffectRunner - { - System.Threading.Tasks.Task Run(string userKey, System.Guid id, string requestId, System.Threading.CancellationToken cancellationToken = default); - } - public interface ISnapshotMachineRegistry - { - Trax.Effect.StateMachine.Persistence.ISnapshotEffectRunner? EffectRunner(string machine); - string? SchemaHash(string machine); - Trax.Effect.StateMachine.Persistence.ISnapshotDraftService? Service(string machine); - } - public interface ISnapshotPrincipal - { - string? CurrentUserKey { get; } - } - public interface ISnapshotStore - { - System.Threading.Tasks.Task Delete(string userKey, System.Guid id, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task Delete(string userKey, string machine, System.Guid id, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task Get(string userKey, System.Guid id, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task Get(string userKey, string machine, System.Guid id, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task Insert(string userKey, System.Guid id, Trax.Effect.StateMachine.Snapshot snapshot, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task Update(string userKey, System.Guid id, Trax.Effect.StateMachine.Snapshot snapshot, System.Guid expectedToken, string? requestId = null, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task UpdateWithRequest(string userKey, System.Guid id, Trax.Effect.StateMachine.Snapshot snapshot, System.Guid expectedToken, Trax.Effect.StateMachine.Persistence.AppliedRequest? request, System.Threading.CancellationToken cancellationToken = default); - System.Threading.Tasks.Task Upsert(string userKey, System.Guid id, Trax.Effect.StateMachine.Snapshot snapshot, System.Threading.CancellationToken cancellationToken = default); - } - public sealed class IdempotentEffect - { - public IdempotentEffect(Trax.Effect.StateMachine.Persistence.IEffectClaimStore claims) { } - public System.Threading.Tasks.Task RunOnce(string effectKey, System.Func> effect, System.TimeSpan? lease = default, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task RunOnce(string effectKey, string? contentFingerprint, System.Func> effect, System.TimeSpan? lease = default, System.Threading.CancellationToken cancellationToken = default) { } - } - public sealed class InvokedRun : System.IEquatable - { - public InvokedRun(string Machine, System.Guid InstanceId, Trax.Effect.Enums.SnapshotOwnerKind OwnerKind, string? UserKey) { } - public System.Guid InstanceId { get; init; } - public string Machine { get; init; } - public Trax.Effect.Enums.SnapshotOwnerKind OwnerKind { get; init; } - public string? UserKey { get; init; } - } - public abstract class LoadResult : System.IEquatable - { - public sealed class Invalid : Trax.Effect.StateMachine.Persistence.LoadResult, System.IEquatable - { - public Invalid(Trax.Effect.StateMachine.RefusalCode Code, string Message) { } - public Trax.Effect.StateMachine.RefusalCode Code { get; init; } - public string Message { get; init; } - } - public sealed class Loaded : Trax.Effect.StateMachine.Persistence.LoadResult, System.IEquatable - { - public Loaded(Trax.Effect.StateMachine.Snapshot Snapshot) { } - public System.DateTimeOffset? DueAt { get; init; } - public long? Revision { get; init; } - public long? RowId { get; init; } - public Trax.Effect.StateMachine.Snapshot Snapshot { get; init; } - } - public sealed class NotFound : Trax.Effect.StateMachine.Persistence.LoadResult, System.IEquatable - { - public NotFound() { } - } - } - public static class MachineCensus - { - public const string Undeclared = "undeclared"; - public static System.Collections.Generic.IReadOnlyList Describe(System.Collections.Generic.IEnumerable machines) { } - } - public sealed class MachineCensusEntry : System.IEquatable - { - public MachineCensusEntry(string Machine, string Name, string Kind, string Rule, System.Collections.Generic.IReadOnlyList Surfaces) { } - public string Kind { get; init; } - public string Machine { get; init; } - public string Name { get; init; } - public string Rule { get; init; } - public System.Collections.Generic.IReadOnlyList Surfaces { get; init; } - } - public sealed class MachineInstance : System.IEquatable - { - public MachineInstance(System.Guid Id, string Machine, string State, bool Created) { } - public bool Created { get; init; } - public System.Guid Id { get; init; } - public string Machine { get; init; } - public string State { get; init; } - } - public static class MachineInstanceId - { - public static readonly System.Guid Root; - public static System.Guid For(string machine, Trax.Effect.StateMachine.Persistence.MachineKey key) { } - public static System.Guid Namespace(string machine) { } - } - public sealed class MachineKey : System.IEquatable - { - public System.Collections.Generic.IReadOnlyList Parts { get; } - public bool Equals(Trax.Effect.StateMachine.Persistence.MachineKey? other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public override string ToString() { } - public static Trax.Effect.StateMachine.Persistence.MachineKey Of(params string[] parts) { } - public static Trax.Effect.StateMachine.Persistence.MachineKey op_Implicit(string part) { } - } - public abstract class Machine : Trax.Effect.StateMachine.Persistence.IMachine - where TState : struct, System.Enum - where TTrigger : struct, System.Enum - { - protected Machine() { } - public virtual string? Corpus { get; } - public bool HasEffect { get; } - public string Name { get; } - public string? SchemaHash { get; } - public System.Type? StartInputType { get; } - public System.Collections.Generic.IReadOnlyList States { get; } - public System.Collections.Generic.IReadOnlyList Triggers { get; } - protected abstract void Configure(Trax.Effect.StateMachine.IMachineBuilder machine); - public Trax.Effect.StateMachine.Persistence.ISnapshotEffectRunner? CreateEffectRunner(Trax.Effect.StateMachine.Persistence.ISnapshotDraftService service, Trax.Effect.StateMachine.Persistence.IdempotentEffect idempotent, System.IServiceProvider services) { } - public Trax.Effect.StateMachine.Persistence.ISnapshotDraftService CreateService(Trax.Effect.StateMachine.Persistence.ISnapshotStore store, Trax.Effect.StateMachine.Persistence.IEffectClaimStore? claims, System.TimeSpan? draftTtl = default) { } - public string ExportIr() { } - public System.Collections.Generic.IReadOnlyList SelfCheck() { } - } - public sealed class RecordedRequest : System.IEquatable - { - public RecordedRequest(string RequestId, string Fingerprint, long Revision, string ResultSnapshot) { } - public string Fingerprint { get; init; } - public string? FromState { get; init; } - public string RequestId { get; init; } - public string ResultSnapshot { get; init; } - public long Revision { get; init; } - public string? Trigger { get; init; } - } - public static class RequestIdRing - { - public const int Capacity = 16; - public const int MaxBytes = 131072; - public const int MaxRequestIdLength = 200; - } - public static class SnapshotFingerprint - { - public static string Of(string canonicalWire) { } - } - public static class SnapshotLimits - { - public const int MaxSnapshotBytes = 65536; - public static readonly System.TimeSpan DefaultEffectLease; - } - public sealed class SnapshotProblem : System.IEquatable - { - public SnapshotProblem() { } - public required Trax.Effect.StateMachine.RefusalCode Code { get; init; } - public required string Message { get; init; } - } - public static class SnapshotSelfCheck - { - public static System.Collections.Generic.IReadOnlyList Run(System.Collections.Generic.IEnumerable machines) { } - } - public abstract class StartOutcome : System.IEquatable - { - public sealed class Rejected : Trax.Effect.StateMachine.Persistence.StartOutcome, System.IEquatable - { - public Rejected(Trax.Effect.StateMachine.RefusalCode Code, string Message) { } - public Trax.Effect.StateMachine.RefusalCode Code { get; init; } - public string Message { get; init; } - } - public sealed class Started : Trax.Effect.StateMachine.Persistence.StartOutcome, System.IEquatable - { - public Started(System.Guid Id, Trax.Effect.StateMachine.Snapshot Snapshot, long Revision, bool Created) { } - public bool Created { get; init; } - public System.DateTimeOffset? DueAt { get; init; } - public System.Guid Id { get; init; } - public long Revision { get; init; } - public Trax.Effect.StateMachine.Snapshot Snapshot { get; init; } - } - } - public enum StateMachineChangeFeed - { - Notify = 0, - Poll = 1, - } - public static class StateMachineHealthCheckExtensions - { - public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddTraxStateMachineSelfCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name = "state-machines") { } - } - public static class StateMachineInstruments - { - public const string ClientDivergence = "trax.machine.client_divergence"; - public const string EffectsAbandoned = "trax.machine.effect.abandoned"; - public const string MeterName = "Trax.StateMachine"; - public const string NotificationQueueUsage = "trax.machine.snapshot_notice.queue_usage"; - public const string SnapshotNoticeMalformed = "trax.machine.snapshot_notice.malformed"; - public const string TimerFireErrors = "trax.machine.timer.fire_errors"; - public const string TimerFireFailed = "trax.machine.timer.fire_failed"; - } - public sealed class StateMachineOptions - { - public const int DefaultMaxDraftsPerUser = 50; - public static readonly System.TimeSpan DefaultDraftTtl; - public static readonly System.TimeSpan DefaultMaxDraftLifetime; - public static readonly System.TimeSpan MinimumChangeFeedPollInterval; - public StateMachineOptions() { } - public Trax.Effect.StateMachine.Persistence.StateMachineChangeFeed ChangeFeed { get; set; } - public System.TimeSpan ChangeFeedPollInterval { get; set; } - public System.TimeSpan? DraftTtl { get; set; } - public System.TimeSpan InvokeOutcomeSweepInterval { get; set; } - public System.TimeSpan InvokeOutcomeSweepIntervalWhileListening { get; set; } - public System.TimeSpan? MaxDraftLifetime { get; set; } - public int? MaxDraftsPerUser { get; set; } - public Trax.Effect.StateMachine.Persistence.StateMachineOptions ExposeGenericStateMachineMutations(System.Action configure) { } - } - public static class StateMachinesBuilderExtensions - { - public static Trax.Effect.Configuration.TraxBuilder.TraxBuilderWithEffects AddStateMachines(this Trax.Effect.Configuration.TraxBuilder.TraxBuilderWithEffects builder, params System.Reflection.Assembly[] assemblies) { } - public static Trax.Effect.Configuration.TraxBuilder.TraxBuilderWithEffects AddStateMachines(this Trax.Effect.Configuration.TraxBuilder.TraxBuilderWithEffects builder, System.Action? configure, params System.Reflection.Assembly[] assemblies) { } - } - public sealed class StoredSnapshot : System.IEquatable - { - public StoredSnapshot(string Json, System.Guid Token, string? LastRequestId, System.DateTimeOffset UpdatedAt) { } - public System.DateTimeOffset? DueAt { get; init; } - public string? InvokeToken { get; init; } - public string Json { get; init; } - public Trax.Effect.StateMachine.Persistence.AppliedRequest? LastRequest { get; } - public string? LastRequestFromState { get; init; } - public string? LastRequestId { get; init; } - public string? LastRequestTrigger { get; init; } - public System.Collections.Generic.IReadOnlyList? RecentRequests { get; init; } - public long? Revision { get; init; } - public long? RowId { get; init; } - public System.Guid Token { get; init; } - public System.DateTimeOffset UpdatedAt { get; init; } - } -} -namespace Trax.Effect.StateMachine.Persistence.Mutations -{ - [Trax.Effect.Attributes.TraxAuthorize] - public class AdvanceSnapshot : Trax.Effect.Services.ServiceTrain.ServiceTrain, System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain, Trax.Effect.StateMachine.Persistence.Mutations.IAdvanceSnapshot - { - public AdvanceSnapshot() { } - protected override System.Threading.Tasks.Task> Junctions() { } - } - public class AdvanceSnapshotInput : System.IEquatable - { - public AdvanceSnapshotInput() { } - [Trax.Effect.Attributes.TraxSensitive] - public string? ClientResult { get; init; } - public required System.Guid Id { get; init; } - public string? Input { get; init; } - public required string Machine { get; init; } - public string? RequestId { get; init; } - public string? SchemaHash { get; init; } - [Trax.Effect.Attributes.TraxSensitive] - public string? SensitiveInput { get; init; } - public required string Trigger { get; init; } - } - public class AdvanceSnapshotOutput : System.IEquatable - { - public AdvanceSnapshotOutput() { } - public System.DateTimeOffset? DueAt { get; init; } - public bool DueAtKnown { get; init; } - public Trax.Effect.StateMachine.Persistence.SnapshotProblem? Problem { get; init; } - public long? Revision { get; init; } - public long? RowId { get; init; } - public string? Snapshot { get; init; } - } - [Trax.Effect.Attributes.TraxAuthorize] - public class DiscardSnapshot : Trax.Effect.Services.ServiceTrain.ServiceTrain, System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain, Trax.Effect.StateMachine.Persistence.Mutations.IDiscardSnapshot - { - public DiscardSnapshot() { } - protected override System.Threading.Tasks.Task> Junctions() { } - } - public class DiscardSnapshotInput : System.IEquatable - { - public DiscardSnapshotInput() { } - public required System.Guid Id { get; init; } - public required string Machine { get; init; } - public required string RequestId { get; init; } - } - public class DiscardSnapshotOutput : System.IEquatable - { - public DiscardSnapshotOutput() { } - public bool Discarded { get; init; } - public Trax.Effect.StateMachine.Persistence.SnapshotProblem? Problem { get; init; } - } - public interface IAdvanceSnapshot : System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain { } - public interface IDiscardSnapshot : System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain { } - public interface ILoadSnapshot : System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain { } - public interface ISaveSnapshot : System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain { } - public interface ISendSnapshot : System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain { } - public interface IStartSnapshot : System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain { } - [Trax.Effect.Attributes.TraxAuthorize] - public class LoadSnapshot : Trax.Effect.Services.ServiceTrain.ServiceTrain, System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain, Trax.Effect.StateMachine.Persistence.Mutations.ILoadSnapshot - { - public LoadSnapshot() { } - protected override System.Threading.Tasks.Task> Junctions() { } - } - public class LoadSnapshotInput : System.IEquatable - { - public LoadSnapshotInput() { } - public required System.Guid Id { get; init; } - public required string Machine { get; init; } - public string? SchemaHash { get; init; } - } - public class LoadSnapshotOutput : System.IEquatable - { - public LoadSnapshotOutput() { } - public System.DateTimeOffset? DueAt { get; init; } - public Trax.Effect.StateMachine.Persistence.SnapshotProblem? Problem { get; init; } - public long? Revision { get; init; } - public long? RowId { get; init; } - public string? Snapshot { get; init; } - } - [Trax.Effect.Attributes.TraxAuthorize] - public class SaveSnapshot : Trax.Effect.Services.ServiceTrain.ServiceTrain, System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain, Trax.Effect.StateMachine.Persistence.Mutations.ISaveSnapshot - { - public SaveSnapshot() { } - protected override System.Threading.Tasks.Task> Junctions() { } - } - public class SaveSnapshotInput : System.IEquatable - { - public SaveSnapshotInput() { } - public required System.Guid Id { get; init; } - public required string Machine { get; init; } - public string? SchemaHash { get; init; } - [Trax.Effect.Attributes.TraxSensitive] - public required string Snapshot { get; init; } - } - public class SaveSnapshotOutput : System.IEquatable - { - public SaveSnapshotOutput() { } - public System.DateTimeOffset? DueAt { get; init; } - public Trax.Effect.StateMachine.Persistence.SnapshotProblem? Problem { get; init; } - public long? Revision { get; init; } - public long? RowId { get; init; } - public string? Snapshot { get; init; } - } - [Trax.Effect.Attributes.TraxAuthorize] - public class SendSnapshot : Trax.Effect.Services.ServiceTrain.ServiceTrain, System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain, Trax.Effect.StateMachine.Persistence.Mutations.ISendSnapshot - { - public SendSnapshot() { } - protected override System.Threading.Tasks.Task> Junctions() { } - } - public class SendSnapshotInput : System.IEquatable - { - public SendSnapshotInput() { } - public required System.Guid Id { get; init; } - public required string Machine { get; init; } - public string? RequestId { get; init; } - public string? SchemaHash { get; init; } - } - public class SendSnapshotOutput : System.IEquatable - { - public SendSnapshotOutput() { } - public System.DateTimeOffset? DueAt { get; init; } - public bool DueAtKnown { get; init; } - public Trax.Effect.StateMachine.Persistence.SnapshotProblem? Problem { get; init; } - public long? Revision { get; init; } - public long? RowId { get; init; } - public string? Snapshot { get; init; } - } - [Trax.Effect.Attributes.TraxAuthorize] - public class StartSnapshot : Trax.Effect.Services.ServiceTrain.ServiceTrain, System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain, Trax.Effect.StateMachine.Persistence.Mutations.IStartSnapshot - { - public StartSnapshot() { } - protected override System.Threading.Tasks.Task> Junctions() { } - } - public class StartSnapshotInput : System.IEquatable - { - public StartSnapshotInput() { } - public string? Input { get; init; } - public required string Machine { get; init; } - public required string RequestId { get; init; } - public string? SchemaHash { get; init; } - [Trax.Effect.Attributes.TraxSensitive] - public string? SensitiveInput { get; init; } - } - public class StartSnapshotOutput : System.IEquatable - { - public StartSnapshotOutput() { } - public bool? Created { get; init; } - public System.DateTimeOffset? DueAt { get; init; } - public System.Guid? Id { get; init; } - public Trax.Effect.StateMachine.Persistence.SnapshotProblem? Problem { get; init; } - public long? Revision { get; init; } - public string? Snapshot { get; init; } - } - public static class StateMachineMutations - { - public static System.Reflection.Assembly Assembly { get; } - } -} \ No newline at end of file diff --git a/Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.Effect.StateMachine.Testing.received.txt b/Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.Effect.StateMachine.Testing.received.txt deleted file mode 100644 index 141d2625f..000000000 --- a/Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.Effect.StateMachine.Testing.received.txt +++ /dev/null @@ -1,16 +0,0 @@ -namespace Trax.Effect.StateMachine.Testing -{ - public static class DifferentialCorpus - { - public static System.Collections.Generic.IReadOnlyList Replay(Trax.Effect.StateMachine.SnapshotMachine machine, string goldenJson) - where TState : struct, System.Enum - where TTrigger : struct, System.Enum { } - } - public static class MachineConformance - { - public static System.Collections.Generic.IReadOnlyList Check(Trax.Effect.StateMachine.Persistence.IMachine machine, string irPath, string corpusPath) { } - public static System.Collections.Generic.IReadOnlyList CheckCorpus(Trax.Effect.StateMachine.Persistence.IMachine machine, string corpusPath) { } - public static System.Collections.Generic.IReadOnlyList CheckIr(Trax.Effect.StateMachine.Persistence.IMachine machine, string irPath) { } - public static void WriteIr(Trax.Effect.StateMachine.Persistence.IMachine machine, string irPath) { } - } -} \ No newline at end of file diff --git a/Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.Effect.StateMachine.received.txt b/Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.Effect.StateMachine.received.txt deleted file mode 100644 index 7bdf31124..000000000 --- a/Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.Effect.StateMachine.received.txt +++ /dev/null @@ -1,643 +0,0 @@ -namespace Trax.Effect.StateMachine -{ - public abstract class AdvanceResult : System.IEquatable - { - public sealed class Rejected : Trax.Effect.StateMachine.AdvanceResult, System.IEquatable - { - public Rejected(Trax.Effect.StateMachine.RefusalCode Reason, string? Detail = null) { } - public string? Detail { get; init; } - public Trax.Effect.StateMachine.RefusalCode Reason { get; init; } - } - public sealed class Transitioned : Trax.Effect.StateMachine.AdvanceResult, System.IEquatable - { - public Transitioned(Trax.Effect.StateMachine.Snapshot Snapshot) { } - public Trax.Effect.StateMachine.Snapshot Snapshot { get; init; } - } - } - public sealed class BuiltMachine : System.IEquatable> - where TState : struct, System.Enum - where TTrigger : struct, System.Enum - { - public BuiltMachine(Trax.Effect.StateMachine.MachineDefinition Definition, System.Collections.Generic.IReadOnlyCollection CommittedStates, System.Collections.Generic.IReadOnlyList> Effects, Trax.Effect.StateMachine.DeclarativeModel? Declarative = null) { } - public System.Collections.Generic.IReadOnlyCollection CommittedStates { get; init; } - public Trax.Effect.StateMachine.DeclarativeModel? Declarative { get; init; } - public Trax.Effect.StateMachine.MachineDefinition Definition { get; init; } - public System.Collections.Generic.IReadOnlyList> Effects { get; init; } - public Trax.Effect.StateMachine.SnapshotMachine Engine { get; } - } - public sealed class ClientManifest : System.IEquatable - { - public const int CurrentFormat = 3; - public ClientManifest() { } - public System.Collections.Generic.IReadOnlyList FilterInputs { get; init; } - public int Format { get; init; } - public System.Collections.Generic.IReadOnlyList Machines { get; init; } - public System.Collections.Generic.IReadOnlyList Progress { get; init; } - public System.Collections.Generic.IReadOnlyList QueryModels { get; init; } - public System.Collections.Generic.IReadOnlyList Trains { get; init; } - public string Types { get; init; } - public static Trax.Effect.StateMachine.ClientManifest Read(string text) { } - public static string Write(Trax.Effect.StateMachine.ClientManifest manifest) { } - } - public sealed class ClientManifestArgument : System.IEquatable - { - public ClientManifestArgument() { } - public string? Default { get; init; } - public required string Name { get; init; } - public required string Type { get; init; } - } - public sealed class ClientManifestDocument : System.IEquatable - { - public ClientManifestDocument() { } - public required string Document { get; init; } - public required string Id { get; init; } - public required string Operation { get; init; } - } - public sealed class ClientManifestMachine : System.IEquatable - { - public ClientManifestMachine() { } - public System.Collections.Generic.IReadOnlyList Documents { get; init; } - public required string Id { get; init; } - public required System.Text.Json.Nodes.JsonObject Ir { get; init; } - public required string IrHash { get; init; } - public Trax.Effect.StateMachine.ClientManifestRequirement? Requires { get; init; } - public string IrText() { } - } - public sealed class ClientManifestQueryModel : System.IEquatable - { - public ClientManifestQueryModel() { } - public string? Answer { get; init; } - public System.Collections.Generic.IReadOnlyList Arguments { get; init; } - public required string Field { get; init; } - public string? Namespace { get; init; } - public Trax.Effect.StateMachine.ClientManifestRequirement? Requires { get; init; } - } - public sealed class ClientManifestRequirement : System.IEquatable - { - public ClientManifestRequirement() { } - public bool Anonymous { get; init; } - public System.Collections.Generic.IReadOnlyList Policies { get; init; } - public System.Collections.Generic.IReadOnlyList> RoleSets { get; init; } - } - public sealed class ClientManifestTrain : System.IEquatable - { - public ClientManifestTrain() { } - public string? Answer { get; init; } - public System.Collections.Generic.IReadOnlyList Arguments { get; init; } - public required string Field { get; init; } - public string? Namespace { get; init; } - public bool Progress { get; init; } - public Trax.Effect.StateMachine.ClientManifestRequirement? Requires { get; init; } - public required string Root { get; init; } - } - public enum CompareOp - { - GreaterThan = 0, - GreaterOrEqual = 1, - LessThan = 2, - LessOrEqual = 3, - EqualTo = 4, - } - public sealed class ContextSchema : System.IEquatable - { - public static readonly Trax.Effect.StateMachine.ContextSchema Empty; - public ContextSchema(System.Collections.Generic.IReadOnlyList Fields) { } - public System.Collections.Generic.IReadOnlyList Fields { get; init; } - } - public static class CorpusReplay - { - public static System.Collections.Generic.IReadOnlyList Replay(Trax.Effect.StateMachine.SnapshotMachine machine, string goldenJson) - where TState : struct, System.Enum - where TTrigger : struct, System.Enum { } - } - public sealed class DeclarativeModel : System.IEquatable> - where TState : struct, System.Enum - where TTrigger : struct, System.Enum - { - public DeclarativeModel(System.Collections.Generic.IReadOnlyDictionary ContextSchemas, System.Collections.Generic.IReadOnlyDictionary TriggerInputs, System.Collections.Generic.IReadOnlyList> Transitions, System.Collections.Generic.IReadOnlyDictionary StateInvariants) { } - public System.Collections.Generic.IReadOnlyDictionary ContextSchemas { get; init; } - public Trax.Effect.StateMachine.DifferentialModel? Differential { get; init; } - public System.Collections.Generic.IReadOnlyDictionary StateInvariants { get; init; } - public System.Collections.Generic.IReadOnlyList> Transitions { get; init; } - public System.Collections.Generic.IReadOnlyDictionary TriggerInputs { get; init; } - } - public sealed class DeclarativeTransition : System.IEquatable> - where TState : struct, System.Enum - where TTrigger : struct, System.Enum - { - public DeclarativeTransition(TState From, TTrigger Trigger, TState To, Trax.Effect.StateMachine.Rule? Guard, Trax.Effect.StateMachine.Reduction? Reduce) { } - public TState From { get; init; } - public Trax.Effect.StateMachine.Rule? Guard { get; init; } - public Trax.Effect.StateMachine.Reduction? Reduce { get; init; } - public TState To { get; init; } - public TTrigger Trigger { get; init; } - } - public sealed class DifferentialModel : System.IEquatable> - where TState : struct, System.Enum - where TTrigger : struct, System.Enum - { - public DifferentialModel(System.Collections.Generic.IReadOnlyDictionary> Samples, System.Collections.Generic.IReadOnlyDictionary> Seeds, System.Collections.Generic.IReadOnlyList Contexts) { } - public System.Collections.Generic.IReadOnlyList Contexts { get; init; } - public bool IsEmpty { get; } - public System.Collections.Generic.IReadOnlyDictionary> Samples { get; init; } - public System.Collections.Generic.IReadOnlyDictionary> Seeds { get; init; } - } - public sealed class EffectBinding : System.IEquatable> - where TState : struct, System.Enum - where TTrigger : struct, System.Enum - { - public EffectBinding(TState From, TTrigger Trigger, TState To, System.Type EffectType, string KeyPrefix) { } - public System.Type EffectType { get; init; } - public TState From { get; init; } - public string KeyPrefix { get; init; } - public TState To { get; init; } - public TTrigger Trigger { get; init; } - } - public sealed class FieldMatcher - { - public FieldMatcher(Trax.Effect.StateMachine.RuleSource source, string field) { } - public Trax.Effect.StateMachine.Rule Absent() { } - public Trax.Effect.StateMachine.Rule ArrayOf(Trax.Effect.StateMachine.JsonFieldType type) { } - public Trax.Effect.StateMachine.Rule AtLeast(double value) { } - public Trax.Effect.StateMachine.Rule AtMost(double value) { } - public Trax.Effect.StateMachine.Rule CountAtLeast(int value) { } - public Trax.Effect.StateMachine.Rule CountGreaterThan(int value) { } - public Trax.Effect.StateMachine.Rule EqualTo(double value) { } - public Trax.Effect.StateMachine.Rule GreaterThan(double value) { } - public Trax.Effect.StateMachine.Rule IsFalse() { } - public Trax.Effect.StateMachine.Rule IsOneOf(params string[] values) { } - public Trax.Effect.StateMachine.Rule IsTrue() { } - public Trax.Effect.StateMachine.Rule LengthAtLeast(int value) { } - public Trax.Effect.StateMachine.Rule LengthGreaterThan(int value) { } - public Trax.Effect.StateMachine.Rule LessThan(double value) { } - public Trax.Effect.StateMachine.Rule NonEmpty() { } - public Trax.Effect.StateMachine.Rule OfType(Trax.Effect.StateMachine.JsonFieldType type) { } - public Trax.Effect.StateMachine.Rule Present() { } - } - public sealed class FieldSchema : System.IEquatable - { - public FieldSchema(string Name, Trax.Effect.StateMachine.JsonFieldType Type, bool Nullable, System.Collections.Generic.IReadOnlyList Constraints) { } - public System.Collections.Generic.IReadOnlyList Constraints { get; init; } - public System.Collections.Generic.IReadOnlyList? Enum { get; init; } - public System.Collections.Generic.IReadOnlyList? EnumExact { get; init; } - public System.Collections.Generic.IReadOnlyList? Fields { get; init; } - public string? Format { get; init; } - public Trax.Effect.StateMachine.FieldSchema? Keys { get; init; } - public double? Maximum { get; init; } - public double? Minimum { get; init; } - public string Name { get; init; } - public bool Nullable { get; init; } - public Trax.Effect.StateMachine.JsonFieldType Type { get; init; } - public Trax.Effect.StateMachine.FieldSchema? Values { get; init; } - } - public interface IDifferentialBuilder - where TState : struct, System.Enum - where TTrigger : struct, System.Enum - { - Trax.Effect.StateMachine.IDifferentialBuilder EmptySample(TTrigger trigger); - Trax.Effect.StateMachine.IDifferentialBuilder OutcomeSample(TState invokingState, TOutput output); - Trax.Effect.StateMachine.IDifferentialBuilder Probe(System.Text.Json.Nodes.JsonObject context); - Trax.Effect.StateMachine.IDifferentialBuilder Probe(TContext context); - Trax.Effect.StateMachine.IDifferentialBuilder Sample(TTrigger trigger, System.Text.Json.Nodes.JsonObject input); - Trax.Effect.StateMachine.IDifferentialBuilder Sample(TTrigger trigger, TInput input); - Trax.Effect.StateMachine.IDifferentialBuilder Seed(TState state, System.Text.Json.Nodes.JsonObject context); - Trax.Effect.StateMachine.IDifferentialBuilder Seed(TState state, TContext context); - } - public interface IInvokeBuilder : Trax.Effect.StateMachine.IStateBuilder - where TState : struct, System.Enum - where TTrigger : struct, System.Enum - { - Trax.Effect.StateMachine.IInvokeBuilder OnCancelled(TState target, Trax.Effect.StateMachine.Reduction? reduce = null); - Trax.Effect.StateMachine.IInvokeBuilder OnDone(TState target, Trax.Effect.StateMachine.Rule? when = null, Trax.Effect.StateMachine.Reduction? reduce = null); - Trax.Effect.StateMachine.IInvokeBuilder OnFailed(TState target, Trax.Effect.StateMachine.Reduction? reduce = null); - } - public interface IMachineBuilder - where TState : struct, System.Enum - where TTrigger : struct, System.Enum - { - Trax.Effect.StateMachine.IMachineBuilder CustomGuard(string name, System.Func guard); - Trax.Effect.StateMachine.IMachineBuilder CustomReducer(string name, System.Func reducer); - Trax.Effect.StateMachine.IMachineBuilder Differential(System.Action> configure); - Trax.Effect.StateMachine.IMachineBuilder Discard(System.Action rule); - Trax.Effect.StateMachine.IMachineBuilder Get(System.Action rule); - Trax.Effect.StateMachine.IMachineBuilder Id(string id); - Trax.Effect.StateMachine.IStateBuilder In(TState state); - Trax.Effect.StateMachine.IMachineBuilder InvokedRunLimit(int limit); - Trax.Effect.StateMachine.IMachineBuilder MigrateFrom(int fromVersion, System.Func migrate); - Trax.Effect.StateMachine.IMachineBuilder Start(System.Action> configure); - Trax.Effect.StateMachine.IMachineBuilder StartsAt(TState state, System.Func initialContext); - Trax.Effect.StateMachine.IMachineBuilder SystemOwned(); - Trax.Effect.StateMachine.IMachineBuilder Version(int version); - Trax.Effect.StateMachine.IMachineBuilder Watch(System.Action rule); - } - public interface IReadRuleBuilder - { - Trax.Effect.StateMachine.IReadRuleBuilder Anonymous(); - Trax.Effect.StateMachine.IReadRuleBuilder AnyAuthenticated(); - Trax.Effect.StateMachine.IReadRuleBuilder OwnerOnly(); - Trax.Effect.StateMachine.IReadRuleBuilder Requires(params string[] roles); - Trax.Effect.StateMachine.IReadRuleBuilder RequiresPolicy(string policy); - } - public interface IStartBuilder - { - Trax.Effect.StateMachine.IStartBuilder Anonymous(); - Trax.Effect.StateMachine.IStartBuilder AnyAuthenticated(); - Trax.Effect.StateMachine.IStartBuilder Reduce(Trax.Effect.StateMachine.Reduction reduce); - Trax.Effect.StateMachine.IStartBuilder Requires(params string[] roles); - Trax.Effect.StateMachine.IStartBuilder RequiresPolicy(string policy); - } - public interface IStateBuilder - where TState : struct, System.Enum - where TTrigger : struct, System.Enum - { - Trax.Effect.StateMachine.ITimerBuilder After(System.TimeSpan delay); - Trax.Effect.StateMachine.ITimerBuilder After(System.Linq.Expressions.Expression> duration, System.TimeSpan min, System.TimeSpan max); - Trax.Effect.StateMachine.IStateBuilder Committed(); - Trax.Effect.StateMachine.IStateBuilder Context(); - Trax.Effect.StateMachine.IStateBuilder Context(); - Trax.Effect.StateMachine.IStateBuilder Ends(); - Trax.Effect.StateMachine.IStateBuilder Fails(); - Trax.Effect.StateMachine.IStateBuilder Holds(System.Func validator); - Trax.Effect.StateMachine.IInvokeBuilder Invokes(System.Func input) - where TTrain : Trax.Effect.Services.ServiceTrain.IServiceTrain; - Trax.Effect.StateMachine.ITransitionBuilder On(TTrigger trigger); - Trax.Effect.StateMachine.IStateBuilder Requires(Trax.Effect.StateMachine.Rule constraint); - Trax.Effect.StateMachine.IInvokeBuilder Spawns(System.Linq.Expressions.Expression> childId, System.Func? context = null) - where TChild : class; - } - public interface ITimerBuilder - where TState : struct, System.Enum - where TTrigger : struct, System.Enum - { - Trax.Effect.StateMachine.IStateBuilder GoTo(TState target); - } - public interface ITransitionBuilder - where TState : struct, System.Enum - where TTrigger : struct, System.Enum - { - Trax.Effect.StateMachine.ITransitionBuilder Anonymous(); - Trax.Effect.StateMachine.ITransitionBuilder AnyAuthenticated(); - Trax.Effect.StateMachine.ITransitionBuilder Because(string guardMessage); - Trax.Effect.StateMachine.ITransitionBuilder Reduce(System.Func reduce); - Trax.Effect.StateMachine.ITransitionBuilder Reduce(Trax.Effect.StateMachine.Reduction reduce); - Trax.Effect.StateMachine.ITransitionBuilder Requires(params string[] roles); - Trax.Effect.StateMachine.ITransitionBuilder RequiresPolicy(string policy); - Trax.Effect.StateMachine.ITransitionBuilder RunsOnce(string? keyPrefix = null); - Trax.Effect.StateMachine.IStateBuilder To(TState target); - Trax.Effect.StateMachine.ITransitionBuilder When(System.Func guard); - Trax.Effect.StateMachine.ITransitionBuilder When(Trax.Effect.StateMachine.Rule guard); - Trax.Effect.StateMachine.ITransitionBuilder WithInput(); - } - public static class IrExporter - { - public static string Export(Trax.Effect.StateMachine.BuiltMachine machine) - where TState : struct, System.Enum - where TTrigger : struct, System.Enum { } - } - public enum JsonFieldType - { - String = 0, - Number = 1, - Boolean = 2, - Array = 3, - Object = 4, - Integer = 5, - } - public sealed class MachineBuilder : Trax.Effect.StateMachine.IMachineBuilder - where TState : struct, System.Enum - where TTrigger : struct, System.Enum - { - public MachineBuilder() { } - public Trax.Effect.StateMachine.BuiltMachine Build() { } - public Trax.Effect.StateMachine.IMachineBuilder CustomGuard(string name, System.Func guard) { } - public Trax.Effect.StateMachine.IMachineBuilder CustomReducer(string name, System.Func reducer) { } - public Trax.Effect.StateMachine.IMachineBuilder Differential(System.Action> configure) { } - public Trax.Effect.StateMachine.IMachineBuilder Discard(System.Action rule) { } - public Trax.Effect.StateMachine.IMachineBuilder Get(System.Action rule) { } - public Trax.Effect.StateMachine.IMachineBuilder Id(string id) { } - public Trax.Effect.StateMachine.IStateBuilder In(TState state) { } - public Trax.Effect.StateMachine.IMachineBuilder InvokedRunLimit(int limit) { } - public Trax.Effect.StateMachine.IMachineBuilder MigrateFrom(int fromVersion, System.Func migrate) { } - public Trax.Effect.StateMachine.IMachineBuilder Start(System.Action> configure) { } - public Trax.Effect.StateMachine.IMachineBuilder StartsAt(TState state, System.Func initialContext) { } - public Trax.Effect.StateMachine.IMachineBuilder SystemOwned() { } - public Trax.Effect.StateMachine.IMachineBuilder Version(int version) { } - public Trax.Effect.StateMachine.IMachineBuilder Watch(System.Action rule) { } - } - public sealed class MachineDefinition - where TState : struct, System.Enum - where TTrigger : struct, System.Enum - { - public MachineDefinition() { } - public System.Collections.Generic.IReadOnlyDictionary> ContextValidators { get; init; } - public required System.Func CreateInitialContext { get; init; } - public required string Id { get; init; } - public required TState InitialState { get; init; } - public System.Collections.Generic.IReadOnlyDictionary> Migrations { get; init; } - public required System.Collections.Generic.IReadOnlyList> Transitions { get; init; } - public required int Version { get; init; } - public Trax.Effect.StateMachine.Snapshot CreateInitialSnapshot() { } - } - public sealed class MachineState : System.IEquatable - { - public MachineState(string Name, System.Type? ContextType) { } - public System.Type? ContextType { get; init; } - public string Name { get; init; } - } - public static class MachineTimers - { - public static readonly System.TimeSpan MaxDuration; - } - public sealed class MachineTrigger : System.IEquatable - { - public MachineTrigger(string Name, Trax.Effect.StateMachine.TriggerKind Kind, System.Type? InputType) { } - public System.Type? InputType { get; init; } - public Trax.Effect.StateMachine.TriggerKind Kind { get; init; } - public string Name { get; init; } - } - public sealed class MigrationResult : System.IEquatable - { - public MigrationResult(string State, System.Text.Json.Nodes.JsonObject Context) { } - public System.Text.Json.Nodes.JsonObject Context { get; init; } - public string State { get; init; } - } - public abstract class Reduction : System.IEquatable - { - public sealed class Clear : Trax.Effect.StateMachine.Reduction, System.IEquatable - { - public Clear() { } - } - public sealed class Custom : Trax.Effect.StateMachine.Reduction, System.IEquatable - { - public Custom(string Name) { } - public string Name { get; init; } - } - public sealed class Keep : Trax.Effect.StateMachine.Reduction, System.IEquatable - { - public Keep() { } - } - public sealed class Reset : Trax.Effect.StateMachine.Reduction, System.IEquatable - { - public Reset() { } - } - public sealed class Set : Trax.Effect.StateMachine.Reduction, System.IEquatable - { - public Set(System.Collections.Generic.IReadOnlyList Steps) { } - public System.Collections.Generic.IReadOnlyList Steps { get; init; } - } - } - public static class ReductionEvaluator - { - public static System.Text.Json.Nodes.JsonObject Apply(Trax.Effect.StateMachine.Reduction reduction, System.Text.Json.Nodes.JsonObject context, System.Text.Json.Nodes.JsonNode? input, System.Text.Json.Nodes.JsonObject initialContext, System.Collections.Generic.IReadOnlyDictionary>? customReducers = null) { } - } - [System.Text.Json.Serialization.JsonConverter(typeof(Trax.Effect.StateMachine.RefusalCodeJsonConverter))] - public enum RefusalCode - { - NoTransition = 0, - GuardFailed = 1, - InvalidContext = 2, - InternalError = 3, - InvalidInput = 4, - OutcomeBound = 5, - TimerBound = 6, - TooLarge = 7, - DiscardNotAllowed = 8, - EffectInProgress = 9, - Malformed = 10, - UnknownMachine = 11, - VersionMismatch = 12, - UnknownState = 13, - Forbidden = 14, - RequestIdReused = 15, - EffectBound = 16, - SaveNotAllowed = 17, - ClientOutdated = 18, - ServerOutdated = 19, - TooManyDrafts = 20, - InvalidRequestId = 21, - Unauthenticated = 22, - NoStart = 23, - SystemOwned = 24, - NotFound = 25, - TooManySubscriptions = 26, - SchemaMismatch = 27, - Conflict = 28, - NoEffect = 29, - DeliveryFailed = 30, - ClientDivergence = 31, - StateReserved = 32, - DraftInvoking = 33, - DraftUnreadable = 34, - DraftCommitted = 35, - DraftChanged = 36, - InvokeLimitReached = 37, - InvokeForbidden = 38, - InvokeChainUserOwned = 39, - } - public sealed class RefusalCodeJsonConverter : System.Text.Json.Serialization.JsonConverter - { - public RefusalCodeJsonConverter() { } - public override Trax.Effect.StateMachine.RefusalCode Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { } - public override void Write(System.Text.Json.Utf8JsonWriter writer, Trax.Effect.StateMachine.RefusalCode value, System.Text.Json.JsonSerializerOptions options) { } - } - public static class RefusalCodes - { - public static System.Collections.Generic.IReadOnlyList All { get; } - public static string ToWire(this Trax.Effect.StateMachine.RefusalCode code) { } - public static bool TryParse(string? text, out Trax.Effect.StateMachine.RefusalCode code) { } - } - public abstract class RehydrationResult : System.IEquatable - { - public sealed class Error : Trax.Effect.StateMachine.RehydrationResult, System.IEquatable - { - public Error(Trax.Effect.StateMachine.RefusalCode Code, string Message) { } - public Trax.Effect.StateMachine.RefusalCode Code { get; init; } - public string Message { get; init; } - } - public sealed class Ok : Trax.Effect.StateMachine.RehydrationResult, System.IEquatable - { - public Ok(Trax.Effect.StateMachine.Snapshot Snapshot) { } - public Trax.Effect.StateMachine.Snapshot Snapshot { get; init; } - } - } - public abstract class Rule : System.IEquatable - { - public sealed class Absent : Trax.Effect.StateMachine.Rule, System.IEquatable - { - public Absent(Trax.Effect.StateMachine.RuleSource Source, string Field) { } - public string Field { get; init; } - public Trax.Effect.StateMachine.RuleSource Source { get; init; } - } - public sealed class All : Trax.Effect.StateMachine.Rule, System.IEquatable - { - public All(System.Collections.Generic.IReadOnlyList Rules) { } - public System.Collections.Generic.IReadOnlyList Rules { get; init; } - } - public sealed class Any : Trax.Effect.StateMachine.Rule, System.IEquatable - { - public Any(System.Collections.Generic.IReadOnlyList Rules) { } - public System.Collections.Generic.IReadOnlyList Rules { get; init; } - } - public sealed class ArrayOf : Trax.Effect.StateMachine.Rule, System.IEquatable - { - public ArrayOf(Trax.Effect.StateMachine.RuleSource Source, string Field, Trax.Effect.StateMachine.JsonFieldType ElementType) { } - public Trax.Effect.StateMachine.JsonFieldType ElementType { get; init; } - public string Field { get; init; } - public Trax.Effect.StateMachine.RuleSource Source { get; init; } - } - public sealed class BoolEquals : Trax.Effect.StateMachine.Rule, System.IEquatable - { - public BoolEquals(Trax.Effect.StateMachine.RuleSource Source, string Field, bool Value) { } - public string Field { get; init; } - public Trax.Effect.StateMachine.RuleSource Source { get; init; } - public bool Value { get; init; } - } - public sealed class Compare : Trax.Effect.StateMachine.Rule, System.IEquatable - { - public Compare(Trax.Effect.StateMachine.RuleSource Source, string Field, Trax.Effect.StateMachine.CompareOp Op, double Value) { } - public string Field { get; init; } - public Trax.Effect.StateMachine.CompareOp Op { get; init; } - public Trax.Effect.StateMachine.RuleSource Source { get; init; } - public double Value { get; init; } - } - public sealed class Count : Trax.Effect.StateMachine.Rule, System.IEquatable - { - public Count(Trax.Effect.StateMachine.RuleSource Source, string Field, Trax.Effect.StateMachine.CompareOp Op, int Value) { } - public string Field { get; init; } - public Trax.Effect.StateMachine.CompareOp Op { get; init; } - public Trax.Effect.StateMachine.RuleSource Source { get; init; } - public int Value { get; init; } - } - public sealed class Custom : Trax.Effect.StateMachine.Rule, System.IEquatable - { - public Custom(string Name) { } - public string Name { get; init; } - } - public sealed class Length : Trax.Effect.StateMachine.Rule, System.IEquatable - { - public Length(Trax.Effect.StateMachine.RuleSource Source, string Field, Trax.Effect.StateMachine.CompareOp Op, int Value) { } - public string Field { get; init; } - public Trax.Effect.StateMachine.CompareOp Op { get; init; } - public Trax.Effect.StateMachine.RuleSource Source { get; init; } - public int Value { get; init; } - } - public sealed class NonEmpty : Trax.Effect.StateMachine.Rule, System.IEquatable - { - public NonEmpty(Trax.Effect.StateMachine.RuleSource Source, string Field) { } - public string Field { get; init; } - public Trax.Effect.StateMachine.RuleSource Source { get; init; } - } - public sealed class OfType : Trax.Effect.StateMachine.Rule, System.IEquatable - { - public OfType(Trax.Effect.StateMachine.RuleSource Source, string Field, Trax.Effect.StateMachine.JsonFieldType Type) { } - public string Field { get; init; } - public Trax.Effect.StateMachine.RuleSource Source { get; init; } - public Trax.Effect.StateMachine.JsonFieldType Type { get; init; } - } - public sealed class OneOf : Trax.Effect.StateMachine.Rule, System.IEquatable - { - public OneOf(Trax.Effect.StateMachine.RuleSource Source, string Field, System.Collections.Generic.IReadOnlyList Values) { } - public string Field { get; init; } - public Trax.Effect.StateMachine.RuleSource Source { get; init; } - public System.Collections.Generic.IReadOnlyList Values { get; init; } - } - public sealed class Present : Trax.Effect.StateMachine.Rule, System.IEquatable - { - public Present(Trax.Effect.StateMachine.RuleSource Source, string Field) { } - public string Field { get; init; } - public Trax.Effect.StateMachine.RuleSource Source { get; init; } - } - } - public static class RuleEvaluator - { - public static bool Evaluate(Trax.Effect.StateMachine.Rule rule, System.Text.Json.Nodes.JsonObject context, System.Text.Json.Nodes.JsonNode? input, System.Collections.Generic.IReadOnlyDictionary>? customGuards = null) { } - } - public enum RuleSource - { - Context = 0, - Input = 1, - } - public static class Rules - { - public static Trax.Effect.StateMachine.Rule All(params Trax.Effect.StateMachine.Rule[] rules) { } - public static Trax.Effect.StateMachine.Rule Any(params Trax.Effect.StateMachine.Rule[] rules) { } - public static Trax.Effect.StateMachine.Reduction Clear() { } - public static Trax.Effect.StateMachine.FieldMatcher Field(System.Linq.Expressions.Expression> selector) { } - public static Trax.Effect.StateMachine.FieldMatcher Input(System.Linq.Expressions.Expression> selector) { } - public static Trax.Effect.StateMachine.Reduction Keep() { } - public static Trax.Effect.StateMachine.Reduction Reset() { } - public static Trax.Effect.StateMachine.SetBuilder Set(System.Linq.Expressions.Expression> field) { } - public static Trax.Effect.StateMachine.Reduction SetAll(params Trax.Effect.StateMachine.Reduction[] sets) { } - } - public sealed class SetBuilder - { - public SetBuilder(string field) { } - public Trax.Effect.StateMachine.Reduction FromInput(System.Linq.Expressions.Expression> input) { } - public Trax.Effect.StateMachine.Reduction ToValue(System.Text.Json.Nodes.JsonNode? value) { } - } - public sealed class SetStep : System.IEquatable - { - public SetStep(string Field, Trax.Effect.StateMachine.ValueSource Source) { } - public string Field { get; init; } - public Trax.Effect.StateMachine.ValueSource Source { get; init; } - } - public sealed class Snapshot : System.IEquatable - { - public Snapshot() { } - public required System.Text.Json.Nodes.JsonObject Context { get; init; } - public required string Machine { get; init; } - public required string State { get; init; } - public required int Version { get; init; } - public bool Equals(Trax.Effect.StateMachine.Snapshot? other) { } - public override int GetHashCode() { } - } - public sealed class SnapshotMachine - where TState : struct, System.Enum - where TTrigger : struct, System.Enum - { - public SnapshotMachine(Trax.Effect.StateMachine.MachineDefinition definition) { } - public Trax.Effect.StateMachine.MachineDefinition Definition { get; } - public Trax.Effect.StateMachine.AdvanceResult Advance(Trax.Effect.StateMachine.Snapshot snapshot, string trigger, System.Text.Json.Nodes.JsonNode? input = null) { } - public System.Collections.Generic.IReadOnlyList AvailableTriggers(Trax.Effect.StateMachine.Snapshot snapshot) { } - public bool CanFire(Trax.Effect.StateMachine.Snapshot snapshot, string trigger, System.Text.Json.Nodes.JsonNode? input = null) { } - public System.Text.Json.Nodes.JsonObject Describe() { } - public Trax.Effect.StateMachine.RehydrationResult Rehydrate(string json) { } - public string Serialize(Trax.Effect.StateMachine.Snapshot snapshot) { } - } - public static class StorableJson - { - public static string? Problem(System.Text.Json.Nodes.JsonNode? node) { } - } - public sealed class TransitionDefinition - where TState : struct, System.Enum - where TTrigger : struct, System.Enum - { - public TransitionDefinition() { } - public required TState From { get; init; } - public System.Func? Guard { get; init; } - public string? GuardMessage { get; init; } - public System.Func? Reduce { get; init; } - public required TState To { get; init; } - public required TTrigger Trigger { get; init; } - } - public enum TriggerKind - { - Client = 0, - EffectBound = 1, - Outcome = 2, - Timer = 3, - } - public abstract class ValueSource : System.IEquatable - { - public sealed class Constant : Trax.Effect.StateMachine.ValueSource, System.IEquatable - { - public Constant(System.Text.Json.Nodes.JsonNode? Value) { } - public System.Text.Json.Nodes.JsonNode? Value { get; init; } - } - public sealed class FromInput : Trax.Effect.StateMachine.ValueSource, System.IEquatable - { - public FromInput(string Field) { } - public string Field { get; init; } - } - } -} \ No newline at end of file diff --git a/Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.StateMachine.Persistence.received.txt b/Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.StateMachine.Persistence.received.txt new file mode 100644 index 000000000..3de8f5881 --- /dev/null +++ b/Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.StateMachine.Persistence.received.txt @@ -0,0 +1,601 @@ +namespace Trax.StateMachine.Persistence +{ + public abstract class Actor : System.IEquatable + { + public sealed class Client : Trax.StateMachine.Persistence.Actor, System.IEquatable + { + public Client(string userKey, params string[] roles) { } + public Client(string UserKey, System.Func IsInRole, System.Func> SatisfiesPolicy) { } + public System.Func IsInRole { get; init; } + public System.Func> SatisfiesPolicy { get; init; } + public string UserKey { get; init; } + } + } + public abstract class AdvanceOutcome : System.IEquatable + { + public sealed class Advanced : Trax.StateMachine.Persistence.AdvanceOutcome, System.IEquatable + { + public Advanced(Trax.StateMachine.Snapshot Snapshot) { } + public System.DateTimeOffset? DueAt { get; init; } + public bool DueAtKnown { get; init; } + public long? Revision { get; init; } + public long? RowId { get; init; } + public Trax.StateMachine.Snapshot Snapshot { get; init; } + } + public sealed class Conflict : Trax.StateMachine.Persistence.AdvanceOutcome, System.IEquatable + { + public Conflict() { } + } + public sealed class LoadError : Trax.StateMachine.Persistence.AdvanceOutcome, System.IEquatable + { + public LoadError(Trax.StateMachine.RefusalCode Code, string Message) { } + public Trax.StateMachine.RefusalCode Code { get; init; } + public string Message { get; init; } + } + public sealed class NotFound : Trax.StateMachine.Persistence.AdvanceOutcome, System.IEquatable + { + public NotFound() { } + } + public sealed class Rejected : Trax.StateMachine.Persistence.AdvanceOutcome, System.IEquatable + { + public Rejected(Trax.StateMachine.RefusalCode Reason, string? Detail) { } + public string? Detail { get; init; } + public Trax.StateMachine.RefusalCode Reason { get; init; } + } + } + public sealed class AppliedRequest : System.IEquatable + { + public AppliedRequest(string RequestId, string? Trigger, string? FromState) { } + public string? FromState { get; init; } + public string RequestId { get; init; } + public string? Trigger { get; init; } + } + public abstract class AutosaveResult : System.IEquatable + { + public sealed class Conflict : Trax.StateMachine.Persistence.AutosaveResult, System.IEquatable + { + public Conflict() { } + } + public sealed class Rejected : Trax.StateMachine.Persistence.AutosaveResult, System.IEquatable + { + public Rejected(Trax.StateMachine.RefusalCode Code, string Message) { } + public Trax.StateMachine.RefusalCode Code { get; init; } + public string Message { get; init; } + } + public sealed class Saved : Trax.StateMachine.Persistence.AutosaveResult, System.IEquatable + { + public Saved(Trax.StateMachine.Snapshot Snapshot) { } + public System.DateTimeOffset? DueAt { get; init; } + public long? Revision { get; init; } + public long? RowId { get; init; } + public Trax.StateMachine.Snapshot Snapshot { get; init; } + } + } + public abstract class ClaimResult : System.IEquatable + { + public sealed class Lost : Trax.StateMachine.Persistence.ClaimResult, System.IEquatable + { + public Lost() { } + } + public sealed class Won : Trax.StateMachine.Persistence.ClaimResult, System.IEquatable + { + public Won(System.Guid OwnerToken) { } + public System.Guid OwnerToken { get; init; } + } + } + public sealed class CompletedEffect : System.IEquatable + { + public CompletedEffect(string Receipt, string? ContentFingerprint) { } + public string? ContentFingerprint { get; init; } + public string Receipt { get; init; } + } + public abstract class DiscardOutcome : System.IEquatable + { + public sealed class Discarded : Trax.StateMachine.Persistence.DiscardOutcome, System.IEquatable + { + public Discarded() { } + } + public sealed class Rejected : Trax.StateMachine.Persistence.DiscardOutcome, System.IEquatable + { + public Rejected(Trax.StateMachine.RefusalCode Code, string Message) { } + public Trax.StateMachine.RefusalCode Code { get; init; } + public string Message { get; init; } + } + } + public sealed class EfEffectClaimStore : Trax.StateMachine.Persistence.IEffectClaimStore + { + public EfEffectClaimStore(Trax.Effect.Data.Services.DataContext.IDataContext db, Trax.Effect.Data.Services.SqlDialect.ISqlDialect? dialect = null) { } + public System.Threading.Tasks.Task Complete(string effectKey, System.Guid ownerToken, string receipt, System.Threading.CancellationToken cancellationToken = default) { } + public System.Threading.Tasks.Task GetCompleted(string effectKey, System.Threading.CancellationToken cancellationToken = default) { } + public System.Threading.Tasks.Task GetReceipt(string effectKey, System.Threading.CancellationToken cancellationToken = default) { } + public System.Threading.Tasks.Task ReclaimStale(System.DateTimeOffset cutoff, System.Threading.CancellationToken cancellationToken = default) { } + public System.Threading.Tasks.Task Release(string effectKey, System.Threading.CancellationToken cancellationToken = default) { } + public System.Threading.Tasks.Task ReleaseForReset(string effectKey, System.Func receiptRecorded, System.Threading.CancellationToken cancellationToken = default) { } + public System.Threading.Tasks.Task ReleaseOwned(string effectKey, System.Guid ownerToken, System.Threading.CancellationToken cancellationToken = default) { } + public System.Threading.Tasks.Task TryClaim(string effectKey, System.TimeSpan lease, System.Threading.CancellationToken cancellationToken = default) { } + public System.Threading.Tasks.Task TryClaim(string effectKey, System.TimeSpan lease, string? contentFingerprint, System.Threading.CancellationToken cancellationToken = default) { } + } + public sealed class EfSnapshotStore : Trax.StateMachine.Persistence.ISnapshotStore + { + public EfSnapshotStore(Trax.Effect.Data.Services.DataContext.IDataContext db, Trax.Effect.Data.Services.SqlDialect.ISqlDialect? dialect = null) { } + public System.Threading.Tasks.Task Delete(string userKey, System.Guid id, System.Threading.CancellationToken cancellationToken = default) { } + public System.Threading.Tasks.Task Delete(string userKey, string machine, System.Guid id, System.Threading.CancellationToken cancellationToken = default) { } + public System.Threading.Tasks.Task Get(string userKey, System.Guid id, System.Threading.CancellationToken cancellationToken = default) { } + public System.Threading.Tasks.Task Get(string userKey, string machine, System.Guid id, System.Threading.CancellationToken cancellationToken = default) { } + public System.Threading.Tasks.Task Insert(string userKey, System.Guid id, Trax.StateMachine.Snapshot snapshot, System.Threading.CancellationToken cancellationToken = default) { } + public System.Threading.Tasks.Task Update(string userKey, System.Guid id, Trax.StateMachine.Snapshot snapshot, System.Guid expectedToken, string? requestId = null, System.Threading.CancellationToken cancellationToken = default) { } + public System.Threading.Tasks.Task UpdateWithRequest(string userKey, System.Guid id, Trax.StateMachine.Snapshot snapshot, System.Guid expectedToken, Trax.StateMachine.Persistence.AppliedRequest? request, System.Threading.CancellationToken cancellationToken = default) { } + public System.Threading.Tasks.Task Upsert(string userKey, System.Guid id, Trax.StateMachine.Snapshot snapshot, System.Threading.CancellationToken cancellationToken = default) { } + } + public sealed class EffectClaimSweeper + { + public EffectClaimSweeper(Trax.StateMachine.Persistence.IEffectClaimStore claims) { } + public System.Threading.Tasks.Task Sweep(System.DateTimeOffset cutoff, System.Threading.CancellationToken cancellationToken = default) { } + } + public abstract class EffectOutcome : System.IEquatable + { + public sealed class AlreadyRan : Trax.StateMachine.Persistence.EffectOutcome, System.IEquatable + { + public AlreadyRan(string Receipt) { } + public string? ContentFingerprint { get; init; } + public string Receipt { get; init; } + } + public sealed class InProgress : Trax.StateMachine.Persistence.EffectOutcome, System.IEquatable + { + public InProgress() { } + } + public sealed class Ran : Trax.StateMachine.Persistence.EffectOutcome, System.IEquatable + { + public Ran(string Receipt) { } + public string Receipt { get; init; } + } + } + public sealed class GenericStateMachineMutationOptions + { + public GenericStateMachineMutationOptions() { } + public string? Policy { get; set; } + } + public interface ICallerAuthorization + { + bool IsInRole(string role); + System.Threading.Tasks.Task IsPolicyRegistered(string policy); + System.Threading.Tasks.Task SatisfiesPolicy(string policy, System.Threading.CancellationToken cancellationToken = default); + } + public interface IEffectClaimStore + { + System.Threading.Tasks.Task Complete(string effectKey, System.Guid ownerToken, string receipt, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task GetCompleted(string effectKey, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task GetReceipt(string effectKey, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task ReclaimStale(System.DateTimeOffset cutoff, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task Release(string effectKey, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task ReleaseForReset(string effectKey, System.Func receiptRecorded, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task ReleaseOwned(string effectKey, System.Guid ownerToken, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task TryClaim(string effectKey, System.TimeSpan lease, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task TryClaim(string effectKey, System.TimeSpan lease, string? contentFingerprint, System.Threading.CancellationToken cancellationToken = default); + } + public interface IMachine + { + string? Corpus { get; } + bool HasEffect { get; } + string Name { get; } + string? SchemaHash { get; } + System.Type? StartInputType { get; } + System.Collections.Generic.IReadOnlyList States { get; } + System.Collections.Generic.IReadOnlyList Triggers { get; } + Trax.StateMachine.Persistence.ISnapshotEffectRunner? CreateEffectRunner(Trax.StateMachine.Persistence.ISnapshotDraftService service, Trax.StateMachine.Persistence.IdempotentEffect idempotent, System.IServiceProvider services); + Trax.StateMachine.Persistence.ISnapshotDraftService CreateService(Trax.StateMachine.Persistence.ISnapshotStore store, Trax.StateMachine.Persistence.IEffectClaimStore? claims, System.TimeSpan? draftTtl = default); + string ExportIr(); + System.Collections.Generic.IReadOnlyList SelfCheck(); + } + public interface IMachineInstances + { + System.Threading.Tasks.Task Advance(System.Guid id, string trigger, System.Text.Json.Nodes.JsonNode? input = null, System.Threading.CancellationToken cancellationToken = default) + where TMachine : Trax.StateMachine.Persistence.IMachine; + System.Threading.Tasks.Task Advance(Trax.StateMachine.Persistence.MachineKey key, string trigger, System.Text.Json.Nodes.JsonNode? input = null, System.Threading.CancellationToken cancellationToken = default) + where TMachine : Trax.StateMachine.Persistence.IMachine; + System.Threading.Tasks.Task Start(Trax.StateMachine.Persistence.MachineKey key, System.Text.Json.Nodes.JsonObject? context = null, System.Threading.CancellationToken cancellationToken = default) + where TMachine : Trax.StateMachine.Persistence.IMachine; + } + public interface ISnapshotDraftService + { + System.Threading.Tasks.Task Advance(Trax.StateMachine.Persistence.Actor actor, System.Guid id, string trigger, System.Text.Json.Nodes.JsonNode? input = null, string? requestId = null, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task Advance(string userKey, System.Guid id, string trigger, System.Text.Json.Nodes.JsonNode? input = null, string? requestId = null, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task Advance(Trax.StateMachine.Persistence.Actor actor, System.Guid id, string trigger, System.Text.Json.Nodes.JsonNode? input, string? requestId, string? clientResult, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task Advance(string userKey, System.Guid id, string trigger, System.Text.Json.Nodes.JsonNode? input, string? requestId, string? clientResult, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task Autosave(string userKey, System.Guid id, string snapshotJson, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task Discard(Trax.StateMachine.Persistence.Actor actor, System.Guid id, string requestId, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task Load(Trax.StateMachine.Persistence.Actor actor, System.Guid id, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task Load(string userKey, System.Guid id, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task Send(Trax.StateMachine.Persistence.Actor actor, System.Guid id, string requestId, System.Threading.CancellationToken cancellationToken = default); + string Serialize(Trax.StateMachine.Snapshot snapshot); + System.Threading.Tasks.Task Start(Trax.StateMachine.Persistence.Actor actor, System.Text.Json.Nodes.JsonObject? input, string requestId, System.Threading.CancellationToken cancellationToken = default); + } + public interface ISnapshotEffect + { + System.Threading.Tasks.Task Run(Trax.StateMachine.Snapshot snapshot, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task Run(Trax.StateMachine.Snapshot snapshot, string effectKey, System.Threading.CancellationToken cancellationToken); + } + public interface ISnapshotEffectRunner + { + System.Threading.Tasks.Task Run(string userKey, System.Guid id, string requestId, System.Threading.CancellationToken cancellationToken = default); + } + public interface ISnapshotMachineRegistry + { + Trax.StateMachine.Persistence.ISnapshotEffectRunner? EffectRunner(string machine); + string? SchemaHash(string machine); + Trax.StateMachine.Persistence.ISnapshotDraftService? Service(string machine); + } + public interface ISnapshotPrincipal + { + string? CurrentUserKey { get; } + } + public interface ISnapshotStore + { + System.Threading.Tasks.Task Delete(string userKey, System.Guid id, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task Delete(string userKey, string machine, System.Guid id, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task Get(string userKey, System.Guid id, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task Get(string userKey, string machine, System.Guid id, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task Insert(string userKey, System.Guid id, Trax.StateMachine.Snapshot snapshot, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task Update(string userKey, System.Guid id, Trax.StateMachine.Snapshot snapshot, System.Guid expectedToken, string? requestId = null, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task UpdateWithRequest(string userKey, System.Guid id, Trax.StateMachine.Snapshot snapshot, System.Guid expectedToken, Trax.StateMachine.Persistence.AppliedRequest? request, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task Upsert(string userKey, System.Guid id, Trax.StateMachine.Snapshot snapshot, System.Threading.CancellationToken cancellationToken = default); + } + public sealed class IdempotentEffect + { + public IdempotentEffect(Trax.StateMachine.Persistence.IEffectClaimStore claims) { } + public System.Threading.Tasks.Task RunOnce(string effectKey, System.Func> effect, System.TimeSpan? lease = default, System.Threading.CancellationToken cancellationToken = default) { } + public System.Threading.Tasks.Task RunOnce(string effectKey, string? contentFingerprint, System.Func> effect, System.TimeSpan? lease = default, System.Threading.CancellationToken cancellationToken = default) { } + } + public sealed class InvokedRun : System.IEquatable + { + public InvokedRun(string Machine, System.Guid InstanceId, Trax.Effect.Enums.SnapshotOwnerKind OwnerKind, string? UserKey) { } + public System.Guid InstanceId { get; init; } + public string Machine { get; init; } + public Trax.Effect.Enums.SnapshotOwnerKind OwnerKind { get; init; } + public string? UserKey { get; init; } + } + public abstract class LoadResult : System.IEquatable + { + public sealed class Invalid : Trax.StateMachine.Persistence.LoadResult, System.IEquatable + { + public Invalid(Trax.StateMachine.RefusalCode Code, string Message) { } + public Trax.StateMachine.RefusalCode Code { get; init; } + public string Message { get; init; } + } + public sealed class Loaded : Trax.StateMachine.Persistence.LoadResult, System.IEquatable + { + public Loaded(Trax.StateMachine.Snapshot Snapshot) { } + public System.DateTimeOffset? DueAt { get; init; } + public long? Revision { get; init; } + public long? RowId { get; init; } + public Trax.StateMachine.Snapshot Snapshot { get; init; } + } + public sealed class NotFound : Trax.StateMachine.Persistence.LoadResult, System.IEquatable + { + public NotFound() { } + } + } + public static class MachineCensus + { + public const string Undeclared = "undeclared"; + public static System.Collections.Generic.IReadOnlyList Describe(System.Collections.Generic.IEnumerable machines) { } + } + public sealed class MachineCensusEntry : System.IEquatable + { + public MachineCensusEntry(string Machine, string Name, string Kind, string Rule, System.Collections.Generic.IReadOnlyList Surfaces) { } + public string Kind { get; init; } + public string Machine { get; init; } + public string Name { get; init; } + public string Rule { get; init; } + public System.Collections.Generic.IReadOnlyList Surfaces { get; init; } + } + public sealed class MachineInstance : System.IEquatable + { + public MachineInstance(System.Guid Id, string Machine, string State, bool Created) { } + public bool Created { get; init; } + public System.Guid Id { get; init; } + public string Machine { get; init; } + public string State { get; init; } + } + public static class MachineInstanceId + { + public static readonly System.Guid Root; + public static System.Guid For(string machine, Trax.StateMachine.Persistence.MachineKey key) { } + public static System.Guid Namespace(string machine) { } + } + public sealed class MachineKey : System.IEquatable + { + public System.Collections.Generic.IReadOnlyList Parts { get; } + public bool Equals(Trax.StateMachine.Persistence.MachineKey? other) { } + public override bool Equals(object? obj) { } + public override int GetHashCode() { } + public override string ToString() { } + public static Trax.StateMachine.Persistence.MachineKey Of(params string[] parts) { } + public static Trax.StateMachine.Persistence.MachineKey op_Implicit(string part) { } + } + public abstract class Machine : Trax.StateMachine.Persistence.IMachine + where TState : struct, System.Enum + where TTrigger : struct, System.Enum + { + protected Machine() { } + public virtual string? Corpus { get; } + public bool HasEffect { get; } + public string Name { get; } + public string? SchemaHash { get; } + public System.Type? StartInputType { get; } + public System.Collections.Generic.IReadOnlyList States { get; } + public System.Collections.Generic.IReadOnlyList Triggers { get; } + protected abstract void Configure(Trax.StateMachine.IMachineBuilder machine); + public Trax.StateMachine.Persistence.ISnapshotEffectRunner? CreateEffectRunner(Trax.StateMachine.Persistence.ISnapshotDraftService service, Trax.StateMachine.Persistence.IdempotentEffect idempotent, System.IServiceProvider services) { } + public Trax.StateMachine.Persistence.ISnapshotDraftService CreateService(Trax.StateMachine.Persistence.ISnapshotStore store, Trax.StateMachine.Persistence.IEffectClaimStore? claims, System.TimeSpan? draftTtl = default) { } + public string ExportIr() { } + public System.Collections.Generic.IReadOnlyList SelfCheck() { } + } + public sealed class RecordedRequest : System.IEquatable + { + public RecordedRequest(string RequestId, string Fingerprint, long Revision, string ResultSnapshot) { } + public string Fingerprint { get; init; } + public string? FromState { get; init; } + public string RequestId { get; init; } + public string ResultSnapshot { get; init; } + public long Revision { get; init; } + public string? Trigger { get; init; } + } + public static class RequestIdRing + { + public const int Capacity = 16; + public const int MaxBytes = 131072; + public const int MaxRequestIdLength = 200; + } + public static class SnapshotFingerprint + { + public static string Of(string canonicalWire) { } + } + public static class SnapshotLimits + { + public const int MaxSnapshotBytes = 65536; + public static readonly System.TimeSpan DefaultEffectLease; + } + public sealed class SnapshotProblem : System.IEquatable + { + public SnapshotProblem() { } + public required Trax.StateMachine.RefusalCode Code { get; init; } + public required string Message { get; init; } + } + public static class SnapshotSelfCheck + { + public static System.Collections.Generic.IReadOnlyList Run(System.Collections.Generic.IEnumerable machines) { } + } + public abstract class StartOutcome : System.IEquatable + { + public sealed class Rejected : Trax.StateMachine.Persistence.StartOutcome, System.IEquatable + { + public Rejected(Trax.StateMachine.RefusalCode Code, string Message) { } + public Trax.StateMachine.RefusalCode Code { get; init; } + public string Message { get; init; } + } + public sealed class Started : Trax.StateMachine.Persistence.StartOutcome, System.IEquatable + { + public Started(System.Guid Id, Trax.StateMachine.Snapshot Snapshot, long Revision, bool Created) { } + public bool Created { get; init; } + public System.DateTimeOffset? DueAt { get; init; } + public System.Guid Id { get; init; } + public long Revision { get; init; } + public Trax.StateMachine.Snapshot Snapshot { get; init; } + } + } + public enum StateMachineChangeFeed + { + Notify = 0, + Poll = 1, + } + public static class StateMachineHealthCheckExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddTraxStateMachineSelfCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name = "state-machines") { } + } + public static class StateMachineInstruments + { + public const string ClientDivergence = "trax.machine.client_divergence"; + public const string EffectsAbandoned = "trax.machine.effect.abandoned"; + public const string MeterName = "Trax.StateMachine"; + public const string NotificationQueueUsage = "trax.machine.snapshot_notice.queue_usage"; + public const string SnapshotNoticeMalformed = "trax.machine.snapshot_notice.malformed"; + public const string TimerFireErrors = "trax.machine.timer.fire_errors"; + public const string TimerFireFailed = "trax.machine.timer.fire_failed"; + } + public sealed class StateMachineOptions + { + public const int DefaultMaxDraftsPerUser = 50; + public static readonly System.TimeSpan DefaultDraftTtl; + public static readonly System.TimeSpan DefaultMaxDraftLifetime; + public static readonly System.TimeSpan MinimumChangeFeedPollInterval; + public StateMachineOptions() { } + public Trax.StateMachine.Persistence.StateMachineChangeFeed ChangeFeed { get; set; } + public System.TimeSpan ChangeFeedPollInterval { get; set; } + public System.TimeSpan? DraftTtl { get; set; } + public System.TimeSpan InvokeOutcomeSweepInterval { get; set; } + public System.TimeSpan InvokeOutcomeSweepIntervalWhileListening { get; set; } + public System.TimeSpan? MaxDraftLifetime { get; set; } + public int? MaxDraftsPerUser { get; set; } + public Trax.StateMachine.Persistence.StateMachineOptions ExposeGenericStateMachineMutations(System.Action configure) { } + } + public static class StateMachinesBuilderExtensions + { + public static Trax.Effect.Configuration.TraxBuilder.TraxBuilderWithEffects AddStateMachines(this Trax.Effect.Configuration.TraxBuilder.TraxBuilderWithEffects builder, params System.Reflection.Assembly[] assemblies) { } + public static Trax.Effect.Configuration.TraxBuilder.TraxBuilderWithEffects AddStateMachines(this Trax.Effect.Configuration.TraxBuilder.TraxBuilderWithEffects builder, System.Action? configure, params System.Reflection.Assembly[] assemblies) { } + } + public sealed class StoredSnapshot : System.IEquatable + { + public StoredSnapshot(string Json, System.Guid Token, string? LastRequestId, System.DateTimeOffset UpdatedAt) { } + public System.DateTimeOffset? DueAt { get; init; } + public string? InvokeToken { get; init; } + public string Json { get; init; } + public Trax.StateMachine.Persistence.AppliedRequest? LastRequest { get; } + public string? LastRequestFromState { get; init; } + public string? LastRequestId { get; init; } + public string? LastRequestTrigger { get; init; } + public System.Collections.Generic.IReadOnlyList? RecentRequests { get; init; } + public long? Revision { get; init; } + public long? RowId { get; init; } + public System.Guid Token { get; init; } + public System.DateTimeOffset UpdatedAt { get; init; } + } +} +namespace Trax.StateMachine.Persistence.Mutations +{ + [Trax.Effect.Attributes.TraxAuthorize] + public class AdvanceSnapshot : Trax.Effect.Services.ServiceTrain.ServiceTrain, System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain, Trax.StateMachine.Persistence.Mutations.IAdvanceSnapshot + { + public AdvanceSnapshot() { } + protected override System.Threading.Tasks.Task> Junctions() { } + } + public class AdvanceSnapshotInput : System.IEquatable + { + public AdvanceSnapshotInput() { } + [Trax.Effect.Attributes.TraxSensitive] + public string? ClientResult { get; init; } + public required System.Guid Id { get; init; } + public string? Input { get; init; } + public required string Machine { get; init; } + public string? RequestId { get; init; } + public string? SchemaHash { get; init; } + [Trax.Effect.Attributes.TraxSensitive] + public string? SensitiveInput { get; init; } + public required string Trigger { get; init; } + } + public class AdvanceSnapshotOutput : System.IEquatable + { + public AdvanceSnapshotOutput() { } + public System.DateTimeOffset? DueAt { get; init; } + public bool DueAtKnown { get; init; } + public Trax.StateMachine.Persistence.SnapshotProblem? Problem { get; init; } + public long? Revision { get; init; } + public long? RowId { get; init; } + public string? Snapshot { get; init; } + } + [Trax.Effect.Attributes.TraxAuthorize] + public class DiscardSnapshot : Trax.Effect.Services.ServiceTrain.ServiceTrain, System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain, Trax.StateMachine.Persistence.Mutations.IDiscardSnapshot + { + public DiscardSnapshot() { } + protected override System.Threading.Tasks.Task> Junctions() { } + } + public class DiscardSnapshotInput : System.IEquatable + { + public DiscardSnapshotInput() { } + public required System.Guid Id { get; init; } + public required string Machine { get; init; } + public required string RequestId { get; init; } + } + public class DiscardSnapshotOutput : System.IEquatable + { + public DiscardSnapshotOutput() { } + public bool Discarded { get; init; } + public Trax.StateMachine.Persistence.SnapshotProblem? Problem { get; init; } + } + public interface IAdvanceSnapshot : System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain { } + public interface IDiscardSnapshot : System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain { } + public interface ILoadSnapshot : System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain { } + public interface ISaveSnapshot : System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain { } + public interface ISendSnapshot : System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain { } + public interface IStartSnapshot : System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain { } + [Trax.Effect.Attributes.TraxAuthorize] + public class LoadSnapshot : Trax.Effect.Services.ServiceTrain.ServiceTrain, System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain, Trax.StateMachine.Persistence.Mutations.ILoadSnapshot + { + public LoadSnapshot() { } + protected override System.Threading.Tasks.Task> Junctions() { } + } + public class LoadSnapshotInput : System.IEquatable + { + public LoadSnapshotInput() { } + public required System.Guid Id { get; init; } + public required string Machine { get; init; } + public string? SchemaHash { get; init; } + } + public class LoadSnapshotOutput : System.IEquatable + { + public LoadSnapshotOutput() { } + public System.DateTimeOffset? DueAt { get; init; } + public Trax.StateMachine.Persistence.SnapshotProblem? Problem { get; init; } + public long? Revision { get; init; } + public long? RowId { get; init; } + public string? Snapshot { get; init; } + } + [Trax.Effect.Attributes.TraxAuthorize] + public class SaveSnapshot : Trax.Effect.Services.ServiceTrain.ServiceTrain, System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain, Trax.StateMachine.Persistence.Mutations.ISaveSnapshot + { + public SaveSnapshot() { } + protected override System.Threading.Tasks.Task> Junctions() { } + } + public class SaveSnapshotInput : System.IEquatable + { + public SaveSnapshotInput() { } + public required System.Guid Id { get; init; } + public required string Machine { get; init; } + public string? SchemaHash { get; init; } + [Trax.Effect.Attributes.TraxSensitive] + public required string Snapshot { get; init; } + } + public class SaveSnapshotOutput : System.IEquatable + { + public SaveSnapshotOutput() { } + public System.DateTimeOffset? DueAt { get; init; } + public Trax.StateMachine.Persistence.SnapshotProblem? Problem { get; init; } + public long? Revision { get; init; } + public long? RowId { get; init; } + public string? Snapshot { get; init; } + } + [Trax.Effect.Attributes.TraxAuthorize] + public class SendSnapshot : Trax.Effect.Services.ServiceTrain.ServiceTrain, System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain, Trax.StateMachine.Persistence.Mutations.ISendSnapshot + { + public SendSnapshot() { } + protected override System.Threading.Tasks.Task> Junctions() { } + } + public class SendSnapshotInput : System.IEquatable + { + public SendSnapshotInput() { } + public required System.Guid Id { get; init; } + public required string Machine { get; init; } + public string? RequestId { get; init; } + public string? SchemaHash { get; init; } + } + public class SendSnapshotOutput : System.IEquatable + { + public SendSnapshotOutput() { } + public System.DateTimeOffset? DueAt { get; init; } + public bool DueAtKnown { get; init; } + public Trax.StateMachine.Persistence.SnapshotProblem? Problem { get; init; } + public long? Revision { get; init; } + public long? RowId { get; init; } + public string? Snapshot { get; init; } + } + [Trax.Effect.Attributes.TraxAuthorize] + public class StartSnapshot : Trax.Effect.Services.ServiceTrain.ServiceTrain, System.IDisposable, Trax.Core.Route.IRoute, Trax.Effect.Services.ServiceTrain.IServiceTrain, Trax.StateMachine.Persistence.Mutations.IStartSnapshot + { + public StartSnapshot() { } + protected override System.Threading.Tasks.Task> Junctions() { } + } + public class StartSnapshotInput : System.IEquatable + { + public StartSnapshotInput() { } + public string? Input { get; init; } + public required string Machine { get; init; } + public required string RequestId { get; init; } + public string? SchemaHash { get; init; } + [Trax.Effect.Attributes.TraxSensitive] + public string? SensitiveInput { get; init; } + } + public class StartSnapshotOutput : System.IEquatable + { + public StartSnapshotOutput() { } + public bool? Created { get; init; } + public System.DateTimeOffset? DueAt { get; init; } + public System.Guid? Id { get; init; } + public Trax.StateMachine.Persistence.SnapshotProblem? Problem { get; init; } + public long? Revision { get; init; } + public string? Snapshot { get; init; } + } + public static class StateMachineMutations + { + public static System.Reflection.Assembly Assembly { get; } + } +} \ No newline at end of file diff --git a/Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.StateMachine.Testing.received.txt b/Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.StateMachine.Testing.received.txt new file mode 100644 index 000000000..a726b23f4 --- /dev/null +++ b/Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.StateMachine.Testing.received.txt @@ -0,0 +1,16 @@ +namespace Trax.StateMachine.Testing +{ + public static class DifferentialCorpus + { + public static System.Collections.Generic.IReadOnlyList Replay(Trax.StateMachine.SnapshotMachine machine, string goldenJson) + where TState : struct, System.Enum + where TTrigger : struct, System.Enum { } + } + public static class MachineConformance + { + public static System.Collections.Generic.IReadOnlyList Check(Trax.StateMachine.Persistence.IMachine machine, string irPath, string corpusPath) { } + public static System.Collections.Generic.IReadOnlyList CheckCorpus(Trax.StateMachine.Persistence.IMachine machine, string corpusPath) { } + public static System.Collections.Generic.IReadOnlyList CheckIr(Trax.StateMachine.Persistence.IMachine machine, string irPath) { } + public static void WriteIr(Trax.StateMachine.Persistence.IMachine machine, string irPath) { } + } +} \ No newline at end of file diff --git a/Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.StateMachine.received.txt b/Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.StateMachine.received.txt new file mode 100644 index 000000000..ba7bd72c0 --- /dev/null +++ b/Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.StateMachine.received.txt @@ -0,0 +1,643 @@ +namespace Trax.StateMachine +{ + public abstract class AdvanceResult : System.IEquatable + { + public sealed class Rejected : Trax.StateMachine.AdvanceResult, System.IEquatable + { + public Rejected(Trax.StateMachine.RefusalCode Reason, string? Detail = null) { } + public string? Detail { get; init; } + public Trax.StateMachine.RefusalCode Reason { get; init; } + } + public sealed class Transitioned : Trax.StateMachine.AdvanceResult, System.IEquatable + { + public Transitioned(Trax.StateMachine.Snapshot Snapshot) { } + public Trax.StateMachine.Snapshot Snapshot { get; init; } + } + } + public sealed class BuiltMachine : System.IEquatable> + where TState : struct, System.Enum + where TTrigger : struct, System.Enum + { + public BuiltMachine(Trax.StateMachine.MachineDefinition Definition, System.Collections.Generic.IReadOnlyCollection CommittedStates, System.Collections.Generic.IReadOnlyList> Effects, Trax.StateMachine.DeclarativeModel? Declarative = null) { } + public System.Collections.Generic.IReadOnlyCollection CommittedStates { get; init; } + public Trax.StateMachine.DeclarativeModel? Declarative { get; init; } + public Trax.StateMachine.MachineDefinition Definition { get; init; } + public System.Collections.Generic.IReadOnlyList> Effects { get; init; } + public Trax.StateMachine.SnapshotMachine Engine { get; } + } + public sealed class ClientManifest : System.IEquatable + { + public const int CurrentFormat = 3; + public ClientManifest() { } + public System.Collections.Generic.IReadOnlyList FilterInputs { get; init; } + public int Format { get; init; } + public System.Collections.Generic.IReadOnlyList Machines { get; init; } + public System.Collections.Generic.IReadOnlyList Progress { get; init; } + public System.Collections.Generic.IReadOnlyList QueryModels { get; init; } + public System.Collections.Generic.IReadOnlyList Trains { get; init; } + public string Types { get; init; } + public static Trax.StateMachine.ClientManifest Read(string text) { } + public static string Write(Trax.StateMachine.ClientManifest manifest) { } + } + public sealed class ClientManifestArgument : System.IEquatable + { + public ClientManifestArgument() { } + public string? Default { get; init; } + public required string Name { get; init; } + public required string Type { get; init; } + } + public sealed class ClientManifestDocument : System.IEquatable + { + public ClientManifestDocument() { } + public required string Document { get; init; } + public required string Id { get; init; } + public required string Operation { get; init; } + } + public sealed class ClientManifestMachine : System.IEquatable + { + public ClientManifestMachine() { } + public System.Collections.Generic.IReadOnlyList Documents { get; init; } + public required string Id { get; init; } + public required System.Text.Json.Nodes.JsonObject Ir { get; init; } + public required string IrHash { get; init; } + public Trax.StateMachine.ClientManifestRequirement? Requires { get; init; } + public string IrText() { } + } + public sealed class ClientManifestQueryModel : System.IEquatable + { + public ClientManifestQueryModel() { } + public string? Answer { get; init; } + public System.Collections.Generic.IReadOnlyList Arguments { get; init; } + public required string Field { get; init; } + public string? Namespace { get; init; } + public Trax.StateMachine.ClientManifestRequirement? Requires { get; init; } + } + public sealed class ClientManifestRequirement : System.IEquatable + { + public ClientManifestRequirement() { } + public bool Anonymous { get; init; } + public System.Collections.Generic.IReadOnlyList Policies { get; init; } + public System.Collections.Generic.IReadOnlyList> RoleSets { get; init; } + } + public sealed class ClientManifestTrain : System.IEquatable + { + public ClientManifestTrain() { } + public string? Answer { get; init; } + public System.Collections.Generic.IReadOnlyList Arguments { get; init; } + public required string Field { get; init; } + public string? Namespace { get; init; } + public bool Progress { get; init; } + public Trax.StateMachine.ClientManifestRequirement? Requires { get; init; } + public required string Root { get; init; } + } + public enum CompareOp + { + GreaterThan = 0, + GreaterOrEqual = 1, + LessThan = 2, + LessOrEqual = 3, + EqualTo = 4, + } + public sealed class ContextSchema : System.IEquatable + { + public static readonly Trax.StateMachine.ContextSchema Empty; + public ContextSchema(System.Collections.Generic.IReadOnlyList Fields) { } + public System.Collections.Generic.IReadOnlyList Fields { get; init; } + } + public static class CorpusReplay + { + public static System.Collections.Generic.IReadOnlyList Replay(Trax.StateMachine.SnapshotMachine machine, string goldenJson) + where TState : struct, System.Enum + where TTrigger : struct, System.Enum { } + } + public sealed class DeclarativeModel : System.IEquatable> + where TState : struct, System.Enum + where TTrigger : struct, System.Enum + { + public DeclarativeModel(System.Collections.Generic.IReadOnlyDictionary ContextSchemas, System.Collections.Generic.IReadOnlyDictionary TriggerInputs, System.Collections.Generic.IReadOnlyList> Transitions, System.Collections.Generic.IReadOnlyDictionary StateInvariants) { } + public System.Collections.Generic.IReadOnlyDictionary ContextSchemas { get; init; } + public Trax.StateMachine.DifferentialModel? Differential { get; init; } + public System.Collections.Generic.IReadOnlyDictionary StateInvariants { get; init; } + public System.Collections.Generic.IReadOnlyList> Transitions { get; init; } + public System.Collections.Generic.IReadOnlyDictionary TriggerInputs { get; init; } + } + public sealed class DeclarativeTransition : System.IEquatable> + where TState : struct, System.Enum + where TTrigger : struct, System.Enum + { + public DeclarativeTransition(TState From, TTrigger Trigger, TState To, Trax.StateMachine.Rule? Guard, Trax.StateMachine.Reduction? Reduce) { } + public TState From { get; init; } + public Trax.StateMachine.Rule? Guard { get; init; } + public Trax.StateMachine.Reduction? Reduce { get; init; } + public TState To { get; init; } + public TTrigger Trigger { get; init; } + } + public sealed class DifferentialModel : System.IEquatable> + where TState : struct, System.Enum + where TTrigger : struct, System.Enum + { + public DifferentialModel(System.Collections.Generic.IReadOnlyDictionary> Samples, System.Collections.Generic.IReadOnlyDictionary> Seeds, System.Collections.Generic.IReadOnlyList Contexts) { } + public System.Collections.Generic.IReadOnlyList Contexts { get; init; } + public bool IsEmpty { get; } + public System.Collections.Generic.IReadOnlyDictionary> Samples { get; init; } + public System.Collections.Generic.IReadOnlyDictionary> Seeds { get; init; } + } + public sealed class EffectBinding : System.IEquatable> + where TState : struct, System.Enum + where TTrigger : struct, System.Enum + { + public EffectBinding(TState From, TTrigger Trigger, TState To, System.Type EffectType, string KeyPrefix) { } + public System.Type EffectType { get; init; } + public TState From { get; init; } + public string KeyPrefix { get; init; } + public TState To { get; init; } + public TTrigger Trigger { get; init; } + } + public sealed class FieldMatcher + { + public FieldMatcher(Trax.StateMachine.RuleSource source, string field) { } + public Trax.StateMachine.Rule Absent() { } + public Trax.StateMachine.Rule ArrayOf(Trax.StateMachine.JsonFieldType type) { } + public Trax.StateMachine.Rule AtLeast(double value) { } + public Trax.StateMachine.Rule AtMost(double value) { } + public Trax.StateMachine.Rule CountAtLeast(int value) { } + public Trax.StateMachine.Rule CountGreaterThan(int value) { } + public Trax.StateMachine.Rule EqualTo(double value) { } + public Trax.StateMachine.Rule GreaterThan(double value) { } + public Trax.StateMachine.Rule IsFalse() { } + public Trax.StateMachine.Rule IsOneOf(params string[] values) { } + public Trax.StateMachine.Rule IsTrue() { } + public Trax.StateMachine.Rule LengthAtLeast(int value) { } + public Trax.StateMachine.Rule LengthGreaterThan(int value) { } + public Trax.StateMachine.Rule LessThan(double value) { } + public Trax.StateMachine.Rule NonEmpty() { } + public Trax.StateMachine.Rule OfType(Trax.StateMachine.JsonFieldType type) { } + public Trax.StateMachine.Rule Present() { } + } + public sealed class FieldSchema : System.IEquatable + { + public FieldSchema(string Name, Trax.StateMachine.JsonFieldType Type, bool Nullable, System.Collections.Generic.IReadOnlyList Constraints) { } + public System.Collections.Generic.IReadOnlyList Constraints { get; init; } + public System.Collections.Generic.IReadOnlyList? Enum { get; init; } + public System.Collections.Generic.IReadOnlyList? EnumExact { get; init; } + public System.Collections.Generic.IReadOnlyList? Fields { get; init; } + public string? Format { get; init; } + public Trax.StateMachine.FieldSchema? Keys { get; init; } + public double? Maximum { get; init; } + public double? Minimum { get; init; } + public string Name { get; init; } + public bool Nullable { get; init; } + public Trax.StateMachine.JsonFieldType Type { get; init; } + public Trax.StateMachine.FieldSchema? Values { get; init; } + } + public interface IDifferentialBuilder + where TState : struct, System.Enum + where TTrigger : struct, System.Enum + { + Trax.StateMachine.IDifferentialBuilder EmptySample(TTrigger trigger); + Trax.StateMachine.IDifferentialBuilder OutcomeSample(TState invokingState, TOutput output); + Trax.StateMachine.IDifferentialBuilder Probe(System.Text.Json.Nodes.JsonObject context); + Trax.StateMachine.IDifferentialBuilder Probe(TContext context); + Trax.StateMachine.IDifferentialBuilder Sample(TTrigger trigger, System.Text.Json.Nodes.JsonObject input); + Trax.StateMachine.IDifferentialBuilder Sample(TTrigger trigger, TInput input); + Trax.StateMachine.IDifferentialBuilder Seed(TState state, System.Text.Json.Nodes.JsonObject context); + Trax.StateMachine.IDifferentialBuilder Seed(TState state, TContext context); + } + public interface IInvokeBuilder : Trax.StateMachine.IStateBuilder + where TState : struct, System.Enum + where TTrigger : struct, System.Enum + { + Trax.StateMachine.IInvokeBuilder OnCancelled(TState target, Trax.StateMachine.Reduction? reduce = null); + Trax.StateMachine.IInvokeBuilder OnDone(TState target, Trax.StateMachine.Rule? when = null, Trax.StateMachine.Reduction? reduce = null); + Trax.StateMachine.IInvokeBuilder OnFailed(TState target, Trax.StateMachine.Reduction? reduce = null); + } + public interface IMachineBuilder + where TState : struct, System.Enum + where TTrigger : struct, System.Enum + { + Trax.StateMachine.IMachineBuilder CustomGuard(string name, System.Func guard); + Trax.StateMachine.IMachineBuilder CustomReducer(string name, System.Func reducer); + Trax.StateMachine.IMachineBuilder Differential(System.Action> configure); + Trax.StateMachine.IMachineBuilder Discard(System.Action rule); + Trax.StateMachine.IMachineBuilder Get(System.Action rule); + Trax.StateMachine.IMachineBuilder Id(string id); + Trax.StateMachine.IStateBuilder In(TState state); + Trax.StateMachine.IMachineBuilder InvokedRunLimit(int limit); + Trax.StateMachine.IMachineBuilder MigrateFrom(int fromVersion, System.Func migrate); + Trax.StateMachine.IMachineBuilder Start(System.Action> configure); + Trax.StateMachine.IMachineBuilder StartsAt(TState state, System.Func initialContext); + Trax.StateMachine.IMachineBuilder SystemOwned(); + Trax.StateMachine.IMachineBuilder Version(int version); + Trax.StateMachine.IMachineBuilder Watch(System.Action rule); + } + public interface IReadRuleBuilder + { + Trax.StateMachine.IReadRuleBuilder Anonymous(); + Trax.StateMachine.IReadRuleBuilder AnyAuthenticated(); + Trax.StateMachine.IReadRuleBuilder OwnerOnly(); + Trax.StateMachine.IReadRuleBuilder Requires(params string[] roles); + Trax.StateMachine.IReadRuleBuilder RequiresPolicy(string policy); + } + public interface IStartBuilder + { + Trax.StateMachine.IStartBuilder Anonymous(); + Trax.StateMachine.IStartBuilder AnyAuthenticated(); + Trax.StateMachine.IStartBuilder Reduce(Trax.StateMachine.Reduction reduce); + Trax.StateMachine.IStartBuilder Requires(params string[] roles); + Trax.StateMachine.IStartBuilder RequiresPolicy(string policy); + } + public interface IStateBuilder + where TState : struct, System.Enum + where TTrigger : struct, System.Enum + { + Trax.StateMachine.ITimerBuilder After(System.TimeSpan delay); + Trax.StateMachine.ITimerBuilder After(System.Linq.Expressions.Expression> duration, System.TimeSpan min, System.TimeSpan max); + Trax.StateMachine.IStateBuilder Committed(); + Trax.StateMachine.IStateBuilder Context(); + Trax.StateMachine.IStateBuilder Context(); + Trax.StateMachine.IStateBuilder Ends(); + Trax.StateMachine.IStateBuilder Fails(); + Trax.StateMachine.IStateBuilder Holds(System.Func validator); + Trax.StateMachine.IInvokeBuilder Invokes(System.Func input) + where TTrain : Trax.Effect.Services.ServiceTrain.IServiceTrain; + Trax.StateMachine.ITransitionBuilder On(TTrigger trigger); + Trax.StateMachine.IStateBuilder Requires(Trax.StateMachine.Rule constraint); + Trax.StateMachine.IInvokeBuilder Spawns(System.Linq.Expressions.Expression> childId, System.Func? context = null) + where TChild : class; + } + public interface ITimerBuilder + where TState : struct, System.Enum + where TTrigger : struct, System.Enum + { + Trax.StateMachine.IStateBuilder GoTo(TState target); + } + public interface ITransitionBuilder + where TState : struct, System.Enum + where TTrigger : struct, System.Enum + { + Trax.StateMachine.ITransitionBuilder Anonymous(); + Trax.StateMachine.ITransitionBuilder AnyAuthenticated(); + Trax.StateMachine.ITransitionBuilder Because(string guardMessage); + Trax.StateMachine.ITransitionBuilder Reduce(System.Func reduce); + Trax.StateMachine.ITransitionBuilder Reduce(Trax.StateMachine.Reduction reduce); + Trax.StateMachine.ITransitionBuilder Requires(params string[] roles); + Trax.StateMachine.ITransitionBuilder RequiresPolicy(string policy); + Trax.StateMachine.ITransitionBuilder RunsOnce(string? keyPrefix = null); + Trax.StateMachine.IStateBuilder To(TState target); + Trax.StateMachine.ITransitionBuilder When(System.Func guard); + Trax.StateMachine.ITransitionBuilder When(Trax.StateMachine.Rule guard); + Trax.StateMachine.ITransitionBuilder WithInput(); + } + public static class IrExporter + { + public static string Export(Trax.StateMachine.BuiltMachine machine) + where TState : struct, System.Enum + where TTrigger : struct, System.Enum { } + } + public enum JsonFieldType + { + String = 0, + Number = 1, + Boolean = 2, + Array = 3, + Object = 4, + Integer = 5, + } + public sealed class MachineBuilder : Trax.StateMachine.IMachineBuilder + where TState : struct, System.Enum + where TTrigger : struct, System.Enum + { + public MachineBuilder() { } + public Trax.StateMachine.BuiltMachine Build() { } + public Trax.StateMachine.IMachineBuilder CustomGuard(string name, System.Func guard) { } + public Trax.StateMachine.IMachineBuilder CustomReducer(string name, System.Func reducer) { } + public Trax.StateMachine.IMachineBuilder Differential(System.Action> configure) { } + public Trax.StateMachine.IMachineBuilder Discard(System.Action rule) { } + public Trax.StateMachine.IMachineBuilder Get(System.Action rule) { } + public Trax.StateMachine.IMachineBuilder Id(string id) { } + public Trax.StateMachine.IStateBuilder In(TState state) { } + public Trax.StateMachine.IMachineBuilder InvokedRunLimit(int limit) { } + public Trax.StateMachine.IMachineBuilder MigrateFrom(int fromVersion, System.Func migrate) { } + public Trax.StateMachine.IMachineBuilder Start(System.Action> configure) { } + public Trax.StateMachine.IMachineBuilder StartsAt(TState state, System.Func initialContext) { } + public Trax.StateMachine.IMachineBuilder SystemOwned() { } + public Trax.StateMachine.IMachineBuilder Version(int version) { } + public Trax.StateMachine.IMachineBuilder Watch(System.Action rule) { } + } + public sealed class MachineDefinition + where TState : struct, System.Enum + where TTrigger : struct, System.Enum + { + public MachineDefinition() { } + public System.Collections.Generic.IReadOnlyDictionary> ContextValidators { get; init; } + public required System.Func CreateInitialContext { get; init; } + public required string Id { get; init; } + public required TState InitialState { get; init; } + public System.Collections.Generic.IReadOnlyDictionary> Migrations { get; init; } + public required System.Collections.Generic.IReadOnlyList> Transitions { get; init; } + public required int Version { get; init; } + public Trax.StateMachine.Snapshot CreateInitialSnapshot() { } + } + public sealed class MachineState : System.IEquatable + { + public MachineState(string Name, System.Type? ContextType) { } + public System.Type? ContextType { get; init; } + public string Name { get; init; } + } + public static class MachineTimers + { + public static readonly System.TimeSpan MaxDuration; + } + public sealed class MachineTrigger : System.IEquatable + { + public MachineTrigger(string Name, Trax.StateMachine.TriggerKind Kind, System.Type? InputType) { } + public System.Type? InputType { get; init; } + public Trax.StateMachine.TriggerKind Kind { get; init; } + public string Name { get; init; } + } + public sealed class MigrationResult : System.IEquatable + { + public MigrationResult(string State, System.Text.Json.Nodes.JsonObject Context) { } + public System.Text.Json.Nodes.JsonObject Context { get; init; } + public string State { get; init; } + } + public abstract class Reduction : System.IEquatable + { + public sealed class Clear : Trax.StateMachine.Reduction, System.IEquatable + { + public Clear() { } + } + public sealed class Custom : Trax.StateMachine.Reduction, System.IEquatable + { + public Custom(string Name) { } + public string Name { get; init; } + } + public sealed class Keep : Trax.StateMachine.Reduction, System.IEquatable + { + public Keep() { } + } + public sealed class Reset : Trax.StateMachine.Reduction, System.IEquatable + { + public Reset() { } + } + public sealed class Set : Trax.StateMachine.Reduction, System.IEquatable + { + public Set(System.Collections.Generic.IReadOnlyList Steps) { } + public System.Collections.Generic.IReadOnlyList Steps { get; init; } + } + } + public static class ReductionEvaluator + { + public static System.Text.Json.Nodes.JsonObject Apply(Trax.StateMachine.Reduction reduction, System.Text.Json.Nodes.JsonObject context, System.Text.Json.Nodes.JsonNode? input, System.Text.Json.Nodes.JsonObject initialContext, System.Collections.Generic.IReadOnlyDictionary>? customReducers = null) { } + } + [System.Text.Json.Serialization.JsonConverter(typeof(Trax.StateMachine.RefusalCodeJsonConverter))] + public enum RefusalCode + { + NoTransition = 0, + GuardFailed = 1, + InvalidContext = 2, + InternalError = 3, + InvalidInput = 4, + OutcomeBound = 5, + TimerBound = 6, + TooLarge = 7, + DiscardNotAllowed = 8, + EffectInProgress = 9, + Malformed = 10, + UnknownMachine = 11, + VersionMismatch = 12, + UnknownState = 13, + Forbidden = 14, + RequestIdReused = 15, + EffectBound = 16, + SaveNotAllowed = 17, + ClientOutdated = 18, + ServerOutdated = 19, + TooManyDrafts = 20, + InvalidRequestId = 21, + Unauthenticated = 22, + NoStart = 23, + SystemOwned = 24, + NotFound = 25, + TooManySubscriptions = 26, + SchemaMismatch = 27, + Conflict = 28, + NoEffect = 29, + DeliveryFailed = 30, + ClientDivergence = 31, + StateReserved = 32, + DraftInvoking = 33, + DraftUnreadable = 34, + DraftCommitted = 35, + DraftChanged = 36, + InvokeLimitReached = 37, + InvokeForbidden = 38, + InvokeChainUserOwned = 39, + } + public sealed class RefusalCodeJsonConverter : System.Text.Json.Serialization.JsonConverter + { + public RefusalCodeJsonConverter() { } + public override Trax.StateMachine.RefusalCode Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { } + public override void Write(System.Text.Json.Utf8JsonWriter writer, Trax.StateMachine.RefusalCode value, System.Text.Json.JsonSerializerOptions options) { } + } + public static class RefusalCodes + { + public static System.Collections.Generic.IReadOnlyList All { get; } + public static string ToWire(this Trax.StateMachine.RefusalCode code) { } + public static bool TryParse(string? text, out Trax.StateMachine.RefusalCode code) { } + } + public abstract class RehydrationResult : System.IEquatable + { + public sealed class Error : Trax.StateMachine.RehydrationResult, System.IEquatable + { + public Error(Trax.StateMachine.RefusalCode Code, string Message) { } + public Trax.StateMachine.RefusalCode Code { get; init; } + public string Message { get; init; } + } + public sealed class Ok : Trax.StateMachine.RehydrationResult, System.IEquatable + { + public Ok(Trax.StateMachine.Snapshot Snapshot) { } + public Trax.StateMachine.Snapshot Snapshot { get; init; } + } + } + public abstract class Rule : System.IEquatable + { + public sealed class Absent : Trax.StateMachine.Rule, System.IEquatable + { + public Absent(Trax.StateMachine.RuleSource Source, string Field) { } + public string Field { get; init; } + public Trax.StateMachine.RuleSource Source { get; init; } + } + public sealed class All : Trax.StateMachine.Rule, System.IEquatable + { + public All(System.Collections.Generic.IReadOnlyList Rules) { } + public System.Collections.Generic.IReadOnlyList Rules { get; init; } + } + public sealed class Any : Trax.StateMachine.Rule, System.IEquatable + { + public Any(System.Collections.Generic.IReadOnlyList Rules) { } + public System.Collections.Generic.IReadOnlyList Rules { get; init; } + } + public sealed class ArrayOf : Trax.StateMachine.Rule, System.IEquatable + { + public ArrayOf(Trax.StateMachine.RuleSource Source, string Field, Trax.StateMachine.JsonFieldType ElementType) { } + public Trax.StateMachine.JsonFieldType ElementType { get; init; } + public string Field { get; init; } + public Trax.StateMachine.RuleSource Source { get; init; } + } + public sealed class BoolEquals : Trax.StateMachine.Rule, System.IEquatable + { + public BoolEquals(Trax.StateMachine.RuleSource Source, string Field, bool Value) { } + public string Field { get; init; } + public Trax.StateMachine.RuleSource Source { get; init; } + public bool Value { get; init; } + } + public sealed class Compare : Trax.StateMachine.Rule, System.IEquatable + { + public Compare(Trax.StateMachine.RuleSource Source, string Field, Trax.StateMachine.CompareOp Op, double Value) { } + public string Field { get; init; } + public Trax.StateMachine.CompareOp Op { get; init; } + public Trax.StateMachine.RuleSource Source { get; init; } + public double Value { get; init; } + } + public sealed class Count : Trax.StateMachine.Rule, System.IEquatable + { + public Count(Trax.StateMachine.RuleSource Source, string Field, Trax.StateMachine.CompareOp Op, int Value) { } + public string Field { get; init; } + public Trax.StateMachine.CompareOp Op { get; init; } + public Trax.StateMachine.RuleSource Source { get; init; } + public int Value { get; init; } + } + public sealed class Custom : Trax.StateMachine.Rule, System.IEquatable + { + public Custom(string Name) { } + public string Name { get; init; } + } + public sealed class Length : Trax.StateMachine.Rule, System.IEquatable + { + public Length(Trax.StateMachine.RuleSource Source, string Field, Trax.StateMachine.CompareOp Op, int Value) { } + public string Field { get; init; } + public Trax.StateMachine.CompareOp Op { get; init; } + public Trax.StateMachine.RuleSource Source { get; init; } + public int Value { get; init; } + } + public sealed class NonEmpty : Trax.StateMachine.Rule, System.IEquatable + { + public NonEmpty(Trax.StateMachine.RuleSource Source, string Field) { } + public string Field { get; init; } + public Trax.StateMachine.RuleSource Source { get; init; } + } + public sealed class OfType : Trax.StateMachine.Rule, System.IEquatable + { + public OfType(Trax.StateMachine.RuleSource Source, string Field, Trax.StateMachine.JsonFieldType Type) { } + public string Field { get; init; } + public Trax.StateMachine.RuleSource Source { get; init; } + public Trax.StateMachine.JsonFieldType Type { get; init; } + } + public sealed class OneOf : Trax.StateMachine.Rule, System.IEquatable + { + public OneOf(Trax.StateMachine.RuleSource Source, string Field, System.Collections.Generic.IReadOnlyList Values) { } + public string Field { get; init; } + public Trax.StateMachine.RuleSource Source { get; init; } + public System.Collections.Generic.IReadOnlyList Values { get; init; } + } + public sealed class Present : Trax.StateMachine.Rule, System.IEquatable + { + public Present(Trax.StateMachine.RuleSource Source, string Field) { } + public string Field { get; init; } + public Trax.StateMachine.RuleSource Source { get; init; } + } + } + public static class RuleEvaluator + { + public static bool Evaluate(Trax.StateMachine.Rule rule, System.Text.Json.Nodes.JsonObject context, System.Text.Json.Nodes.JsonNode? input, System.Collections.Generic.IReadOnlyDictionary>? customGuards = null) { } + } + public enum RuleSource + { + Context = 0, + Input = 1, + } + public static class Rules + { + public static Trax.StateMachine.Rule All(params Trax.StateMachine.Rule[] rules) { } + public static Trax.StateMachine.Rule Any(params Trax.StateMachine.Rule[] rules) { } + public static Trax.StateMachine.Reduction Clear() { } + public static Trax.StateMachine.FieldMatcher Field(System.Linq.Expressions.Expression> selector) { } + public static Trax.StateMachine.FieldMatcher Input(System.Linq.Expressions.Expression> selector) { } + public static Trax.StateMachine.Reduction Keep() { } + public static Trax.StateMachine.Reduction Reset() { } + public static Trax.StateMachine.SetBuilder Set(System.Linq.Expressions.Expression> field) { } + public static Trax.StateMachine.Reduction SetAll(params Trax.StateMachine.Reduction[] sets) { } + } + public sealed class SetBuilder + { + public SetBuilder(string field) { } + public Trax.StateMachine.Reduction FromInput(System.Linq.Expressions.Expression> input) { } + public Trax.StateMachine.Reduction ToValue(System.Text.Json.Nodes.JsonNode? value) { } + } + public sealed class SetStep : System.IEquatable + { + public SetStep(string Field, Trax.StateMachine.ValueSource Source) { } + public string Field { get; init; } + public Trax.StateMachine.ValueSource Source { get; init; } + } + public sealed class Snapshot : System.IEquatable + { + public Snapshot() { } + public required System.Text.Json.Nodes.JsonObject Context { get; init; } + public required string Machine { get; init; } + public required string State { get; init; } + public required int Version { get; init; } + public bool Equals(Trax.StateMachine.Snapshot? other) { } + public override int GetHashCode() { } + } + public sealed class SnapshotMachine + where TState : struct, System.Enum + where TTrigger : struct, System.Enum + { + public SnapshotMachine(Trax.StateMachine.MachineDefinition definition) { } + public Trax.StateMachine.MachineDefinition Definition { get; } + public Trax.StateMachine.AdvanceResult Advance(Trax.StateMachine.Snapshot snapshot, string trigger, System.Text.Json.Nodes.JsonNode? input = null) { } + public System.Collections.Generic.IReadOnlyList AvailableTriggers(Trax.StateMachine.Snapshot snapshot) { } + public bool CanFire(Trax.StateMachine.Snapshot snapshot, string trigger, System.Text.Json.Nodes.JsonNode? input = null) { } + public System.Text.Json.Nodes.JsonObject Describe() { } + public Trax.StateMachine.RehydrationResult Rehydrate(string json) { } + public string Serialize(Trax.StateMachine.Snapshot snapshot) { } + } + public static class StorableJson + { + public static string? Problem(System.Text.Json.Nodes.JsonNode? node) { } + } + public sealed class TransitionDefinition + where TState : struct, System.Enum + where TTrigger : struct, System.Enum + { + public TransitionDefinition() { } + public required TState From { get; init; } + public System.Func? Guard { get; init; } + public string? GuardMessage { get; init; } + public System.Func? Reduce { get; init; } + public required TState To { get; init; } + public required TTrigger Trigger { get; init; } + } + public enum TriggerKind + { + Client = 0, + EffectBound = 1, + Outcome = 2, + Timer = 3, + } + public abstract class ValueSource : System.IEquatable + { + public sealed class Constant : Trax.StateMachine.ValueSource, System.IEquatable + { + public Constant(System.Text.Json.Nodes.JsonNode? Value) { } + public System.Text.Json.Nodes.JsonNode? Value { get; init; } + } + public sealed class FromInput : Trax.StateMachine.ValueSource, System.IEquatable + { + public FromInput(string Field) { } + public string Field { get; init; } + } + } +} \ No newline at end of file diff --git a/Trax.Effect/tests/Trax.Effect.Tests.Meta/Tests/PublicApiSurfaceTests.cs b/Trax.Effect/tests/Trax.Effect.Tests.Meta/Tests/PublicApiSurfaceTests.cs index 782d97a11..d71d75f0a 100644 --- a/Trax.Effect/tests/Trax.Effect.Tests.Meta/Tests/PublicApiSurfaceTests.cs +++ b/Trax.Effect/tests/Trax.Effect.Tests.Meta/Tests/PublicApiSurfaceTests.cs @@ -63,15 +63,15 @@ public static IEnumerable Assemblies() yield return new TestCaseData( typeof(Trax.Effect.Provider.Parameter.Configuration.ParameterEffectConfiguration).Assembly ).SetName("Trax.Effect.Provider.Parameter"); + yield return new TestCaseData(typeof(Trax.StateMachine.CorpusReplay).Assembly).SetName( + "Trax.StateMachine" + ); yield return new TestCaseData( - typeof(Trax.Effect.StateMachine.CorpusReplay).Assembly - ).SetName("Trax.Effect.StateMachine"); - yield return new TestCaseData( - typeof(Trax.Effect.StateMachine.Persistence.ISnapshotStore).Assembly - ).SetName("Trax.Effect.StateMachine.Persistence"); + typeof(Trax.StateMachine.Persistence.ISnapshotStore).Assembly + ).SetName("Trax.StateMachine.Persistence"); yield return new TestCaseData( - typeof(Trax.Effect.StateMachine.Testing.DifferentialCorpus).Assembly - ).SetName("Trax.Effect.StateMachine.Testing"); + typeof(Trax.StateMachine.Testing.DifferentialCorpus).Assembly + ).SetName("Trax.StateMachine.Testing"); yield return new TestCaseData( typeof(Trax.Effect.Decisions.SystemOne.SystemOneDecider).Assembly ).SetName("Trax.Effect.Decisions.SystemOne"); diff --git a/Trax.Effect/tests/Trax.Effect.Tests.Meta/Trax.Effect.Tests.Meta.csproj b/Trax.Effect/tests/Trax.Effect.Tests.Meta/Trax.Effect.Tests.Meta.csproj index 31a995632..2acedff70 100644 --- a/Trax.Effect/tests/Trax.Effect.Tests.Meta/Trax.Effect.Tests.Meta.csproj +++ b/Trax.Effect/tests/Trax.Effect.Tests.Meta/Trax.Effect.Tests.Meta.csproj @@ -35,9 +35,9 @@ - - - + + + diff --git a/Trax.Effect/tests/Trax.Effect.Tests.Meta/packages.lock.json b/Trax.Effect/tests/Trax.Effect.Tests.Meta/packages.lock.json index dc2974e70..2c817ec32 100644 --- a/Trax.Effect/tests/Trax.Effect.Tests.Meta/packages.lock.json +++ b/Trax.Effect/tests/Trax.Effect.Tests.Meta/packages.lock.json @@ -405,13 +405,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.statemachine": { "type": "Project", "dependencies": { "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { "Microsoft.EntityFrameworkCore": "[10.0.12, )", @@ -420,14 +420,14 @@ "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, - "trax.effect.statemachine.testing": { + "trax.statemachine.testing": { "type": "Project", "dependencies": { - "Trax.Effect.StateMachine": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "dbup-core": { diff --git a/Trax.Mediator/src/Trax.Mediator/Extensions/BuilderOrderExtensions.cs b/Trax.Mediator/src/Trax.Mediator/Extensions/BuilderOrderExtensions.cs index da7bea6f7..114404d43 100644 --- a/Trax.Mediator/src/Trax.Mediator/Extensions/BuilderOrderExtensions.cs +++ b/Trax.Mediator/src/Trax.Mediator/Extensions/BuilderOrderExtensions.cs @@ -63,7 +63,7 @@ params Assembly[] assemblies ) => throw new InvalidOperationException(AddMediatorOnce); /// - /// Not callable: AddStateMachines (Trax.Effect.StateMachine.Persistence) comes before + /// Not callable: AddStateMachines (Trax.StateMachine.Persistence) comes before /// AddMediator, which reads the assemblies it contributes. /// [Obsolete(AddStateMachinesFirst, error: true)] @@ -74,7 +74,7 @@ params Assembly[] assemblies ) => throw new InvalidOperationException(AddStateMachinesFirst); /// - /// Not callable: AddStateMachines (Trax.Effect.StateMachine.Persistence) comes before + /// Not callable: AddStateMachines (Trax.StateMachine.Persistence) comes before /// AddMediator, which reads the assemblies it contributes. /// /// diff --git a/Trax.Mediator/src/Trax.Mediator/Extensions/ServiceExtensions.cs b/Trax.Mediator/src/Trax.Mediator/Extensions/ServiceExtensions.cs index e8940ebd8..75a606675 100644 --- a/Trax.Mediator/src/Trax.Mediator/Extensions/ServiceExtensions.cs +++ b/Trax.Mediator/src/Trax.Mediator/Extensions/ServiceExtensions.cs @@ -334,7 +334,7 @@ params Assembly[] assemblies // machines; AddStateMachines' startup check refuses a machine that invokes trains // without it. .AddScoped< - Trax.Effect.StateMachine.Persistence.IInvokedTrainLauncher, + Trax.StateMachine.Persistence.IInvokedTrainLauncher, Services.InvokedTrains.InvokedTrainLauncher >() .RegisterServiceTrains(trainRegistry.DiscoveredTrains, serviceTrainLifetime); diff --git a/Trax.Mediator/src/Trax.Mediator/Services/InvokedTrains/InvokedTrainLauncher.cs b/Trax.Mediator/src/Trax.Mediator/Services/InvokedTrains/InvokedTrainLauncher.cs index ead379450..14314af90 100644 --- a/Trax.Mediator/src/Trax.Mediator/Services/InvokedTrains/InvokedTrainLauncher.cs +++ b/Trax.Mediator/src/Trax.Mediator/Services/InvokedTrains/InvokedTrainLauncher.cs @@ -4,10 +4,10 @@ using Trax.Effect.Data.Services.DataContext; using Trax.Effect.Services.EffectJunction; using Trax.Effect.Services.ServiceTrain; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Services.TrainDiscovery; using Trax.Mediator.Services.TrainExecution; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Mediator.Services.InvokedTrains; diff --git a/Trax.Mediator/src/Trax.Mediator/Services/TrainExecution/TrainExecutionService.cs b/Trax.Mediator/src/Trax.Mediator/Services/TrainExecution/TrainExecutionService.cs index 9ab4d6d20..b29a5a61d 100644 --- a/Trax.Mediator/src/Trax.Mediator/Services/TrainExecution/TrainExecutionService.cs +++ b/Trax.Mediator/src/Trax.Mediator/Services/TrainExecution/TrainExecutionService.cs @@ -17,7 +17,6 @@ using Trax.Effect.Models.WorkQueue; using Trax.Effect.Models.WorkQueue.DTOs; using Trax.Effect.Services.ServiceTrain; -using Trax.Effect.StateMachine.Persistence; using Trax.Effect.Utils; using Trax.Mediator.Configuration; using Trax.Mediator.Exceptions; @@ -27,6 +26,7 @@ using Trax.Mediator.Services.TrainAuthorization; using Trax.Mediator.Services.TrainDiscovery; using Trax.Mediator.Services.TrustedExecution; +using Trax.StateMachine.Persistence; namespace Trax.Mediator.Services.TrainExecution; diff --git a/Trax.Mediator/src/Trax.Mediator/Trax.Mediator.csproj b/Trax.Mediator/src/Trax.Mediator/Trax.Mediator.csproj index c32bc3c65..c33061290 100644 --- a/Trax.Mediator/src/Trax.Mediator/Trax.Mediator.csproj +++ b/Trax.Mediator/src/Trax.Mediator/Trax.Mediator.csproj @@ -24,6 +24,6 @@ - + diff --git a/Trax.Mediator/src/Trax.Mediator/packages.lock.json b/Trax.Mediator/src/Trax.Mediator/packages.lock.json index fa7babe2b..4b7ea684c 100644 --- a/Trax.Mediator/src/Trax.Mediator/packages.lock.json +++ b/Trax.Mediator/src/Trax.Mediator/packages.lock.json @@ -115,13 +115,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.statemachine": { "type": "Project", "dependencies": { "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { "Microsoft.EntityFrameworkCore": "[10.0.12, )", @@ -130,7 +130,7 @@ "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Microsoft.EntityFrameworkCore": { diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.MemoryLeak.Integration/packages.lock.json b/Trax.Mediator/tests/Trax.Mediator.Tests.MemoryLeak.Integration/packages.lock.json index e1eb0b95c..096148ec7 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.MemoryLeak.Integration/packages.lock.json +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.MemoryLeak.Integration/packages.lock.json @@ -478,40 +478,40 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { + "trax.mediator": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.mediator": { + "trax.mediator.tests.arraylogger": { "type": "Project", "dependencies": { - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Microsoft.Extensions.Logging.Abstractions": "[10.0.13, )", + "Trax.Effect": "[1.99.99, )" } }, - "trax.mediator.tests.arraylogger": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.Extensions.Logging.Abstractions": "[10.0.13, )", "Trax.Effect": "[1.99.99, )" } }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Microsoft.EntityFrameworkCore": { "type": "CentralTransitive", "requested": "[10.0.12, )", diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/Tests/BuilderOrderDiagnosticsTests.cs b/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/Tests/BuilderOrderDiagnosticsTests.cs index 0aae142b3..bb5ffe970 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/Tests/BuilderOrderDiagnosticsTests.cs +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/Tests/BuilderOrderDiagnosticsTests.cs @@ -19,7 +19,7 @@ public class BuilderOrderDiagnosticsTests using System.Reflection; using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Extensions; - using Trax.Effect.StateMachine.Persistence; + using Trax.StateMachine.Persistence; using Trax.Mediator.Extensions; public static class Host diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/Trax.Mediator.Tests.Meta.csproj b/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/Trax.Mediator.Tests.Meta.csproj index 99b5fe613..7a4363886 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/Trax.Mediator.Tests.Meta.csproj +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/Trax.Mediator.Tests.Meta.csproj @@ -22,7 +22,7 @@ - + diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/packages.lock.json b/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/packages.lock.json index 3cbd8149e..e47e5a76e 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/packages.lock.json +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/packages.lock.json @@ -284,38 +284,38 @@ "Trax.Effect.Data": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.mediator.testing": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "NUnit": "[5.0.0, )", + "Trax.Core.Testing": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.mediator.testing": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "NUnit": "[5.0.0, )", - "Trax.Core.Testing": "[1.99.99, )" + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" } }, "Microsoft.CodeAnalysis.Analyzers": { diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.Postgres.Integration/packages.lock.json b/Trax.Mediator/tests/Trax.Mediator.Tests.Postgres.Integration/packages.lock.json index 225441e6f..cc24e974a 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.Postgres.Integration/packages.lock.json +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.Postgres.Integration/packages.lock.json @@ -374,40 +374,40 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { + "trax.mediator": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.mediator": { + "trax.mediator.tests.arraylogger": { "type": "Project", "dependencies": { - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Microsoft.Extensions.Logging.Abstractions": "[10.0.13, )", + "Trax.Effect": "[1.99.99, )" } }, - "trax.mediator.tests.arraylogger": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.Extensions.Logging.Abstractions": "[10.0.13, )", "Trax.Effect": "[1.99.99, )" } }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "dbup-core": { "type": "CentralTransitive", "requested": "[6.1.1, )", diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Fakes/Callers.cs b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Fakes/Callers.cs index ac3066d67..e4cdb14e5 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Fakes/Callers.cs +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Fakes/Callers.cs @@ -1,8 +1,8 @@ using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Services.TrainAuthorization; using Trax.Mediator.Services.TrainDiscovery; using Trax.Mediator.Services.TrustedExecution; +using Trax.StateMachine.Persistence; namespace Trax.Mediator.Tests.StateMachine.Integration.Fakes; diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Fakes/Machines.cs b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Fakes/Machines.cs index 8a031735e..d602c04e5 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Fakes/Machines.cs +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Fakes/Machines.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; using Trax.Effect.Services.ServiceTrain; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Mediator.Tests.StateMachine.Integration.Fakes; diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Fakes/ObservedLauncher.cs b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Fakes/ObservedLauncher.cs index 0f3b210e1..9194207a7 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Fakes/ObservedLauncher.cs +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Fakes/ObservedLauncher.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Data.Services.DataContext; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Mediator.Tests.StateMachine.Integration.Fakes; diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Fakes/RuleMachines.cs b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Fakes/RuleMachines.cs index 516c02298..a291a06c9 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Fakes/RuleMachines.cs +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Fakes/RuleMachines.cs @@ -3,8 +3,8 @@ using Trax.Effect.Attributes; using Trax.Effect.Services.EffectJunction; using Trax.Effect.Services.ServiceTrain; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Mediator.Tests.StateMachine.Integration.Fakes; diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Fixtures/InvokeHost.cs b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Fixtures/InvokeHost.cs index d5aa9e0fa..24d5e0886 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Fixtures/InvokeHost.cs +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Fixtures/InvokeHost.cs @@ -12,11 +12,11 @@ using Trax.Effect.Models.Metadata.DTOs; using Trax.Effect.Models.WorkQueue; using Trax.Effect.Models.WorkQueue.DTOs; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Extensions; using Trax.Mediator.Services.TrainAuthorization; using Trax.Mediator.Tests.StateMachine.Integration.Fakes; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Mediator.Tests.StateMachine.Integration.Fixtures; diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/InvokedTrainOutboxTests.cs b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/InvokedTrainOutboxTests.cs index 8ba703bd8..93d0676ee 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/InvokedTrainOutboxTests.cs +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/InvokedTrainOutboxTests.cs @@ -9,11 +9,11 @@ using Trax.Effect.Models.Metadata; using Trax.Effect.Models.Metadata.DTOs; using Trax.Effect.Models.SnapshotDraft; -using Trax.Effect.StateMachine.Persistence; -using Trax.Effect.StateMachine.Persistence.Mutations; using Trax.Mediator.Services.TrainBus; using Trax.Mediator.Tests.StateMachine.Integration.Fakes; using Trax.Mediator.Tests.StateMachine.Integration.Fixtures; +using Trax.StateMachine.Persistence; +using Trax.StateMachine.Persistence.Mutations; namespace Trax.Mediator.Tests.StateMachine.Integration.IntegrationTests; diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/InvokesAuthorizationTests.cs b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/InvokesAuthorizationTests.cs index 2415f2f96..b46d323a5 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/InvokesAuthorizationTests.cs +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/InvokesAuthorizationTests.cs @@ -4,10 +4,10 @@ using Trax.Effect.Data.Services.DataContext; using Trax.Effect.Enums; using Trax.Effect.Models.WorkQueue.DTOs; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Tests.StateMachine.Integration.Fakes; using Trax.Mediator.Tests.StateMachine.Integration.Fixtures; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Mediator.Tests.StateMachine.Integration.IntegrationTests; diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/InvokesRuntimeRefusalTests.cs b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/InvokesRuntimeRefusalTests.cs index 7f8bd7cba..c012b9827 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/InvokesRuntimeRefusalTests.cs +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/InvokesRuntimeRefusalTests.cs @@ -2,11 +2,11 @@ using System.Text.Json.Nodes; using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Services.TrainExecution; using Trax.Mediator.Tests.StateMachine.Integration.Fakes; using Trax.Mediator.Tests.StateMachine.Integration.Fixtures; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Mediator.Tests.StateMachine.Integration.IntegrationTests; diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/SnapshotChangeOutcomeNotifyTests.cs b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/SnapshotChangeOutcomeNotifyTests.cs index 1687b1b47..aebef38f2 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/SnapshotChangeOutcomeNotifyTests.cs +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/SnapshotChangeOutcomeNotifyTests.cs @@ -1,9 +1,9 @@ using System.Collections.Concurrent; using AwesomeAssertions; using Npgsql; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Tests.StateMachine.Integration.Fakes; using Trax.Mediator.Tests.StateMachine.Integration.Fixtures; +using Trax.StateMachine.Persistence; namespace Trax.Mediator.Tests.StateMachine.Integration.IntegrationTests; diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/SystemInstanceAdvanceTests.cs b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/SystemInstanceAdvanceTests.cs index d3185c474..a9f46fb7b 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/SystemInstanceAdvanceTests.cs +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/SystemInstanceAdvanceTests.cs @@ -1,10 +1,10 @@ using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Enums; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Tests.StateMachine.Integration.Fakes; using Trax.Mediator.Tests.StateMachine.Integration.Fixtures; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Mediator.Tests.StateMachine.Integration.IntegrationTests; diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/SystemInstanceStartFailureTests.cs b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/SystemInstanceStartFailureTests.cs index cac383511..2f081c66b 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/SystemInstanceStartFailureTests.cs +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/IntegrationTests/SystemInstanceStartFailureTests.cs @@ -1,10 +1,10 @@ using System.Reflection; using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Tests.StateMachine.Integration.Fakes; using Trax.Mediator.Tests.StateMachine.Integration.Fixtures; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Mediator.Tests.StateMachine.Integration.IntegrationTests; diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Trax.Mediator.Tests.StateMachine.Integration.csproj b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Trax.Mediator.Tests.StateMachine.Integration.csproj index 98b21ecee..9be02ed0c 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Trax.Mediator.Tests.StateMachine.Integration.csproj +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/Trax.Mediator.Tests.StateMachine.Integration.csproj @@ -28,7 +28,7 @@ - + diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/packages.lock.json b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/packages.lock.json index 50ce6d7dc..00568d3d0 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/packages.lock.json +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.StateMachine.Integration/packages.lock.json @@ -362,31 +362,31 @@ "Trax.Effect.Data": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "dbup-core": { diff --git a/Trax.Samples/book/Shopfront/Directory.Packages.props b/Trax.Samples/book/Shopfront/Directory.Packages.props index 925891e30..7038e13be 100644 --- a/Trax.Samples/book/Shopfront/Directory.Packages.props +++ b/Trax.Samples/book/Shopfront/Directory.Packages.props @@ -20,8 +20,8 @@ - - + + diff --git a/Trax.Samples/book/Shopfront/Shopfront.Core/Machines/Checkout/CheckoutMachine.cs b/Trax.Samples/book/Shopfront/Shopfront.Core/Machines/Checkout/CheckoutMachine.cs index 62bbcabaf..e3ef15c7e 100644 --- a/Trax.Samples/book/Shopfront/Shopfront.Core/Machines/Checkout/CheckoutMachine.cs +++ b/Trax.Samples/book/Shopfront/Shopfront.Core/Machines/Checkout/CheckoutMachine.cs @@ -6,9 +6,9 @@ using Shopfront.Trains.PlaceOrder; using Shopfront.Trains.PlaceOrder.Models; using Trax.Effect.Attributes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; namespace Shopfront.Machines.Checkout; diff --git a/Trax.Samples/book/Shopfront/Shopfront.Core/Machines/InvokedRuns.cs b/Trax.Samples/book/Shopfront/Shopfront.Core/Machines/InvokedRuns.cs index 3e7bc6d48..3049c9a11 100644 --- a/Trax.Samples/book/Shopfront/Shopfront.Core/Machines/InvokedRuns.cs +++ b/Trax.Samples/book/Shopfront/Shopfront.Core/Machines/InvokedRuns.cs @@ -1,4 +1,4 @@ -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Shopfront.Machines; diff --git a/Trax.Samples/book/Shopfront/Shopfront.Core/Machines/Parcel/ParcelMachine.cs b/Trax.Samples/book/Shopfront/Shopfront.Core/Machines/Parcel/ParcelMachine.cs index 345b13c70..df4c995c1 100644 --- a/Trax.Samples/book/Shopfront/Shopfront.Core/Machines/Parcel/ParcelMachine.cs +++ b/Trax.Samples/book/Shopfront/Shopfront.Core/Machines/Parcel/ParcelMachine.cs @@ -1,6 +1,6 @@ using System.Text.Json.Nodes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Shopfront.Machines.Parcel; diff --git a/Trax.Samples/book/Shopfront/Shopfront.Core/Shopfront.Core.csproj b/Trax.Samples/book/Shopfront/Shopfront.Core/Shopfront.Core.csproj index 96cf12cd1..b808eb94c 100644 --- a/Trax.Samples/book/Shopfront/Shopfront.Core/Shopfront.Core.csproj +++ b/Trax.Samples/book/Shopfront/Shopfront.Core/Shopfront.Core.csproj @@ -28,7 +28,7 @@ - + diff --git a/Trax.Samples/book/Shopfront/Shopfront.Core/packages.lock.json b/Trax.Samples/book/Shopfront/Shopfront.Core/packages.lock.json index a46b16ce0..20ba7f156 100644 --- a/Trax.Samples/book/Shopfront/Shopfront.Core/packages.lock.json +++ b/Trax.Samples/book/Shopfront/Shopfront.Core/packages.lock.json @@ -266,28 +266,28 @@ "dbup-postgresql": "[7.0.1, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } } } diff --git a/Trax.Samples/book/Shopfront/Shopfront.Hub/Auth/TraxCallerSnapshotPrincipal.cs b/Trax.Samples/book/Shopfront/Shopfront.Hub/Auth/TraxCallerSnapshotPrincipal.cs index 8af29dcef..cedfa27d1 100644 --- a/Trax.Samples/book/Shopfront/Shopfront.Hub/Auth/TraxCallerSnapshotPrincipal.cs +++ b/Trax.Samples/book/Shopfront/Shopfront.Hub/Auth/TraxCallerSnapshotPrincipal.cs @@ -1,5 +1,5 @@ using Trax.Api.Auth; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Shopfront.Auth; diff --git a/Trax.Samples/book/Shopfront/Shopfront.Hub/Program.cs b/Trax.Samples/book/Shopfront/Shopfront.Hub/Program.cs index 9cc5d2e11..f4a8fbcfa 100644 --- a/Trax.Samples/book/Shopfront/Shopfront.Hub/Program.cs +++ b/Trax.Samples/book/Shopfront/Shopfront.Hub/Program.cs @@ -23,7 +23,7 @@ using Trax.Effect.JunctionProvider.Progress.Extensions; using Trax.Effect.Models.Manifest; using Trax.Effect.Provider.Parameter.Extensions; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; using Trax.Mediator.Extensions; using Trax.Scheduler.Extensions; using Trax.Scheduler.Services.JobSubmitter; diff --git a/Trax.Samples/book/Shopfront/Shopfront.Hub/packages.lock.json b/Trax.Samples/book/Shopfront/Shopfront.Hub/packages.lock.json index 91fa35d6d..d8b577db1 100644 --- a/Trax.Samples/book/Shopfront/Shopfront.Hub/packages.lock.json +++ b/Trax.Samples/book/Shopfront/Shopfront.Hub/packages.lock.json @@ -631,8 +631,8 @@ "Trax.Core": "[1.99.99, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data.Postgres": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.api": { @@ -740,37 +740,37 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Npgsql.EntityFrameworkCore.PostgreSQL": { diff --git a/Trax.Samples/book/Shopfront/Shopfront.Worker/packages.lock.json b/Trax.Samples/book/Shopfront/Shopfront.Worker/packages.lock.json index 274c9c5e2..b05d3e066 100644 --- a/Trax.Samples/book/Shopfront/Shopfront.Worker/packages.lock.json +++ b/Trax.Samples/book/Shopfront/Shopfront.Worker/packages.lock.json @@ -75,8 +75,8 @@ "Trax.Core": "[1.99.99, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data.Postgres": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.api.auth": { @@ -140,37 +140,37 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Npgsql.EntityFrameworkCore.PostgreSQL": { diff --git a/Trax.Samples/book/Shopfront/tests/Shopfront.Tests/IntegrationTests/PersistedOperationsTests.cs b/Trax.Samples/book/Shopfront/tests/Shopfront.Tests/IntegrationTests/PersistedOperationsTests.cs index bbac77fa5..705e7f7fa 100644 --- a/Trax.Samples/book/Shopfront/tests/Shopfront.Tests/IntegrationTests/PersistedOperationsTests.cs +++ b/Trax.Samples/book/Shopfront/tests/Shopfront.Tests/IntegrationTests/PersistedOperationsTests.cs @@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc.Testing; using Shopfront.Auth; -using Trax.Effect.StateMachine; +using Trax.StateMachine; namespace Shopfront.Tests.IntegrationTests; diff --git a/Trax.Samples/book/Shopfront/tests/Shopfront.Tests/Shopfront.Tests.csproj b/Trax.Samples/book/Shopfront/tests/Shopfront.Tests/Shopfront.Tests.csproj index 924f910ec..dd0ad6692 100644 --- a/Trax.Samples/book/Shopfront/tests/Shopfront.Tests/Shopfront.Tests.csproj +++ b/Trax.Samples/book/Shopfront/tests/Shopfront.Tests/Shopfront.Tests.csproj @@ -30,7 +30,7 @@ - + diff --git a/Trax.Samples/book/Shopfront/tests/Shopfront.Tests/UnitTests/CheckoutMachineTests.cs b/Trax.Samples/book/Shopfront/tests/Shopfront.Tests/UnitTests/CheckoutMachineTests.cs index 337491d85..f58b56ebf 100644 --- a/Trax.Samples/book/Shopfront/tests/Shopfront.Tests/UnitTests/CheckoutMachineTests.cs +++ b/Trax.Samples/book/Shopfront/tests/Shopfront.Tests/UnitTests/CheckoutMachineTests.cs @@ -1,5 +1,5 @@ using Shopfront.Machines.Checkout; -using Trax.Effect.StateMachine.Testing; +using Trax.StateMachine.Testing; namespace Shopfront.Tests.UnitTests; diff --git a/Trax.Samples/book/Shopfront/tests/Shopfront.Tests/packages.lock.json b/Trax.Samples/book/Shopfront/tests/Shopfront.Tests/packages.lock.json index b36f3a0bc..1e3754cc1 100644 --- a/Trax.Samples/book/Shopfront/tests/Shopfront.Tests/packages.lock.json +++ b/Trax.Samples/book/Shopfront/tests/Shopfront.Tests/packages.lock.json @@ -1129,8 +1129,8 @@ "Trax.Core": "[1.99.99, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data.Postgres": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "shopfront.hub": { @@ -1284,54 +1284,54 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { + "trax.mediator": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.testing": { + "trax.mediator.testing": { "type": "Project", "dependencies": { - "Trax.Effect.StateMachine": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "NUnit": "[5.0.0, )", + "Trax.Core.Testing": "[1.99.99, )" } }, - "trax.mediator": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator.testing": { + "trax.statemachine": { "type": "Project", "dependencies": { - "NUnit": "[5.0.0, )", - "Trax.Core.Testing": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" + } + }, + "trax.statemachine.testing": { + "type": "Project", + "dependencies": { + "Trax.StateMachine": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "Microsoft.Testing.Extensions.VSTestBridge": { diff --git a/Trax.Samples/samples/Auth/Trax.Samples.Auth/packages.lock.json b/Trax.Samples/samples/Auth/Trax.Samples.Auth/packages.lock.json index 72a3704f1..d639d67e4 100644 --- a/Trax.Samples/samples/Auth/Trax.Samples.Auth/packages.lock.json +++ b/Trax.Samples/samples/Auth/Trax.Samples.Auth/packages.lock.json @@ -606,37 +606,37 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Samples/samples/Bookworm/Trax.Samples.Bookworm.Api/packages.lock.json b/Trax.Samples/samples/Bookworm/Trax.Samples.Bookworm.Api/packages.lock.json index 972c9f367..3fe6fb528 100644 --- a/Trax.Samples/samples/Bookworm/Trax.Samples.Bookworm.Api/packages.lock.json +++ b/Trax.Samples/samples/Bookworm/Trax.Samples.Bookworm.Api/packages.lock.json @@ -556,28 +556,12 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.bookworm": { @@ -629,6 +613,22 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/samples/Bookworm/Trax.Samples.Bookworm.CrossSchema/packages.lock.json b/Trax.Samples/samples/Bookworm/Trax.Samples.Bookworm.CrossSchema/packages.lock.json index 1357b9335..e557cc5ce 100644 --- a/Trax.Samples/samples/Bookworm/Trax.Samples.Bookworm.CrossSchema/packages.lock.json +++ b/Trax.Samples/samples/Bookworm/Trax.Samples.Bookworm.CrossSchema/packages.lock.json @@ -640,31 +640,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.bookworm.catalog": { @@ -694,6 +676,24 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/samples/Bookworm/Trax.Samples.Bookworm/packages.lock.json b/Trax.Samples/samples/Bookworm/Trax.Samples.Bookworm/packages.lock.json index 2c2c11463..ae02154b7 100644 --- a/Trax.Samples/samples/Bookworm/Trax.Samples.Bookworm/packages.lock.json +++ b/Trax.Samples/samples/Bookworm/Trax.Samples.Bookworm/packages.lock.json @@ -135,31 +135,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.bookworm.catalog": { @@ -180,6 +162,24 @@ "Trax.Effect.Data": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Microsoft.EntityFrameworkCore.Relational": { "type": "CentralTransitive", "requested": "[10.0.12, )", diff --git a/Trax.Samples/samples/ChatService/Trax.Samples.ChatService.Api/packages.lock.json b/Trax.Samples/samples/ChatService/Trax.Samples.ChatService.Api/packages.lock.json index e01915e76..15217efb5 100644 --- a/Trax.Samples/samples/ChatService/Trax.Samples.ChatService.Api/packages.lock.json +++ b/Trax.Samples/samples/ChatService/Trax.Samples.ChatService.Api/packages.lock.json @@ -612,28 +612,12 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.chatservice": { @@ -666,6 +650,22 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/samples/ChatService/Trax.Samples.ChatService/packages.lock.json b/Trax.Samples/samples/ChatService/Trax.Samples.ChatService/packages.lock.json index c9b32a54a..9d6a858c3 100644 --- a/Trax.Samples/samples/ChatService/Trax.Samples.ChatService/packages.lock.json +++ b/Trax.Samples/samples/ChatService/Trax.Samples.ChatService/packages.lock.json @@ -526,37 +526,37 @@ "dbup-sqlite": "[6.0.4, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.samples.chatservice.data": { "type": "Project", "dependencies": { "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Microsoft.EntityFrameworkCore.Sqlite": "[10.0.12, )", + "SQLitePCLRaw.bundle_e_sqlite3": "[3.0.5, )", + "Trax.Effect.Data": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.samples.chatservice.data": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[10.0.12, )", - "SQLitePCLRaw.bundle_e_sqlite3": "[3.0.5, )", - "Trax.Effect.Data": "[1.99.99, )" + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" } }, "dbup-core": { diff --git a/Trax.Samples/samples/DistributedWorkers/Trax.Samples.EnergyHub.Hub/packages.lock.json b/Trax.Samples/samples/DistributedWorkers/Trax.Samples.EnergyHub.Hub/packages.lock.json index 373d87cf9..58ac878a7 100644 --- a/Trax.Samples/samples/DistributedWorkers/Trax.Samples.EnergyHub.Hub/packages.lock.json +++ b/Trax.Samples/samples/DistributedWorkers/Trax.Samples.EnergyHub.Hub/packages.lock.json @@ -598,28 +598,12 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.energyhub": { @@ -642,6 +626,22 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/samples/DistributedWorkers/Trax.Samples.EnergyHub.Worker/packages.lock.json b/Trax.Samples/samples/DistributedWorkers/Trax.Samples.EnergyHub.Worker/packages.lock.json index 301bddc10..0c91228a0 100644 --- a/Trax.Samples/samples/DistributedWorkers/Trax.Samples.EnergyHub.Worker/packages.lock.json +++ b/Trax.Samples/samples/DistributedWorkers/Trax.Samples.EnergyHub.Worker/packages.lock.json @@ -73,28 +73,12 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.energyhub": { @@ -117,6 +101,22 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/samples/DistributedWorkers/Trax.Samples.EnergyHub/packages.lock.json b/Trax.Samples/samples/DistributedWorkers/Trax.Samples.EnergyHub/packages.lock.json index d8c6f8467..0462c2543 100644 --- a/Trax.Samples/samples/DistributedWorkers/Trax.Samples.EnergyHub/packages.lock.json +++ b/Trax.Samples/samples/DistributedWorkers/Trax.Samples.EnergyHub/packages.lock.json @@ -68,37 +68,37 @@ "dbup-postgresql": "[7.0.1, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Samples/samples/EphemeralWorkers/Trax.Samples.ContentShield.Api/packages.lock.json b/Trax.Samples/samples/EphemeralWorkers/Trax.Samples.ContentShield.Api/packages.lock.json index 9b3546c05..c68647057 100644 --- a/Trax.Samples/samples/EphemeralWorkers/Trax.Samples.ContentShield.Api/packages.lock.json +++ b/Trax.Samples/samples/EphemeralWorkers/Trax.Samples.ContentShield.Api/packages.lock.json @@ -598,28 +598,12 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.contentshield": { @@ -641,6 +625,22 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/samples/EphemeralWorkers/Trax.Samples.ContentShield.Runner/packages.lock.json b/Trax.Samples/samples/EphemeralWorkers/Trax.Samples.ContentShield.Runner/packages.lock.json index 52171f35c..05abd836a 100644 --- a/Trax.Samples/samples/EphemeralWorkers/Trax.Samples.ContentShield.Runner/packages.lock.json +++ b/Trax.Samples/samples/EphemeralWorkers/Trax.Samples.ContentShield.Runner/packages.lock.json @@ -129,31 +129,13 @@ "dbup-postgresql": "[7.0.1, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.runner.lambda": { @@ -183,6 +165,24 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Amazon.Lambda.Core": { "type": "CentralTransitive", "requested": "[3.3.0, )", diff --git a/Trax.Samples/samples/EphemeralWorkers/Trax.Samples.ContentShield/packages.lock.json b/Trax.Samples/samples/EphemeralWorkers/Trax.Samples.ContentShield/packages.lock.json index 61e0c68e0..7423345ea 100644 --- a/Trax.Samples/samples/EphemeralWorkers/Trax.Samples.ContentShield/packages.lock.json +++ b/Trax.Samples/samples/EphemeralWorkers/Trax.Samples.ContentShield/packages.lock.json @@ -68,28 +68,28 @@ "dbup-postgresql": "[7.0.1, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "dbup-core": { diff --git a/Trax.Samples/samples/GraphQLClient/Trax.Samples.GraphQLClient.BillingServer/packages.lock.json b/Trax.Samples/samples/GraphQLClient/Trax.Samples.GraphQLClient.BillingServer/packages.lock.json index 26be80159..a00e41450 100644 --- a/Trax.Samples/samples/GraphQLClient/Trax.Samples.GraphQLClient.BillingServer/packages.lock.json +++ b/Trax.Samples/samples/GraphQLClient/Trax.Samples.GraphQLClient.BillingServer/packages.lock.json @@ -582,37 +582,37 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Samples/samples/GraphQLClient/Trax.Samples.GraphQLClient.Gateway/packages.lock.json b/Trax.Samples/samples/GraphQLClient/Trax.Samples.GraphQLClient.Gateway/packages.lock.json index bd753a7b7..50ef95076 100644 --- a/Trax.Samples/samples/GraphQLClient/Trax.Samples.GraphQLClient.Gateway/packages.lock.json +++ b/Trax.Samples/samples/GraphQLClient/Trax.Samples.GraphQLClient.Gateway/packages.lock.json @@ -592,28 +592,12 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.graphqlclient.billingserver": { @@ -655,6 +639,22 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/samples/GraphQLClient/Trax.Samples.GraphQLClient.InventoryServer/packages.lock.json b/Trax.Samples/samples/GraphQLClient/Trax.Samples.GraphQLClient.InventoryServer/packages.lock.json index 26be80159..a00e41450 100644 --- a/Trax.Samples/samples/GraphQLClient/Trax.Samples.GraphQLClient.InventoryServer/packages.lock.json +++ b/Trax.Samples/samples/GraphQLClient/Trax.Samples.GraphQLClient.InventoryServer/packages.lock.json @@ -582,37 +582,37 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Samples/samples/GraphQLClient/Trax.Samples.GraphQLClient/packages.lock.json b/Trax.Samples/samples/GraphQLClient/Trax.Samples.GraphQLClient/packages.lock.json index fd0b26d4b..bc1986844 100644 --- a/Trax.Samples/samples/GraphQLClient/Trax.Samples.GraphQLClient/packages.lock.json +++ b/Trax.Samples/samples/GraphQLClient/Trax.Samples.GraphQLClient/packages.lock.json @@ -513,28 +513,28 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "GraphQL": { diff --git a/Trax.Samples/samples/PersistedOperations/Trax.Samples.PersistedOperations.Api/packages.lock.json b/Trax.Samples/samples/PersistedOperations/Trax.Samples.PersistedOperations.Api/packages.lock.json index a4a3e6107..30f7fe8e6 100644 --- a/Trax.Samples/samples/PersistedOperations/Trax.Samples.PersistedOperations.Api/packages.lock.json +++ b/Trax.Samples/samples/PersistedOperations/Trax.Samples.PersistedOperations.Api/packages.lock.json @@ -586,46 +586,46 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.samples.persistedoperations": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Effect.Data.Postgres": "[1.99.99, )", + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.scheduler": { "type": "Project", "dependencies": { + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.samples.persistedoperations": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.Data.Postgres": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Samples/samples/PersistedOperations/Trax.Samples.PersistedOperations/packages.lock.json b/Trax.Samples/samples/PersistedOperations/Trax.Samples.PersistedOperations/packages.lock.json index 3594b1ce0..748a6042c 100644 --- a/Trax.Samples/samples/PersistedOperations/Trax.Samples.PersistedOperations/packages.lock.json +++ b/Trax.Samples/samples/PersistedOperations/Trax.Samples.PersistedOperations/packages.lock.json @@ -47,28 +47,28 @@ "dbup-postgresql": "[7.0.1, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "dbup-core": { diff --git a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Api/Program.cs b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Api/Program.cs index 638c43f37..9db080b31 100644 --- a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Api/Program.cs +++ b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Api/Program.cs @@ -36,7 +36,6 @@ using Trax.Effect.JunctionProvider.Progress.Extensions; using Trax.Effect.Provider.Json.Extensions; using Trax.Effect.Provider.Parameter.Extensions; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Extensions; using Trax.Samples.Recovery; using Trax.Samples.Recovery.Api; @@ -49,6 +48,7 @@ using Trax.Samples.Recovery.Orders; using Trax.Samples.Recovery.Records; using Trax.Scheduler.Extensions; +using Trax.StateMachine.Persistence; var builder = WebApplication.CreateBuilder(args); diff --git a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Api/TraxCallerSnapshotPrincipal.cs b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Api/TraxCallerSnapshotPrincipal.cs index 7ffcee33b..77c735ae4 100644 --- a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Api/TraxCallerSnapshotPrincipal.cs +++ b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Api/TraxCallerSnapshotPrincipal.cs @@ -1,5 +1,5 @@ using Trax.Api.Auth; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Samples.Recovery.Api; diff --git a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Api/packages.lock.json b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Api/packages.lock.json index 32100e7aa..c571164db 100644 --- a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Api/packages.lock.json +++ b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery.Api/packages.lock.json @@ -589,48 +589,48 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.samples.recovery": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )", + "Trax.Scheduler": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.mediator": { + "trax.scheduler": { "type": "Project", "dependencies": { + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.samples.recovery": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )", - "Trax.Scheduler": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Machines/OrderMachine.cs b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Machines/OrderMachine.cs index de1948439..a35c7ca7b 100644 --- a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Machines/OrderMachine.cs +++ b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Machines/OrderMachine.cs @@ -1,9 +1,9 @@ using System.Text.Json.Nodes; using Trax.Effect.Attributes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Samples.Recovery.Trains.Order; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; namespace Trax.Samples.Recovery.Machines; diff --git a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Machines/SourcePartitionMachine.cs b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Machines/SourcePartitionMachine.cs index 3fae0dfcc..50e0d3056 100644 --- a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Machines/SourcePartitionMachine.cs +++ b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Machines/SourcePartitionMachine.cs @@ -1,9 +1,9 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json.Nodes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Samples.Recovery.Trains.Ingest; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; namespace Trax.Samples.Recovery.Machines; diff --git a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Machines/TopicMapMachine.cs b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Machines/TopicMapMachine.cs index 30292ea32..dce48d2cd 100644 --- a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Machines/TopicMapMachine.cs +++ b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Machines/TopicMapMachine.cs @@ -1,11 +1,11 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json.Nodes; using Trax.Effect.Attributes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Samples.Recovery.Auth; using Trax.Samples.Recovery.Trains.Topics; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; namespace Trax.Samples.Recovery.Machines; diff --git a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trains/Discover/Junctions/StartPartitionMachines.cs b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trains/Discover/Junctions/StartPartitionMachines.cs index 9c8d32cf4..3c2ede3fc 100644 --- a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trains/Discover/Junctions/StartPartitionMachines.cs +++ b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trains/Discover/Junctions/StartPartitionMachines.cs @@ -1,6 +1,6 @@ using Trax.Effect.Services.EffectJunction; -using Trax.Effect.StateMachine.Persistence; using Trax.Samples.Recovery.Machines; +using Trax.StateMachine.Persistence; namespace Trax.Samples.Recovery.Trains.Discover.Junctions; diff --git a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trains/Order/Junctions/SendToRestaurant.cs b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trains/Order/Junctions/SendToRestaurant.cs index 8468fdbfd..b1d401fb7 100644 --- a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trains/Order/Junctions/SendToRestaurant.cs +++ b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trains/Order/Junctions/SendToRestaurant.cs @@ -1,7 +1,7 @@ using Trax.Effect.Services.EffectJunction; -using Trax.Effect.StateMachine.Persistence; using Trax.Samples.Recovery.Faults; using Trax.Samples.Recovery.Orders; +using Trax.StateMachine.Persistence; namespace Trax.Samples.Recovery.Trains.Order.Junctions; diff --git a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trains/OrderDemo/OrderTroubleTrain.cs b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trains/OrderDemo/OrderTroubleTrain.cs index 842ac7769..56943dc84 100644 --- a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trains/OrderDemo/OrderTroubleTrain.cs +++ b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trains/OrderDemo/OrderTroubleTrain.cs @@ -2,9 +2,9 @@ using Trax.Core.Junction; using Trax.Effect.Attributes; using Trax.Effect.Services.ServiceTrain; -using Trax.Effect.StateMachine.Persistence; using Trax.Samples.Recovery.Auth; using Trax.Samples.Recovery.Faults; +using Trax.StateMachine.Persistence; namespace Trax.Samples.Recovery.Trains.OrderDemo; diff --git a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trains/OrderDemo/TabletCallsTrain.cs b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trains/OrderDemo/TabletCallsTrain.cs index a201429ae..54b294f46 100644 --- a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trains/OrderDemo/TabletCallsTrain.cs +++ b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trains/OrderDemo/TabletCallsTrain.cs @@ -2,9 +2,9 @@ using Trax.Core.Junction; using Trax.Effect.Attributes; using Trax.Effect.Services.ServiceTrain; -using Trax.Effect.StateMachine.Persistence; using Trax.Samples.Recovery.Auth; using Trax.Samples.Recovery.Orders; +using Trax.StateMachine.Persistence; namespace Trax.Samples.Recovery.Trains.OrderDemo; diff --git a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trains/PartitionAction/Junctions/AdvancePartition.cs b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trains/PartitionAction/Junctions/AdvancePartition.cs index 6fc720ccf..5c3cb5021 100644 --- a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trains/PartitionAction/Junctions/AdvancePartition.cs +++ b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trains/PartitionAction/Junctions/AdvancePartition.cs @@ -1,7 +1,7 @@ using Trax.Effect.Services.EffectJunction; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Samples.Recovery.Machines; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Samples.Recovery.Trains.PartitionAction.Junctions; diff --git a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trax.Samples.Recovery.csproj b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trax.Samples.Recovery.csproj index 49a901a29..e6d471204 100644 --- a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trax.Samples.Recovery.csproj +++ b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/Trax.Samples.Recovery.csproj @@ -13,8 +13,8 @@ - - + + diff --git a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/packages.lock.json b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/packages.lock.json index 954b13137..08ccc1ea8 100644 --- a/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/packages.lock.json +++ b/Trax.Samples/samples/Recovery/Trax.Samples.Recovery/packages.lock.json @@ -36,37 +36,37 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Samples/samples/Scheduling/Trax.Samples.Scheduling.Host/packages.lock.json b/Trax.Samples/samples/Scheduling/Trax.Samples.Scheduling.Host/packages.lock.json index 8a433350d..e5a587834 100644 --- a/Trax.Samples/samples/Scheduling/Trax.Samples.Scheduling.Host/packages.lock.json +++ b/Trax.Samples/samples/Scheduling/Trax.Samples.Scheduling.Host/packages.lock.json @@ -562,45 +562,45 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.samples.scheduling": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )", + "Trax.Scheduler": "[1.99.99, )" } }, - "trax.mediator": { + "trax.scheduler": { "type": "Project", "dependencies": { + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.samples.scheduling": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )", - "Trax.Scheduler": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Samples/samples/Scheduling/Trax.Samples.Scheduling/packages.lock.json b/Trax.Samples/samples/Scheduling/Trax.Samples.Scheduling/packages.lock.json index 954b13137..08ccc1ea8 100644 --- a/Trax.Samples/samples/Scheduling/Trax.Samples.Scheduling/packages.lock.json +++ b/Trax.Samples/samples/Scheduling/Trax.Samples.Scheduling/packages.lock.json @@ -36,37 +36,37 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Samples/samples/SignalRBroadcaster/Trax.Samples.SignalRBroadcaster/packages.lock.json b/Trax.Samples/samples/SignalRBroadcaster/Trax.Samples.SignalRBroadcaster/packages.lock.json index ed0cc224a..e210d2b59 100644 --- a/Trax.Samples/samples/SignalRBroadcaster/Trax.Samples.SignalRBroadcaster/packages.lock.json +++ b/Trax.Samples/samples/SignalRBroadcaster/Trax.Samples.SignalRBroadcaster/packages.lock.json @@ -50,28 +50,28 @@ "Trax.Effect.Data": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Microsoft.EntityFrameworkCore": { diff --git a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine.Api/Program.cs b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine.Api/Program.cs index aa5649ff1..097122c6a 100644 --- a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine.Api/Program.cs +++ b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine.Api/Program.cs @@ -34,10 +34,10 @@ using Trax.Effect.Data.Postgres.Extensions; using Trax.Effect.Extensions; using Trax.Effect.Provider.Json.Extensions; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Extensions; using Trax.Samples.StateMachine; using Trax.Samples.StateMachine.Api; +using Trax.StateMachine.Persistence; var builder = WebApplication.CreateBuilder(args); diff --git a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine.Api/Trax.Samples.StateMachine.Api.csproj b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine.Api/Trax.Samples.StateMachine.Api.csproj index cb0f4edb4..3c43b21d8 100644 --- a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine.Api/Trax.Samples.StateMachine.Api.csproj +++ b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine.Api/Trax.Samples.StateMachine.Api.csproj @@ -15,7 +15,7 @@ - + diff --git a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine.Api/packages.lock.json b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine.Api/packages.lock.json index 2622776ec..050289517 100644 --- a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine.Api/packages.lock.json +++ b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine.Api/packages.lock.json @@ -564,46 +564,46 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.samples.statemachine": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Trax.Api.Auth": "[1.99.99, )", "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.mediator": { + "trax.scheduler": { "type": "Project", "dependencies": { + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.samples.statemachine": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Api.Auth": "[1.99.99, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/Machines.cs b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/Machines.cs index 35cc32a6a..1cd1f2e03 100644 --- a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/Machines.cs +++ b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/Machines.cs @@ -4,9 +4,9 @@ using System.Text.Json.Nodes; using Microsoft.Extensions.Logging; using Trax.Effect.Attributes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; namespace Trax.Samples.StateMachine; diff --git a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/MachinesQuery.cs b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/MachinesQuery.cs index d7c398f96..0313198ab 100644 --- a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/MachinesQuery.cs +++ b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/MachinesQuery.cs @@ -2,7 +2,7 @@ using Trax.Core.Junction; using Trax.Effect.Attributes; using Trax.Effect.Services.ServiceTrain; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Samples.StateMachine; diff --git a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/Payments.cs b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/Payments.cs index 25ea45af6..e7f3a224f 100644 --- a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/Payments.cs +++ b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/Payments.cs @@ -3,7 +3,7 @@ using Trax.Core.Junction; using Trax.Effect.Attributes; using Trax.Effect.Services.ServiceTrain; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Samples.StateMachine; diff --git a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/SnapshotPrincipal.cs b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/SnapshotPrincipal.cs index 79ca16884..b2a977eea 100644 --- a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/SnapshotPrincipal.cs +++ b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/SnapshotPrincipal.cs @@ -1,5 +1,5 @@ using Trax.Api.Auth; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Samples.StateMachine; diff --git a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/Trax.Samples.StateMachine.csproj b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/Trax.Samples.StateMachine.csproj index bb5f7dba5..65efc7904 100644 --- a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/Trax.Samples.StateMachine.csproj +++ b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/Trax.Samples.StateMachine.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/packages.lock.json b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/packages.lock.json index c990e19c2..cd14dea55 100644 --- a/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/packages.lock.json +++ b/Trax.Samples/samples/StateMachine/Trax.Samples.StateMachine/packages.lock.json @@ -112,31 +112,31 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Microsoft.EntityFrameworkCore": { diff --git a/Trax.Samples/templates/content/Trax.Samples.Api/packages.lock.json b/Trax.Samples/templates/content/Trax.Samples.Api/packages.lock.json index 00c474b7d..cb08b3ebb 100644 --- a/Trax.Samples/templates/content/Trax.Samples.Api/packages.lock.json +++ b/Trax.Samples/templates/content/Trax.Samples.Api/packages.lock.json @@ -547,37 +547,37 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Samples/templates/content/Trax.Samples.Api/tests/Trax.Samples.Api.Tests/packages.lock.json b/Trax.Samples/templates/content/Trax.Samples.Api/tests/Trax.Samples.Api.Tests/packages.lock.json index d6551d69f..74c3c3580 100644 --- a/Trax.Samples/templates/content/Trax.Samples.Api/tests/Trax.Samples.Api.Tests/packages.lock.json +++ b/Trax.Samples/templates/content/Trax.Samples.Api/tests/Trax.Samples.Api.Tests/packages.lock.json @@ -884,31 +884,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.api": { @@ -933,6 +915,24 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/templates/content/Trax.Samples.Hub/packages.lock.json b/Trax.Samples/templates/content/Trax.Samples.Hub/packages.lock.json index 8ae2858fc..00436a2e8 100644 --- a/Trax.Samples/templates/content/Trax.Samples.Hub/packages.lock.json +++ b/Trax.Samples/templates/content/Trax.Samples.Hub/packages.lock.json @@ -560,37 +560,37 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Samples/templates/content/Trax.Samples.Hub/tests/Trax.Samples.Hub.Tests/packages.lock.json b/Trax.Samples/templates/content/Trax.Samples.Hub/tests/Trax.Samples.Hub.Tests/packages.lock.json index 1c11942b7..afb6075a7 100644 --- a/Trax.Samples/templates/content/Trax.Samples.Hub/tests/Trax.Samples.Hub.Tests/packages.lock.json +++ b/Trax.Samples/templates/content/Trax.Samples.Hub/tests/Trax.Samples.Hub.Tests/packages.lock.json @@ -897,31 +897,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.hub": { @@ -949,6 +931,24 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/templates/content/Trax.Samples.Scheduler/packages.lock.json b/Trax.Samples/templates/content/Trax.Samples.Scheduler/packages.lock.json index 8ae2858fc..00436a2e8 100644 --- a/Trax.Samples/templates/content/Trax.Samples.Scheduler/packages.lock.json +++ b/Trax.Samples/templates/content/Trax.Samples.Scheduler/packages.lock.json @@ -560,37 +560,37 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Samples/templates/content/Trax.Samples.Scheduler/tests/Trax.Samples.Scheduler.Tests/packages.lock.json b/Trax.Samples/templates/content/Trax.Samples.Scheduler/tests/Trax.Samples.Scheduler.Tests/packages.lock.json index 7543e4958..ffec02b6a 100644 --- a/Trax.Samples/templates/content/Trax.Samples.Scheduler/tests/Trax.Samples.Scheduler.Tests/packages.lock.json +++ b/Trax.Samples/templates/content/Trax.Samples.Scheduler/tests/Trax.Samples.Scheduler.Tests/packages.lock.json @@ -897,31 +897,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.scheduler": { @@ -948,6 +930,24 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/tests/Trax.Samples.ApiDashboard.Browser/Factories/ConsoleHost.cs b/Trax.Samples/tests/Trax.Samples.ApiDashboard.Browser/Factories/ConsoleHost.cs index 019763661..c04634d8c 100644 --- a/Trax.Samples/tests/Trax.Samples.ApiDashboard.Browser/Factories/ConsoleHost.cs +++ b/Trax.Samples/tests/Trax.Samples.ApiDashboard.Browser/Factories/ConsoleHost.cs @@ -19,12 +19,12 @@ using Trax.Effect.Extensions; using Trax.Effect.JunctionProvider.Progress.Extensions; using Trax.Effect.Provider.Parameter.Extensions; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Extensions; using Trax.Samples.ApiDashboard.Browser.Fixtures; using Trax.Samples.ApiDashboard.Browser.Host; using Trax.Scheduler.Extensions; using Trax.Scheduler.Services.Scheduling; +using Trax.StateMachine.Persistence; namespace Trax.Samples.ApiDashboard.Browser.Factories; diff --git a/Trax.Samples/tests/Trax.Samples.ApiDashboard.Browser/Fixtures/Seed.cs b/Trax.Samples/tests/Trax.Samples.ApiDashboard.Browser/Fixtures/Seed.cs index 4c6104219..010bd2722 100644 --- a/Trax.Samples/tests/Trax.Samples.ApiDashboard.Browser/Fixtures/Seed.cs +++ b/Trax.Samples/tests/Trax.Samples.ApiDashboard.Browser/Fixtures/Seed.cs @@ -12,7 +12,6 @@ using Trax.Effect.Models.PersistedOperation; using Trax.Effect.Models.WorkQueue; using Trax.Effect.Services.TrainEventBroadcaster; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Services.TrainExecution; using Trax.Mediator.Services.TrustedExecution; using Trax.Samples.ApiDashboard.Browser.Factories; @@ -21,6 +20,7 @@ using Trax.Scheduler.Services.Operations; using Trax.Scheduler.Services.Scheduling; using Trax.Scheduler.Services.TraxScheduler; +using Trax.StateMachine.Persistence; namespace Trax.Samples.ApiDashboard.Browser.Fixtures; diff --git a/Trax.Samples/tests/Trax.Samples.ApiDashboard.Browser/Host/BrowserHostModel.cs b/Trax.Samples/tests/Trax.Samples.ApiDashboard.Browser/Host/BrowserHostModel.cs index e2117d5f5..876ad09ce 100644 --- a/Trax.Samples/tests/Trax.Samples.ApiDashboard.Browser/Host/BrowserHostModel.cs +++ b/Trax.Samples/tests/Trax.Samples.ApiDashboard.Browser/Host/BrowserHostModel.cs @@ -5,8 +5,8 @@ using Trax.Effect.Models.Metadata; using Trax.Effect.Services.EffectJunction; using Trax.Effect.Services.ServiceTrain; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; // What the browser tests' host runs. Two trains are scheduled at startup in two dependent manifest groups (the // groups page's dependency graph) and a system-owned machine has an instance (the state-machine pages); the rest diff --git a/Trax.Samples/tests/Trax.Samples.ApiDashboard.Browser/Tests/ApiDashboardBrowserTests.cs b/Trax.Samples/tests/Trax.Samples.ApiDashboard.Browser/Tests/ApiDashboardBrowserTests.cs index bc266f6b8..fda5c2678 100644 --- a/Trax.Samples/tests/Trax.Samples.ApiDashboard.Browser/Tests/ApiDashboardBrowserTests.cs +++ b/Trax.Samples/tests/Trax.Samples.ApiDashboard.Browser/Tests/ApiDashboardBrowserTests.cs @@ -1,8 +1,8 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Playwright; -using Trax.Effect.StateMachine.Persistence; using Trax.Samples.ApiDashboard.Browser.Fixtures; using Trax.Samples.ApiDashboard.Browser.Host; +using Trax.StateMachine.Persistence; namespace Trax.Samples.ApiDashboard.Browser.Tests; diff --git a/Trax.Samples/tests/Trax.Samples.ApiDashboard.Browser/packages.lock.json b/Trax.Samples/tests/Trax.Samples.ApiDashboard.Browser/packages.lock.json index e6fe16737..ad564d3f4 100644 --- a/Trax.Samples/tests/Trax.Samples.ApiDashboard.Browser/packages.lock.json +++ b/Trax.Samples/tests/Trax.Samples.ApiDashboard.Browser/packages.lock.json @@ -758,28 +758,12 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.shared.testing": { @@ -803,6 +787,22 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/tests/Trax.Samples.Auth.E2E/packages.lock.json b/Trax.Samples/tests/Trax.Samples.Auth.E2E/packages.lock.json index aa0f8501d..f1bba50e4 100644 --- a/Trax.Samples/tests/Trax.Samples.Auth.E2E/packages.lock.json +++ b/Trax.Samples/tests/Trax.Samples.Auth.E2E/packages.lock.json @@ -984,31 +984,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.auth": { @@ -1053,6 +1035,24 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/tests/Trax.Samples.Bookworm.E2E/packages.lock.json b/Trax.Samples/tests/Trax.Samples.Bookworm.E2E/packages.lock.json index f24ee6afe..6fb42b49f 100644 --- a/Trax.Samples/tests/Trax.Samples.Bookworm.E2E/packages.lock.json +++ b/Trax.Samples/tests/Trax.Samples.Bookworm.E2E/packages.lock.json @@ -965,31 +965,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.bookworm": { @@ -1065,6 +1047,24 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/tests/Trax.Samples.ChatService.E2E/packages.lock.json b/Trax.Samples/tests/Trax.Samples.ChatService.E2E/packages.lock.json index 7a4a9d3a8..18b5d7407 100644 --- a/Trax.Samples/tests/Trax.Samples.ChatService.E2E/packages.lock.json +++ b/Trax.Samples/tests/Trax.Samples.ChatService.E2E/packages.lock.json @@ -960,31 +960,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.chatservice": { @@ -1028,6 +1010,24 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/tests/Trax.Samples.ChatService.Tests/packages.lock.json b/Trax.Samples/tests/Trax.Samples.ChatService.Tests/packages.lock.json index 2092a5282..31a1289be 100644 --- a/Trax.Samples/tests/Trax.Samples.ChatService.Tests/packages.lock.json +++ b/Trax.Samples/tests/Trax.Samples.ChatService.Tests/packages.lock.json @@ -738,31 +738,13 @@ "dbup-sqlite": "[6.0.4, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.chatservice": { @@ -786,6 +768,24 @@ "Trax.Effect.Data": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "dbup-core": { "type": "CentralTransitive", "requested": "[6.1.1, )", diff --git a/Trax.Samples/tests/Trax.Samples.ContentShield.E2E/packages.lock.json b/Trax.Samples/tests/Trax.Samples.ContentShield.E2E/packages.lock.json index 0b4749d52..eff13d039 100644 --- a/Trax.Samples/tests/Trax.Samples.ContentShield.E2E/packages.lock.json +++ b/Trax.Samples/tests/Trax.Samples.ContentShield.E2E/packages.lock.json @@ -937,31 +937,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.runner.lambda": { @@ -1015,6 +997,24 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Amazon.Lambda.Core": { "type": "CentralTransitive", "requested": "[3.3.0, )", diff --git a/Trax.Samples/tests/Trax.Samples.EnergyHub.E2E/packages.lock.json b/Trax.Samples/tests/Trax.Samples.EnergyHub.E2E/packages.lock.json index d9a966f00..fe491e2c4 100644 --- a/Trax.Samples/tests/Trax.Samples.EnergyHub.E2E/packages.lock.json +++ b/Trax.Samples/tests/Trax.Samples.EnergyHub.E2E/packages.lock.json @@ -937,31 +937,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.energyhub": { @@ -1009,6 +991,24 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/tests/Trax.Samples.GraphQLClient.E2E/packages.lock.json b/Trax.Samples/tests/Trax.Samples.GraphQLClient.E2E/packages.lock.json index 362390774..6d3b2466d 100644 --- a/Trax.Samples/tests/Trax.Samples.GraphQLClient.E2E/packages.lock.json +++ b/Trax.Samples/tests/Trax.Samples.GraphQLClient.E2E/packages.lock.json @@ -956,31 +956,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.graphqlclient": { @@ -1041,6 +1023,24 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/tests/Trax.Samples.PersistedOperations.E2E/packages.lock.json b/Trax.Samples/tests/Trax.Samples.PersistedOperations.E2E/packages.lock.json index c51adadf1..de87467f8 100644 --- a/Trax.Samples/tests/Trax.Samples.PersistedOperations.E2E/packages.lock.json +++ b/Trax.Samples/tests/Trax.Samples.PersistedOperations.E2E/packages.lock.json @@ -925,31 +925,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.persistedoperations": { @@ -984,6 +966,24 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/tests/Trax.Samples.Recovery.Browser/Tests/TopicMapBrowserTests.cs b/Trax.Samples/tests/Trax.Samples.Recovery.Browser/Tests/TopicMapBrowserTests.cs index 87ee5fc58..7d75540c8 100644 --- a/Trax.Samples/tests/Trax.Samples.Recovery.Browser/Tests/TopicMapBrowserTests.cs +++ b/Trax.Samples/tests/Trax.Samples.Recovery.Browser/Tests/TopicMapBrowserTests.cs @@ -2,11 +2,11 @@ using System.Text.Json; using System.Text.RegularExpressions; using Microsoft.Playwright; -using Trax.Effect.StateMachine; using Trax.Samples.Recovery.Browser.Factories; using Trax.Samples.Recovery.Browser.Fixtures; using Trax.Samples.Recovery.E2E.Utilities; using Trax.Samples.Shared.Testing; +using Trax.StateMachine; using static Microsoft.Playwright.Assertions; namespace Trax.Samples.Recovery.Browser.Tests; diff --git a/Trax.Samples/tests/Trax.Samples.Recovery.Browser/packages.lock.json b/Trax.Samples/tests/Trax.Samples.Recovery.Browser/packages.lock.json index 1fc1373f8..5a42b12a3 100644 --- a/Trax.Samples/tests/Trax.Samples.Recovery.Browser/packages.lock.json +++ b/Trax.Samples/tests/Trax.Samples.Recovery.Browser/packages.lock.json @@ -1035,31 +1035,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.recovery": { @@ -1067,10 +1049,10 @@ "dependencies": { "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )", "Trax.Mediator": "[1.99.99, )", - "Trax.Scheduler": "[1.99.99, )" + "Trax.Scheduler": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.recovery.api": { @@ -1111,6 +1093,24 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/ClientManifestExportTests.cs b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/ClientManifestExportTests.cs index 767196087..043a0923d 100644 --- a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/ClientManifestExportTests.cs +++ b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/ClientManifestExportTests.cs @@ -1,7 +1,7 @@ using AwesomeAssertions; -using Trax.Effect.StateMachine; using Trax.Samples.Recovery.E2E.Factories; using Trax.Samples.Recovery.E2E.Utilities; +using Trax.StateMachine; namespace Trax.Samples.Recovery.E2E.RecoveryTests; diff --git a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/OrderMachineTests.cs b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/OrderMachineTests.cs index edffb2c1d..c9ed71766 100644 --- a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/OrderMachineTests.cs +++ b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/OrderMachineTests.cs @@ -3,11 +3,11 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Data.Services.DataContext; -using Trax.Effect.StateMachine.Persistence; using Trax.Samples.Recovery.Auth; using Trax.Samples.Recovery.E2E.Fixtures; using Trax.Samples.Recovery.E2E.Utilities; using Trax.Samples.Recovery.Machines; +using Trax.StateMachine.Persistence; namespace Trax.Samples.Recovery.E2E.RecoveryTests; diff --git a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/SourcePartitionMachineTests.cs b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/SourcePartitionMachineTests.cs index e2e39ad5f..b7f226c94 100644 --- a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/SourcePartitionMachineTests.cs +++ b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/SourcePartitionMachineTests.cs @@ -4,12 +4,12 @@ using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Data.Services.DataContext; using Trax.Effect.Enums; -using Trax.Effect.StateMachine.Persistence; using Trax.Samples.Recovery.E2E.Fixtures; using Trax.Samples.Recovery.E2E.Utilities; using Trax.Samples.Recovery.Faults; using Trax.Samples.Recovery.Index; using Trax.Samples.Recovery.Machines; +using Trax.StateMachine.Persistence; namespace Trax.Samples.Recovery.E2E.RecoveryTests; diff --git a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/TopicMapDifferentialTests.cs b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/TopicMapDifferentialTests.cs index 1869d222b..40ae3053d 100644 --- a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/TopicMapDifferentialTests.cs +++ b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/TopicMapDifferentialTests.cs @@ -1,5 +1,5 @@ -using Trax.Effect.StateMachine.Testing; using Trax.Samples.Recovery.E2E.Utilities; +using Trax.StateMachine.Testing; namespace Trax.Samples.Recovery.E2E.RecoveryTests; diff --git a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/TopicMapDocumentsTests.cs b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/TopicMapDocumentsTests.cs index 073e94d22..23a31780c 100644 --- a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/TopicMapDocumentsTests.cs +++ b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/TopicMapDocumentsTests.cs @@ -1,11 +1,11 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging.Abstractions; using Trax.Api.GraphQL.PersistedOperations.Storage; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Samples.Recovery.Api; using Trax.Samples.Recovery.E2E.Fixtures; using Trax.Samples.Recovery.E2E.Utilities; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Samples.Recovery.E2E.RecoveryTests; diff --git a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/TopicMapMachineTests.cs b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/TopicMapMachineTests.cs index 43eb26cfb..a828bc666 100644 --- a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/TopicMapMachineTests.cs +++ b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/TopicMapMachineTests.cs @@ -3,11 +3,11 @@ using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Data.Services.DataContext; using Trax.Effect.Enums; -using Trax.Effect.StateMachine.Persistence; using Trax.Samples.Recovery.Corpus; using Trax.Samples.Recovery.E2E.Fixtures; using Trax.Samples.Recovery.E2E.Utilities; using Trax.Samples.Recovery.Machines; +using Trax.StateMachine.Persistence; namespace Trax.Samples.Recovery.E2E.RecoveryTests; @@ -283,7 +283,7 @@ await scope .BeOfType() .Which.Reason.Should() .Be( - Trax.Effect.StateMachine.RefusalCode.TimerBound, + Trax.StateMachine.RefusalCode.TimerBound, "only the server fires a timer, when it is due (Trax.Docs/adr/0048)" ); diff --git a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/TriggerMetadataTests.cs b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/TriggerMetadataTests.cs index 586c2b633..06cf97897 100644 --- a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/TriggerMetadataTests.cs +++ b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/RecoveryTests/TriggerMetadataTests.cs @@ -1,7 +1,7 @@ -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Samples.Recovery.Machines; using Trax.Samples.Recovery.Trains.Topics; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Samples.Recovery.E2E.RecoveryTests; diff --git a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/Trax.Samples.Recovery.E2E.csproj b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/Trax.Samples.Recovery.E2E.csproj index e0d4740ef..9bddfd703 100644 --- a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/Trax.Samples.Recovery.E2E.csproj +++ b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/Trax.Samples.Recovery.E2E.csproj @@ -12,7 +12,7 @@ - + diff --git a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/Utilities/PartitionMachines.cs b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/Utilities/PartitionMachines.cs index 4fbd32d7e..615292c1c 100644 --- a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/Utilities/PartitionMachines.cs +++ b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/Utilities/PartitionMachines.cs @@ -34,7 +34,7 @@ public static async Task> AllAsync() /// The instance for one partition, or null. public static async Task OfAsync(string source, string month) { - var id = Effect.StateMachine.Persistence.MachineInstanceId.For( + var id = Trax.StateMachine.Persistence.MachineInstanceId.For( SourcePartitionMachine.MachineId, SourcePartitionMachine.KeyFor(source, month) ); diff --git a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/Utilities/TopicMapArtifacts.cs b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/Utilities/TopicMapArtifacts.cs index 153ea4954..1147df1b6 100644 --- a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/Utilities/TopicMapArtifacts.cs +++ b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/Utilities/TopicMapArtifacts.cs @@ -1,6 +1,6 @@ using System.Reflection; -using Trax.Effect.StateMachine; using Trax.Samples.Recovery.Machines; +using Trax.StateMachine; namespace Trax.Samples.Recovery.E2E.Utilities; diff --git a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/packages.lock.json b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/packages.lock.json index 9229e7990..61e6e20cc 100644 --- a/Trax.Samples/tests/Trax.Samples.Recovery.E2E/packages.lock.json +++ b/Trax.Samples/tests/Trax.Samples.Recovery.E2E/packages.lock.json @@ -1028,38 +1028,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, - "trax.effect.statemachine.testing": { - "type": "Project", - "dependencies": { - "Trax.Effect.StateMachine": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.recovery": { @@ -1067,10 +1042,10 @@ "dependencies": { "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )", "Trax.Mediator": "[1.99.99, )", - "Trax.Scheduler": "[1.99.99, )" + "Trax.Scheduler": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.recovery.api": { @@ -1111,6 +1086,31 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, + "trax.statemachine.testing": { + "type": "Project", + "dependencies": { + "Trax.StateMachine": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/tests/Trax.Samples.Scheduling.E2E/packages.lock.json b/Trax.Samples/tests/Trax.Samples.Scheduling.E2E/packages.lock.json index 6cc162c59..fd9101e3e 100644 --- a/Trax.Samples/tests/Trax.Samples.Scheduling.E2E/packages.lock.json +++ b/Trax.Samples/tests/Trax.Samples.Scheduling.E2E/packages.lock.json @@ -959,31 +959,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.scheduling": { @@ -1026,6 +1008,24 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/tests/Trax.Samples.SignalRBroadcaster.E2E/packages.lock.json b/Trax.Samples/tests/Trax.Samples.SignalRBroadcaster.E2E/packages.lock.json index c9509b8c8..16038caf6 100644 --- a/Trax.Samples/tests/Trax.Samples.SignalRBroadcaster.E2E/packages.lock.json +++ b/Trax.Samples/tests/Trax.Samples.SignalRBroadcaster.E2E/packages.lock.json @@ -447,40 +447,40 @@ "Trax.Effect.Data": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.samples.signalrbroadcaster": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Effect.Broadcaster.SignalR": "[1.99.99, )", + "Trax.Effect.Data.InMemory": "[1.99.99, )", + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.samples.signalrbroadcaster": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Broadcaster.SignalR": "[1.99.99, )", - "Trax.Effect.Data.InMemory": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" } }, "Microsoft.AspNetCore.TestHost": { diff --git a/Trax.Samples/tests/Trax.Samples.StateMachine.E2E/Fixtures/StateMachineTestFixture.cs b/Trax.Samples/tests/Trax.Samples.StateMachine.E2E/Fixtures/StateMachineTestFixture.cs index cf30b2c85..b5091903b 100644 --- a/Trax.Samples/tests/Trax.Samples.StateMachine.E2E/Fixtures/StateMachineTestFixture.cs +++ b/Trax.Samples/tests/Trax.Samples.StateMachine.E2E/Fixtures/StateMachineTestFixture.cs @@ -1,8 +1,8 @@ using System.Text.Json.Nodes; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Samples.StateMachine.E2E.Utilities; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Samples.StateMachine.E2E.Fixtures; diff --git a/Trax.Samples/tests/Trax.Samples.StateMachine.E2E/Tests/ForwardMigrationTests.cs b/Trax.Samples/tests/Trax.Samples.StateMachine.E2E/Tests/ForwardMigrationTests.cs index b0edd9ba1..e30ff1b98 100644 --- a/Trax.Samples/tests/Trax.Samples.StateMachine.E2E/Tests/ForwardMigrationTests.cs +++ b/Trax.Samples/tests/Trax.Samples.StateMachine.E2E/Tests/ForwardMigrationTests.cs @@ -1,9 +1,9 @@ using System.Text.Json.Nodes; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Samples.StateMachine.E2E.Fixtures; using Trax.Samples.StateMachine.E2E.Utilities; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Samples.StateMachine.E2E.Tests; diff --git a/Trax.Samples/tests/Trax.Samples.StateMachine.E2E/Utilities/RecordingCharge.cs b/Trax.Samples/tests/Trax.Samples.StateMachine.E2E/Utilities/RecordingCharge.cs index 93547b035..ac3958eae 100644 --- a/Trax.Samples/tests/Trax.Samples.StateMachine.E2E/Utilities/RecordingCharge.cs +++ b/Trax.Samples/tests/Trax.Samples.StateMachine.E2E/Utilities/RecordingCharge.cs @@ -1,5 +1,5 @@ using System.Collections.Concurrent; -using Trax.Effect.StateMachine; +using Trax.StateMachine; namespace Trax.Samples.StateMachine.E2E.Utilities; diff --git a/Trax.Samples/tests/Trax.Samples.StateMachine.E2E/Utilities/StateMachineClient.cs b/Trax.Samples/tests/Trax.Samples.StateMachine.E2E/Utilities/StateMachineClient.cs index 4243e4da4..84e2a387d 100644 --- a/Trax.Samples/tests/Trax.Samples.StateMachine.E2E/Utilities/StateMachineClient.cs +++ b/Trax.Samples/tests/Trax.Samples.StateMachine.E2E/Utilities/StateMachineClient.cs @@ -1,6 +1,6 @@ using System.Text.Json; using System.Text.Json.Nodes; -using Trax.Effect.StateMachine; +using Trax.StateMachine; namespace Trax.Samples.StateMachine.E2E.Utilities; diff --git a/Trax.Samples/tests/Trax.Samples.StateMachine.E2E/packages.lock.json b/Trax.Samples/tests/Trax.Samples.StateMachine.E2E/packages.lock.json index 10f04523c..94bdd990f 100644 --- a/Trax.Samples/tests/Trax.Samples.StateMachine.E2E/packages.lock.json +++ b/Trax.Samples/tests/Trax.Samples.StateMachine.E2E/packages.lock.json @@ -967,31 +967,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.shared.testing": { @@ -1011,8 +993,8 @@ "dependencies": { "Trax.Api.Auth": "[1.99.99, )", "Trax.Effect": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.statemachine.api": { @@ -1025,9 +1007,9 @@ "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data.Postgres": "[1.99.99, )", "Trax.Effect.Provider.Json": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )", "Trax.Mediator": "[1.99.99, )", - "Trax.Samples.StateMachine": "[1.99.99, )" + "Trax.Samples.StateMachine": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.scheduler": { @@ -1039,6 +1021,24 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/tests/Trax.Samples.StateMachine.Tests/GlobalUsings.cs b/Trax.Samples/tests/Trax.Samples.StateMachine.Tests/GlobalUsings.cs index 98f43dd97..032df0e78 100644 --- a/Trax.Samples/tests/Trax.Samples.StateMachine.Tests/GlobalUsings.cs +++ b/Trax.Samples/tests/Trax.Samples.StateMachine.Tests/GlobalUsings.cs @@ -1,6 +1,6 @@ global using System.Text.Json.Nodes; global using AwesomeAssertions; global using NUnit.Framework; -global using Trax.Effect.StateMachine; -global using Trax.Effect.StateMachine.Persistence; global using Trax.Samples.StateMachine; +global using Trax.StateMachine; +global using Trax.StateMachine.Persistence; diff --git a/Trax.Samples/tests/Trax.Samples.StateMachine.Tests/UnitTests/TurnstileMachineTests.cs b/Trax.Samples/tests/Trax.Samples.StateMachine.Tests/UnitTests/TurnstileMachineTests.cs index 3b2e7caa1..3d3d66ab7 100644 --- a/Trax.Samples/tests/Trax.Samples.StateMachine.Tests/UnitTests/TurnstileMachineTests.cs +++ b/Trax.Samples/tests/Trax.Samples.StateMachine.Tests/UnitTests/TurnstileMachineTests.cs @@ -1,5 +1,5 @@ -using Trax.Effect.StateMachine; using Trax.Samples.StateMachine.Tests.Fakes; +using Trax.StateMachine; namespace Trax.Samples.StateMachine.Tests.UnitTests; diff --git a/Trax.Samples/tests/Trax.Samples.StateMachine.Tests/packages.lock.json b/Trax.Samples/tests/Trax.Samples.StateMachine.Tests/packages.lock.json index 8ce82d76c..2297a2294 100644 --- a/Trax.Samples/tests/Trax.Samples.StateMachine.Tests/packages.lock.json +++ b/Trax.Samples/tests/Trax.Samples.StateMachine.Tests/packages.lock.json @@ -228,40 +228,40 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.samples.statemachine": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Api.Auth": "[1.99.99, )", "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.samples.statemachine": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Trax.Api.Auth": "[1.99.99, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" } }, "Microsoft.EntityFrameworkCore": { diff --git a/Trax.Samples/tests/Trax.Samples.Templates.Tests/packages.lock.json b/Trax.Samples/tests/Trax.Samples.Templates.Tests/packages.lock.json index af041283c..254db9fd9 100644 --- a/Trax.Samples/tests/Trax.Samples.Templates.Tests/packages.lock.json +++ b/Trax.Samples/tests/Trax.Samples.Templates.Tests/packages.lock.json @@ -915,31 +915,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.api": { @@ -995,6 +977,24 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/tests/Trax.Samples.Tests.Chains/UnitTests/MachineAuthorizationCensusTests.cs b/Trax.Samples/tests/Trax.Samples.Tests.Chains/UnitTests/MachineAuthorizationCensusTests.cs index 11f210193..97cd0f830 100644 --- a/Trax.Samples/tests/Trax.Samples.Tests.Chains/UnitTests/MachineAuthorizationCensusTests.cs +++ b/Trax.Samples/tests/Trax.Samples.Tests.Chains/UnitTests/MachineAuthorizationCensusTests.cs @@ -1,6 +1,6 @@ using System.Reflection; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Samples.Tests.Chains.UnitTests; diff --git a/Trax.Samples/tests/Trax.Samples.Tests.Chains/packages.lock.json b/Trax.Samples/tests/Trax.Samples.Tests.Chains/packages.lock.json index 4c6566f56..44a76254d 100644 --- a/Trax.Samples/tests/Trax.Samples.Tests.Chains/packages.lock.json +++ b/Trax.Samples/tests/Trax.Samples.Tests.Chains/packages.lock.json @@ -850,31 +850,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.auth": { @@ -1014,10 +996,10 @@ "dependencies": { "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )", "Trax.Mediator": "[1.99.99, )", - "Trax.Scheduler": "[1.99.99, )" + "Trax.Scheduler": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.samples.scheduling": { @@ -1042,8 +1024,8 @@ "dependencies": { "Trax.Api.Auth": "[1.99.99, )", "Trax.Effect": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.scheduler": { @@ -1055,6 +1037,24 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Samples/tests/Trax.Samples.Tests.Reflection/packages.lock.json b/Trax.Samples/tests/Trax.Samples.Tests.Reflection/packages.lock.json index dbf540f87..74911c8df 100644 --- a/Trax.Samples/tests/Trax.Samples.Tests.Reflection/packages.lock.json +++ b/Trax.Samples/tests/Trax.Samples.Tests.Reflection/packages.lock.json @@ -774,31 +774,13 @@ "Trax.Effect.Data": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.mediator.testing": { @@ -857,6 +839,24 @@ "Trax.Mediator": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Scheduler/src/Trax.Runner.Lambda/packages.lock.json b/Trax.Scheduler/src/Trax.Runner.Lambda/packages.lock.json index 5b9d26e7c..b9de3a5dc 100644 --- a/Trax.Scheduler/src/Trax.Runner.Lambda/packages.lock.json +++ b/Trax.Scheduler/src/Trax.Runner.Lambda/packages.lock.json @@ -51,37 +51,37 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Scheduler/src/Trax.Scheduler.Lambda/packages.lock.json b/Trax.Scheduler/src/Trax.Scheduler.Lambda/packages.lock.json index 4e83b2766..a1cedde9f 100644 --- a/Trax.Scheduler/src/Trax.Scheduler.Lambda/packages.lock.json +++ b/Trax.Scheduler/src/Trax.Scheduler.Lambda/packages.lock.json @@ -120,40 +120,40 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Scheduler/src/Trax.Scheduler.Sqs/packages.lock.json b/Trax.Scheduler/src/Trax.Scheduler.Sqs/packages.lock.json index 8f028d3e2..4fb70fa39 100644 --- a/Trax.Scheduler/src/Trax.Scheduler.Sqs/packages.lock.json +++ b/Trax.Scheduler/src/Trax.Scheduler.Sqs/packages.lock.json @@ -126,40 +126,40 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.scheduler": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Cronos": "[0.13.0, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Mediator": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.scheduler": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { - "Cronos": "[0.13.0, )", + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Mediator": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Cronos": { diff --git a/Trax.Scheduler/src/Trax.Scheduler/Configuration/SchedulerConfigurationBuilder/SchedulerConfigurationBuilder.Build.cs b/Trax.Scheduler/src/Trax.Scheduler/Configuration/SchedulerConfigurationBuilder/SchedulerConfigurationBuilder.Build.cs index 4b66460f0..1dc8282b8 100644 --- a/Trax.Scheduler/src/Trax.Scheduler/Configuration/SchedulerConfigurationBuilder/SchedulerConfigurationBuilder.Build.cs +++ b/Trax.Scheduler/src/Trax.Scheduler/Configuration/SchedulerConfigurationBuilder/SchedulerConfigurationBuilder.Build.cs @@ -6,7 +6,6 @@ using Trax.Effect.Data.Services.HostHeartbeats; using Trax.Effect.Data.Services.IDataContextFactory; using Trax.Effect.Extensions; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Services.TrainDiscovery; using Trax.Scheduler.Services.CancellationRegistry; using Trax.Scheduler.Services.DeadLetterRequeue; @@ -31,6 +30,7 @@ using Trax.Scheduler.Trains.ManifestManager.Utilities; using Trax.Scheduler.Trains.MetadataCleanup; using Trax.Scheduler.Utilities; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Configuration; diff --git a/Trax.Scheduler/src/Trax.Scheduler/Extensions/JobRunnerExtensions.cs b/Trax.Scheduler/src/Trax.Scheduler/Extensions/JobRunnerExtensions.cs index 4f8cb85b1..13f0a1320 100644 --- a/Trax.Scheduler/src/Trax.Scheduler/Extensions/JobRunnerExtensions.cs +++ b/Trax.Scheduler/src/Trax.Scheduler/Extensions/JobRunnerExtensions.cs @@ -9,7 +9,6 @@ using Trax.Effect.Data.Services.IDataContextFactory; using Trax.Effect.Data.Services.SqlDialect; using Trax.Effect.Extensions; -using Trax.Effect.StateMachine.Persistence; using Trax.Scheduler.Configuration; using Trax.Scheduler.Services.CancellationRegistry; using Trax.Scheduler.Services.DecisionRecording; @@ -20,6 +19,7 @@ using Trax.Scheduler.Services.RunExecutor; using Trax.Scheduler.Services.TraxScheduler; using Trax.Scheduler.Trains.JobRunner; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Extensions; diff --git a/Trax.Scheduler/src/Trax.Scheduler/Services/Operations/OperationsService.MachineInstances.cs b/Trax.Scheduler/src/Trax.Scheduler/Services/Operations/OperationsService.MachineInstances.cs index b8c73bc67..294ed6bb7 100644 --- a/Trax.Scheduler/src/Trax.Scheduler/Services/Operations/OperationsService.MachineInstances.cs +++ b/Trax.Scheduler/src/Trax.Scheduler/Services/Operations/OperationsService.MachineInstances.cs @@ -7,9 +7,9 @@ using Trax.Effect.Data.Utils; using Trax.Effect.Enums; using Trax.Effect.Services.ChangeSignal; -using Trax.Effect.StateMachine.Persistence; using Trax.Scheduler.Extensions; using Trax.Scheduler.Services.CancellationRegistry; +using Trax.StateMachine.Persistence; using SnapshotDraft = Trax.Effect.Models.SnapshotDraft.SnapshotDraft; namespace Trax.Scheduler.Services.Operations; diff --git a/Trax.Scheduler/src/Trax.Scheduler/Services/Operations/OperationsService.Machines.cs b/Trax.Scheduler/src/Trax.Scheduler/Services/Operations/OperationsService.Machines.cs index a9f16443d..f06b257f8 100644 --- a/Trax.Scheduler/src/Trax.Scheduler/Services/Operations/OperationsService.Machines.cs +++ b/Trax.Scheduler/src/Trax.Scheduler/Services/Operations/OperationsService.Machines.cs @@ -1,6 +1,6 @@ using System.Runtime.CompilerServices; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Services.Operations; diff --git a/Trax.Scheduler/src/Trax.Scheduler/Trains/JobRunner/Junctions/RunScheduledTrainJunction.cs b/Trax.Scheduler/src/Trax.Scheduler/Trains/JobRunner/Junctions/RunScheduledTrainJunction.cs index 00fa8e91f..60dfa6c53 100644 --- a/Trax.Scheduler/src/Trax.Scheduler/Trains/JobRunner/Junctions/RunScheduledTrainJunction.cs +++ b/Trax.Scheduler/src/Trax.Scheduler/Trains/JobRunner/Junctions/RunScheduledTrainJunction.cs @@ -5,11 +5,11 @@ using Trax.Effect.Exceptions; using Trax.Effect.Models.Metadata; using Trax.Effect.Services.EffectJunction; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Services.TrainBus; using Trax.Scheduler.Services.DormantDependentContext; using Trax.Scheduler.Trains.ManifestManager.Utilities; using Trax.Scheduler.Utilities; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Trains.JobRunner.Junctions; diff --git a/Trax.Scheduler/src/Trax.Scheduler/packages.lock.json b/Trax.Scheduler/src/Trax.Scheduler/packages.lock.json index 8e376cfbd..5812d3acc 100644 --- a/Trax.Scheduler/src/Trax.Scheduler/packages.lock.json +++ b/Trax.Scheduler/src/Trax.Scheduler/packages.lock.json @@ -42,28 +42,28 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.mediator": { "type": "Project", "dependencies": { - "Trax.Effect": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine": { "type": "Project", "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.Effect": "[1.99.99, )" } }, - "trax.mediator": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Microsoft.EntityFrameworkCore": { diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/InvokedTrains/FaultingLauncher.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/InvokedTrains/FaultingLauncher.cs index e5db5ac15..05a230cbc 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/InvokedTrains/FaultingLauncher.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/InvokedTrains/FaultingLauncher.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Data.Services.DataContext; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Tests.Integration.Fakes.InvokedTrains; diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/InvokedTrains/InvokedFeatureMachine.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/InvokedTrains/InvokedFeatureMachine.cs index e74e3408f..690e1478b 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/InvokedTrains/InvokedFeatureMachine.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/InvokedTrains/InvokedFeatureMachine.cs @@ -1,6 +1,6 @@ -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; namespace Trax.Scheduler.Tests.Integration.Fakes.InvokedTrains; diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/InvokedTrains/InvokedStepMachines.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/InvokedTrains/InvokedStepMachines.cs index d266a3628..88d26f6af 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/InvokedTrains/InvokedStepMachines.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/InvokedTrains/InvokedStepMachines.cs @@ -1,8 +1,8 @@ using System.Text.Json.Nodes; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; namespace Trax.Scheduler.Tests.Integration.Fakes.InvokedTrains; diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/InvokedTrains/InvokedStepTrain.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/InvokedTrains/InvokedStepTrain.cs index c5385a62e..f48d9f5be 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/InvokedTrains/InvokedStepTrain.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/InvokedTrains/InvokedStepTrain.cs @@ -2,7 +2,7 @@ using Trax.Core.Functional; using Trax.Effect.Services.EffectJunction; using Trax.Effect.Services.ServiceTrain; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Tests.Integration.Fakes.InvokedTrains; diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/InvokedTrains/StaleReadStore.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/InvokedTrains/StaleReadStore.cs index 03dcca379..956f0dfcf 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/InvokedTrains/StaleReadStore.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/InvokedTrains/StaleReadStore.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Tests.Integration.Fakes.InvokedTrains; diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/Timers/PausingSnapshotStore.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/Timers/PausingSnapshotStore.cs index 223306e68..3a1d7cd7f 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/Timers/PausingSnapshotStore.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/Timers/PausingSnapshotStore.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Tests.Integration.Fakes.Timers; diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/Timers/TimerMachines.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/Timers/TimerMachines.cs index c44c3d7d9..0c2507486 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/Timers/TimerMachines.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fakes/Timers/TimerMachines.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Scheduler.Tests.Integration.Fakes.InvokedTrains; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Tests.Integration.Fakes.Timers; diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fixtures/InvokeCluster.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fixtures/InvokeCluster.cs index d98ce2258..9a2c04476 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fixtures/InvokeCluster.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fixtures/InvokeCluster.cs @@ -18,7 +18,6 @@ using Trax.Effect.Models.Metadata; using Trax.Effect.Models.SnapshotDraft; using Trax.Effect.Models.WorkQueue; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Extensions; using Trax.Scheduler.Configuration; using Trax.Scheduler.Extensions; @@ -27,6 +26,7 @@ using Trax.Scheduler.Tests.Integration.Fakes.InvokedTrains; using Trax.Scheduler.Trains.JobDispatcher; using Trax.Scheduler.Trains.JobRunner; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Tests.Integration.Fixtures; diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fixtures/TimerRig.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fixtures/TimerRig.cs index 6a1ea2d12..7a50c2620 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fixtures/TimerRig.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/Fixtures/TimerRig.cs @@ -7,9 +7,9 @@ using Npgsql; using Trax.Effect.Data.Services.DataContext; using Trax.Effect.Models.SnapshotDraft; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Scheduler.Tests.Integration.Fakes.Timers; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Tests.Integration.Fixtures; diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokeOutcomeDeliveryTests.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokeOutcomeDeliveryTests.cs index af24c2445..634ee1451 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokeOutcomeDeliveryTests.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokeOutcomeDeliveryTests.cs @@ -7,13 +7,13 @@ using Trax.Effect.Data.Services.DataContext; using Trax.Effect.Enums; using Trax.Effect.Models.SnapshotDraft; -using Trax.Effect.StateMachine.Persistence; using Trax.Scheduler.Services.JobSubmitter; using Trax.Scheduler.Services.Operations; using Trax.Scheduler.Tests.Integration.Fakes.InvokedTrains; using Trax.Scheduler.Tests.Integration.Fixtures; using Trax.Scheduler.Trains.JobDispatcher; using Trax.Scheduler.Trains.MetadataCleanup; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Tests.Integration.IntegrationTests.InvokedTrains; diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokeOutcomeNoticeTests.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokeOutcomeNoticeTests.cs index 0c1137a9f..b5468e456 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokeOutcomeNoticeTests.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokeOutcomeNoticeTests.cs @@ -5,10 +5,10 @@ using Trax.Core.Functional; using Trax.Effect.Data.Services.DataContext; using Trax.Effect.Enums; -using Trax.Effect.StateMachine.Persistence; using Trax.Scheduler.Tests.Integration.Fakes.InvokedTrains; using Trax.Scheduler.Tests.Integration.Fixtures; using Trax.Scheduler.Trains.JobDispatcher; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Tests.Integration.IntegrationTests.InvokedTrains; diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokeOutcomeReconcilerTests.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokeOutcomeReconcilerTests.cs index b3c04f309..93877c038 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokeOutcomeReconcilerTests.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokeOutcomeReconcilerTests.cs @@ -4,9 +4,9 @@ using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Data.Services.DataContext; using Trax.Effect.Models.SnapshotDraft; -using Trax.Effect.StateMachine.Persistence; using Trax.Scheduler.Tests.Integration.Fakes.InvokedTrains; using Trax.Scheduler.Tests.Integration.Fixtures; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Tests.Integration.IntegrationTests.InvokedTrains; diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokedRunFeatureTests.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokedRunFeatureTests.cs index 3e0215570..f46a3d41a 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokedRunFeatureTests.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokedRunFeatureTests.cs @@ -10,13 +10,13 @@ using Trax.Effect.Enums; using Trax.Effect.Models.JunctionRun; using Trax.Effect.Models.SnapshotDraft; -using Trax.Effect.StateMachine.Persistence; using Trax.Effect.Utils; using Trax.Scheduler.Extensions; using Trax.Scheduler.Services.JobSubmitter; using Trax.Scheduler.Services.RequestHandler; using Trax.Scheduler.Tests.Integration.Fakes.InvokedTrains; using Trax.Scheduler.Tests.Integration.Fixtures; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Tests.Integration.IntegrationTests.InvokedTrains; diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokedRunOperationsTests.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokedRunOperationsTests.cs index 2ca199aec..f74afb62e 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokedRunOperationsTests.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokedRunOperationsTests.cs @@ -5,11 +5,11 @@ using Trax.Effect.Data.Services.DataContext; using Trax.Effect.Enums; using Trax.Effect.Models.SnapshotDraft; -using Trax.Effect.StateMachine.Persistence; using Trax.Scheduler.Services.Operations; using Trax.Scheduler.Tests.Integration.Fakes.InvokedTrains; using Trax.Scheduler.Tests.Integration.Fixtures; using Trax.Scheduler.Trains.JobDispatcher; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Tests.Integration.IntegrationTests.InvokedTrains; diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokedRunTests.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokedRunTests.cs index d91e1bbb4..a7b69b6b5 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokedRunTests.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokedRunTests.cs @@ -3,10 +3,10 @@ using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Enums; using Trax.Effect.Models.SnapshotDraft; -using Trax.Effect.StateMachine.Persistence; using Trax.Mediator.Services.TrainBus; using Trax.Scheduler.Tests.Integration.Fakes.InvokedTrains; using Trax.Scheduler.Tests.Integration.Fixtures; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Tests.Integration.IntegrationTests.InvokedTrains; diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokesModelTests.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokesModelTests.cs index 21974add0..1b40541db 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokesModelTests.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/InvokesModelTests.cs @@ -9,12 +9,12 @@ using Trax.Effect.Data.Testing; using Trax.Effect.Enums; using Trax.Effect.Models.SnapshotDraft; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Scheduler.Services.Operations; using Trax.Scheduler.Tests.Integration.Fakes.InvokedTrains; using Trax.Scheduler.Tests.Integration.Fixtures; using Trax.Scheduler.Trains.JobDispatcher; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Tests.Integration.IntegrationTests.InvokedTrains; diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/SnapshotChangeOutcomeNotifyTests.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/SnapshotChangeOutcomeNotifyTests.cs index 9328fb888..546bd2782 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/SnapshotChangeOutcomeNotifyTests.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/InvokedTrains/SnapshotChangeOutcomeNotifyTests.cs @@ -1,8 +1,8 @@ using AwesomeAssertions; using Trax.Effect.Models.SnapshotDraft; -using Trax.Effect.StateMachine.Persistence; using Trax.Scheduler.Tests.Integration.Fakes.InvokedTrains; using Trax.Scheduler.Tests.Integration.Fixtures; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Tests.Integration.IntegrationTests.InvokedTrains; diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/Timers/TimerDraftLifetimeTests.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/Timers/TimerDraftLifetimeTests.cs index c647aa97b..faea89da2 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/Timers/TimerDraftLifetimeTests.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/Timers/TimerDraftLifetimeTests.cs @@ -1,8 +1,8 @@ using AwesomeAssertions; using Trax.Effect.Models.SnapshotDraft; -using Trax.Effect.StateMachine.Persistence; using Trax.Scheduler.Tests.Integration.Fakes.Timers; using Trax.Scheduler.Tests.Integration.Fixtures; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Tests.Integration.IntegrationTests.Timers; diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/Timers/TimerFiringTests.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/Timers/TimerFiringTests.cs index 7d2fcce06..3e1d1dee4 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/Timers/TimerFiringTests.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/Timers/TimerFiringTests.cs @@ -6,12 +6,12 @@ using Trax.Effect.Enums; using Trax.Effect.Models.SnapshotDraft; using Trax.Effect.Models.WorkQueue; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Scheduler.Services.Operations; using Trax.Scheduler.Tests.Integration.Fakes.InvokedTrains; using Trax.Scheduler.Tests.Integration.Fakes.Timers; using Trax.Scheduler.Tests.Integration.Fixtures; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Tests.Integration.IntegrationTests.Timers; diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/Timers/TimerVersionChangeTests.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/Timers/TimerVersionChangeTests.cs index 28d207a31..f709afdf5 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/Timers/TimerVersionChangeTests.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/Timers/TimerVersionChangeTests.cs @@ -1,8 +1,8 @@ using AwesomeAssertions; using Trax.Effect.Models.SnapshotDraft; -using Trax.Effect.StateMachine.Persistence; using Trax.Scheduler.Tests.Integration.Fakes.Timers; using Trax.Scheduler.Tests.Integration.Fixtures; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Tests.Integration.IntegrationTests.Timers; diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/Timers/TimersModelTests.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/Timers/TimersModelTests.cs index fb8b33903..50f1df7e3 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/Timers/TimersModelTests.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/IntegrationTests/Timers/TimersModelTests.cs @@ -3,10 +3,10 @@ using Microsoft.Data.Sqlite; using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Data.Testing; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; using Trax.Scheduler.Tests.Integration.Fakes.Timers; using Trax.Scheduler.Tests.Integration.Fixtures; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; namespace Trax.Scheduler.Tests.Integration.IntegrationTests.Timers; diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/packages.lock.json b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/packages.lock.json index 95936173c..827ad3f03 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/packages.lock.json +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Integration/packages.lock.json @@ -561,31 +561,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.scheduler": { @@ -619,6 +601,24 @@ "Trax.Effect": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Amazon.Lambda.SQSEvents": { "type": "CentralTransitive", "requested": "[3.0.1, )", diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Meta/packages.lock.json b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Meta/packages.lock.json index b4f3b951c..b3a28aee9 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Meta/packages.lock.json +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Meta/packages.lock.json @@ -272,31 +272,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.runner.lambda": { @@ -331,6 +313,24 @@ "Trax.Scheduler": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Amazon.Lambda.Core": { "type": "CentralTransitive", "requested": "[3.3.0, )", diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Sqlite.Integration/packages.lock.json b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Sqlite.Integration/packages.lock.json index 1aaee092a..6e250af0c 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Sqlite.Integration/packages.lock.json +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Sqlite.Integration/packages.lock.json @@ -375,31 +375,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.scheduler": { @@ -418,6 +400,24 @@ "Trax.Effect": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Stress/packages.lock.json b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Stress/packages.lock.json index 970a8ae59..543fad421 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Stress/packages.lock.json +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Stress/packages.lock.json @@ -356,31 +356,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.scheduler": { @@ -399,6 +381,24 @@ "Trax.Effect": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Cronos": { "type": "CentralTransitive", "requested": "[0.13.0, )", diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests/packages.lock.json b/Trax.Scheduler/tests/Trax.Scheduler.Tests/packages.lock.json index 92645d258..b62a46e1a 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests/packages.lock.json +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests/packages.lock.json @@ -323,31 +323,13 @@ "Trax.Effect.Data": "[1.99.99, )" } }, - "trax.effect.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.effect.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" - } - }, "trax.mediator": { "type": "Project", "dependencies": { "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "trax.runner.lambda": { @@ -374,6 +356,24 @@ "Trax.Scheduler": "[1.99.99, )" } }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, "Amazon.Lambda.Serialization.SystemTextJson": { "type": "CentralTransitive", "requested": "[3.0.1, )", diff --git a/Trax.StateMachine/dotnet/README.md b/Trax.StateMachine/dotnet/README.md index c15917744..bf8543ac4 100644 --- a/Trax.StateMachine/dotnet/README.md +++ b/Trax.StateMachine/dotnet/README.md @@ -1,7 +1,7 @@ -# Trax.Effect.StateMachine +# Trax.StateMachine [![Build](https://github.com/TraxSharp/Trax/actions/workflows/release.yml/badge.svg?branch=main)](https://github.com/TraxSharp/Trax/actions/workflows/release.yml?query=branch%3Amain) -[![NuGet](https://img.shields.io/nuget/v/Trax.Effect.StateMachine)](https://www.nuget.org/packages/Trax.Effect.StateMachine) +[![NuGet](https://img.shields.io/nuget/v/Trax.StateMachine)](https://www.nuget.org/packages/Trax.StateMachine) [![codecov](https://codecov.io/gh/TraxSharp/Trax/branch/main/graph/badge.svg?flag=Trax.StateMachine)](https://app.codecov.io/gh/TraxSharp/Trax?flags%5B0%5D=Trax.StateMachine) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/TraxSharp/Trax/blob/main/Trax.StateMachine/LICENSE) [![Docs](https://img.shields.io/badge/docs-traxsharp.net-blue)](https://traxsharp.net/docs/statemachine) @@ -9,16 +9,16 @@ > Part of [Trax .NET](https://github.com/TraxSharp): business logic you can call, schedule, or serve as an API, with every > run recorded in your Postgres. [Docs](https://traxsharp.net/docs) · [Getting started](https://traxsharp.net/docs/getting-started) · [Repository](https://github.com/TraxSharp/Trax) -Trax.Effect.StateMachine is the portable state-machine engine: a multi-step flow's state as language-neutral JSON, with -each event's guard, reducer and caller rule declared as data. `Trax.Effect.StateMachine.Persistence` stores each +Trax.StateMachine is the portable state-machine engine: a multi-step flow's state as language-neutral JSON, with +each event's guard, reducer and caller rule declared as data. `Trax.StateMachine.Persistence` stores each instance per user, runs a machine's one irreversible effect exactly once, and lets a state invoke a train. `@traxsharp/state-machine` on npm runs the same machine in the browser. ## Install ```bash -dotnet add package Trax.Effect.StateMachine.Persistence -dotnet add package Trax.Effect.StateMachine.Testing # in a test project +dotnet add package Trax.StateMachine.Persistence +dotnet add package Trax.StateMachine.Testing # in a test project ``` ## Example diff --git a/Trax.StateMachine/dotnet/Trax.StateMachine.slnx b/Trax.StateMachine/dotnet/Trax.StateMachine.slnx index 924a61a09..578e4a23e 100644 --- a/Trax.StateMachine/dotnet/Trax.StateMachine.slnx +++ b/Trax.StateMachine/dotnet/Trax.StateMachine.slnx @@ -1,12 +1,12 @@ - - - + + + - - - + + + diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/CompatibilitySuppressions.xml b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/CompatibilitySuppressions.xml deleted file mode 100644 index 174c5387a..000000000 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/CompatibilitySuppressions.xml +++ /dev/null @@ -1,147 +0,0 @@ - - - - - CP0001 - T:Trax.Effect.StateMachine.Persistence.DraftRefusalCodes - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.Persistence.AdvanceOutcome.LoadError.#ctor(System.String,System.String) - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.Persistence.AdvanceOutcome.LoadError.Deconstruct(System.String@,System.String@) - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.Persistence.AdvanceOutcome.LoadError.get_Code - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.Persistence.AdvanceOutcome.Rejected.#ctor(System.String,System.String) - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.Persistence.AdvanceOutcome.Rejected.Deconstruct(System.String@,System.String@) - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.Persistence.AdvanceOutcome.Rejected.get_Reason - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.Persistence.AutosaveResult.Rejected.#ctor(System.String,System.String) - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.Persistence.AutosaveResult.Rejected.Deconstruct(System.String@,System.String@) - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.Persistence.AutosaveResult.Rejected.get_Code - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.Persistence.DiscardOutcome.Rejected.#ctor(System.String,System.String) - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.Persistence.DiscardOutcome.Rejected.Deconstruct(System.String@,System.String@) - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.Persistence.DiscardOutcome.Rejected.get_Code - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.Persistence.LoadResult.Invalid.#ctor(System.String,System.String) - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.Persistence.LoadResult.Invalid.Deconstruct(System.String@,System.String@) - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.Persistence.LoadResult.Invalid.get_Code - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.Persistence.SnapshotProblem.get_Code - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.Persistence.StartOutcome.Rejected.#ctor(System.String,System.String) - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.Persistence.StartOutcome.Rejected.Deconstruct(System.String@,System.String@) - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.Persistence.StartOutcome.Rejected.get_Code - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - lib/net10.0/Trax.Effect.StateMachine.Persistence.dll - true - - diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CompatibilitySuppressions.xml b/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CompatibilitySuppressions.xml deleted file mode 100644 index de06c77ce..000000000 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CompatibilitySuppressions.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - CP0001 - T:Trax.Effect.StateMachine.RehydrationErrorCodes - lib/net10.0/Trax.Effect.StateMachine.dll - lib/net10.0/Trax.Effect.StateMachine.dll - true - - - CP0001 - T:Trax.Effect.StateMachine.RejectionReasons - lib/net10.0/Trax.Effect.StateMachine.dll - lib/net10.0/Trax.Effect.StateMachine.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.AdvanceResult.Rejected.#ctor(System.String,System.String) - lib/net10.0/Trax.Effect.StateMachine.dll - lib/net10.0/Trax.Effect.StateMachine.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.AdvanceResult.Rejected.Deconstruct(System.String@,System.String@) - lib/net10.0/Trax.Effect.StateMachine.dll - lib/net10.0/Trax.Effect.StateMachine.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.AdvanceResult.Rejected.get_Reason - lib/net10.0/Trax.Effect.StateMachine.dll - lib/net10.0/Trax.Effect.StateMachine.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.RehydrationResult.Error.#ctor(System.String,System.String) - lib/net10.0/Trax.Effect.StateMachine.dll - lib/net10.0/Trax.Effect.StateMachine.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.RehydrationResult.Error.Deconstruct(System.String@,System.String@) - lib/net10.0/Trax.Effect.StateMachine.dll - lib/net10.0/Trax.Effect.StateMachine.dll - true - - - CP0002 - M:Trax.Effect.StateMachine.RehydrationResult.Error.get_Code - lib/net10.0/Trax.Effect.StateMachine.dll - lib/net10.0/Trax.Effect.StateMachine.dll - true - - diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Actor.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Actor.cs similarity index 97% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Actor.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Actor.cs index ce9e24d66..f07fbea74 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Actor.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Actor.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// Who is acting on a user's machine instance: always a , whose every event is checked against the diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/CallerAuthorization.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/CallerAuthorization.cs similarity index 98% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/CallerAuthorization.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/CallerAuthorization.cs index b22b80cec..41d350fee 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/CallerAuthorization.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/CallerAuthorization.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// The current caller's roles and authorization policies, as the host's authorization evaluates them. The draft diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/ChangeFeedStartupValidator.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/ChangeFeedStartupValidator.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/ChangeFeedStartupValidator.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/ChangeFeedStartupValidator.cs index 76d9bcd35..5b0aaf9ca 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/ChangeFeedStartupValidator.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/ChangeFeedStartupValidator.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.Logging.Abstractions; using Trax.Effect.Data.Services.SnapshotNotices; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// Compares the host's with what its database sends, on a provider that diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/DraftClaimHold.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/DraftClaimHold.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/DraftClaimHold.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/DraftClaimHold.cs index 52fbc5a7f..86521e3af 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/DraftClaimHold.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/DraftClaimHold.cs @@ -1,6 +1,6 @@ using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// For a host whose is not the Trax store, and so keeps the effect-claim ledger: the effect diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/DraftSweeper.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/DraftSweeper.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/DraftSweeper.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/DraftSweeper.cs index 2787b717b..948d75f9c 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/DraftSweeper.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/DraftSweeper.cs @@ -4,7 +4,7 @@ using Trax.Effect.Data.Services.DataContext; using Trax.Effect.Data.Services.SqlDialect; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// Deletes users' drafts idle past with no timer pending and no invoked diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/EfSnapshotStore.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/EfSnapshotStore.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/EfSnapshotStore.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/EfSnapshotStore.cs index b1e43605b..4da90d1fa 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/EfSnapshotStore.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/EfSnapshotStore.cs @@ -5,11 +5,11 @@ using Trax.Effect.Data.Services.DataContext; using Trax.Effect.Data.Services.SqlDialect; using Trax.Effect.Enums; -using Trax.Effect.StateMachine; +using Trax.StateMachine; using SnapshotDraft = Trax.Effect.Models.SnapshotDraft.SnapshotDraft; using SnapshotTransition = Trax.Effect.Models.SnapshotTransition.SnapshotTransition; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// The over : user-scoped reads and diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/EffectClaimStore.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/EffectClaimStore.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/EffectClaimStore.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/EffectClaimStore.cs index 9b9774fef..23b663735 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/EffectClaimStore.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/EffectClaimStore.cs @@ -3,7 +3,7 @@ using Trax.Effect.Data.Services.SqlDialect; using EffectClaim = Trax.Effect.Models.EffectClaim.EffectClaim; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// The outcome of claiming an effect key: won (with the fence token to complete/release under), or lost. public abstract record ClaimResult diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/ISnapshotChangeListener.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/ISnapshotChangeListener.cs similarity index 98% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/ISnapshotChangeListener.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/ISnapshotChangeListener.cs index 2fd6e315a..97fca7d5d 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/ISnapshotChangeListener.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/ISnapshotChangeListener.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// Hears that a state-machine row was written. Each change names the row by its row_id only, as a hint: the diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/IdempotentEffect.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/IdempotentEffect.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/IdempotentEffect.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/IdempotentEffect.cs index f4b9ceef4..3ff15778f 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/IdempotentEffect.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/IdempotentEffect.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// The result of : the effect ran now (Ran), its recorded result diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokeOutbox.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokeOutbox.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokeOutbox.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokeOutbox.cs index 6519f2692..0d635d889 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokeOutbox.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokeOutbox.cs @@ -10,7 +10,7 @@ using Trax.Effect.Models; using Trax.Effect.Models.WorkQueue.DTOs; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// The invoking state a write enters: its train, how the run's input is built, and the owner's cap. /// The train's interface. diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeDelivery.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokeOutcomeDelivery.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeDelivery.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokeOutcomeDelivery.cs index cd6c7758f..b202c3035 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeDelivery.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokeOutcomeDelivery.cs @@ -7,7 +7,7 @@ using Trax.Effect.Data.Services.DataContext; using Trax.Effect.Enums; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// The typed reasons an invoked run's outcome is applied as a failure, or not applied at all. Each is logged with diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeReconciler.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokeOutcomeReconciler.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeReconciler.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokeOutcomeReconciler.cs index 8efbc8d7c..286b4e13f 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokeOutcomeReconciler.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokeOutcomeReconciler.cs @@ -13,7 +13,7 @@ using Trax.Effect.Services.TrainLifecycleHook; using Trax.Effect.Services.TrainLifecycleHookFactory; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// The guarantee that every invoked run's outcome reaches its machine: a hosted service, started on every host that diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedRun.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokedRun.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedRun.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokedRun.cs index 66e39ce2f..49c6190c0 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedRun.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokedRun.cs @@ -6,7 +6,7 @@ using Trax.Effect.Models; using Trax.Effect.Models.Metadata; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// The machine instance whose invoking state queued the run going on, and who owns it. A junction of diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedRunCancellation.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokedRunCancellation.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedRunCancellation.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokedRunCancellation.cs index f3efcc011..95ac08032 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedRunCancellation.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokedRunCancellation.cs @@ -3,7 +3,7 @@ using Trax.Effect.Data.Services.DataContext; using Trax.Effect.Enums; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// Cancels an invoked run by its invoke token, the run's external id, the way the operations surface cancels: a diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedRunOutcomes.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokedRunOutcomes.cs similarity index 98% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedRunOutcomes.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokedRunOutcomes.cs index df67ecb37..2e0fce8a5 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedRunOutcomes.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokedRunOutcomes.cs @@ -1,6 +1,6 @@ using System.Diagnostics.CodeAnalysis; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// Applies the outcome of an invoked run to the instance waiting on it, now, rather than leaving it to the next diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedTrainLauncher.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokedTrainLauncher.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedTrainLauncher.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokedTrainLauncher.cs index de124f3cd..42d1d927c 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokedTrainLauncher.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokedTrainLauncher.cs @@ -2,7 +2,7 @@ using Trax.Effect.Data.Services.DataContext; using Trax.Effect.Models.WorkQueue.DTOs; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// Queues the run of a train a machine state invokes, through the data context it is handed (the outbox's) so the diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokesStartupValidator.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokesStartupValidator.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokesStartupValidator.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokesStartupValidator.cs index 948da5176..b338b3018 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/InvokesStartupValidator.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/InvokesStartupValidator.cs @@ -6,7 +6,7 @@ using Trax.Effect.Services.JunctionEffectProviderFactory; using Trax.Effect.Utils; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// Refuses to start a host whose machines invoke a train it cannot queue, cancel or authorize as declared. Every diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Machine.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Machine.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Machine.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Machine.cs index 1872d3058..0ef9e9103 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Machine.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Machine.cs @@ -4,7 +4,7 @@ using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Utils; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// The machine-agnostic handle a host discovers and the registry keys on. /// SDK reference diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineCensus.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineCensus.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineCensus.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineCensus.cs index 8e8e61dce..6e74b46ad 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineCensus.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineCensus.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// Lists every event and read each machine declares, with the rule that guards it and the surfaces that reach diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineGraph.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineGraph.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineGraph.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineGraph.cs index e3b057b8c..2ab1dd865 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineGraph.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineGraph.cs @@ -1,6 +1,6 @@ using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// What takes a : a command someone sends, the state's timer, or an invoked train's outcome. internal enum MachineEdgeKind diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineIdStartupValidator.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineIdStartupValidator.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineIdStartupValidator.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineIdStartupValidator.cs index 4cb0dc274..a06fc60ab 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineIdStartupValidator.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineIdStartupValidator.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.Hosting; using Trax.Effect.Configuration.ClientExport; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// Refuses to start a host that registers two machine types under one id (). Every machine diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineInstanceStore.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineInstanceStore.cs similarity index 98% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineInstanceStore.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineInstanceStore.cs index ccd837236..7ca0f276d 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineInstanceStore.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineInstanceStore.cs @@ -1,7 +1,7 @@ using Trax.Effect.Enums; -using Trax.Effect.StateMachine; +using Trax.StateMachine; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// The owner a draft row is looked up under. Every lookup names the owner kind as well as the id, because a user diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineInstances.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineInstances.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineInstances.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineInstances.cs index db626fe17..518353346 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineInstances.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineInstances.cs @@ -4,7 +4,7 @@ using System.Text.Json.Nodes; using Microsoft.Extensions.DependencyInjection; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// Creates the instances of a machine that the system owns rather than a user: one per partition of a source, say, diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineRulesStartupValidator.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineRulesStartupValidator.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineRulesStartupValidator.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineRulesStartupValidator.cs index 914d31c46..d9e92e2e3 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineRulesStartupValidator.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineRulesStartupValidator.cs @@ -3,7 +3,7 @@ using Trax.Effect.Attributes; using Trax.Effect.Configuration.ClientExport; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// Refuses to start a host that serves a machine to clients without a rule for everything a client can do to it. A diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineSchemaStartupValidator.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineSchemaStartupValidator.cs similarity index 98% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineSchemaStartupValidator.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineSchemaStartupValidator.cs index 832221b40..d4a0c93c6 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/MachineSchemaStartupValidator.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/MachineSchemaStartupValidator.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.Hosting; using Trax.Effect.Configuration.ClientExport; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// Refuses to start a host whose machine cannot be built or fails unexpectedly computing its IR hash. Every write diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericContracts.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Mutations/GenericContracts.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericContracts.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Mutations/GenericContracts.cs index 727145ea6..ab09fd47a 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericContracts.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Mutations/GenericContracts.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Persistence.Mutations; +namespace Trax.StateMachine.Persistence.Mutations; // ONE set of contracts for ALL machines. Every input carries a `machine` discriminator the resolver looks // up in the registry, so there is no per-machine mutation fan and no per-machine CLR types. The context diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericJunctions.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Mutations/GenericJunctions.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericJunctions.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Mutations/GenericJunctions.cs index 750c1fe20..16d624f8a 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericJunctions.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Mutations/GenericJunctions.cs @@ -4,7 +4,7 @@ using Microsoft.Extensions.Logging; using Trax.Core.Junction; -namespace Trax.Effect.StateMachine.Persistence.Mutations; +namespace Trax.StateMachine.Persistence.Mutations; /// Cross-cutting runtime guards shared by the snapshot mutations. internal static class SnapshotGuards diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericMarkers.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Mutations/GenericMarkers.cs similarity index 96% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericMarkers.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Mutations/GenericMarkers.cs index e073b7c5f..334fc46b0 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericMarkers.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Mutations/GenericMarkers.cs @@ -1,6 +1,6 @@ using Trax.Effect.Services.ServiceTrain; -namespace Trax.Effect.StateMachine.Persistence.Mutations; +namespace Trax.StateMachine.Persistence.Mutations; // Marker interfaces give each generic train a clean GraphQL response type name AND the canonical // interface FullName the rest of Trax keys on (metadata.Name, work_queue.train_name, discovery). Each diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericTrains.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Mutations/GenericTrains.cs similarity index 98% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericTrains.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Mutations/GenericTrains.cs index 956d6dd9c..f3b19fea8 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/GenericTrains.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Mutations/GenericTrains.cs @@ -3,7 +3,7 @@ using Trax.Effect.Services.LifecycleHookOutputPolicy; using Trax.Effect.Services.ServiceTrain; -namespace Trax.Effect.StateMachine.Persistence.Mutations; +namespace Trax.StateMachine.Persistence.Mutations; // SIX trains for ALL machines. No per-machine plumbing: the machine is a runtime argument the registry resolves. // AddStateMachines registers their routes once, so the mediator dispatches them for host code and a machine's own diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/StateMachineMutations.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Mutations/StateMachineMutations.cs similarity index 93% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/StateMachineMutations.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Mutations/StateMachineMutations.cs index f79679d15..5b9242086 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Mutations/StateMachineMutations.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Mutations/StateMachineMutations.cs @@ -1,6 +1,6 @@ using System.Reflection; -namespace Trax.Effect.StateMachine.Persistence.Mutations; +namespace Trax.StateMachine.Persistence.Mutations; /// /// The six generic stateMachine mutation trains ship in this package, not the host's assembly. diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Ports.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Ports.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Ports.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Ports.cs index 831ba52db..ff4ad0ca8 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Ports.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Ports.cs @@ -1,6 +1,6 @@ -using Trax.Effect.StateMachine; +using Trax.StateMachine; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// A stored draft as read back: its canonical JSON, the concurrency token to write against, the diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/RequestIdRing.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/RequestIdRing.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/RequestIdRing.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/RequestIdRing.cs index 960407b03..5b94a5561 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/RequestIdRing.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/RequestIdRing.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// The bounded record of a row's recent client requests, which lets a retried request replay the result it was diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotChangeListener.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotChangeListener.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotChangeListener.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotChangeListener.cs index 233ce2b68..3d35781ed 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotChangeListener.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotChangeListener.cs @@ -9,7 +9,7 @@ using Trax.Effect.Data.Services.IDataContextFactory; using Trax.Effect.Data.Services.SnapshotNotices; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// The host's one . On Postgres it holds one session listening on diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotDraftService.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotDraftService.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotDraftService.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotDraftService.cs index 5b2697409..6d97e8390 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotDraftService.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotDraftService.cs @@ -1,9 +1,9 @@ using System.Text; using System.Text.Json; using System.Text.Json.Nodes; -using Trax.Effect.StateMachine; +using Trax.StateMachine; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// The total result of . public abstract record LoadResult diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotEffectRunner.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotEffectRunner.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotEffectRunner.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotEffectRunner.cs index 56f87cd71..a2211b539 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotEffectRunner.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotEffectRunner.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; -using Trax.Effect.StateMachine; +using Trax.StateMachine; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// The machine-agnostic face of (for the registry). public interface ISnapshotEffectRunner diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotFingerprint.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotFingerprint.cs similarity index 94% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotFingerprint.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotFingerprint.cs index ca5c356af..cf9a0c6c5 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotFingerprint.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotFingerprint.cs @@ -1,7 +1,7 @@ using System.Security.Cryptography; using System.Text; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// The fingerprint an effect's claim records of the content the effect ran on: the lowercase hex SHA-256 of the diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotLimits.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotLimits.cs similarity index 97% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotLimits.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotLimits.cs index a341d79a1..8f6bc3475 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotLimits.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotLimits.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// Guard rails for the persistence layer. public static class SnapshotLimits diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotMachineRegistry.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotMachineRegistry.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotMachineRegistry.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotMachineRegistry.cs index 2adee6134..b4e1adb00 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotMachineRegistry.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotMachineRegistry.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// Resolves the draft service (and exactly-once runner) for a machine by name. Populated once from the diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotOwner.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotOwner.cs similarity index 97% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotOwner.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotOwner.cs index 52fa6cbb2..717575e72 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotOwner.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotOwner.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// The rule for who owns a draft. A null, empty or whitespace user key is no owner at all: accepting one would diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotSelfCheck.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotSelfCheck.cs similarity index 96% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotSelfCheck.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotSelfCheck.cs index c56d5ab38..90243ed95 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotSelfCheck.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotSelfCheck.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// Runs every registered machine's differential self-check () and aggregates diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotWatchHub.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotWatchHub.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotWatchHub.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotWatchHub.cs index 79da05d58..47981b558 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotWatchHub.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotWatchHub.cs @@ -9,7 +9,7 @@ using Trax.Effect.Data.Services.IDataContextFactory; using Trax.Effect.Enums; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// The per-host seam between the change notices and whatever pushes instances to clients: the push (<machine>Changed) and diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotWriteSignal.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotWriteSignal.cs similarity index 96% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotWriteSignal.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotWriteSignal.cs index 0720fd974..12a7d0c1a 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SnapshotWriteSignal.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SnapshotWriteSignal.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// Tells this host's that a draft was written and committed here, so a diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SpawnedEnds.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SpawnedEnds.cs similarity index 97% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SpawnedEnds.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SpawnedEnds.cs index 2ad5dd6cf..d04bac0ce 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SpawnedEnds.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SpawnedEnds.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// The fast path of a child's end: after a write that may have put a spawned instance in one of its end states, the diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SpawnsStartupValidator.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SpawnsStartupValidator.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SpawnsStartupValidator.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SpawnsStartupValidator.cs index db2c89459..72e9426fe 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/SpawnsStartupValidator.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/SpawnsStartupValidator.cs @@ -3,7 +3,7 @@ using Trax.Effect.Configuration.ClientExport; using Trax.Effect.Data.Services.SqlDialect; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// Refuses to start a host whose machines spawn a child they cannot start or hear from. Every spawning state is diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StartDeclarationValidator.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/StartDeclarationValidator.cs similarity index 97% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StartDeclarationValidator.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/StartDeclarationValidator.cs index e6a7e5960..e3bbabe5e 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StartDeclarationValidator.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/StartDeclarationValidator.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.Hosting; using Trax.Effect.Configuration.ClientExport; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// Refuses to start a host with a machine a client can reach (marked [TraxMachine], or user-owned while the generic mutations are diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineInstruments.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/StateMachineInstruments.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineInstruments.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/StateMachineInstruments.cs index e67e5b1b0..96875eb16 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineInstruments.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/StateMachineInstruments.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// The meter and instrument names the state-machine subsystem reports through. /// SDK reference diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineOptions.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/StateMachineOptions.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineOptions.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/StateMachineOptions.cs index 9dee8dda3..28839faf7 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineOptions.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/StateMachineOptions.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// Host-level options for the state-machine subsystem, configured through the diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineSelfCheckHealthCheck.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/StateMachineSelfCheckHealthCheck.cs similarity index 98% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineSelfCheckHealthCheck.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/StateMachineSelfCheckHealthCheck.cs index b284db293..329e827a8 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachineSelfCheckHealthCheck.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/StateMachineSelfCheckHealthCheck.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Diagnostics.HealthChecks; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// The runtime self-check as a health check: replay every registered machine's embedded differential corpus diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachinesBuilderExtensions.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/StateMachinesBuilderExtensions.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachinesBuilderExtensions.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/StateMachinesBuilderExtensions.cs index 5cebc547d..8d379075d 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/StateMachinesBuilderExtensions.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/StateMachinesBuilderExtensions.cs @@ -11,9 +11,9 @@ using Trax.Effect.Data.Services.SqlDialect; using Trax.Effect.Extensions; using Trax.Effect.Services.TrainLifecycleHookFactory; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// Registers state-machine persistence as a first-class Trax subsystem inside AddTrax. One call diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/TimerFireResult.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/TimerFireResult.cs similarity index 97% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/TimerFireResult.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/TimerFireResult.cs index decfb4c07..f3aea294c 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/TimerFireResult.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/TimerFireResult.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// What one firing of a due timer did, from . /// The instance whose timer was due. diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/TransitionNote.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/TransitionNote.cs similarity index 98% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/TransitionNote.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/TransitionNote.cs index 3dcfc84f5..907134c85 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/TransitionNote.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/TransitionNote.cs @@ -1,6 +1,6 @@ using Trax.Effect.Enums; -namespace Trax.Effect.StateMachine.Persistence; +namespace Trax.StateMachine.Persistence; /// /// What the store records in an instance's history for one snapshot write: what wrote it, the command that moved it, diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Trax.Effect.StateMachine.Persistence.csproj b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Trax.StateMachine.Persistence.csproj similarity index 84% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Trax.Effect.StateMachine.Persistence.csproj rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Trax.StateMachine.Persistence.csproj index 22c46862e..da7e4b1c7 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/Trax.Effect.StateMachine.Persistence.csproj +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/Trax.StateMachine.Persistence.csproj @@ -4,11 +4,14 @@ enable enable Persistence for the Trax .NET snapshot state-machine engine: a user-scoped snapshot store with optimistic concurrency, the FE-drives/BE-validates draft service, and a generic exactly-once effect primitive (lease + fence token). - Trax.Effect.StateMachine.Persistence + Trax.StateMachine.Persistence + + false - + @@ -27,9 +30,9 @@ operator's cancel through the outcome delivery. A host neither implements nor calls them. --> - - - + + + diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/packages.lock.json b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/packages.lock.json similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/packages.lock.json rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/packages.lock.json index 7ffaf304f..97440aa83 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Persistence/packages.lock.json +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/packages.lock.json @@ -151,7 +151,7 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.statemachine": { "type": "Project", "dependencies": { "Trax.Effect": "[1.99.99, )" diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/DifferentialCorpus.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Testing/DifferentialCorpus.cs similarity index 97% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/DifferentialCorpus.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Testing/DifferentialCorpus.cs index f7c2c7355..44bef7c20 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/DifferentialCorpus.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Testing/DifferentialCorpus.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Testing; +namespace Trax.StateMachine.Testing; /// /// Replays a shared, TypeScript-generated differential corpus (produced by the @traxsharp/state-machine diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/MachineConformance.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Testing/MachineConformance.cs similarity index 98% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/MachineConformance.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Testing/MachineConformance.cs index 7d7a9557d..0ebc157c1 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/MachineConformance.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Testing/MachineConformance.cs @@ -1,6 +1,6 @@ -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; -namespace Trax.Effect.StateMachine.Testing; +namespace Trax.StateMachine.Testing; /// /// The three checks that keep a machine, its committed artifacts, and the generated frontend twin from diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/Trax.Effect.StateMachine.Testing.csproj b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Testing/Trax.StateMachine.Testing.csproj similarity index 62% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/Trax.Effect.StateMachine.Testing.csproj rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Testing/Trax.StateMachine.Testing.csproj index 44d0eb0eb..87ab301b6 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/Trax.Effect.StateMachine.Testing.csproj +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Testing/Trax.StateMachine.Testing.csproj @@ -3,14 +3,17 @@ net10.0 enable enable - Trax.Effect.StateMachine.Testing + Trax.StateMachine.Testing + + false Cross-runtime differential conformance for Trax .NET state machines: replay a generated differential corpus through the C# engine and get back the cases it fails to reproduce. The corpus is produced by the TypeScript oracle (@traxsharp/state-machine); this proves the two engine ports stay behaviorally identical. Framework-agnostic — returns a diff list you assert on. trax;testing;statemachine;conformance;differential true - - + + diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/packages.lock.json b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Testing/packages.lock.json similarity index 98% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/packages.lock.json rename to Trax.StateMachine/dotnet/src/Trax.StateMachine.Testing/packages.lock.json index 03b51f2d0..59ed45c95 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine.Testing/packages.lock.json +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Testing/packages.lock.json @@ -106,13 +106,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.statemachine": { "type": "Project", "dependencies": { "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { "Microsoft.EntityFrameworkCore": "[10.0.12, )", @@ -121,7 +121,7 @@ "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "Microsoft.EntityFrameworkCore": { diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CallerRule.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/CallerRule.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CallerRule.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/CallerRule.cs index d41ca2677..e794e6e9e 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CallerRule.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/CallerRule.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// Which kind of caller a admits. internal enum CallerRuleKind diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CanonicalJson.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/CanonicalJson.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CanonicalJson.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/CanonicalJson.cs index d0cf10288..d89f52dbd 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CanonicalJson.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/CanonicalJson.cs @@ -2,7 +2,7 @@ using System.Text; using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// Emits the canonical wire bytes for a snapshot. The envelope (machine, version, state, context) is in diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/ClientManifest.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/ClientManifest.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/ClientManifest.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/ClientManifest.cs index a80df7923..2ec42b2fe 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/ClientManifest.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/ClientManifest.cs @@ -5,7 +5,7 @@ using System.Text.Json.Nodes; using System.Text.Json.Serialization; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// What a host exports for trax client: every persisted document the host generates, by id, each exposed diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CorpusReplay.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/CorpusReplay.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CorpusReplay.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/CorpusReplay.cs index c3ea02ece..2b4b67a19 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/CorpusReplay.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/CorpusReplay.cs @@ -1,7 +1,7 @@ using System.ComponentModel; using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// Replays a shared, TypeScript-generated differential corpus (produced by the @traxsharp/state-machine diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Fluent.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Fluent.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Fluent.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/Fluent.cs index ab455033e..3b5aa4d26 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Fluent.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Fluent.cs @@ -4,7 +4,7 @@ using System.Text.Json.Serialization; using System.Text.RegularExpressions; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// One irreversible effect bound to a transition, declared inline on the machine (never wired in DI by diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Invokes.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Invokes.cs similarity index 98% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Invokes.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/Invokes.cs index 899555f26..517c3ec2e 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Invokes.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Invokes.cs @@ -3,7 +3,7 @@ using System.Text.Json.Nodes; using System.Text.Json.Serialization; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// Declares where the outcome of a state's invoked train goes. Returned by @@ -176,11 +176,11 @@ public IReadOnlyList> EdgesFor(InvokeOutcomeKind kind) => /// Serializes a run's output into the JSON an outcome's guard and reduction read. /// /// The same naming the declarative schema reflects (camelCase members, enums as camelCase strings), and the - /// same options a run stores its output with for the machine (), so the + /// same options a run stores its output with for the machine (), so the /// fields a guard or reduction names exist in the output whichever produced it. /// public JsonNode? SerializeOutput(object? output) => - JsonSerializer.SerializeToNode(output, OutputType, Utils.InvokedRunOutput.Json); + JsonSerializer.SerializeToNode(output, OutputType, Trax.Effect.Utils.InvokedRunOutput.Json); } /// diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/MachineDefinition.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/MachineDefinition.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/MachineDefinition.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/MachineDefinition.cs index 139c3703e..3623a0d55 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/MachineDefinition.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/MachineDefinition.cs @@ -1,6 +1,6 @@ using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// The result of migrating a snapshot one version forward: the (possibly transformed) state token and diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/MachineTrigger.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/MachineTrigger.cs similarity index 97% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/MachineTrigger.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/MachineTrigger.cs index f611a4094..75b43ca53 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/MachineTrigger.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/MachineTrigger.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// Who may fire a machine's trigger, and through which path. public enum TriggerKind diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/RefusalCode.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/RefusalCode.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/RefusalCode.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/RefusalCode.cs index 962e90d7e..f2867bce7 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/RefusalCode.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/RefusalCode.cs @@ -2,7 +2,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// Every code a machine operation is refused with, by the engine, the draft service, the effect runner or the API. It diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Results.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Results.cs similarity index 98% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Results.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/Results.cs index 193a3041d..c5a816faf 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Results.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Results.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// The total result of an . Exactly one of diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ContextSchema.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/ContextSchema.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ContextSchema.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/ContextSchema.cs index f5178b72a..3c67c526e 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ContextSchema.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/ContextSchema.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// One field of a state's context, a trigger's input or a train's output: its JSON key, JSON type, whether it diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/DeclarativeModel.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/DeclarativeModel.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/DeclarativeModel.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/DeclarativeModel.cs index 682890d52..94fd2bdec 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/DeclarativeModel.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/DeclarativeModel.cs @@ -1,6 +1,6 @@ using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// One transition's declarative guard/reducer as DATA, captured alongside the compiled delegates the engine diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/IrExporter.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/IrExporter.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/IrExporter.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/IrExporter.cs index c9cdfe198..32189decf 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/IrExporter.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/IrExporter.cs @@ -1,6 +1,6 @@ using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// Exports a declaratively-authored machine to the neutral IR (the formalized machine.json): identity, diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/MemberPath.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/MemberPath.cs similarity index 98% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/MemberPath.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/MemberPath.cs index 20d5c094d..cdd4c604a 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/MemberPath.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/MemberPath.cs @@ -3,7 +3,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// Resolves a strongly-typed member expression (x => x.PaidWith) to the JSON field name it maps to diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/Reduction.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/Reduction.cs similarity index 98% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/Reduction.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/Reduction.cs index f36d94f86..fa36ed45e 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/Reduction.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/Reduction.cs @@ -1,6 +1,6 @@ using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// Where a takes its value from. public abstract record ValueSource diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ReductionEvaluator.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/ReductionEvaluator.cs similarity index 98% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ReductionEvaluator.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/ReductionEvaluator.cs index b95611e12..d2d329683 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ReductionEvaluator.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/ReductionEvaluator.cs @@ -1,6 +1,6 @@ using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// Applies a declarative to produce a transition's destination context. Total and diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/Rule.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/Rule.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/Rule.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/Rule.cs index e1619b270..af3da6ed0 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/Rule.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/Rule.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// Where a rule reads its field from: the snapshot's context, or the trigger's input. public enum RuleSource diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/RuleEvaluator.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/RuleEvaluator.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/RuleEvaluator.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/RuleEvaluator.cs index 35ec48cc0..c86814b7b 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/RuleEvaluator.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/RuleEvaluator.cs @@ -2,7 +2,7 @@ using System.Text.Json; using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// Evaluates a declarative against a context and input. Total: a missing or wrong-typed diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/Rules.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/Rules.cs similarity index 98% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/Rules.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/Rules.cs index a3a8cff1c..2dd985517 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/Rules.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/Rules.cs @@ -1,11 +1,11 @@ using System.Linq.Expressions; using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// The ergonomic, string-free authoring surface over the / data. -/// Import it with using static Trax.Effect.StateMachine.Rules; and reference fields by member +/// Import it with using static Trax.StateMachine.Rules; and reference fields by member /// expression, so a guard reads Input((CoinInput i) => i.Coin).IsOneOf("quarter", "dollar") instead /// of a raw record with a magic string. These are thin factories: they only build the data the engine and the /// IR exporter already handle. diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/SchemaReflection.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/SchemaReflection.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/SchemaReflection.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/SchemaReflection.cs index 83fc202ab..16a2dedf3 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/SchemaReflection.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/SchemaReflection.cs @@ -8,7 +8,7 @@ using System.Text.Json.Serialization; using System.Text.Json.Serialization.Metadata; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// Builds a from the author's C# record: the field names come from the properties diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/SchemaValidator.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/SchemaValidator.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/SchemaValidator.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/SchemaValidator.cs index 4acb6caaa..d41bee0f7 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/SchemaValidator.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/SchemaValidator.cs @@ -4,7 +4,7 @@ using System.Text.Json.Nodes; using System.Text.RegularExpressions; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// Validates a context, a trigger's input or a train's output against a : every diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ValueFormats.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/ValueFormats.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ValueFormats.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/ValueFormats.cs index 6b33bb9ac..173467f05 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/ValueFormats.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/ValueFormats.cs @@ -1,7 +1,7 @@ using System.Globalization; using System.Text.RegularExpressions; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// The string formats a field's CLR type gives it, checked the same way in both engines (the TypeScript twin's diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Snapshot.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Snapshot.cs similarity index 98% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Snapshot.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/Snapshot.cs index 469c4d839..a657fc127 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Snapshot.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Snapshot.cs @@ -1,6 +1,6 @@ using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// The language-neutral, serializable state of a machine instance — the only thing that diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/SnapshotMachine.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/SnapshotMachine.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/SnapshotMachine.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/SnapshotMachine.cs index ad8ae9ee3..9eb812820 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/SnapshotMachine.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/SnapshotMachine.cs @@ -1,7 +1,7 @@ using System.Text.Json; using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// Interprets a over s. It is diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/StartDeclaration.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/StartDeclaration.cs similarity index 98% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/StartDeclaration.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/StartDeclaration.cs index 208ae59bb..8886d4960 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/StartDeclaration.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/StartDeclaration.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// A machine's declared start: the record a client starts an instance with, its schema, and the reduction that diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/StorableJson.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/StorableJson.cs similarity index 98% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/StorableJson.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/StorableJson.cs index 288ba784f..752b8c049 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/StorableJson.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/StorableJson.cs @@ -3,7 +3,7 @@ using System.Text.Json; using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// Finds the values a snapshot context may not carry even though they are valid JSON: a number outside diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Timers.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Timers.cs similarity index 99% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Timers.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/Timers.cs index ee14f5eca..8e705aa1b 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Timers.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Timers.cs @@ -5,7 +5,7 @@ using System.Text.RegularExpressions; using System.Xml; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// The limits every state's timer is held to. public static class MachineTimers diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/TransitionDefinition.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine/TransitionDefinition.cs similarity index 98% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/TransitionDefinition.cs rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/TransitionDefinition.cs index 5241b543b..414163831 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/TransitionDefinition.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/TransitionDefinition.cs @@ -1,6 +1,6 @@ using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine; +namespace Trax.StateMachine; /// /// One edge of a : "from , on diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Trax.Effect.StateMachine.csproj b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Trax.StateMachine.csproj similarity index 76% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Trax.Effect.StateMachine.csproj rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/Trax.StateMachine.csproj index 8545de595..03fcd3ebb 100644 --- a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Trax.Effect.StateMachine.csproj +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine/Trax.StateMachine.csproj @@ -4,7 +4,10 @@ enable enable Portable, resumable snapshot state-machine engine. Pure: no database or I/O. Represents a multi-step flow's state as language-neutral JSON so a C# backend and a TypeScript client agree on it, with illegal (state, context) pairs unrepresentable and every operation total. - Trax.Effect.StateMachine + Trax.StateMachine + + false @@ -13,11 +16,11 @@ - + - - + + diff --git a/Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/packages.lock.json b/Trax.StateMachine/dotnet/src/Trax.StateMachine/packages.lock.json similarity index 100% rename from Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/packages.lock.json rename to Trax.StateMachine/dotnet/src/Trax.StateMachine/packages.lock.json diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ActorHierarchyTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/ActorHierarchyTests.cs similarity index 94% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ActorHierarchyTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/ActorHierarchyTests.cs index 5691169dd..af70a1133 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ActorHierarchyTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/ActorHierarchyTests.cs @@ -2,7 +2,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// has one kind, , and code outside Trax cannot add another: a record @@ -23,7 +23,7 @@ public void A_record_outside_Trax_cannot_derive_from_Actor() { var errors = Compile( """ - using Trax.Effect.StateMachine.Persistence; + using Trax.StateMachine.Persistence; public sealed record Other : Actor { @@ -41,7 +41,7 @@ public void A_client_is_built_outside_Trax() // The probe compiles host code at all: the refusal above is the hierarchy's, not the setup's. var errors = Compile( """ - using Trax.Effect.StateMachine.Persistence; + using Trax.StateMachine.Persistence; public static class Host { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/AddStateMachinesBuilderTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/AddStateMachinesBuilderTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/AddStateMachinesBuilderTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/AddStateMachinesBuilderTests.cs index aec5026c0..69d677429 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/AddStateMachinesBuilderTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/AddStateMachinesBuilderTests.cs @@ -7,11 +7,11 @@ using Trax.Effect.Data.Postgres.Extensions; using Trax.Effect.Data.Services.DataContext; using Trax.Effect.Extensions; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// The trax.AddStateMachines(...) builder step: one call discovers the machines, wires the subsystem diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ChangeFeedStartupValidatorTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/ChangeFeedStartupValidatorTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ChangeFeedStartupValidatorTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/ChangeFeedStartupValidatorTests.cs index 4c0470d8f..5b748d83a 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ChangeFeedStartupValidatorTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/ChangeFeedStartupValidatorTests.cs @@ -1,7 +1,7 @@ using AwesomeAssertions; using Trax.Effect.Data.Services.SnapshotNotices; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// The change feed's startup check over a given switch, for the cases a shared test database cannot set up without diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ChangeFeedSwitchTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/ChangeFeedSwitchTests.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ChangeFeedSwitchTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/ChangeFeedSwitchTests.cs index 264d07749..f04894074 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ChangeFeedSwitchTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/ChangeFeedSwitchTests.cs @@ -3,10 +3,10 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// The 080 trigger reads trax.snapshot_notify in the session that writes, and a host that listens cannot see diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ClientDivergenceMeterTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/ClientDivergenceMeterTests.cs similarity index 93% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ClientDivergenceMeterTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/ClientDivergenceMeterTests.cs index 23d9ce4a4..aa1938066 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ClientDivergenceMeterTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/ClientDivergenceMeterTests.cs @@ -1,11 +1,11 @@ using System.Diagnostics.Metrics; using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// An advance whose client result differs from the server's is refused as CLIENT_DIVERGENCE, writes nothing, diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardEffectTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DiscardEffectTests.cs similarity index 94% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardEffectTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DiscardEffectTests.cs index 3bc914662..0f6c90fb6 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardEffectTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DiscardEffectTests.cs @@ -1,10 +1,10 @@ using System.Text.Json.Nodes; using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// An instance an effect is running on is becoming the record of what the server did, so discard keeps it diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardRuleTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DiscardRuleTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardRuleTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DiscardRuleTests.cs index e4cbf7f8d..4498caed7 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardRuleTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DiscardRuleTests.cs @@ -1,9 +1,9 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// discard declares a rule as get does, owner-only being its floor, and is refused as diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DiscardTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DiscardTests.cs index cc7240b28..ac2c6a4e8 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DiscardTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DiscardTests.cs @@ -2,10 +2,10 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Data.Services.DataContext; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// discard(id) deletes the caller's own draft: someone else's id is answered exactly as a missing one, a diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftLifetimeTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DraftLifetimeTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftLifetimeTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DraftLifetimeTests.cs index 8281414b1..be9ae7f1e 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftLifetimeTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DraftLifetimeTests.cs @@ -4,10 +4,10 @@ using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Data.Services.DataContext; using Trax.Effect.Enums; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// bounds a user's draft, and what it deletes: an instance in a diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftMachineScopeTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DraftMachineScopeTests.cs similarity index 94% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftMachineScopeTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DraftMachineScopeTests.cs index 345728eaa..670141873 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftMachineScopeTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DraftMachineScopeTests.cs @@ -1,9 +1,9 @@ using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// A draft belongs to one machine. Two machines may give one user a draft under the same id (a well-known id diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftWriteRulesTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DraftWriteRulesTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftWriteRulesTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DraftWriteRulesTests.cs index 57a98c165..fa9eac9f9 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/DraftWriteRulesTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DraftWriteRulesTests.cs @@ -1,11 +1,11 @@ using System.Text.Json.Nodes; using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; public enum ShipState { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EfSnapshotStoreTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EfSnapshotStoreTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EfSnapshotStoreTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EfSnapshotStoreTests.cs index 5a09c49a9..56c65300e 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EfSnapshotStoreTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EfSnapshotStoreTests.cs @@ -2,9 +2,9 @@ using AwesomeAssertions; using Microsoft.EntityFrameworkCore; using Npgsql; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; public class EfSnapshotStoreTests { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectAndHandshakeDefectTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EffectAndHandshakeDefectTests.cs similarity index 95% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectAndHandshakeDefectTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EffectAndHandshakeDefectTests.cs index 67c9c6c34..71d8f45aa 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectAndHandshakeDefectTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EffectAndHandshakeDefectTests.cs @@ -2,11 +2,11 @@ using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Data.Testing; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; public enum GateState { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectClaimStoreTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EffectClaimStoreTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectClaimStoreTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EffectClaimStoreTests.cs index edc64f48e..980e14609 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectClaimStoreTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EffectClaimStoreTests.cs @@ -1,8 +1,8 @@ using AwesomeAssertions; using Trax.Effect.Data.Testing; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; public class EffectClaimStoreTests { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectCommitIntegrityTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EffectCommitIntegrityTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectCommitIntegrityTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EffectCommitIntegrityTests.cs index ae4b03d22..5dde7d197 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectCommitIntegrityTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EffectCommitIntegrityTests.cs @@ -2,11 +2,11 @@ using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Data.Testing; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// What the effect runner commits, and what keeps its claim, when the draft is written to, reset or expired while diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectPendingTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EffectPendingTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectPendingTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EffectPendingTests.cs index 77084ed68..c780b429e 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EffectPendingTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EffectPendingTests.cs @@ -5,10 +5,10 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Trax.Effect.Data.Services.DataContext; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// An effect is pending on its instance's row: sending an effect-bound event marks the row, every other write to it @@ -60,7 +60,7 @@ private async Task InReview() return id; } - private async Task Row(Guid id) => + private async Task Row(Guid id) => (await _host.Rows(id)).Single(); private static void ShouldBeEffectInProgress(AdvanceOutcome outcome, string because) => diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EventAuthorizationTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EventAuthorizationTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EventAuthorizationTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EventAuthorizationTests.cs index c459d321f..d64ca8cae 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EventAuthorizationTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EventAuthorizationTests.cs @@ -4,10 +4,10 @@ using CsCheck; using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Data.Services.DataContext; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// Every event's rule is checked below the resolver, where every surface meets: a client actor that does not meet diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EventRuleStartupTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EventRuleStartupTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EventRuleStartupTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EventRuleStartupTests.cs index cb7d39d41..5942d5929 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/EventRuleStartupTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EventRuleStartupTests.cs @@ -2,11 +2,11 @@ using System.Text.Json.Nodes; using AwesomeAssertions; using Trax.Effect.Attributes; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// A machine a client can reach declares a rule for every event, for its start and for its reads, and a host diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/BuildMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/BuildMachine.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/BuildMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/BuildMachine.cs index 30ad15bfc..2a8a7bc5d 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/BuildMachine.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/BuildMachine.cs @@ -1,9 +1,9 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json.Nodes; using Trax.Effect.Services.ServiceTrain; -using static Trax.Effect.StateMachine.Rules; +using static Trax.StateMachine.Rules; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fakes; +namespace Trax.StateMachine.Persistence.Integration.Fakes; public sealed record BuildInput(string Source); diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/DeclarativeTurnstileMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/DeclarativeTurnstileMachine.cs similarity index 95% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/DeclarativeTurnstileMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/DeclarativeTurnstileMachine.cs index ead5dd0b2..d08c11335 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/DeclarativeTurnstileMachine.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/DeclarativeTurnstileMachine.cs @@ -1,8 +1,8 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json.Nodes; -using static Trax.Effect.StateMachine.Rules; +using static Trax.StateMachine.Rules; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fakes; +namespace Trax.StateMachine.Persistence.Integration.Fakes; /// /// The turnstile authored as a discoverable using the DECLARATIVE, diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/Effects.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/Effects.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/Effects.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/Effects.cs index 6baba6660..93d6b2ec4 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/Effects.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/Effects.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Persistence.Integration.Fakes; +namespace Trax.StateMachine.Persistence.Integration.Fakes; public sealed class FakePrincipal(string? userKey) : ISnapshotPrincipal { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/FluentMachines.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/FluentMachines.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/FluentMachines.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/FluentMachines.cs index ce9aa818c..8ac6b1ee2 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/FluentMachines.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/FluentMachines.cs @@ -1,7 +1,7 @@ using System.Text.Json; using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fakes; +namespace Trax.StateMachine.Persistence.Integration.Fakes; /// The turnstile authored as a discoverable — no effect, no committed state. public sealed class TurnstileMachine : Machine diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/PendingEffectMachines.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/PendingEffectMachines.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/PendingEffectMachines.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/PendingEffectMachines.cs index 909fc9ebd..9382c17c5 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/PendingEffectMachines.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/PendingEffectMachines.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; -using static Trax.Effect.StateMachine.Rules; +using static Trax.StateMachine.Rules; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fakes; +namespace Trax.StateMachine.Persistence.Integration.Fakes; public enum PendingPayState { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RecordingLauncher.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/RecordingLauncher.cs similarity index 95% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RecordingLauncher.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/RecordingLauncher.cs index 1ab373d05..08cff68a3 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RecordingLauncher.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/RecordingLauncher.cs @@ -2,7 +2,7 @@ using Trax.Effect.Models.WorkQueue; using Trax.Effect.Models.WorkQueue.DTOs; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fakes; +namespace Trax.StateMachine.Persistence.Integration.Fakes; /// /// Stands in for the mediator's launcher, which this folder cannot reference: it writes the run's work queue entry diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RevisionMachines.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/RevisionMachines.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RevisionMachines.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/RevisionMachines.cs index 99e4964b8..21f8872cf 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RevisionMachines.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/RevisionMachines.cs @@ -1,8 +1,8 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json.Nodes; -using static Trax.Effect.StateMachine.Rules; +using static Trax.StateMachine.Rules; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fakes; +namespace Trax.StateMachine.Persistence.Integration.Fakes; /// /// The declarative turnstile as a system-owned machine, so a host's trusted advance through diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RuledMachines.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/RuledMachines.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RuledMachines.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/RuledMachines.cs index eecc9cc42..ed4bfc824 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/RuledMachines.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/RuledMachines.cs @@ -1,9 +1,9 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json; using System.Text.Json.Nodes; -using static Trax.Effect.StateMachine.Rules; +using static Trax.StateMachine.Rules; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fakes; +namespace Trax.StateMachine.Persistence.Integration.Fakes; // Machines that declare who may fire each event, start an instance and read one. Every one of them builds, so // the assembly scan every InstanceHost runs can register them; a machine whose declaration a host must refuse is diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/SpawnMachines.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/SpawnMachines.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/SpawnMachines.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/SpawnMachines.cs index a5f74a263..0e2855cf6 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/SpawnMachines.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/SpawnMachines.cs @@ -1,8 +1,8 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json.Nodes; -using static Trax.Effect.StateMachine.Rules; +using static Trax.StateMachine.Rules; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fakes; +namespace Trax.StateMachine.Persistence.Integration.Fakes; public enum ConsignmentState { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/SystemMachines.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/SystemMachines.cs similarity index 91% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/SystemMachines.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/SystemMachines.cs index 1168c1f94..e4460d8e3 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/SystemMachines.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/SystemMachines.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Persistence.Integration.Fakes; +namespace Trax.StateMachine.Persistence.Integration.Fakes; /// The turnstile as a system-owned machine: only creates one. public sealed class SystemTurnstileMachine : Machine diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TestOrder.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/TestOrder.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TestOrder.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/TestOrder.cs index 36af559c5..e5ed8bd11 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TestOrder.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/TestOrder.cs @@ -1,7 +1,7 @@ using System.Text.Json; using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fakes; +namespace Trax.StateMachine.Persistence.Integration.Fakes; public enum OrderState { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TestTurnstile.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/TestTurnstile.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TestTurnstile.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/TestTurnstile.cs index 24ded4656..2373c5e34 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TestTurnstile.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/TestTurnstile.cs @@ -1,7 +1,7 @@ using System.Text.Json; using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fakes; +namespace Trax.StateMachine.Persistence.Integration.Fakes; public enum TurnstileState { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TimerMachines.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/TimerMachines.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TimerMachines.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/TimerMachines.cs index 320329e19..0a809841e 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TimerMachines.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/TimerMachines.cs @@ -1,8 +1,8 @@ using System.Text.Json.Nodes; using Trax.Effect.Services.ServiceTrain; -using static Trax.Effect.StateMachine.Rules; +using static Trax.StateMachine.Rules; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fakes; +namespace Trax.StateMachine.Persistence.Integration.Fakes; public enum ReminderState { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TimerSweepMachines.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/TimerSweepMachines.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TimerSweepMachines.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/TimerSweepMachines.cs index 70144d595..0b5a43ee3 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fakes/TimerSweepMachines.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fakes/TimerSweepMachines.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; using Trax.Effect.Data.Services.DataContext; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fakes; +namespace Trax.StateMachine.Persistence.Integration.Fakes; public enum TimedChargeState { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/CheckTraxInvariantsAttribute.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/CheckTraxInvariantsAttribute.cs similarity index 91% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/CheckTraxInvariantsAttribute.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/CheckTraxInvariantsAttribute.cs index ebd4efaa2..5752984a8 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/CheckTraxInvariantsAttribute.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/CheckTraxInvariantsAttribute.cs @@ -1,9 +1,9 @@ using NUnit.Framework.Interfaces; using Trax.Effect.Data.Testing; -[assembly: Trax.Effect.StateMachine.Persistence.Integration.Fixtures.CheckTraxInvariants] +[assembly: Trax.StateMachine.Persistence.Integration.Fixtures.CheckTraxInvariants] -namespace Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +namespace Trax.StateMachine.Persistence.Integration.Fixtures; /// /// Checks the throwaway database with after every test in this diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/CountingDataContextFactory.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/CountingDataContextFactory.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/CountingDataContextFactory.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/CountingDataContextFactory.cs index 10982884e..983d90458 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/CountingDataContextFactory.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/CountingDataContextFactory.cs @@ -3,7 +3,7 @@ using Trax.Effect.Data.Services.IDataContextFactory; using Trax.Effect.Services.EffectProvider; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +namespace Trax.StateMachine.Persistence.Integration.Fixtures; /// /// Wraps the registered and counts the data contexts it hands out, so a diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/InstanceHost.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/InstanceHost.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/InstanceHost.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/InstanceHost.cs index 5bfd8da76..60ebbf903 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/InstanceHost.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/InstanceHost.cs @@ -6,9 +6,9 @@ using Trax.Effect.Data.Sqlite.Extensions; using Trax.Effect.Enums; using Trax.Effect.Extensions; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fakes; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +namespace Trax.StateMachine.Persistence.Integration.Fixtures; /// The two providers that store drafts in a real database. public enum StoreProvider diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/Marked.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/Marked.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/Marked.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/Marked.cs index 767ab892d..64a1ad9e6 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/Marked.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/Marked.cs @@ -3,7 +3,7 @@ using System.Reflection.Emit; using Trax.Effect.Attributes; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +namespace Trax.StateMachine.Persistence.Integration.Fixtures; /// /// A fake machine marked , for a test that serves it: a sealed subclass carrying the diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PausingSnapshotStore.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/PausingSnapshotStore.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PausingSnapshotStore.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/PausingSnapshotStore.cs index 2d04fba68..df8e2c7f9 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PausingSnapshotStore.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/PausingSnapshotStore.cs @@ -2,7 +2,7 @@ using Trax.Effect.Data.Services.DataContext; using Trax.Effect.Data.Services.SqlDialect; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +namespace Trax.StateMachine.Persistence.Integration.Fixtures; /// /// Where holds the next write: before it reaches the store (after the caller's diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PendingHarness.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/PendingHarness.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PendingHarness.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/PendingHarness.cs index 06a9d3d90..ac85b6c7e 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PendingHarness.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/PendingHarness.cs @@ -2,9 +2,9 @@ using System.Text.Json.Nodes; using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fakes; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +namespace Trax.StateMachine.Persistence.Integration.Fixtures; /// What a does on one run. public enum ChargeRun diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PostgresSetup.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/PostgresSetup.cs similarity index 95% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PostgresSetup.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/PostgresSetup.cs index a8b38661c..c3a2d2005 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/PostgresSetup.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/PostgresSetup.cs @@ -1,12 +1,12 @@ using Npgsql; using Trax.Effect.Data.Postgres.Utils; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fixtures; // This SetUpFixture lives in the ROOT test namespace on purpose: a SetUpFixture only wraps its own // namespace and descendants, never its parent. Placed in a child namespace (e.g. `.Fixtures`) that holds // no tests, its OneTimeSetUp/OneTimeTearDown would run back-to-back and drop the database out from under // the real tests in the parent namespace. -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// Creates a throwaway database on the local Trax Postgres (the docker-compose trax_database) once diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/RawSql.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/RawSql.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/RawSql.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/RawSql.cs index b68a75de6..2e9aee0b0 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/RawSql.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/RawSql.cs @@ -4,7 +4,7 @@ using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Data.Services.DataContext; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +namespace Trax.StateMachine.Persistence.Integration.Fixtures; /// A draft row's timer columns as the database holds them, read by raw SQL. /// The state column. diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/ScratchDatabase.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/ScratchDatabase.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/ScratchDatabase.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/ScratchDatabase.cs index 3b34cb4f1..0b2df7a4b 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/ScratchDatabase.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/ScratchDatabase.cs @@ -1,7 +1,7 @@ using Npgsql; using Trax.Effect.Data.Postgres.Utils; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +namespace Trax.StateMachine.Persistence.Integration.Fixtures; /// /// A migrated Postgres database of its own, for a test that changes what is database-wide (an diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SkewedDatabaseClock.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/SkewedDatabaseClock.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SkewedDatabaseClock.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/SkewedDatabaseClock.cs index edb59a0a5..14490067b 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SkewedDatabaseClock.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/SkewedDatabaseClock.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Diagnostics; using Microsoft.Extensions.DependencyInjection; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +namespace Trax.StateMachine.Persistence.Integration.Fixtures; /// /// Puts the database's clock an hour ahead of this host's, as seen through the host's data contexts: every command diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SnapshotNotices.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/SnapshotNotices.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SnapshotNotices.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/SnapshotNotices.cs index a120c2f81..c76992381 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SnapshotNotices.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/SnapshotNotices.cs @@ -1,7 +1,7 @@ using System.Threading.Channels; using Npgsql; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +namespace Trax.StateMachine.Persistence.Integration.Fixtures; /// /// A raw LISTEN on the snapshot change channel, on a connection of its own, the way an operator or a diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SqliteDb.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/SqliteDb.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SqliteDb.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/SqliteDb.cs index e34138e3d..fd37095ae 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/SqliteDb.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/SqliteDb.cs @@ -6,7 +6,7 @@ using Trax.Effect.Data.Sqlite.Extensions; using Trax.Effect.Extensions; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +namespace Trax.StateMachine.Persistence.Integration.Fixtures; /// /// A SQLite file built by the shipped migrations, with stores over the data context and dialect UseSqlite diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/StartingHost.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/StartingHost.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/StartingHost.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/StartingHost.cs index e574525d8..bf9071095 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/StartingHost.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/StartingHost.cs @@ -5,9 +5,9 @@ using Microsoft.Extensions.Hosting; using Trax.Effect.Data.Sqlite.Extensions; using Trax.Effect.Extensions; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fakes; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +namespace Trax.StateMachine.Persistence.Integration.Fixtures; /// /// Starts a host the way the generic host does, running every hosted service's StartingAsync and then its diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/TestDb.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/TestDb.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/TestDb.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/TestDb.cs index 605cf9449..3ae169125 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/TestDb.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/TestDb.cs @@ -6,7 +6,7 @@ using Trax.Effect.Data.Services.SqlDialect; using Trax.Effect.Extensions; -namespace Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +namespace Trax.StateMachine.Persistence.Integration.Fixtures; /// /// Factory for per-request data contexts and stores over the throwaway database (), diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/TestPostgres.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/TestPostgres.cs similarity index 86% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/TestPostgres.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/TestPostgres.cs index 1a3d01d15..832e1d84d 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Fixtures/TestPostgres.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Fixtures/TestPostgres.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +namespace Trax.StateMachine.Persistence.Integration.Fixtures; /// /// The port of the test Postgres. TRAX_TEST_PG_PORT overrides it for a machine where another diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/GenericRulesTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/GenericRulesTests.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/GenericRulesTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/GenericRulesTests.cs index 56ba8957e..1b0f91c68 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/GenericRulesTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/GenericRulesTests.cs @@ -1,11 +1,11 @@ using System.Text.Json.Nodes; using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// The generic mutations are held to the machine's rules as its typed operations are: loadSnapshot to the diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/GenericSaveTimerTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/GenericSaveTimerTests.cs similarity index 93% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/GenericSaveTimerTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/GenericSaveTimerTests.cs index 94a032382..a3e2d4bcd 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/GenericSaveTimerTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/GenericSaveTimerTests.cs @@ -1,10 +1,10 @@ using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// A timed state is the server's to leave: the generic save is refused outright for a machine with a timer, even diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/IdempotentEffectTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/IdempotentEffectTests.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/IdempotentEffectTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/IdempotentEffectTests.cs index b014afced..501f112c0 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/IdempotentEffectTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/IdempotentEffectTests.cs @@ -1,9 +1,9 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; public class IdempotentEffectTests { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokeTokenStoreTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/InvokeTokenStoreTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokeTokenStoreTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/InvokeTokenStoreTests.cs index 3da0ff464..8e1b8c1ef 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokeTokenStoreTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/InvokeTokenStoreTests.cs @@ -5,10 +5,10 @@ using Trax.Effect.Data.Services.DataContext; using Trax.Effect.Data.Testing; using Trax.Effect.Enums; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fixtures; using SnapshotDraft = Trax.Effect.Models.SnapshotDraft.SnapshotDraft; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// The storage the invoked-train slices build on: system rows keyed by machine and id, the invoke_token diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokedRunLimitTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/InvokedRunLimitTests.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokedRunLimitTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/InvokedRunLimitTests.cs index d976068b8..94625dc13 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokedRunLimitTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/InvokedRunLimitTests.cs @@ -5,9 +5,9 @@ using Npgsql; using Trax.Effect.Data.Services.DataContext; using Trax.Effect.Enums; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// The invoked-run cap counts a user's live runs on every invoking write, so its count by starter must read the index diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokedRunOutputTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/InvokedRunOutputTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokedRunOutputTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/InvokedRunOutputTests.cs index 21f015e41..327f1c62b 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokedRunOutputTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/InvokedRunOutputTests.cs @@ -5,7 +5,7 @@ using Trax.Effect.Models.Metadata.DTOs; using Trax.Effect.Models.WorkQueue.DTOs; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// The copy of an invoked run's output that its machine reads is never written when the output reaches a diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokesDraftExpiryTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/InvokesDraftExpiryTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokesDraftExpiryTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/InvokesDraftExpiryTests.cs index 750ae0f6a..94b4c047b 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokesDraftExpiryTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/InvokesDraftExpiryTests.cs @@ -4,10 +4,10 @@ using Trax.Effect.Data.Services.DataContext; using Trax.Effect.Data.Testing; using Trax.Effect.Enums; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// Draft expiry never strands a run: system rows are exempt from the draft time-to-live, the sweep leaves a draft diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokesReservedStateTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/InvokesReservedStateTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokesReservedStateTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/InvokesReservedStateTests.cs index 20fd23134..71fb8f656 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/InvokesReservedStateTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/InvokesReservedStateTests.cs @@ -2,10 +2,10 @@ using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Enums; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// An outcome cannot be forged, on a user-owned machine too: invoking states and every outcome target are reserved, diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineCensusTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MachineCensusTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineCensusTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MachineCensusTests.cs index 29cc1fe79..6d93bed98 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineCensusTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MachineCensusTests.cs @@ -1,7 +1,7 @@ using AwesomeAssertions; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fakes; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// The census lists every event and read of every machine with the rule that guards it and the surfaces that reach diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineConformanceTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MachineConformanceTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineConformanceTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MachineConformanceTests.cs index 76ff39dda..48fd97e80 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineConformanceTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MachineConformanceTests.cs @@ -1,8 +1,8 @@ using AwesomeAssertions; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Testing; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Testing; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// The three drift checks a machine with a generated frontend twin needs, folded into one call diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineEffectRunnerTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MachineEffectRunnerTests.cs similarity index 93% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineEffectRunnerTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MachineEffectRunnerTests.cs index 11d8aff0f..7350a2192 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineEffectRunnerTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MachineEffectRunnerTests.cs @@ -1,10 +1,10 @@ using System.Text.Json.Nodes; using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// over a draft service it did not build. public class MachineEffectRunnerTests diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineExportIrTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MachineExportIrTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineExportIrTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MachineExportIrTests.cs index 71b67c844..d411dd73e 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineExportIrTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MachineExportIrTests.cs @@ -2,9 +2,9 @@ using System.Text; using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fakes; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// is the in-process entry point the trax machine CLI calls to turn a diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineInterleavingModelTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MachineInterleavingModelTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineInterleavingModelTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MachineInterleavingModelTests.cs index bda396306..dd313a69e 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineInterleavingModelTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MachineInterleavingModelTests.cs @@ -2,10 +2,10 @@ using AwesomeAssertions; using AwesomeAssertions.Execution; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// Starts, events, sends, timers, discards, draft sweeps and a claimant that stops, in random order from a logged diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineSchemaStartupTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MachineSchemaStartupTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineSchemaStartupTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MachineSchemaStartupTests.cs index b58bc96c6..ebdf07c88 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineSchemaStartupTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MachineSchemaStartupTests.cs @@ -1,9 +1,9 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// A declarative machine whose state is checked by a delegate (Holds), which the IR cannot carry. Its IR diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineTrainHookOutputTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MachineTrainHookOutputTests.cs similarity index 93% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineTrainHookOutputTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MachineTrainHookOutputTests.cs index e88b1bcad..7dea92b00 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MachineTrainHookOutputTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MachineTrainHookOutputTests.cs @@ -1,9 +1,9 @@ using System.Reflection; using AwesomeAssertions; using Trax.Effect.Services.LifecycleHookOutputPolicy; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// Every train a machine operation runs through withholds its output, an instance's snapshot, from the lifecycle diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MarkedMachineTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MarkedMachineTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MarkedMachineTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MarkedMachineTests.cs index 76315acbb..8944d2c07 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MarkedMachineTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MarkedMachineTests.cs @@ -5,10 +5,10 @@ using Trax.Effect.Attributes; using Trax.Effect.Data.InMemory.Extensions; using Trax.Effect.Extensions; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// is the only thing that serves a machine, as [TraxQuery] and diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MigrationSchemaTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MigrationSchemaTests.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MigrationSchemaTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MigrationSchemaTests.cs index a857546f0..c5d792530 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MigrationSchemaTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MigrationSchemaTests.cs @@ -11,11 +11,11 @@ using Trax.Effect.Data.Services.SqlDialect; using Trax.Effect.Data.Sqlite.Extensions; using Trax.Effect.Extensions; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fixtures; using PostgresMigrator = Trax.Effect.Data.Postgres.Utils.DatabaseMigrator; using SqliteMigrator = Trax.Effect.Data.Sqlite.Utils.DatabaseMigrator; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// The other integration tests build the two tables with EnsureCreated. These build them with the diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MutationErrorMessageTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MutationErrorMessageTests.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MutationErrorMessageTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MutationErrorMessageTests.cs index 03301efa8..666284b1a 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/MutationErrorMessageTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MutationErrorMessageTests.cs @@ -3,11 +3,11 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Trax.Effect.Data.Testing; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; public enum ProbeState { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/OrderAutosaveTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/OrderAutosaveTests.cs similarity index 95% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/OrderAutosaveTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/OrderAutosaveTests.cs index fbc3734d5..d23678636 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/OrderAutosaveTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/OrderAutosaveTests.cs @@ -1,9 +1,9 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// The guarded (committed-state) autosave path and the concurrency guarantees around it. public class OrderAutosaveTests diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/OrderSendTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/OrderSendTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/OrderSendTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/OrderSendTests.cs index f8e3fe848..5a6b0bc9f 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/OrderSendTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/OrderSendTests.cs @@ -1,9 +1,9 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// The exactly-once effect orchestration over the order machine (place = the irreversible action). public class OrderSendTests diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/PostgresChangeFeedTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/PostgresChangeFeedTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/PostgresChangeFeedTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/PostgresChangeFeedTests.cs index 2dd73b3e3..79db957f2 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/PostgresChangeFeedTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/PostgresChangeFeedTests.cs @@ -4,10 +4,10 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// A Postgres host chooses how it hears changes (). Notify listens for the diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RegistryCorruptDataTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RegistryCorruptDataTests.cs similarity index 93% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RegistryCorruptDataTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RegistryCorruptDataTests.cs index 625c02ed1..66de5ede2 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RegistryCorruptDataTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RegistryCorruptDataTests.cs @@ -1,11 +1,11 @@ using System.Text.Json.Nodes; using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// Corrupt stored data must degrade to a typed problem, never a crash. We store an invalid snapshot diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RegistryJunctionTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RegistryJunctionTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RegistryJunctionTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RegistryJunctionTests.cs index 667bf04c5..1449e93dd 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RegistryJunctionTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RegistryJunctionTests.cs @@ -1,10 +1,10 @@ using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// The generic save, advance, load and send mutations serve every registered machine via the registry (dispatch on the `machine` diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdControlCharacterTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RequestIdControlCharacterTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdControlCharacterTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RequestIdControlCharacterTests.cs index 448c20391..91f94fb75 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdControlCharacterTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RequestIdControlCharacterTests.cs @@ -1,10 +1,10 @@ using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// A request id is recorded on the row, so one holding a control character is refused as INVALID_REQUEST_ID diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdRingSizeTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RequestIdRingSizeTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdRingSizeTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RequestIdRingSizeTests.cs index e3193f420..0bd318226 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdRingSizeTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RequestIdRingSizeTests.cs @@ -1,10 +1,10 @@ using System.Text; using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// The request ring is bounded in bytes as well as in entries: however large the results it records, a row's ring diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdRingTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RequestIdRingTests.cs similarity index 95% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdRingTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RequestIdRingTests.cs index 35e95f6ca..22e04c722 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdRingTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RequestIdRingTests.cs @@ -1,10 +1,10 @@ using System.Text.Json.Nodes; using AwesomeAssertions; using Npgsql; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// A row records its last client requests with the result each was answered diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdScopeTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RequestIdScopeTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdScopeTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RequestIdScopeTests.cs index 7869d5598..1bc33e5d3 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestIdScopeTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RequestIdScopeTests.cs @@ -1,11 +1,11 @@ using System.Text.Json.Nodes; using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// A request id replays only the request it recorded: the same id and trigger, while the draft still shows diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestRetryAfterServerWriteTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RequestRetryAfterServerWriteTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestRetryAfterServerWriteTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RequestRetryAfterServerWriteTests.cs index 9ea1afbec..5efff517e 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RequestRetryAfterServerWriteTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RequestRetryAfterServerWriteTests.cs @@ -2,11 +2,11 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Data.Services.DataContext; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// A retried request whose id the ring holds with the same trigger and input replays the result recorded for it, diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RevisionTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RevisionTests.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RevisionTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RevisionTests.cs index 8a2da1bcf..9bda5ac48 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/RevisionTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RevisionTests.cs @@ -11,11 +11,11 @@ using Trax.Effect.Data.Testing; using Trax.Effect.Enums; using Trax.Effect.Extensions; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// Every write to a machine instance bumps its revision by exactly one, because the database does the bump: a diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ServerRecordTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/ServerRecordTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ServerRecordTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/ServerRecordTests.cs index dba0d4e5e..72fe465db 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ServerRecordTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/ServerRecordTests.cs @@ -1,10 +1,10 @@ using System.Text.Json.Nodes; using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// A row records whether the server put it in its state (an effect, an invoked train's outcome, a gated event), and diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ServerlessProviderTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/ServerlessProviderTests.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ServerlessProviderTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/ServerlessProviderTests.cs index d34602c7a..631619623 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/ServerlessProviderTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/ServerlessProviderTests.cs @@ -6,9 +6,9 @@ using Trax.Effect.Data.Services.DataContext; using Trax.Effect.Data.Sqlite.Extensions; using Trax.Effect.Extensions; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fakes; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// AddStateMachines on the server-free providers (InMemory, SQLite): the subsystem stores drafts through diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotAdvanceGuardTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotAdvanceGuardTests.cs similarity index 95% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotAdvanceGuardTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotAdvanceGuardTests.cs index a064374cf..9df5ba8f5 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotAdvanceGuardTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotAdvanceGuardTests.cs @@ -1,11 +1,11 @@ using System.Text.Json.Nodes; using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; public enum LogState { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotChangeListenerTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotChangeListenerTests.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotChangeListenerTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotChangeListenerTests.cs index cf6343566..fa769c8de 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotChangeListenerTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotChangeListenerTests.cs @@ -6,10 +6,10 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Npgsql; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// The host's snapshot change listener on Postgres: one listening session per host whatever the number of diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotChangeNotifyTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotChangeNotifyTests.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotChangeNotifyTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotChangeNotifyTests.cs index d9de8b395..45f7eb6a1 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotChangeNotifyTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotChangeNotifyTests.cs @@ -6,10 +6,10 @@ using Npgsql; using Trax.Effect.Data.Postgres.Utils; using Trax.Effect.Data.Services.DataContext; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// Every committed write of a state-machine row on Postgres sends one notice on the snapshot change channel, diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftExpiryTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotDraftExpiryTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftExpiryTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotDraftExpiryTests.cs index 3b0d64514..b90bf817d 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftExpiryTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotDraftExpiryTests.cs @@ -2,10 +2,10 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Enums; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// Draft expiry belongs to the draft sweep: a draft idle past the configured TTL is deleted by the sweep, with its diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftServiceTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotDraftServiceTests.cs similarity index 95% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftServiceTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotDraftServiceTests.cs index cd5383a05..653b642e2 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftServiceTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotDraftServiceTests.cs @@ -1,9 +1,9 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// The FE-drives / BE-validates operations over the fast (no committed states) turnstile path. public class SnapshotDraftServiceTests diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftServiceTimerTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotDraftServiceTimerTests.cs similarity index 95% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftServiceTimerTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotDraftServiceTimerTests.cs index 226bade84..d1e068d30 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotDraftServiceTimerTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotDraftServiceTimerTests.cs @@ -1,10 +1,10 @@ using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// A timer trigger is fired only by the server when it is due. No advance fires it, whoever asks: a client on the diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotMutationDefectTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotMutationDefectTests.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotMutationDefectTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotMutationDefectTests.cs index 2cf127f5c..c13889ef2 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotMutationDefectTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotMutationDefectTests.cs @@ -1,11 +1,11 @@ using System.Text.Json.Nodes; using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; public enum NoteState { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotOwnerKeyTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotOwnerKeyTests.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotOwnerKeyTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotOwnerKeyTests.cs index 15c8b85d6..d4274379b 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotOwnerKeyTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotOwnerKeyTests.cs @@ -3,11 +3,11 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Models.SnapshotDraft; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// An empty or whitespace user key names no owner. Were it accepted, every caller a host's principal maps to it diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotSelfCheckTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotSelfCheckTests.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotSelfCheckTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotSelfCheckTests.cs index 8b509d758..36d669107 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotSelfCheckTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotSelfCheckTests.cs @@ -1,7 +1,7 @@ using AwesomeAssertions; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fakes; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// The runtime self-check: a machine replays its committed differential corpus through its own engine, and a diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotStoreDefaultMembersTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotStoreDefaultMembersTests.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotStoreDefaultMembersTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotStoreDefaultMembersTests.cs index 1971eee5d..16121d96a 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotStoreDefaultMembersTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotStoreDefaultMembersTests.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// A store written before drafts were keyed by machine implements only the machine-less members. The diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotWatchHubTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotWatchHubTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotWatchHubTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotWatchHubTests.cs index 040fbd51c..1a84c2270 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SnapshotWatchHubTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SnapshotWatchHubTests.cs @@ -1,10 +1,10 @@ using System.Text.Json.Nodes; using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// The host's snapshot watch hub, the seam the push surfaces read: a watcher of a row gets the row as it is, then diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SpawnedChildTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SpawnedChildTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SpawnedChildTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SpawnedChildTests.cs index 27d2e9214..f6e81b234 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SpawnedChildTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SpawnedChildTests.cs @@ -2,10 +2,10 @@ using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Enums; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// A state that spawns a child machine: entering it creates the child for the same owner, the child's end moves the diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SpawnsStartupValidatorTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SpawnsStartupValidatorTests.cs similarity index 95% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SpawnsStartupValidatorTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SpawnsStartupValidatorTests.cs index 0ec83184e..2a0d5c6de 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SpawnsStartupValidatorTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SpawnsStartupValidatorTests.cs @@ -1,9 +1,9 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// The host refuses a spawning state whose child it cannot start or hear from: a child it does not register, one owned diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteRevisionTriggerTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SqliteRevisionTriggerTests.cs similarity index 92% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteRevisionTriggerTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SqliteRevisionTriggerTests.cs index 91d445886..945cdea53 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteRevisionTriggerTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SqliteRevisionTriggerTests.cs @@ -1,8 +1,8 @@ using AwesomeAssertions; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// SQLite's revision trigger (migration 038) numbers every update, and stops after its own write even when the diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteSnapshotChangePollTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SqliteSnapshotChangePollTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteSnapshotChangePollTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SqliteSnapshotChangePollTests.cs index a31ae7b02..746709d8d 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteSnapshotChangePollTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SqliteSnapshotChangePollTests.cs @@ -3,10 +3,10 @@ using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// SQLite has no notifications, so the snapshot change listener polls the table by revision there: every write diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteStoreTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SqliteStoreTests.cs similarity index 95% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteStoreTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SqliteStoreTests.cs index 3a01e69ff..3dcc21418 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SqliteStoreTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SqliteStoreTests.cs @@ -1,8 +1,8 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// The effect-claim and snapshot stores on SQLite, over tables built by the shipped migrations. public class SqliteStoreTests diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/StartTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/StartTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/StartTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/StartTests.cs index 1395b2316..31510fdeb 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/StartTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/StartTests.cs @@ -5,11 +5,11 @@ using Microsoft.Extensions.DependencyInjection; using Npgsql; using Trax.Effect.Data.Services.DataContext; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; using SqliteMigrator = Trax.Effect.Data.Sqlite.Utils.DatabaseMigrator; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// start creates an instance from the machine's declared start input, never from a context the client wrote: diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/StateMachineSelfCheckHealthCheckTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/StateMachineSelfCheckHealthCheckTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/StateMachineSelfCheckHealthCheckTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/StateMachineSelfCheckHealthCheckTests.cs index a3c624f99..93c04b845 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/StateMachineSelfCheckHealthCheckTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/StateMachineSelfCheckHealthCheckTests.cs @@ -1,9 +1,9 @@ using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Diagnostics.HealthChecks; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fakes; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// The self-check exposed as a health check: a deployed build proves it still reproduces every machine's diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SystemOwnedInstanceTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SystemOwnedInstanceTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SystemOwnedInstanceTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SystemOwnedInstanceTests.cs index 209878362..ca5170687 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/SystemOwnedInstanceTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/SystemOwnedInstanceTests.cs @@ -2,10 +2,10 @@ using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Enums; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// Instances the system owns: created only by for a machine that diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerDueAtAnswerTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TimerDueAtAnswerTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerDueAtAnswerTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TimerDueAtAnswerTests.cs index f03a9a093..ca78a4b7f 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerDueAtAnswerTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TimerDueAtAnswerTests.cs @@ -1,9 +1,9 @@ using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// Every answer that carries a snapshot carries the due time its row was left with, beside it: a start, an advance diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerDueAtTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TimerDueAtTests.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerDueAtTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TimerDueAtTests.cs index 3644d5edc..9e230698d 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerDueAtTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TimerDueAtTests.cs @@ -8,10 +8,10 @@ using Trax.Effect.Data.Services.IDataContextFactory; using Trax.Effect.Data.Services.SqlDialect; using Trax.Effect.Enums; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// Where a row's due_at is written and cleared: every path that enters a timed state sets it to the diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerFailureClassificationTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TimerFailureClassificationTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerFailureClassificationTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TimerFailureClassificationTests.cs index 70f01c341..479a238d8 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerFailureClassificationTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TimerFailureClassificationTests.cs @@ -1,7 +1,7 @@ using System.Data.Common; using AwesomeAssertions; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// A timer whose fire throws because the database failed (unreachable, out of resources, shut down, timed out, or a diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerFireConditionTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TimerFireConditionTests.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerFireConditionTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TimerFireConditionTests.cs index 217158912..0582296c7 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerFireConditionTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TimerFireConditionTests.cs @@ -3,10 +3,10 @@ using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Data.Services.IDataContextFactory; using Trax.Effect.Data.Services.SqlDialect; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// A timer's fire is a conditional write on the row's state and revision as the sweep read them, whatever lock the diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerSweepIsolationTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TimerSweepIsolationTests.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerSweepIsolationTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TimerSweepIsolationTests.cs index bba5dcd81..3f3df4ec5 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TimerSweepIsolationTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TimerSweepIsolationTests.cs @@ -2,10 +2,10 @@ using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Enums; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// The due-timer sweep fires each row in a transaction of its own. A row whose fire throws rolls back alone, is diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TransitionHistoryTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TransitionHistoryTests.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TransitionHistoryTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TransitionHistoryTests.cs index 55eaa777d..d33220148 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TransitionHistoryTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TransitionHistoryTests.cs @@ -7,11 +7,11 @@ using Trax.Effect.Data.Testing; using Trax.Effect.Enums; using Trax.Effect.Extensions; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; using SnapshotTransition = Trax.Effect.Models.SnapshotTransition.SnapshotTransition; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// Every write of an instance's snapshot adds exactly one row to its history, with the revision that write gave it, diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Trax.Effect.StateMachine.Persistence.Integration.csproj b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Trax.StateMachine.Persistence.Integration.csproj similarity index 88% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Trax.Effect.StateMachine.Persistence.Integration.csproj rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Trax.StateMachine.Persistence.Integration.csproj index 584007a4a..2098cfe8a 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/Trax.Effect.StateMachine.Persistence.Integration.csproj +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/Trax.StateMachine.Persistence.Integration.csproj @@ -5,7 +5,7 @@ enable false true - Trax.Effect.StateMachine.Persistence.Integration + Trax.StateMachine.Persistence.Integration @@ -27,10 +27,10 @@ - + - + diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TriggerInputValidationPathTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TriggerInputValidationPathTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TriggerInputValidationPathTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TriggerInputValidationPathTests.cs index 1eadb7953..ce9845a56 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/TriggerInputValidationPathTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TriggerInputValidationPathTests.cs @@ -2,11 +2,11 @@ using AwesomeAssertions; using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Enums; -using Trax.Effect.StateMachine.Persistence.Integration.Fakes; -using Trax.Effect.StateMachine.Persistence.Integration.Fixtures; -using Trax.Effect.StateMachine.Persistence.Mutations; +using Trax.StateMachine.Persistence.Integration.Fakes; +using Trax.StateMachine.Persistence.Integration.Fixtures; +using Trax.StateMachine.Persistence.Mutations; -namespace Trax.Effect.StateMachine.Persistence.Integration; +namespace Trax.StateMachine.Persistence.Integration; /// /// A trigger's input is checked against its declared schema on every path that fires a trigger: the draft service, diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/packages.lock.json b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/packages.lock.json similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/packages.lock.json rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/packages.lock.json index 31a99a6eb..a202951c4 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Persistence.Integration/packages.lock.json +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/packages.lock.json @@ -352,13 +352,13 @@ "Trax.Effect.Data": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.statemachine": { "type": "Project", "dependencies": { "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { "Microsoft.EntityFrameworkCore": "[10.0.12, )", @@ -367,14 +367,14 @@ "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, - "trax.effect.statemachine.testing": { + "trax.statemachine.testing": { "type": "Project", "dependencies": { - "Trax.Effect.StateMachine": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "dbup-core": { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fakes/CountingCharge.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/Fakes/CountingCharge.cs similarity index 83% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fakes/CountingCharge.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/Fakes/CountingCharge.cs index c4cfc63d1..0e88126d6 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fakes/CountingCharge.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/Fakes/CountingCharge.cs @@ -1,7 +1,7 @@ -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; -namespace Trax.Effect.StateMachine.Tests.Stress.Fakes; +namespace Trax.StateMachine.Tests.Stress.Fakes; /// /// Counts total deliveries atomically and returns a distinct receipt each time. Shared across a whole fan-out diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fakes/StressOrder.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/Fakes/StressOrder.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fakes/StressOrder.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/Fakes/StressOrder.cs index 0428b2f4f..c313e749f 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fakes/StressOrder.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/Fakes/StressOrder.cs @@ -1,9 +1,9 @@ using System.Text.Json; using System.Text.Json.Nodes; -using Trax.Effect.StateMachine; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine; +using Trax.StateMachine.Persistence; -namespace Trax.Effect.StateMachine.Tests.Stress.Fakes; +namespace Trax.StateMachine.Tests.Stress.Fakes; public enum OrderState { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/StressFixture.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/Fixtures/StressFixture.cs similarity index 95% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/StressFixture.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/Fixtures/StressFixture.cs index 3a33e84d4..2c4e26e11 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/StressFixture.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/Fixtures/StressFixture.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Tests.Stress.Fixtures; +namespace Trax.StateMachine.Tests.Stress.Fixtures; /// /// Base for the stress fixtures: skips at runtime (not via the [Ignore] attribute, so the suite is diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/StressProfile.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/Fixtures/StressProfile.cs similarity index 90% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/StressProfile.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/Fixtures/StressProfile.cs index f41828241..41752a030 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/StressProfile.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/Fixtures/StressProfile.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Tests.Stress.Fixtures; +namespace Trax.StateMachine.Tests.Stress.Fixtures; /// /// Whether the stress suite runs, and the knobs that size it. Off by default (a stress run seeds and drives @@ -7,7 +7,7 @@ namespace Trax.Effect.StateMachine.Tests.Stress.Fixtures; /// /// TRAX_STRESS=1 \ /// TRAX_STRESS_INSTANCES=200 TRAX_STRESS_SENDS=4 \ -/// dotnet test tests/Trax.Effect.StateMachine.Tests.Stress +/// dotnet test tests/Trax.StateMachine.Tests.Stress /// /// internal static class StressProfile @@ -16,7 +16,7 @@ internal static class StressProfile Environment.GetEnvironmentVariable("TRAX_STRESS") is "1" or "true"; public const string SkipReason = - "Stress suite. Run with: TRAX_STRESS=1 dotnet test tests/Trax.Effect.StateMachine.Tests.Stress"; + "Stress suite. Run with: TRAX_STRESS=1 dotnet test tests/Trax.StateMachine.Tests.Stress"; // Exactly-once fan-out. public static int Instances => Env("TRAX_STRESS_INSTANCES", 200); diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/TestPostgres.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/Fixtures/TestPostgres.cs similarity index 88% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/TestPostgres.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/Fixtures/TestPostgres.cs index 97cd098df..23b0742cd 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Fixtures/TestPostgres.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/Fixtures/TestPostgres.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Tests.Stress.Fixtures; +namespace Trax.StateMachine.Tests.Stress.Fixtures; /// /// The port of the test Postgres. TRAX_TEST_PG_PORT overrides it for a machine where another diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ClaimContentionStressTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/IntegrationTests/ClaimContentionStressTests.cs similarity index 94% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ClaimContentionStressTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/IntegrationTests/ClaimContentionStressTests.cs index 170b36adb..30c1cecb5 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ClaimContentionStressTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/IntegrationTests/ClaimContentionStressTests.cs @@ -1,8 +1,8 @@ using AwesomeAssertions; -using Trax.Effect.StateMachine.Persistence; -using Trax.Effect.StateMachine.Tests.Stress.Fixtures; +using Trax.StateMachine.Persistence; +using Trax.StateMachine.Tests.Stress.Fixtures; -namespace Trax.Effect.StateMachine.Tests.Stress.IntegrationTests; +namespace Trax.StateMachine.Tests.Stress.IntegrationTests; /// /// The claim ledger under heavy contention: many keys each stormed by a crowd of claimants, and expired diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ExactlyOnceStressTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/IntegrationTests/ExactlyOnceStressTests.cs similarity index 94% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ExactlyOnceStressTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/IntegrationTests/ExactlyOnceStressTests.cs index 68fb56adc..770c3a393 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ExactlyOnceStressTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/IntegrationTests/ExactlyOnceStressTests.cs @@ -1,10 +1,10 @@ using System.Diagnostics; using AwesomeAssertions; -using Trax.Effect.StateMachine.Persistence; -using Trax.Effect.StateMachine.Tests.Stress.Fakes; -using Trax.Effect.StateMachine.Tests.Stress.Fixtures; +using Trax.StateMachine.Persistence; +using Trax.StateMachine.Tests.Stress.Fakes; +using Trax.StateMachine.Tests.Stress.Fixtures; -namespace Trax.Effect.StateMachine.Tests.Stress.IntegrationTests; +namespace Trax.StateMachine.Tests.Stress.IntegrationTests; /// /// The exactly-once send under real contention at scale: many drafts each raced by several sends, and one diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/RevisionStoreModelTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/IntegrationTests/RevisionStoreModelTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/RevisionStoreModelTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/IntegrationTests/RevisionStoreModelTests.cs index f32f21170..65fc88d22 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/RevisionStoreModelTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/IntegrationTests/RevisionStoreModelTests.cs @@ -3,11 +3,11 @@ using AwesomeAssertions; using CsCheck; using Npgsql; -using Trax.Effect.StateMachine.Persistence; -using Trax.Effect.StateMachine.Tests.Stress.Fakes; -using Trax.Effect.StateMachine.Tests.Stress.Fixtures; +using Trax.StateMachine.Persistence; +using Trax.StateMachine.Tests.Stress.Fakes; +using Trax.StateMachine.Tests.Stress.Fixtures; -namespace Trax.Effect.StateMachine.Tests.Stress.IntegrationTests; +namespace Trax.StateMachine.Tests.Stress.IntegrationTests; /// /// The revision under contention, against on Postgres and an in-memory model of each diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ThroughputStressTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/IntegrationTests/ThroughputStressTests.cs similarity index 92% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ThroughputStressTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/IntegrationTests/ThroughputStressTests.cs index 4dd78bfbd..97e13b862 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/IntegrationTests/ThroughputStressTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/IntegrationTests/ThroughputStressTests.cs @@ -1,10 +1,10 @@ using System.Diagnostics; using AwesomeAssertions; -using Trax.Effect.StateMachine.Persistence; -using Trax.Effect.StateMachine.Tests.Stress.Fakes; -using Trax.Effect.StateMachine.Tests.Stress.Fixtures; +using Trax.StateMachine.Persistence; +using Trax.StateMachine.Tests.Stress.Fakes; +using Trax.StateMachine.Tests.Stress.Fixtures; -namespace Trax.Effect.StateMachine.Tests.Stress.IntegrationTests; +namespace Trax.StateMachine.Tests.Stress.IntegrationTests; /// /// High-volume autosave + advance throughput. This measures the two hot paths (soft autosave and diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/StressDb.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/StressDb.cs similarity index 95% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/StressDb.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/StressDb.cs index 3f6063dfd..5f15acb02 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/StressDb.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/StressDb.cs @@ -6,13 +6,13 @@ using Trax.Effect.Data.Services.IDataContextFactory; using Trax.Effect.Data.Services.SqlDialect; using Trax.Effect.Extensions; -using Trax.Effect.StateMachine.Persistence; -using Trax.Effect.StateMachine.Tests.Stress.Fixtures; +using Trax.StateMachine.Persistence; +using Trax.StateMachine.Tests.Stress.Fixtures; // Root namespace on purpose: a SetUpFixture only wraps its own namespace and descendants. Placed in a child // namespace with no tests, its OneTimeSetUp/TearDown would run back-to-back and drop the database out from // under the tests. (Same reason as the persistence integration suite's PostgresSetup.) -namespace Trax.Effect.StateMachine.Tests.Stress; +namespace Trax.StateMachine.Tests.Stress; /// /// Creates a dedicated throwaway database on the local Trax Postgres for the whole stress run, with a large diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Trax.Effect.StateMachine.Tests.Stress.csproj b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/Trax.StateMachine.Tests.Stress.csproj similarity index 86% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Trax.Effect.StateMachine.Tests.Stress.csproj rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/Trax.StateMachine.Tests.Stress.csproj index 957e43b74..81e6e7733 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/Trax.Effect.StateMachine.Tests.Stress.csproj +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/Trax.StateMachine.Tests.Stress.csproj @@ -5,7 +5,7 @@ enable false true - Trax.Effect.StateMachine.Tests.Stress + Trax.StateMachine.Tests.Stress @@ -27,7 +27,7 @@ - + diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/packages.lock.json b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/packages.lock.json similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/packages.lock.json rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/packages.lock.json index 83ec8ef15..fa55d3931 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests.Stress/packages.lock.json +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Stress/packages.lock.json @@ -260,13 +260,13 @@ "dbup-postgresql": "[7.0.1, )" } }, - "trax.effect.statemachine": { + "trax.statemachine": { "type": "Project", "dependencies": { "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { "Microsoft.EntityFrameworkCore": "[10.0.12, )", @@ -275,7 +275,7 @@ "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, "dbup-core": { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/CheckoutConformanceTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/CheckoutConformanceTests.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/CheckoutConformanceTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/CheckoutConformanceTests.cs index 494db9a6f..dbdbbfe15 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/CheckoutConformanceTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/CheckoutConformanceTests.cs @@ -1,10 +1,10 @@ using System.Text.Json; using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; -using Trax.Effect.StateMachine.Tests.Helpers; +using Trax.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Helpers; -namespace Trax.Effect.StateMachine.Tests.Conformance; +namespace Trax.StateMachine.Tests.Conformance; /// /// Drives the C# checkout engine over the SAME shared checkout fixtures the TypeScript engine drives. diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/ConformanceRunnerTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/ConformanceRunnerTests.cs similarity index 88% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/ConformanceRunnerTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/ConformanceRunnerTests.cs index 6a1a8ace2..0d6cbdf0e 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/ConformanceRunnerTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/ConformanceRunnerTests.cs @@ -1,7 +1,7 @@ using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Helpers; +using Trax.StateMachine.Tests.Helpers; -namespace Trax.Effect.StateMachine.Tests.Conformance; +namespace Trax.StateMachine.Tests.Conformance; /// /// The C# engine through the conformance runner, the same runner and the same cases every other engine is checked diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/ConformanceTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/ConformanceTests.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/ConformanceTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/ConformanceTests.cs index dbfc3073b..ae5580d90 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/ConformanceTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/ConformanceTests.cs @@ -1,10 +1,10 @@ using System.Text.Json; using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; -using Trax.Effect.StateMachine.Tests.Helpers; +using Trax.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Helpers; -namespace Trax.Effect.StateMachine.Tests.Conformance; +namespace Trax.StateMachine.Tests.Conformance; /// /// Drives the C# turnstile engine over the SAME shared fixtures the TypeScript engine drives. If both diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/FixturePathsTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/FixturePathsTests.cs similarity index 82% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/FixturePathsTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/FixturePathsTests.cs index 4dfc66c5b..8e976c941 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/FixturePathsTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/FixturePathsTests.cs @@ -1,7 +1,7 @@ using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Helpers; +using Trax.StateMachine.Tests.Helpers; -namespace Trax.Effect.StateMachine.Tests.Conformance; +namespace Trax.StateMachine.Tests.Conformance; /// /// The conformance tests read Trax.StateMachine/conformance/machines, which is part of the repository. A build that @@ -20,7 +20,9 @@ public void A_directory_with_no_machines_folder_above_it_throws_naming_where_it_ find.Should() .Throw() - .WithMessage($"*{Path.Combine(start, "Trax.StateMachine", "conformance", "machines")}*"); + .WithMessage( + $"*{Path.Combine(start, "Trax.StateMachine", "conformance", "machines")}*" + ); } finally { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/FluentCheckoutTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/FluentCheckoutTests.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/FluentCheckoutTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/FluentCheckoutTests.cs index ca4cc4fb5..635748acf 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/FluentCheckoutTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/FluentCheckoutTests.cs @@ -1,10 +1,10 @@ using System.Text.Json; using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; -using Trax.Effect.StateMachine.Tests.Helpers; +using Trax.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Helpers; -namespace Trax.Effect.StateMachine.Tests.Conformance; +namespace Trax.StateMachine.Tests.Conformance; /// /// Proves the FLUENT authoring surface produces a correct engine: the fluently-built checkout drives the diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/IrFormatParityTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/IrFormatParityTests.cs similarity index 93% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/IrFormatParityTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/IrFormatParityTests.cs index 1b0d81569..9cf7f038d 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/IrFormatParityTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/IrFormatParityTests.cs @@ -1,8 +1,8 @@ using System.Text.RegularExpressions; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Helpers; +using Trax.StateMachine.Tests.Helpers; -namespace Trax.Effect.StateMachine.Tests.Conformance; +namespace Trax.StateMachine.Tests.Conformance; /// /// The IR format is the contract between the IR this engine exports and the TypeScript engine that reads it. A twin diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/IrSchemaTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/IrSchemaTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/IrSchemaTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/IrSchemaTests.cs index d384b6e9e..004f29251 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/IrSchemaTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/IrSchemaTests.cs @@ -1,9 +1,9 @@ using System.Reflection; using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Helpers; +using Trax.StateMachine.Tests.Helpers; -namespace Trax.Effect.StateMachine.Tests.Conformance; +namespace Trax.StateMachine.Tests.Conformance; /// /// conformance/ir.schema.json is the IR's normative shape, which an engine in any language is written against. diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/MigrationGoldenTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/MigrationGoldenTests.cs similarity index 93% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/MigrationGoldenTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/MigrationGoldenTests.cs index 8e9a6c701..b302f7678 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/MigrationGoldenTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/MigrationGoldenTests.cs @@ -1,9 +1,9 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; -using Trax.Effect.StateMachine.Tests.Helpers; +using Trax.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Helpers; -namespace Trax.Effect.StateMachine.Tests.Conformance; +namespace Trax.StateMachine.Tests.Conformance; /// /// Replays the shared migration golden through the real forward-migration path. Where the differential diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/RefusalCodeParityTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/RefusalCodeParityTests.cs similarity index 95% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/RefusalCodeParityTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/RefusalCodeParityTests.cs index a7f51e0a7..ee22792ed 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/RefusalCodeParityTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/RefusalCodeParityTests.cs @@ -2,10 +2,10 @@ using System.Text.Json; using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Persistence; -using Trax.Effect.StateMachine.Tests.Helpers; +using Trax.StateMachine.Persistence; +using Trax.StateMachine.Tests.Helpers; -namespace Trax.Effect.StateMachine.Tests.Conformance; +namespace Trax.StateMachine.Tests.Conformance; /// /// A refusal code is one closed set, , that both engines, the GraphQL schema and the diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/StrictInputGoldenTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/StrictInputGoldenTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/StrictInputGoldenTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/StrictInputGoldenTests.cs index d0f61df43..fb26c102c 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Conformance/StrictInputGoldenTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Conformance/StrictInputGoldenTests.cs @@ -1,10 +1,10 @@ using System.Text; using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; -using Trax.Effect.StateMachine.Tests.Helpers; +using Trax.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Helpers; -namespace Trax.Effect.StateMachine.Tests.Conformance; +namespace Trax.StateMachine.Tests.Conformance; /// /// , written as data any engine replays: the machine's IR and, for each value, diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/DeclarativeTurnstileTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Differential/DeclarativeTurnstileTests.cs similarity index 90% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/DeclarativeTurnstileTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Differential/DeclarativeTurnstileTests.cs index 957251f5c..5a38937d2 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/DeclarativeTurnstileTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Differential/DeclarativeTurnstileTests.cs @@ -1,9 +1,9 @@ using AwesomeAssertions; -using Trax.Effect.StateMachine.Testing; -using Trax.Effect.StateMachine.Tests.Fakes; -using Trax.Effect.StateMachine.Tests.Helpers; +using Trax.StateMachine.Testing; +using Trax.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Helpers; -namespace Trax.Effect.StateMachine.Tests.Differential; +namespace Trax.StateMachine.Tests.Differential; /// /// Proves the declarative authoring surface is behaviourally transparent: a turnstile authored with context diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/DifferentialConformanceTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Differential/DifferentialConformanceTests.cs similarity index 90% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/DifferentialConformanceTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Differential/DifferentialConformanceTests.cs index fd4ae0ea2..71360e144 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/DifferentialConformanceTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Differential/DifferentialConformanceTests.cs @@ -1,9 +1,9 @@ using AwesomeAssertions; -using Trax.Effect.StateMachine.Testing; -using Trax.Effect.StateMachine.Tests.Fakes; -using Trax.Effect.StateMachine.Tests.Helpers; +using Trax.StateMachine.Testing; +using Trax.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Helpers; -namespace Trax.Effect.StateMachine.Tests.Differential; +namespace Trax.StateMachine.Tests.Differential; /// /// Replays the shared, TypeScript-generated differential corpus through the C# engine. TypeScript is the diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/DifferentialCorpusReplayTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Differential/DifferentialCorpusReplayTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/DifferentialCorpusReplayTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Differential/DifferentialCorpusReplayTests.cs index 0c0f15b9c..2f18d2a84 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/DifferentialCorpusReplayTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Differential/DifferentialCorpusReplayTests.cs @@ -1,10 +1,10 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Testing; -using Trax.Effect.StateMachine.Tests.Fakes; -using Trax.Effect.StateMachine.Tests.Helpers; +using Trax.StateMachine.Testing; +using Trax.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Helpers; -namespace Trax.Effect.StateMachine.Tests.Differential; +namespace Trax.StateMachine.Tests.Differential; /// /// Direct unit tests for over an inline corpus, diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/StrictInputParityTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Differential/StrictInputParityTests.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/StrictInputParityTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Differential/StrictInputParityTests.cs index f656df43c..917bed123 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/StrictInputParityTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Differential/StrictInputParityTests.cs @@ -1,9 +1,9 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; -using Trax.Effect.StateMachine.Tests.Helpers; +using Trax.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Helpers; -namespace Trax.Effect.StateMachine.Tests.Differential; +namespace Trax.StateMachine.Tests.Differential; /// /// Every value of sent through the C# engine and through the TypeScript twin diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/TwinSequenceParityTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Differential/TwinSequenceParityTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/TwinSequenceParityTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Differential/TwinSequenceParityTests.cs index 618c9f43b..bdfdd88b3 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Differential/TwinSequenceParityTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Differential/TwinSequenceParityTests.cs @@ -4,10 +4,10 @@ using AwesomeAssertions; using CsCheck; using Ingest.Contracts; -using Trax.Effect.StateMachine.Tests.Fakes; -using Trax.Effect.StateMachine.Tests.Helpers; +using Trax.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Helpers; -namespace Trax.Effect.StateMachine.Tests.Differential; +namespace Trax.StateMachine.Tests.Differential; /// /// Random sequences of events, outcomes and timers, run through the C# engine here and through the TypeScript @@ -16,7 +16,7 @@ namespace Trax.Effect.StateMachine.Tests.Differential; /// at runtime when node, or the engine's installed dependencies, are absent. /// [Property("adr", UnitTests.TriggerInputValidationTests.Adr)] -[Category(Categories.CrossEngine)] +[NUnit.Framework.Category(Categories.CrossEngine)] public class TwinSequenceParityTests { private const string Adr = UnitTests.TriggerInputValidationTests.Adr; diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/ConfiguredMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/ConfiguredMachine.cs similarity index 87% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/ConfiguredMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/ConfiguredMachine.cs index e52bcb68c..7e31056f1 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/ConfiguredMachine.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/ConfiguredMachine.cs @@ -1,6 +1,6 @@ -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; -namespace Trax.Effect.StateMachine.Tests.Fakes; +namespace Trax.StateMachine.Tests.Fakes; /// /// A declared by a configure action, so the same declaration a fake builds diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/DeclarativeCheckout.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/DeclarativeCheckout.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/DeclarativeCheckout.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/DeclarativeCheckout.cs index 0500ec839..036d2c3c5 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/DeclarativeCheckout.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/DeclarativeCheckout.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; -using static Trax.Effect.StateMachine.Rules; +using static Trax.StateMachine.Rules; -namespace Trax.Effect.StateMachine.Tests.Fakes; +namespace Trax.StateMachine.Tests.Fakes; /// /// The checkout authored with the declarative surface, as the committed checkout.ir.json the TypeScript diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/DeclarativeTurnstile.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/DeclarativeTurnstile.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/DeclarativeTurnstile.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/DeclarativeTurnstile.cs index 40ae432a7..24bcd9b68 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/DeclarativeTurnstile.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/DeclarativeTurnstile.cs @@ -1,8 +1,8 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json.Nodes; -using static Trax.Effect.StateMachine.Rules; +using static Trax.StateMachine.Rules; -namespace Trax.Effect.StateMachine.Tests.Fakes; +namespace Trax.StateMachine.Tests.Fakes; /// /// The turnstile authored with the DECLARATIVE, string-free surface: context records (schema + constraints), diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/FaultyMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/FaultyMachine.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/FaultyMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/FaultyMachine.cs index 503ff47f4..c711afbf3 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/FaultyMachine.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/FaultyMachine.cs @@ -1,7 +1,7 @@ using System.Text.Json; using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine.Tests.Fakes; +namespace Trax.StateMachine.Tests.Fakes; public enum FaultyState { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/FluentCheckout.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/FluentCheckout.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/FluentCheckout.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/FluentCheckout.cs index faaf84aa8..f5af9c733 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/FluentCheckout.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/FluentCheckout.cs @@ -1,7 +1,7 @@ using System.Text.Json; using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine.Tests.Fakes; +namespace Trax.StateMachine.Tests.Fakes; /// A marker for the checkout's one irreversible effect (resolved from DI in a real host). public interface ICheckoutCharge { } diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/GaugeMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/GaugeMachine.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/GaugeMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/GaugeMachine.cs index 8c3229231..6fcfc7723 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/GaugeMachine.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/GaugeMachine.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; -using static Trax.Effect.StateMachine.Rules; +using static Trax.StateMachine.Rules; -namespace Trax.Effect.StateMachine.Tests.Fakes; +namespace Trax.StateMachine.Tests.Fakes; public enum GaugeState { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/IngestContracts.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/IngestContracts.cs similarity index 100% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/IngestContracts.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/IngestContracts.cs diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/IngestMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/IngestMachine.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/IngestMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/IngestMachine.cs index 2cdab5f6b..d19b658d0 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/IngestMachine.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/IngestMachine.cs @@ -1,9 +1,9 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json.Nodes; using Ingest.Contracts; -using static Trax.Effect.StateMachine.Rules; +using static Trax.StateMachine.Rules; -namespace Trax.Effect.StateMachine.Tests.Fakes; +namespace Trax.StateMachine.Tests.Fakes; public enum IngestState { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/RangeMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/RangeMachine.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/RangeMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/RangeMachine.cs index 829a7ca9b..fbe6b2c6e 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/RangeMachine.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/RangeMachine.cs @@ -1,8 +1,8 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json.Nodes; -using static Trax.Effect.StateMachine.Rules; +using static Trax.StateMachine.Rules; -namespace Trax.Effect.StateMachine.Tests.Fakes; +namespace Trax.StateMachine.Tests.Fakes; public enum RangeState { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/ReminderMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/ReminderMachine.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/ReminderMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/ReminderMachine.cs index 23276273f..fef403981 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/ReminderMachine.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/ReminderMachine.cs @@ -1,6 +1,6 @@ using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine.Tests.Fakes; +namespace Trax.StateMachine.Tests.Fakes; public enum ReminderState { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/RichExportMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/RichExportMachine.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/RichExportMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/RichExportMachine.cs index 19a7737e0..4f8d4e246 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/RichExportMachine.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/RichExportMachine.cs @@ -1,8 +1,8 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json.Nodes; -using static Trax.Effect.StateMachine.Rules; +using static Trax.StateMachine.Rules; -namespace Trax.Effect.StateMachine.Tests.Fakes; +namespace Trax.StateMachine.Tests.Fakes; /// /// A machine authored only to exercise the IR exporter across every rule kind, reducer kind, comparison diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/StrictInputMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/StrictInputMachine.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/StrictInputMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/StrictInputMachine.cs index d38ae1d9f..c1155caeb 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/StrictInputMachine.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/StrictInputMachine.cs @@ -1,8 +1,8 @@ using System.Text.Json.Nodes; using System.Text.Json.Serialization; -using Trax.Effect.StateMachine.Tests.Helpers; +using Trax.StateMachine.Tests.Helpers; -namespace Trax.Effect.StateMachine.Tests.Fakes; +namespace Trax.StateMachine.Tests.Fakes; public enum StrictState { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/TestCheckout.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/TestCheckout.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/TestCheckout.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/TestCheckout.cs index 5a6c19be2..0f4459520 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/TestCheckout.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/TestCheckout.cs @@ -1,7 +1,7 @@ using System.Text.Json; using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine.Tests.Fakes; +namespace Trax.StateMachine.Tests.Fakes; public enum CheckoutState { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/TestTurnstile.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/TestTurnstile.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/TestTurnstile.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/TestTurnstile.cs index 88dcb991c..fdc337fd5 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/TestTurnstile.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/TestTurnstile.cs @@ -1,7 +1,7 @@ using System.Text.Json; using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine.Tests.Fakes; +namespace Trax.StateMachine.Tests.Fakes; public enum TurnstileState { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/TestTurnstileV2.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/TestTurnstileV2.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/TestTurnstileV2.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/TestTurnstileV2.cs index d78ceca56..479720912 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/TestTurnstileV2.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/TestTurnstileV2.cs @@ -1,7 +1,7 @@ using System.Text.Json; using System.Text.Json.Nodes; -namespace Trax.Effect.StateMachine.Tests.Fakes; +namespace Trax.StateMachine.Tests.Fakes; /// /// A version-2 turnstile used to exercise forward migration on rehydrate: a stored v1 snapshot is diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/WaitMachine.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/WaitMachine.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/WaitMachine.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/WaitMachine.cs index f9138b6eb..2f090d8f9 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Fakes/WaitMachine.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Fakes/WaitMachine.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; using Ingest.Contracts; -namespace Trax.Effect.StateMachine.Tests.Fakes; +namespace Trax.StateMachine.Tests.Fakes; public enum WaitState { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/Categories.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Helpers/Categories.cs similarity index 91% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/Categories.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Helpers/Categories.cs index 353ebb72b..f1274058c 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/Categories.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Helpers/Categories.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Tests.Helpers; +namespace Trax.StateMachine.Tests.Helpers; /// The test categories CI selects on. public static class Categories diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/ConformanceTestee.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Helpers/ConformanceTestee.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/ConformanceTestee.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Helpers/ConformanceTestee.cs index afa0ab145..0e97cf47a 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/ConformanceTestee.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Helpers/ConformanceTestee.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; -using Trax.Effect.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Fakes; -namespace Trax.Effect.StateMachine.Tests.Helpers; +namespace Trax.StateMachine.Tests.Helpers; /// /// The C# engine as a conformance testee (Trax.StateMachine/conformance/PROTOCOL.md). It cannot build a diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/FixturePaths.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Helpers/FixturePaths.cs similarity index 93% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/FixturePaths.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Helpers/FixturePaths.cs index 38f300f4f..e2a7a9329 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/FixturePaths.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Helpers/FixturePaths.cs @@ -1,4 +1,4 @@ -namespace Trax.Effect.StateMachine.Tests.Helpers; +namespace Trax.StateMachine.Tests.Helpers; /// /// Locates the shared, language-neutral fixtures in Trax.StateMachine/conformance/machines, which both engines @@ -55,7 +55,12 @@ public static string Find(string start) var dir = new DirectoryInfo(start); while (dir is not null) { - var candidate = Path.Combine(dir.FullName, "Trax.StateMachine", "conformance", "machines"); + var candidate = Path.Combine( + dir.FullName, + "Trax.StateMachine", + "conformance", + "machines" + ); if (Directory.Exists(Path.Combine(candidate, "turnstile", "fixtures"))) return candidate; searched.Add(candidate); diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/TwinEngine.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Helpers/TwinEngine.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/TwinEngine.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Helpers/TwinEngine.cs index 66ff5e0b4..21731fa9f 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/TwinEngine.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Helpers/TwinEngine.cs @@ -3,7 +3,7 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -namespace Trax.Effect.StateMachine.Tests.Helpers; +namespace Trax.StateMachine.Tests.Helpers; /// /// The TypeScript twin, run from a C# test: Trax.StateMachine/ts/tools/replay-sequences.mjs bundles the diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/TypedSurfaceJson.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Helpers/TypedSurfaceJson.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/TypedSurfaceJson.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Helpers/TypedSurfaceJson.cs index 1b2205039..d283363bf 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Helpers/TypedSurfaceJson.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Helpers/TypedSurfaceJson.cs @@ -3,7 +3,7 @@ using System.Text.Json.Serialization; using System.Text.Json.Serialization.Metadata; -namespace Trax.Effect.StateMachine.Tests.Helpers; +namespace Trax.StateMachine.Tests.Helpers; /// /// The CLR's verdict on a machine record's JSON: whether the typed surface reads it into the record, and whether what diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Trax.Effect.StateMachine.Tests.csproj b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Trax.StateMachine.Tests.csproj similarity index 76% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Trax.Effect.StateMachine.Tests.csproj rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Trax.StateMachine.Tests.csproj index c2a22ae4a..7c78e97fe 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/Trax.Effect.StateMachine.Tests.csproj +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/Trax.StateMachine.Tests.csproj @@ -5,7 +5,7 @@ enable false true - Trax.Effect.StateMachine.Tests + Trax.StateMachine.Tests @@ -25,7 +25,7 @@ - - + + diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/AdvanceTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/AdvanceTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/AdvanceTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/AdvanceTests.cs index edeaba47f..2ac52c4f8 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/AdvanceTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/AdvanceTests.cs @@ -1,8 +1,8 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Fakes; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; public class AdvanceTests { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/CanonicalizationConformanceTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/CanonicalizationConformanceTests.cs similarity index 94% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/CanonicalizationConformanceTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/CanonicalizationConformanceTests.cs index dd10e1382..86110bd25 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/CanonicalizationConformanceTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/CanonicalizationConformanceTests.cs @@ -1,9 +1,9 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; -using Trax.Effect.StateMachine.Tests.Helpers; +using Trax.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Helpers; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// The canonical wire must match RFC 8785 (JCS) byte-for-byte, which for numbers and strings means matching diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/ClientManifestTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/ClientManifestTests.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/ClientManifestTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/ClientManifestTests.cs index 50a390e63..2da7f52e8 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/ClientManifestTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/ClientManifestTests.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// The client manifest is the file a host exports and trax client reads: the contract between Trax.Api, which diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/ComparisonRefusalTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/ComparisonRefusalTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/ComparisonRefusalTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/ComparisonRefusalTests.cs index efa846122..97579eea1 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/ComparisonRefusalTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/ComparisonRefusalTests.cs @@ -1,9 +1,9 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine.Tests.Fakes; +using static Trax.StateMachine.Rules; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// A comparison that could never hold is refused before it runs: one on a field whose schema type is not a number diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/DeclarativeAuthoringDefectTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/DeclarativeAuthoringDefectTests.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/DeclarativeAuthoringDefectTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/DeclarativeAuthoringDefectTests.cs index 10abcaed5..7d635dac2 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/DeclarativeAuthoringDefectTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/DeclarativeAuthoringDefectTests.cs @@ -4,7 +4,7 @@ using AwesomeAssertions; using AwesomeAssertions.Execution; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// Declarative authoring promises that a context record yields its schema for free and that a diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/DifferentialAuthoringTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/DifferentialAuthoringTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/DifferentialAuthoringTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/DifferentialAuthoringTests.cs index 5f4068f9c..948b1ccca 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/DifferentialAuthoringTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/DifferentialAuthoringTests.cs @@ -1,9 +1,9 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine.Tests.Fakes; +using static Trax.StateMachine.Rules; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// The .Differential(...) authoring surface and its IR export: every input kind (typed and raw diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/DifferentialBuilderTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/DifferentialBuilderTests.cs similarity index 94% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/DifferentialBuilderTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/DifferentialBuilderTests.cs index 2c52124ae..f300b2bb5 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/DifferentialBuilderTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/DifferentialBuilderTests.cs @@ -1,8 +1,8 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Fakes; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// What the differential builder's Sample writes into the corpus: a typed input's enum field must diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineContractTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/EngineContractTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineContractTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/EngineContractTests.cs index 894e043ff..ef6d6206c 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineContractTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/EngineContractTests.cs @@ -1,10 +1,10 @@ using System.Text.Json.Nodes; using AwesomeAssertions; using Ingest.Contracts; -using Trax.Effect.StateMachine.Testing; -using Trax.Effect.StateMachine.Tests.Fakes; +using Trax.StateMachine.Testing; +using Trax.StateMachine.Tests.Fakes; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// One engine contract, the C# half: Advance takes only the triggers a caller sends. An invoked train's diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineDefensiveTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/EngineDefensiveTests.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineDefensiveTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/EngineDefensiveTests.cs index ea23c4697..4d91d6fbb 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineDefensiveTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/EngineDefensiveTests.cs @@ -1,8 +1,8 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Fakes; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// Covers the engine's reachable-but-easily-missed defensive paths: the rehydrate totality backstop diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineParityDefectTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/EngineParityDefectTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineParityDefectTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/EngineParityDefectTests.cs index 780bbcd26..2891b49ed 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/EngineParityDefectTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/EngineParityDefectTests.cs @@ -1,9 +1,9 @@ using System.Text.Json; using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Fakes; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// Places where the C# engine accepts or emits something the TypeScript twin does not, so the two runtimes diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/EventWriteRuleTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/EventWriteRuleTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/EventWriteRuleTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/EventWriteRuleTests.cs index ae1f92559..4b6588847 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/EventWriteRuleTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/EventWriteRuleTests.cs @@ -1,10 +1,10 @@ using System.Text.Json.Nodes; using AwesomeAssertions; using Ingest.Contracts; -using Trax.Effect.StateMachine.Tests.Fakes; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine.Tests.Fakes; +using static Trax.StateMachine.Rules; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// A field the server writes, by an event gated by a role or a policy, an effect's receipt or an invoked train's diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/IntrospectionTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/IntrospectionTests.cs similarity index 93% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/IntrospectionTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/IntrospectionTests.cs index c608bf781..4555e6869 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/IntrospectionTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/IntrospectionTests.cs @@ -1,8 +1,8 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Fakes; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// CanFire/AvailableTriggers drive UI enablement, and Describe is the structure @@ -74,7 +74,7 @@ public void Describe_emits_the_sorted_structure() [Test] public void The_trigger_list_names_the_timer_with_kind_Timer_and_no_input() { - Trax.Effect.StateMachine.Persistence.IMachine reminder = ReminderMachine.AsMachine(); + Trax.StateMachine.Persistence.IMachine reminder = ReminderMachine.AsMachine(); reminder .Triggers.Should() diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/InvokesDeclarationTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/InvokesDeclarationTests.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/InvokesDeclarationTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/InvokesDeclarationTests.cs index ab14fde74..20c2e0af3 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/InvokesDeclarationTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/InvokesDeclarationTests.cs @@ -2,11 +2,11 @@ using AwesomeAssertions; using Ingest.Contracts; using Trax.Effect.Models.Metadata; -using Trax.Effect.StateMachine.Tests.Fakes; -using Trax.Effect.StateMachine.Tests.Helpers; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Helpers; +using static Trax.StateMachine.Rules; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// A state that invokes a train (central ADR 0046), the pure half: what the builder accepts and refuses, how an diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/IrExporterTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/IrExporterTests.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/IrExporterTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/IrExporterTests.cs index fcb9fa6ff..a05689ed2 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/IrExporterTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/IrExporterTests.cs @@ -1,8 +1,8 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Fakes; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// The IR exporter turns a declaratively-authored machine into the neutral IR. This verifies the IR carries diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/MachineBuilderTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/MachineBuilderTests.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/MachineBuilderTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/MachineBuilderTests.cs index 42043ac85..7f62958f9 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/MachineBuilderTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/MachineBuilderTests.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// Direct coverage of the fluent builder's branches the checkout machine does not exercise: the two diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/MachineInstanceIdTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/MachineInstanceIdTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/MachineInstanceIdTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/MachineInstanceIdTests.cs index 14045cfab..043941550 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/MachineInstanceIdTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/MachineInstanceIdTests.cs @@ -1,7 +1,7 @@ using AwesomeAssertions; -using Trax.Effect.StateMachine.Persistence; +using Trax.StateMachine.Persistence; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// A system-owned instance's id is the UUIDv5 of its machine's fixed namespace and an injective encoding of its diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/MigrationTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/MigrationTests.cs similarity index 93% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/MigrationTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/MigrationTests.cs index 02f7bb4f1..1b732cda7 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/MigrationTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/MigrationTests.cs @@ -1,7 +1,7 @@ using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Fakes; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; public class MigrationTests { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/ReductionEvaluatorTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/ReductionEvaluatorTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/ReductionEvaluatorTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/ReductionEvaluatorTests.cs index e71be3a73..b0d3fc459 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/ReductionEvaluatorTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/ReductionEvaluatorTests.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// The declarative reducer vocabulary produces a transition's destination context. Each shape is pinned: diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RefusalPrecedenceTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/RefusalPrecedenceTests.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RefusalPrecedenceTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/RefusalPrecedenceTests.cs index f5e6e0f92..85fcbaf60 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RefusalPrecedenceTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/RefusalPrecedenceTests.cs @@ -1,8 +1,8 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Fakes; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// Which refusal wins when an advance breaks several rules at once: no edge from the state comes before a bad diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RehydrateTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/RehydrateTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RehydrateTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/RehydrateTests.cs index 1f02b2e87..50b561f45 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RehydrateTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/RehydrateTests.cs @@ -1,7 +1,7 @@ using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Fakes; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; public class RehydrateTests { diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RuleEvaluatorTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/RuleEvaluatorTests.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RuleEvaluatorTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/RuleEvaluatorTests.cs index 9cdd1e49e..2522ed027 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RuleEvaluatorTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/RuleEvaluatorTests.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// The declarative vocabulary is the shared semantics the runtime, the IR, and the diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RulesTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/RulesTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RulesTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/RulesTests.cs index 6941660b7..c3757cd68 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RulesTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/RulesTests.cs @@ -1,8 +1,8 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using static Trax.Effect.StateMachine.Rules; +using static Trax.StateMachine.Rules; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// The ergonomic authoring helpers must build exactly the / data diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RulesVocabularyTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/RulesVocabularyTests.cs similarity index 93% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RulesVocabularyTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/RulesVocabularyTests.cs index 36b6901c6..c0d6a2f71 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/RulesVocabularyTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/RulesVocabularyTests.cs @@ -1,10 +1,10 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; -using Trax.Effect.StateMachine.Tests.Helpers; -using static Trax.Effect.StateMachine.Rules; +using Trax.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Helpers; +using static Trax.StateMachine.Rules; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// The numeric comparisons beyond GreaterThan and EqualTo: each builds the diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaFormatTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/SchemaFormatTests.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaFormatTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/SchemaFormatTests.cs index 6883c1361..aafa46b99 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaFormatTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/SchemaFormatTests.cs @@ -2,9 +2,9 @@ using System.Text.Json.Nodes; using AwesomeAssertions; using CsCheck; -using Trax.Effect.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Fakes; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// A string field is as strict as its CLR type: an enum exports its names and refuses any other, a Guid, a date, diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaStrictnessTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/SchemaStrictnessTests.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaStrictnessTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/SchemaStrictnessTests.cs index ff813af0a..747ddc66d 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaStrictnessTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/SchemaStrictnessTests.cs @@ -1,8 +1,8 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Fakes; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// The exported schema is as strict as the CLR type: an integer field carries its CLR type's range, the values of diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaValidatorTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/SchemaValidatorTests.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaValidatorTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/SchemaValidatorTests.cs index 7bec8edcb..5699581ba 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SchemaValidatorTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/SchemaValidatorTests.cs @@ -2,7 +2,7 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// The schema-derived validator: every non-nullable field present and correctly typed, no fields outside the diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SerializationRoundTripTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/SerializationRoundTripTests.cs similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SerializationRoundTripTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/SerializationRoundTripTests.cs index 336474040..3ca28eb69 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SerializationRoundTripTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/SerializationRoundTripTests.cs @@ -1,8 +1,8 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Fakes; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// The serialized bytes are a contract: the envelope is in fixed order (machine, version, state, diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SpawnDeclarationTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/SpawnDeclarationTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SpawnDeclarationTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/SpawnDeclarationTests.cs index 20205753d..118174dcc 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/SpawnDeclarationTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/SpawnDeclarationTests.cs @@ -1,8 +1,8 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using static Trax.Effect.StateMachine.Rules; +using static Trax.StateMachine.Rules; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// A state that spawns a child machine, the pure half: the builder records it as an invoking state whose outcomes diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/StateInvariantTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/StateInvariantTests.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/StateInvariantTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/StateInvariantTests.cs index 993279c9e..042b0e2a0 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/StateInvariantTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/StateInvariantTests.cs @@ -1,8 +1,8 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using static Trax.Effect.StateMachine.Rules; +using static Trax.StateMachine.Rules; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// A state's declarative validator is its context schema AND its .Requires(...) policy, composed. This diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/StorableJsonTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/StorableJsonTests.cs similarity index 95% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/StorableJsonTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/StorableJsonTests.cs index 176f440a9..25240c846 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/StorableJsonTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/StorableJsonTests.cs @@ -1,8 +1,8 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Fakes; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// A snapshot the engine accepts must have a canonical wire and must be storable, so Rehydrate refuses diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TimerDeclarationTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/TimerDeclarationTests.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TimerDeclarationTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/TimerDeclarationTests.cs index 4bdddb687..6cc51a90d 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TimerDeclarationTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/TimerDeclarationTests.cs @@ -5,10 +5,10 @@ using Ingest.Contracts; using Microsoft.Extensions.DependencyInjection; using Trax.Effect.Attributes; -using Trax.Effect.StateMachine.Persistence; -using Trax.Effect.StateMachine.Tests.Fakes; +using Trax.StateMachine.Persistence; +using Trax.StateMachine.Tests.Fakes; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// A state's timer, the pure half: what the builder accepts and refuses, how the timer and the states around it diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TotalityTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/TotalityTests.cs similarity index 96% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TotalityTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/TotalityTests.cs index a21538887..696eb53a0 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TotalityTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/TotalityTests.cs @@ -1,8 +1,8 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Fakes; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// Totality is everywhere or nowhere: feed the engine arbitrary garbage and assert it never throws, diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerInputPropertyTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/TriggerInputPropertyTests.cs similarity index 98% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerInputPropertyTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/TriggerInputPropertyTests.cs index d933e8328..f176248d7 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerInputPropertyTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/TriggerInputPropertyTests.cs @@ -1,10 +1,10 @@ using System.Text.Json.Nodes; using AwesomeAssertions; using CsCheck; -using Trax.Effect.StateMachine.Tests.Fakes; -using Trax.Effect.StateMachine.Tests.Helpers; +using Trax.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Helpers; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// Generated inputs for a trigger with a declared input record: a valid , diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerInputValidationTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/TriggerInputValidationTests.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerInputValidationTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/TriggerInputValidationTests.cs index 574fa071c..363767949 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerInputValidationTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/TriggerInputValidationTests.cs @@ -1,9 +1,9 @@ using System.Text.Json.Nodes; using System.Text.Json.Serialization; using AwesomeAssertions; -using Trax.Effect.StateMachine.Tests.Fakes; +using Trax.StateMachine.Tests.Fakes; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// The engine checks a trigger's input against the schema its WithInput record declares before any guard diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerMetadataTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/TriggerMetadataTests.cs similarity index 95% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerMetadataTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/TriggerMetadataTests.cs index 023a669b5..8cfdebf05 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TriggerMetadataTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/TriggerMetadataTests.cs @@ -1,9 +1,9 @@ using System.Text.Json.Nodes; using AwesomeAssertions; -using Trax.Effect.StateMachine.Persistence; -using Trax.Effect.StateMachine.Tests.Fakes; +using Trax.StateMachine.Persistence; +using Trax.StateMachine.Tests.Fakes; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// A machine lists every trigger it declares with its kind (who may fire it) and its input type, and the IR keeps diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TypedSchemaTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/TypedSchemaTests.cs similarity index 99% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TypedSchemaTests.cs rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/TypedSchemaTests.cs index 77876d069..70f3942e4 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/UnitTests/TypedSchemaTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/UnitTests/TypedSchemaTests.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using AwesomeAssertions; -namespace Trax.Effect.StateMachine.Tests.UnitTests; +namespace Trax.StateMachine.Tests.UnitTests; /// /// The typed authoring layer: a member expression resolves to the JSON field name it maps to, and a context diff --git a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/packages.lock.json b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/packages.lock.json similarity index 97% rename from Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/packages.lock.json rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/packages.lock.json index 02922b522..ba4717128 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/packages.lock.json +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/packages.lock.json @@ -228,13 +228,13 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine": { + "trax.statemachine": { "type": "Project", "dependencies": { "Trax.Effect": "[1.99.99, )" } }, - "trax.effect.statemachine.persistence": { + "trax.statemachine.persistence": { "type": "Project", "dependencies": { "Microsoft.EntityFrameworkCore": "[10.0.12, )", @@ -243,14 +243,14 @@ "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", "Trax.Effect": "[1.99.99, )", "Trax.Effect.Data": "[1.99.99, )", - "Trax.Effect.StateMachine": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )" } }, - "trax.effect.statemachine.testing": { + "trax.statemachine.testing": { "type": "Project", "dependencies": { - "Trax.Effect.StateMachine": "[1.99.99, )", - "Trax.Effect.StateMachine.Persistence": "[1.99.99, )" + "Trax.StateMachine": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" } }, "Microsoft.EntityFrameworkCore": { diff --git a/Trax.StateMachine/ts/AGENTS.md b/Trax.StateMachine/ts/AGENTS.md index 40841b4e3..54523afb0 100644 --- a/Trax.StateMachine/ts/AGENTS.md +++ b/Trax.StateMachine/ts/AGENTS.md @@ -1,6 +1,6 @@ # Trax.Api.StateMachine -`@traxsharp/state-machine` on npm: the TypeScript twin of `Trax.Effect.StateMachine`, the client a page drives a +`@traxsharp/state-machine` on npm: the TypeScript twin of `Trax.StateMachine`, the client a page drives a served machine through, and the generators `trax machine generate` runs. It is its own npm project, not a .NET folder, and releases with every Trax release at the same version (`Trax.Docs/adr/0042`). diff --git a/Trax.StateMachine/ts/README.md b/Trax.StateMachine/ts/README.md index cf94e66f8..5f8d148f4 100644 --- a/Trax.StateMachine/ts/README.md +++ b/Trax.StateMachine/ts/README.md @@ -7,7 +7,7 @@ > Part of [Trax .NET](https://github.com/TraxSharp): business logic you can call, schedule, or serve as an API, with every > run recorded in your Postgres. [Docs](https://traxsharp.net/docs) · [Getting started](https://traxsharp.net/docs/getting-started) · [Repository](https://github.com/TraxSharp/Trax) -The TypeScript twin of `Trax.Effect.StateMachine`. A machine is declared once in C#; the twin generated from it runs +The TypeScript twin of `Trax.StateMachine`. A machine is declared once in C#; the twin generated from it runs the same rules in the browser, so a page can show what an event will do before the server, which applies every transition, answers. It also holds the client a page uses to drive a machine a Trax host serves, and its React hooks. diff --git a/Trax.StateMachine/ts/docs/design/phase0-codegen-scope.md b/Trax.StateMachine/ts/docs/design/phase0-codegen-scope.md index 11407028b..9c0c215fb 100644 --- a/Trax.StateMachine/ts/docs/design/phase0-codegen-scope.md +++ b/Trax.StateMachine/ts/docs/design/phase0-codegen-scope.md @@ -51,7 +51,7 @@ per language runs them. Consequences: ### What is built (Increment A: C# authoring -> IR) -In `Trax.StateMachine/dotnet/src/Trax.Effect.StateMachine/Rules/`: +In `Trax.StateMachine/dotnet/src/Trax.StateMachine/Rules/`: - `Rule.cs` + `RuleEvaluator.cs` (guard/validator vocabulary as data + a total evaluator). - `Reduction.cs` + `ReductionEvaluator.cs` (reducer vocabulary + non-mutating evaluator). - `MemberPath.cs`, `ContextSchema.cs`, `SchemaReflection.cs`, `SchemaValidator.cs` (typed layer: member @@ -113,7 +113,7 @@ Ordered by priority as it was written then (E before D; see §5 and Decision D): - **Schema validation is stricter than the old twins:** `SchemaValidator` enforces `additionalProperties: false` (matching `machine.json`'s intent and the C# side). A v2 that adds a field needs its own validator (see how `migration.test.ts` overrides the v2 `Unlocked` validator). -- **Run the suites:** C# `dotnet test Trax.StateMachine/dotnet/tests/Trax.Effect.StateMachine.Tests/...`; TS +- **Run the suites:** C# `dotnet test Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests/...`; TS `cd Trax.Api.StateMachine && npx vitest run` and `npx tsc --noEmit`. ## 1. The baseline this plan started from (grounded, 2026-08-11) @@ -313,7 +313,7 @@ export is C# (`IrExporter.Export`), but the twin generators (`generateContextTyp and the pre-D corpus enumerator (`enumerate`) are TypeScript, in the engine's `src/rules/`. So `generate` is a C# **orchestrator** that crosses the runtime boundary explicitly: -- **IR, in-process C#.** The CLI references `Trax.Effect.StateMachine.Persistence`, loads the consumer's +- **IR, in-process C#.** The CLI references `Trax.StateMachine.Persistence`, loads the consumer's already-compiled assembly, reflects the machine out of it (`MachineLoader`), calls `IMachine.ExportIr()` (which is `IrExporter.Export` on the built machine), and writes `.ir.json` to `--ir-out`. It compiles nothing, and no Node is involved. @@ -401,7 +401,7 @@ against `describe()`, and retiring it (or regenerating it from the IR) is the on consuming repo mirrors the TypeScript engine `src` at a pinned upstream commit (recorded in `VENDORED.md`) and imports it through a path alias (`@traxsharp/state-machine`), and commits the generated twin, the IR, and the differential corpus into its own tree (twin next to the frontend, IR + corpus in a shared `machines//` - dir). The C# side consumes Trax by exact-pinned NuGet (`Trax.Effect.StateMachine`). Rationale: the engine and + dir). The C# side consumes Trax by exact-pinned NuGet (`Trax.StateMachine`). Rationale: the engine and machines co-evolve tightly, the twin must build against an arbitrary engine `src` (not a fixed package layout), and checking the corpus into the consumer's tree is what makes the differential run in *its* CI (closing the upstream skip-on-missing hole, RFC §7). Cost: a manual re-vendor step (bump the pin, re-copy @@ -424,7 +424,7 @@ against `describe()`, and retiring it (or regenerating it from the IR) is the on Smallest verifiable slice that de-risks the whole effort. Concretely: -- A `Trax.Effect.StateMachine` **context-schema** type set (per-state field list: name, JSON type, +- A `Trax.StateMachine` **context-schema** type set (per-state field list: name, JSON type, nullable, optional enum) and a **rule** type set for the §3 vocabulary, both plain data. - Fluent surface: `.Holds(...)` / `.When(...)` overloads that accept a rule (or a `named("promoValid")` custom handler) and record it as data on the built model, alongside the existing delegate path (so nothing @@ -444,7 +444,7 @@ Smallest verifiable slice that de-risks the whole effort. Concretely: 4. No-regression: the existing turnstile engine/differential/serialization suites stay green (the declarative re-author must not change behavior). -Increment A touches only `Trax.Effect.StateMachine` (+ its tests) and adds one IR golden fixture. It does not +Increment A touches only `Trax.StateMachine` (+ its tests) and adds one IR golden fixture. It does not require the generator, the C# target, or the oracle flip, so it is a clean, self-contained first PR that answers the one question everything else depends on: can C# author and export the declarative layer as data. @@ -462,7 +462,7 @@ escape hatch for the ~8%: The vocabulary is a set of static factory helpers, imported with `using static` so the author writes them bare. This section is the design sketch that preceded Increment A; the shipped helpers are in -`Trax.Effect.StateMachine/Rules/Rules.cs` and read slightly differently (`Input((CoinInput i) => i.Coin) +`Trax.StateMachine/Rules/Rules.cs` and read slightly differently (`Input((CoinInput i) => i.Coin) .IsOneOf(...)`, and the machine id is declared with `m.Id("turnstile")` rather than derived from the class name), but the shape below is what landed: diff --git a/Trax.StateMachine/ts/docs/design/tier1-machine-codegen.md b/Trax.StateMachine/ts/docs/design/tier1-machine-codegen.md index 382aa2f5f..fc37e7a94 100644 --- a/Trax.StateMachine/ts/docs/design/tier1-machine-codegen.md +++ b/Trax.StateMachine/ts/docs/design/tier1-machine-codegen.md @@ -323,7 +323,7 @@ commit and checks the generated artifacts into its own tree.** Concretely, in th - The generated **twin** (`.contexts.g.ts` + `.machine.g.ts`) lives next to the frontend that consumes it (`apps/web/src/app//`). The **IR** and the differential **corpus** live in a shared per-machine directory (`libs/shared/statemachine/machines//`). All of it is committed. -- The C# side consumes Trax by NuGet package (`Trax.Effect.StateMachine`), pinned to an exact version. +- The C# side consumes Trax by NuGet package (`Trax.StateMachine`), pinned to an exact version. Why vendoring rather than a published npm package: the engine and the machines co-evolve tightly, the frontend needs to build against an arbitrary engine `src` (not a fixed package layout), and checking the diff --git a/Trax.StateMachine/ts/package.json b/Trax.StateMachine/ts/package.json index f9a4ed03a..b459baf77 100644 --- a/Trax.StateMachine/ts/package.json +++ b/Trax.StateMachine/ts/package.json @@ -1,7 +1,7 @@ { "name": "@traxsharp/state-machine", "version": "0.0.0", - "description": "Portable, resumable snapshot state-machine engine — the TypeScript twin of Trax.Effect.StateMachine. Represents a multi-step flow's state as language-neutral JSON so a client and a C# backend agree on it, with illegal (state, context) pairs unrepresentable and every operation total.", + "description": "Portable, resumable snapshot state-machine engine — the TypeScript twin of Trax.StateMachine. Represents a multi-step flow's state as language-neutral JSON so a client and a C# backend agree on it, with illegal (state, context) pairs unrepresentable and every operation total.", "license": "MIT", "homepage": "https://traxsharp.net", "repository": { diff --git a/Trax.StateMachine/ts/src/client/transport.ts b/Trax.StateMachine/ts/src/client/transport.ts index 9a23f5cd8..078e72766 100644 --- a/Trax.StateMachine/ts/src/client/transport.ts +++ b/Trax.StateMachine/ts/src/client/transport.ts @@ -2,7 +2,7 @@ import type { ProblemCode } from '../results'; /** * The client half of "one set of operations, any machine". * - * `Trax.Effect.StateMachine.Persistence` serves six generic mutations, when the host opts in to them — + * `Trax.StateMachine.Persistence` serves six generic mutations, when the host opts in to them — * `startSnapshot`, `saveSnapshot`, `advanceSnapshot`, `loadSnapshot`, `sendSnapshot`, `discardSnapshot` — * under `dispatch { stateMachine { … } }`, and every one carries a `machine` discriminator the server * resolves in its registry. There is no per-machine diff --git a/Trax.StateMachine/ts/src/index.ts b/Trax.StateMachine/ts/src/index.ts index d9fb5c1af..a9a5bb29b 100644 --- a/Trax.StateMachine/ts/src/index.ts +++ b/Trax.StateMachine/ts/src/index.ts @@ -1,7 +1,7 @@ /** * `@traxsharp/state-machine` — the TypeScript half of the Trax portable snapshot state machine. * - * A machine's behavior is authored once in C# (`Trax.Effect.StateMachine`) and exported as a neutral + * A machine's behavior is authored once in C# (`Trax.StateMachine`) and exported as a neutral * IR; this package interprets that IR so a browser and the server enforce the same guards, and a * shared differential corpus proves the two runtimes agree. Everything below is pure — no I/O. The * server-facing client lives behind `@traxsharp/state-machine/client`, the React binding behind @@ -106,7 +106,7 @@ export type { MachineFactoryOptions } from './rules/generateTypes'; // ── 6. Cross-runtime conformance ────────────────────────────────────────────────────────────────── // Enumerate a machine's reachable behavior into a golden corpus that the C# engine replays -// (Trax.Effect.StateMachine.Testing). TypeScript is currently the oracle. +// (Trax.StateMachine.Testing). TypeScript is currently the oracle. export { enumerate, serializeCorpus } from './differential'; export type { DifferentialSpec, DifferentialCorpus, DifferentialCase } from './differential'; diff --git a/Trax.StateMachine/ts/src/machine.ts b/Trax.StateMachine/ts/src/machine.ts index 59ecbd711..836a2eb39 100644 --- a/Trax.StateMachine/ts/src/machine.ts +++ b/Trax.StateMachine/ts/src/machine.ts @@ -13,7 +13,7 @@ import type { /** * Interprets a {@link MachineDefinition} over {@link Snapshot}s — the TypeScript half of the - * cross-language contract. The C# {@link SnapshotMachine} (Trax.Effect.StateMachine) is the other + * cross-language contract. The C# {@link SnapshotMachine} (Trax.StateMachine) is the other * half, and the shared conformance fixtures prove they behave identically. * * A plain reducer: `advance` matches the edges out of the snapshot's state, picks the FIRST whose diff --git a/Trax.StateMachine/ts/src/rules/interpreter.ts b/Trax.StateMachine/ts/src/rules/interpreter.ts index 825d182e0..1e516d901 100644 --- a/Trax.StateMachine/ts/src/rules/interpreter.ts +++ b/Trax.StateMachine/ts/src/rules/interpreter.ts @@ -1,4 +1,4 @@ -// The TypeScript mirror of the C# declarative rule engine (Trax.Effect.StateMachine.Rules). Guards, +// The TypeScript mirror of the C# declarative rule engine (Trax.StateMachine.Rules). Guards, // reducers, and context validators arrive from the IR as DATA; these interpreters evaluate that data, so the // generated TS machine runs the same rules the C# source authored. Semantics match RuleEvaluator / // ReductionEvaluator / SchemaValidator exactly (proven by the shared tests and, ultimately, the differential). diff --git a/Trax.StateMachine/ts/src/rules/irFormat.ts b/Trax.StateMachine/ts/src/rules/irFormat.ts index 00970545c..a1c51dc43 100644 --- a/Trax.StateMachine/ts/src/rules/irFormat.ts +++ b/Trax.StateMachine/ts/src/rules/irFormat.ts @@ -6,7 +6,7 @@ // The package's version is no measure of this: every Trax release bumps it, most without touching the IR. The format // changes only when the contract does. Bump irFormatVersion when the IR gains something an engine reading the // previous format would misread or ignore (a new section, rule or reduction, a changed meaning), together with -// IrExporter.FormatVersion in Trax.Effect.StateMachine, which IrFormatParityTests holds equal to it. Raise +// IrExporter.FormatVersion in Trax.StateMachine, which IrFormatParityTests holds equal to it. Raise // oldestIrFormatRead only when this engine stops reading an older format. /** The IR format this engine reads and its generators write. */ diff --git a/Trax.StateMachine/ts/src/types.ts b/Trax.StateMachine/ts/src/types.ts index dda09cbc9..1bf22a0be 100644 --- a/Trax.StateMachine/ts/src/types.ts +++ b/Trax.StateMachine/ts/src/types.ts @@ -1,6 +1,6 @@ /** * The language-neutral, serializable state of a machine instance — the only thing that crosses the - * wire or lands in a database row. The C# backend (Trax.Effect.StateMachine) reads and writes this + * wire or lands in a database row. The C# backend (Trax.StateMachine) reads and writes this * exact shape, and the shared conformance fixtures prove the two engines agree. */ export interface Snapshot { diff --git a/Trax.Website/src/components/landing/LayerDiagram.tsx b/Trax.Website/src/components/landing/LayerDiagram.tsx index 2cddf7852..7eb3c1a73 100644 --- a/Trax.Website/src/components/landing/LayerDiagram.tsx +++ b/Trax.Website/src/components/landing/LayerDiagram.tsx @@ -52,7 +52,7 @@ const layers = [ { rung: "Walk a user through it", name: "State machines", - cmd: "dotnet add package Trax.Effect.StateMachine.Persistence", + cmd: "dotnet add package Trax.StateMachine.Persistence", desc: "A checkout or a form as named states the server stores after every move. Each move is a typed mutation the server applies or refuses, and a state can run a train.", replaces: "status columns and hand-written transition checks", href: "/docs/statemachine", diff --git a/Trax.Website/src/components/landing/PackageList.tsx b/Trax.Website/src/components/landing/PackageList.tsx index 2b51f1f8d..0f722bc53 100644 --- a/Trax.Website/src/components/landing/PackageList.tsx +++ b/Trax.Website/src/components/landing/PackageList.tsx @@ -61,15 +61,15 @@ const folders: Folder[] = [ desc: "Lifecycle events pushed to Blazor and JavaScript clients", }, { - name: "Trax.Effect.StateMachine", + name: "Trax.StateMachine", desc: "Portable snapshot state-machine engine", }, { - name: "Trax.Effect.StateMachine.Persistence", + name: "Trax.StateMachine.Persistence", desc: "Postgres snapshot store and run-once effects", }, { - name: "Trax.Effect.StateMachine.Testing", + name: "Trax.StateMachine.Testing", desc: "Conformance tests between the C# and TypeScript engines", }, ], diff --git a/Trax.Website/src/data/order-recordings.json b/Trax.Website/src/data/order-recordings.json index c14e95cbf..b915701e6 100644 --- a/Trax.Website/src/data/order-recordings.json +++ b/Trax.Website/src/data/order-recordings.json @@ -1 +1 @@ -{"recordedAt":"2026-10-13T20:16:48.000Z","order":{"item":"Margherita","priceCents":1200,"restaurant":"Pizzeria Napoli"},"timerAfter":"PT30M","source":{"file":"Trax.Samples.Recovery/Machines/OrderMachine.cs","code":"using System.Text.Json.Nodes;\nusing Trax.Effect.Attributes;\nusing Trax.Effect.StateMachine;\nusing Trax.Effect.StateMachine.Persistence;\nusing Trax.Samples.Recovery.Trains.Order;\nusing static Trax.Effect.StateMachine.Rules;\n\nnamespace Trax.Samples.Recovery.Machines;\n\npublic enum OrderState\n{\n /// Choosing what to eat.\n Cart,\n\n /// The order is on its way: runs.\n Ordered,\n\n /// The run finished: the food is at the door.\n Delivered,\n\n /// The run failed or was cancelled, before the food arrived.\n Cancelled,\n\n /// Nobody ordered within : the server cleared the cart.\n Cleared,\n}\n\npublic enum OrderTrigger\n{\n /// Put an item from the menu in the cart.\n AddItem,\n\n /// Order what is in the cart.\n PlaceOrder,\n}\n\n/// The order, one shape in every state: what is in the cart, and what it costs.\npublic sealed record OrderContext\n{\n public List? Items { get; init; }\n\n public decimal? Total { get; init; }\n}\n\n/// What a user starts an order with: nothing, the cart starts empty.\npublic sealed record OrderStart;\n\n/// The input of : an item on the menu. The server prices it.\npublic sealed record NewItem\n{\n public string Item { get; init; } = \"\";\n}\n\n/// \n/// \"Order a pizza\": fill the cart, place the order, and the server takes it from there. Ordered runs\n/// , and only that run's outcome moves the order on.\n/// \n/// Cart --PlaceOrder--> Ordered --done-----------------> Delivered\n/// │ --failed or cancelled--> Cancelled\n/// └──after 30 minutes──> Cleared\n/// \n/// \n/// \n/// User-owned: the order is the user's own, and their laptop and their phone both follow it by\n/// machineChanged. A client sends only its events; no client fires the run's outcome or the cart's timer.\n/// \n[TraxMachine]\npublic sealed class OrderMachine : Machine\n{\n public const string MachineId = \"order\";\n\n /// What the kitchen makes, and its price.\n public static readonly Dictionary Menu = new()\n {\n [\"Margherita\"] = 12m,\n [\"Pepperoni\"] = 14m,\n [\"Garlic bread\"] = 5m,\n };\n\n /// How long a cart waits for its order: 30 minutes. The demo host shortens it (Recovery:CartWait).\n public static TimeSpan CartWait { get; set; } = TimeSpan.FromMinutes(30);\n\n protected override void Configure(IMachineBuilder m)\n {\n m.Id(MachineId)\n .Version(1)\n .StartsAt(OrderState.Cart, () => new JsonObject())\n .Start(s => s.Reduce(Keep()).AnyAuthenticated())\n .Get(r => r.OwnerOnly())\n .Watch(r => r.OwnerOnly())\n .Discard(r => r.OwnerOnly())\n .CustomReducer(\"order:add-item\", AddToCart);\n\n m.In(OrderState.Cart)\n .Context()\n // Nobody ordered: the server clears the cart by itself, and every screen hears it by push.\n .After(CartWait) // 30 minutes; the demo host shortens it\n .GoTo(OrderState.Cleared)\n .On(OrderTrigger.AddItem)\n .AnyAuthenticated()\n .WithInput()\n .When(Input((NewItem i) => i.Item).IsOneOf([.. Menu.Keys]))\n .Because(\"That is not on the menu.\")\n .Reduce(new Reduction.Custom(\"order:add-item\"))\n .To(OrderState.Cart)\n .On(OrderTrigger.PlaceOrder)\n .AnyAuthenticated()\n .When(Field((OrderContext c) => c.Items).CountAtLeast(1))\n .Because(\"The cart is empty.\")\n .To(OrderState.Ordered);\n\n m.In(OrderState.Ordered)\n .Context()\n .Invokes(DeliveryFor)\n .OnDone(OrderState.Delivered)\n .OnFailed(OrderState.Cancelled)\n .OnCancelled(OrderState.Cancelled);\n\n m.In(OrderState.Delivered).Context();\n m.In(OrderState.Cancelled).Context();\n m.In(OrderState.Cleared).Context();\n\n m.Differential(d =>\n d.Sample(OrderTrigger.AddItem, new NewItem { Item = \"Margherita\" })\n .Sample(OrderTrigger.AddItem, new NewItem { Item = \"Sushi\" })\n .EmptySample(OrderTrigger.AddItem)\n .OutcomeSample(OrderState.Ordered, new OrderDelivered(\"order-sample\", \"Sam\"))\n );\n }\n\n // The run's input, built on the server from the cart the order was placed with. Each order gets an id of its\n // own, which the card is charged under.\n private static OrderInput DeliveryFor(JsonObject cart) =>\n new()\n {\n OrderId = $\"order-{Guid.NewGuid():N}\",\n Items = cart[\"items\"]!.AsArray().Select(i => i!.GetValue()).ToList(),\n Total = cart[\"total\"]!.GetValue(),\n };\n\n // AddItem's reduction: the item goes in the cart at the menu's price, never one a client sends.\n private static JsonObject AddToCart(JsonObject cart, JsonNode? input)\n {\n var item = input![\"item\"]!.GetValue();\n var items = cart[\"items\"]?.AsArray().Select(i => i!.GetValue()).ToList() ?? [];\n var total = cart[\"total\"]?.GetValue() ?? 0m;\n return new JsonObject\n {\n [\"items\"] = new JsonArray([.. items.Append(item).Select(i => JsonValue.Create(i))]),\n [\"total\"] = total + Menu[item],\n };\n }\n}\n"},"lines":{"state:Cart":94,"state:Ordered":112,"state:Delivered":115,"state:Cancelled":116,"state:Cleared":98,"event:addItem":99,"event:AddItem":99,"event:placeOrder":106,"event:PlaceOrder":106,"event:start":88,"invoke":114,"timer":97,"outcome:done":115,"outcome:failed":116,"outcome:cancelled":117},"train":{"name":"DeliverOrderTrain","steps":["SendToRestaurant","ChargeCard","Cook","PickUp","Deliver"],"source":{"file":"Trax.Samples.Recovery/Trains/Order/DeliverOrderTrain.cs","code":"using Trax.Core.Functional;\nusing Trax.Effect.Attributes;\nusing Trax.Effect.Services.ServiceTrain;\nusing Trax.Samples.Recovery.Trains.Order.Junctions;\n\nnamespace Trax.Samples.Recovery.Trains.Order;\n\n/// \n/// A food order, from the restaurant to the door: send it to the restaurant, charge the card, cook, pick up,\n/// deliver. The restaurant's tablet can time out, and is tried once more; a closed restaurant fails the run\n/// before the card is charged.\n/// \n/// \n/// \n/// The order machine's Ordered state invokes it for whoever places the order, so it asks only for a\n/// signed-in caller, as PlaceOrder does: the host compares the two at startup. Unlike the refund train it is\n/// not [TraxBroadcast], because a user's own machine may not invoke a train whose every run is broadcast to\n/// every subscriber; its steps reach a client through the operations view of onJunctionEvent, as the topic\n/// map's do. Every step is an EffectJunction, so leaving the state could cancel the run on any host.\n/// \n/// \n/// The scheduler never retries a run a machine invoked: it has no manifest. A failed run is the machine's\n/// Ordered.failed, so the tablet's retry lives inside , where the machine\n/// sees one run that recovered.\n/// \n/// \n[TraxAuthorize]\npublic class DeliverOrderTrain : ServiceTrain, IDeliverOrderTrain\n{\n protected override Task> Junctions() =>\n Chain()\n .Chain()\n .Chain()\n .Chain()\n .Chain()\n .Resolve();\n}\n"}},"scenarios":[{"key":"order","title":"Order a pizza","caption":"You order a Margherita and follow it on your phone until it is at the door.","recordedAt":"2026-10-13T20:16:48.000Z","events":[{"t":135,"kind":"request","operation":"start","requestId":"order-start-1-1791922608000","label":"Start an order"},{"t":222,"kind":"answer","operation":"start","requestId":"order-start-1-1791922608000","ms":87,"revision":1,"state":"Cart","problem":null},{"t":299,"kind":"push","screen":"phone","revision":1,"state":"Cart"},{"t":299,"kind":"push","screen":"laptop","revision":1,"state":"Cart"},{"t":926,"kind":"request","operation":"addItem","requestId":"order-add-2-1791922608000","label":"Add 1 × Margherita"},{"t":990,"kind":"answer","operation":"addItem","requestId":"order-add-2-1791922608000","ms":64,"revision":2,"state":"Cart","problem":null},{"t":995,"kind":"push","screen":"laptop","revision":2,"state":"Cart"},{"t":995,"kind":"push","screen":"phone","revision":2,"state":"Cart"},{"t":1812,"kind":"request","operation":"placeOrder","requestId":"order-place-3-1791922608000","label":"Place order"},{"t":1892,"kind":"answer","operation":"placeOrder","requestId":"order-place-3-1791922608000","ms":80,"revision":3,"state":"Ordered","problem":null},{"t":1902,"kind":"push","screen":"phone","revision":3,"state":"Ordered"},{"t":1902,"kind":"push","screen":"laptop","revision":3,"state":"Ordered"},{"t":1934,"kind":"request","operation":"placeOrder","requestId":"order-place-3-1791922608000","label":"Place order (pressed again)"},{"t":1944,"kind":"answer","operation":"placeOrder","requestId":"order-place-3-1791922608000","ms":10,"revision":3,"state":"Ordered","problem":null,"replayed":true},{"t":2085,"kind":"junction","attempt":1,"step":"SendToRestaurant","status":"running"},{"t":2687,"kind":"junction","attempt":1,"step":"SendToRestaurant","status":"completed"},{"t":2693,"kind":"junction","attempt":1,"step":"ChargeCard","status":"running"},{"t":3293,"kind":"junction","attempt":1,"step":"ChargeCard","status":"completed"},{"t":3300,"kind":"junction","attempt":1,"step":"Cook","status":"running"},{"t":4502,"kind":"junction","attempt":1,"step":"Cook","status":"completed"},{"t":4506,"kind":"junction","attempt":1,"step":"PickUp","status":"running"},{"t":5107,"kind":"junction","attempt":1,"step":"PickUp","status":"completed"},{"t":5113,"kind":"junction","attempt":1,"step":"Deliver","status":"running"},{"t":6315,"kind":"junction","attempt":1,"step":"Deliver","status":"completed"},{"t":6358,"kind":"push","screen":"laptop","revision":4,"state":"Delivered"},{"t":6358,"kind":"push","screen":"phone","revision":4,"state":"Delivered"}]},{"key":"tablet-times-out","title":"The tablet doesn't answer","caption":"The restaurant's tablet doesn't answer in time, so the server tries again and the pizza still arrives.","recordedAt":"2026-10-13T20:16:55.249Z","events":[{"t":23,"kind":"request","operation":"start","requestId":"tablet-times-out-start-1-1791922615249","label":"Start an order"},{"t":54,"kind":"answer","operation":"start","requestId":"tablet-times-out-start-1-1791922615249","ms":31,"revision":1,"state":"Cart","problem":null},{"t":75,"kind":"push","screen":"phone","revision":1,"state":"Cart"},{"t":75,"kind":"push","screen":"laptop","revision":1,"state":"Cart"},{"t":757,"kind":"request","operation":"addItem","requestId":"tablet-times-out-add-2-1791922615249","label":"Add 1 × Margherita"},{"t":792,"kind":"answer","operation":"addItem","requestId":"tablet-times-out-add-2-1791922615249","ms":35,"revision":2,"state":"Cart","problem":null},{"t":802,"kind":"push","screen":"phone","revision":2,"state":"Cart"},{"t":802,"kind":"push","screen":"laptop","revision":2,"state":"Cart"},{"t":1608,"kind":"request","operation":"placeOrder","requestId":"tablet-times-out-place-3-1791922615249","label":"Place order"},{"t":1636,"kind":"answer","operation":"placeOrder","requestId":"tablet-times-out-place-3-1791922615249","ms":28,"revision":3,"state":"Ordered","problem":null},{"t":1646,"kind":"push","screen":"laptop","revision":3,"state":"Ordered"},{"t":1646,"kind":"push","screen":"phone","revision":3,"state":"Ordered"},{"t":1680,"kind":"junction","attempt":1,"step":"SendToRestaurant","status":"running"},{"t":1729,"kind":"request","operation":"placeOrder","requestId":"tablet-times-out-place-3-1791922615249","label":"Place order (pressed again)"},{"t":1743,"kind":"answer","operation":"placeOrder","requestId":"tablet-times-out-place-3-1791922615249","ms":14,"revision":3,"state":"Ordered","problem":null,"replayed":true},{"t":3681,"kind":"junction","attempt":1,"step":"SendToRestaurant","status":"failed","message":"Pizzeria Napoli's tablet did not answer in 2 s."},{"t":3681,"kind":"retry","attempt":2,"message":"Trying the tablet again in 1 s (attempt 2)."},{"t":4682,"kind":"junction","attempt":2,"step":"SendToRestaurant","status":"running"},{"t":5284,"kind":"junction","attempt":2,"step":"SendToRestaurant","status":"completed"},{"t":5296,"kind":"junction","attempt":1,"step":"ChargeCard","status":"running"},{"t":5897,"kind":"junction","attempt":1,"step":"ChargeCard","status":"completed"},{"t":5905,"kind":"junction","attempt":1,"step":"Cook","status":"running"},{"t":7106,"kind":"junction","attempt":1,"step":"Cook","status":"completed"},{"t":7118,"kind":"junction","attempt":1,"step":"PickUp","status":"running"},{"t":7718,"kind":"junction","attempt":1,"step":"PickUp","status":"completed"},{"t":7723,"kind":"junction","attempt":1,"step":"Deliver","status":"running"},{"t":8925,"kind":"junction","attempt":1,"step":"Deliver","status":"completed"},{"t":8956,"kind":"push","screen":"laptop","revision":4,"state":"Delivered"},{"t":8957,"kind":"push","screen":"phone","revision":4,"state":"Delivered"}]},{"key":"restaurant-closed","title":"The restaurant is closed","caption":"The restaurant is closed, so the order is cancelled before your card is charged.","recordedAt":"2026-10-13T20:17:05.048Z","events":[{"t":12,"kind":"request","operation":"start","requestId":"restaurant-closed-start-1-1791922625048","label":"Start an order"},{"t":31,"kind":"answer","operation":"start","requestId":"restaurant-closed-start-1-1791922625048","ms":18,"revision":1,"state":"Cart","problem":null},{"t":50,"kind":"push","screen":"phone","revision":1,"state":"Cart"},{"t":50,"kind":"push","screen":"laptop","revision":1,"state":"Cart"},{"t":734,"kind":"request","operation":"addItem","requestId":"restaurant-closed-add-2-1791922625048","label":"Add 1 × Margherita"},{"t":773,"kind":"answer","operation":"addItem","requestId":"restaurant-closed-add-2-1791922625048","ms":39,"revision":2,"state":"Cart","problem":null},{"t":782,"kind":"push","screen":"laptop","revision":2,"state":"Cart"},{"t":782,"kind":"push","screen":"phone","revision":2,"state":"Cart"},{"t":1591,"kind":"request","operation":"placeOrder","requestId":"restaurant-closed-place-3-1791922625048","label":"Place order"},{"t":1624,"kind":"answer","operation":"placeOrder","requestId":"restaurant-closed-place-3-1791922625048","ms":33,"revision":3,"state":"Ordered","problem":null},{"t":1637,"kind":"push","screen":"laptop","revision":3,"state":"Ordered"},{"t":1638,"kind":"push","screen":"phone","revision":3,"state":"Ordered"},{"t":1712,"kind":"request","operation":"placeOrder","requestId":"restaurant-closed-place-3-1791922625048","label":"Place order (pressed again)"},{"t":1721,"kind":"answer","operation":"placeOrder","requestId":"restaurant-closed-place-3-1791922625048","ms":9,"revision":3,"state":"Ordered","problem":null,"replayed":true},{"t":1775,"kind":"junction","attempt":1,"step":"SendToRestaurant","status":"running"},{"t":2388,"kind":"junction","attempt":1,"step":"SendToRestaurant","status":"failed","message":"Pizzeria Napoli is closed."},{"t":2430,"kind":"push","screen":"phone","revision":4,"state":"Cancelled"},{"t":2430,"kind":"push","screen":"laptop","revision":4,"state":"Cancelled"}]},{"key":"left-in-cart","title":"Left in the cart","caption":"You never press Place order, so the server clears the cart by itself with nobody watching.","recordedAt":"2026-10-13T20:17:08.344Z","events":[{"t":0,"kind":"request","operation":"start","requestId":"left-in-cart-start-1-1791922628344","label":"Start an order"},{"t":33,"kind":"answer","operation":"start","requestId":"left-in-cart-start-1-1791922628344","ms":32,"revision":1,"state":"Cart","problem":null},{"t":54,"kind":"push","screen":"phone","revision":1,"state":"Cart"},{"t":54,"kind":"push","screen":"laptop","revision":1,"state":"Cart"},{"t":736,"kind":"request","operation":"addItem","requestId":"left-in-cart-add-2-1791922628344","label":"Add 1 × Margherita"},{"t":777,"kind":"answer","operation":"addItem","requestId":"left-in-cart-add-2-1791922628344","ms":41,"revision":2,"state":"Cart","problem":null},{"t":786,"kind":"push","screen":"phone","revision":2,"state":"Cart"},{"t":786,"kind":"push","screen":"laptop","revision":2,"state":"Cart"},{"t":2286,"kind":"push","screen":"laptop","revision":3,"state":"Cleared","gap":13693},{"t":2286,"kind":"push","screen":"phone","revision":3,"state":"Cleared"}]}]} +{"recordedAt":"2026-10-13T20:16:48.000Z","order":{"item":"Margherita","priceCents":1200,"restaurant":"Pizzeria Napoli"},"timerAfter":"PT30M","source":{"file":"Trax.Samples.Recovery/Machines/OrderMachine.cs","code":"using System.Text.Json.Nodes;\nusing Trax.Effect.Attributes;\nusing Trax.StateMachine;\nusing Trax.StateMachine.Persistence;\nusing Trax.Samples.Recovery.Trains.Order;\nusing static Trax.StateMachine.Rules;\n\nnamespace Trax.Samples.Recovery.Machines;\n\npublic enum OrderState\n{\n /// Choosing what to eat.\n Cart,\n\n /// The order is on its way: runs.\n Ordered,\n\n /// The run finished: the food is at the door.\n Delivered,\n\n /// The run failed or was cancelled, before the food arrived.\n Cancelled,\n\n /// Nobody ordered within : the server cleared the cart.\n Cleared,\n}\n\npublic enum OrderTrigger\n{\n /// Put an item from the menu in the cart.\n AddItem,\n\n /// Order what is in the cart.\n PlaceOrder,\n}\n\n/// The order, one shape in every state: what is in the cart, and what it costs.\npublic sealed record OrderContext\n{\n public List? Items { get; init; }\n\n public decimal? Total { get; init; }\n}\n\n/// What a user starts an order with: nothing, the cart starts empty.\npublic sealed record OrderStart;\n\n/// The input of : an item on the menu. The server prices it.\npublic sealed record NewItem\n{\n public string Item { get; init; } = \"\";\n}\n\n/// \n/// \"Order a pizza\": fill the cart, place the order, and the server takes it from there. Ordered runs\n/// , and only that run's outcome moves the order on.\n/// \n/// Cart --PlaceOrder--> Ordered --done-----------------> Delivered\n/// │ --failed or cancelled--> Cancelled\n/// └──after 30 minutes──> Cleared\n/// \n/// \n/// \n/// User-owned: the order is the user's own, and their laptop and their phone both follow it by\n/// machineChanged. A client sends only its events; no client fires the run's outcome or the cart's timer.\n/// \n[TraxMachine]\npublic sealed class OrderMachine : Machine\n{\n public const string MachineId = \"order\";\n\n /// What the kitchen makes, and its price.\n public static readonly Dictionary Menu = new()\n {\n [\"Margherita\"] = 12m,\n [\"Pepperoni\"] = 14m,\n [\"Garlic bread\"] = 5m,\n };\n\n /// How long a cart waits for its order: 30 minutes. The demo host shortens it (Recovery:CartWait).\n public static TimeSpan CartWait { get; set; } = TimeSpan.FromMinutes(30);\n\n protected override void Configure(IMachineBuilder m)\n {\n m.Id(MachineId)\n .Version(1)\n .StartsAt(OrderState.Cart, () => new JsonObject())\n .Start(s => s.Reduce(Keep()).AnyAuthenticated())\n .Get(r => r.OwnerOnly())\n .Watch(r => r.OwnerOnly())\n .Discard(r => r.OwnerOnly())\n .CustomReducer(\"order:add-item\", AddToCart);\n\n m.In(OrderState.Cart)\n .Context()\n // Nobody ordered: the server clears the cart by itself, and every screen hears it by push.\n .After(CartWait) // 30 minutes; the demo host shortens it\n .GoTo(OrderState.Cleared)\n .On(OrderTrigger.AddItem)\n .AnyAuthenticated()\n .WithInput()\n .When(Input((NewItem i) => i.Item).IsOneOf([.. Menu.Keys]))\n .Because(\"That is not on the menu.\")\n .Reduce(new Reduction.Custom(\"order:add-item\"))\n .To(OrderState.Cart)\n .On(OrderTrigger.PlaceOrder)\n .AnyAuthenticated()\n .When(Field((OrderContext c) => c.Items).CountAtLeast(1))\n .Because(\"The cart is empty.\")\n .To(OrderState.Ordered);\n\n m.In(OrderState.Ordered)\n .Context()\n .Invokes(DeliveryFor)\n .OnDone(OrderState.Delivered)\n .OnFailed(OrderState.Cancelled)\n .OnCancelled(OrderState.Cancelled);\n\n m.In(OrderState.Delivered).Context();\n m.In(OrderState.Cancelled).Context();\n m.In(OrderState.Cleared).Context();\n\n m.Differential(d =>\n d.Sample(OrderTrigger.AddItem, new NewItem { Item = \"Margherita\" })\n .Sample(OrderTrigger.AddItem, new NewItem { Item = \"Sushi\" })\n .EmptySample(OrderTrigger.AddItem)\n .OutcomeSample(OrderState.Ordered, new OrderDelivered(\"order-sample\", \"Sam\"))\n );\n }\n\n // The run's input, built on the server from the cart the order was placed with. Each order gets an id of its\n // own, which the card is charged under.\n private static OrderInput DeliveryFor(JsonObject cart) =>\n new()\n {\n OrderId = $\"order-{Guid.NewGuid():N}\",\n Items = cart[\"items\"]!.AsArray().Select(i => i!.GetValue()).ToList(),\n Total = cart[\"total\"]!.GetValue(),\n };\n\n // AddItem's reduction: the item goes in the cart at the menu's price, never one a client sends.\n private static JsonObject AddToCart(JsonObject cart, JsonNode? input)\n {\n var item = input![\"item\"]!.GetValue();\n var items = cart[\"items\"]?.AsArray().Select(i => i!.GetValue()).ToList() ?? [];\n var total = cart[\"total\"]?.GetValue() ?? 0m;\n return new JsonObject\n {\n [\"items\"] = new JsonArray([.. items.Append(item).Select(i => JsonValue.Create(i))]),\n [\"total\"] = total + Menu[item],\n };\n }\n}\n"},"lines":{"state:Cart":94,"state:Ordered":112,"state:Delivered":115,"state:Cancelled":116,"state:Cleared":98,"event:addItem":99,"event:AddItem":99,"event:placeOrder":106,"event:PlaceOrder":106,"event:start":88,"invoke":114,"timer":97,"outcome:done":115,"outcome:failed":116,"outcome:cancelled":117},"train":{"name":"DeliverOrderTrain","steps":["SendToRestaurant","ChargeCard","Cook","PickUp","Deliver"],"source":{"file":"Trax.Samples.Recovery/Trains/Order/DeliverOrderTrain.cs","code":"using Trax.Core.Functional;\nusing Trax.Effect.Attributes;\nusing Trax.Effect.Services.ServiceTrain;\nusing Trax.Samples.Recovery.Trains.Order.Junctions;\n\nnamespace Trax.Samples.Recovery.Trains.Order;\n\n/// \n/// A food order, from the restaurant to the door: send it to the restaurant, charge the card, cook, pick up,\n/// deliver. The restaurant's tablet can time out, and is tried once more; a closed restaurant fails the run\n/// before the card is charged.\n/// \n/// \n/// \n/// The order machine's Ordered state invokes it for whoever places the order, so it asks only for a\n/// signed-in caller, as PlaceOrder does: the host compares the two at startup. Unlike the refund train it is\n/// not [TraxBroadcast], because a user's own machine may not invoke a train whose every run is broadcast to\n/// every subscriber; its steps reach a client through the operations view of onJunctionEvent, as the topic\n/// map's do. Every step is an EffectJunction, so leaving the state could cancel the run on any host.\n/// \n/// \n/// The scheduler never retries a run a machine invoked: it has no manifest. A failed run is the machine's\n/// Ordered.failed, so the tablet's retry lives inside , where the machine\n/// sees one run that recovered.\n/// \n/// \n[TraxAuthorize]\npublic class DeliverOrderTrain : ServiceTrain, IDeliverOrderTrain\n{\n protected override Task> Junctions() =>\n Chain()\n .Chain()\n .Chain()\n .Chain()\n .Chain()\n .Resolve();\n}\n"}},"scenarios":[{"key":"order","title":"Order a pizza","caption":"You order a Margherita and follow it on your phone until it is at the door.","recordedAt":"2026-10-13T20:16:48.000Z","events":[{"t":135,"kind":"request","operation":"start","requestId":"order-start-1-1791922608000","label":"Start an order"},{"t":222,"kind":"answer","operation":"start","requestId":"order-start-1-1791922608000","ms":87,"revision":1,"state":"Cart","problem":null},{"t":299,"kind":"push","screen":"phone","revision":1,"state":"Cart"},{"t":299,"kind":"push","screen":"laptop","revision":1,"state":"Cart"},{"t":926,"kind":"request","operation":"addItem","requestId":"order-add-2-1791922608000","label":"Add 1 × Margherita"},{"t":990,"kind":"answer","operation":"addItem","requestId":"order-add-2-1791922608000","ms":64,"revision":2,"state":"Cart","problem":null},{"t":995,"kind":"push","screen":"laptop","revision":2,"state":"Cart"},{"t":995,"kind":"push","screen":"phone","revision":2,"state":"Cart"},{"t":1812,"kind":"request","operation":"placeOrder","requestId":"order-place-3-1791922608000","label":"Place order"},{"t":1892,"kind":"answer","operation":"placeOrder","requestId":"order-place-3-1791922608000","ms":80,"revision":3,"state":"Ordered","problem":null},{"t":1902,"kind":"push","screen":"phone","revision":3,"state":"Ordered"},{"t":1902,"kind":"push","screen":"laptop","revision":3,"state":"Ordered"},{"t":1934,"kind":"request","operation":"placeOrder","requestId":"order-place-3-1791922608000","label":"Place order (pressed again)"},{"t":1944,"kind":"answer","operation":"placeOrder","requestId":"order-place-3-1791922608000","ms":10,"revision":3,"state":"Ordered","problem":null,"replayed":true},{"t":2085,"kind":"junction","attempt":1,"step":"SendToRestaurant","status":"running"},{"t":2687,"kind":"junction","attempt":1,"step":"SendToRestaurant","status":"completed"},{"t":2693,"kind":"junction","attempt":1,"step":"ChargeCard","status":"running"},{"t":3293,"kind":"junction","attempt":1,"step":"ChargeCard","status":"completed"},{"t":3300,"kind":"junction","attempt":1,"step":"Cook","status":"running"},{"t":4502,"kind":"junction","attempt":1,"step":"Cook","status":"completed"},{"t":4506,"kind":"junction","attempt":1,"step":"PickUp","status":"running"},{"t":5107,"kind":"junction","attempt":1,"step":"PickUp","status":"completed"},{"t":5113,"kind":"junction","attempt":1,"step":"Deliver","status":"running"},{"t":6315,"kind":"junction","attempt":1,"step":"Deliver","status":"completed"},{"t":6358,"kind":"push","screen":"laptop","revision":4,"state":"Delivered"},{"t":6358,"kind":"push","screen":"phone","revision":4,"state":"Delivered"}]},{"key":"tablet-times-out","title":"The tablet doesn't answer","caption":"The restaurant's tablet doesn't answer in time, so the server tries again and the pizza still arrives.","recordedAt":"2026-10-13T20:16:55.249Z","events":[{"t":23,"kind":"request","operation":"start","requestId":"tablet-times-out-start-1-1791922615249","label":"Start an order"},{"t":54,"kind":"answer","operation":"start","requestId":"tablet-times-out-start-1-1791922615249","ms":31,"revision":1,"state":"Cart","problem":null},{"t":75,"kind":"push","screen":"phone","revision":1,"state":"Cart"},{"t":75,"kind":"push","screen":"laptop","revision":1,"state":"Cart"},{"t":757,"kind":"request","operation":"addItem","requestId":"tablet-times-out-add-2-1791922615249","label":"Add 1 × Margherita"},{"t":792,"kind":"answer","operation":"addItem","requestId":"tablet-times-out-add-2-1791922615249","ms":35,"revision":2,"state":"Cart","problem":null},{"t":802,"kind":"push","screen":"phone","revision":2,"state":"Cart"},{"t":802,"kind":"push","screen":"laptop","revision":2,"state":"Cart"},{"t":1608,"kind":"request","operation":"placeOrder","requestId":"tablet-times-out-place-3-1791922615249","label":"Place order"},{"t":1636,"kind":"answer","operation":"placeOrder","requestId":"tablet-times-out-place-3-1791922615249","ms":28,"revision":3,"state":"Ordered","problem":null},{"t":1646,"kind":"push","screen":"laptop","revision":3,"state":"Ordered"},{"t":1646,"kind":"push","screen":"phone","revision":3,"state":"Ordered"},{"t":1680,"kind":"junction","attempt":1,"step":"SendToRestaurant","status":"running"},{"t":1729,"kind":"request","operation":"placeOrder","requestId":"tablet-times-out-place-3-1791922615249","label":"Place order (pressed again)"},{"t":1743,"kind":"answer","operation":"placeOrder","requestId":"tablet-times-out-place-3-1791922615249","ms":14,"revision":3,"state":"Ordered","problem":null,"replayed":true},{"t":3681,"kind":"junction","attempt":1,"step":"SendToRestaurant","status":"failed","message":"Pizzeria Napoli's tablet did not answer in 2 s."},{"t":3681,"kind":"retry","attempt":2,"message":"Trying the tablet again in 1 s (attempt 2)."},{"t":4682,"kind":"junction","attempt":2,"step":"SendToRestaurant","status":"running"},{"t":5284,"kind":"junction","attempt":2,"step":"SendToRestaurant","status":"completed"},{"t":5296,"kind":"junction","attempt":1,"step":"ChargeCard","status":"running"},{"t":5897,"kind":"junction","attempt":1,"step":"ChargeCard","status":"completed"},{"t":5905,"kind":"junction","attempt":1,"step":"Cook","status":"running"},{"t":7106,"kind":"junction","attempt":1,"step":"Cook","status":"completed"},{"t":7118,"kind":"junction","attempt":1,"step":"PickUp","status":"running"},{"t":7718,"kind":"junction","attempt":1,"step":"PickUp","status":"completed"},{"t":7723,"kind":"junction","attempt":1,"step":"Deliver","status":"running"},{"t":8925,"kind":"junction","attempt":1,"step":"Deliver","status":"completed"},{"t":8956,"kind":"push","screen":"laptop","revision":4,"state":"Delivered"},{"t":8957,"kind":"push","screen":"phone","revision":4,"state":"Delivered"}]},{"key":"restaurant-closed","title":"The restaurant is closed","caption":"The restaurant is closed, so the order is cancelled before your card is charged.","recordedAt":"2026-10-13T20:17:05.048Z","events":[{"t":12,"kind":"request","operation":"start","requestId":"restaurant-closed-start-1-1791922625048","label":"Start an order"},{"t":31,"kind":"answer","operation":"start","requestId":"restaurant-closed-start-1-1791922625048","ms":18,"revision":1,"state":"Cart","problem":null},{"t":50,"kind":"push","screen":"phone","revision":1,"state":"Cart"},{"t":50,"kind":"push","screen":"laptop","revision":1,"state":"Cart"},{"t":734,"kind":"request","operation":"addItem","requestId":"restaurant-closed-add-2-1791922625048","label":"Add 1 × Margherita"},{"t":773,"kind":"answer","operation":"addItem","requestId":"restaurant-closed-add-2-1791922625048","ms":39,"revision":2,"state":"Cart","problem":null},{"t":782,"kind":"push","screen":"laptop","revision":2,"state":"Cart"},{"t":782,"kind":"push","screen":"phone","revision":2,"state":"Cart"},{"t":1591,"kind":"request","operation":"placeOrder","requestId":"restaurant-closed-place-3-1791922625048","label":"Place order"},{"t":1624,"kind":"answer","operation":"placeOrder","requestId":"restaurant-closed-place-3-1791922625048","ms":33,"revision":3,"state":"Ordered","problem":null},{"t":1637,"kind":"push","screen":"laptop","revision":3,"state":"Ordered"},{"t":1638,"kind":"push","screen":"phone","revision":3,"state":"Ordered"},{"t":1712,"kind":"request","operation":"placeOrder","requestId":"restaurant-closed-place-3-1791922625048","label":"Place order (pressed again)"},{"t":1721,"kind":"answer","operation":"placeOrder","requestId":"restaurant-closed-place-3-1791922625048","ms":9,"revision":3,"state":"Ordered","problem":null,"replayed":true},{"t":1775,"kind":"junction","attempt":1,"step":"SendToRestaurant","status":"running"},{"t":2388,"kind":"junction","attempt":1,"step":"SendToRestaurant","status":"failed","message":"Pizzeria Napoli is closed."},{"t":2430,"kind":"push","screen":"phone","revision":4,"state":"Cancelled"},{"t":2430,"kind":"push","screen":"laptop","revision":4,"state":"Cancelled"}]},{"key":"left-in-cart","title":"Left in the cart","caption":"You never press Place order, so the server clears the cart by itself with nobody watching.","recordedAt":"2026-10-13T20:17:08.344Z","events":[{"t":0,"kind":"request","operation":"start","requestId":"left-in-cart-start-1-1791922628344","label":"Start an order"},{"t":33,"kind":"answer","operation":"start","requestId":"left-in-cart-start-1-1791922628344","ms":32,"revision":1,"state":"Cart","problem":null},{"t":54,"kind":"push","screen":"phone","revision":1,"state":"Cart"},{"t":54,"kind":"push","screen":"laptop","revision":1,"state":"Cart"},{"t":736,"kind":"request","operation":"addItem","requestId":"left-in-cart-add-2-1791922628344","label":"Add 1 × Margherita"},{"t":777,"kind":"answer","operation":"addItem","requestId":"left-in-cart-add-2-1791922628344","ms":41,"revision":2,"state":"Cart","problem":null},{"t":786,"kind":"push","screen":"phone","revision":2,"state":"Cart"},{"t":786,"kind":"push","screen":"laptop","revision":2,"state":"Cart"},{"t":2286,"kind":"push","screen":"laptop","revision":3,"state":"Cleared","gap":13693},{"t":2286,"kind":"push","screen":"phone","revision":3,"state":"Cleared"}]}]} From 0b664030dcf1aaa16114fda184008ec17d9a3d8b Mon Sep 17 00:00:00 2001 From: Theauxm <43664045+Theauxm@users.noreply.github.com> Date: Tue, 20 Oct 2026 11:05:30 -0600 Subject: [PATCH 4/6] test(machines,tooling): guard the dependency direction around Trax.StateMachine Trax.StateMachine gets its own Tests.Meta with the folder-agnostic guards and the three public API baselines, which leave Effect's. Every folder's DependencyDirectionTests gains the Trax.StateMachine family between Effect and Mediator, so an Effect project that references a machine project, or a machine project that references the mediator, fails the build; both are pinned as cases. --- .../Tests/DependencyDirectionTests.cs | 135 ++++-- .../Tests/DependencyDirectionTests.cs | 135 ++++-- .../Tests/DependencyDirectionTests.cs | 135 ++++-- .../Tests/DependencyDirectionTests.cs | 135 ++++-- .../Tests/PublicApiSurfaceTests.cs | 9 - .../Trax.Effect.Tests.Meta.csproj | 3 - .../Trax.Effect.Tests.Meta/packages.lock.json | 42 -- .../Tests/DependencyDirectionTests.cs | 135 ++++-- .../Tests/DependencyDirectionTests.cs | 135 ++++-- .../Tests/DependencyDirectionTests.cs | 135 ++++-- Trax.StateMachine/{ => dotnet}/.gitignore | 0 .../dotnet/Trax.StateMachine.slnx | 1 + .../GlobalUsings.cs | 9 + .../Infrastructure/MonorepoRoot.cs | 32 ++ .../Infrastructure/RepoRoot.cs | 28 ++ .../Infrastructure/SourceFiles.cs | 43 ++ .../Infrastructure/SourceText.cs | 180 ++++++++ .../Infrastructure/SyntheticRepo.cs | 37 ++ ...Trax.StateMachine.Persistence.received.txt | 0 .../Trax.StateMachine.Testing.received.txt | 0 .../PublicApi/Trax.StateMachine.received.txt | 0 .../Tests/DependencyDirectionTests.cs | 201 +++++++++ .../Tests/DirectoryBuildPropsVersionTests.cs | 42 ++ .../Tests/ExtensionMethodNamingTests.cs | 99 +++++ .../Tests/NoFixedTaskDelayTests.cs | 116 +++++ .../Tests/NoIgnoreAttributeTests.cs | 66 +++ .../Tests/NoLegacyAssertTests.cs | 64 +++ .../Tests/NoOrphanPackageVersionTests.cs | 141 +++++++ .../Tests/NoTestFrameworkInSrcTests.cs | 229 ++++++++++ .../NoUnsynchronisedAssertAfterStartTests.cs | 40 ++ .../Tests/PublicApiSurfaceTests.cs | 132 ++++++ .../Tests/TestFolderLayoutTests.cs | 132 ++++++ ...TraxReferencesAreProjectReferencesTests.cs | 66 +++ .../Trax.StateMachine.Tests.Meta.csproj | 36 ++ .../packages.lock.json | 396 ++++++++++++++++++ 35 files changed, 2762 insertions(+), 327 deletions(-) rename Trax.StateMachine/{ => dotnet}/.gitignore (100%) create mode 100644 Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/GlobalUsings.cs create mode 100644 Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Infrastructure/MonorepoRoot.cs create mode 100644 Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Infrastructure/RepoRoot.cs create mode 100644 Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Infrastructure/SourceFiles.cs create mode 100644 Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Infrastructure/SourceText.cs create mode 100644 Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Infrastructure/SyntheticRepo.cs rename {Trax.Effect/tests/Trax.Effect.Tests.Meta => Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta}/PublicApi/Trax.StateMachine.Persistence.received.txt (100%) rename {Trax.Effect/tests/Trax.Effect.Tests.Meta => Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta}/PublicApi/Trax.StateMachine.Testing.received.txt (100%) rename {Trax.Effect/tests/Trax.Effect.Tests.Meta => Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta}/PublicApi/Trax.StateMachine.received.txt (100%) create mode 100644 Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/DependencyDirectionTests.cs create mode 100644 Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/DirectoryBuildPropsVersionTests.cs create mode 100644 Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/ExtensionMethodNamingTests.cs create mode 100644 Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoFixedTaskDelayTests.cs create mode 100644 Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoIgnoreAttributeTests.cs create mode 100644 Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoLegacyAssertTests.cs create mode 100644 Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoOrphanPackageVersionTests.cs create mode 100644 Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoTestFrameworkInSrcTests.cs create mode 100644 Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoUnsynchronisedAssertAfterStartTests.cs create mode 100644 Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/PublicApiSurfaceTests.cs create mode 100644 Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/TestFolderLayoutTests.cs create mode 100644 Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs create mode 100644 Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Trax.StateMachine.Tests.Meta.csproj create mode 100644 Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/packages.lock.json diff --git a/Trax.Api/tests/Trax.Api.Tests.Meta/Tests/DependencyDirectionTests.cs b/Trax.Api/tests/Trax.Api.Tests.Meta/Tests/DependencyDirectionTests.cs index aad829658..b0bd3d5c1 100644 --- a/Trax.Api/tests/Trax.Api.Tests.Meta/Tests/DependencyDirectionTests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.Meta/Tests/DependencyDirectionTests.cs @@ -1,19 +1,17 @@ namespace Trax.Api.Tests.Meta.Tests; /// -/// Enforces the Trax dependency chain (CLAUDE.md): a repo may reference a Trax.* package or project +/// Enforces the Trax dependency chain (AGENTS.md): a folder may reference a Trax.* package or project /// only in its own family or an allowed upstream family, never a downstream or parallel one. The map below -/// is the whole chain; the test self-detects which repo it runs in from the .slnx at the repo root -/// and applies that repo's rule, so the identical file lives in every repo's Meta project. +/// is the whole chain; the test self-detects which folder it runs in from the .slnx at the folder's +/// .NET root and applies that folder's rule, so the identical file lives in every folder's Meta project. /// -/// A ProjectReference is checked too, by the referenced project's file name. Today every one -/// stays inside its own family, so this changes nothing; once the families share one repository and depend -/// on each other through ProjectReference, it is what keeps the chain enforced. +/// A ProjectReference is checked too, by the referenced project's file name, which is the +/// package id the project packs as. /// -/// This catches an upstream repo pulling in a downstream one, for example a test that references -/// Trax.Api.GraphQL from inside Trax.Effect. That only compiles against the locally-packed feed and hides a -/// real layering inversion. Sibling checks that a legitimate -/// cross-repo reference is centrally managed; this one checks it points the right way in the first place. +/// This catches an upstream folder pulling in a downstream one, for example a test that references +/// Trax.Api.GraphQL from inside Trax.Effect, an Effect project that references a state-machine project, or a +/// state-machine project that references the mediator. /// /// Enforces Trax.Docs/adr/0003-a-repo-depends-only-on-what-is-upstream.md. /// @@ -21,10 +19,10 @@ namespace Trax.Api.Tests.Meta.Tests; [TestFixture] public class DependencyDirectionTests { - // For each repo family, the full set of upstream families it may PackageReference. Its own family is - // always allowed. Empirically matches the current graph and the chain: Core is the root; Effect -> Core; - // Mediator -> Effect; Scheduler -> Mediator; Api -> Scheduler; Cli -> Scheduler; - // Samples sits at the bottom and may reference everything upstream. + // For each family, the full set of upstream families it may reference. Its own family is always + // allowed. Core is the root; Effect -> Core; StateMachine -> Effect; Mediator -> StateMachine; + // Scheduler -> Mediator; Api -> Scheduler; Cli -> Scheduler; Samples sits at the bottom and may + // reference everything upstream. private static readonly IReadOnlyDictionary AllowedUpstream = new Dictionary< string, string[] @@ -32,14 +30,36 @@ public class DependencyDirectionTests { ["Trax.Core"] = Array.Empty(), ["Trax.Effect"] = new[] { "Trax.Core" }, - ["Trax.Mediator"] = new[] { "Trax.Core", "Trax.Effect" }, - ["Trax.Scheduler"] = new[] { "Trax.Core", "Trax.Effect", "Trax.Mediator" }, - ["Trax.Api"] = new[] { "Trax.Core", "Trax.Effect", "Trax.Mediator", "Trax.Scheduler" }, - ["Trax.Cli"] = new[] { "Trax.Core", "Trax.Effect", "Trax.Mediator", "Trax.Scheduler" }, + ["Trax.StateMachine"] = new[] { "Trax.Core", "Trax.Effect" }, + ["Trax.Mediator"] = new[] { "Trax.Core", "Trax.Effect", "Trax.StateMachine" }, + ["Trax.Scheduler"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + }, + ["Trax.Api"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + "Trax.Scheduler", + }, + ["Trax.Cli"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + "Trax.Scheduler", + }, ["Trax.Samples"] = new[] { "Trax.Core", "Trax.Effect", + "Trax.StateMachine", "Trax.Mediator", "Trax.Scheduler", "Trax.Api", @@ -51,6 +71,7 @@ public class DependencyDirectionTests { "Trax.Core", "Trax.Effect", + "Trax.StateMachine", "Trax.Mediator", "Trax.Scheduler", "Trax.Api", @@ -63,53 +84,89 @@ public void No_project_references_a_downstream_or_parallel_Trax_package() { var repo = DetectRepo(); repo.Should() - .NotBeNull( - "the current repo family should be detectable from the .slnx at the repo root" - ); - - var allowed = new HashSet(AllowedUpstream[repo!], StringComparer.Ordinal) { repo! }; - var offenders = new List(); + .NotBeNull("the current folder family should be detectable from the .slnx at its root"); + var projects = new List<(string Path, XDocument Project)>(); foreach (var csproj in SourceFiles.Projects()) { - XDocument doc; try { - doc = XDocument.Load(csproj); + projects.Add((RepoRoot.Relative(csproj), XDocument.Load(csproj))); } catch (Exception ex) { Assert.Fail($"Failed to parse {RepoRoot.Relative(csproj)}: {ex.Message}"); return; } + } + + Offenders(repo!, projects) + .Should() + .BeEmpty( + $"{repo} may reference only its own family and its allowed upstream " + + $"[{string.Join(", ", AllowedUpstream[repo!])}] per the Trax dependency chain. A " + + "package or project reference to any other Trax family points the wrong way " + + "(downstream or parallel). Offenders:\n " + + string.Join("\n ", Offenders(repo!, projects)) + ); + } + + [TestCase("Trax.StateMachine", "Trax.Mediator")] + [TestCase("Trax.StateMachine", "Trax.Mediator.Testing")] + [TestCase("Trax.Effect", "Trax.StateMachine")] + [TestCase("Trax.Effect", "Trax.StateMachine.Persistence")] + public void A_reference_against_the_chain_is_refused(string folder, string referenced) + { + Offenders(folder, [("x.csproj", ProjectReferencing(referenced))]) + .Should() + .ContainSingle( + $"{folder} is upstream of {referenced}'s family, so referencing it points the wrong way" + ); + } + + [TestCase("Trax.StateMachine", "Trax.Effect.Data")] + [TestCase("Trax.Mediator", "Trax.StateMachine.Persistence")] + public void A_reference_along_the_chain_is_allowed(string folder, string referenced) + { + Offenders(folder, [("x.csproj", ProjectReferencing(referenced))]) + .Should() + .BeEmpty($"{referenced} is in a family upstream of {folder}"); + } - foreach (var reference in doc.Descendants()) + // Every reference in the given projects to a Trax family the folder may not reach, as + // "project -> reference [family]". + private static List Offenders( + string repo, + IEnumerable<(string Path, XDocument Project)> projects + ) + { + var allowed = new HashSet(AllowedUpstream[repo], StringComparer.Ordinal) { repo }; + var offenders = new List(); + foreach (var (path, project) in projects) + { + foreach (var reference in project.Descendants()) { var include = ReferencedName(reference); if (include is null || !include.StartsWith("Trax.", StringComparison.Ordinal)) continue; - // A Trax package outside the seven core-repo families (e.g. a standalone Trax.Runner.*) + // A Trax package outside the folder families (e.g. a standalone Trax.Runner.*) // is out of scope for this chain guard; skip it rather than flag it. var family = FamilyOf(include); if (family is null) continue; if (!allowed.Contains(family)) - offenders.Add($"{RepoRoot.Relative(csproj)} -> {include} [{family}]"); + offenders.Add($"{path} -> {include} [{family}]"); } } - - offenders - .Should() - .BeEmpty( - $"{repo} may reference only its own family and its allowed upstream " - + $"[{string.Join(", ", AllowedUpstream[repo!])}] per the Trax dependency chain. A " - + "package or project reference to any other Trax family points the wrong way " - + "(downstream or parallel). Offenders:\n " - + string.Join("\n ", offenders) - ); + return offenders; } + private static XDocument ProjectReferencing(string referenced) => + XDocument.Parse( + $"""""" + ); + // The package id of a PackageReference, or the project name of a ProjectReference (its file name without // the extension, which is the package id the project packs as). Any other element yields null. private static string? ReferencedName(XElement reference) diff --git a/Trax.Cli/tests/Trax.Cli.Tests.Meta/Tests/DependencyDirectionTests.cs b/Trax.Cli/tests/Trax.Cli.Tests.Meta/Tests/DependencyDirectionTests.cs index 73ead5c5f..538f16f77 100644 --- a/Trax.Cli/tests/Trax.Cli.Tests.Meta/Tests/DependencyDirectionTests.cs +++ b/Trax.Cli/tests/Trax.Cli.Tests.Meta/Tests/DependencyDirectionTests.cs @@ -1,19 +1,17 @@ namespace Trax.Cli.Tests.Meta.Tests; /// -/// Enforces the Trax dependency chain (CLAUDE.md): a repo may reference a Trax.* package or project +/// Enforces the Trax dependency chain (AGENTS.md): a folder may reference a Trax.* package or project /// only in its own family or an allowed upstream family, never a downstream or parallel one. The map below -/// is the whole chain; the test self-detects which repo it runs in from the .slnx at the repo root -/// and applies that repo's rule, so the identical file lives in every repo's Meta project. +/// is the whole chain; the test self-detects which folder it runs in from the .slnx at the folder's +/// .NET root and applies that folder's rule, so the identical file lives in every folder's Meta project. /// -/// A ProjectReference is checked too, by the referenced project's file name. Today every one -/// stays inside its own family, so this changes nothing; once the families share one repository and depend -/// on each other through ProjectReference, it is what keeps the chain enforced. +/// A ProjectReference is checked too, by the referenced project's file name, which is the +/// package id the project packs as. /// -/// This catches an upstream repo pulling in a downstream one, for example a test that references -/// Trax.Api.GraphQL from inside Trax.Effect. That only compiles against the locally-packed feed and hides a -/// real layering inversion. Sibling checks that a legitimate -/// cross-repo reference is centrally managed; this one checks it points the right way in the first place. +/// This catches an upstream folder pulling in a downstream one, for example a test that references +/// Trax.Api.GraphQL from inside Trax.Effect, an Effect project that references a state-machine project, or a +/// state-machine project that references the mediator. /// /// Enforces Trax.Docs/adr/0003-a-repo-depends-only-on-what-is-upstream.md. /// @@ -21,10 +19,10 @@ namespace Trax.Cli.Tests.Meta.Tests; [TestFixture] public class DependencyDirectionTests { - // For each repo family, the full set of upstream families it may PackageReference. Its own family is - // always allowed. Empirically matches the current graph and the chain: Core is the root; Effect -> Core; - // Mediator -> Effect; Scheduler -> Mediator; Api -> Scheduler; Cli -> Scheduler; - // Samples sits at the bottom and may reference everything upstream. + // For each family, the full set of upstream families it may reference. Its own family is always + // allowed. Core is the root; Effect -> Core; StateMachine -> Effect; Mediator -> StateMachine; + // Scheduler -> Mediator; Api -> Scheduler; Cli -> Scheduler; Samples sits at the bottom and may + // reference everything upstream. private static readonly IReadOnlyDictionary AllowedUpstream = new Dictionary< string, string[] @@ -32,14 +30,36 @@ public class DependencyDirectionTests { ["Trax.Core"] = Array.Empty(), ["Trax.Effect"] = new[] { "Trax.Core" }, - ["Trax.Mediator"] = new[] { "Trax.Core", "Trax.Effect" }, - ["Trax.Scheduler"] = new[] { "Trax.Core", "Trax.Effect", "Trax.Mediator" }, - ["Trax.Api"] = new[] { "Trax.Core", "Trax.Effect", "Trax.Mediator", "Trax.Scheduler" }, - ["Trax.Cli"] = new[] { "Trax.Core", "Trax.Effect", "Trax.Mediator", "Trax.Scheduler" }, + ["Trax.StateMachine"] = new[] { "Trax.Core", "Trax.Effect" }, + ["Trax.Mediator"] = new[] { "Trax.Core", "Trax.Effect", "Trax.StateMachine" }, + ["Trax.Scheduler"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + }, + ["Trax.Api"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + "Trax.Scheduler", + }, + ["Trax.Cli"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + "Trax.Scheduler", + }, ["Trax.Samples"] = new[] { "Trax.Core", "Trax.Effect", + "Trax.StateMachine", "Trax.Mediator", "Trax.Scheduler", "Trax.Api", @@ -51,6 +71,7 @@ public class DependencyDirectionTests { "Trax.Core", "Trax.Effect", + "Trax.StateMachine", "Trax.Mediator", "Trax.Scheduler", "Trax.Api", @@ -63,53 +84,89 @@ public void No_project_references_a_downstream_or_parallel_Trax_package() { var repo = DetectRepo(); repo.Should() - .NotBeNull( - "the current repo family should be detectable from the .slnx at the repo root" - ); - - var allowed = new HashSet(AllowedUpstream[repo!], StringComparer.Ordinal) { repo! }; - var offenders = new List(); + .NotBeNull("the current folder family should be detectable from the .slnx at its root"); + var projects = new List<(string Path, XDocument Project)>(); foreach (var csproj in SourceFiles.Projects()) { - XDocument doc; try { - doc = XDocument.Load(csproj); + projects.Add((RepoRoot.Relative(csproj), XDocument.Load(csproj))); } catch (Exception ex) { Assert.Fail($"Failed to parse {RepoRoot.Relative(csproj)}: {ex.Message}"); return; } + } + + Offenders(repo!, projects) + .Should() + .BeEmpty( + $"{repo} may reference only its own family and its allowed upstream " + + $"[{string.Join(", ", AllowedUpstream[repo!])}] per the Trax dependency chain. A " + + "package or project reference to any other Trax family points the wrong way " + + "(downstream or parallel). Offenders:\n " + + string.Join("\n ", Offenders(repo!, projects)) + ); + } + + [TestCase("Trax.StateMachine", "Trax.Mediator")] + [TestCase("Trax.StateMachine", "Trax.Mediator.Testing")] + [TestCase("Trax.Effect", "Trax.StateMachine")] + [TestCase("Trax.Effect", "Trax.StateMachine.Persistence")] + public void A_reference_against_the_chain_is_refused(string folder, string referenced) + { + Offenders(folder, [("x.csproj", ProjectReferencing(referenced))]) + .Should() + .ContainSingle( + $"{folder} is upstream of {referenced}'s family, so referencing it points the wrong way" + ); + } + + [TestCase("Trax.StateMachine", "Trax.Effect.Data")] + [TestCase("Trax.Mediator", "Trax.StateMachine.Persistence")] + public void A_reference_along_the_chain_is_allowed(string folder, string referenced) + { + Offenders(folder, [("x.csproj", ProjectReferencing(referenced))]) + .Should() + .BeEmpty($"{referenced} is in a family upstream of {folder}"); + } - foreach (var reference in doc.Descendants()) + // Every reference in the given projects to a Trax family the folder may not reach, as + // "project -> reference [family]". + private static List Offenders( + string repo, + IEnumerable<(string Path, XDocument Project)> projects + ) + { + var allowed = new HashSet(AllowedUpstream[repo], StringComparer.Ordinal) { repo }; + var offenders = new List(); + foreach (var (path, project) in projects) + { + foreach (var reference in project.Descendants()) { var include = ReferencedName(reference); if (include is null || !include.StartsWith("Trax.", StringComparison.Ordinal)) continue; - // A Trax package outside the seven core-repo families (e.g. a standalone Trax.Runner.*) + // A Trax package outside the folder families (e.g. a standalone Trax.Runner.*) // is out of scope for this chain guard; skip it rather than flag it. var family = FamilyOf(include); if (family is null) continue; if (!allowed.Contains(family)) - offenders.Add($"{RepoRoot.Relative(csproj)} -> {include} [{family}]"); + offenders.Add($"{path} -> {include} [{family}]"); } } - - offenders - .Should() - .BeEmpty( - $"{repo} may reference only its own family and its allowed upstream " - + $"[{string.Join(", ", AllowedUpstream[repo!])}] per the Trax dependency chain. A " - + "package or project reference to any other Trax family points the wrong way " - + "(downstream or parallel). Offenders:\n " - + string.Join("\n ", offenders) - ); + return offenders; } + private static XDocument ProjectReferencing(string referenced) => + XDocument.Parse( + $"""""" + ); + // The package id of a PackageReference, or the project name of a ProjectReference (its file name without // the extension, which is the package id the project packs as). Any other element yields null. private static string? ReferencedName(XElement reference) diff --git a/Trax.Core/tests/Trax.Core.Tests.Meta/Tests/DependencyDirectionTests.cs b/Trax.Core/tests/Trax.Core.Tests.Meta/Tests/DependencyDirectionTests.cs index c4696ee90..5c03c64e7 100644 --- a/Trax.Core/tests/Trax.Core.Tests.Meta/Tests/DependencyDirectionTests.cs +++ b/Trax.Core/tests/Trax.Core.Tests.Meta/Tests/DependencyDirectionTests.cs @@ -1,19 +1,17 @@ namespace Trax.Core.Tests.Meta.Tests; /// -/// Enforces the Trax dependency chain (CLAUDE.md): a repo may reference a Trax.* package or project +/// Enforces the Trax dependency chain (AGENTS.md): a folder may reference a Trax.* package or project /// only in its own family or an allowed upstream family, never a downstream or parallel one. The map below -/// is the whole chain; the test self-detects which repo it runs in from the .slnx at the repo root -/// and applies that repo's rule, so the identical file lives in every repo's Meta project. +/// is the whole chain; the test self-detects which folder it runs in from the .slnx at the folder's +/// .NET root and applies that folder's rule, so the identical file lives in every folder's Meta project. /// -/// A ProjectReference is checked too, by the referenced project's file name. Today every one -/// stays inside its own family, so this changes nothing; once the families share one repository and depend -/// on each other through ProjectReference, it is what keeps the chain enforced. +/// A ProjectReference is checked too, by the referenced project's file name, which is the +/// package id the project packs as. /// -/// This catches an upstream repo pulling in a downstream one, for example a test that references -/// Trax.Api.GraphQL from inside Trax.Effect. That only compiles against the locally-packed feed and hides a -/// real layering inversion. Sibling checks that a legitimate -/// cross-repo reference is centrally managed; this one checks it points the right way in the first place. +/// This catches an upstream folder pulling in a downstream one, for example a test that references +/// Trax.Api.GraphQL from inside Trax.Effect, an Effect project that references a state-machine project, or a +/// state-machine project that references the mediator. /// /// Enforces Trax.Docs/adr/0003-a-repo-depends-only-on-what-is-upstream.md. /// @@ -21,10 +19,10 @@ namespace Trax.Core.Tests.Meta.Tests; [TestFixture] public class DependencyDirectionTests { - // For each repo family, the full set of upstream families it may PackageReference. Its own family is - // always allowed. Empirically matches the current graph and the chain: Core is the root; Effect -> Core; - // Mediator -> Effect; Scheduler -> Mediator; Api -> Scheduler; Cli -> Scheduler; - // Samples sits at the bottom and may reference everything upstream. + // For each family, the full set of upstream families it may reference. Its own family is always + // allowed. Core is the root; Effect -> Core; StateMachine -> Effect; Mediator -> StateMachine; + // Scheduler -> Mediator; Api -> Scheduler; Cli -> Scheduler; Samples sits at the bottom and may + // reference everything upstream. private static readonly IReadOnlyDictionary AllowedUpstream = new Dictionary< string, string[] @@ -32,14 +30,36 @@ public class DependencyDirectionTests { ["Trax.Core"] = Array.Empty(), ["Trax.Effect"] = new[] { "Trax.Core" }, - ["Trax.Mediator"] = new[] { "Trax.Core", "Trax.Effect" }, - ["Trax.Scheduler"] = new[] { "Trax.Core", "Trax.Effect", "Trax.Mediator" }, - ["Trax.Api"] = new[] { "Trax.Core", "Trax.Effect", "Trax.Mediator", "Trax.Scheduler" }, - ["Trax.Cli"] = new[] { "Trax.Core", "Trax.Effect", "Trax.Mediator", "Trax.Scheduler" }, + ["Trax.StateMachine"] = new[] { "Trax.Core", "Trax.Effect" }, + ["Trax.Mediator"] = new[] { "Trax.Core", "Trax.Effect", "Trax.StateMachine" }, + ["Trax.Scheduler"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + }, + ["Trax.Api"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + "Trax.Scheduler", + }, + ["Trax.Cli"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + "Trax.Scheduler", + }, ["Trax.Samples"] = new[] { "Trax.Core", "Trax.Effect", + "Trax.StateMachine", "Trax.Mediator", "Trax.Scheduler", "Trax.Api", @@ -51,6 +71,7 @@ public class DependencyDirectionTests { "Trax.Core", "Trax.Effect", + "Trax.StateMachine", "Trax.Mediator", "Trax.Scheduler", "Trax.Api", @@ -63,53 +84,89 @@ public void No_project_references_a_downstream_or_parallel_Trax_package() { var repo = DetectRepo(); repo.Should() - .NotBeNull( - "the current repo family should be detectable from the .slnx at the repo root" - ); - - var allowed = new HashSet(AllowedUpstream[repo!], StringComparer.Ordinal) { repo! }; - var offenders = new List(); + .NotBeNull("the current folder family should be detectable from the .slnx at its root"); + var projects = new List<(string Path, XDocument Project)>(); foreach (var csproj in SourceFiles.Projects()) { - XDocument doc; try { - doc = XDocument.Load(csproj); + projects.Add((RepoRoot.Relative(csproj), XDocument.Load(csproj))); } catch (Exception ex) { Assert.Fail($"Failed to parse {RepoRoot.Relative(csproj)}: {ex.Message}"); return; } + } + + Offenders(repo!, projects) + .Should() + .BeEmpty( + $"{repo} may reference only its own family and its allowed upstream " + + $"[{string.Join(", ", AllowedUpstream[repo!])}] per the Trax dependency chain. A " + + "package or project reference to any other Trax family points the wrong way " + + "(downstream or parallel). Offenders:\n " + + string.Join("\n ", Offenders(repo!, projects)) + ); + } + + [TestCase("Trax.StateMachine", "Trax.Mediator")] + [TestCase("Trax.StateMachine", "Trax.Mediator.Testing")] + [TestCase("Trax.Effect", "Trax.StateMachine")] + [TestCase("Trax.Effect", "Trax.StateMachine.Persistence")] + public void A_reference_against_the_chain_is_refused(string folder, string referenced) + { + Offenders(folder, [("x.csproj", ProjectReferencing(referenced))]) + .Should() + .ContainSingle( + $"{folder} is upstream of {referenced}'s family, so referencing it points the wrong way" + ); + } + + [TestCase("Trax.StateMachine", "Trax.Effect.Data")] + [TestCase("Trax.Mediator", "Trax.StateMachine.Persistence")] + public void A_reference_along_the_chain_is_allowed(string folder, string referenced) + { + Offenders(folder, [("x.csproj", ProjectReferencing(referenced))]) + .Should() + .BeEmpty($"{referenced} is in a family upstream of {folder}"); + } - foreach (var reference in doc.Descendants()) + // Every reference in the given projects to a Trax family the folder may not reach, as + // "project -> reference [family]". + private static List Offenders( + string repo, + IEnumerable<(string Path, XDocument Project)> projects + ) + { + var allowed = new HashSet(AllowedUpstream[repo], StringComparer.Ordinal) { repo }; + var offenders = new List(); + foreach (var (path, project) in projects) + { + foreach (var reference in project.Descendants()) { var include = ReferencedName(reference); if (include is null || !include.StartsWith("Trax.", StringComparison.Ordinal)) continue; - // A Trax package outside the seven core-repo families (e.g. a standalone Trax.Runner.*) + // A Trax package outside the folder families (e.g. a standalone Trax.Runner.*) // is out of scope for this chain guard; skip it rather than flag it. var family = FamilyOf(include); if (family is null) continue; if (!allowed.Contains(family)) - offenders.Add($"{RepoRoot.Relative(csproj)} -> {include} [{family}]"); + offenders.Add($"{path} -> {include} [{family}]"); } } - - offenders - .Should() - .BeEmpty( - $"{repo} may reference only its own family and its allowed upstream " - + $"[{string.Join(", ", AllowedUpstream[repo!])}] per the Trax dependency chain. A " - + "package or project reference to any other Trax family points the wrong way " - + "(downstream or parallel). Offenders:\n " - + string.Join("\n ", offenders) - ); + return offenders; } + private static XDocument ProjectReferencing(string referenced) => + XDocument.Parse( + $"""""" + ); + // The package id of a PackageReference, or the project name of a ProjectReference (its file name without // the extension, which is the package id the project packs as). Any other element yields null. private static string? ReferencedName(XElement reference) diff --git a/Trax.Effect/tests/Trax.Effect.Tests.Meta/Tests/DependencyDirectionTests.cs b/Trax.Effect/tests/Trax.Effect.Tests.Meta/Tests/DependencyDirectionTests.cs index d769abfc4..bfa069faf 100644 --- a/Trax.Effect/tests/Trax.Effect.Tests.Meta/Tests/DependencyDirectionTests.cs +++ b/Trax.Effect/tests/Trax.Effect.Tests.Meta/Tests/DependencyDirectionTests.cs @@ -1,19 +1,17 @@ namespace Trax.Effect.Tests.Meta.Tests; /// -/// Enforces the Trax dependency chain (CLAUDE.md): a repo may reference a Trax.* package or project +/// Enforces the Trax dependency chain (AGENTS.md): a folder may reference a Trax.* package or project /// only in its own family or an allowed upstream family, never a downstream or parallel one. The map below -/// is the whole chain; the test self-detects which repo it runs in from the .slnx at the repo root -/// and applies that repo's rule, so the identical file lives in every repo's Meta project. +/// is the whole chain; the test self-detects which folder it runs in from the .slnx at the folder's +/// .NET root and applies that folder's rule, so the identical file lives in every folder's Meta project. /// -/// A ProjectReference is checked too, by the referenced project's file name. Today every one -/// stays inside its own family, so this changes nothing; once the families share one repository and depend -/// on each other through ProjectReference, it is what keeps the chain enforced. +/// A ProjectReference is checked too, by the referenced project's file name, which is the +/// package id the project packs as. /// -/// This catches an upstream repo pulling in a downstream one, for example a test that references -/// Trax.Api.GraphQL from inside Trax.Effect. That only compiles against the locally-packed feed and hides a -/// real layering inversion. Sibling checks that a legitimate -/// cross-repo reference is centrally managed; this one checks it points the right way in the first place. +/// This catches an upstream folder pulling in a downstream one, for example a test that references +/// Trax.Api.GraphQL from inside Trax.Effect, an Effect project that references a state-machine project, or a +/// state-machine project that references the mediator. /// /// Enforces Trax.Docs/adr/0003-a-repo-depends-only-on-what-is-upstream.md. /// @@ -21,10 +19,10 @@ namespace Trax.Effect.Tests.Meta.Tests; [TestFixture] public class DependencyDirectionTests { - // For each repo family, the full set of upstream families it may PackageReference. Its own family is - // always allowed. Empirically matches the current graph and the chain: Core is the root; Effect -> Core; - // Mediator -> Effect; Scheduler -> Mediator; Api -> Scheduler; Cli -> Scheduler; - // Samples sits at the bottom and may reference everything upstream. + // For each family, the full set of upstream families it may reference. Its own family is always + // allowed. Core is the root; Effect -> Core; StateMachine -> Effect; Mediator -> StateMachine; + // Scheduler -> Mediator; Api -> Scheduler; Cli -> Scheduler; Samples sits at the bottom and may + // reference everything upstream. private static readonly IReadOnlyDictionary AllowedUpstream = new Dictionary< string, string[] @@ -32,14 +30,36 @@ public class DependencyDirectionTests { ["Trax.Core"] = Array.Empty(), ["Trax.Effect"] = new[] { "Trax.Core" }, - ["Trax.Mediator"] = new[] { "Trax.Core", "Trax.Effect" }, - ["Trax.Scheduler"] = new[] { "Trax.Core", "Trax.Effect", "Trax.Mediator" }, - ["Trax.Api"] = new[] { "Trax.Core", "Trax.Effect", "Trax.Mediator", "Trax.Scheduler" }, - ["Trax.Cli"] = new[] { "Trax.Core", "Trax.Effect", "Trax.Mediator", "Trax.Scheduler" }, + ["Trax.StateMachine"] = new[] { "Trax.Core", "Trax.Effect" }, + ["Trax.Mediator"] = new[] { "Trax.Core", "Trax.Effect", "Trax.StateMachine" }, + ["Trax.Scheduler"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + }, + ["Trax.Api"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + "Trax.Scheduler", + }, + ["Trax.Cli"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + "Trax.Scheduler", + }, ["Trax.Samples"] = new[] { "Trax.Core", "Trax.Effect", + "Trax.StateMachine", "Trax.Mediator", "Trax.Scheduler", "Trax.Api", @@ -51,6 +71,7 @@ public class DependencyDirectionTests { "Trax.Core", "Trax.Effect", + "Trax.StateMachine", "Trax.Mediator", "Trax.Scheduler", "Trax.Api", @@ -63,53 +84,89 @@ public void No_project_references_a_downstream_or_parallel_Trax_package() { var repo = DetectRepo(); repo.Should() - .NotBeNull( - "the current repo family should be detectable from the .slnx at the repo root" - ); - - var allowed = new HashSet(AllowedUpstream[repo!], StringComparer.Ordinal) { repo! }; - var offenders = new List(); + .NotBeNull("the current folder family should be detectable from the .slnx at its root"); + var projects = new List<(string Path, XDocument Project)>(); foreach (var csproj in SourceFiles.Projects()) { - XDocument doc; try { - doc = XDocument.Load(csproj); + projects.Add((RepoRoot.Relative(csproj), XDocument.Load(csproj))); } catch (Exception ex) { Assert.Fail($"Failed to parse {RepoRoot.Relative(csproj)}: {ex.Message}"); return; } + } + + Offenders(repo!, projects) + .Should() + .BeEmpty( + $"{repo} may reference only its own family and its allowed upstream " + + $"[{string.Join(", ", AllowedUpstream[repo!])}] per the Trax dependency chain. A " + + "package or project reference to any other Trax family points the wrong way " + + "(downstream or parallel). Offenders:\n " + + string.Join("\n ", Offenders(repo!, projects)) + ); + } + + [TestCase("Trax.StateMachine", "Trax.Mediator")] + [TestCase("Trax.StateMachine", "Trax.Mediator.Testing")] + [TestCase("Trax.Effect", "Trax.StateMachine")] + [TestCase("Trax.Effect", "Trax.StateMachine.Persistence")] + public void A_reference_against_the_chain_is_refused(string folder, string referenced) + { + Offenders(folder, [("x.csproj", ProjectReferencing(referenced))]) + .Should() + .ContainSingle( + $"{folder} is upstream of {referenced}'s family, so referencing it points the wrong way" + ); + } + + [TestCase("Trax.StateMachine", "Trax.Effect.Data")] + [TestCase("Trax.Mediator", "Trax.StateMachine.Persistence")] + public void A_reference_along_the_chain_is_allowed(string folder, string referenced) + { + Offenders(folder, [("x.csproj", ProjectReferencing(referenced))]) + .Should() + .BeEmpty($"{referenced} is in a family upstream of {folder}"); + } - foreach (var reference in doc.Descendants()) + // Every reference in the given projects to a Trax family the folder may not reach, as + // "project -> reference [family]". + private static List Offenders( + string repo, + IEnumerable<(string Path, XDocument Project)> projects + ) + { + var allowed = new HashSet(AllowedUpstream[repo], StringComparer.Ordinal) { repo }; + var offenders = new List(); + foreach (var (path, project) in projects) + { + foreach (var reference in project.Descendants()) { var include = ReferencedName(reference); if (include is null || !include.StartsWith("Trax.", StringComparison.Ordinal)) continue; - // A Trax package outside the seven core-repo families (e.g. a standalone Trax.Runner.*) + // A Trax package outside the folder families (e.g. a standalone Trax.Runner.*) // is out of scope for this chain guard; skip it rather than flag it. var family = FamilyOf(include); if (family is null) continue; if (!allowed.Contains(family)) - offenders.Add($"{RepoRoot.Relative(csproj)} -> {include} [{family}]"); + offenders.Add($"{path} -> {include} [{family}]"); } } - - offenders - .Should() - .BeEmpty( - $"{repo} may reference only its own family and its allowed upstream " - + $"[{string.Join(", ", AllowedUpstream[repo!])}] per the Trax dependency chain. A " - + "package or project reference to any other Trax family points the wrong way " - + "(downstream or parallel). Offenders:\n " - + string.Join("\n ", offenders) - ); + return offenders; } + private static XDocument ProjectReferencing(string referenced) => + XDocument.Parse( + $"""""" + ); + // The package id of a PackageReference, or the project name of a ProjectReference (its file name without // the extension, which is the package id the project packs as). Any other element yields null. private static string? ReferencedName(XElement reference) diff --git a/Trax.Effect/tests/Trax.Effect.Tests.Meta/Tests/PublicApiSurfaceTests.cs b/Trax.Effect/tests/Trax.Effect.Tests.Meta/Tests/PublicApiSurfaceTests.cs index d71d75f0a..ee848eb57 100644 --- a/Trax.Effect/tests/Trax.Effect.Tests.Meta/Tests/PublicApiSurfaceTests.cs +++ b/Trax.Effect/tests/Trax.Effect.Tests.Meta/Tests/PublicApiSurfaceTests.cs @@ -63,15 +63,6 @@ public static IEnumerable Assemblies() yield return new TestCaseData( typeof(Trax.Effect.Provider.Parameter.Configuration.ParameterEffectConfiguration).Assembly ).SetName("Trax.Effect.Provider.Parameter"); - yield return new TestCaseData(typeof(Trax.StateMachine.CorpusReplay).Assembly).SetName( - "Trax.StateMachine" - ); - yield return new TestCaseData( - typeof(Trax.StateMachine.Persistence.ISnapshotStore).Assembly - ).SetName("Trax.StateMachine.Persistence"); - yield return new TestCaseData( - typeof(Trax.StateMachine.Testing.DifferentialCorpus).Assembly - ).SetName("Trax.StateMachine.Testing"); yield return new TestCaseData( typeof(Trax.Effect.Decisions.SystemOne.SystemOneDecider).Assembly ).SetName("Trax.Effect.Decisions.SystemOne"); diff --git a/Trax.Effect/tests/Trax.Effect.Tests.Meta/Trax.Effect.Tests.Meta.csproj b/Trax.Effect/tests/Trax.Effect.Tests.Meta/Trax.Effect.Tests.Meta.csproj index 2acedff70..3cf8bb083 100644 --- a/Trax.Effect/tests/Trax.Effect.Tests.Meta/Trax.Effect.Tests.Meta.csproj +++ b/Trax.Effect/tests/Trax.Effect.Tests.Meta/Trax.Effect.Tests.Meta.csproj @@ -35,9 +35,6 @@ - - - diff --git a/Trax.Effect/tests/Trax.Effect.Tests.Meta/packages.lock.json b/Trax.Effect/tests/Trax.Effect.Tests.Meta/packages.lock.json index 2c817ec32..3d095f30d 100644 --- a/Trax.Effect/tests/Trax.Effect.Tests.Meta/packages.lock.json +++ b/Trax.Effect/tests/Trax.Effect.Tests.Meta/packages.lock.json @@ -186,11 +186,6 @@ "Microsoft.Extensions.Options": "10.0.12" } }, - "Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions": { - "type": "Transitive", - "resolved": "10.0.12", - "contentHash": "oN4AYFq+50m7a65GgRxRqjdynWS6kVQAH6gHKRTfsrLP/aH7RvxIQ7139fjbnrxBwzfZQtZRhlcjvEIiRzihrg==" - }, "Microsoft.Extensions.FileProviders.Abstractions": { "type": "Transitive", "resolved": "10.0.12", @@ -405,31 +400,6 @@ "Trax.Effect": "[1.99.99, )" } }, - "trax.statemachine": { - "type": "Project", - "dependencies": { - "Trax.Effect": "[1.99.99, )" - } - }, - "trax.statemachine.persistence": { - "type": "Project", - "dependencies": { - "Microsoft.EntityFrameworkCore": "[10.0.12, )", - "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", - "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", - "Trax.Effect": "[1.99.99, )", - "Trax.Effect.Data": "[1.99.99, )", - "Trax.StateMachine": "[1.99.99, )" - } - }, - "trax.statemachine.testing": { - "type": "Project", - "dependencies": { - "Trax.StateMachine": "[1.99.99, )", - "Trax.StateMachine.Persistence": "[1.99.99, )" - } - }, "dbup-core": { "type": "CentralTransitive", "requested": "[6.1.1, )", @@ -541,18 +511,6 @@ "resolved": "10.0.13", "contentHash": "G2GrGWNAPZBsii2F6AU8n+JT2tC1/I0Ml/e9ZyNCgPjf3hZqronP7o0X91aAynCmVeae8KkSIUNXXeXCNRmdVQ==" }, - "Microsoft.Extensions.Diagnostics.HealthChecks": { - "type": "CentralTransitive", - "requested": "[10.0.12, )", - "resolved": "10.0.12", - "contentHash": "Ck8nkBxEYPOGtUCp0whKwfE4qAHBnsK0DY1kgZLKvzf7s9xyr4lASa4K4AKNN1VHy7r3Z1Z57U6C0TMzFjD8ig==", - "dependencies": { - "Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions": "10.0.12", - "Microsoft.Extensions.Hosting.Abstractions": "10.0.12", - "Microsoft.Extensions.Logging.Abstractions": "10.0.12", - "Microsoft.Extensions.Options": "10.0.12" - } - }, "Microsoft.Extensions.Hosting.Abstractions": { "type": "CentralTransitive", "requested": "[10.0.12, )", diff --git a/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/Tests/DependencyDirectionTests.cs b/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/Tests/DependencyDirectionTests.cs index 1c87cc5b2..5a778ea52 100644 --- a/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/Tests/DependencyDirectionTests.cs +++ b/Trax.Mediator/tests/Trax.Mediator.Tests.Meta/Tests/DependencyDirectionTests.cs @@ -1,19 +1,17 @@ namespace Trax.Mediator.Tests.Meta.Tests; /// -/// Enforces the Trax dependency chain (CLAUDE.md): a repo may reference a Trax.* package or project +/// Enforces the Trax dependency chain (AGENTS.md): a folder may reference a Trax.* package or project /// only in its own family or an allowed upstream family, never a downstream or parallel one. The map below -/// is the whole chain; the test self-detects which repo it runs in from the .slnx at the repo root -/// and applies that repo's rule, so the identical file lives in every repo's Meta project. +/// is the whole chain; the test self-detects which folder it runs in from the .slnx at the folder's +/// .NET root and applies that folder's rule, so the identical file lives in every folder's Meta project. /// -/// A ProjectReference is checked too, by the referenced project's file name. Today every one -/// stays inside its own family, so this changes nothing; once the families share one repository and depend -/// on each other through ProjectReference, it is what keeps the chain enforced. +/// A ProjectReference is checked too, by the referenced project's file name, which is the +/// package id the project packs as. /// -/// This catches an upstream repo pulling in a downstream one, for example a test that references -/// Trax.Api.GraphQL from inside Trax.Effect. That only compiles against the locally-packed feed and hides a -/// real layering inversion. Sibling checks that a legitimate -/// cross-repo reference is centrally managed; this one checks it points the right way in the first place. +/// This catches an upstream folder pulling in a downstream one, for example a test that references +/// Trax.Api.GraphQL from inside Trax.Effect, an Effect project that references a state-machine project, or a +/// state-machine project that references the mediator. /// /// Enforces Trax.Docs/adr/0003-a-repo-depends-only-on-what-is-upstream.md. /// @@ -21,10 +19,10 @@ namespace Trax.Mediator.Tests.Meta.Tests; [TestFixture] public class DependencyDirectionTests { - // For each repo family, the full set of upstream families it may PackageReference. Its own family is - // always allowed. Empirically matches the current graph and the chain: Core is the root; Effect -> Core; - // Mediator -> Effect; Scheduler -> Mediator; Api -> Scheduler; Cli -> Scheduler; - // Samples sits at the bottom and may reference everything upstream. + // For each family, the full set of upstream families it may reference. Its own family is always + // allowed. Core is the root; Effect -> Core; StateMachine -> Effect; Mediator -> StateMachine; + // Scheduler -> Mediator; Api -> Scheduler; Cli -> Scheduler; Samples sits at the bottom and may + // reference everything upstream. private static readonly IReadOnlyDictionary AllowedUpstream = new Dictionary< string, string[] @@ -32,14 +30,36 @@ public class DependencyDirectionTests { ["Trax.Core"] = Array.Empty(), ["Trax.Effect"] = new[] { "Trax.Core" }, - ["Trax.Mediator"] = new[] { "Trax.Core", "Trax.Effect" }, - ["Trax.Scheduler"] = new[] { "Trax.Core", "Trax.Effect", "Trax.Mediator" }, - ["Trax.Api"] = new[] { "Trax.Core", "Trax.Effect", "Trax.Mediator", "Trax.Scheduler" }, - ["Trax.Cli"] = new[] { "Trax.Core", "Trax.Effect", "Trax.Mediator", "Trax.Scheduler" }, + ["Trax.StateMachine"] = new[] { "Trax.Core", "Trax.Effect" }, + ["Trax.Mediator"] = new[] { "Trax.Core", "Trax.Effect", "Trax.StateMachine" }, + ["Trax.Scheduler"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + }, + ["Trax.Api"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + "Trax.Scheduler", + }, + ["Trax.Cli"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + "Trax.Scheduler", + }, ["Trax.Samples"] = new[] { "Trax.Core", "Trax.Effect", + "Trax.StateMachine", "Trax.Mediator", "Trax.Scheduler", "Trax.Api", @@ -51,6 +71,7 @@ public class DependencyDirectionTests { "Trax.Core", "Trax.Effect", + "Trax.StateMachine", "Trax.Mediator", "Trax.Scheduler", "Trax.Api", @@ -63,53 +84,89 @@ public void No_project_references_a_downstream_or_parallel_Trax_package() { var repo = DetectRepo(); repo.Should() - .NotBeNull( - "the current repo family should be detectable from the .slnx at the repo root" - ); - - var allowed = new HashSet(AllowedUpstream[repo!], StringComparer.Ordinal) { repo! }; - var offenders = new List(); + .NotBeNull("the current folder family should be detectable from the .slnx at its root"); + var projects = new List<(string Path, XDocument Project)>(); foreach (var csproj in SourceFiles.Projects()) { - XDocument doc; try { - doc = XDocument.Load(csproj); + projects.Add((RepoRoot.Relative(csproj), XDocument.Load(csproj))); } catch (Exception ex) { Assert.Fail($"Failed to parse {RepoRoot.Relative(csproj)}: {ex.Message}"); return; } + } + + Offenders(repo!, projects) + .Should() + .BeEmpty( + $"{repo} may reference only its own family and its allowed upstream " + + $"[{string.Join(", ", AllowedUpstream[repo!])}] per the Trax dependency chain. A " + + "package or project reference to any other Trax family points the wrong way " + + "(downstream or parallel). Offenders:\n " + + string.Join("\n ", Offenders(repo!, projects)) + ); + } + + [TestCase("Trax.StateMachine", "Trax.Mediator")] + [TestCase("Trax.StateMachine", "Trax.Mediator.Testing")] + [TestCase("Trax.Effect", "Trax.StateMachine")] + [TestCase("Trax.Effect", "Trax.StateMachine.Persistence")] + public void A_reference_against_the_chain_is_refused(string folder, string referenced) + { + Offenders(folder, [("x.csproj", ProjectReferencing(referenced))]) + .Should() + .ContainSingle( + $"{folder} is upstream of {referenced}'s family, so referencing it points the wrong way" + ); + } + + [TestCase("Trax.StateMachine", "Trax.Effect.Data")] + [TestCase("Trax.Mediator", "Trax.StateMachine.Persistence")] + public void A_reference_along_the_chain_is_allowed(string folder, string referenced) + { + Offenders(folder, [("x.csproj", ProjectReferencing(referenced))]) + .Should() + .BeEmpty($"{referenced} is in a family upstream of {folder}"); + } - foreach (var reference in doc.Descendants()) + // Every reference in the given projects to a Trax family the folder may not reach, as + // "project -> reference [family]". + private static List Offenders( + string repo, + IEnumerable<(string Path, XDocument Project)> projects + ) + { + var allowed = new HashSet(AllowedUpstream[repo], StringComparer.Ordinal) { repo }; + var offenders = new List(); + foreach (var (path, project) in projects) + { + foreach (var reference in project.Descendants()) { var include = ReferencedName(reference); if (include is null || !include.StartsWith("Trax.", StringComparison.Ordinal)) continue; - // A Trax package outside the seven core-repo families (e.g. a standalone Trax.Runner.*) + // A Trax package outside the folder families (e.g. a standalone Trax.Runner.*) // is out of scope for this chain guard; skip it rather than flag it. var family = FamilyOf(include); if (family is null) continue; if (!allowed.Contains(family)) - offenders.Add($"{RepoRoot.Relative(csproj)} -> {include} [{family}]"); + offenders.Add($"{path} -> {include} [{family}]"); } } - - offenders - .Should() - .BeEmpty( - $"{repo} may reference only its own family and its allowed upstream " - + $"[{string.Join(", ", AllowedUpstream[repo!])}] per the Trax dependency chain. A " - + "package or project reference to any other Trax family points the wrong way " - + "(downstream or parallel). Offenders:\n " - + string.Join("\n ", offenders) - ); + return offenders; } + private static XDocument ProjectReferencing(string referenced) => + XDocument.Parse( + $"""""" + ); + // The package id of a PackageReference, or the project name of a ProjectReference (its file name without // the extension, which is the package id the project packs as). Any other element yields null. private static string? ReferencedName(XElement reference) diff --git a/Trax.Samples/tests/Trax.Samples.Tests.Meta/Tests/DependencyDirectionTests.cs b/Trax.Samples/tests/Trax.Samples.Tests.Meta/Tests/DependencyDirectionTests.cs index ad1187de1..9e85e34b1 100644 --- a/Trax.Samples/tests/Trax.Samples.Tests.Meta/Tests/DependencyDirectionTests.cs +++ b/Trax.Samples/tests/Trax.Samples.Tests.Meta/Tests/DependencyDirectionTests.cs @@ -1,19 +1,17 @@ namespace Trax.Samples.Tests.Meta.Tests; /// -/// Enforces the Trax dependency chain (CLAUDE.md): a repo may reference a Trax.* package or project +/// Enforces the Trax dependency chain (AGENTS.md): a folder may reference a Trax.* package or project /// only in its own family or an allowed upstream family, never a downstream or parallel one. The map below -/// is the whole chain; the test self-detects which repo it runs in from the .slnx at the repo root -/// and applies that repo's rule, so the identical file lives in every repo's Meta project. +/// is the whole chain; the test self-detects which folder it runs in from the .slnx at the folder's +/// .NET root and applies that folder's rule, so the identical file lives in every folder's Meta project. /// -/// A ProjectReference is checked too, by the referenced project's file name. Today every one -/// stays inside its own family, so this changes nothing; once the families share one repository and depend -/// on each other through ProjectReference, it is what keeps the chain enforced. +/// A ProjectReference is checked too, by the referenced project's file name, which is the +/// package id the project packs as. /// -/// This catches an upstream repo pulling in a downstream one, for example a test that references -/// Trax.Api.GraphQL from inside Trax.Effect. That only compiles against the locally-packed feed and hides a -/// real layering inversion. Sibling checks that a legitimate -/// cross-repo reference is centrally managed; this one checks it points the right way in the first place. +/// This catches an upstream folder pulling in a downstream one, for example a test that references +/// Trax.Api.GraphQL from inside Trax.Effect, an Effect project that references a state-machine project, or a +/// state-machine project that references the mediator. /// /// Enforces Trax.Docs/adr/0003-a-repo-depends-only-on-what-is-upstream.md. /// @@ -21,10 +19,10 @@ namespace Trax.Samples.Tests.Meta.Tests; [TestFixture] public class DependencyDirectionTests { - // For each repo family, the full set of upstream families it may PackageReference. Its own family is - // always allowed. Empirically matches the current graph and the chain: Core is the root; Effect -> Core; - // Mediator -> Effect; Scheduler -> Mediator; Api -> Scheduler; Cli -> Scheduler; - // Samples sits at the bottom and may reference everything upstream. + // For each family, the full set of upstream families it may reference. Its own family is always + // allowed. Core is the root; Effect -> Core; StateMachine -> Effect; Mediator -> StateMachine; + // Scheduler -> Mediator; Api -> Scheduler; Cli -> Scheduler; Samples sits at the bottom and may + // reference everything upstream. private static readonly IReadOnlyDictionary AllowedUpstream = new Dictionary< string, string[] @@ -32,14 +30,36 @@ public class DependencyDirectionTests { ["Trax.Core"] = Array.Empty(), ["Trax.Effect"] = new[] { "Trax.Core" }, - ["Trax.Mediator"] = new[] { "Trax.Core", "Trax.Effect" }, - ["Trax.Scheduler"] = new[] { "Trax.Core", "Trax.Effect", "Trax.Mediator" }, - ["Trax.Api"] = new[] { "Trax.Core", "Trax.Effect", "Trax.Mediator", "Trax.Scheduler" }, - ["Trax.Cli"] = new[] { "Trax.Core", "Trax.Effect", "Trax.Mediator", "Trax.Scheduler" }, + ["Trax.StateMachine"] = new[] { "Trax.Core", "Trax.Effect" }, + ["Trax.Mediator"] = new[] { "Trax.Core", "Trax.Effect", "Trax.StateMachine" }, + ["Trax.Scheduler"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + }, + ["Trax.Api"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + "Trax.Scheduler", + }, + ["Trax.Cli"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + "Trax.Scheduler", + }, ["Trax.Samples"] = new[] { "Trax.Core", "Trax.Effect", + "Trax.StateMachine", "Trax.Mediator", "Trax.Scheduler", "Trax.Api", @@ -51,6 +71,7 @@ public class DependencyDirectionTests { "Trax.Core", "Trax.Effect", + "Trax.StateMachine", "Trax.Mediator", "Trax.Scheduler", "Trax.Api", @@ -63,53 +84,89 @@ public void No_project_references_a_downstream_or_parallel_Trax_package() { var repo = DetectRepo(); repo.Should() - .NotBeNull( - "the current repo family should be detectable from the .slnx at the repo root" - ); - - var allowed = new HashSet(AllowedUpstream[repo!], StringComparer.Ordinal) { repo! }; - var offenders = new List(); + .NotBeNull("the current folder family should be detectable from the .slnx at its root"); + var projects = new List<(string Path, XDocument Project)>(); foreach (var csproj in SourceFiles.Projects()) { - XDocument doc; try { - doc = XDocument.Load(csproj); + projects.Add((RepoRoot.Relative(csproj), XDocument.Load(csproj))); } catch (Exception ex) { Assert.Fail($"Failed to parse {RepoRoot.Relative(csproj)}: {ex.Message}"); return; } + } + + Offenders(repo!, projects) + .Should() + .BeEmpty( + $"{repo} may reference only its own family and its allowed upstream " + + $"[{string.Join(", ", AllowedUpstream[repo!])}] per the Trax dependency chain. A " + + "package or project reference to any other Trax family points the wrong way " + + "(downstream or parallel). Offenders:\n " + + string.Join("\n ", Offenders(repo!, projects)) + ); + } + + [TestCase("Trax.StateMachine", "Trax.Mediator")] + [TestCase("Trax.StateMachine", "Trax.Mediator.Testing")] + [TestCase("Trax.Effect", "Trax.StateMachine")] + [TestCase("Trax.Effect", "Trax.StateMachine.Persistence")] + public void A_reference_against_the_chain_is_refused(string folder, string referenced) + { + Offenders(folder, [("x.csproj", ProjectReferencing(referenced))]) + .Should() + .ContainSingle( + $"{folder} is upstream of {referenced}'s family, so referencing it points the wrong way" + ); + } + + [TestCase("Trax.StateMachine", "Trax.Effect.Data")] + [TestCase("Trax.Mediator", "Trax.StateMachine.Persistence")] + public void A_reference_along_the_chain_is_allowed(string folder, string referenced) + { + Offenders(folder, [("x.csproj", ProjectReferencing(referenced))]) + .Should() + .BeEmpty($"{referenced} is in a family upstream of {folder}"); + } - foreach (var reference in doc.Descendants()) + // Every reference in the given projects to a Trax family the folder may not reach, as + // "project -> reference [family]". + private static List Offenders( + string repo, + IEnumerable<(string Path, XDocument Project)> projects + ) + { + var allowed = new HashSet(AllowedUpstream[repo], StringComparer.Ordinal) { repo }; + var offenders = new List(); + foreach (var (path, project) in projects) + { + foreach (var reference in project.Descendants()) { var include = ReferencedName(reference); if (include is null || !include.StartsWith("Trax.", StringComparison.Ordinal)) continue; - // A Trax package outside the seven core-repo families (e.g. a standalone Trax.Runner.*) + // A Trax package outside the folder families (e.g. a standalone Trax.Runner.*) // is out of scope for this chain guard; skip it rather than flag it. var family = FamilyOf(include); if (family is null) continue; if (!allowed.Contains(family)) - offenders.Add($"{RepoRoot.Relative(csproj)} -> {include} [{family}]"); + offenders.Add($"{path} -> {include} [{family}]"); } } - - offenders - .Should() - .BeEmpty( - $"{repo} may reference only its own family and its allowed upstream " - + $"[{string.Join(", ", AllowedUpstream[repo!])}] per the Trax dependency chain. A " - + "package or project reference to any other Trax family points the wrong way " - + "(downstream or parallel). Offenders:\n " - + string.Join("\n ", offenders) - ); + return offenders; } + private static XDocument ProjectReferencing(string referenced) => + XDocument.Parse( + $"""""" + ); + // The package id of a PackageReference, or the project name of a ProjectReference (its file name without // the extension, which is the package id the project packs as). Any other element yields null. private static string? ReferencedName(XElement reference) diff --git a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Meta/Tests/DependencyDirectionTests.cs b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Meta/Tests/DependencyDirectionTests.cs index be6c7dd69..9c52a94a5 100644 --- a/Trax.Scheduler/tests/Trax.Scheduler.Tests.Meta/Tests/DependencyDirectionTests.cs +++ b/Trax.Scheduler/tests/Trax.Scheduler.Tests.Meta/Tests/DependencyDirectionTests.cs @@ -1,19 +1,17 @@ namespace Trax.Scheduler.Tests.Meta.Tests; /// -/// Enforces the Trax dependency chain (CLAUDE.md): a repo may reference a Trax.* package or project +/// Enforces the Trax dependency chain (AGENTS.md): a folder may reference a Trax.* package or project /// only in its own family or an allowed upstream family, never a downstream or parallel one. The map below -/// is the whole chain; the test self-detects which repo it runs in from the .slnx at the repo root -/// and applies that repo's rule, so the identical file lives in every repo's Meta project. +/// is the whole chain; the test self-detects which folder it runs in from the .slnx at the folder's +/// .NET root and applies that folder's rule, so the identical file lives in every folder's Meta project. /// -/// A ProjectReference is checked too, by the referenced project's file name. Today every one -/// stays inside its own family, so this changes nothing; once the families share one repository and depend -/// on each other through ProjectReference, it is what keeps the chain enforced. +/// A ProjectReference is checked too, by the referenced project's file name, which is the +/// package id the project packs as. /// -/// This catches an upstream repo pulling in a downstream one, for example a test that references -/// Trax.Api.GraphQL from inside Trax.Effect. That only compiles against the locally-packed feed and hides a -/// real layering inversion. Sibling checks that a legitimate -/// cross-repo reference is centrally managed; this one checks it points the right way in the first place. +/// This catches an upstream folder pulling in a downstream one, for example a test that references +/// Trax.Api.GraphQL from inside Trax.Effect, an Effect project that references a state-machine project, or a +/// state-machine project that references the mediator. /// /// Enforces Trax.Docs/adr/0003-a-repo-depends-only-on-what-is-upstream.md. /// @@ -21,10 +19,10 @@ namespace Trax.Scheduler.Tests.Meta.Tests; [TestFixture] public class DependencyDirectionTests { - // For each repo family, the full set of upstream families it may PackageReference. Its own family is - // always allowed. Empirically matches the current graph and the chain: Core is the root; Effect -> Core; - // Mediator -> Effect; Scheduler -> Mediator; Api -> Scheduler; Cli -> Scheduler; - // Samples sits at the bottom and may reference everything upstream. + // For each family, the full set of upstream families it may reference. Its own family is always + // allowed. Core is the root; Effect -> Core; StateMachine -> Effect; Mediator -> StateMachine; + // Scheduler -> Mediator; Api -> Scheduler; Cli -> Scheduler; Samples sits at the bottom and may + // reference everything upstream. private static readonly IReadOnlyDictionary AllowedUpstream = new Dictionary< string, string[] @@ -32,14 +30,36 @@ public class DependencyDirectionTests { ["Trax.Core"] = Array.Empty(), ["Trax.Effect"] = new[] { "Trax.Core" }, - ["Trax.Mediator"] = new[] { "Trax.Core", "Trax.Effect" }, - ["Trax.Scheduler"] = new[] { "Trax.Core", "Trax.Effect", "Trax.Mediator" }, - ["Trax.Api"] = new[] { "Trax.Core", "Trax.Effect", "Trax.Mediator", "Trax.Scheduler" }, - ["Trax.Cli"] = new[] { "Trax.Core", "Trax.Effect", "Trax.Mediator", "Trax.Scheduler" }, + ["Trax.StateMachine"] = new[] { "Trax.Core", "Trax.Effect" }, + ["Trax.Mediator"] = new[] { "Trax.Core", "Trax.Effect", "Trax.StateMachine" }, + ["Trax.Scheduler"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + }, + ["Trax.Api"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + "Trax.Scheduler", + }, + ["Trax.Cli"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + "Trax.Scheduler", + }, ["Trax.Samples"] = new[] { "Trax.Core", "Trax.Effect", + "Trax.StateMachine", "Trax.Mediator", "Trax.Scheduler", "Trax.Api", @@ -51,6 +71,7 @@ public class DependencyDirectionTests { "Trax.Core", "Trax.Effect", + "Trax.StateMachine", "Trax.Mediator", "Trax.Scheduler", "Trax.Api", @@ -63,53 +84,89 @@ public void No_project_references_a_downstream_or_parallel_Trax_package() { var repo = DetectRepo(); repo.Should() - .NotBeNull( - "the current repo family should be detectable from the .slnx at the repo root" - ); - - var allowed = new HashSet(AllowedUpstream[repo!], StringComparer.Ordinal) { repo! }; - var offenders = new List(); + .NotBeNull("the current folder family should be detectable from the .slnx at its root"); + var projects = new List<(string Path, XDocument Project)>(); foreach (var csproj in SourceFiles.Projects()) { - XDocument doc; try { - doc = XDocument.Load(csproj); + projects.Add((RepoRoot.Relative(csproj), XDocument.Load(csproj))); } catch (Exception ex) { Assert.Fail($"Failed to parse {RepoRoot.Relative(csproj)}: {ex.Message}"); return; } + } + + Offenders(repo!, projects) + .Should() + .BeEmpty( + $"{repo} may reference only its own family and its allowed upstream " + + $"[{string.Join(", ", AllowedUpstream[repo!])}] per the Trax dependency chain. A " + + "package or project reference to any other Trax family points the wrong way " + + "(downstream or parallel). Offenders:\n " + + string.Join("\n ", Offenders(repo!, projects)) + ); + } + + [TestCase("Trax.StateMachine", "Trax.Mediator")] + [TestCase("Trax.StateMachine", "Trax.Mediator.Testing")] + [TestCase("Trax.Effect", "Trax.StateMachine")] + [TestCase("Trax.Effect", "Trax.StateMachine.Persistence")] + public void A_reference_against_the_chain_is_refused(string folder, string referenced) + { + Offenders(folder, [("x.csproj", ProjectReferencing(referenced))]) + .Should() + .ContainSingle( + $"{folder} is upstream of {referenced}'s family, so referencing it points the wrong way" + ); + } + + [TestCase("Trax.StateMachine", "Trax.Effect.Data")] + [TestCase("Trax.Mediator", "Trax.StateMachine.Persistence")] + public void A_reference_along_the_chain_is_allowed(string folder, string referenced) + { + Offenders(folder, [("x.csproj", ProjectReferencing(referenced))]) + .Should() + .BeEmpty($"{referenced} is in a family upstream of {folder}"); + } - foreach (var reference in doc.Descendants()) + // Every reference in the given projects to a Trax family the folder may not reach, as + // "project -> reference [family]". + private static List Offenders( + string repo, + IEnumerable<(string Path, XDocument Project)> projects + ) + { + var allowed = new HashSet(AllowedUpstream[repo], StringComparer.Ordinal) { repo }; + var offenders = new List(); + foreach (var (path, project) in projects) + { + foreach (var reference in project.Descendants()) { var include = ReferencedName(reference); if (include is null || !include.StartsWith("Trax.", StringComparison.Ordinal)) continue; - // A Trax package outside the seven core-repo families (e.g. a standalone Trax.Runner.*) + // A Trax package outside the folder families (e.g. a standalone Trax.Runner.*) // is out of scope for this chain guard; skip it rather than flag it. var family = FamilyOf(include); if (family is null) continue; if (!allowed.Contains(family)) - offenders.Add($"{RepoRoot.Relative(csproj)} -> {include} [{family}]"); + offenders.Add($"{path} -> {include} [{family}]"); } } - - offenders - .Should() - .BeEmpty( - $"{repo} may reference only its own family and its allowed upstream " - + $"[{string.Join(", ", AllowedUpstream[repo!])}] per the Trax dependency chain. A " - + "package or project reference to any other Trax family points the wrong way " - + "(downstream or parallel). Offenders:\n " - + string.Join("\n ", offenders) - ); + return offenders; } + private static XDocument ProjectReferencing(string referenced) => + XDocument.Parse( + $"""""" + ); + // The package id of a PackageReference, or the project name of a ProjectReference (its file name without // the extension, which is the package id the project packs as). Any other element yields null. private static string? ReferencedName(XElement reference) diff --git a/Trax.StateMachine/.gitignore b/Trax.StateMachine/dotnet/.gitignore similarity index 100% rename from Trax.StateMachine/.gitignore rename to Trax.StateMachine/dotnet/.gitignore diff --git a/Trax.StateMachine/dotnet/Trax.StateMachine.slnx b/Trax.StateMachine/dotnet/Trax.StateMachine.slnx index 578e4a23e..dd8ca961b 100644 --- a/Trax.StateMachine/dotnet/Trax.StateMachine.slnx +++ b/Trax.StateMachine/dotnet/Trax.StateMachine.slnx @@ -8,5 +8,6 @@ + diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/GlobalUsings.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/GlobalUsings.cs new file mode 100644 index 000000000..997039bcc --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/GlobalUsings.cs @@ -0,0 +1,9 @@ +global using System; +global using System.Collections.Generic; +global using System.IO; +global using System.Linq; +global using System.Text.RegularExpressions; +global using System.Xml.Linq; +global using AwesomeAssertions; +global using NUnit.Framework; +global using Trax.StateMachine.Tests.Meta.Infrastructure; diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Infrastructure/MonorepoRoot.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Infrastructure/MonorepoRoot.cs new file mode 100644 index 000000000..eff6639e6 --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Infrastructure/MonorepoRoot.cs @@ -0,0 +1,32 @@ +namespace Trax.StateMachine.Tests.Meta.Infrastructure; + +/// +/// The root of the repository this folder lives in, which holds the CI configuration +/// (.github/) shared by every folder. is the folder +/// itself; this is the first directory above it with a .git entry (a directory in a clone, +/// a file in a worktree). +/// +internal static class MonorepoRoot +{ + private static readonly Lazy Cached = new(Resolve); + + public static string Path => Cached.Value; + + public static string Combine(params string[] segments) => + System.IO.Path.Combine(new[] { Path }.Concat(segments).ToArray()); + + private static string Resolve() + { + var dir = new DirectoryInfo(RepoRoot.Path); + while (dir is not null) + { + var git = System.IO.Path.Combine(dir.FullName, ".git"); + if (Directory.Exists(git) || File.Exists(git)) + return dir.FullName; + dir = dir.Parent; + } + throw new InvalidOperationException( + $"Could not locate the repository root: no .git found walking up from '{RepoRoot.Path}'." + ); + } +} diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Infrastructure/RepoRoot.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Infrastructure/RepoRoot.cs new file mode 100644 index 000000000..da9ee75b4 --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Infrastructure/RepoRoot.cs @@ -0,0 +1,28 @@ +namespace Trax.StateMachine.Tests.Meta.Infrastructure; + +internal static class RepoRoot +{ + private static readonly Lazy Cached = new(Resolve); + + public static string Path => Cached.Value; + + public static string Combine(params string[] segments) => + System.IO.Path.Combine(new[] { Path }.Concat(segments).ToArray()); + + public static string Relative(string absolute) => + System.IO.Path.GetRelativePath(Path, absolute); + + private static string Resolve() + { + var dir = new DirectoryInfo(AppContext.BaseDirectory); + while (dir is not null) + { + if (dir.EnumerateFiles("*.slnx").Any()) + return dir.FullName; + dir = dir.Parent; + } + throw new InvalidOperationException( + $"Could not locate repository root: no .slnx found walking up from '{AppContext.BaseDirectory}'." + ); + } +} diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Infrastructure/SourceFiles.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Infrastructure/SourceFiles.cs new file mode 100644 index 000000000..e5551c312 --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Infrastructure/SourceFiles.cs @@ -0,0 +1,43 @@ +namespace Trax.StateMachine.Tests.Meta.Infrastructure; + +internal static class SourceFiles +{ + public static IEnumerable CSharp(params string[] subdirs) => Enumerate("*.cs", subdirs); + + public static IEnumerable Projects(params string[] subdirs) => + Enumerate("*.csproj", subdirs); + + public static IEnumerable Markdown(params string[] subdirs) => + Enumerate("*.md", subdirs); + + private static IEnumerable Enumerate(string pattern, string[] subdirs) + { + var roots = + subdirs.Length == 0 + ? new[] { RepoRoot.Path } + : subdirs.Select(s => Path.Combine(RepoRoot.Path, s)).ToArray(); + + foreach (var root in roots) + { + if (!Directory.Exists(root)) + continue; + foreach ( + var file in Directory.EnumerateFiles(root, pattern, SearchOption.AllDirectories) + ) + { + if (IsExcluded(file)) + continue; + yield return file; + } + } + } + + private static bool IsExcluded(string path) + { + var s = Path.DirectorySeparatorChar; + return path.Contains($"{s}bin{s}", StringComparison.Ordinal) + || path.Contains($"{s}obj{s}", StringComparison.Ordinal) + || path.Contains($"{s}node_modules{s}", StringComparison.Ordinal) + || path.Contains($"{s}.git{s}", StringComparison.Ordinal); + } +} diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Infrastructure/SourceText.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Infrastructure/SourceText.cs new file mode 100644 index 000000000..1d0f5b241 --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Infrastructure/SourceText.cs @@ -0,0 +1,180 @@ +namespace Trax.StateMachine.Tests.Meta.Infrastructure; + +/// +/// Helpers for inspecting C# source text without triggering false positives from comments / strings. +/// +internal static class SourceText +{ + /// + /// Blanks out comment and string-literal content so a keyword scan cannot match inside one. + /// + /// + /// Comments and string literals are mutually exclusive contexts and cannot be resolved + /// independently, which rules out a sequence of regex replacements. + /// + /// + /// The previous implementation stripped `//` before string literals, so a line holding a URL + /// lost the rest of itself and the dangling quote then swallowed everything to the next quote + /// in the file. It also had no raw-string handling, so a raw block containing quotes + /// corrupted the scan from there on. The single left-to-right pass below closes both. + /// + /// + /// + /// String-literal delimiters are kept and only the content between them is blanked. Comment + /// delimiters are blanked along with their content. Either way the output is the same length + /// as the input and newlines are preserved, so every offset and line number in the result + /// still points at the same place in the original. + /// + /// + public static string StripCommentsAndStrings(string source) + { + var output = source.ToCharArray(); + var i = 0; + + // Blanks source[from..to) in place, keeping line structure intact. + void Blank(int from, int to) + { + for (var k = from; k < to && k < output.Length; k++) + { + if (output[k] != '\n' && output[k] != '\r') + output[k] = ' '; + } + } + + while (i < source.Length) + { + var c = source[i]; + + if (c == '/' && i + 1 < source.Length && source[i + 1] == '/') + { + var end = source.IndexOf('\n', i); + if (end < 0) + end = source.Length; + Blank(i, end); + i = end; + continue; + } + + if (c == '/' && i + 1 < source.Length && source[i + 1] == '*') + { + var end = source.IndexOf("*/", i + 2, StringComparison.Ordinal); + end = end < 0 ? source.Length : end + 2; + Blank(i, end); + i = end; + continue; + } + + // Raw string literal, optionally interpolated: three or more quotes closed by the same + // count, behind any number of leading '$'. The '$$"""' form has to be recognised here, + // before the verbatim branch below mistakes its '$$"' prefix for '$@"'. + var dollars = 0; + while (i + dollars < source.Length && source[i + dollars] == '$') + dollars++; + + if ( + i + dollars + 2 < source.Length + && source[i + dollars] == '"' + && source[i + dollars + 1] == '"' + && source[i + dollars + 2] == '"' + ) + { + var quoteStart = i + dollars; + var open = 0; + while (quoteStart + open < source.Length && source[quoteStart + open] == '"') + open++; + + var scan = quoteStart + open; + while (scan < source.Length) + { + if (source[scan] != '"') + { + scan++; + continue; + } + + var run = 0; + while (scan + run < source.Length && source[scan + run] == '"') + run++; + if (run >= open) + break; + scan += run; + } + + var end = scan >= source.Length ? source.Length : scan + open; + Blank(quoteStart + open, Math.Min(scan, end)); + i = end; + continue; + } + + // Verbatim string, optionally interpolated: @"...", $@"...", @$"...". + var verbatim = c == '@' && i + 1 < source.Length && source[i + 1] == '"'; + var interpolatedVerbatim = + (c == '$' || c == '@') + && i + 2 < source.Length + && ( + (source[i + 1] == '@' && source[i + 2] == '"') + || (source[i + 1] == '$' && source[i + 2] == '"') + ); + + if (verbatim || interpolatedVerbatim) + { + var quote = source.IndexOf('"', i); + var scan = quote + 1; + while (scan < source.Length) + { + if (source[scan] != '"') + { + scan++; + continue; + } + + // "" is an escaped quote inside a verbatim string. + if (scan + 1 < source.Length && source[scan + 1] == '"') + { + scan += 2; + continue; + } + + break; + } + + Blank(quote + 1, scan); + i = scan < source.Length ? scan + 1 : source.Length; + continue; + } + + if (c == '"' || c == '\'') + { + var scan = i + 1; + while (scan < source.Length && source[scan] != c) + { + // A backslash escapes the next character, including the delimiter. + scan += source[scan] == '\\' ? 2 : 1; + } + + Blank(i + 1, Math.Min(scan, source.Length)); + i = scan < source.Length ? scan + 1 : source.Length; + continue; + } + + i++; + } + + return new string(output); + } + + public static IReadOnlyList<(int LineNumber, string Line)> MatchingLines( + string source, + Regex pattern + ) + { + var hits = new List<(int, string)>(); + var lines = source.Replace("\r\n", "\n").Split('\n'); + for (var i = 0; i < lines.Length; i++) + { + if (pattern.IsMatch(lines[i])) + hits.Add((i + 1, lines[i])); + } + return hits; + } +} diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Infrastructure/SyntheticRepo.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Infrastructure/SyntheticRepo.cs new file mode 100644 index 000000000..0788839d1 --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Infrastructure/SyntheticRepo.cs @@ -0,0 +1,37 @@ +namespace Trax.StateMachine.Tests.Meta.Infrastructure; + +/// +/// A throwaway directory tree, for showing that a guard fails on a violation it is meant to catch. +/// +internal sealed class SyntheticRepo : IDisposable +{ + public string Root { get; } = + System.IO.Path.Combine( + System.IO.Path.GetTempPath(), + "trax-statemachine-meta-tests", + Guid.NewGuid().ToString("N") + ); + + public SyntheticRepo() => Directory.CreateDirectory(Root); + + public SyntheticRepo Write(string relativePath, string content) + { + var full = System.IO.Path.Combine( + Root, + relativePath.Replace('/', System.IO.Path.DirectorySeparatorChar) + ); + Directory.CreateDirectory(System.IO.Path.GetDirectoryName(full)!); + File.WriteAllText(full, content); + return this; + } + + public void Dispose() + { + try + { + if (Directory.Exists(Root)) + Directory.Delete(Root, recursive: true); + } + catch (IOException) { } + } +} diff --git a/Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.StateMachine.Persistence.received.txt b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/PublicApi/Trax.StateMachine.Persistence.received.txt similarity index 100% rename from Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.StateMachine.Persistence.received.txt rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/PublicApi/Trax.StateMachine.Persistence.received.txt diff --git a/Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.StateMachine.Testing.received.txt b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/PublicApi/Trax.StateMachine.Testing.received.txt similarity index 100% rename from Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.StateMachine.Testing.received.txt rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/PublicApi/Trax.StateMachine.Testing.received.txt diff --git a/Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.StateMachine.received.txt b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/PublicApi/Trax.StateMachine.received.txt similarity index 100% rename from Trax.Effect/tests/Trax.Effect.Tests.Meta/PublicApi/Trax.StateMachine.received.txt rename to Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/PublicApi/Trax.StateMachine.received.txt diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/DependencyDirectionTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/DependencyDirectionTests.cs new file mode 100644 index 000000000..c20266137 --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/DependencyDirectionTests.cs @@ -0,0 +1,201 @@ +namespace Trax.StateMachine.Tests.Meta.Tests; + +/// +/// Enforces the Trax dependency chain (AGENTS.md): a folder may reference a Trax.* package or project +/// only in its own family or an allowed upstream family, never a downstream or parallel one. The map below +/// is the whole chain; the test self-detects which folder it runs in from the .slnx at the folder's +/// .NET root and applies that folder's rule, so the identical file lives in every folder's Meta project. +/// +/// A ProjectReference is checked too, by the referenced project's file name, which is the +/// package id the project packs as. +/// +/// This catches an upstream folder pulling in a downstream one, for example a test that references +/// Trax.Api.GraphQL from inside Trax.Effect, an Effect project that references a state-machine project, or a +/// state-machine project that references the mediator. +/// +/// Enforces Trax.Docs/adr/0003-a-repo-depends-only-on-what-is-upstream.md. +/// +[Property("adr", "Trax.Docs/adr/0003-a-repo-depends-only-on-what-is-upstream.md")] +[TestFixture] +public class DependencyDirectionTests +{ + // For each family, the full set of upstream families it may reference. Its own family is always + // allowed. Core is the root; Effect -> Core; StateMachine -> Effect; Mediator -> StateMachine; + // Scheduler -> Mediator; Api -> Scheduler; Cli -> Scheduler; Samples sits at the bottom and may + // reference everything upstream. + private static readonly IReadOnlyDictionary AllowedUpstream = new Dictionary< + string, + string[] + >(StringComparer.Ordinal) + { + ["Trax.Core"] = Array.Empty(), + ["Trax.Effect"] = new[] { "Trax.Core" }, + ["Trax.StateMachine"] = new[] { "Trax.Core", "Trax.Effect" }, + ["Trax.Mediator"] = new[] { "Trax.Core", "Trax.Effect", "Trax.StateMachine" }, + ["Trax.Scheduler"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + }, + ["Trax.Api"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + "Trax.Scheduler", + }, + ["Trax.Cli"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + "Trax.Scheduler", + }, + ["Trax.Samples"] = new[] + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + "Trax.Scheduler", + "Trax.Api", + "Trax.Cli", + }, + }; + + private static readonly string[] Families = + { + "Trax.Core", + "Trax.Effect", + "Trax.StateMachine", + "Trax.Mediator", + "Trax.Scheduler", + "Trax.Api", + "Trax.Cli", + "Trax.Samples", + }; + + [Test] + public void No_project_references_a_downstream_or_parallel_Trax_package() + { + var repo = DetectRepo(); + repo.Should() + .NotBeNull("the current folder family should be detectable from the .slnx at its root"); + + var projects = new List<(string Path, XDocument Project)>(); + foreach (var csproj in SourceFiles.Projects()) + { + try + { + projects.Add((RepoRoot.Relative(csproj), XDocument.Load(csproj))); + } + catch (Exception ex) + { + Assert.Fail($"Failed to parse {RepoRoot.Relative(csproj)}: {ex.Message}"); + return; + } + } + + Offenders(repo!, projects) + .Should() + .BeEmpty( + $"{repo} may reference only its own family and its allowed upstream " + + $"[{string.Join(", ", AllowedUpstream[repo!])}] per the Trax dependency chain. A " + + "package or project reference to any other Trax family points the wrong way " + + "(downstream or parallel). Offenders:\n " + + string.Join("\n ", Offenders(repo!, projects)) + ); + } + + [TestCase("Trax.StateMachine", "Trax.Mediator")] + [TestCase("Trax.StateMachine", "Trax.Mediator.Testing")] + [TestCase("Trax.Effect", "Trax.StateMachine")] + [TestCase("Trax.Effect", "Trax.StateMachine.Persistence")] + public void A_reference_against_the_chain_is_refused(string folder, string referenced) + { + Offenders(folder, [("x.csproj", ProjectReferencing(referenced))]) + .Should() + .ContainSingle( + $"{folder} is upstream of {referenced}'s family, so referencing it points the wrong way" + ); + } + + [TestCase("Trax.StateMachine", "Trax.Effect.Data")] + [TestCase("Trax.Mediator", "Trax.StateMachine.Persistence")] + public void A_reference_along_the_chain_is_allowed(string folder, string referenced) + { + Offenders(folder, [("x.csproj", ProjectReferencing(referenced))]) + .Should() + .BeEmpty($"{referenced} is in a family upstream of {folder}"); + } + + // Every reference in the given projects to a Trax family the folder may not reach, as + // "project -> reference [family]". + private static List Offenders( + string repo, + IEnumerable<(string Path, XDocument Project)> projects + ) + { + var allowed = new HashSet(AllowedUpstream[repo], StringComparer.Ordinal) { repo }; + var offenders = new List(); + foreach (var (path, project) in projects) + { + foreach (var reference in project.Descendants()) + { + var include = ReferencedName(reference); + if (include is null || !include.StartsWith("Trax.", StringComparison.Ordinal)) + continue; + + // A Trax package outside the folder families (e.g. a standalone Trax.Runner.*) + // is out of scope for this chain guard; skip it rather than flag it. + var family = FamilyOf(include); + if (family is null) + continue; + if (!allowed.Contains(family)) + offenders.Add($"{path} -> {include} [{family}]"); + } + } + return offenders; + } + + private static XDocument ProjectReferencing(string referenced) => + XDocument.Parse( + $"""""" + ); + + // The package id of a PackageReference, or the project name of a ProjectReference (its file name without + // the extension, which is the package id the project packs as). Any other element yields null. + private static string? ReferencedName(XElement reference) + { + var include = reference.Attribute("Include")?.Value; + if (string.IsNullOrEmpty(include)) + return null; + return reference.Name.LocalName switch + { + "PackageReference" => include, + "ProjectReference" => Path.GetFileNameWithoutExtension(include.Replace('\\', '/')), + _ => null, + }; + } + + private static string? FamilyOf(string package) => + Families.FirstOrDefault(f => + package.Equals(f, StringComparison.Ordinal) + || package.StartsWith(f + ".", StringComparison.Ordinal) + ); + + private static string? DetectRepo() + { + var slnx = Directory + .EnumerateFiles(RepoRoot.Path, "*.slnx", SearchOption.TopDirectoryOnly) + .FirstOrDefault(); + if (slnx is null) + return null; + var name = Path.GetFileNameWithoutExtension(slnx); + return AllowedUpstream.ContainsKey(name) ? name : null; + } +} diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/DirectoryBuildPropsVersionTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/DirectoryBuildPropsVersionTests.cs new file mode 100644 index 000000000..da4b50a31 --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/DirectoryBuildPropsVersionTests.cs @@ -0,0 +1,42 @@ +namespace Trax.StateMachine.Tests.Meta.Tests; + +/// +/// A local build packs at the sentinel version 1.99.99, never a real one. The release passes the +/// version it cuts with -p:Version, the same for every package, so a real version written into a +/// folder's Directory.Build.props could only produce a local package that looks like a release. +/// +/// Enforces Trax.Docs/adr/0042-trax-is-one-repository-and-releases-at-one-version.md. +/// +[Property("adr", "Trax.Docs/adr/0042-trax-is-one-repository-and-releases-at-one-version.md")] +[TestFixture] +public class DirectoryBuildPropsVersionTests +{ + [Test] + public void Repo_HasDirectoryBuildProps_AtRoot() + { + var path = RepoRoot.Combine("Directory.Build.props"); + File.Exists(path) + .Should() + .BeTrue( + $"every Trax folder must have a Directory.Build.props at its root; none found at '{path}'." + ); + } + + [Test] + public void DirectoryBuildProps_Version_IsLocalDevSentinel() + { + var path = RepoRoot.Combine("Directory.Build.props"); + var doc = XDocument.Load(path); + var version = doc.Root!.Descendants("Version").FirstOrDefault()?.Value; + + version + .Should() + .Be( + "1.99.99", + "Directory.Build.props is locked at 1.99.99, the version a local build " + + "packs at. The release passes the version it cuts with -p:Version, the same " + + "for every package. See " + + "Trax.Docs/adr/0042-trax-is-one-repository-and-releases-at-one-version.md." + ); + } +} diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/ExtensionMethodNamingTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/ExtensionMethodNamingTests.cs new file mode 100644 index 000000000..84d5aaee9 --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/ExtensionMethodNamingTests.cs @@ -0,0 +1,99 @@ +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; + +namespace Trax.StateMachine.Tests.Meta.Tests; + +/// +/// Public extension methods in Extensions/ folders carry Trax in the name. +/// +/// Not ADR-enforcing: it pins a naming convention that was adopted rather than chosen, and nothing about it was a trade-off between real options. +/// +[TestFixture] +public class ExtensionMethodNamingTests +{ + private static readonly HashSet HostingTypes = new(StringComparer.Ordinal) + { + "IServiceCollection", + "IApplicationBuilder", + "IEndpointRouteBuilder", + "WebApplication", + "WebApplicationBuilder", + }; + + /// + /// Method names exempt from the Trax-naming convention. Each entry must justify why. + /// + private static readonly HashSet KnownExceptions = new(StringComparer.Ordinal) + { + // Legacy compat shim from before the AddTrax fluent API; called internally by AddMediator. + // Kept public for users still on the old API. + "AddServiceTrainBus", + }; + + [Test] + public void Public_Extension_Methods_In_ExtensionsFolders_Contain_TraxInName() + { + var offenders = new List(); + + foreach (var file in SourceFiles.CSharp("src")) + { + if ( + !file.Contains( + $"{Path.DirectorySeparatorChar}Extensions{Path.DirectorySeparatorChar}", + StringComparison.Ordinal + ) + ) + continue; + + var tree = CSharpSyntaxTree.ParseText(File.ReadAllText(file)); + var root = tree.GetCompilationUnitRoot(); + + foreach (var method in root.DescendantNodes().OfType()) + { + if (!method.Modifiers.Any(m => m.IsKind(SyntaxKind.PublicKeyword))) + continue; + if (!method.Modifiers.Any(m => m.IsKind(SyntaxKind.StaticKeyword))) + continue; + + var name = method.Identifier.Text; + if ( + !name.StartsWith("Add", StringComparison.Ordinal) + && !name.StartsWith("Use", StringComparison.Ordinal) + ) + continue; + + var firstParam = method.ParameterList.Parameters.FirstOrDefault(); + if (firstParam is null) + continue; + if (!firstParam.Modifiers.Any(m => m.IsKind(SyntaxKind.ThisKeyword))) + continue; + + var paramType = firstParam.Type?.ToString(); + if (paramType is null) + continue; + + if (!HostingTypes.Contains(paramType)) + continue; + if (name.Contains("Trax", StringComparison.Ordinal)) + continue; + if (KnownExceptions.Contains(name)) + continue; + + offenders.Add($"{RepoRoot.Relative(file)} -> {name} (extends {paramType})"); + } + } + + offenders + .Should() + .BeEmpty( + "Trax.Docs/contributing/api-conventions.md > Extension method naming requires public Add*/Use* extensions " + + "on IServiceCollection / IApplicationBuilder / WebApplication / " + + "IEndpointRouteBuilder / WebApplicationBuilder declared in any src/*/Extensions/ " + + "folder to contain 'Trax' in the method name (e.g. AddTraxApi, UseTraxApiDashboard, " + + "AddScopedTraxRoute). If a method is intentionally exempt, add it to " + + "ExtensionMethodNamingTests.KnownExceptions with a justification. Offenders:\n " + + string.Join("\n ", offenders) + ); + } +} diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoFixedTaskDelayTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoFixedTaskDelayTests.cs new file mode 100644 index 000000000..477e8bb20 --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoFixedTaskDelayTests.cs @@ -0,0 +1,116 @@ +namespace Trax.StateMachine.Tests.Meta.Tests; + +/// +/// Tests wait on the condition that means the work finished, not on a duration. +/// +/// Enforces Trax.Docs/adr/0006-tests-synchronise-on-a-signal.md. +/// +[Property("adr", "Trax.Docs/adr/0006-tests-synchronise-on-a-signal.md")] +[TestFixture] +public class NoFixedTaskDelayTests +{ + private static readonly Regex DelayCall = new( + @"\b(Task\.Delay|Thread\.Sleep)\s*\(", + RegexOptions.Compiled + ); + + private static readonly Regex Justification = new( + @"(?i)(determinism:|allowed-delay:|measuring-interval:|negative-wait:)", + RegexOptions.Compiled + ); + + /// + /// Pre-existing offenders that pre-date the determinism convention. Each entry is a + /// repo-relative path. New code MUST NOT add fixed-duration Task.Delay / Thread.Sleep + /// to these files (the test only allows the current offender count, not more). + /// + /// To remove a file from this list: refactor the test to synchronise on the actual + /// completion signal (TaskCompletionSource, polling loop, etc.) as described in + /// Trax.Docs/contributing/test-conventions.md > Determinism, then delete the entry. The test will fail if any offenders + /// remain in a delisted file. + /// + private static readonly IReadOnlyDictionary BaselineOffenders = new Dictionary< + string, + int + >(StringComparer.Ordinal); + + [Test] + public void TestSources_DoNotIntroduce_NewFixedDelays() + { + var newOffenders = new List(); + var fileOffenderCounts = new Dictionary(StringComparer.Ordinal); + + foreach (var file in SourceFiles.CSharp("tests")) + { + if (file.EndsWith("NoFixedTaskDelayTests.cs", StringComparison.Ordinal)) + continue; + + var raw = File.ReadAllText(file); + var lines = raw.Replace("\r\n", "\n").Split('\n'); + var stripped = SourceText.StripCommentsAndStrings(raw); + var strippedLines = stripped.Replace("\r\n", "\n").Split('\n'); + + var rel = RepoRoot.Relative(file).Replace('\\', '/'); + var count = 0; + + for (var i = 0; i < strippedLines.Length; i++) + { + if (!DelayCall.IsMatch(strippedLines[i])) + continue; + if (HasJustification(lines, i)) + continue; + + count++; + if (!BaselineOffenders.ContainsKey(rel)) + newOffenders.Add($"{rel}:{i + 1} -> {lines[i].Trim()}"); + } + + if (count > 0) + fileOffenderCounts[rel] = count; + } + + // 1. No new fixed delays in files not on the baseline. + newOffenders + .Should() + .BeEmpty( + "Trax.Docs/contributing/test-conventions.md > Determinism forbids fixed-duration Task.Delay / Thread.Sleep in tests. " + + "Synchronise on the completion signal (TaskCompletionSource, polling) with a " + + "generous timeout. If a fixed delay is legitimately required, add a justification " + + "comment containing 'determinism:', 'allowed-delay:', 'measuring-interval:', or " + + "'negative-wait:' on the same line or up to 3 lines above. New offenders:\n " + + string.Join("\n ", newOffenders) + ); + + // 2. Files on the baseline must not exceed their baseline count (no new offenders added). + var regressions = new List(); + foreach (var (path, baselineCount) in BaselineOffenders) + { + var actual = fileOffenderCounts.TryGetValue(path, out var c) ? c : 0; + if (actual != baselineCount) + regressions.Add( + $"{path}: baseline={baselineCount}, actual={actual} ({actual - baselineCount:+#;-#})" + ); + } + + regressions + .Should() + .BeEmpty( + "A grandfathered file's fixed-delay count differs from its baseline. A file that " + + "gained one: synchronise the new code on its completion signal instead. A file " + + "that lost some: lower its BaselineOffenders count to match, or remove the " + + "entry at zero, so the cleanup cannot be undone quietly. Differences:\n " + + string.Join("\n ", regressions) + ); + } + + private static bool HasJustification(string[] lines, int delayLineIndex) + { + var from = Math.Max(0, delayLineIndex - 3); + for (var j = from; j <= delayLineIndex; j++) + { + if (Justification.IsMatch(lines[j])) + return true; + } + return false; + } +} diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoIgnoreAttributeTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoIgnoreAttributeTests.cs new file mode 100644 index 000000000..e0baea503 --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoIgnoreAttributeTests.cs @@ -0,0 +1,66 @@ +using Trax.Core.Testing; +using Trax.Core.Testing.Guards; + +namespace Trax.StateMachine.Tests.Meta.Tests; + +/// +/// A skip is a runtime decision with a reason in the output, not an attribute that hides. +/// The check is the shipped , which also sees an +/// Ignore combined with other attributes, a qualified or suffixed name, and a per-case +/// Ignore = or IgnoreReason =. +/// +/// Enforces Trax.Docs/adr/0005-a-skipped-test-is-a-runtime-decision.md. +/// +[Property("adr", "Trax.Docs/adr/0005-a-skipped-test-is-a-runtime-decision.md")] +[TestFixture] +public class NoIgnoreAttributeTests +{ + [Test] + public void TestSources_DoNotUse_IgnoreAttribute() => AssertClean(RepoRoot.Path); + + [TestCase("[Test, Ignore(\"later\")] public void T() { }")] + [TestCase("[TestCase(1, Ignore = \"later\")] public void T(int i) { }")] + [TestCase("[NUnit.Framework.IgnoreAttribute(\"later\")] public void T() { }")] + public void Guard_fails_on_a_skip_attribute(string member) + { + using var repo = new SyntheticRepo().Write( + "tests/Sample/SampleTests.cs", + $"public class SampleTests {{ {member} }}" + ); + + var act = () => AssertClean(repo.Root); + + act.Should().Throw().WithMessage("*SampleTests.cs:1*"); + } + + [Test] + public void Guard_fails_when_it_finds_no_test_source() + { + using var repo = new SyntheticRepo(); + + var act = () => AssertClean(repo.Root); + + act.Should().Throw().WithMessage("*inspected no*"); + } + + private static void AssertClean(string root) + { + var result = HygieneGuards.NoIgnoreAttribute( + new ArchitectureGuardOptions { RepoRootOverride = root } + ); + + result + .Inspected.Should() + .BeGreaterThan( + 0, + "the guard inspected no test sources under tests/, so it checked nothing" + ); + result + .Offenders.Should() + .BeEmpty( + "Trax.Docs/adr/0005-a-skipped-test-is-a-runtime-decision.md: a skip is " + + "Assert.Ignore(\"reason\") at runtime, never an attribute. " + + result.FailureMessage + ); + } +} diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoLegacyAssertTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoLegacyAssertTests.cs new file mode 100644 index 000000000..5a79e4aca --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoLegacyAssertTests.cs @@ -0,0 +1,64 @@ +using Trax.Core.Testing; +using Trax.Core.Testing.Guards; + +namespace Trax.StateMachine.Tests.Meta.Tests; + +/// +/// AwesomeAssertions only, because the because argument is where a failure explains itself. +/// The check is the shipped , so this repo applies the +/// same patterns as every other one, ClassicAssert, CollectionAssert and +/// StringAssert included. +/// +/// Enforces Trax.Docs/adr/0004-tests-assert-with-fluentassertions.md. +/// +[Property("adr", "Trax.Docs/adr/0004-tests-assert-with-fluentassertions.md")] +[TestFixture] +public class NoLegacyAssertTests +{ + [Test] + public void TestSources_UseOnly_AwesomeAssertions() => AssertClean(RepoRoot.Path); + + [Test] + public void Guard_fails_on_a_classic_assert() + { + using var repo = new SyntheticRepo().Write( + "tests/Sample/SampleTests.cs", + "public class SampleTests { public void T() { ClassicAssert.AreEqual(1, 1); } }" + ); + + var act = () => AssertClean(repo.Root); + + act.Should().Throw().WithMessage("*ClassicAssert*"); + } + + [Test] + public void Guard_fails_when_it_finds_no_test_source() + { + using var repo = new SyntheticRepo(); + + var act = () => AssertClean(repo.Root); + + act.Should().Throw().WithMessage("*inspected no*"); + } + + private static void AssertClean(string root) + { + var result = HygieneGuards.NoLegacyAsserts( + new ArchitectureGuardOptions { RepoRootOverride = root } + ); + + result + .Inspected.Should() + .BeGreaterThan( + 0, + "the guard inspected no test sources under tests/, so it checked nothing" + ); + result + .Offenders.Should() + .BeEmpty( + "Trax.Docs/adr/0004-tests-assert-with-fluentassertions.md requires AwesomeAssertions " + + "exclusively. " + + result.FailureMessage + ); + } +} diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoOrphanPackageVersionTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoOrphanPackageVersionTests.cs new file mode 100644 index 000000000..77b9a2b73 --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoOrphanPackageVersionTests.cs @@ -0,0 +1,141 @@ +namespace Trax.StateMachine.Tests.Meta.Tests; + +/// +/// Every PackageVersion in the repository's root Directory.Packages.props names a +/// package that some project in the repository actually references. Central Package Management lets a pin stand alone, and with +/// CentralPackageTransitivePinningEnabled on that looks like a clean way to force a +/// version onto a package nothing declares. +/// +/// +/// Dependabot only updates a PackageVersion it can tie to a PackageReference, so a +/// standalone pin is invisible to it and never moves again. The failure is silent in both +/// directions: a frozen pin becomes NU1109 the moment a direct dependency needs a higher version, +/// which breaks every dependency PR in the repo, and where the pin holds a security floor the +/// floor quietly stops rising. Pin a transitive by adding the reference to the projects that +/// pull it. +/// +/// +/// Enforces Trax.Docs/adr/0015-every-packageversion-names-a-referenced-package.md. +/// +[Property("adr", "Trax.Docs/adr/0015-every-packageversion-names-a-referenced-package.md")] +[TestFixture] +public class NoOrphanPackageVersionTests +{ + /// + /// Packages allowed to be pinned with nothing referencing them. An entry here is a pin + /// Dependabot cannot maintain, so it needs a reason that still holds once the pin is frozen. + /// + private static readonly string[] SanctionedStandalonePins = []; + + [Test] + public void EveryPinnedPackage_IsReferencedBySomeProject() + { + var props = MonorepoRoot.Combine("Directory.Packages.props"); + + var referenced = ReferencedPackages(); + + var orphans = PinnedPackages(props) + .Where(p => !referenced.Contains(p)) + .Where(p => !SanctionedStandalonePins.Contains(p, StringComparer.OrdinalIgnoreCase)) + .OrderBy(p => p, StringComparer.Ordinal) + .ToList(); + + orphans + .Should() + .BeEmpty( + "a PackageVersion that no project references is invisible to Dependabot and " + + "freezes: it becomes a NU1109 downgrade the moment a direct dependency " + + "needs more, and a security floor pinned this way stops rising. Add a " + + "PackageReference to the projects that pull the package, or delete the " + + "pin. Enforces Trax.Docs/adr/0015-every-packageversion-names-a-referenced-package.md. " + + "Orphans:\n " + + string.Join("\n ", orphans) + ); + } + + [Test] + public void SanctionedStandalonePins_AreNotStale() + { + var props = MonorepoRoot.Combine("Directory.Packages.props"); + + var pinned = PinnedPackages(props).ToHashSet(StringComparer.OrdinalIgnoreCase); + var referenced = ReferencedPackages(); + + foreach (var name in SanctionedStandalonePins) + { + pinned + .Should() + .Contain( + name, + $"'{name}' is exempted from the pin guard but is no longer pinned at all, " + + "so the exemption is stale and should be removed." + ); + + referenced + .Should() + .NotContain( + name, + $"'{name}' is exempted from the pin guard but a project now references it, " + + "so Dependabot can maintain it and the exemption is stale." + ); + } + } + + private static List PinnedPackages(string props) => + XDocument + .Load(props) + .Descendants("PackageVersion") + .Select(e => e.Attribute("Include")?.Value) + .Where(v => !string.IsNullOrWhiteSpace(v)) + .Select(v => v!) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToList(); + + /// + /// Every package named by a PackageReference anywhere in the repository, every folder + /// included, since one root file pins them all. Directory.Build.props counts: it is where a + /// folder's shared references live, and a package declared only there is referenced just as + /// much as one in a csproj. + /// + private static HashSet ReferencedPackages() + { + var files = Directory + .EnumerateFiles(MonorepoRoot.Path, "*.csproj", SearchOption.AllDirectories) + .Where(f => + !f.Contains($"{Path.DirectorySeparatorChar}obj{Path.DirectorySeparatorChar}") + ) + .Where(f => + !f.Contains($"{Path.DirectorySeparatorChar}bin{Path.DirectorySeparatorChar}") + ) + .Where(f => + !f.Contains( + $"{Path.DirectorySeparatorChar}node_modules{Path.DirectorySeparatorChar}" + ) + ) + .Concat( + Directory.EnumerateFiles( + MonorepoRoot.Path, + "Directory.Build.props", + SearchOption.AllDirectories + ) + ); + + var referenced = new HashSet(StringComparer.OrdinalIgnoreCase); + + foreach (var file in files) + { + foreach ( + var name in XDocument + .Load(file) + .Descendants("PackageReference") + .Select(e => e.Attribute("Include")?.Value) + .Where(v => !string.IsNullOrWhiteSpace(v)) + ) + { + referenced.Add(name!); + } + } + + return referenced; + } +} diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoTestFrameworkInSrcTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoTestFrameworkInSrcTests.cs new file mode 100644 index 000000000..aebe16841 --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoTestFrameworkInSrcTests.cs @@ -0,0 +1,229 @@ +namespace Trax.StateMachine.Tests.Meta.Tests; + +/// +/// Test frameworks stay out of shipped libraries. A src/ project that references NUnit +/// can carry a [Test] into a package a consumer installs, where it is dead weight at +/// best and a second, unrunnable test suite at worst. +/// +/// +/// The exception is deliberate and is the reason this guard names names rather than banning +/// the reference outright: the Trax.*.Testing packages exist to ship architecture-guard +/// fixtures. A consumer references one, subclasses the fixture and inherits its +/// [Test] methods, so the attributes have to be in the shipped assembly. Those +/// projects are listed below; anything else is a mistake. +/// +/// +/// +/// CsCheck, the property-based testing library, has no such exception. A property test is a test, +/// and the Trax.*.Testing packages ship fixtures, not properties, so only a project that sets +/// IsTestProject may reference it, wherever in the folder it lives. +/// +/// +/// Enforces Trax.Docs/adr/0011-test-frameworks-stay-out-of-shipped-libraries.md, and +/// Trax.Docs/adr/0044-property-tests-use-cscheck-in-test-projects-only.md for CsCheck. +/// +[Property("adr", "Trax.Docs/adr/0011-test-frameworks-stay-out-of-shipped-libraries.md")] +[Property("adr", "Trax.Docs/adr/0044-property-tests-use-cscheck-in-test-projects-only.md")] +[TestFixture] +public class NoTestFrameworkInSrcTests +{ + private const string PropertyTestsAdr = + "Trax.Docs/adr/0044-property-tests-use-cscheck-in-test-projects-only.md"; + + /// Test-only packages no project may reference unless it is a test project. + private static readonly string[] TestProjectOnlyPackages = ["CsCheck"]; + + /// + /// Projects allowed to reference a test framework because shipping fixtures is their + /// product. Adding an entry means a new package whose purpose is to deliver guards. + /// + private static readonly string[] SanctionedTestingPackages = + [ + "Trax.Core.Testing", + "Trax.Effect.Data.Testing", + "Trax.Mediator.Testing", + "Trax.Api.GraphQL.Testing", + ]; + + private static readonly string[] TestFrameworkPackages = + [ + "NUnit", + "NUnit3TestAdapter", + "xunit", + "xunit.runner.visualstudio", + "MSTest.TestFramework", + "Microsoft.NET.Test.Sdk", + ]; + + private static bool IsSanctioned(string projectPath) => + SanctionedTestingPackages.Contains( + Path.GetFileNameWithoutExtension(projectPath), + StringComparer.Ordinal + ); + + [Test] + public void SrcProjects_DoNotReferenceATestFramework_UnlessTheyShipFixtures() + { + var src = RepoRoot.Combine("src"); + if (!Directory.Exists(src)) + Assert.Ignore("this repo ships no src/ projects"); + + var offenders = new List(); + + foreach (var proj in Directory.EnumerateFiles(src, "*.csproj", SearchOption.AllDirectories)) + { + if (IsSanctioned(proj)) + continue; + + var referenced = XDocument + .Load(proj) + .Descendants("PackageReference") + .Select(e => e.Attribute("Include")?.Value) + .Where(v => v is not null) + .Where(v => TestFrameworkPackages.Contains(v, StringComparer.OrdinalIgnoreCase)) + .ToList(); + + if (referenced.Count > 0) + offenders.Add($"{RepoRoot.Relative(proj)} -> {string.Join(", ", referenced)}"); + } + + offenders + .Should() + .BeEmpty( + "a shipped library must not reference a test framework. Move the tests to a " + + "project under tests/, or, if the project's purpose is to ship guard " + + "fixtures for consumers, add it to SanctionedTestingPackages and say why. " + + "Enforces Trax.Docs/adr/0011-test-frameworks-stay-out-of-shipped-libraries.md. " + + "Offenders:\n " + + string.Join("\n ", offenders) + ); + } + + [Test] + public void SanctionedTestingPackages_AreNotStale() + { + var src = RepoRoot.Combine("src"); + if (!Directory.Exists(src)) + Assert.Ignore("this repo ships no src/ projects"); + + var present = Directory + .EnumerateFiles(src, "*.csproj", SearchOption.AllDirectories) + .Select(Path.GetFileNameWithoutExtension) + .ToHashSet(StringComparer.Ordinal); + + var claimedHere = SanctionedTestingPackages.Where(present.Contains).ToList(); + + foreach (var name in claimedHere) + { + var proj = Directory + .EnumerateFiles(src, $"{name}.csproj", SearchOption.AllDirectories) + .Single(); + + XDocument + .Load(proj) + .Descendants("PackageReference") + .Select(e => e.Attribute("Include")?.Value) + .Should() + .Contain( + v => TestFrameworkPackages.Contains(v!, StringComparer.OrdinalIgnoreCase), + $"'{name}' is on the sanctioned list because it ships test fixtures. It no " + + "longer references a test framework, so the exemption is stale and " + + "should be removed." + ); + } + } + + [Test] + public void OnlyTestProjects_ReferenceCsCheck() + { + var projects = Directory + .EnumerateFiles(RepoRoot.Path, "*.csproj", SearchOption.AllDirectories) + .Where(p => !IsBuildOutput(p)); + + var offenders = TestOnlyReferencesOutsideTestProjects(projects); + + offenders + .Should() + .BeEmpty( + "CsCheck is a test-only dependency: only a project with " + + "true may reference it, and never a shipped " + + "package or a Trax.*.Testing package. Move the property tests to a test project. " + + $"Enforces {PropertyTestsAdr}. Offenders:\n " + + string.Join("\n ", offenders) + ); + } + + [Test] + public void OnlyTestProjects_ReferenceCsCheck_FlagsALibraryThatDoes() + { + var dir = Directory.CreateTempSubdirectory("trax-cscheck-guard-"); + try + { + var library = Path.Combine(dir.FullName, "Library.csproj"); + File.WriteAllText( + library, + """ + + + + """ + ); + var tests = Path.Combine(dir.FullName, "Library.Tests.csproj"); + File.WriteAllText( + tests, + """ + + true + + + """ + ); + + TestOnlyReferencesOutsideTestProjects([library, tests]) + .Should() + .ContainSingle( + $"a library referencing CsCheck is the violation {PropertyTestsAdr} names, " + + "and a test project referencing it is the use it allows" + ) + .Which.Should() + .Contain("Library.csproj -> CsCheck"); + } + finally + { + dir.Delete(recursive: true); + } + } + + private static List TestOnlyReferencesOutsideTestProjects(IEnumerable projects) + { + var offenders = new List(); + + foreach (var proj in projects) + { + var document = XDocument.Load(proj); + var isTestProject = document + .Descendants("IsTestProject") + .Any(e => + string.Equals(e.Value.Trim(), "true", StringComparison.OrdinalIgnoreCase) + ); + if (isTestProject) + continue; + + var referenced = document + .Descendants("PackageReference") + .Select(e => e.Attribute("Include")?.Value) + .Where(v => v is not null) + .Where(v => TestProjectOnlyPackages.Contains(v, StringComparer.OrdinalIgnoreCase)) + .ToList(); + + if (referenced.Count > 0) + offenders.Add($"{RepoRoot.Relative(proj)} -> {string.Join(", ", referenced)}"); + } + + return offenders; + } + + private static bool IsBuildOutput(string path) => + path.Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar) + .Any(segment => segment is "bin" or "obj" or "node_modules"); +} diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoUnsynchronisedAssertAfterStartTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoUnsynchronisedAssertAfterStartTests.cs new file mode 100644 index 000000000..28eba0f12 --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/NoUnsynchronisedAssertAfterStartTests.cs @@ -0,0 +1,40 @@ +using Trax.Core.Testing; +using Trax.Core.Testing.Guards; + +namespace Trax.StateMachine.Tests.Meta.Tests; + +/// +/// A substitute is checked only once the work a start handed to the background has happened. +/// The check is the shipped : after a +/// StartAsync, a Received or DidNotReceive in the same method must follow a +/// wait for that work, unless the start carries a synchronous-start: comment saying it +/// finishes its work before returning. +/// +/// Enforces Trax.Docs/adr/0006-tests-synchronise-on-a-signal.md. +/// +[Property("adr", "Trax.Docs/adr/0006-tests-synchronise-on-a-signal.md")] +[TestFixture] +public class NoUnsynchronisedAssertAfterStartTests +{ + [Test] + public void TestSources_DoNotCheckASubstituteBeforeTheStartedWorkRan() + { + var result = HygieneGuards.NoUnsynchronisedAssertAfterStart( + new ArchitectureGuardOptions { RepoRootOverride = RepoRoot.Path } + ); + + result + .Inspected.Should() + .BeGreaterThan( + 0, + "the guard inspected no test sources under tests/, so it checked nothing" + ); + result + .Offenders.Should() + .BeEmpty( + "Trax.Docs/adr/0006-tests-synchronise-on-a-signal.md: wait for the started work " + + "before checking what it did. " + + result.FailureMessage + ); + } +} diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/PublicApiSurfaceTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/PublicApiSurfaceTests.cs new file mode 100644 index 000000000..748001a49 --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/PublicApiSurfaceTests.cs @@ -0,0 +1,132 @@ +using System.Reflection; +using PublicApiGenerator; + +namespace Trax.StateMachine.Tests.Meta.Tests; + +/// +/// The published surface is a committed file, so a change to it lands in the diff. +/// +/// Enforces Trax.Docs/adr/0010-the-public-api-surface-is-a-committed-baseline.md. +/// +[Property("adr", "Trax.Docs/adr/0010-the-public-api-surface-is-a-committed-baseline.md")] +[TestFixture] +public class PublicApiSurfaceTests +{ + private static readonly string BaselineDir = Path.Combine( + AppContext.BaseDirectory, + "PublicApi" + ); + + private static readonly string BaselineSourceDir = Path.Combine( + Path.GetDirectoryName(typeof(PublicApiSurfaceTests).Assembly.Location)!, + "..", + "..", + "..", + "PublicApi" + ); + + public static IEnumerable Assemblies() + { + yield return new TestCaseData(typeof(Trax.StateMachine.CorpusReplay).Assembly).SetName( + "Trax.StateMachine" + ); + yield return new TestCaseData( + typeof(Trax.StateMachine.Persistence.ISnapshotStore).Assembly + ).SetName("Trax.StateMachine.Persistence"); + yield return new TestCaseData( + typeof(Trax.StateMachine.Testing.DifferentialCorpus).Assembly + ).SetName("Trax.StateMachine.Testing"); + } + + /// + /// Every package this repo publishes has a baseline, so a new one cannot ship unguarded. + /// + /// + /// The list above is hand-written, which is how Trax.Effect.Provider.Parameter went five + /// releases without one: the assembly was referenced by this project and simply never added. + /// Reading the projects off disk is the only version of this check that notices a package + /// nobody remembered. + /// + [Test] + public void EveryPublishedProject_HasABaseline() + { + var srcDir = RepoRoot.Combine("src"); + Directory.Exists(srcDir).Should().BeTrue("missing 'src'."); + + var missing = new List(); + + foreach (var projectDir in Directory.EnumerateDirectories(srcDir)) + { + var name = Path.GetFileName(projectDir); + var csproj = Path.Combine(projectDir, $"{name}.csproj"); + if (!File.Exists(csproj)) + continue; + + // A project that opts out of packing publishes nothing, so it has no surface to pin. + if ( + File.ReadAllText(csproj) + .Contains("false", StringComparison.OrdinalIgnoreCase) + ) + continue; + + if (!File.Exists(Path.Combine(BaselineSourceDir, $"{name}.received.txt"))) + missing.Add(name); + } + + missing + .Should() + .BeEmpty( + "every project under src/ that packs must have a committed public API baseline, " + + "and be listed in Assemblies() above so PublicApi_Matches_CheckedInBaseline " + + "compares it. Trax.Docs/adr/0010-the-public-api-surface-is-a-committed-baseline.md " + + "is the rule. Without one, a breaking change to that package reaches NuGet " + + "without appearing in any diff. Missing:\n " + + string.Join("\n ", missing) + ); + } + + [TestCaseSource(nameof(Assemblies))] + public void PublicApi_Matches_CheckedInBaseline(Assembly assembly) + { + var name = assembly.GetName().Name!; + var current = assembly.GeneratePublicApi( + new ApiGeneratorOptions { IncludeAssemblyAttributes = false } + ); + + var baselinePath = Path.Combine(BaselineDir, $"{name}.received.txt"); + + if (!File.Exists(baselinePath)) + { + Directory.CreateDirectory(BaselineDir); + File.WriteAllText(baselinePath, current); + try + { + Directory.CreateDirectory(BaselineSourceDir); + File.WriteAllText(Path.Combine(BaselineSourceDir, $"{name}.received.txt"), current); + } + catch + { + // best-effort write to source tree + } + Assert.Fail( + $"No public API baseline for '{name}'. A baseline has been written to " + + $"'PublicApi/{name}.received.txt' in the test source tree. Review, commit, re-run." + ); + return; + } + + var baseline = File.ReadAllText(baselinePath); + + string Normalize(string s) => s.Replace("\r\n", "\n").TrimEnd() + "\n"; + + Normalize(current) + .Should() + .Be( + Normalize(baseline), + $"public API of '{name}' must match the checked-in baseline at " + + $"PublicApi/{name}.received.txt. If this change is intentional, update the baseline. " + + "Adding, removing, or changing a public type/member is a potential breaking change. " + + "Trax.Docs/contributing/releases.md > Commit types: a major version bump on NuGet is permanent." + ); + } +} diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/TestFolderLayoutTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/TestFolderLayoutTests.cs new file mode 100644 index 000000000..6f879225c --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/TestFolderLayoutTests.cs @@ -0,0 +1,132 @@ +namespace Trax.StateMachine.Tests.Meta.Tests; + +/// +/// Test projects keep to the canonical folder layout. +/// +/// Not ADR-enforcing: it pins a folder convention that was adopted rather than chosen; the layout is documented at contributing/test-conventions and no alternative was weighed. +/// +[TestFixture] +public class TestFolderLayoutTests +{ + /// + /// Folder names that are explicitly forbidden as direct children of a test project. + /// (TestResults/ and coverage/ are gitignored and excluded here; a separate test verifies + /// that they remain gitignored.) + /// + private static readonly HashSet ForbiddenFolders = new(StringComparer.OrdinalIgnoreCase) + { + ".vs", + ".idea", + "node_modules", + "Junk", + "Tmp", + "Temp", + "Misc", + "Old", + "Legacy", + }; + + private static readonly HashSet SkipFolders = new(StringComparer.OrdinalIgnoreCase) + { + "bin", + "obj", + "TestResults", + "coverage", + }; + + private static readonly Regex PascalCaseFolder = new( + @"^[A-Z][A-Za-z0-9]*$", + RegexOptions.Compiled + ); + + private static readonly HashSet LowercaseExceptions = new(StringComparer.Ordinal) + { + "tests", + }; + + [Test] + public void TestProjects_DoNotContain_ForbiddenFolders() + { + var offenders = new List(); + + var testsRoot = RepoRoot.Combine("tests"); + if (!Directory.Exists(testsRoot)) + Assert.Inconclusive("No tests/ directory in this repo."); + + foreach (var projectDir in Directory.EnumerateDirectories(testsRoot)) + { + foreach (var sub in Directory.EnumerateDirectories(projectDir)) + { + var name = Path.GetFileName(sub); + if (ForbiddenFolders.Contains(name)) + offenders.Add($"{RepoRoot.Relative(sub)} (forbidden folder '{name}')"); + } + } + + offenders + .Should() + .BeEmpty( + "Test projects must not contain anti-pattern folder names. " + + "'Junk/'/'Misc/'/'Tmp/'/'Old/' signal poor organization. Offenders:\n " + + string.Join("\n ", offenders) + ); + } + + [Test] + public void TestProjects_TopLevelFolders_Are_PascalCase() + { + var offenders = new List(); + + var testsRoot = RepoRoot.Combine("tests"); + if (!Directory.Exists(testsRoot)) + Assert.Inconclusive("No tests/ directory in this repo."); + + foreach (var projectDir in Directory.EnumerateDirectories(testsRoot)) + { + foreach (var sub in Directory.EnumerateDirectories(projectDir)) + { + var name = Path.GetFileName(sub); + if (ForbiddenFolders.Contains(name)) + continue; + if (SkipFolders.Contains(name)) + continue; + if (LowercaseExceptions.Contains(name)) + continue; + if (!PascalCaseFolder.IsMatch(name)) + offenders.Add($"{RepoRoot.Relative(sub)} (folder name not PascalCase)"); + } + } + + offenders + .Should() + .BeEmpty( + "Top-level folders inside a test project must be PascalCase (matching the C# " + + "namespace convention, e.g. Fixtures/, Fakes/, IntegrationTests/, UnitTests/). " + + "snake_case or kebab-case at this level signals a strayed file. Offenders:\n " + + string.Join("\n ", offenders) + ); + } + + [Test] + public void Repo_Gitignore_Excludes_TestResults() + { + var gitignorePath = RepoRoot.Combine(".gitignore"); + File.Exists(gitignorePath).Should().BeTrue($"missing .gitignore at '{gitignorePath}'."); + + var content = File.ReadAllText(gitignorePath); + + // Accept either explicit 'TestResults' or the [Tt]est[Rr]esult glob form + // (both are recognised by gitignore and produced by `dotnet new gitignore`). + var hasTestResults = + Regex.IsMatch(content, @"\bTestResults\b", RegexOptions.IgnoreCase) + || Regex.IsMatch(content, @"\[Tt\]est\[Rr\]esult"); + + hasTestResults + .Should() + .BeTrue( + "the repo .gitignore must exclude TestResults/ (dotnet test --collect output) so test " + + "run artifacts never get committed. Add a line like '[Tt]est[Rr]esult*/' or " + + "'TestResults/'." + ); + } +} diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs new file mode 100644 index 000000000..ca42d73dc --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Tests/TraxReferencesAreProjectReferencesTests.cs @@ -0,0 +1,66 @@ +namespace Trax.StateMachine.Tests.Meta.Tests; + +/// +/// Inside the repository a Trax package is referenced as a project, never as a package. A +/// PackageReference to one would build against whichever release nuget.org has rather than +/// the code in the same commit, and a change to the package would stop reaching the project that +/// uses it. The template content under templates/content/ is the one exception: it is +/// scaffolded outside the repository, and its references are swapped for project references at +/// build time. +/// +/// Enforces Trax.Docs/adr/0042-trax-is-one-repository-and-releases-at-one-version.md. +/// +[Property("adr", "Trax.Docs/adr/0042-trax-is-one-repository-and-releases-at-one-version.md")] +[TestFixture] +public class TraxReferencesAreProjectReferencesTests +{ + private const string Adr = + "Trax.Docs/adr/0042-trax-is-one-repository-and-releases-at-one-version.md"; + + [Test] + public void No_project_references_a_Trax_package_built_in_this_repository() + { + var builtHere = TraxProjects(); + builtHere.Should().NotBeEmpty("the repository builds the Trax packages it references"); + + var offenders = new List(); + foreach (var csproj in SourceFiles.Projects().Where(p => !IsTemplateContent(p))) + { + foreach (var pkg in XDocument.Load(csproj).Descendants("PackageReference")) + { + var include = pkg.Attribute("Include")?.Value; + if (include is not null && builtHere.Contains(include)) + offenders.Add($"{RepoRoot.Relative(csproj)} -> {include}"); + } + } + + offenders + .Should() + .BeEmpty( + "a Trax package built in this repository is referenced with a ProjectReference to " + + "its csproj, so every build compiles against the same commit. Offenders " + + $"({Adr}):\n " + + string.Join("\n ", offenders) + ); + } + + /// + /// The package id of every Trax project in the repository: the file name of each csproj under + /// a folder's src/, or its dotnet/src/ in a folder that holds more than .NET. + /// + private static HashSet TraxProjects() => + Directory + .EnumerateDirectories(MonorepoRoot.Path, "Trax.*") + .SelectMany(f => new[] { f, Path.Combine(f, "dotnet") }) + .Select(folder => Path.Combine(folder, "src")) + .Where(Directory.Exists) + .SelectMany(src => + Directory.EnumerateFiles(src, "*.csproj", SearchOption.AllDirectories) + ) + .Select(Path.GetFileNameWithoutExtension) + .Select(name => name!) + .ToHashSet(StringComparer.OrdinalIgnoreCase); + + private static bool IsTemplateContent(string path) => + path.Replace('\\', '/').Contains("/templates/content/", StringComparison.Ordinal); +} diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Trax.StateMachine.Tests.Meta.csproj b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Trax.StateMachine.Tests.Meta.csproj new file mode 100644 index 000000000..def79c228 --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/Trax.StateMachine.Tests.Meta.csproj @@ -0,0 +1,36 @@ + + + net10.0 + enable + enable + + false + true + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/packages.lock.json b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/packages.lock.json new file mode 100644 index 000000000..98e4d249c --- /dev/null +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Tests.Meta/packages.lock.json @@ -0,0 +1,396 @@ +{ + "version": 2, + "dependencies": { + "net10.0": { + "AwesomeAssertions": { + "type": "Direct", + "requested": "[9.6.0, )", + "resolved": "9.6.0", + "contentHash": "8kdtgI+tZIgP46ncnk650/dU4JSrn+n2Dkic8FvjIFn72P6Nv1Afyr5F8F3PsokHg1GBSBVo1/Z+eZOrU5esSA==" + }, + "coverlet.collector": { + "type": "Direct", + "requested": "[10.1.0, )", + "resolved": "10.1.0", + "contentHash": "SlYCIHnBYxINSUpR75SiM5JEmnx11pqT+Ac/C/fUqTTA0dLPl9eYzmFXKKuxmQhL3ZdTQl4PBD3YdAxAauaKLQ==" + }, + "DotNet.ReproducibleBuilds": { + "type": "Direct", + "requested": "[2.0.5, )", + "resolved": "2.0.5", + "contentHash": "8LrlvI1KpjjJ4VGSqZ16yoOCKlQnYS+Y8rYNifNrscmVh5anJcF9E4e0NiDP30BHBMUbkoJ5KdcxoRWM7Pz9Aw==" + }, + "Microsoft.CodeAnalysis.CSharp": { + "type": "Direct", + "requested": "[5.9.0, )", + "resolved": "5.9.0", + "contentHash": "7JGDA0UT1+h7k9ZcA3rF4eFC8+QPq1xyYaXxag4p8r/zzPurEJxvdi7aM+MRL/SfP7XADXpWF/pl/eUYXOq/ww==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "5.9.0-1.26328.17", + "Microsoft.CodeAnalysis.Common": "[5.9.0]" + } + }, + "Microsoft.NET.Test.Sdk": { + "type": "Direct", + "requested": "[18.10.1, )", + "resolved": "18.10.1", + "contentHash": "SxCFvJE/2ltUQgCgv6+Ixagohw4sZc9hM7Wid2foaNM7paBscktoHLoRDz91fW8wbHG87Rg9Ku59/8PXumqUrA==", + "dependencies": { + "Microsoft.CodeCoverage": "18.10.1", + "Microsoft.TestPlatform.TestHost": "18.10.1" + } + }, + "Microsoft.Testing.Extensions.VSTestBridge": { + "type": "Direct", + "requested": "[2.5.1, )", + "resolved": "2.5.1", + "contentHash": "Lhz4J5qYYfPaQxtM7cCn//yGst2RMZDoCDv2rd7hL7N92PzwubMWZTQ3Z1U1IqulRgZldXqC60uExuO7GnusFQ==", + "dependencies": { + "Microsoft.TestPlatform.ObjectModel": "18.10.1", + "Microsoft.Testing.Extensions.Telemetry": "2.5.1", + "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.5.1", + "Microsoft.Testing.Platform": "[2.5.1, 3.0.0)" + } + }, + "Microsoft.Testing.Platform.MSBuild": { + "type": "Direct", + "requested": "[2.5.1, )", + "resolved": "2.5.1", + "contentHash": "lYawcAwY+h76rQmpma2n0HaL8zkOFbbKapso0Eb+uOAUQn7333pIByLftEuiO67csAoZufHNMwi6PqhNemWQXA==", + "dependencies": { + "Microsoft.Testing.Platform": "[2.5.1, 3.0.0)" + } + }, + "NUnit": { + "type": "Direct", + "requested": "[5.0.0, )", + "resolved": "5.0.0", + "contentHash": "tW5Juazgh4CI4pXo5c9c2J9J4i9vwZMm/FJ+gRRe0plJHLCz7Ck/raPuE5q1xWmLAUwpao4Ht1Uy1uRN3Wo5sw==" + }, + "NUnit.Analyzers": { + "type": "Direct", + "requested": "[4.15.0, )", + "resolved": "4.15.0", + "contentHash": "WbZpZI/gmrmTcb8JnP8poJBD4V6hJs2RRIQAmNxQ763t7RktZ/d6xxuU08XAd4K6SpnF0Bm02ADqL2wZ0CNIQA==" + }, + "NUnit3TestAdapter": { + "type": "Direct", + "requested": "[6.3.0, )", + "resolved": "6.3.0", + "contentHash": "8ZD+0dIfDHsL4w4Gl/LPxWH0O4ky3hFXqTZjY+ry0ThI3cMVErr9Tjxal5O5wJxGXh50a9qkDEAWVca8KQYCEw==", + "dependencies": { + "Microsoft.Extensions.DependencyModel": "8.0.2", + "Microsoft.Testing.Extensions.VSTestBridge": "2.3.3", + "Microsoft.Testing.Platform.MSBuild": "2.3.3" + } + }, + "PublicApiGenerator": { + "type": "Direct", + "requested": "[11.5.4, )", + "resolved": "11.5.4", + "contentHash": "Va382WG4Vng8kCtDaAP5solqbhayMMlW1E+e/DV/w39yJPybmMgy8fbdUvvQgG93EMILx7JtJbGS1HRhVNTUVQ==", + "dependencies": { + "Mono.Cecil": "0.11.6", + "System.CodeDom": "6.0.0" + } + }, + "Microsoft.ApplicationInsights": { + "type": "Transitive", + "resolved": "2.23.0", + "contentHash": "nWArUZTdU7iqZLycLKWe0TDms48KKGE6pONH2terYNa8REXiqixrMOkf1sk5DHGMaUTqONU2YkS4SAXBhLStgw==" + }, + "Microsoft.CodeAnalysis.Common": { + "type": "Transitive", + "resolved": "5.9.0", + "contentHash": "IYaIaUWdIx539AReKZOBEqTskFusZfCh/wFSPilDvCn5Say8MegLw2LONcSIcVy+v3Gzv53qYBspgvBGSErfbQ==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "5.9.0-1.26328.17" + } + }, + "Microsoft.CodeCoverage": { + "type": "Transitive", + "resolved": "18.10.1", + "contentHash": "tV7tCyp/t+DuwQugLkCeUN7NBFFB4fEGRPr0gkMQ2nQgAvQQjmGlZZi1dsLzbyoe/A0mbnKybmkIh8qhT9p4Zw==" + }, + "Microsoft.EntityFrameworkCore.Abstractions": { + "type": "Transitive", + "resolved": "10.0.12", + "contentHash": "kDrux7T6C3V/YYYe2LXr7x6AEsVyq5Y2YoTE9er1SwbDtap3z1g8RgxNh5eKQVyB4T+DKvBBJ4Ezd/VZzJQJZg==" + }, + "Microsoft.EntityFrameworkCore.Analyzers": { + "type": "Transitive", + "resolved": "10.0.12", + "contentHash": "Kd4o2oO1A6dfKxjz5LS16QyLtpCFTUiFWwmBABETAXRsSImBdRdWeKjSgbbRhAMiV3a3/nWr95ZtzClT4uaADQ==" + }, + "Microsoft.Extensions.Caching.Abstractions": { + "type": "Transitive", + "resolved": "10.0.12", + "contentHash": "sI3A6MUAyZwccLnwq0cXuRmC3WBtXieimBWafXSfhRJ4jnM2uGVXrqImDDVyW27u4vVaTOGlJxNJd8d1FGvCNQ==", + "dependencies": { + "Microsoft.Extensions.Primitives": "10.0.12" + } + }, + "Microsoft.Extensions.Caching.Memory": { + "type": "Transitive", + "resolved": "10.0.12", + "contentHash": "fhC3DHcBcFF4bXvHIxFtXJYNut7q7ZItqNFcgWfrIgmpVImlcEKNHhE7ztpNSPJYMHYYStS5QGND2I5mC26yeA==", + "dependencies": { + "Microsoft.Extensions.Caching.Abstractions": "10.0.12", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.12", + "Microsoft.Extensions.Logging.Abstractions": "10.0.12", + "Microsoft.Extensions.Options": "10.0.12", + "Microsoft.Extensions.Primitives": "10.0.12" + } + }, + "Microsoft.Extensions.Configuration.Abstractions": { + "type": "Transitive", + "resolved": "10.0.12", + "contentHash": "8xaGcvS/qZ1otoxPQCEJkNva389CVL/plNcvIETZhQTETYdRkYDPEYhUMoAGONo4FU45ufdfE0j29AfWVVj0wA==", + "dependencies": { + "Microsoft.Extensions.Primitives": "10.0.12" + } + }, + "Microsoft.Extensions.DependencyModel": { + "type": "Transitive", + "resolved": "8.0.2", + "contentHash": "mUBDZZRgZrSyFOsJ2qJJ9fXfqd/kXJwf3AiDoqLD9m6TjY5OO/vLNOb9fb4juC0487eq4hcGN/M2Rh/CKS7QYw==" + }, + "Microsoft.Extensions.Diagnostics.Abstractions": { + "type": "Transitive", + "resolved": "10.0.12", + "contentHash": "fMp91qlRlMOuHfMyp7LuAnOS+MOeWTF1obJmyFcs4nZCXu6pr+QB1AbFJcl2qpBltBrqF/Y7+Rn9IuNcSuctig==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.12", + "Microsoft.Extensions.Options": "10.0.12" + } + }, + "Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions": { + "type": "Transitive", + "resolved": "10.0.12", + "contentHash": "oN4AYFq+50m7a65GgRxRqjdynWS6kVQAH6gHKRTfsrLP/aH7RvxIQ7139fjbnrxBwzfZQtZRhlcjvEIiRzihrg==" + }, + "Microsoft.Extensions.FileProviders.Abstractions": { + "type": "Transitive", + "resolved": "10.0.12", + "contentHash": "iQseV6HixWzEYQH4i++84ToIroXnM5jC1TJF4EqBz3lWNG1HBTMYDLkRb6Wm3wk5V6WqSfl7NukO/LYsloGyfg==", + "dependencies": { + "Microsoft.Extensions.Primitives": "10.0.12" + } + }, + "Microsoft.Extensions.Options": { + "type": "Transitive", + "resolved": "10.0.13", + "contentHash": "tmMJgdrE4uhf1JcNs9CV9moAHW+hmDuvgMiPpnQxarKaUxqI2eN33sYK5S4l9Uw+rG9PJvlm4qPxMhvolTDTaQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.13", + "Microsoft.Extensions.Primitives": "10.0.13" + } + }, + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "10.0.13", + "contentHash": "ZjTwxzhiw2TMEzIbUDkMF0dfDB2I4NQgIfKD0ELu9/5Mk+SRGdKZcD0/lvBrRCAPo6KN2r0BW86MRancoyJkoA==" + }, + "Microsoft.Testing.Extensions.Telemetry": { + "type": "Transitive", + "resolved": "2.5.1", + "contentHash": "mu2iyoHovwl0q1mGeeRU0h8+LALXC7HqbxniLa1shTKYdJGl+KPoCEgjWIQ8MLzk1tlTGPOfg1JsxdH3RxhMCA==", + "dependencies": { + "Microsoft.ApplicationInsights": "2.23.0", + "Microsoft.Testing.Platform": "[2.5.1, 3.0.0)" + } + }, + "Microsoft.Testing.Extensions.TrxReport.Abstractions": { + "type": "Transitive", + "resolved": "2.5.1", + "contentHash": "DYTZAguaHz0wNJdHDTTGYOXtnlDoLoIbTMDKSApNNcytm55DJcnwpwELfQGLk5DB5QlgaEjNhnGo1Pu5QvL5VA==", + "dependencies": { + "Microsoft.Testing.Platform": "[2.5.1, 3.0.0)" + } + }, + "Microsoft.Testing.Platform": { + "type": "Transitive", + "resolved": "2.5.1", + "contentHash": "FAMaFFWnULW+hDHMb40Qzhcgz9cAU2/EtgRCBNX/DdQoKo0sPG2EiY+w7bQdl/BgHnf/DbpXLbf5Xy0o15M8NA==" + }, + "Microsoft.TestPlatform.ObjectModel": { + "type": "Transitive", + "resolved": "18.10.1", + "contentHash": "o+PuLDRVp1iwiVAPBADZItXgm9Ck23XtPhE4kZtZVi0uYnMiiz1Dx9Cjh75kJ+ijfqnORL3VOTOaQVKi0f/ixg==" + }, + "Microsoft.TestPlatform.TestHost": { + "type": "Transitive", + "resolved": "18.10.1", + "contentHash": "KYz2omqkoz9E2mWa4fdgT+Ycie1wi5968EmyJlusjlp87RxxtA2FvDm8tcBEYIDzLnkWGnsKjE4d13Z7/rxkQA==", + "dependencies": { + "Microsoft.TestPlatform.ObjectModel": "18.10.1" + } + }, + "Mono.Cecil": { + "type": "Transitive", + "resolved": "0.11.6", + "contentHash": "f33RkDtZO8VlGXCtmQIviOtxgnUdym9xx/b1p9h91CRGOsJFxCFOFK1FDbVt1OCf1aWwYejUFa2MOQyFWTFjbA==" + }, + "System.CodeDom": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "CPc6tWO1LAer3IzfZufDBRL+UZQcj5uS207NHALQzP84Vp/z6wF0Aa0YZImOQY8iStY0A2zI/e3ihKNPfUm8XA==" + }, + "trax.core": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "[10.0.13, )", + "Microsoft.Extensions.Logging.Abstractions": "[10.0.13, )" + } + }, + "trax.core.testing": { + "type": "Project", + "dependencies": { + "Microsoft.CodeAnalysis.CSharp": "[5.9.0, )", + "NUnit": "[5.0.0, )" + } + }, + "trax.effect": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.Hosting.Abstractions": "[10.0.12, )", + "Microsoft.Extensions.Logging.Abstractions": "[10.0.13, )", + "Trax.Core": "[1.99.99, )" + } + }, + "trax.effect.data": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Npgsql": "[10.0.3, )", + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine": { + "type": "Project", + "dependencies": { + "Trax.Effect": "[1.99.99, )" + } + }, + "trax.statemachine.persistence": { + "type": "Project", + "dependencies": { + "Microsoft.EntityFrameworkCore": "[10.0.12, )", + "Microsoft.EntityFrameworkCore.Relational": "[10.0.12, )", + "Microsoft.Extensions.DependencyInjection": "[10.0.13, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.12, )", + "Trax.Effect": "[1.99.99, )", + "Trax.Effect.Data": "[1.99.99, )", + "Trax.StateMachine": "[1.99.99, )" + } + }, + "trax.statemachine.testing": { + "type": "Project", + "dependencies": { + "Trax.StateMachine": "[1.99.99, )", + "Trax.StateMachine.Persistence": "[1.99.99, )" + } + }, + "Microsoft.CodeAnalysis.Analyzers": { + "type": "CentralTransitive", + "requested": "[5.9.0-1.26328.17, )", + "resolved": "5.9.0-1.26328.17", + "contentHash": "HP9NNk8ZjOSI2hgOyXnQg+kv7/X837Vr2nAlXiGAtqtYnYKjRRa1UmQFr8KFs5ynGYKqfbb8zB9APoWjiAGdMg==" + }, + "Microsoft.EntityFrameworkCore": { + "type": "CentralTransitive", + "requested": "[10.0.12, )", + "resolved": "10.0.12", + "contentHash": "e7OrVN8U5yr4kuwdTHWBHGVQIVsGfMkAr0Ej1/BnrS989Q0XBVANpIzNZ2bc1GvMZ0/XwMt5InTnmKskxGy99Q==", + "dependencies": { + "Microsoft.EntityFrameworkCore.Abstractions": "10.0.12", + "Microsoft.EntityFrameworkCore.Analyzers": "10.0.12", + "Microsoft.Extensions.Caching.Memory": "10.0.12", + "Microsoft.Extensions.Logging": "10.0.12" + } + }, + "Microsoft.EntityFrameworkCore.Relational": { + "type": "CentralTransitive", + "requested": "[10.0.12, )", + "resolved": "10.0.12", + "contentHash": "OiHmr8XzX96dbgMsYGe8qoqg4KxibdZG2r0QUVJBGktFInOp8IrABe8jvcbo5hrqeWfbwpK7fCEBiEPbY/ik4A==", + "dependencies": { + "Microsoft.EntityFrameworkCore": "10.0.12", + "Microsoft.Extensions.Caching.Memory": "10.0.12", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.12", + "Microsoft.Extensions.Logging": "10.0.12" + } + }, + "Microsoft.Extensions.DependencyInjection": { + "type": "CentralTransitive", + "requested": "[10.0.13, )", + "resolved": "10.0.13", + "contentHash": "4tnWU9vrU/A8NwYe9Z6wvieZ0EBb/uM82LAT+edNhdepOBWREZ7M7mzb941EIDPJaeOFdbVrDd5+7s9e89U6bQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.13" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "CentralTransitive", + "requested": "[10.0.13, )", + "resolved": "10.0.13", + "contentHash": "G2GrGWNAPZBsii2F6AU8n+JT2tC1/I0Ml/e9ZyNCgPjf3hZqronP7o0X91aAynCmVeae8KkSIUNXXeXCNRmdVQ==" + }, + "Microsoft.Extensions.Diagnostics.HealthChecks": { + "type": "CentralTransitive", + "requested": "[10.0.12, )", + "resolved": "10.0.12", + "contentHash": "Ck8nkBxEYPOGtUCp0whKwfE4qAHBnsK0DY1kgZLKvzf7s9xyr4lASa4K4AKNN1VHy7r3Z1Z57U6C0TMzFjD8ig==", + "dependencies": { + "Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions": "10.0.12", + "Microsoft.Extensions.Hosting.Abstractions": "10.0.12", + "Microsoft.Extensions.Logging.Abstractions": "10.0.12", + "Microsoft.Extensions.Options": "10.0.12" + } + }, + "Microsoft.Extensions.Hosting.Abstractions": { + "type": "CentralTransitive", + "requested": "[10.0.12, )", + "resolved": "10.0.12", + "contentHash": "ZlIxIJtWmrph0Ikj0svSaTkZ+d+ZYpTAhazpf1b3aoFRmlNnNWwkcvqnqT9yKHjKvfBRthvUrkq11OxfItOhpg==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "10.0.12", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.12", + "Microsoft.Extensions.Diagnostics.Abstractions": "10.0.12", + "Microsoft.Extensions.FileProviders.Abstractions": "10.0.12", + "Microsoft.Extensions.Logging.Abstractions": "10.0.12" + } + }, + "Microsoft.Extensions.Logging": { + "type": "CentralTransitive", + "requested": "[10.0.13, )", + "resolved": "10.0.13", + "contentHash": "fqbiPy4nUp4H2XHKAVQXKN2y3T2h4cFIx1DAAgE6iY9OHkN/OA1cKFi+geJKRWGuX6pS5SFbsjIPWHJqrxE0eg==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection": "10.0.13", + "Microsoft.Extensions.Logging.Abstractions": "10.0.13", + "Microsoft.Extensions.Options": "10.0.13" + } + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "CentralTransitive", + "requested": "[10.0.13, )", + "resolved": "10.0.13", + "contentHash": "aSZEhEig4fvNiw2zs8Z6NyDlniKtq6YjcF3DyHuqTEHcZ2VKA/6itMPZ+dW+yWABWExlDcQwwdbqX1Rcb7W8WQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.13" + } + }, + "Npgsql": { + "type": "CentralTransitive", + "requested": "[10.0.3, )", + "resolved": "10.0.3", + "contentHash": "7nb5YzXuvWWJxB0J8DiyL3we+X4FOctZrt0fIBnucOIaIevFEEwGQVZKtiu9olXdlNAK1eNgqSral6r/jlhI4w==", + "dependencies": { + "Microsoft.Extensions.Logging.Abstractions": "10.0.0" + } + } + } + } +} \ No newline at end of file From 328dc2327297aab4a4f7d31e488d49358db2f639 Mon Sep 17 00:00:00 2001 From: Theauxm <43664045+Theauxm@users.noreply.github.com> Date: Tue, 20 Oct 2026 11:08:55 -0600 Subject: [PATCH 5/6] ci(tooling): one suite per language for Trax.StateMachine Trax.StateMachine has no folder job. Its C# solution, its TypeScript engine and the cross-engine checks are three suites with their own paths: state-machine-dotnet runs for dotnet/ and the kit, state-machine-ts for ts/ and the kit, and state-machine-conformance, the C# CrossEngine tests plus the kit through the TypeScript engine, for anything in the folder. A change to one language no longer rebuilds the other, and none of them reruns Trax.Effect. A suite marked checks makes the folder job's checks itself, and the release, the Dependabot lockfile workflow and the coverage upload include suites. --- .github/ci/packages.json | 26 +++++- .github/release/release-workflow.test.mjs | 11 +++ .github/scripts/ci-changes.sh | 25 ++++-- .github/workflows/ci.yml | 97 +++++++++++++++++----- .github/workflows/dependabot_lockfiles.yml | 6 +- .github/workflows/release.yml | 8 +- 6 files changed, 136 insertions(+), 37 deletions(-) diff --git a/.github/ci/packages.json b/.github/ci/packages.json index 83a5fdc52..f9bfe7c1a 100644 --- a/.github/ci/packages.json +++ b/.github/ci/packages.json @@ -1,5 +1,5 @@ { - "_comment": "One entry per folder CI builds. 'upstream' names the folders whose change can break this one; the change detector runs a folder when it or anything upstream of it changes. 'dotnet' configures the .NET job (absent for a folder with no .NET build; 'release-pack' names the one project a release packs instead of the solution; 'state-machine' installs the npm packages of Trax.StateMachine/ts, the TypeScript engine, first, for tests that run its generators under node; 'playwright' installs chromium, and the npm packages of Trax.StateMachine/ts and the Recovery page, which the browser tests build, Trax.Docs/adr/0049; 'api-dashboard' installs the npm packages of Trax.Api.Dashboard's React app before the build, which compiles it into the package); 'adr' configures the ADR guard over that folder's corpus. 'suites' are test projects carved out of a folder into a job of their own: one runs when anything in its 'upstream' (closed over like a folder's) or under one of its 'paths' changed, its folder's own job leaves it out with that row's 'test-args' filter, and its 'dotnet' takes the same keys as a folder's, with 'chromium' to install the browser, 'postgres-user'/'postgres-password' and 'rabbitmq-user'/'rabbitmq-password' for services that log in as someone other than trax, and 'web' for an npm folder (relative to the folder) whose tests and build run after the .NET tests.", + "_comment": "One entry per folder CI builds. 'upstream' names the folders whose change can break this one; the change detector runs a folder when it or anything upstream of it changes. 'dotnet' configures the .NET job (absent for a folder with no .NET build; 'release-pack' names the one project a release packs instead of the solution; 'state-machine' installs the npm packages of Trax.StateMachine/ts, the TypeScript engine, first, for tests that run its generators under node; 'playwright' installs chromium, and the npm packages of Trax.StateMachine/ts and the Recovery page, which the browser tests build, Trax.Docs/adr/0049; 'api-dashboard' installs the npm packages of Trax.Api.Dashboard's React app before the build, which compiles it into the package); 'adr' configures the ADR guard over that folder's corpus. 'suites' are jobs of their own beside the folders' jobs: one runs when anything in its 'upstream' (closed over like a folder's) or under one of its 'paths' changed. A suite with 'dotnet' restores, builds and tests its 'project' (a test project or a solution) from its 'folder', and its 'dotnet' takes the same keys as a folder's, with 'chromium' to install the browser, 'postgres-user'/'postgres-password' and 'rabbitmq-user'/'rabbitmq-password' for services that log in as someone other than trax, 'web' for an npm folder (relative to the folder) whose tests and build run after the .NET tests, 'checks' for a suite that is a folder's whole solution and so gets the folder job's formatting, lock and deprecation checks (and the Dependabot lockfile workflow's regeneration), 'pack' to pack it with package validation (the release packs it too), and 'conformance' to run the conformance kit through the TypeScript engine after the tests. A test project carved out of a folder's own job is left out of that job with the row's 'test-args' filter. A suite with no 'dotnet' is an npm folder with a job of its own in ci.yml (state-machine-ts). Trax.StateMachine has no folder job: its C#, TypeScript and cross-engine checks are three suites, so a change to one language does not rebuild the other.", "packages": [ { "folder": "Trax.Core", @@ -16,7 +16,7 @@ { "folder": "Trax.StateMachine", "upstream": ["Trax.Effect"], - "dotnet": { "solution": "dotnet/Trax.StateMachine.slnx", "state-machine": true, "pack": true, "coverage": true, "postgres": "trax_data_tests", "rabbitmq": false, "databases": [], "timeout": 15, "test-args": "" } + "adr": { "adr-root": "docs/adr", "test-roots": "dotnet/tests", "known-areas": "platform,data-model,testing,auth", "census-root": "dotnet/tests/Trax.StateMachine.Tests.Meta" } }, { "folder": "Trax.Mediator", @@ -72,6 +72,28 @@ "upstream": ["Trax.Api"], "paths": ["Trax.Samples/book/"], "dotnet": { "api-dashboard": true, "web": "book/Shopfront/web", "postgres": "shopfront", "postgres-user": "postgres", "postgres-password": "shopfront", "rabbitmq": true, "rabbitmq-user": "guest", "rabbitmq-password": "guest", "databases": [], "timeout": 15, "test-args": "" } + }, + { + "name": "state-machine-dotnet", + "folder": "Trax.StateMachine/dotnet", + "project": "Trax.StateMachine.slnx", + "upstream": ["Trax.Effect"], + "paths": ["Trax.StateMachine/dotnet/", "Trax.StateMachine/conformance/"], + "dotnet": { "checks": true, "pack": true, "coverage": true, "postgres": "trax_data_tests", "rabbitmq": false, "databases": [], "timeout": 15, "test-args": "--filter TestCategory!=CrossEngine" } + }, + { + "name": "state-machine-ts", + "folder": "Trax.StateMachine/ts", + "upstream": [], + "paths": ["Trax.StateMachine/ts/", "Trax.StateMachine/conformance/"] + }, + { + "name": "state-machine-conformance", + "folder": "Trax.StateMachine/dotnet", + "project": "tests/Trax.StateMachine.Tests/Trax.StateMachine.Tests.csproj", + "upstream": ["Trax.Effect"], + "paths": ["Trax.StateMachine/"], + "dotnet": { "state-machine": true, "conformance": true, "postgres": "", "rabbitmq": false, "databases": [], "timeout": 15, "test-args": "--filter TestCategory=CrossEngine" } } ] } diff --git a/.github/release/release-workflow.test.mjs b/.github/release/release-workflow.test.mjs index 658e1aa9f..a65349e30 100644 --- a/.github/release/release-workflow.test.mjs +++ b/.github/release/release-workflow.test.mjs @@ -99,6 +99,17 @@ describe('build job', () => { assert.ok(indexOf(build, 'Install the API dashboard (locked, no install scripts)') < indexOf(build, 'Pack every package')); }); + it('packs every folder solution and every suite marked pack, the C# state-machine engine among them', () => { + const run = step(build, 'Pack every package').run; + const program = run.match(/jq -r '([\s\S]*?)' \\/)[1]; + const packages = join(dirname(workflowPath), '..', 'ci', 'packages.json'); + const list = execFileSync('jq', ['-r', program, packages], { encoding: 'utf8' }).trim().split('\n'); + + assert.ok(list.includes('Trax.Effect/Trax.Effect.slnx')); + assert.ok(list.includes('Trax.StateMachine/dotnet/Trax.StateMachine.slnx')); + assert.equal(new Set(list).size, list.length); + }); + it('hands publish the packages and their digests', () => { assert.equal(build.outputs.digests, '${{ steps.digests.outputs.digests }}'); assert.equal(build.outputs['npm-digests'], '${{ steps.npm-digests.outputs.digests }}'); diff --git a/.github/scripts/ci-changes.sh b/.github/scripts/ci-changes.sh index c9e71a56f..9baa2ef0a 100755 --- a/.github/scripts/ci-changes.sh +++ b/.github/scripts/ci-changes.sh @@ -6,9 +6,10 @@ # here). A change outside every folder, such as a workflow, global.json or this # script, runs everything, and so does any event other than a pull request. # -# A suite (packages.json "suites") is a test project with a job of its own. It runs when a -# folder it lists upstream is selected (so anything upstream of that folder too), or when a -# changed file is under one of its paths; on any event but a pull request it always runs. +# A suite (packages.json "suites") is a test project, a solution or an npm folder with a job of +# its own. It runs when a folder it lists upstream is selected (so anything upstream of that +# folder too), or when a changed file is under one of its paths; on any event but a pull +# request it always runs. # # Usage, from the repository root: ci-changes.sh # On a pull request the checkout must be the merge commit with its first parent @@ -44,19 +45,29 @@ dotnet=$(jq -c --argjson selected "$selected" \ adr=$(jq -c --argjson selected "$selected" \ '[.packages[] | select(.adr and (.folder as $f | $selected | index($f))) | {folder} + .adr]' "$config") -suites=$(jq -c --argjson selected "$selected" --argjson files "$changed" --arg event "$event" ' +selected_suites=$(jq -c --argjson selected "$selected" --argjson files "$changed" --arg event "$event" ' [(.suites // [])[] | select($event != "pull_request" or any(.upstream[]; . as $u | $selected | index($u)) - or any(.paths[]; . as $p | $files | any(startswith($p)))) - | {name, folder, project} + .dotnet]' "$config") + or any(.paths[]; . as $p | $files | any(startswith($p))))]' "$config") +# A suite with a "dotnet" key runs in the suite job; one without (an npm folder) has a job of +# its own, which reads suite-names. +suites=$(jq -c '[.[] | select(.dotnet) | {name, folder, project} + .dotnet]' <<<"$selected_suites") +suite_names=$(jq -c '[.[].name]' <<<"$selected_suites") +# The coverage each .NET job uploads: a folder's under its folder name, a suite's under its own +# name, both flagged with the top-level folder they measure. +coverage=$(jq -c --argjson dotnet "$dotnet" --argjson suites "$suites" -n ' + [($dotnet[] | select(.coverage) | {artifact: .folder, flag: .folder}), + ($suites[] | select(.coverage) | {artifact: .name, flag: (.folder | split("/")[0])})]') echo "Running: $(jq -r 'join(", ")' <<<"$selected")" -echo "Suites: $(jq -r 'map(.name) | join(", ")' <<<"$suites")" +echo "Suites: $(jq -r 'join(", ")' <<<"$suite_names")" { echo "folders=$selected" echo "dotnet=$dotnet" echo "adr=$adr" echo "suites=$suites" + echo "suite-names=$suite_names" + echo "coverage=$coverage" } >>"${GITHUB_OUTPUT:-/dev/stdout}" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57fa5b72c..38ba36f7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,8 @@ jobs: dotnet: ${{ steps.changes.outputs.dotnet }} adr: ${{ steps.changes.outputs.adr }} suites: ${{ steps.changes.outputs.suites }} + suite-names: ${{ steps.changes.outputs.suite-names }} + coverage: ${{ steps.changes.outputs.coverage }} steps: - name: Harden runner uses: step-security/harden-runner@ccd8616d44fd3846e67624a50d5aad6d37bf2d25 # v2.22.1 @@ -272,13 +274,15 @@ jobs: if-no-files-found: warn retention-days: 1 - # A test project carved out of its folder's job (packages.json "suites"), so a slow suite runs - # beside that job instead of behind it. The folder's job builds, formats and lock-checks the - # whole folder and leaves this project's tests out with its test-args filter; this job restores, - # builds and tests the one project. It runs whenever the folder's job does for a change upstream - # (or to the project), so the checks the folder's job makes cover it too. A suite may name its - # own Postgres and RabbitMQ users (the book's sample logs in as the book does), and a web folder - # whose npm tests and build run after the .NET tests. + # A .NET suite (packages.json "suites" with a "dotnet" key). Most are a test project carved out + # of its folder's job, so a slow suite runs beside that job instead of behind it: the folder's + # job builds, formats and lock-checks the whole folder and leaves this project's tests out with + # its test-args filter, and this job restores, builds and tests the one project. A suite marked + # "checks" is a folder's whole solution instead (Trax.StateMachine/dotnet, which has no folder + # job, so a change to the TypeScript engine alone does not rebuild it), and makes the folder + # job's checks itself. A suite may name its own Postgres and RabbitMQ users (the book's sample + # logs in as the book does), a web folder whose npm tests and build run after the .NET tests, + # and "conformance", which runs the conformance kit through the TypeScript engine. suite: needs: changes if: needs.changes.outputs.suites != '[]' @@ -342,6 +346,7 @@ jobs: ci.dot.net:443 dot.net:443 api.nuget.org:443 + azuresearch-usnc.nuget.org:443 crl3.digicert.com:80 crl4.digicert.com:80 crl.globalsign.com:80 @@ -366,14 +371,34 @@ jobs: uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: global-json-file: global.json + - name: Restore tools + if: matrix.suite.checks + working-directory: ${{ matrix.suite.folder }} + run: dotnet tool restore + - name: Check formatting + if: matrix.suite.checks + working-directory: ${{ matrix.suite.folder }} + run: dotnet csharpier check . - name: Restore (locked) working-directory: ${{ matrix.suite.folder }} run: dotnet restore "$PROJECT" --locked-mode + - name: Every project is locked + if: matrix.suite.checks + run: .github/scripts/check-project-locks.sh "$FOLDER" "$PROJECT" + - name: No deprecated packages + if: matrix.suite.checks + working-directory: ${{ matrix.suite.folder }} + run: '"$GITHUB_WORKSPACE/.github/scripts/check-deprecated-packages.sh"' - name: Setup Node - if: matrix.suite['api-dashboard'] || matrix.suite.web + if: matrix.suite['api-dashboard'] || matrix.suite.web || matrix.suite['state-machine'] uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: '24' + - name: Install Trax.StateMachine/ts (locked, no install scripts) + # The cross-engine tests run the TypeScript engine under node. + if: matrix.suite['state-machine'] + working-directory: Trax.StateMachine/ts + run: npm ci --ignore-scripts - name: Install the API dashboard (locked, no install scripts) # Building Trax.Api.Dashboard compiles the React app and embeds it: the browser tests open it. if: matrix.suite['api-dashboard'] @@ -397,14 +422,39 @@ jobs: for db in $DATABASES; do psql -h localhost -d "$POSTGRES_DB" -c "CREATE DATABASE \"$db\";" done + - name: Pack (package validation) + if: matrix.suite.pack + working-directory: ${{ matrix.suite.folder }} + run: dotnet pack "$PROJECT" --configuration Release --no-build --output "$RUNNER_TEMP/nupkg" - name: Test working-directory: ${{ matrix.suite.folder }} env: + COVERAGE: ${{ matrix.suite.coverage }} TEST_ARGS: ${{ matrix.suite['test-args'] }} run: | + args=(--configuration Release --no-build) # Word splitting is the point: TEST_ARGS is a list of flags from packages.json. - # shellcheck disable=SC2086 - dotnet test "$PROJECT" --configuration Release --no-build $TEST_ARGS + # shellcheck disable=SC2206 + args+=($TEST_ARGS) + if [ "$COVERAGE" = true ]; then + include=$(cd "$GITHUB_WORKSPACE" && .github/scripts/coverage-include.sh "$FOLDER") + args+=(--collect:"XPlat Code Coverage" --results-directory ./TestResults + -- "DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Include=$include") + fi + dotnet test "$PROJECT" "${args[@]}" + - name: Upload coverage results + if: matrix.suite.coverage + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: coverage-${{ matrix.suite.name }} + path: ${{ matrix.suite.folder }}/TestResults/**/coverage.cobertura.xml + if-no-files-found: warn + retention-days: 1 + - name: Run the conformance kit through the TypeScript engine + # The C# engine answers the same kit in its CrossEngine tests above (ConformanceRunnerTests). + if: matrix.suite.conformance + working-directory: Trax.StateMachine + run: node conformance/run.mjs --testee node ts/tools/conformance/testee-ts.mjs - name: Install the web folder (locked, no install scripts) if: matrix.suite.web working-directory: ${{ matrix.suite.folder }}/${{ matrix.suite.web }} @@ -419,9 +469,11 @@ jobs: # The Codecov token is kept out of the jobs that run restore, build and tests, so # nothing those leave running can read it. This job runs no project code. coverage: - needs: [changes, dotnet] - if: needs.changes.outputs.dotnet != '[]' - name: coverage ${{ matrix.package.folder }} + needs: [changes, dotnet, suite] + # Runs after the .NET jobs whichever of them ran; a job the change detection skipped has no + # entry in the matrix. + if: ${{ !cancelled() && needs.changes.outputs.coverage != '[]' }} + name: coverage ${{ matrix.package.artifact }} runs-on: ubuntu-latest timeout-minutes: 5 permissions: @@ -429,7 +481,7 @@ jobs: strategy: fail-fast: false matrix: - package: ${{ fromJSON(needs.changes.outputs.dotnet) }} + package: ${{ fromJSON(needs.changes.outputs.coverage) }} steps: - name: Harden runner uses: step-security/harden-runner@ccd8616d44fd3846e67624a50d5aad6d37bf2d25 # v2.22.1 @@ -448,22 +500,19 @@ jobs: storage.googleapis.com:443 - name: Checkout # Codecov maps the report's file paths onto the repository's tracked files. - if: matrix.package.coverage uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Download coverage results - if: matrix.package.coverage uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: - name: coverage-${{ matrix.package.folder }} + name: coverage-${{ matrix.package.artifact }} path: ${{ runner.temp }}/coverage - name: Upload coverage to Codecov - if: matrix.package.coverage uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1 with: directory: ${{ runner.temp }}/coverage - flags: ${{ matrix.package.folder }} + flags: ${{ matrix.package.flag }} fail_ci_if_error: false token: ${{ secrets.CODECOV_TOKEN }} @@ -514,6 +563,7 @@ jobs: with: folder: ${{ matrix.package.folder }} adr-root: ${{ matrix.package['adr-root'] }} + test-roots: ${{ matrix.package['test-roots'] || 'tests' }} known-areas: ${{ matrix.package['known-areas'] }} known-repos: ${{ matrix.package['known-repos'] || '' }} require-repos-key: ${{ matrix.package['require-repos-key'] || 'false' }} @@ -809,12 +859,13 @@ jobs: --tools-dir "$RUNNER_TEMP/engine" --documents 'src/graphql/*.graphql' --check) \ || { echo "::error::The StateMachine sample's generated client is out of date. Regenerate it with the commands at the top of $api/Program.cs and commit the result."; exit 1; } - # The TypeScript twin of Trax.StateMachine. Its machines/ corpus is also read by the - # Trax.Effect conformance tests and the Trax.Cli byte-parity tests, which is why those - # folders list it upstream. + # The TypeScript engine, @traxsharp/state-machine (packages.json suite state-machine-ts). It + # runs for a change under Trax.StateMachine/ts or the conformance kit, not for one to the C# + # engine; the state-machine-conformance suite is the check that spans both. state-machine: needs: changes - if: contains(fromJSON(needs.changes.outputs.folders), 'Trax.StateMachine') + if: contains(fromJSON(needs.changes.outputs.suite-names), 'state-machine-ts') + name: state-machine-ts runs-on: ubuntu-latest timeout-minutes: 10 permissions: diff --git a/.github/workflows/dependabot_lockfiles.yml b/.github/workflows/dependabot_lockfiles.yml index 75e05f285..ab0db790b 100644 --- a/.github/workflows/dependabot_lockfiles.yml +++ b/.github/workflows/dependabot_lockfiles.yml @@ -154,7 +154,8 @@ jobs: - name: Regenerate lockfiles if: steps.healed.outputs.skip == 'false' - # Every folder's solution, since one root Directory.Packages.props pins the + # Every folder's solution, and each suite that is a whole solution of its own + # (Trax.StateMachine/dotnet), since one root Directory.Packages.props pins the # packages for all of them and a bump can move any folder's lockfiles. # # NuGetAudit is off for this restore alone. Directory.Build.props @@ -162,7 +163,8 @@ jobs: # would abort the regeneration -- which is exactly the state a security # bump arrives in. The PR build still runs the audit with its own gate. run: | - jq -r '.packages[] | select(.dotnet) | .folder + "/" + .dotnet.solution' .github/ci/packages.json | + jq -r '(.packages[] | select(.dotnet) | .folder + "/" + .dotnet.solution), + ((.suites // [])[] | select(.dotnet.checks) | .folder + "/" + .project)' .github/ci/packages.json | while IFS= read -r solution; do dotnet restore "$solution" --use-lock-file --force-evaluate -p:NuGetAudit=false done diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4180827cb..62103ff02 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -213,14 +213,16 @@ jobs: run: npm ci --ignore-scripts - name: Pack every package # One version for every package. A folder packs its solution, or the one project - # packages.json names under release-pack (Trax.Samples ships only its templates). + # packages.json names under release-pack (Trax.Samples ships only its templates), and + # a suite marked pack packs its own (Trax.StateMachine's C# engine has no folder job). env: # Bind the version to env and reference the shell var (it is pipeline- # controlled, but this is the pattern to use for any ${{ }} value). PKG_VERSION: ${{ needs.release.outputs.version }} run: | - jq -r '.packages[] | select(.dotnet) - | .folder + "/" + (.dotnet["release-pack"] // (if .dotnet.pack then .dotnet.solution else empty end))' \ + jq -r '(.packages[] | select(.dotnet) + | .folder + "/" + (.dotnet["release-pack"] // (if .dotnet.pack then .dotnet.solution else empty end))), + ((.suites // [])[] | select(.dotnet.pack) | .folder + "/" + .project)' \ .github/ci/packages.json > "$RUNNER_TEMP/pack-list" while IFS= read -r project; do echo "::group::$project" From cfce165d7d7dbc7564ce209a11b8e86f71aad26a Mon Sep 17 00:00:00 2001 From: Theauxm <43664045+Theauxm@users.noreply.github.com> Date: Tue, 20 Oct 2026 11:54:36 -0600 Subject: [PATCH 6/6] docs(machines,tooling): the machine ADRs, AGENTS.md and docs follow the move effect/0013, 0017 and 0022 move to Trax.StateMachine/docs/adr as 0001 to 0003, with the tests that are their exemplars. Trax.StateMachine gets its AGENTS.md, by language, merged from the TypeScript engine's and Effect's machine rows; the root AGENTS.md gains the folder, the chain and the suites. The central ADRs that bind every folder, and the machine ones, are tagged statemachine. The READMEs, the packages reference, the repository layout page and the site's package list gain the folder, and a migration guide covers the renamed ids. --- .github/ci/packages.json | 2 +- AGENTS.md | 36 +++--- README.md | 6 +- Trax.Api/README.md | 3 +- Trax.Api/src/Trax.Api.Dashboard/README.md | 3 +- .../MachineInstanceTransitionsField.cs | 2 +- .../MachineEventStressTests.cs | 4 +- Trax.Cli/README.md | 3 +- Trax.Core/README.md | 3 +- ...chitectural-rules-are-executable-guards.md | 2 +- ...ross-repo-dependencies-are-exact-pinned.md | 2 +- ...a-repo-depends-only-on-what-is-upstream.md | 2 +- ...0004-tests-assert-with-fluentassertions.md | 2 +- ...05-a-skipped-test-is-a-runtime-decision.md | 2 +- .../adr/0006-tests-synchronise-on-a-signal.md | 2 +- ...08-documentation-conventions-are-linted.md | 2 +- ...lic-api-surface-is-a-committed-baseline.md | 2 +- ...rameworks-stay-out-of-shipped-libraries.md | 2 +- ...drs-exemplars-are-declared-by-attribute.md | 2 +- ...wns-the-vocabulary-for-its-own-concepts.md | 2 +- ...test-owns-every-timeout-it-waits-behind.md | 2 +- ...ckageversion-names-a-referenced-package.md | 2 +- .../adr/0032-a-warning-fails-the-ci-build.md | 2 +- ...kage-validates-against-its-last-release.md | 2 +- .../0038-the-adr-guard-is-released-by-tag.md | 2 +- ...-its-code-and-deploys-after-its-release.md | 2 +- ...-repository-and-releases-at-one-version.md | 2 +- ...43-the-site-is-published-from-a-release.md | 2 +- ...tests-use-cscheck-in-test-projects-only.md | 2 +- ...nd-only-that-entry-receives-its-outcome.md | 4 +- ...and-the-server-applies-every-transition.md | 4 +- ...-their-code-is-checked-against-the-code.md | 2 +- ...s-a-child-machine-as-it-invokes-a-train.md | 2 +- Trax.Docs/adr/README.md | 51 ++++---- Trax.Docs/contributing/repository-layout.md | 16 +++ Trax.Docs/migration-guides.md | 1 + .../trax-statemachine-packages.md | 50 ++++++++ Trax.Docs/reference/packages.md | 5 + Trax.Effect/AGENTS.md | 22 ++-- Trax.Effect/README.md | 5 +- ...migrated-domain-tables-are-bootstrapped.md | 11 +- Trax.Effect/docs/adr/README.md | 10 +- .../SnapshotTransition/SnapshotTransition.cs | 2 +- Trax.Mediator/README.md | 3 +- Trax.Samples/README.md | 3 +- Trax.Scheduler/README.md | 3 +- Trax.StateMachine/AGENTS.md | 117 ++++++++++++++++++ Trax.StateMachine/README.md | 25 ++++ ...id-replays-only-the-request-it-recorded.md | 1 + ...effect-runner-reaches-a-committed-state.md | 1 + ...ce-history-is-written-with-its-snapshot.md | 1 + Trax.StateMachine/docs/adr/README.md | 52 ++++++++ Trax.StateMachine/dotnet/README.md | 18 ++- .../EfSnapshotStore.cs | 2 +- .../TransitionNote.cs | 2 +- .../DraftWriteRulesTests.cs | 6 +- .../EffectCommitIntegrityTests.cs | 6 +- .../EffectPendingTests.cs | 6 +- .../MigrationSchemaTests.cs | 2 +- .../RequestIdScopeTests.cs | 6 +- .../TransitionHistoryTests.cs | 12 +- Trax.StateMachine/ts/AGENTS.md | 51 -------- Trax.StateMachine/ts/README.md | 2 +- .../src/components/landing/PackageList.tsx | 8 +- 64 files changed, 432 insertions(+), 182 deletions(-) create mode 100644 Trax.Docs/migration-guides/trax-statemachine-packages.md create mode 100644 Trax.StateMachine/AGENTS.md create mode 100644 Trax.StateMachine/README.md rename Trax.Effect/docs/adr/0013-a-request-id-replays-only-the-request-it-recorded.md => Trax.StateMachine/docs/adr/0001-a-request-id-replays-only-the-request-it-recorded.md (97%) rename Trax.Effect/docs/adr/0017-only-the-effect-runner-reaches-a-committed-state.md => Trax.StateMachine/docs/adr/0002-only-the-effect-runner-reaches-a-committed-state.md (98%) rename Trax.Effect/docs/adr/0022-a-machine-instance-history-is-written-with-its-snapshot.md => Trax.StateMachine/docs/adr/0003-a-machine-instance-history-is-written-with-its-snapshot.md (97%) create mode 100644 Trax.StateMachine/docs/adr/README.md delete mode 100644 Trax.StateMachine/ts/AGENTS.md diff --git a/.github/ci/packages.json b/.github/ci/packages.json index f9bfe7c1a..5c282d428 100644 --- a/.github/ci/packages.json +++ b/.github/ci/packages.json @@ -52,7 +52,7 @@ "folder": "Trax.Docs", "upstream": ["Trax.Api", "Trax.Cli", "Trax.Samples"], "dotnet": { "solution": "Trax.Docs.slnx", "pack": false, "coverage": false, "postgres": "", "rabbitmq": false, "databases": [], "timeout": 15, "test-args": "" }, - "adr": { "adr-root": "adr", "known-areas": "testing,platform,packaging,ci,naming,data-model,graphql,docs,migrations,providers", "known-repos": "core,effect,mediator,scheduler,dashboard,api,cli,samples,docs,website", "require-repos-key": "true", "census-root": "tests/Trax.Docs.Tests" } + "adr": { "adr-root": "adr", "known-areas": "testing,platform,packaging,ci,naming,data-model,graphql,docs,migrations,providers", "known-repos": "core,effect,statemachine,mediator,scheduler,dashboard,api,cli,samples,docs,website", "require-repos-key": "true", "census-root": "tests/Trax.Docs.Tests" } }, { "folder": "Trax.Website", "upstream": ["Trax.Docs", "Trax.Api"] } ], diff --git a/AGENTS.md b/AGENTS.md index e18610096..74f539552 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -39,20 +39,25 @@ published from releases, not from `main` (`Trax.Docs/adr/0043`). ``` Trax.Core/ Core utilities, the chain, the guard engines (Trax.Core.Testing) -Trax.Effect/ Effect system, data providers, state machine +Trax.Effect/ Effect system, data providers, the tables the state machines are stored in +Trax.StateMachine/ The state machines, by language: dotnet/ (Trax.StateMachine*), ts/ + (@traxsharp/state-machine) and the conformance/ kit both are held to Trax.Mediator/ Mediator pattern, train bus, train authorization Trax.Scheduler/ Job scheduling, manifests, remote runners Trax.Api/ GraphQL API layer, and the React operations console it ships (Trax.Docs/adr/0055) Trax.Cli/ The `trax` tool Trax.Samples/ Sample applications and the dotnet new templates -Trax.Api.StateMachine/ @traxsharp/state-machine, the TypeScript twin of the state-machine engine Trax.Docs/ Documentation content, the central ADRs, the ADR guard Trax.Website/ Next.js site for traxsharp.net .github/ CI, release, Dependabot; per-folder CI settings in .github/ci/packages.json ``` -Each .NET folder has its own `.slnx`, `Directory.Build.props`, `docs/adr/` and `AGENTS.md`. The -root holds `global.json`, `nuget.config` (nuget.org only) and `Directory.Packages.props`. +Each .NET folder has its own `.slnx`, `Directory.Build.props`, `docs/adr/` and `AGENTS.md`. A +folder that holds more than .NET (Trax.StateMachine) keeps its .NET build in `dotnet/`, which is +laid out like any other .NET folder (`.slnx`, `Directory.Build.props`, `.config/`, `src/`, +`tests/` with its `Tests.Meta`), and its `docs/adr/` and `AGENTS.md` at the folder's root, since +they bind every language in it. The root holds `global.json`, `nuget.config` (nuget.org only) and +`Directory.Packages.props`. ## Dependencies @@ -60,8 +65,8 @@ Each folder may reference only the folders before it. Trax.Cli and Trax.Api are Trax.Scheduler and neither may reference the other: ``` -Trax.Core → Trax.Effect → Trax.Mediator → Trax.Scheduler ─┬─→ Trax.Api ─┐ - └─→ Trax.Cli ─┴─→ Trax.Samples +Trax.Core → Trax.Effect → Trax.StateMachine → Trax.Mediator → Trax.Scheduler ─┬─→ Trax.Api ─┐ + └─→ Trax.Cli ─┴─→ Trax.Samples ``` A Trax package is always a `ProjectReference` to its csproj, never a `PackageReference`, so every @@ -76,8 +81,8 @@ Package Management with transitive pinning; a `PackageReference` carries no `Ver ## Layers -Trax's layers are concepts, not folders: `Trax.Effect` alone holds data, plumbing, `ServiceTrain` -and the state machines. Anything written about a change (a PR description, a plan, a work item, +Trax's layers are concepts, not folders: `Trax.Effect` alone holds data, plumbing and +`ServiceTrain`, and the tables of the machines whose code is in `Trax.StateMachine`. Anything written about a change (a PR description, a plan, a work item, a release note) marks the layers it touches with these squares, inner to outer, several when it crosses layers. The square always sits next to words or an id; colour never carries the meaning alone. @@ -91,7 +96,7 @@ title, the body below it. A security change or an open hotspot uses GitHub's `> | 🟨 | Data (`data`) | `Trax.Effect.Data.*` (Postgres, Sqlite, InMemory), migrations, SQL, the run-record tables | | 🟫 | Plumbing (`plumbing`) | Effect providers, junction providers, broadcasters (RabbitMQ, SignalR), lifecycle hooks | | 🟩 | Trains (`trains`) | `Train` (Core), `ServiceTrain` (Effect), junctions, chains, Memory, decisions, `Parallel` | -| 🟪 | Machines (`machines`) | `Trax.StateMachine*` and `@traxsharp/state-machine`, its TypeScript twin | +| 🟪 | Machines (`machines`) | `Trax.StateMachine/`: the C# engine (`Trax.StateMachine*`), `@traxsharp/state-machine`, its TypeScript twin, and the conformance kit | | 🟧 | Dispatch (`dispatch`) | Mediator (train bus, authorization), Scheduler (jobs, manifests, recovery), remote runners, Lambda | | 🟦 | Surface (`surface`) | Api (GraphQL, auth, persisted operations, generated clients, the React operations console) | | ⬛ | Tooling (`tooling`) | CLI, analyzers, architecture and ADR guards, CI, release, docs | @@ -126,7 +131,7 @@ session, or the two vocabularies will cross. ## Building and testing -From a folder: +From a folder (from `Trax.StateMachine/dotnet` for the C# state machines): ```bash dotnet build # must be zero warnings (CI builds with -warnaserror) @@ -150,8 +155,8 @@ return types. Every project commits a `packages.lock.json`, and CI restores with `--locked-mode`. A modified lockfile you did not mean to change is a mistake; regenerate deliberately after a real dependency -change with `dotnet restore /.slnx --use-lock-file --force-evaluate`, for every -folder whose graph moved (a root `Directory.Packages.props` change can move all of them). +change with `dotnet restore /.slnx --use-lock-file --force-evaluate` +(`Trax.StateMachine/dotnet/Trax.StateMachine.slnx` for the machines), for every folder whose graph moved (a root `Directory.Packages.props` change can move all of them). ### A new runtime version forces itself on you @@ -171,8 +176,11 @@ deprecation checks, build, pack with package validation, tests, the ADR guard), and databases its entry in `.github/ci/packages.json` names. A slow test project can be carved out of its folder's job into one of its own, beside it: a `suites` entry there names it, the folders it runs for and its paths, and the folder's row leaves its tests out with a `--filter` -(the console's browser tests, `console-browser`, are one). **`CI result` is the one required -check.** +(the console's browser tests, `console-browser`, are one). Trax.StateMachine has no folder job: +its C# solution, its TypeScript engine and the checks that span both are three suites +(`state-machine-dotnet`, `state-machine-ts`, `state-machine-conformance`), each with its own +paths, so a change to one language does not rebuild the other and none of them reruns +Trax.Effect. **`CI result` is the one required check.** ## Releases diff --git a/README.md b/README.md index afd137756..879d6db5e 100644 --- a/README.md +++ b/README.md @@ -48,13 +48,13 @@ folder depends only on folders above it in this table; take the layers you need, | Folder | What it adds | |---|---| | [Trax.Core](Trax.Core) | Trains, junctions and the chain, with no database and no DI container | -| [Trax.Effect](Trax.Effect) | A recorded run for every execution (Postgres, SQLite or in memory), DI, effect providers, the state-machine engine | +| [Trax.Effect](Trax.Effect) | A recorded run for every execution (Postgres, SQLite or in memory), DI, effect providers | +| [Trax.StateMachine](Trax.StateMachine) | State machines a page drives and the server applies, in C# and TypeScript, held to one conformance kit | | [Trax.Mediator](Trax.Mediator) | The train bus: run a train by handing over its input, with every chain checked at startup | | [Trax.Scheduler](Trax.Scheduler) | Cron and interval schedules, retries, dead letters, and workers on other machines or in Lambda | | [Trax.Api](Trax.Api) | GraphQL generated from your trains and machines: a mutation per machine event, authorization checked on the server, persisted operations, audit, live subscriptions and the operations console your host serves | | [Trax.Cli](Trax.Cli) | The `trax` tool: scaffold a hub and trains from an OpenAPI or GraphQL schema, and state-machine codegen | | [Trax.Samples](Trax.Samples) | Complete sample apps, and the `trax-api`, `trax-scheduler` and `trax-hub` templates | -| [Trax.Api.StateMachine](Trax.Api.StateMachine) | `@traxsharp/state-machine`, the TypeScript twin of the state-machine engine | | [Trax.Docs](Trax.Docs) | The documentation published at [traxsharp.net/docs](https://traxsharp.net/docs), and the decision records | | [Trax.Website](Trax.Website) | The source of [traxsharp.net](https://traxsharp.net) | @@ -64,7 +64,7 @@ history is here, under each folder. ### The coloured squares Release notes, pull requests and the docs mark each change with the parts of Trax it touches. The parts are concepts, -not folders: `Trax.Effect` alone holds data, plumbing, trains and state machines. A change that crosses several shows +not folders: `Trax.Effect` alone holds data, plumbing and trains. A change that crosses several shows several squares, innermost first. | | Part | What it covers | diff --git a/Trax.Api/README.md b/Trax.Api/README.md index 2165e7c80..8b414acd8 100644 --- a/Trax.Api/README.md +++ b/Trax.Api/README.md @@ -70,7 +70,8 @@ Trax is split into layers, one folder of this repository each. Take the ones you | Folder | What it adds | |---|---| | [Trax.Core](https://github.com/TraxSharp/Trax/tree/main/Trax.Core) | Trains, junctions and the chain, with no database and no DI container | -| [Trax.Effect](https://github.com/TraxSharp/Trax/tree/main/Trax.Effect) | A recorded run for every execution (Postgres, SQLite or in memory), DI, effect providers, the state-machine engine | +| [Trax.Effect](https://github.com/TraxSharp/Trax/tree/main/Trax.Effect) | A recorded run for every execution (Postgres, SQLite or in memory), DI, effect providers | +| [Trax.StateMachine](https://github.com/TraxSharp/Trax/tree/main/Trax.StateMachine) | State machines a page drives and the server applies, in C# and TypeScript, held to one conformance kit | | [Trax.Mediator](https://github.com/TraxSharp/Trax/tree/main/Trax.Mediator) | The train bus: run a train by handing over its input, with every chain checked at startup | | [Trax.Scheduler](https://github.com/TraxSharp/Trax/tree/main/Trax.Scheduler) | Cron and interval schedules, retries, dead letters, and workers on other machines or in Lambda | | **[Trax.Api](https://github.com/TraxSharp/Trax/tree/main/Trax.Api)** | **GraphQL generated from your trains, with authentication, audit and typed clients, and the operations console your host serves** | diff --git a/Trax.Api/src/Trax.Api.Dashboard/README.md b/Trax.Api/src/Trax.Api.Dashboard/README.md index 44091931a..1d344e6b4 100644 --- a/Trax.Api/src/Trax.Api.Dashboard/README.md +++ b/Trax.Api/src/Trax.Api.Dashboard/README.md @@ -43,7 +43,8 @@ Trax is split into layers, one folder of this repository each. Take the ones you | Folder | What it adds | |---|---| | [Trax.Core](https://github.com/TraxSharp/Trax/tree/main/Trax.Core) | Trains, junctions and the chain, with no database and no DI container | -| [Trax.Effect](https://github.com/TraxSharp/Trax/tree/main/Trax.Effect) | A recorded run for every execution (Postgres, SQLite or in memory), DI, effect providers, the state-machine engine | +| [Trax.Effect](https://github.com/TraxSharp/Trax/tree/main/Trax.Effect) | A recorded run for every execution (Postgres, SQLite or in memory), DI, effect providers | +| [Trax.StateMachine](https://github.com/TraxSharp/Trax/tree/main/Trax.StateMachine) | State machines a page drives and the server applies, in C# and TypeScript, held to one conformance kit | | [Trax.Mediator](https://github.com/TraxSharp/Trax/tree/main/Trax.Mediator) | The train bus: run a train by handing over its input, with every chain checked at startup | | [Trax.Scheduler](https://github.com/TraxSharp/Trax/tree/main/Trax.Scheduler) | Cron and interval schedules, retries, dead letters, and workers on other machines or in Lambda | | **[Trax.Api](https://github.com/TraxSharp/Trax/tree/main/Trax.Api)** | **GraphQL generated from your trains, with authentication, audit, typed clients, and this dashboard** | diff --git a/Trax.Api/src/Trax.Api.GraphQL/Queries/MachineInstanceTransitionsField.cs b/Trax.Api/src/Trax.Api.GraphQL/Queries/MachineInstanceTransitionsField.cs index 543e99b01..b380e9829 100644 --- a/Trax.Api/src/Trax.Api.GraphQL/Queries/MachineInstanceTransitionsField.cs +++ b/Trax.Api/src/Trax.Api.GraphQL/Queries/MachineInstanceTransitionsField.cs @@ -11,7 +11,7 @@ namespace Trax.Api.GraphQL.Queries; /// makes (central docs/0022). A field of the instance rather than of operations, so a lookup that does not /// select it never reads the table. Reached only through operations, so the operations gate covers it. Never an /// owner key, a context or a run's token. Registered with the operations queries. See -/// Trax.Effect/docs/adr/0022-a-machine-instance-history-is-written-with-its-snapshot.md. +/// Trax.StateMachine/docs/adr/0003-a-machine-instance-history-is-written-with-its-snapshot.md. /// internal static class MachineInstanceTransitionsField { diff --git a/Trax.Api/tests/Trax.Api.Tests.Stress/IntegrationTests/MachineEventStressTests.cs b/Trax.Api/tests/Trax.Api.Tests.Stress/IntegrationTests/MachineEventStressTests.cs index f3d6e0676..056962fde 100644 --- a/Trax.Api/tests/Trax.Api.Tests.Stress/IntegrationTests/MachineEventStressTests.cs +++ b/Trax.Api/tests/Trax.Api.Tests.Stress/IntegrationTests/MachineEventStressTests.cs @@ -205,7 +205,7 @@ await UntilAsync(() => /// The history's write path under concurrency: many instances moved at once, each by a run of events, and every /// event's history row is there, in revision order with no gap, kind and command matching, read back through the /// operations service the console's instance page reads. Enforces - /// Trax.Effect/docs/adr/0022-a-machine-instance-history-is-written-with-its-snapshot.md. + /// Trax.StateMachine/docs/adr/0003-a-machine-instance-history-is-written-with-its-snapshot.md. /// [Test] public async Task Every_event_writes_one_history_row_in_order_when_instances_move_at_once() @@ -252,7 +252,7 @@ await RowIdAsync(id) .Equal( Enumerable.Range(1, EventsPerInstance + 1).Select(r => (long)r), "every event adds one row at its revision, none lost or doubled under load, per " - + "Trax.Effect/docs/adr/0022-a-machine-instance-history-is-written-with-its-snapshot.md" + + "Trax.StateMachine/docs/adr/0003-a-machine-instance-history-is-written-with-its-snapshot.md" ); oldestFirst[0].Kind.Should().Be(Trax.Effect.Enums.SnapshotTransitionKind.Start); oldestFirst diff --git a/Trax.Cli/README.md b/Trax.Cli/README.md index 8c1189f78..a28c79220 100644 --- a/Trax.Cli/README.md +++ b/Trax.Cli/README.md @@ -40,7 +40,8 @@ Trax is split into layers, one folder of this repository each. Take the ones you | Folder | What it adds | |---|---| | [Trax.Core](https://github.com/TraxSharp/Trax/tree/main/Trax.Core) | Trains, junctions and the chain, with no database and no DI container | -| [Trax.Effect](https://github.com/TraxSharp/Trax/tree/main/Trax.Effect) | A recorded run for every execution (Postgres, SQLite or in memory), DI, effect providers, the state-machine engine | +| [Trax.Effect](https://github.com/TraxSharp/Trax/tree/main/Trax.Effect) | A recorded run for every execution (Postgres, SQLite or in memory), DI, effect providers | +| [Trax.StateMachine](https://github.com/TraxSharp/Trax/tree/main/Trax.StateMachine) | State machines a page drives and the server applies, in C# and TypeScript, held to one conformance kit | | [Trax.Mediator](https://github.com/TraxSharp/Trax/tree/main/Trax.Mediator) | The train bus: run a train by handing over its input, with every chain checked at startup | | [Trax.Scheduler](https://github.com/TraxSharp/Trax/tree/main/Trax.Scheduler) | Cron and interval schedules, retries, dead letters, and workers on other machines or in Lambda | | [Trax.Api](https://github.com/TraxSharp/Trax/tree/main/Trax.Api) | GraphQL generated from your trains, with authentication, audit and typed clients, and the operations console your host serves | diff --git a/Trax.Core/README.md b/Trax.Core/README.md index 572194859..8b41af4a2 100644 --- a/Trax.Core/README.md +++ b/Trax.Core/README.md @@ -75,7 +75,8 @@ Trax is split into layers, one folder of this repository each. Take the ones you | Folder | What it adds | |---|---| | **[Trax.Core](https://github.com/TraxSharp/Trax/tree/main/Trax.Core)** | **Trains, junctions and the chain, with no database and no DI container** | -| [Trax.Effect](https://github.com/TraxSharp/Trax/tree/main/Trax.Effect) | A recorded run for every execution (Postgres, SQLite or in memory), DI, effect providers, the state-machine engine | +| [Trax.Effect](https://github.com/TraxSharp/Trax/tree/main/Trax.Effect) | A recorded run for every execution (Postgres, SQLite or in memory), DI, effect providers | +| [Trax.StateMachine](https://github.com/TraxSharp/Trax/tree/main/Trax.StateMachine) | State machines a page drives and the server applies, in C# and TypeScript, held to one conformance kit | | [Trax.Mediator](https://github.com/TraxSharp/Trax/tree/main/Trax.Mediator) | The train bus: run a train by handing over its input, with every chain checked at startup | | [Trax.Scheduler](https://github.com/TraxSharp/Trax/tree/main/Trax.Scheduler) | Cron and interval schedules, retries, dead letters, and workers on other machines or in Lambda | | [Trax.Api](https://github.com/TraxSharp/Trax/tree/main/Trax.Api) | GraphQL generated from your trains, with authentication, audit and typed clients, and the operations console your host serves | diff --git a/Trax.Docs/adr/0001-architectural-rules-are-executable-guards.md b/Trax.Docs/adr/0001-architectural-rules-are-executable-guards.md index f6bd800da..9c4bfb300 100644 --- a/Trax.Docs/adr/0001-architectural-rules-are-executable-guards.md +++ b/Trax.Docs/adr/0001-architectural-rules-are-executable-guards.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, dashboard, api, cli, samples] +repos: [core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples] areas: [testing, platform] status: accepted --- diff --git a/Trax.Docs/adr/0002-cross-repo-dependencies-are-exact-pinned.md b/Trax.Docs/adr/0002-cross-repo-dependencies-are-exact-pinned.md index 1f33926ed..aeccb5610 100644 --- a/Trax.Docs/adr/0002-cross-repo-dependencies-are-exact-pinned.md +++ b/Trax.Docs/adr/0002-cross-repo-dependencies-are-exact-pinned.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, dashboard, api, cli, samples] +repos: [core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples] areas: [packaging, ci] status: superseded-by-0042 --- diff --git a/Trax.Docs/adr/0003-a-repo-depends-only-on-what-is-upstream.md b/Trax.Docs/adr/0003-a-repo-depends-only-on-what-is-upstream.md index cd65eda8a..934048f54 100644 --- a/Trax.Docs/adr/0003-a-repo-depends-only-on-what-is-upstream.md +++ b/Trax.Docs/adr/0003-a-repo-depends-only-on-what-is-upstream.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, dashboard, api, cli, samples] +repos: [core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples] areas: [packaging, platform] status: accepted --- diff --git a/Trax.Docs/adr/0004-tests-assert-with-fluentassertions.md b/Trax.Docs/adr/0004-tests-assert-with-fluentassertions.md index 8bf9d45bc..615575632 100644 --- a/Trax.Docs/adr/0004-tests-assert-with-fluentassertions.md +++ b/Trax.Docs/adr/0004-tests-assert-with-fluentassertions.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, dashboard, api, cli, samples, docs] +repos: [core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples, docs] areas: [testing] status: accepted --- diff --git a/Trax.Docs/adr/0005-a-skipped-test-is-a-runtime-decision.md b/Trax.Docs/adr/0005-a-skipped-test-is-a-runtime-decision.md index 77f99f985..6f0991302 100644 --- a/Trax.Docs/adr/0005-a-skipped-test-is-a-runtime-decision.md +++ b/Trax.Docs/adr/0005-a-skipped-test-is-a-runtime-decision.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, dashboard, api, cli, samples, docs] +repos: [core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples, docs] areas: [testing] status: accepted --- diff --git a/Trax.Docs/adr/0006-tests-synchronise-on-a-signal.md b/Trax.Docs/adr/0006-tests-synchronise-on-a-signal.md index 8dc338727..f5cea0af5 100644 --- a/Trax.Docs/adr/0006-tests-synchronise-on-a-signal.md +++ b/Trax.Docs/adr/0006-tests-synchronise-on-a-signal.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, dashboard, api, cli, samples] +repos: [core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples] areas: [testing] status: accepted --- diff --git a/Trax.Docs/adr/0008-documentation-conventions-are-linted.md b/Trax.Docs/adr/0008-documentation-conventions-are-linted.md index 5a07dfa7a..24589c82d 100644 --- a/Trax.Docs/adr/0008-documentation-conventions-are-linted.md +++ b/Trax.Docs/adr/0008-documentation-conventions-are-linted.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, dashboard, api, cli, samples, docs] +repos: [core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples, docs] areas: [docs, testing] status: accepted --- diff --git a/Trax.Docs/adr/0010-the-public-api-surface-is-a-committed-baseline.md b/Trax.Docs/adr/0010-the-public-api-surface-is-a-committed-baseline.md index 111fb30e7..a7c3c6ced 100644 --- a/Trax.Docs/adr/0010-the-public-api-surface-is-a-committed-baseline.md +++ b/Trax.Docs/adr/0010-the-public-api-surface-is-a-committed-baseline.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, dashboard, api, cli] +repos: [core, effect, statemachine, mediator, scheduler, dashboard, api, cli] areas: [packaging, testing] status: accepted --- diff --git a/Trax.Docs/adr/0011-test-frameworks-stay-out-of-shipped-libraries.md b/Trax.Docs/adr/0011-test-frameworks-stay-out-of-shipped-libraries.md index 0e4c28ae3..35a289c4a 100644 --- a/Trax.Docs/adr/0011-test-frameworks-stay-out-of-shipped-libraries.md +++ b/Trax.Docs/adr/0011-test-frameworks-stay-out-of-shipped-libraries.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, dashboard, api, cli, samples] +repos: [core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples] areas: [testing, packaging] status: accepted --- diff --git a/Trax.Docs/adr/0012-an-adrs-exemplars-are-declared-by-attribute.md b/Trax.Docs/adr/0012-an-adrs-exemplars-are-declared-by-attribute.md index 636f937b6..9e4a40e94 100644 --- a/Trax.Docs/adr/0012-an-adrs-exemplars-are-declared-by-attribute.md +++ b/Trax.Docs/adr/0012-an-adrs-exemplars-are-declared-by-attribute.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, dashboard, api, cli, samples, docs] +repos: [core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples, docs] areas: [testing, platform] status: accepted --- diff --git a/Trax.Docs/adr/0013-trax-owns-the-vocabulary-for-its-own-concepts.md b/Trax.Docs/adr/0013-trax-owns-the-vocabulary-for-its-own-concepts.md index 5a1f69309..39e1fa9ae 100644 --- a/Trax.Docs/adr/0013-trax-owns-the-vocabulary-for-its-own-concepts.md +++ b/Trax.Docs/adr/0013-trax-owns-the-vocabulary-for-its-own-concepts.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, dashboard, api, cli, samples] +repos: [core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples] areas: [platform, naming] status: accepted --- diff --git a/Trax.Docs/adr/0014-a-test-owns-every-timeout-it-waits-behind.md b/Trax.Docs/adr/0014-a-test-owns-every-timeout-it-waits-behind.md index 44852d0eb..b6b0eacdf 100644 --- a/Trax.Docs/adr/0014-a-test-owns-every-timeout-it-waits-behind.md +++ b/Trax.Docs/adr/0014-a-test-owns-every-timeout-it-waits-behind.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, dashboard, api, cli, samples] +repos: [core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples] areas: [testing] status: accepted --- diff --git a/Trax.Docs/adr/0015-every-packageversion-names-a-referenced-package.md b/Trax.Docs/adr/0015-every-packageversion-names-a-referenced-package.md index ed9eabf04..62cd079f8 100644 --- a/Trax.Docs/adr/0015-every-packageversion-names-a-referenced-package.md +++ b/Trax.Docs/adr/0015-every-packageversion-names-a-referenced-package.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, dashboard, api, cli, samples] +repos: [core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples] areas: [packaging, testing] status: accepted --- diff --git a/Trax.Docs/adr/0032-a-warning-fails-the-ci-build.md b/Trax.Docs/adr/0032-a-warning-fails-the-ci-build.md index 8f73dd2c5..fef1e481c 100644 --- a/Trax.Docs/adr/0032-a-warning-fails-the-ci-build.md +++ b/Trax.Docs/adr/0032-a-warning-fails-the-ci-build.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, dashboard, api, cli, samples, docs] +repos: [core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples, docs] areas: [ci] status: accepted --- diff --git a/Trax.Docs/adr/0033-a-package-validates-against-its-last-release.md b/Trax.Docs/adr/0033-a-package-validates-against-its-last-release.md index 46b7cafb9..e506c98f4 100644 --- a/Trax.Docs/adr/0033-a-package-validates-against-its-last-release.md +++ b/Trax.Docs/adr/0033-a-package-validates-against-its-last-release.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, api, dashboard] +repos: [core, effect, statemachine, mediator, scheduler, api, dashboard] areas: [packaging, ci] status: accepted --- diff --git a/Trax.Docs/adr/0038-the-adr-guard-is-released-by-tag.md b/Trax.Docs/adr/0038-the-adr-guard-is-released-by-tag.md index dc5805f57..ce4f4a361 100644 --- a/Trax.Docs/adr/0038-the-adr-guard-is-released-by-tag.md +++ b/Trax.Docs/adr/0038-the-adr-guard-is-released-by-tag.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, dashboard, api, cli, samples, docs] +repos: [core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples, docs] areas: [ci] status: superseded-by-0042 --- diff --git a/Trax.Docs/adr/0039-a-docs-change-merges-after-its-code-and-deploys-after-its-release.md b/Trax.Docs/adr/0039-a-docs-change-merges-after-its-code-and-deploys-after-its-release.md index 9d2f5b6c2..a6a864f5c 100644 --- a/Trax.Docs/adr/0039-a-docs-change-merges-after-its-code-and-deploys-after-its-release.md +++ b/Trax.Docs/adr/0039-a-docs-change-merges-after-its-code-and-deploys-after-its-release.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, dashboard, api, cli, samples, docs, website] +repos: [core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples, docs, website] areas: [docs, ci] status: superseded-by-0043 --- diff --git a/Trax.Docs/adr/0042-trax-is-one-repository-and-releases-at-one-version.md b/Trax.Docs/adr/0042-trax-is-one-repository-and-releases-at-one-version.md index e9fb5e15d..216b3b528 100644 --- a/Trax.Docs/adr/0042-trax-is-one-repository-and-releases-at-one-version.md +++ b/Trax.Docs/adr/0042-trax-is-one-repository-and-releases-at-one-version.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, dashboard, api, cli, samples, docs] +repos: [core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples, docs] areas: [packaging, ci] status: accepted --- diff --git a/Trax.Docs/adr/0043-the-site-is-published-from-a-release.md b/Trax.Docs/adr/0043-the-site-is-published-from-a-release.md index 7a311ed85..20ce9a80f 100644 --- a/Trax.Docs/adr/0043-the-site-is-published-from-a-release.md +++ b/Trax.Docs/adr/0043-the-site-is-published-from-a-release.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, dashboard, api, cli, samples, docs, website] +repos: [core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples, docs, website] areas: [docs, ci] status: accepted --- diff --git a/Trax.Docs/adr/0044-property-tests-use-cscheck-in-test-projects-only.md b/Trax.Docs/adr/0044-property-tests-use-cscheck-in-test-projects-only.md index aa5de3285..410758722 100644 --- a/Trax.Docs/adr/0044-property-tests-use-cscheck-in-test-projects-only.md +++ b/Trax.Docs/adr/0044-property-tests-use-cscheck-in-test-projects-only.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, dashboard, api, cli, samples] +repos: [core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples] areas: [testing, packaging] status: accepted --- diff --git a/Trax.Docs/adr/0046-a-machine-state-invokes-a-train-and-only-that-entry-receives-its-outcome.md b/Trax.Docs/adr/0046-a-machine-state-invokes-a-train-and-only-that-entry-receives-its-outcome.md index 8c386e48d..ca3f046de 100644 --- a/Trax.Docs/adr/0046-a-machine-state-invokes-a-train-and-only-that-entry-receives-its-outcome.md +++ b/Trax.Docs/adr/0046-a-machine-state-invokes-a-train-and-only-that-entry-receives-its-outcome.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, api, dashboard, cli, samples] +repos: [core, effect, statemachine, mediator, scheduler, api, dashboard, cli, samples] areas: [platform, data-model, graphql] status: accepted --- @@ -280,7 +280,7 @@ In `Trax.Api/tests`, on GraphQL and the dashboard alike: ## Exemplars -**Enforced elsewhere:** the tests listed under *Tests*, in Trax.Effect's state machine test projects, Trax.Scheduler's +**Enforced elsewhere:** the tests listed under *Tests*, in Trax.StateMachine's test projects, Trax.Scheduler's and Trax.Api's tests, each written red before the code it covers; `InteractionMatrixTests` in `Trax.Core.Tests.Meta`, which requires the `Invokes` row of the interaction matrix's machine-features table to name a test for every existing feature. diff --git a/Trax.Docs/adr/0048-a-machine-is-served-as-a-typed-api-and-the-server-applies-every-transition.md b/Trax.Docs/adr/0048-a-machine-is-served-as-a-typed-api-and-the-server-applies-every-transition.md index 87ffcc1cf..68a8a42ce 100644 --- a/Trax.Docs/adr/0048-a-machine-is-served-as-a-typed-api-and-the-server-applies-every-transition.md +++ b/Trax.Docs/adr/0048-a-machine-is-served-as-a-typed-api-and-the-server-applies-every-transition.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [effect, mediator, scheduler, api, dashboard, cli, samples] +repos: [effect, statemachine, mediator, scheduler, api, dashboard, cli, samples] areas: [platform, graphql, data-model] status: accepted --- @@ -23,7 +23,7 @@ written first, marked `[Red]` (they run, and pass only while they fail, so CI st passing is noticed), and each stage removes the marker from the tests it turns green. Amends [0046](./0046-a-machine-state-invokes-a-train-and-only-that-entry-receives-its-outcome.md) (the startup -comparison per entering event, the actor, timers and invoking states) and effect/0017 (autosave), each in its +comparison per entering event, the actor, timers and invoking states) and statemachine/0002 (autosave), each in its Changelog. ## Why this is written down diff --git a/Trax.Docs/adr/0050-docs-pages-are-typed-and-their-code-is-checked-against-the-code.md b/Trax.Docs/adr/0050-docs-pages-are-typed-and-their-code-is-checked-against-the-code.md index 25a86628a..faf74b23e 100644 --- a/Trax.Docs/adr/0050-docs-pages-are-typed-and-their-code-is-checked-against-the-code.md +++ b/Trax.Docs/adr/0050-docs-pages-are-typed-and-their-code-is-checked-against-the-code.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [core, effect, mediator, scheduler, dashboard, api, cli, samples, docs, website] +repos: [core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples, docs, website] areas: [docs, testing] status: accepted --- diff --git a/Trax.Docs/adr/0052-a-state-spawns-a-child-machine-as-it-invokes-a-train.md b/Trax.Docs/adr/0052-a-state-spawns-a-child-machine-as-it-invokes-a-train.md index 92c73bf05..5a4f44e47 100644 --- a/Trax.Docs/adr/0052-a-state-spawns-a-child-machine-as-it-invokes-a-train.md +++ b/Trax.Docs/adr/0052-a-state-spawns-a-child-machine-as-it-invokes-a-train.md @@ -1,6 +1,6 @@ --- authors: [Theauxm] -repos: [effect, api] +repos: [effect, statemachine, api] areas: [platform, data-model] status: accepted --- diff --git a/Trax.Docs/adr/README.md b/Trax.Docs/adr/README.md index 00e23ca4d..3cb7f9067 100644 --- a/Trax.Docs/adr/README.md +++ b/Trax.Docs/adr/README.md @@ -13,7 +13,7 @@ so rather than silently overriding it. decision governing a single folder lives in that folder, at `/docs/adr/`, because its location is what routes it to the people it binds and they find it without coming through here. The `repos` key and the "By repo" table name folders by their slug (`Trax.Core` is -`core`). +`core`, `Trax.StateMachine` is `statemachine`). Numbering is per directory, so a bare number is ambiguous across them. Cite a folder-scoped ADR by folder, as `effect/0001`. @@ -55,6 +55,7 @@ realising. A repo-scoped ADR omits the key, because its path already says it. | `mediator` | [0001](./0001-architectural-rules-are-executable-guards.md), [0002](./0002-cross-repo-dependencies-are-exact-pinned.md), [0003](./0003-a-repo-depends-only-on-what-is-upstream.md), [0004](./0004-tests-assert-with-fluentassertions.md), [0005](./0005-a-skipped-test-is-a-runtime-decision.md), [0006](./0006-tests-synchronise-on-a-signal.md), [0007](./0007-the-canonical-train-name-is-the-interface-fullname.md), [0008](./0008-documentation-conventions-are-linted.md), [0010](./0010-the-public-api-surface-is-a-committed-baseline.md), [0011](./0011-test-frameworks-stay-out-of-shipped-libraries.md), [0012](./0012-an-adrs-exemplars-are-declared-by-attribute.md), [0013](./0013-trax-owns-the-vocabulary-for-its-own-concepts.md), [0014](./0014-a-test-owns-every-timeout-it-waits-behind.md), [0015](./0015-every-packageversion-names-a-referenced-package.md), [0016](./0016-a-junction-chain-is-a-declaration-not-a-step-of-the-work.md), [0017](./0017-a-callers-enqueue-goes-through-the-mediator.md), [0018](./0018-a-deferred-enqueue-is-staged-and-a-stranded-one-is-cancelled.md), [0019](./0019-queued-work-for-one-subject-runs-one-at-a-time.md), [0021](./0021-a-queue-hook-reads-its-input-through-traininput.md), [0023](./0023-caller-supplied-train-input-is-read-case-insensitively.md), [0026](./0026-train-roles-match-exactly-like-authorize.md), [0032](./0032-a-warning-fails-the-ci-build.md), [0033](./0033-a-package-validates-against-its-last-release.md), [0038](./0038-the-adr-guard-is-released-by-tag.md), [0039](./0039-a-docs-change-merges-after-its-code-and-deploys-after-its-release.md), [0040](./0040-a-chain-declares-every-track-and-a-decider-chooses-one.md), [0041](./0041-a-requeued-run-replays-the-decisions-of-the-run-it-repeats.md), [0042](./0042-trax-is-one-repository-and-releases-at-one-version.md), [0043](./0043-the-site-is-published-from-a-release.md), [0044](./0044-property-tests-use-cscheck-in-test-projects-only.md), [0046](./0046-a-machine-state-invokes-a-train-and-only-that-entry-receives-its-outcome.md), [0047](./0047-a-checkpoint-stores-a-state-the-train-declares-and-a-resume-skips-to-it.md), [0048](./0048-a-machine-is-served-as-a-typed-api-and-the-server-applies-every-transition.md), [0050](./0050-docs-pages-are-typed-and-their-code-is-checked-against-the-code.md), [0051](./0051-only-the-caller-who-started-a-run-may-follow-its-progress.md) | | `samples` | [0001](./0001-architectural-rules-are-executable-guards.md), [0002](./0002-cross-repo-dependencies-are-exact-pinned.md), [0003](./0003-a-repo-depends-only-on-what-is-upstream.md), [0004](./0004-tests-assert-with-fluentassertions.md), [0005](./0005-a-skipped-test-is-a-runtime-decision.md), [0006](./0006-tests-synchronise-on-a-signal.md), [0007](./0007-the-canonical-train-name-is-the-interface-fullname.md), [0008](./0008-documentation-conventions-are-linted.md), [0011](./0011-test-frameworks-stay-out-of-shipped-libraries.md), [0012](./0012-an-adrs-exemplars-are-declared-by-attribute.md), [0013](./0013-trax-owns-the-vocabulary-for-its-own-concepts.md), [0014](./0014-a-test-owns-every-timeout-it-waits-behind.md), [0015](./0015-every-packageversion-names-a-referenced-package.md), [0016](./0016-a-junction-chain-is-a-declaration-not-a-step-of-the-work.md), [0032](./0032-a-warning-fails-the-ci-build.md), [0035](./0035-demo-credentials-exist-only-in-development.md), [0038](./0038-the-adr-guard-is-released-by-tag.md), [0039](./0039-a-docs-change-merges-after-its-code-and-deploys-after-its-release.md), [0040](./0040-a-chain-declares-every-track-and-a-decider-chooses-one.md), [0042](./0042-trax-is-one-repository-and-releases-at-one-version.md), [0043](./0043-the-site-is-published-from-a-release.md), [0044](./0044-property-tests-use-cscheck-in-test-projects-only.md), [0045](./0045-a-parallel-step-runs-fixed-branches-on-copies-of-memory-and-the-join-commits.md), [0046](./0046-a-machine-state-invokes-a-train-and-only-that-entry-receives-its-outcome.md), [0047](./0047-a-checkpoint-stores-a-state-the-train-declares-and-a-resume-skips-to-it.md), [0048](./0048-a-machine-is-served-as-a-typed-api-and-the-server-applies-every-transition.md), [0049](./0049-browser-tests-use-playwright-for-dotnet-in-test-projects-only.md), [0050](./0050-docs-pages-are-typed-and-their-code-is-checked-against-the-code.md), [0054](./0054-a-frontend-writes-every-document-that-reaches-a-train.md), [0055](./0055-the-react-console-is-the-operator-dashboard-and-the-blazor-one-is-removed.md) | | `scheduler` | [0001](./0001-architectural-rules-are-executable-guards.md), [0002](./0002-cross-repo-dependencies-are-exact-pinned.md), [0003](./0003-a-repo-depends-only-on-what-is-upstream.md), [0004](./0004-tests-assert-with-fluentassertions.md), [0005](./0005-a-skipped-test-is-a-runtime-decision.md), [0006](./0006-tests-synchronise-on-a-signal.md), [0007](./0007-the-canonical-train-name-is-the-interface-fullname.md), [0008](./0008-documentation-conventions-are-linted.md), [0009](./0009-feature-tables-ship-in-the-core-provider-set.md), [0010](./0010-the-public-api-surface-is-a-committed-baseline.md), [0011](./0011-test-frameworks-stay-out-of-shipped-libraries.md), [0012](./0012-an-adrs-exemplars-are-declared-by-attribute.md), [0013](./0013-trax-owns-the-vocabulary-for-its-own-concepts.md), [0014](./0014-a-test-owns-every-timeout-it-waits-behind.md), [0015](./0015-every-packageversion-names-a-referenced-package.md), [0016](./0016-a-junction-chain-is-a-declaration-not-a-step-of-the-work.md), [0017](./0017-a-callers-enqueue-goes-through-the-mediator.md), [0018](./0018-a-deferred-enqueue-is-staged-and-a-stranded-one-is-cancelled.md), [0019](./0019-queued-work-for-one-subject-runs-one-at-a-time.md), [0020](./0020-a-failure-is-classified-where-it-happens-and-carried.md), [0022](./0022-the-dashboard-and-the-api-share-one-operation-per-action.md), [0023](./0023-caller-supplied-train-input-is-read-case-insensitively.md), [0028](./0028-a-remote-runs-client-message-is-chosen-by-the-runner.md), [0032](./0032-a-warning-fails-the-ci-build.md), [0033](./0033-a-package-validates-against-its-last-release.md), [0036](./0036-a-feature-table-ships-with-its-model-in-effect.md), [0037](./0037-run-now-applies-the-same-per-record-checks-as-queueing.md), [0038](./0038-the-adr-guard-is-released-by-tag.md), [0039](./0039-a-docs-change-merges-after-its-code-and-deploys-after-its-release.md), [0040](./0040-a-chain-declares-every-track-and-a-decider-chooses-one.md), [0041](./0041-a-requeued-run-replays-the-decisions-of-the-run-it-repeats.md), [0042](./0042-trax-is-one-repository-and-releases-at-one-version.md), [0043](./0043-the-site-is-published-from-a-release.md), [0044](./0044-property-tests-use-cscheck-in-test-projects-only.md), [0045](./0045-a-parallel-step-runs-fixed-branches-on-copies-of-memory-and-the-join-commits.md), [0046](./0046-a-machine-state-invokes-a-train-and-only-that-entry-receives-its-outcome.md), [0047](./0047-a-checkpoint-stores-a-state-the-train-declares-and-a-resume-skips-to-it.md), [0048](./0048-a-machine-is-served-as-a-typed-api-and-the-server-applies-every-transition.md), [0050](./0050-docs-pages-are-typed-and-their-code-is-checked-against-the-code.md), [0051](./0051-only-the-caller-who-started-a-run-may-follow-its-progress.md), [0055](./0055-the-react-console-is-the-operator-dashboard-and-the-blazor-one-is-removed.md) | +| `statemachine` | [0001](./0001-architectural-rules-are-executable-guards.md), [0002](./0002-cross-repo-dependencies-are-exact-pinned.md), [0003](./0003-a-repo-depends-only-on-what-is-upstream.md), [0004](./0004-tests-assert-with-fluentassertions.md), [0005](./0005-a-skipped-test-is-a-runtime-decision.md), [0006](./0006-tests-synchronise-on-a-signal.md), [0008](./0008-documentation-conventions-are-linted.md), [0010](./0010-the-public-api-surface-is-a-committed-baseline.md), [0011](./0011-test-frameworks-stay-out-of-shipped-libraries.md), [0012](./0012-an-adrs-exemplars-are-declared-by-attribute.md), [0013](./0013-trax-owns-the-vocabulary-for-its-own-concepts.md), [0014](./0014-a-test-owns-every-timeout-it-waits-behind.md), [0015](./0015-every-packageversion-names-a-referenced-package.md), [0032](./0032-a-warning-fails-the-ci-build.md), [0033](./0033-a-package-validates-against-its-last-release.md), [0038](./0038-the-adr-guard-is-released-by-tag.md), [0039](./0039-a-docs-change-merges-after-its-code-and-deploys-after-its-release.md), [0042](./0042-trax-is-one-repository-and-releases-at-one-version.md), [0043](./0043-the-site-is-published-from-a-release.md), [0044](./0044-property-tests-use-cscheck-in-test-projects-only.md), [0046](./0046-a-machine-state-invokes-a-train-and-only-that-entry-receives-its-outcome.md), [0048](./0048-a-machine-is-served-as-a-typed-api-and-the-server-applies-every-transition.md), [0050](./0050-docs-pages-are-typed-and-their-code-is-checked-against-the-code.md), [0052](./0052-a-state-spawns-a-child-machine-as-it-invokes-a-train.md) | | `website` | [0039](./0039-a-docs-change-merges-after-its-code-and-deploys-after-its-release.md), [0043](./0043-the-site-is-published-from-a-release.md), [0050](./0050-docs-pages-are-typed-and-their-code-is-checked-against-the-code.md) | ## By area @@ -75,21 +76,21 @@ realising. A repo-scoped ADR omits the key, because its path already says it. | # | Decision | Repos | Areas | | --- | --- | --- | --- | -| [0001](./0001-architectural-rules-are-executable-guards.md) | Architectural rules are executable guards, not prose | core, effect, mediator, scheduler, dashboard, api, cli, samples | testing, platform | -| [0002](./0002-cross-repo-dependencies-are-exact-pinned.md) | Cross-repo dependencies are exact-pinned and lockfiled | core, effect, mediator, scheduler, dashboard, api, cli, samples | packaging, ci | -| [0003](./0003-a-repo-depends-only-on-what-is-upstream.md) | A repo depends only on what is upstream of it | core, effect, mediator, scheduler, dashboard, api, cli, samples | packaging, platform | -| [0004](./0004-tests-assert-with-fluentassertions.md) | Tests assert with AwesomeAssertions | core, effect, mediator, scheduler, dashboard, api, cli, samples, docs | testing | -| [0005](./0005-a-skipped-test-is-a-runtime-decision.md) | A skipped test is a runtime decision, never an attribute | core, effect, mediator, scheduler, dashboard, api, cli, samples, docs | testing | -| [0006](./0006-tests-synchronise-on-a-signal.md) | Tests synchronise on a signal, never on a fixed delay | core, effect, mediator, scheduler, dashboard, api, cli, samples | testing | +| [0001](./0001-architectural-rules-are-executable-guards.md) | Architectural rules are executable guards, not prose | core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples | testing, platform | +| [0002](./0002-cross-repo-dependencies-are-exact-pinned.md) | Cross-repo dependencies are exact-pinned and lockfiled | core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples | packaging, ci | +| [0003](./0003-a-repo-depends-only-on-what-is-upstream.md) | A repo depends only on what is upstream of it | core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples | packaging, platform | +| [0004](./0004-tests-assert-with-fluentassertions.md) | Tests assert with AwesomeAssertions | core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples, docs | testing | +| [0005](./0005-a-skipped-test-is-a-runtime-decision.md) | A skipped test is a runtime decision, never an attribute | core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples, docs | testing | +| [0006](./0006-tests-synchronise-on-a-signal.md) | Tests synchronise on a signal, never on a fixed delay | core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples | testing | | [0007](./0007-the-canonical-train-name-is-the-interface-fullname.md) | The canonical train name is the interface FullName | effect, mediator, scheduler, dashboard, api, samples | naming, platform | -| [0008](./0008-documentation-conventions-are-linted.md) | Documentation conventions are enforced by lint, not by review | core, effect, mediator, scheduler, dashboard, api, cli, samples, docs | docs, testing | +| [0008](./0008-documentation-conventions-are-linted.md) | Documentation conventions are enforced by lint, not by review | core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples, docs | docs, testing | | [0009](./0009-feature-tables-ship-in-the-core-provider-set.md) | Feature-package tables ship in the core provider migration set | effect, api, scheduler | migrations, providers | -| [0010](./0010-the-public-api-surface-is-a-committed-baseline.md) | The public API surface is a committed baseline | core, effect, mediator, scheduler, dashboard, api, cli | packaging, testing | -| [0011](./0011-test-frameworks-stay-out-of-shipped-libraries.md) | Test frameworks stay out of shipped libraries, except where fixtures are the product | core, effect, mediator, scheduler, dashboard, api, cli, samples | testing, packaging | -| [0012](./0012-an-adrs-exemplars-are-declared-by-attribute.md) | An ADR's exemplars are declared by attribute, not matched by name | core, effect, mediator, scheduler, dashboard, api, cli, samples, docs | testing, platform | -| [0013](./0013-trax-owns-the-vocabulary-for-its-own-concepts.md) | Trax owns the vocabulary for its own concepts | core, effect, mediator, scheduler, dashboard, api, cli, samples | platform, naming | -| [0014](./0014-a-test-owns-every-timeout-it-waits-behind.md) | A test owns every timeout it waits behind | core, effect, mediator, scheduler, dashboard, api, cli, samples | testing | -| [0015](./0015-every-packageversion-names-a-referenced-package.md) | Every PackageVersion names a package a project references | core, effect, mediator, scheduler, dashboard, api, cli, samples | packaging, testing | +| [0010](./0010-the-public-api-surface-is-a-committed-baseline.md) | The public API surface is a committed baseline | core, effect, statemachine, mediator, scheduler, dashboard, api, cli | packaging, testing | +| [0011](./0011-test-frameworks-stay-out-of-shipped-libraries.md) | Test frameworks stay out of shipped libraries, except where fixtures are the product | core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples | testing, packaging | +| [0012](./0012-an-adrs-exemplars-are-declared-by-attribute.md) | An ADR's exemplars are declared by attribute, not matched by name | core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples, docs | testing, platform | +| [0013](./0013-trax-owns-the-vocabulary-for-its-own-concepts.md) | Trax owns the vocabulary for its own concepts | core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples | platform, naming | +| [0014](./0014-a-test-owns-every-timeout-it-waits-behind.md) | A test owns every timeout it waits behind | core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples | testing | +| [0015](./0015-every-packageversion-names-a-referenced-package.md) | Every PackageVersion names a package a project references | core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples | packaging, testing | | [0016](./0016-a-junction-chain-is-a-declaration-not-a-step-of-the-work.md) | A junction chain is a declaration, not a step of the work | core, effect, mediator, scheduler, api, dashboard, cli, samples | platform, testing | | [0017](./0017-a-callers-enqueue-goes-through-the-mediator.md) | A caller's enqueue goes through the mediator | mediator, scheduler, api, dashboard | platform, graphql | | [0018](./0018-a-deferred-enqueue-is-staged-and-a-stranded-one-is-cancelled.md) | A deferred enqueue is staged, and a stranded one is cancelled | effect, mediator, scheduler, api, dashboard | platform, data-model | @@ -100,26 +101,26 @@ realising. A repo-scoped ADR omits the key, because its path already says it. | [0023](./0023-caller-supplied-train-input-is-read-case-insensitively.md) | Caller-supplied train input is read case-insensitively and duplicate properties are refused | mediator, dashboard, scheduler, api | platform, graphql | | [0026](./0026-train-roles-match-exactly-like-authorize.md) | Train roles match exactly, like @authorize | mediator, api | platform, graphql | | [0028](./0028-a-remote-runs-client-message-is-chosen-by-the-runner.md) | A remote run's client-facing message is chosen by the runner | scheduler, api | platform, graphql | -| [0032](./0032-a-warning-fails-the-ci-build.md) | A warning fails the CI build | core, effect, mediator, scheduler, dashboard, api, cli, samples, docs | ci | -| [0033](./0033-a-package-validates-against-its-last-release.md) | A package validates against its last release | core, effect, mediator, scheduler, api, dashboard | packaging, ci | +| [0032](./0032-a-warning-fails-the-ci-build.md) | A warning fails the CI build | core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples, docs | ci | +| [0033](./0033-a-package-validates-against-its-last-release.md) | A package validates against its last release | core, effect, statemachine, mediator, scheduler, api, dashboard | packaging, ci | | [0035](./0035-demo-credentials-exist-only-in-development.md) | A demo credential carries the marker and exists only in Development | api, samples | platform | | [0036](./0036-a-feature-table-ships-with-its-model-in-effect.md) | A feature table ships with its model in Trax.Effect, and the feature reaches it through IDataContext | effect, scheduler, api | data-model, migrations, providers | | [0037](./0037-run-now-applies-the-same-per-record-checks-as-queueing.md) | Run-now applies the same per-record checks as queueing | scheduler, api, dashboard | platform, graphql | -| [0038](./0038-the-adr-guard-is-released-by-tag.md) | The ADR guard is released by tag, and the code repos pin the tagged commit | core, effect, mediator, scheduler, dashboard, api, cli, samples, docs | ci | -| [0039](./0039-a-docs-change-merges-after-its-code-and-deploys-after-its-release.md) | A docs change describing new behaviour merges after its code, and its deploy waits for the release | core, effect, mediator, scheduler, dashboard, api, cli, samples, docs, website | docs, ci | +| [0038](./0038-the-adr-guard-is-released-by-tag.md) | The ADR guard is released by tag, and the code repos pin the tagged commit | core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples, docs | ci | +| [0039](./0039-a-docs-change-merges-after-its-code-and-deploys-after-its-release.md) | A docs change describing new behaviour merges after its code, and its deploy waits for the release | core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples, docs, website | docs, ci | | [0040](./0040-a-chain-declares-every-track-and-a-decider-chooses-one.md) | A chain declares every track, and a decider chooses one per run | core, effect, mediator, scheduler, api, dashboard, samples | platform | | [0041](./0041-a-requeued-run-replays-the-decisions-of-the-run-it-repeats.md) | A requeued run replays the decisions of the run it repeats | core, effect, mediator, scheduler, api, dashboard | platform, data-model, graphql | -| [0042](./0042-trax-is-one-repository-and-releases-at-one-version.md) | Trax is one repository, its packages reference each other as projects, and they release at one version | core, effect, mediator, scheduler, dashboard, api, cli, samples, docs | packaging, ci | -| [0043](./0043-the-site-is-published-from-a-release.md) | The site is published from a release, and a docs change lands with its code | core, effect, mediator, scheduler, dashboard, api, cli, samples, docs, website | docs, ci | -| [0044](./0044-property-tests-use-cscheck-in-test-projects-only.md) | Property tests use CsCheck, in test projects only | core, effect, mediator, scheduler, dashboard, api, cli, samples | testing, packaging | +| [0042](./0042-trax-is-one-repository-and-releases-at-one-version.md) | Trax is one repository, its packages reference each other as projects, and they release at one version | core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples, docs | packaging, ci | +| [0043](./0043-the-site-is-published-from-a-release.md) | The site is published from a release, and a docs change lands with its code | core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples, docs, website | docs, ci | +| [0044](./0044-property-tests-use-cscheck-in-test-projects-only.md) | Property tests use CsCheck, in test projects only | core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples | testing, packaging | | [0045](./0045-a-parallel-step-runs-fixed-branches-on-copies-of-memory-and-the-join-commits.md) | A Parallel step runs a fixed set of branches on copies of Memory, and the join commits | core, effect, scheduler, api, dashboard, samples | platform | -| [0046](./0046-a-machine-state-invokes-a-train-and-only-that-entry-receives-its-outcome.md) | A machine state invokes a train, and only that entry of the state receives its outcome | core, effect, mediator, scheduler, dashboard, api, cli, samples | platform, data-model, graphql | +| [0046](./0046-a-machine-state-invokes-a-train-and-only-that-entry-receives-its-outcome.md) | A machine state invokes a train, and only that entry of the state receives its outcome | core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples | platform, data-model, graphql | | [0047](./0047-a-checkpoint-stores-a-state-the-train-declares-and-a-resume-skips-to-it.md) | A checkpoint stores a state the train declares, and a resumed run skips to it | core, effect, mediator, scheduler, dashboard, api, samples | platform, data-model, graphql | -| [0048](./0048-a-machine-is-served-as-a-typed-api-and-the-server-applies-every-transition.md) | A machine is served as a typed API, and the server applies every transition | effect, mediator, scheduler, api, dashboard, cli, samples | platform, graphql, data-model | +| [0048](./0048-a-machine-is-served-as-a-typed-api-and-the-server-applies-every-transition.md) | A machine is served as a typed API, and the server applies every transition | effect, statemachine, mediator, scheduler, api, dashboard, cli, samples | platform, graphql, data-model | | [0049](./0049-browser-tests-use-playwright-for-dotnet-in-test-projects-only.md) | Browser tests use Playwright for .NET, in test projects only | samples | testing, packaging, ci | -| [0050](./0050-docs-pages-are-typed-and-their-code-is-checked-against-the-code.md) | Docs pages are typed, and their code is checked against the code | core, effect, mediator, scheduler, dashboard, api, cli, samples, docs, website | docs, testing | +| [0050](./0050-docs-pages-are-typed-and-their-code-is-checked-against-the-code.md) | Docs pages are typed, and their code is checked against the code | core, effect, statemachine, mediator, scheduler, dashboard, api, cli, samples, docs, website | docs, testing | | [0051](./0051-only-the-caller-who-started-a-run-may-follow-its-progress.md) | Only the caller who started a run may follow its progress | effect, mediator, scheduler, api, cli | graphql, data-model | -| [0052](./0052-a-state-spawns-a-child-machine-as-it-invokes-a-train.md) | A state spawns a child machine as it invokes a train, and the child belongs to its parent's owner | effect, api | platform, data-model | +| [0052](./0052-a-state-spawns-a-child-machine-as-it-invokes-a-train.md) | A state spawns a child machine as it invokes a train, and the child belongs to its parent's owner | effect, statemachine, api | platform, data-model | | [0053](./0053-a-client-document-is-registered-by-the-host-at-boot.md) | A client document is registered by the host at boot | api, cli | graphql | | [0054](./0054-a-frontend-writes-every-document-that-reaches-a-train.md) | A frontend writes every document that reaches a train | api, cli, samples | graphql | | [0055](./0055-the-react-console-is-the-operator-dashboard-and-the-blazor-one-is-removed.md) | The React console is the operator dashboard, and the Blazor one is removed | api, dashboard, scheduler, samples, docs | platform | diff --git a/Trax.Docs/contributing/repository-layout.md b/Trax.Docs/contributing/repository-layout.md index 347763593..599c42296 100644 --- a/Trax.Docs/contributing/repository-layout.md +++ b/Trax.Docs/contributing/repository-layout.md @@ -58,6 +58,22 @@ in-memory provider stores objects rather than tables, so there is no DDL to run. A partial class in its own directory, one file per feature area. See [API conventions](/docs/contributing/api-conventions#builder-pattern). +## State machines + +`Trax.StateMachine/` holds the machines in every language, one directory each, with what spans +them at the top: + +``` +Trax.StateMachine/dotnet/ the C# engine: Trax.StateMachine.slnx, src/, tests/ +Trax.StateMachine/ts/ @traxsharp/state-machine, the TypeScript engine and client +Trax.StateMachine/conformance/ the cases every engine answers, and the runner that sends them +Trax.StateMachine/docs/adr/ decisions that bind every language +``` + +`dotnet/` is laid out like any other .NET folder. A case both engines must answer the same way +(a canonical-wire vector, a refusal code, a fixture) goes in `conformance/`, never in one +engine's tests. The tables a machine is stored in are models in Trax.Effect, as above. + ## Sample applications Most samples are three or four projects under `Trax.Samples/samples//`: diff --git a/Trax.Docs/migration-guides.md b/Trax.Docs/migration-guides.md index b2497d143..9de633069 100644 --- a/Trax.Docs/migration-guides.md +++ b/Trax.Docs/migration-guides.md @@ -18,6 +18,7 @@ each package had its own version, so older guides name the package too. | Guide | Applies from | |---|---| +| [Move to the Trax.StateMachine packages](/docs/migration-guides/trax-statemachine-packages) | The release after Trax 1.67.0 | | [Reach trains through your own documents](/docs/migration-guides/reach-trains-through-your-own-documents) | Trax 1.67.0 | | [Adapt to the machine wire changes](/docs/migration-guides/machine-wire-changes) | Trax 1.64.0 | | [Regenerate twins after the trax machine generate defaults changed](/docs/migration-guides/trax-machine-generate-defaults) | Trax 1.63.1 | diff --git a/Trax.Docs/migration-guides/trax-statemachine-packages.md b/Trax.Docs/migration-guides/trax-statemachine-packages.md new file mode 100644 index 000000000..d770c2549 --- /dev/null +++ b/Trax.Docs/migration-guides/trax-statemachine-packages.md @@ -0,0 +1,50 @@ +--- +title: Move to the Trax.StateMachine packages +description: "Upgrade steps for the release that renamed the state-machine packages from Trax.Effect.StateMachine to Trax.StateMachine: swap the ids and namespaces." +type: how-to +area: upgrading +parent: Upgrading +nav_order: 0 +--- + +# Move to the Trax.StateMachine packages + +Applies from: the first Trax release after 1.67.0. + +The state machines left Trax.Effect for a folder of their own, and their packages and namespaces +were renamed to match. Nothing else changed: the types, their members, the tables and the wire are +the same, and `@traxsharp/state-machine` on npm keeps its name. + +| Before | After | +|---|---| +| `Trax.Effect.StateMachine` | `Trax.StateMachine` | +| `Trax.Effect.StateMachine.Persistence` | `Trax.StateMachine.Persistence` | +| `Trax.Effect.StateMachine.Testing` | `Trax.StateMachine.Testing` | + +The old packages are deprecated on nuget.org and get no further releases. + +## Swap the packages + +In each project that references one of the old packages, replace it with the new id at the same +version as your other Trax packages: + +```xml + +``` + +With Central Package Management, rename the `PackageVersion` in `Directory.Packages.props` the +same way. + +## Swap the namespaces + +Each namespace loses its `Effect.` segment, the same way the package ids do: + +```csharp fragment +using Trax.StateMachine; +using Trax.StateMachine.Persistence; +using static Trax.StateMachine.Rules; +``` + +A search and replace of `Trax.Effect.StateMachine` with `Trax.StateMachine` over your sources and +project files does both steps. Nothing else references the old names: a stored snapshot, an IR or a +generated twin carries no namespace, so neither the database nor a regenerated client changes. diff --git a/Trax.Docs/reference/packages.md b/Trax.Docs/reference/packages.md index 4468c4341..7434da2c1 100644 --- a/Trax.Docs/reference/packages.md +++ b/Trax.Docs/reference/packages.md @@ -87,6 +87,11 @@ dotnet add package Trax.Api.Dashboard | [Trax.Effect.Provider.Parameter](https://www.nuget.org/packages/Trax.Effect.Provider.Parameter) | `SaveTrainParameters()`: serializes each train's input and output into its Metadata row, masking members marked `[TraxSensitive]`. See [Parameter Effect](/docs/effect/effect-providers/parameter-effect). | `Trax.Effect.Provider.Parameter.Extensions` | `Trax.Effect` and a data provider. | | [Trax.Effect.Broadcaster.RabbitMQ](https://www.nuget.org/packages/Trax.Effect.Broadcaster.RabbitMQ) | `UseRabbitMq(connectionString)` on the `UseBroadcaster` builder, so lifecycle events raised in one process reach handlers in every other. See [Broadcaster Sinks](/docs/effect/broadcaster-sinks). | `Trax.Effect.Broadcaster.RabbitMQ.Extensions` | `Trax.Effect`. | | [Trax.Effect.Broadcaster.SignalR](https://www.nuget.org/packages/Trax.Effect.Broadcaster.SignalR) | `UseSignalRHub()` on the `UseBroadcaster` builder and `MapTraxTrainEventHub()` for the endpoint, so browser and Blazor clients see train events as they happen. See [UseSignalRHub](/docs/sdk-reference/configuration/use-signalr-hub). | `Trax.Effect.Broadcaster.SignalR.Extensions` | `Trax.Effect`. | + +## Trax.StateMachine + +| Package | What it is for | Import | Pairs with | +|---|---|---|---| | [Trax.StateMachine](https://www.nuget.org/packages/Trax.StateMachine) | The snapshot state-machine engine: state as language-neutral JSON that a C# backend and a TypeScript client agree on, authored through `IMachineBuilder`. No dependencies. See [State Machines](/docs/statemachine). | `Trax.StateMachine` | Usually `Trax.StateMachine.Persistence`. | | [Trax.StateMachine.Persistence](https://www.nuget.org/packages/Trax.StateMachine.Persistence) | `Machine`, the user-scoped snapshot store, the draft service, the exactly-once effect primitive, `AddStateMachines` and `AddTraxStateMachineSelfCheck`. See [AddStateMachines](/docs/sdk-reference/statemachine-api/add-state-machines). | `Trax.StateMachine.Persistence` | `Trax.Effect` and a data provider; `AddStateMachines` refuses to register without one. | | [Trax.StateMachine.Testing](https://www.nuget.org/packages/Trax.StateMachine.Testing) | Replays the differential corpus produced by the TypeScript engine through the C# engine and returns the cases it fails to reproduce, proving the two engines agree. See [Codegen Pipeline](/docs/statemachine/codegen-pipeline). | `Trax.StateMachine.Testing` | A test project, and the corpus `trax machine generate` writes. | diff --git a/Trax.Effect/AGENTS.md b/Trax.Effect/AGENTS.md index 08b366b98..64296cdf4 100644 --- a/Trax.Effect/AGENTS.md +++ b/Trax.Effect/AGENTS.md @@ -1,10 +1,11 @@ # Trax.Effect -The effect layer: execution metadata, data contexts, effect and junction providers, the -state machine engine, and the Postgres / Sqlite / InMemory data providers. It sits directly -above `Trax.Core`, so a change here reaches the five folders downstream of it (Trax.Mediator, -Trax.Scheduler, Trax.Api, Trax.Cli and Trax.Samples) through project -references, in the same commit. Trax.Core is upstream and never sees it. +The effect layer: execution metadata, data contexts, effect and junction providers, and the +Postgres / Sqlite / InMemory data providers, including the tables the state machines are stored +in. It sits directly above `Trax.Core`, so a change here reaches the six folders downstream of it +(Trax.StateMachine, Trax.Mediator, Trax.Scheduler, Trax.Api, Trax.Cli and Trax.Samples) through +project references, in the same commit. Trax.Core is upstream and never sees it. The state +machines themselves live in `Trax.StateMachine/`, with their own decisions. This file is the entry point. It routes; it does not restate the rules. @@ -39,9 +40,6 @@ if your work contradicts one, say so rather than silently overriding it. | `AddJunctionProgress`, or any junction effect that writes while a run is going | [0021](./docs/adr/0021-a-runs-tracked-writes-commit-once-when-it-finishes.md), a run's tracked writes commit once, when it finishes; a junction effect writes only its own columns, through its own context | | `AddJunctionEvents`, `IJunctionEventHandler`, the junction event types, `trax.junction_run`, or `[TraxSensitive]` on a question type | [0019](./docs/adr/0019-junction-events-are-opt-in-and-carry-no-run-data.md), junction events are opt-in, reach junction event handlers only, carry names, times, states and failure classes but never run data, and their rows go with their run | | `MapTraxTrainEventHub`, or the SignalR sink's default client payload | [0016](./docs/adr/0016-the-train-event-hub-carries-the-hosts-authorization.md), the hub is mapped with an authorization posture or the host does not start, and the default payload leaves the failure reason out | -| a state-machine draft's `requestId` replay, or `ISnapshotStore.UpdateWithRequest` | [0013](./docs/adr/0013-a-request-id-replays-only-the-request-it-recorded.md), an id replays only for the request it recorded, wherever the draft is now | -| what a state-machine draft's autosave or advance may write, what the effect runner commits or replays and when a reset releases its claim, `effect_claim.content_fingerprint`, `RunsOnce`, or `Committed()` | [0017](./docs/adr/0017-only-the-effect-runner-reaches-a-committed-state.md), only the effect runner puts a draft into a committed state or an effect's target | -| `trax.snapshot_transition`, `IDataContext.SnapshotTransitions`, or a new path that writes a state-machine snapshot | [0022](./docs/adr/0022-a-machine-instance-history-is-written-with-its-snapshot.md), every snapshot write through the store adds one history row in its transaction, and the history goes with the instance | Decisions binding more than one folder live in the central corpus at `Trax.Docs/adr/`, whose index lists them by folder. Thirty-one name `effect`, three of them superseded: executable guards, the @@ -81,8 +79,8 @@ not to record. The format is ## Guards `tests/Trax.Effect.Tests.Meta/` holds the convention guards. Thirteen of the eighteen are -shared with other folders and enforce repository-wide rules: ten appear in all eight code -folders, `PublicApiSurfaceTests` in the seven that publish an API surface, +shared with other folders and enforce repository-wide rules: ten appear in all nine code +folders, `PublicApiSurfaceTests` in the eight that publish an API surface, `BuilderPartialSplitTests` in three and `BuilderOrderDiagnosticsTests` in two. Five are unique to this folder: `MigrationsIntegrityTests`, `ModelPersistentPairingTests`, `PostgresMigrationRerunTests`, `ServiceTrainRunIsSealedTests` (`0009`), and @@ -94,8 +92,8 @@ carries `Not ADR-enforcing:` with a reason, and the `adr-guard` job checks it. A unclassified until you choose, and the build says so. Opting out is a normal answer; a reason that reads as a deferral is not. -`tests/Trax.StateMachine.Persistence.Integration/MigrationSchemaTests.cs` is the -model-versus-DDL drift guard for the state-machine tables, and `EveryTableIsModelledTests` (Postgres) +`Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MigrationSchemaTests.cs`, +in the machines' folder, is the model-versus-DDL drift guard for the state-machine tables, and `EveryTableIsModelledTests` (Postgres) with `SqliteEveryTableIsModelledTests` is the one for the data context: every migrated table is mapped, and every mapped column exists (`0036`). The Postgres ones need a live Postgres. `docker compose up -d` provides one. diff --git a/Trax.Effect/README.md b/Trax.Effect/README.md index c20ad9501..cae63c938 100644 --- a/Trax.Effect/README.md +++ b/Trax.Effect/README.md @@ -9,7 +9,7 @@ > Part of [Trax .NET](https://github.com/TraxSharp): business logic you can call, schedule, or serve as an API, with every > run recorded in your Postgres. [Docs](https://traxsharp.net/docs) · [Getting started](https://traxsharp.net/docs/getting-started) · [Repository](https://github.com/TraxSharp/Trax) -Trax.Effect adds run records, dependency injection and storage providers to Trax trains, plus the portable state-machine engine. Its `ServiceTrain` runs the same chain as a [Trax.Core](https://github.com/TraxSharp/Trax/tree/main/Trax.Core) `Train`, resolves junctions from DI, and writes a metadata row for every run. Trax.Mediator, Trax.Scheduler and the layers above it all run trains through it. +Trax.Effect adds run records, dependency injection and storage providers to Trax trains. Its `ServiceTrain` runs the same chain as a [Trax.Core](https://github.com/TraxSharp/Trax/tree/main/Trax.Core) `Train`, resolves junctions from DI, and writes a metadata row for every run. Trax.Mediator, Trax.Scheduler and the layers above it all run trains through it. ## Install @@ -60,7 +60,8 @@ Trax is split into layers, one folder of this repository each. Take the ones you | Folder | What it adds | |---|---| | [Trax.Core](https://github.com/TraxSharp/Trax/tree/main/Trax.Core) | Trains, junctions and the chain, with no database and no DI container | -| **[Trax.Effect](https://github.com/TraxSharp/Trax/tree/main/Trax.Effect)** | **A recorded run for every execution (Postgres, SQLite or in memory), DI, effect providers, the state-machine engine** | +| **[Trax.Effect](https://github.com/TraxSharp/Trax/tree/main/Trax.Effect)** | **A recorded run for every execution (Postgres, SQLite or in memory), DI, effect providers** | +| [Trax.StateMachine](https://github.com/TraxSharp/Trax/tree/main/Trax.StateMachine) | State machines a page drives and the server applies, in C# and TypeScript, held to one conformance kit | | [Trax.Mediator](https://github.com/TraxSharp/Trax/tree/main/Trax.Mediator) | The train bus: run a train by handing over its input, with every chain checked at startup | | [Trax.Scheduler](https://github.com/TraxSharp/Trax/tree/main/Trax.Scheduler) | Cron and interval schedules, retries, dead letters, and workers on other machines or in Lambda | | [Trax.Api](https://github.com/TraxSharp/Trax/tree/main/Trax.Api) | GraphQL generated from your trains, with authentication, audit and typed clients, and the operations console your host serves | diff --git a/Trax.Effect/docs/adr/0002-framework-tables-are-migrated-domain-tables-are-bootstrapped.md b/Trax.Effect/docs/adr/0002-framework-tables-are-migrated-domain-tables-are-bootstrapped.md index cde3d4d3f..f8dad4c46 100644 --- a/Trax.Effect/docs/adr/0002-framework-tables-are-migrated-domain-tables-are-bootstrapped.md +++ b/Trax.Effect/docs/adr/0002-framework-tables-are-migrated-domain-tables-are-bootstrapped.md @@ -46,10 +46,11 @@ throwaway databases. What is not fine is a Trax table whose only creation path i ## Exemplars -- `MigrationSchemaTests` builds the state machine tables from the **shipped** migrations - (Postgres `040`, Sqlite `006`) and round-trips through the real stores, so a column added - to the model without a migration fails when the store queries a column that does not - exist. +**Enforced elsewhere:** `MigrationSchemaTests` in Trax.StateMachine +(`dotnet/tests/Trax.StateMachine.Persistence.Integration`) builds the state machine tables from the +**shipped** migrations (Postgres `040`, Sqlite `006`) and round-trips through the real stores, so a +column added to the model without a migration fails when the store queries a column that does not +exist. Not covered: @@ -69,7 +70,7 @@ Not covered: - **These suites require a live Postgres and fail without one rather than skipping.** In `tests/Trax.Effect.Tests.Integration` it is `UsePostgres` running the migrator at registration time inside `[OneTimeSetUp]`; in - `tests/Trax.StateMachine.Persistence.Integration` it is `PostgresSetup`, an + Trax.StateMachine's `dotnet/tests/Trax.StateMachine.Persistence.Integration` it is `PostgresSetup`, an assembly-wide `[SetUpFixture]` that opens a connection unconditionally, so even the Sqlite case fails when Postgres is absent. That contradicts `Trax.Docs/adr/0005-a-skipped-test-is-a-runtime-decision.md`, which binds this repo. The diff --git a/Trax.Effect/docs/adr/README.md b/Trax.Effect/docs/adr/README.md index c07f9958b..a0c6a4611 100644 --- a/Trax.Effect/docs/adr/README.md +++ b/Trax.Effect/docs/adr/README.md @@ -16,6 +16,9 @@ key, because the path already says it. Numbering is per directory, so `0001` exists in several folders. Cite one of these as `effect/0001`. +0013, 0017 and 0022 moved to `Trax.StateMachine/docs/adr/` as `statemachine/0001` to `0003` on +2026-10-20, with the state machines; their numbers here are not reused. + ## How they are checked The `adr-guard` job in `.github/workflows/ci.yml`, at the repository root, runs the guard against @@ -42,9 +45,9 @@ The format is `.claude/skills/recording-decisions/ADR-FORMAT.md`. | Area | ADRs | | --- | --- | | `auth` | [0004](./0004-trax-owns-the-authorization-vocabulary.md), [0008](./0008-per-user-data-is-filtered-by-its-owner.md), [0016](./0016-the-train-event-hub-carries-the-hosts-authorization.md) | -| `data-model` | [0002](./0002-framework-tables-are-migrated-domain-tables-are-bootstrapped.md), [0003](./0003-a-model-and-its-persistent-mapping-are-a-pair.md), [0005](./0005-a-trains-outcome-is-recorded-on-an-uncancellable-token.md), [0006](./0006-a-closed-vocabulary-is-a-postgres-enum.md), [0007](./0007-cancelled-staged-entries-are-deleted-after-a-retention.md), [0008](./0008-per-user-data-is-filtered-by-its-owner.md), [0010](./0010-a-sensitive-field-is-marked-and-masked-where-it-is-written.md), [0013](./0013-a-request-id-replays-only-the-request-it-recorded.md), [0015](./0015-every-trax-timestamp-is-timestamptz.md), [0017](./0017-only-the-effect-runner-reaches-a-committed-state.md), [0018](./0018-a-disabled-manifest-holds-its-queued-work-except-an-explicit-trigger.md), [0019](./0019-junction-events-are-opt-in-and-carry-no-run-data.md), [0020](./0020-a-recorded-answer-replays-only-while-it-is-fresh.md), [0021](./0021-a-runs-tracked-writes-commit-once-when-it-finishes.md), [0022](./0022-a-machine-instance-history-is-written-with-its-snapshot.md) | +| `data-model` | [0002](./0002-framework-tables-are-migrated-domain-tables-are-bootstrapped.md), [0003](./0003-a-model-and-its-persistent-mapping-are-a-pair.md), [0005](./0005-a-trains-outcome-is-recorded-on-an-uncancellable-token.md), [0006](./0006-a-closed-vocabulary-is-a-postgres-enum.md), [0007](./0007-cancelled-staged-entries-are-deleted-after-a-retention.md), [0008](./0008-per-user-data-is-filtered-by-its-owner.md), [0010](./0010-a-sensitive-field-is-marked-and-masked-where-it-is-written.md), [0015](./0015-every-trax-timestamp-is-timestamptz.md), [0018](./0018-a-disabled-manifest-holds-its-queued-work-except-an-explicit-trigger.md), [0019](./0019-junction-events-are-opt-in-and-carry-no-run-data.md), [0020](./0020-a-recorded-answer-replays-only-while-it-is-fresh.md), [0021](./0021-a-runs-tracked-writes-commit-once-when-it-finishes.md) | | `migrations` | [0001](./0001-schema-changes-are-hand-written-sql.md), [0002](./0002-framework-tables-are-migrated-domain-tables-are-bootstrapped.md), [0006](./0006-a-closed-vocabulary-is-a-postgres-enum.md), [0014](./0014-postgres-migrations-are-serialized-and-rerunnable.md), [0015](./0015-every-trax-timestamp-is-timestamptz.md) | -| `platform` | [0004](./0004-trax-owns-the-authorization-vocabulary.md), [0005](./0005-a-trains-outcome-is-recorded-on-an-uncancellable-token.md), [0007](./0007-cancelled-staged-entries-are-deleted-after-a-retention.md), [0009](./0009-a-service-train-does-its-work-in-junctions.md), [0010](./0010-a-sensitive-field-is-marked-and-masked-where-it-is-written.md), [0011](./0011-a-service-train-instance-is-one-run.md), [0012](./0012-the-signalr-sink-queues-events-and-drops-when-clients-fall-behind.md), [0013](./0013-a-request-id-replays-only-the-request-it-recorded.md), [0016](./0016-the-train-event-hub-carries-the-hosts-authorization.md), [0017](./0017-only-the-effect-runner-reaches-a-committed-state.md), [0018](./0018-a-disabled-manifest-holds-its-queued-work-except-an-explicit-trigger.md), [0019](./0019-junction-events-are-opt-in-and-carry-no-run-data.md), [0020](./0020-a-recorded-answer-replays-only-while-it-is-fresh.md), [0021](./0021-a-runs-tracked-writes-commit-once-when-it-finishes.md), [0022](./0022-a-machine-instance-history-is-written-with-its-snapshot.md) | +| `platform` | [0004](./0004-trax-owns-the-authorization-vocabulary.md), [0005](./0005-a-trains-outcome-is-recorded-on-an-uncancellable-token.md), [0007](./0007-cancelled-staged-entries-are-deleted-after-a-retention.md), [0009](./0009-a-service-train-does-its-work-in-junctions.md), [0010](./0010-a-sensitive-field-is-marked-and-masked-where-it-is-written.md), [0011](./0011-a-service-train-instance-is-one-run.md), [0012](./0012-the-signalr-sink-queues-events-and-drops-when-clients-fall-behind.md), [0016](./0016-the-train-event-hub-carries-the-hosts-authorization.md), [0018](./0018-a-disabled-manifest-holds-its-queued-work-except-an-explicit-trigger.md), [0019](./0019-junction-events-are-opt-in-and-carry-no-run-data.md), [0020](./0020-a-recorded-answer-replays-only-while-it-is-fresh.md), [0021](./0021-a-runs-tracked-writes-commit-once-when-it-finishes.md) | | `providers` | [0001](./0001-schema-changes-are-hand-written-sql.md), [0006](./0006-a-closed-vocabulary-is-a-postgres-enum.md), [0014](./0014-postgres-migrations-are-serialized-and-rerunnable.md) | ## All of them @@ -63,13 +66,10 @@ The format is `.claude/skills/recording-decisions/ADR-FORMAT.md`. | [0010](./0010-a-sensitive-field-is-marked-and-masked-where-it-is-written.md) | A sensitive field is marked, and masked where its copy is written | platform, data-model | | [0011](./0011-a-service-train-instance-is-one-run.md) | A service train instance is one run at a time, and is never a singleton | platform | | [0012](./0012-the-signalr-sink-queues-events-and-drops-when-clients-fall-behind.md) | The SignalR sink queues events, and drops them when clients fall behind | platform | -| [0013](./0013-a-request-id-replays-only-the-request-it-recorded.md) | A request id replays only the request it recorded | platform, data-model | | [0014](./0014-postgres-migrations-are-serialized-and-rerunnable.md) | Postgres migrations are serialized across hosts and every script can run again | migrations, providers | | [0015](./0015-every-trax-timestamp-is-timestamptz.md) | Every Trax timestamp is timestamptz, and the migrator's session is UTC | migrations, data-model | | [0016](./0016-the-train-event-hub-carries-the-hosts-authorization.md) | The train-event hub carries the host's authorization | auth, platform | -| [0017](./0017-only-the-effect-runner-reaches-a-committed-state.md) | Only the effect runner puts a draft into a committed state or an effect's target | platform, data-model | | [0018](./0018-a-disabled-manifest-holds-its-queued-work-except-an-explicit-trigger.md) | A disabled manifest holds its queued work, except a run someone asked for by name | data-model, platform | | [0019](./0019-junction-events-are-opt-in-and-carry-no-run-data.md) | Junction events are opt-in, carry no run data, and are kept as long as their run | platform, data-model | | [0020](./0020-a-recorded-answer-replays-only-while-it-is-fresh.md) | A recorded answer replays only into the same state, and only while it is fresh | platform, data-model | | [0021](./0021-a-runs-tracked-writes-commit-once-when-it-finishes.md) | A run's tracked writes commit once, when it finishes | platform, data-model | -| [0022](./0022-a-machine-instance-history-is-written-with-its-snapshot.md) | A machine instance's history is written by the store, with its snapshot, and goes with the instance | data-model, platform | diff --git a/Trax.Effect/src/Trax.Effect/Models/SnapshotTransition/SnapshotTransition.cs b/Trax.Effect/src/Trax.Effect/Models/SnapshotTransition/SnapshotTransition.cs index 003f3e9f8..e59494a8d 100644 --- a/Trax.Effect/src/Trax.Effect/Models/SnapshotTransition/SnapshotTransition.cs +++ b/Trax.Effect/src/Trax.Effect/Models/SnapshotTransition/SnapshotTransition.cs @@ -18,7 +18,7 @@ namespace Trax.Effect.Models.SnapshotTransition; /// /// EF Core mapping lives in Trax.Effect.Data.Models.SnapshotTransition.PersistentSnapshotTransition; the table /// ships in the core migration set (Postgres 087, Sqlite 046). See -/// Trax.Effect/docs/adr/0022-a-machine-instance-history-is-written-with-its-snapshot.md. +/// Trax.StateMachine/docs/adr/0003-a-machine-instance-history-is-written-with-its-snapshot.md. /// public class SnapshotTransition { diff --git a/Trax.Mediator/README.md b/Trax.Mediator/README.md index 844c56a4a..5d922a797 100644 --- a/Trax.Mediator/README.md +++ b/Trax.Mediator/README.md @@ -51,7 +51,8 @@ Trax is split into layers, one folder of this repository each. Take the ones you | Folder | What it adds | |---|---| | [Trax.Core](https://github.com/TraxSharp/Trax/tree/main/Trax.Core) | Trains, junctions and the chain, with no database and no DI container | -| [Trax.Effect](https://github.com/TraxSharp/Trax/tree/main/Trax.Effect) | A recorded run for every execution (Postgres, SQLite or in memory), DI, effect providers, the state-machine engine | +| [Trax.Effect](https://github.com/TraxSharp/Trax/tree/main/Trax.Effect) | A recorded run for every execution (Postgres, SQLite or in memory), DI, effect providers | +| [Trax.StateMachine](https://github.com/TraxSharp/Trax/tree/main/Trax.StateMachine) | State machines a page drives and the server applies, in C# and TypeScript, held to one conformance kit | | **[Trax.Mediator](https://github.com/TraxSharp/Trax/tree/main/Trax.Mediator)** | **The train bus: run a train by handing over its input, with every chain checked at startup** | | [Trax.Scheduler](https://github.com/TraxSharp/Trax/tree/main/Trax.Scheduler) | Cron and interval schedules, retries, dead letters, and workers on other machines or in Lambda | | [Trax.Api](https://github.com/TraxSharp/Trax/tree/main/Trax.Api) | GraphQL generated from your trains, with authentication, audit and typed clients, and the operations console your host serves | diff --git a/Trax.Samples/README.md b/Trax.Samples/README.md index 90a0cb83d..d588034a4 100644 --- a/Trax.Samples/README.md +++ b/Trax.Samples/README.md @@ -114,7 +114,8 @@ Trax is split into layers, one folder of this repository each. Take the ones you | Folder | What it adds | |---|---| | [Trax.Core](https://github.com/TraxSharp/Trax/tree/main/Trax.Core) | Trains, junctions and the chain, with no database and no DI container | -| [Trax.Effect](https://github.com/TraxSharp/Trax/tree/main/Trax.Effect) | A recorded run for every execution (Postgres, SQLite or in memory), DI, effect providers, the state-machine engine | +| [Trax.Effect](https://github.com/TraxSharp/Trax/tree/main/Trax.Effect) | A recorded run for every execution (Postgres, SQLite or in memory), DI, effect providers | +| [Trax.StateMachine](https://github.com/TraxSharp/Trax/tree/main/Trax.StateMachine) | State machines a page drives and the server applies, in C# and TypeScript, held to one conformance kit | | [Trax.Mediator](https://github.com/TraxSharp/Trax/tree/main/Trax.Mediator) | The train bus: run a train by handing over its input, with every chain checked at startup | | [Trax.Scheduler](https://github.com/TraxSharp/Trax/tree/main/Trax.Scheduler) | Cron and interval schedules, retries, dead letters, and workers on other machines or in Lambda | | [Trax.Api](https://github.com/TraxSharp/Trax/tree/main/Trax.Api) | GraphQL generated from your trains, with authentication, audit and typed clients, and the operations console your host serves | diff --git a/Trax.Scheduler/README.md b/Trax.Scheduler/README.md index 70ab2067f..8dc8b00e7 100644 --- a/Trax.Scheduler/README.md +++ b/Trax.Scheduler/README.md @@ -46,7 +46,8 @@ Trax is split into layers, one folder of this repository each. Take the ones you | Folder | What it adds | |---|---| | [Trax.Core](https://github.com/TraxSharp/Trax/tree/main/Trax.Core) | Trains, junctions and the chain, with no database and no DI container | -| [Trax.Effect](https://github.com/TraxSharp/Trax/tree/main/Trax.Effect) | A recorded run for every execution (Postgres, SQLite or in memory), DI, effect providers, the state-machine engine | +| [Trax.Effect](https://github.com/TraxSharp/Trax/tree/main/Trax.Effect) | A recorded run for every execution (Postgres, SQLite or in memory), DI, effect providers | +| [Trax.StateMachine](https://github.com/TraxSharp/Trax/tree/main/Trax.StateMachine) | State machines a page drives and the server applies, in C# and TypeScript, held to one conformance kit | | [Trax.Mediator](https://github.com/TraxSharp/Trax/tree/main/Trax.Mediator) | The train bus: run a train by handing over its input, with every chain checked at startup | | **[Trax.Scheduler](https://github.com/TraxSharp/Trax/tree/main/Trax.Scheduler)** | **Cron and interval schedules, retries, dead letters, and workers on other machines or in Lambda** | | [Trax.Api](https://github.com/TraxSharp/Trax/tree/main/Trax.Api) | GraphQL generated from your trains, with authentication, audit and typed clients, and the operations console your host serves | diff --git a/Trax.StateMachine/AGENTS.md b/Trax.StateMachine/AGENTS.md new file mode 100644 index 000000000..a5be1e117 --- /dev/null +++ b/Trax.StateMachine/AGENTS.md @@ -0,0 +1,117 @@ +# Trax.StateMachine + +The state machines, in every language they ship in: the C# engine and its persistence +(`Trax.StateMachine`, `.Persistence`, `.Testing` on NuGet), the TypeScript engine and client +(`@traxsharp/state-machine` on npm), and the conformance kit that holds the two to the same +answers. It sits between `Trax.Effect`, whose trains a machine invokes and whose tables it is +stored in, and `Trax.Mediator`, which launches those trains, so a change here reaches Trax.Mediator, +Trax.Scheduler, Trax.Api, Trax.Cli and Trax.Samples. Trax.Effect is upstream and never sees it. + +This file is the entry point. It routes; it does not restate the rules. + +## Layout + +The folder is laid out by language, with what spans the languages at its root. + +| Path | What it holds | +| --- | --- | +| `dotnet/` | The C# engine. A .NET folder like any other: `Trax.StateMachine.slnx`, `Directory.Build.props`, `.config/dotnet-tools.json`, the NuGet `README.md`, `src/` and `tests/` (with `Trax.StateMachine.Tests.Meta`). | +| `ts/` | `@traxsharp/state-machine`: the engine (`src/`), the client a page drives a served machine through (`src/client/`, `src/server/`, `src/react.ts`), and the node entrypoints `trax machine` shells out to (`tools/`), which `tools/bundle-cli.mjs` bundles into Trax.Cli's package. | +| `conformance/` | Engine-neutral data any engine replays: the shared machines (`machines//`, each machine's IR, fixtures, differential corpus and migration golden), the IR's JSON Schema (`ir.schema.json`, normative), the canonical-wire vectors, the refusal-code registry, the strict-input cases, and the runner (`run.mjs`, `kit.mjs`) that sends all of it to one engine over the protocol in `PROTOCOL.md`. A vector goes here, not in one engine's tests. | +| `docs/adr/` | This folder's decisions, for every language. | + +Another language's engine gets a directory of its own beside `dotnet/` and `ts/`, and joins the kit by +implementing a testee for `conformance/run.mjs`. + +## Architecture decisions + +`docs/adr/` records **why** things are the way they are. Read the relevant one before proposing to +change a rule, and if your work contradicts one, say so rather than silently overriding it. + +| Working on | Read first | +| --- | --- | +| a state-machine draft's `requestId` replay, or `ISnapshotStore.UpdateWithRequest` | [0001](./docs/adr/0001-a-request-id-replays-only-the-request-it-recorded.md), an id replays only for the request it recorded, wherever the draft is now | +| what a state-machine draft's autosave or advance may write, what the effect runner commits or replays and when a reset releases its claim, `effect_claim.content_fingerprint`, `RunsOnce`, or `Committed()` | [0002](./docs/adr/0002-only-the-effect-runner-reaches-a-committed-state.md), only the effect runner puts a draft into a committed state or an effect's target | +| `trax.snapshot_transition`, `IDataContext.SnapshotTransitions`, or a new path that writes a state-machine snapshot | [0003](./docs/adr/0003-a-machine-instance-history-is-written-with-its-snapshot.md), every snapshot write through the store adds one history row in its transaction, and the history goes with the instance | +| a state that invokes a train, or where its outcome goes | central `docs/0046`, only the entry that started the run receives its outcome | +| what a client may send, or what the TypeScript twin may decide | central `docs/0048`, a machine is served as a typed API and the server applies every transition; a wrong prediction is a UX bug, not a correctness one | +| a state that spawns a child machine | central `docs/0052`, a child is spawned the way a train is invoked | + +The tables the machines are stored in (`SnapshotDraft`, `EffectClaim`, their `Persistent*` pairs and +migrations 040 to 076) stay in Trax.Effect, with every other table (effect `0003`, central `0036`). +A schema change for a machine is a Trax.Effect change. + +Decisions binding more than one folder live in the central corpus at `Trax.Docs/adr/`; the ones +tagged `statemachine` bind this folder. + +## The rules, and where they are written + +- **C# is the source of truth.** A machine is declared in C# and exported as an IR; the TypeScript + engine interprets the IR's declarative guards and reducers rather than generating logic. A custom + rule is bound by name and has no handler there, so the twin defers to the server on it. See + [the codegen pipeline](https://traxsharp.net/docs/statemachine/codegen-pipeline) and + [the IR format](https://traxsharp.net/docs/sdk-reference/statemachine-api/ir-format). +- **The engines agree case for case.** The differential corpus under `conformance/machines//` is + enumerated by the TypeScript engine and replayed by the C# one, and the conformance runner sends + the whole kit to each engine. Only result codes and wire bytes are contract; messages may differ. + The wire is canonical JSON (RFC 8785) in both + ([canonical wire](https://traxsharp.net/docs/statemachine/canonical-wire)). +- **Every operation is total.** The engines and the clients answer a refusal or a transport failure + as a value (`problem`, `TRANSPORT_ERROR`), never by throwing. +- **Generated files are never edited.** They carry an `AUTO-GENERATED` banner; regeneration and the + drift check share one code path. +- **The public surfaces are committed baselines.** The C# packages' are in + `dotnet/tests/Trax.StateMachine.Tests.Meta/PublicApi/`; the npm package's exports are in + `ts/src/exports.test.ts`, and each one is documented on + [the TypeScript package reference](https://traxsharp.net/docs/sdk-reference/statemachine-api/typescript-package). + Adding or removing an export changes both in the same pull request. + +## Guards + +`dotnet/tests/Trax.StateMachine.Tests.Meta/` holds the convention guards every .NET folder runs, +among them `DependencyDirectionTests`: a machine project may reference Trax.Core and Trax.Effect, +never the mediator or anything below it, and no Effect project may reference a machine project. +The census is on, as in every folder. + +A C# test that runs or reads the TypeScript engine is marked `[Category(Categories.CrossEngine)]`. +CI runs those apart from the rest (below), so mark any new one, or a change to the TypeScript engine +alone will not run it. + +## Running the tests + +The C# engine, from `dotnet/`. The persistence suites need Postgres; `Trax.Effect`'s compose file +provides it (`docker compose -f ../../Trax.Effect/docker-compose.yml up -d`). The cross-engine tests +need node and the TypeScript engine's packages. + +```bash +dotnet test +``` + +The TypeScript engine, from `ts/`: + +```bash +npm ci --ignore-scripts +npm test # vitest: conformance, totality, serialization, migration, codegen drift +npm run typecheck +``` + +The conformance kit through the TypeScript engine, from this folder (the C# engine answers it in +`ConformanceRunnerTests`): + +```bash +node conformance/run.mjs --testee node ts/tools/conformance/testee-ts.mjs +``` + +## CI + +This folder has no folder job. `.github/ci/packages.json` gives it three suites, each with its own +paths, so a change to one language does not rebuild the other: + +| Suite | Runs for | Does | +| --- | --- | --- | +| `state-machine-dotnet` | `dotnet/`, `conformance/`, or Trax.Effect | the folder job's checks over `dotnet/Trax.StateMachine.slnx` (format, locks, deprecations, pack with package validation, coverage) and its tests, without the CrossEngine ones | +| `state-machine-ts` | `ts/`, `conformance/` | typecheck, vitest, build, `npm pack --dry-run`, audit | +| `state-machine-conformance` | anything in the folder, or Trax.Effect | the CrossEngine tests, then the kit through the TypeScript engine | + +Trax.Mediator and Trax.Cli list this folder upstream, so a change here also runs them and the +folders below them. diff --git a/Trax.StateMachine/README.md b/Trax.StateMachine/README.md new file mode 100644 index 000000000..7e93268af --- /dev/null +++ b/Trax.StateMachine/README.md @@ -0,0 +1,25 @@ +# Trax.StateMachine + +> Part of [Trax .NET](https://github.com/TraxSharp): business logic you can call, schedule, or serve as an API, with every +> run recorded in your Postgres. [Docs](https://traxsharp.net/docs) · [Getting started](https://traxsharp.net/docs/getting-started) · [Repository](https://github.com/TraxSharp/Trax) + +State machines a page drives and the server applies. A machine is declared once in C#; the server runs it, and a +browser runs the same rules to show what an event will do before the server answers. Each language has a directory +of its own: + +| Directory | What it is | Package | +| --- | --- | --- | +| [dotnet](dotnet) | The C# engine, its persistence and its test helpers | `Trax.StateMachine`, `Trax.StateMachine.Persistence`, `Trax.StateMachine.Testing` on NuGet | +| [ts](ts) | The TypeScript engine, and the client a page drives a served machine through | `@traxsharp/state-machine` on npm | +| [conformance](conformance) | The cases every engine must answer the same way, and the runner that sends them | not published | + +Docs are at [traxsharp.net/docs/statemachine](https://traxsharp.net/docs/statemachine). + +## Contributing + +Read [AGENTS.md](AGENTS.md) before changing code. Report vulnerabilities privately as described in +[SECURITY.md](SECURITY.md). + +## License + +MIT. There is no commercial edition, and there will not be one. diff --git a/Trax.Effect/docs/adr/0013-a-request-id-replays-only-the-request-it-recorded.md b/Trax.StateMachine/docs/adr/0001-a-request-id-replays-only-the-request-it-recorded.md similarity index 97% rename from Trax.Effect/docs/adr/0013-a-request-id-replays-only-the-request-it-recorded.md rename to Trax.StateMachine/docs/adr/0001-a-request-id-replays-only-the-request-it-recorded.md index 0fb37e22a..3ac6fc8fa 100644 --- a/Trax.Effect/docs/adr/0013-a-request-id-replays-only-the-request-it-recorded.md +++ b/Trax.StateMachine/docs/adr/0001-a-request-id-replays-only-the-request-it-recorded.md @@ -55,6 +55,7 @@ again. That is the single-slot design this refines, not something it changes. ## Changelog +- **2026-10-20**: Moved from `effect/0013` when the state machines got a folder of their own; the decision did not change. - **2026-10-12**: A send whose request id the ring holds replays its recorded result wherever the draft is now, before the state checks and before the effect is claimed, as an advance does; the replay carries the row's due time only while the row is still at the recorded revision. The ring keeps up to sixteen requests and at most 128 KiB diff --git a/Trax.Effect/docs/adr/0017-only-the-effect-runner-reaches-a-committed-state.md b/Trax.StateMachine/docs/adr/0002-only-the-effect-runner-reaches-a-committed-state.md similarity index 98% rename from Trax.Effect/docs/adr/0017-only-the-effect-runner-reaches-a-committed-state.md rename to Trax.StateMachine/docs/adr/0002-only-the-effect-runner-reaches-a-committed-state.md index 47f29aab5..a99b2d334 100644 --- a/Trax.Effect/docs/adr/0017-only-the-effect-runner-reaches-a-committed-state.md +++ b/Trax.StateMachine/docs/adr/0002-only-the-effect-runner-reaches-a-committed-state.md @@ -103,6 +103,7 @@ builder, is not checked for a second edge into its effect's target. ## Changelog +- **2026-10-20**: Moved from `effect/0017` when the state machines got a folder of their own; the decision did not change. - **2026-10-13**: Amended with central 0048. The effect is pending on the draft's row, and every other write to the draft is refused until the receipt and the move are written together; past its lease the effect is run again under its key. The token check, the content fingerprint, `draft-changed` and a reset's release of settled claims are diff --git a/Trax.Effect/docs/adr/0022-a-machine-instance-history-is-written-with-its-snapshot.md b/Trax.StateMachine/docs/adr/0003-a-machine-instance-history-is-written-with-its-snapshot.md similarity index 97% rename from Trax.Effect/docs/adr/0022-a-machine-instance-history-is-written-with-its-snapshot.md rename to Trax.StateMachine/docs/adr/0003-a-machine-instance-history-is-written-with-its-snapshot.md index 6616a0ae3..6cc7a5a45 100644 --- a/Trax.Effect/docs/adr/0022-a-machine-instance-history-is-written-with-its-snapshot.md +++ b/Trax.StateMachine/docs/adr/0003-a-machine-instance-history-is-written-with-its-snapshot.md @@ -77,4 +77,5 @@ without its history row; a reviewer has to catch that. ## Changelog +- **2026-10-20**: Moved from `effect/0022` when the state machines got a folder of their own; the decision did not change. - **2026-10-19**: Recorded. diff --git a/Trax.StateMachine/docs/adr/README.md b/Trax.StateMachine/docs/adr/README.md new file mode 100644 index 000000000..aa20d1e1e --- /dev/null +++ b/Trax.StateMachine/docs/adr/README.md @@ -0,0 +1,52 @@ +# Decisions + +Why a thing in `Trax.StateMachine` is the way it is, which alternatives were weighed, and what +each cost. A documentation page tells you what the rule *is*; an ADR tells you whether it +is a deliberate constraint or an accident, so you can tell which ones are safe to change. + +Read the relevant one before proposing to change a rule. If your work contradicts one, say +so rather than silently overriding it. + +## Scope + +**These bind `Trax.StateMachine` only**, in every language it holds. A decision binding more than +one Trax folder lives in the central corpus, at `Trax.Docs/adr/`, and declares which folders must +obey it; the machines' central ones are 0046 to 0048. These omit that key, because the path +already says it. + +Numbering is per directory, so `0001` exists in several folders. Cite one of these as +`statemachine/0001`. 0001 to 0003 were `effect/0013`, `effect/0017` and `effect/0022` until the +machines left Trax.Effect on 2026-10-20. + +## How they are checked + +The `adr-guard` job in `.github/workflows/ci.yml`, at the repository root, runs the guard against +this directory on every pull request that touches this folder or a folder upstream of it. The +guard is built from `Trax.Docs/tools/Trax.Adr.Guard` in the same checkout. To run the same check +locally, from this folder, pass the flags the job passes (`.github/ci/packages.json`), or the +census is not checked at all: + +```bash +dotnet run --project ../Trax.Docs/tools/Trax.Adr.Guard -- \ + --repo . \ + --test-roots dotnet/tests \ + --known-areas platform,data-model,testing,auth \ + --census-root dotnet/tests/Trax.StateMachine.Tests.Meta +``` + +The format is `.claude/skills/recording-decisions/ADR-FORMAT.md`. + +## By area + +| Area | ADRs | +| --- | --- | +| `data-model` | [0001](./0001-a-request-id-replays-only-the-request-it-recorded.md), [0002](./0002-only-the-effect-runner-reaches-a-committed-state.md), [0003](./0003-a-machine-instance-history-is-written-with-its-snapshot.md) | +| `platform` | [0001](./0001-a-request-id-replays-only-the-request-it-recorded.md), [0002](./0002-only-the-effect-runner-reaches-a-committed-state.md), [0003](./0003-a-machine-instance-history-is-written-with-its-snapshot.md) | + +## All of them + +| # | Decision | Areas | +| --- | --- | --- | +| [0001](./0001-a-request-id-replays-only-the-request-it-recorded.md) | A request id replays only the request it recorded | platform, data-model | +| [0002](./0002-only-the-effect-runner-reaches-a-committed-state.md) | Only the effect runner puts a draft into a committed state or an effect's target | platform, data-model | +| [0003](./0003-a-machine-instance-history-is-written-with-its-snapshot.md) | A machine instance's history is written by the store, with its snapshot, and goes with the instance | data-model, platform | diff --git a/Trax.StateMachine/dotnet/README.md b/Trax.StateMachine/dotnet/README.md index bf8543ac4..77188b2e0 100644 --- a/Trax.StateMachine/dotnet/README.md +++ b/Trax.StateMachine/dotnet/README.md @@ -55,10 +55,20 @@ The server runs `ICharge` once per send and fires `Pay` with its receipt. A clie ## Where this fits -This folder sits between Trax.Effect, whose trains a machine invokes and whose tables it is stored in, and -Trax.Mediator, which launches those trains. It holds the C# engine (`dotnet/`), the TypeScript engine (`ts/`) and the -conformance kit both are checked against (`conformance/`). Docs are at -[traxsharp.net/docs/statemachine](https://traxsharp.net/docs/statemachine). +Trax is split into layers, one folder of this repository each. Take the ones you need; the trains you wrote do not change. **You are here: Trax.StateMachine.** + +| Folder | What it adds | +|---|---| +| [Trax.Core](https://github.com/TraxSharp/Trax/tree/main/Trax.Core) | Trains, junctions and the chain, with no database and no DI container | +| [Trax.Effect](https://github.com/TraxSharp/Trax/tree/main/Trax.Effect) | A recorded run for every execution (Postgres, SQLite or in memory), DI, effect providers | +| **[Trax.StateMachine](https://github.com/TraxSharp/Trax/tree/main/Trax.StateMachine)** | **State machines a page drives and the server applies, in C# and TypeScript, held to one conformance kit** | +| [Trax.Mediator](https://github.com/TraxSharp/Trax/tree/main/Trax.Mediator) | The train bus: run a train by handing over its input, with every chain checked at startup | +| [Trax.Scheduler](https://github.com/TraxSharp/Trax/tree/main/Trax.Scheduler) | Cron and interval schedules, retries, dead letters, and workers on other machines or in Lambda | +| [Trax.Api](https://github.com/TraxSharp/Trax/tree/main/Trax.Api) | GraphQL generated from your trains, with authentication, audit and typed clients, and the operations console your host serves | +| [Trax.Cli](https://github.com/TraxSharp/Trax/tree/main/Trax.Cli) | The `trax` tool: scaffold a hub and trains from an OpenAPI or GraphQL schema, and state-machine codegen | +| [Trax.Samples](https://github.com/TraxSharp/Trax/tree/main/Trax.Samples) | Complete sample apps, and the `trax-api`, `trax-scheduler` and `trax-hub` templates | + +Docs live in [Trax.Docs](https://github.com/TraxSharp/Trax/tree/main/Trax.Docs) and are published at [traxsharp.net/docs](https://traxsharp.net/docs). ## Contributing diff --git a/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/EfSnapshotStore.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/EfSnapshotStore.cs index 4da90d1fa..a56247922 100644 --- a/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/EfSnapshotStore.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/EfSnapshotStore.cs @@ -27,7 +27,7 @@ namespace Trax.StateMachine.Persistence; /// store's own. A write that leaves the snapshot alone writes none. The history row is saved through the data context, /// so a change host code tracked on the same context and has not saved yet is saved with it, as it is by /// and . See -/// Trax.Effect/docs/adr/0022-a-machine-instance-history-is-written-with-its-snapshot.md. +/// Trax.StateMachine/docs/adr/0003-a-machine-instance-history-is-written-with-its-snapshot.md. /// /// The data context the table is reached through. /// diff --git a/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/TransitionNote.cs b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/TransitionNote.cs index 907134c85..c3664a881 100644 --- a/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/TransitionNote.cs +++ b/Trax.StateMachine/dotnet/src/Trax.StateMachine.Persistence/TransitionNote.cs @@ -5,7 +5,7 @@ namespace Trax.StateMachine.Persistence; /// /// What the store records in an instance's history for one snapshot write: what wrote it, the command that moved it, /// and who made it. The states, the revision and the time come from the write itself. See -/// Trax.Effect/docs/adr/0022-a-machine-instance-history-is-written-with-its-snapshot.md. +/// Trax.StateMachine/docs/adr/0003-a-machine-instance-history-is-written-with-its-snapshot.md. /// /// What wrote it. /// The command, or null when none moved it. diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DraftWriteRulesTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DraftWriteRulesTests.cs index fa9eac9f9..ecb7f03e7 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DraftWriteRulesTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/DraftWriteRulesTests.cs @@ -99,14 +99,14 @@ public static string Json(LedgerState state, params int[] entries) => /// refuses to create or move a draft into a committed state, to rewrite one there, or to overwrite a stored draft it /// cannot read. /// -/// Enforces docs/adr/0017-only-the-effect-runner-reaches-a-committed-state.md. +/// Enforces docs/adr/0002-only-the-effect-runner-reaches-a-committed-state.md. /// -[Property("adr", "docs/adr/0017-only-the-effect-runner-reaches-a-committed-state.md")] +[Property("adr", "docs/adr/0002-only-the-effect-runner-reaches-a-committed-state.md")] public class DraftWriteRulesTests { private const string Adr = "only the effect runner puts a draft into a committed state or an effect's target. See " - + "docs/adr/0017-only-the-effect-runner-reaches-a-committed-state.md"; + + "docs/adr/0002-only-the-effect-runner-reaches-a-committed-state.md"; private static ISnapshotDraftService Orders() => new OrderMachine().CreateService(TestDb.NewStore(), TestDb.NewClaims()); diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EffectCommitIntegrityTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EffectCommitIntegrityTests.cs index 5dde7d197..821b65260 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EffectCommitIntegrityTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EffectCommitIntegrityTests.cs @@ -13,14 +13,14 @@ namespace Trax.StateMachine.Persistence.Integration; /// the effect runs, or when the effect ends in a cancellation: the receipt is recorded only on the content the /// effect ran on, and an effect that may have happened never runs a second time. /// -/// Enforces docs/adr/0017-only-the-effect-runner-reaches-a-committed-state.md. +/// Enforces docs/adr/0002-only-the-effect-runner-reaches-a-committed-state.md. /// -[Property("adr", "docs/adr/0017-only-the-effect-runner-reaches-a-committed-state.md")] +[Property("adr", "docs/adr/0002-only-the-effect-runner-reaches-a-committed-state.md")] public class EffectCommitIntegrityTests { private const string Adr = "the effect's receipt is recorded only on the draft the effect ran on, and an effect that may have " - + "happened never runs again. See docs/adr/0017-only-the-effect-runner-reaches-a-committed-state.md"; + + "happened never runs again. See docs/adr/0002-only-the-effect-runner-reaches-a-committed-state.md"; private const string User = "u"; diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EffectPendingTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EffectPendingTests.cs index c780b429e..eef9c3642 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EffectPendingTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/EffectPendingTests.cs @@ -14,20 +14,20 @@ namespace Trax.StateMachine.Persistence.Integration; /// An effect is pending on its instance's row: sending an effect-bound event marks the row, every other write to it /// is refused as EFFECT_IN_PROGRESS or waits while the mark is there, and the effect's receipt, the move to its /// target and the end of the mark are one write. Past its lease the mark is taken over, by the next send or by the -/// reconciler, and the effect run again under the same key. Pins docs/adr/0017-only-the-effect-runner-reaches-a-committed-state.md +/// reconciler, and the effect run again under the same key. Pins docs/adr/0002-only-the-effect-runner-reaches-a-committed-state.md /// as well: nothing but the effect runner writes a draft between its effect and its record. /// [TestFixture(StoreProvider.Postgres)] [TestFixture(StoreProvider.Sqlite)] [Property("adr", Adr)] -[Property("adr", "docs/adr/0017-only-the-effect-runner-reaches-a-committed-state.md")] +[Property("adr", "docs/adr/0002-only-the-effect-runner-reaches-a-committed-state.md")] public class EffectPendingTests(StoreProvider provider) { private const string Adr = "Trax.Docs/adr/0048-a-machine-is-served-as-a-typed-api-and-the-server-applies-every-transition.md"; private const string OnlyTheRunner = - "docs/adr/0017-only-the-effect-runner-reaches-a-committed-state.md"; + "docs/adr/0002-only-the-effect-runner-reaches-a-committed-state.md"; private const string Machine = PendingPayMachine.Id; diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MigrationSchemaTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MigrationSchemaTests.cs index c5d792530..2eeb32d0a 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MigrationSchemaTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/MigrationSchemaTests.cs @@ -289,7 +289,7 @@ await With( .Be( new CompletedEffect("rcpt-2", fingerprint), "the claim keeps the fingerprint of the content its effect ran on. See " - + "docs/adr/0017-only-the-effect-runner-reaches-a-committed-state.md." + + "docs/adr/0002-only-the-effect-runner-reaches-a-committed-state.md." ); } diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RequestIdScopeTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RequestIdScopeTests.cs index 1bc33e5d3..81380a7c2 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RequestIdScopeTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/RequestIdScopeTests.cs @@ -11,12 +11,12 @@ namespace Trax.StateMachine.Persistence.Integration; /// A request id replays only the request it recorded: the same id and trigger, while the draft still shows /// that request's outcome. Anything else fires, or is refused as REQUEST_ID_REUSED. /// -/// Enforces docs/adr/0013-a-request-id-replays-only-the-request-it-recorded.md. +/// Enforces docs/adr/0001-a-request-id-replays-only-the-request-it-recorded.md. /// -[Property("adr", "docs/adr/0013-a-request-id-replays-only-the-request-it-recorded.md")] +[Property("adr", "docs/adr/0001-a-request-id-replays-only-the-request-it-recorded.md")] public class RequestIdScopeTests { - private const string Adr = "docs/adr/0013-a-request-id-replays-only-the-request-it-recorded.md"; + private const string Adr = "docs/adr/0001-a-request-id-replays-only-the-request-it-recorded.md"; private static readonly ISnapshotPrincipal User = new FakePrincipal("u"); diff --git a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TransitionHistoryTests.cs b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TransitionHistoryTests.cs index d33220148..e55a874ce 100644 --- a/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TransitionHistoryTests.cs +++ b/Trax.StateMachine/dotnet/tests/Trax.StateMachine.Persistence.Integration/TransitionHistoryTests.cs @@ -18,18 +18,18 @@ namespace Trax.StateMachine.Persistence.Integration; /// what wrote it, the command, who made it and the states it moved between, in the same transaction as the write. A /// write that leaves the snapshot alone, and a write that is refused or loses its race, adds none, and the history /// goes with the instance however it is removed. Each per-site test makes one write and reads the history that -/// changed. Enforces Trax.Effect/docs/adr/0022-a-machine-instance-history-is-written-with-its-snapshot.md. +/// changed. Enforces Trax.StateMachine/docs/adr/0003-a-machine-instance-history-is-written-with-its-snapshot.md. /// [TestFixture(StoreProvider.Postgres)] [TestFixture(StoreProvider.Sqlite)] [Property( "adr", - "Trax.Effect/docs/adr/0022-a-machine-instance-history-is-written-with-its-snapshot.md" + "Trax.StateMachine/docs/adr/0003-a-machine-instance-history-is-written-with-its-snapshot.md" )] public class TransitionHistoryTests(StoreProvider provider) { private const string Adr = - "Trax.Effect/docs/adr/0022-a-machine-instance-history-is-written-with-its-snapshot.md"; + "Trax.StateMachine/docs/adr/0003-a-machine-instance-history-is-written-with-its-snapshot.md"; private const string User = "history-user"; @@ -704,16 +704,16 @@ public async Task A_delete_by_host_code_removes_the_history_and_a_recreate_start /// /// The InMemory provider has no transaction and no foreign key, so the store writes the history and removes it with /// the instance itself. Enforces -/// Trax.Effect/docs/adr/0022-a-machine-instance-history-is-written-with-its-snapshot.md. +/// Trax.StateMachine/docs/adr/0003-a-machine-instance-history-is-written-with-its-snapshot.md. /// [Property( "adr", - "Trax.Effect/docs/adr/0022-a-machine-instance-history-is-written-with-its-snapshot.md" + "Trax.StateMachine/docs/adr/0003-a-machine-instance-history-is-written-with-its-snapshot.md" )] public class TransitionHistoryInMemoryTests { private const string Adr = - "Trax.Effect/docs/adr/0022-a-machine-instance-history-is-written-with-its-snapshot.md"; + "Trax.StateMachine/docs/adr/0003-a-machine-instance-history-is-written-with-its-snapshot.md"; private const string User = "history-user"; diff --git a/Trax.StateMachine/ts/AGENTS.md b/Trax.StateMachine/ts/AGENTS.md deleted file mode 100644 index 54523afb0..000000000 --- a/Trax.StateMachine/ts/AGENTS.md +++ /dev/null @@ -1,51 +0,0 @@ -# Trax.Api.StateMachine - -`@traxsharp/state-machine` on npm: the TypeScript twin of `Trax.StateMachine`, the client a page drives a -served machine through, and the generators `trax machine generate` runs. It is its own npm project, not a .NET -folder, and releases with every Trax release at the same version (`Trax.Docs/adr/0042`). - -This file is the entry point. It routes; it does not restate the rules. - -## Layout - -| Path | What it holds | -| --- | --- | -| `src/` | The engine (`SnapshotMachine`), the typed view (`typedMachineFromIr`), the in-memory stores (`MachineController`, `createFormView`) and the rule interpreter (`src/rules/`). Pure: no I/O. | -| `src/client/` | `@traxsharp/state-machine/client`: the executor over persisted documents, draft sessions, `createMachineServer` and `ServerMachineController`. | -| `src/server/`, `src/react.ts` | The server-authoritative controller, and `@traxsharp/state-machine/react` (`useServerMachine`, `useRememberedMachine`). | -| `src/rules/generateTypes.ts` | `generateContextTypes` and `generateMachineFactory`, which turn an IR into a twin. | -| `tools/` | The node entrypoints the `trax machine` commands shell out to (`generate-twin.mjs`, `generate-corpus.mjs`), and `bundle-cli.mjs`, which bundles them with the engine compiled in for Trax.Cli's package. | -| `tools/conformance/` | The conformance runner (`run.mjs`), which sends every case of `machines/` and `conformance/` to one engine over the testee protocol in `conformance/PROTOCOL.md`, the TypeScript testee, and the IR schema validator. | -| `machines/` | The shared fixtures both engines drive: each machine's IR, its generated twin and its differential corpus. | -| `conformance/` | Engine-neutral tables any engine replays: the IR's JSON Schema (`ir.schema.json`, normative), the canonical-wire vectors, the refusal-code registry, the strict-input cases (written from the CLR by the C# `StrictInputGoldenTests`). A vector goes here, not in one engine's tests. | -| `docs/design/` | The design notes the codegen was built from. Historical: the published docs are the rule. | - -## The rules, and where they are written - -- **C# is the source of truth.** A machine is declared in C# and exported as an IR; this package interprets the IR's - declarative guards and reducers rather than generating logic. A custom rule is bound by name and has no handler - here, so the twin defers to the server on it. See [the codegen pipeline](https://traxsharp.net/docs/statemachine/codegen-pipeline) - and [the IR format](https://traxsharp.net/docs/sdk-reference/statemachine-api/ir-format). -- **The two engines agree case for case.** The differential corpus under `machines//` is enumerated here - and replayed by the C# engine, and the conformance runner sends the whole kit to each engine, the C# one included; only result codes are contract, messages may differ. The wire is canonical JSON - (RFC 8785) in both ([canonical wire](https://traxsharp.net/docs/statemachine/canonical-wire)). -- **Every operation is total.** The engine and the clients answer a refusal or a transport failure as a value - (`problem`, `TRANSPORT_ERROR`), never by throwing. -- **The server applies every transition** (`Trax.Docs/adr/0048`): the twin only predicts, and the client sends only - persisted ids from the host's manifest. -- **Generated files are never edited.** They carry an `AUTO-GENERATED` banner; regeneration and the drift check share - one code path. -- **The exports are a committed baseline** (`src/exports.test.ts`), and each one is documented on - [the TypeScript package reference](https://traxsharp.net/docs/sdk-reference/statemachine-api/typescript-package). - Adding or removing an export changes both in the same pull request. - -## Running the tests - -```bash -npm ci --ignore-scripts -npm test # vitest: conformance, totality, serialization, migration, codegen drift -npm run typecheck -``` - -The Trax.Effect conformance tests read `machines/` and `conformance/`, and the Trax.Cli byte-parity tests read -`machines/`, which is why CI lists this folder upstream of both. diff --git a/Trax.StateMachine/ts/README.md b/Trax.StateMachine/ts/README.md index 5f8d148f4..2131301d5 100644 --- a/Trax.StateMachine/ts/README.md +++ b/Trax.StateMachine/ts/README.md @@ -66,7 +66,7 @@ prediction at once and replaces it with what the server stored. The same machine ## Contributing -Read [AGENTS.md](https://github.com/TraxSharp/Trax/blob/main/Trax.StateMachine/ts/AGENTS.md) before changing code. +Read [AGENTS.md](https://github.com/TraxSharp/Trax/blob/main/Trax.StateMachine/AGENTS.md) before changing code. Report vulnerabilities privately as described in [SECURITY.md](https://github.com/TraxSharp/Trax/blob/main/SECURITY.md). ## License diff --git a/Trax.Website/src/components/landing/PackageList.tsx b/Trax.Website/src/components/landing/PackageList.tsx index 0f722bc53..2529448d1 100644 --- a/Trax.Website/src/components/landing/PackageList.tsx +++ b/Trax.Website/src/components/landing/PackageList.tsx @@ -24,7 +24,7 @@ const folders: Folder[] = [ }, { folder: "Trax.Effect", - summary: "Run recording, storage, decisions and state machines", + summary: "Run recording, storage and decisions", packages: [ { name: "Trax.Effect", @@ -60,6 +60,12 @@ const folders: Folder[] = [ name: "Trax.Effect.Broadcaster.SignalR", desc: "Lifecycle events pushed to Blazor and JavaScript clients", }, + ], + }, + { + folder: "Trax.StateMachine", + summary: "State machines in C# and TypeScript", + packages: [ { name: "Trax.StateMachine", desc: "Portable snapshot state-machine engine",