From d02e43324ef946e86a2ad76f7d5de465b3979ca7 Mon Sep 17 00:00:00 2001 From: meisa Date: Sat, 5 Sep 2026 15:14:07 +0200 Subject: [PATCH] Prepare canonical runtime release candidates --- .github/workflows/ci.yml | 13 +- .github/workflows/publish-nuget.yml | 17 +- CHANGELOG.md | 529 +++ Directory.Packages.props | 2 + FluxFlow.sln | 2858 ++++++++++------- .../FluxFlow.Engine.Benchmarks.csproj | 6 +- docs/01-getting-started.md | 2 +- docs/03-node-authoring.md | 7 +- docs/04-package-authoring.md | 5 +- docs/05-hosting-and-observability.md | 9 + docs/07-validation-and-errors.md | 33 +- docs/10-expression-mapping.md | 21 +- docs/11-package-versioning.md | 19 + docs/12-component-composition.md | 7 +- docs/14-public-api-overview.md | 19 +- docs/15-engine-compatibility.md | 11 +- docs/19-vnext-runtime-architecture.md | 20 +- docs/20-flow-data-contracts.md | 78 +- docs/32-tsql-durable-outputs.md | 4 +- docs/34-tsql-durable-inputs.md | 4 +- docs/38-release-validation.md | 6 +- docs/39-typed-code-first-authoring.md | 4 +- ...-flow-value-runtime-migration-execution.md | 159 + docs/44-reporting-foundation-design.md | 53 + docs/45-reporting-consumer-guide.md | 84 + docs/46-code-first-major-migration.md | 4 +- docs/48-canonical-event-migration.md | 93 + docs/49-canonical-package-release-train.md | 334 ++ docs/README.md | 8 + eng/package-consumer-acceptance/Program.cs | 4 +- eng/packages.json | 968 +++--- eng/public-api/README.md | 2 +- eng/public-api/baseline.txt | 115 +- eng/test.ps1 | 67 + .../FluxFlow.ComponentPackageTemplate.csproj | 2 +- .../README.md | 2 +- .../FluxFlow.CompositionSample.csproj | 6 +- samples/FluxFlow.CompositionSample/Program.cs | 6 +- .../FluxFlow.DesignerApp.csproj | 14 +- .../DesignerHostCatalog.cs | 8 +- .../FluxFlow.DesignerHost.csproj | 4 +- samples/FluxFlow.DesignerHost/PortModel.cs | 9 + samples/FluxFlow.DesignerHost/README.md | 4 +- ...FluxFlow.DurabilityOperationsSample.csproj | 14 +- .../SampleWorkflow.cs | 4 +- .../FluxFlow.FluentSample.csproj | 4 +- .../FluxFlow.HttpTriggerSample.csproj | 8 +- .../GreetingNode.cs | 14 +- .../FluxFlow.MqttCompositionSample.csproj | 10 +- .../FluxFlow.MqttCompositionSample/Program.cs | 12 +- .../ApplicationReportCatalog.cs | 107 + .../ApplicationReportContracts.cs | 27 + .../ApplicationReportFilter.cs | 203 ++ ...cationReportServiceCollectionExtensions.cs | 17 + .../FluxFlow.ReportingSample.csproj | 10 +- .../IApplicationReport.cs | 12 + .../IReportArchive.cs | 8 + samples/FluxFlow.ReportingSample/Program.cs | 108 + .../QuantityReport.cs | 27 + samples/FluxFlow.ReportingSample/README.md | 23 + .../FluxFlow.ReportingSample/ReportArchive.cs | 188 ++ .../FluxFlow.SampleApp.csproj | 6 +- samples/FluxFlow.SampleApp/OrderNodes.cs | 51 +- samples/FluxFlow.SampleApp/Program.cs | 13 +- .../SampleComponentRegistration.cs | 29 +- .../SampleWorkspaceDefinition.cs | 6 +- .../FluxFlow.Expressions.Jsonata.csproj | 28 + .../JsonataFlowExpressionEngine.cs | 102 + .../FluxFlow.Expressions.Jsonata/README.md | 5 + .../FlowGraphHostedService.cs | 0 .../FluxFlow.Fluent.Hosting.csproj | 4 +- ...luentHostingServiceCollectionExtensions.cs | 0 .../FluxFlow.Fluent.Hosting/README.md | 0 .../CompatibilitySuppressions.xml | 11 +- src/{ => Authoring}/FluxFlow.Fluent/Flow.cs | 0 .../FluxFlow.Fluent/FlowBuilder.cs | 0 .../FluxFlow.Fluent/FlowGraph.cs | 14 +- .../FluxFlow.Fluent/FlowGraphBuilder.cs | 10 +- .../FluxFlow.Fluent/FlowSegment.cs | 0 .../FluxFlow.Fluent/FlowTerminal.cs | 0 .../FluxFlow.Fluent/FluxFlow.Fluent.csproj | 10 +- src/{ => Authoring}/FluxFlow.Fluent/README.md | 0 .../AssertionsAuthoringExtensions.cs | 10 +- .../AssertionsComponentDefinition.cs | 0 .../AssertionsServiceCollectionExtensions.cs | 6 +- .../CompatibilitySuppressions.xml | 48 + ...w.Components.Assertions.Composition.csproj | 10 +- .../README.md | 0 .../AssertionErrorCodeNames.cs | 0 .../AssertionResultKinds.cs | 0 .../CompatibilitySuppressions.xml | 20 + .../Contracts/AssertionResult.cs | 0 .../Diagnostics/AssertionDiagnosticNames.cs | 0 .../FluxFlow.Components.Assertions.csproj | 8 +- .../Nodes/AssertionNode.cs | 149 +- .../Options/AssertionOptions.cs | 0 .../FluxFlow.Components.Assertions/README.md | 0 .../CompatibilitySuppressions.xml | 34 + .../ComponentDesignDeclaration.cs | 0 .../ComponentDesignMetadataCatalog.cs | 0 .../ComponentDesignMetadataFinalizer.cs | 0 .../ComponentDesignMetadataSnapshot.cs | 4 + .../ComponentDesignMetadataValidator.cs | 52 + .../ComponentRegistrationBuilder.cs | 9 + .../ComponentRegistrationExtensions.cs | 11 + .../ComponentResourcePickerHint.cs | 0 .../ComponentResourcePickerHints.cs | 0 .../Contracts/ComponentAttributeName.cs | 0 .../Contracts/ComponentAttributeValue.cs | 0 .../Contracts/ComponentCategory.cs | 0 .../Contracts/ComponentDesignMetadata.cs | 0 .../Contracts/ComponentIconKey.cs | 0 .../Contracts/ComponentMetadataText.cs | 0 .../Contracts/ComponentOptionChoiceValue.cs | 0 .../Contracts/ComponentOptionName.cs | 0 .../Contracts/ComponentPortGroup.cs | 0 .../Contracts/ComponentPortName.cs | 0 .../Contracts/ComponentPreferredNodeName.cs | 0 .../Contracts/ComponentResourceName.cs | 0 .../Contracts/ComponentType.cs | 0 .../Contracts/ComponentValueTypeHint.cs | 0 .../Contracts/EventDesignMetadata.cs | 37 + .../Contracts/OptionChoiceMetadata.cs | 0 .../Contracts/OptionDesignMetadata.cs | 0 .../OptionDesignMetadataAttributes.cs | 0 .../Contracts/OptionValueKind.cs | 0 .../Contracts/PortDesignMetadata.cs | 3 + .../Contracts/PortDesignMetadataAttributes.cs | 0 .../Contracts/PortDirection.cs | 0 .../Contracts/ResourceDesignMetadata.cs | 0 .../ResourceDesignMetadataAttributes.cs | 0 .../DesignedComponentBindingBuilder.cs | 61 +- .../DesignedComponentContract.cs | 0 .../DesignerMetadataValidationError.cs | 0 .../FluxFlow.Components.Designer.csproj | 6 +- .../DesignerApplicationDocument.cs | 0 .../Persistence/DesignerApplicationLink.cs | 0 .../DesignerApplicationLoadResult.cs | 0 .../DesignerApplicationPersistence.cs | 0 .../Persistence/DesignerComponent.cs | 0 .../Persistence/DesignerResource.cs | 0 .../Persistence/DesignerResourceNamespace.cs | 0 .../Persistence/DesignerResourceNode.cs | 0 .../Persistence/DesignerResourceReference.cs | 0 .../Persistence/DesignerWorkflow.cs | 0 .../FluxFlow.Components.Designer/README.md | 10 +- .../CompatibilitySuppressions.xml | 62 + .../ExpectationsAuthoringExtensions.cs | 12 +- .../ExpectationsComponentDefinition.cs | 0 ...ExpectationsServiceCollectionExtensions.cs | 4 +- ...Components.Expectations.Composition.csproj | 12 +- .../README.md | 0 .../CompatibilitySuppressions.xml | 20 + .../Contracts/EventExpectationResult.cs | 0 .../Contracts/EventExpectationResultKind.cs | 0 .../Diagnostics/ExpectationDiagnosticNames.cs | 0 .../ExpectationErrorCodeNames.cs | 0 .../ExpectationResultKinds.cs | 0 .../FluxFlow.Components.Expectations.csproj | 8 +- .../Nodes/EventExpectationNode.cs | 52 +- .../Nodes/EventExpectationNodeKind.cs | 0 .../Options/EventExpectationOptions.cs | 0 .../README.md | 0 .../CompatibilitySuppressions.xml | 174 + .../FileSystemAuthoringExtensions.cs | 34 +- .../FileSystemComponentDefinition.cs | 0 .../FileSystemServiceCollectionExtensions.cs | 12 +- ...w.Components.FileSystem.Composition.csproj | 8 +- .../README.md | 0 .../CompatibilitySuppressions.xml | 146 + .../Contracts/DirectoryEntry.cs | 0 .../Contracts/FileChange.cs | 0 .../Contracts/FileContentWriteRequest.cs | 0 .../Contracts/FileReadContent.cs | 0 .../Contracts/FileReadMode.cs | 0 .../Contracts/FileReadRequest.cs | 0 .../Contracts/FileWriteMode.cs | 0 .../Contracts/FileWriteResult.cs | 0 .../Diagnostics/FileSystemDiagnosticNames.cs | 0 .../Diagnostics/FileSystemEventNames.cs | 0 .../FileSystemErrorCodeNames.cs | 0 .../FileSystemErrorCodes.cs | 0 .../FileSystemResultKinds.cs | 0 .../FluxFlow.Components.FileSystem.csproj | 6 +- .../FileSystemRequestMaterializers.cs | 16 + .../Nodes/BoundedFileReader.cs | 0 .../Nodes/DirectoryEnumerateNode.cs | 11 +- .../Nodes/FileReadNode.cs | 9 +- .../Nodes/FileSystemOperationException.cs | 0 .../Nodes/FileSystemOperationPipeline.cs | 84 + .../Nodes/FileSystemSourceException.cs | 0 .../Nodes/FileSystemSourcePipeline.cs | 15 +- .../Nodes/FileWatchNode.cs | 11 +- .../Nodes/FileWriteNode.cs | 9 +- .../Options/DirectoryEnumerateOptions.cs | 0 .../Options/FileReadOptions.cs | 0 .../Options/FileSystemPathPolicy.cs | 0 .../FileSystemPathResolutionException.cs | 0 .../Options/FileSystemPathResolver.cs | 0 .../Options/FileWatchNotifyFilters.cs | 0 .../Options/FileWatchOptions.cs | 0 .../Options/FileWriteOptions.cs | 0 .../FluxFlow.Components.FileSystem/README.md | 0 .../CompatibilitySuppressions.xml | 48 + ...FluxFlow.Components.Http.AspNetCore.csproj | 6 +- ...wHttpTriggerServiceCollectionExtensions.cs | 0 .../FluxFlowTriggerEndpointExtensions.cs | 0 .../HttpRequestContext.cs | 0 .../HttpTriggerNode.cs | 192 ++ .../HttpTriggerSource.cs | 0 .../README.md | 0 .../CompatibilitySuppressions.xml | 48 + ...luxFlow.Components.Http.Composition.csproj | 8 +- .../HttpAuthoringExtensions.cs | 10 +- .../HttpComponentDefinition.cs | 0 .../HttpServiceCollectionExtensions.cs | 7 +- .../README.md | 7 +- .../CompatibilitySuppressions.xml | 34 + .../Contracts/HttpClientRequest.cs | 0 .../Contracts/HttpResponseResult.cs | 0 .../Contracts/HttpTriggerReply.cs | 0 .../Contracts/HttpTriggerRequest.cs | 0 .../FluxFlow.Components.Http.csproj | 6 +- .../HttpErrorCodeNames.cs | 0 .../HttpResultKinds.cs | 0 .../HttpClientRequestMaterializer.cs | 89 + .../Nodes/HttpClientNode.cs | 60 +- .../Options/HttpClientNodeOptions.cs | 0 .../Http}/FluxFlow.Components.Http/README.md | 26 +- .../CompatibilitySuppressions.xml | 48 + ...Flow.Components.Mapping.Composition.csproj | 10 +- .../MappingAuthoringExtensions.cs | 9 +- .../MappingComponentDefinition.cs | 0 .../MappingServiceCollectionExtensions.cs | 6 +- .../README.md | 0 .../CompatibilitySuppressions.xml | 20 + .../Contracts/DefaultMappingContextFactory.cs | 0 .../Contracts/IMappingContextFactory.cs | 0 .../Contracts/MappingNodeContext.cs | 0 .../Diagnostics/MappingDiagnosticNames.cs | 0 .../FluxFlow.Components.Mapping.csproj | 8 +- .../MappingErrorCodeNames.cs | 0 .../MappingResultKinds.cs | 0 .../Nodes/FlowMapperNode.cs | 133 +- .../Options/MapperOptions.cs | 0 .../FluxFlow.Components.Mapping/README.md | 0 .../CompatibilitySuppressions.xml | 62 + ...Flow.Components.Metrics.Composition.csproj | 10 +- .../MetricsAuthoringExtensions.cs | 12 +- .../MetricsComponentDefinition.cs | 0 .../MetricsServiceCollectionExtensions.cs | 4 +- .../README.md | 0 .../CompatibilitySuppressions.xml | 20 + .../Contracts/MetricGroupSnapshot.cs | 0 .../Contracts/MetricSampleInput.cs | 0 .../Contracts/MetricSnapshotOutput.cs | 0 .../Contracts/MetricsContractNormalization.cs | 0 .../Diagnostics/MetricsDiagnosticNames.cs | 0 .../FluxFlow.Components.Metrics.csproj | 6 +- .../MetricSampleInputMaterializer.cs | 10 + .../MetricsErrorCodeNames.cs | 0 .../MetricsErrorCodes.cs | 0 .../MetricsResultKinds.cs | 0 .../Nodes/MetricsAggregateNode.cs | 60 +- .../Options/MetricsAggregateOptions.cs | 0 .../Options/MetricsOptionValidation.cs | 0 .../FluxFlow.Components.Metrics/README.md | 0 .../MqttApplicationAuthoringExtensions.cs | 0 .../Authoring/MqttComponentAuthoring.cs | 41 +- .../Authoring/MqttResourceAuthoring.cs | 0 .../CompatibilitySuppressions.xml | 146 + ...luxFlow.Components.Mqtt.Composition.csproj | 8 +- .../IMqttInlineSecretPolicy.cs | 0 .../MqttClientResourceBinding.cs | 0 .../MqttComponentDefinition.cs | 0 .../MqttCompositionConfigurationConverter.cs | 0 .../MqttCompositionNodeFactories.cs | 0 .../MqttCompositionResourceIndex.cs | 0 .../MqttCompositionResourceRegistrar.cs | 0 .../MqttCompositionResourceValidator.cs | 0 .../MqttEventDesignMetadata.cs | 41 + .../MqttEventsCompositionOptions.cs | 0 .../MqttPublishCompositionOptions.cs | 0 .../MqttServiceCollectionExtensions.cs | 22 +- .../MqttTriggerCompositionOptions.cs | 0 .../README.md | 2 +- .../FluxFlow.Components.Mqtt.MqttNet.csproj | 4 +- .../MqttNetMessageMapper.cs | 0 .../MqttNetTransportFactory.cs | 0 .../MqttNetTransportSession.cs | 0 .../README.md | 0 .../FluxFlow.Components.Mqtt.PulseMqtt.csproj | 4 +- .../PulseMqttMessageMapper.cs | 0 .../PulseMqttTransportFactory.cs | 0 .../PulseMqttTransportSession.cs | 0 .../README.md | 0 .../MqttAcknowledgementPolicies.cs | 0 .../Client/IMqttClientController.cs | 0 .../Client/MqttClientCommandDispatcher.cs | 0 .../MqttClientConfigurationValidator.cs | 0 .../Client/MqttClientConnectionLifecycle.cs | 0 .../Client/MqttClientController.cs | 0 .../Client/MqttClientErrors.cs | 0 .../Client/MqttClientEventHub.cs | 0 .../Client/MqttClientOperation.cs | 0 .../Client/MqttClientOperationException.cs | 0 .../Client/MqttClientRequest.cs | 0 .../Client/MqttClientResult.cs | 0 .../Client/MqttClientResultFactory.cs | 0 .../Client/MqttClientRuntime.cs | 0 .../Client/MqttClientStatus.cs | 0 .../Client/MqttClientSubscriptionState.cs | 0 .../Client/MqttReceivedMessageDispatcher.cs | 0 .../CompatibilitySuppressions.xml | 146 + .../Configuration/MqttBrokerConfiguration.cs | 0 .../Configuration/MqttBrokerTransport.cs | 0 .../Configuration/MqttClientCertificate.cs | 0 .../Configuration/MqttClientConfiguration.cs | 0 .../MqttCredentialConfiguration.cs | 0 .../MqttReconnectConfiguration.cs | 0 .../Configuration/MqttRetryPolicy.cs | 0 .../Contracts/MqttPublishMessage.cs | 0 .../Contracts/MqttQos.cs | 0 .../MqttReceivedApplicationMessage.cs | 0 .../Events/MqttClientEvent.cs | 0 .../Events/MqttClientEventSubscription.cs | 0 .../FluxFlow.Components.Mqtt.csproj | 10 +- .../MqttPublishMessageMaterializer.cs | 99 + .../Nodes/MqttClientEventsNode.cs | 13 +- .../Nodes/MqttControlNode.cs | 61 +- .../Nodes/MqttPublishOperationNode.cs | 58 +- .../Nodes/MqttSignalTarget.cs | 0 .../Nodes/MqttSourcePump.cs | 15 +- .../Nodes/MqttSubscriptionTriggerNode.cs | 11 +- .../Options/MqttControlOptions.cs | 0 .../Options/MqttSubscriptionTriggerOptions.cs | 0 .../Mqtt/FluxFlow.Components.Mqtt/README.md | 10 +- .../MqttSubscriptionDefinition.cs | 0 .../MqttSubscriptionJsonConverters.cs | 0 .../Subscriptions/MqttSubscriptionTarget.cs | 0 .../Subscriptions/MqttTopicFilterMatcher.cs | 0 .../Subscriptions/MqttTriggerRegistration.cs | 0 .../Transport/MqttTransportCapabilities.cs | 0 .../Transport/MqttTransportContracts.cs | 0 .../Transport/MqttTransportException.cs | 0 .../Validation/MqttTopicValidationResult.cs | 0 .../Validation/MqttTopicValidator.cs | 0 .../CompatibilitySuppressions.xml | 132 + ...omponents.Observability.Composition.csproj | 12 +- .../ObservabilityAuthoringExtensions.cs | 26 +- .../ObservabilityComponentDefinition.cs | 0 ...bservabilityServiceCollectionExtensions.cs | 13 +- .../README.md | 0 .../CompatibilitySuppressions.xml | 90 + .../Contracts/FlowCounterSnapshot.cs | 0 .../Contracts/FlowLogEntry.cs | 0 .../Contracts/FlowLogLevel.cs | 0 .../Contracts/FlowMetricSnapshot.cs | 0 .../Contracts/IObservabilityValueSelector.cs | 0 .../Contracts/ObservabilityNodeContext.cs | 0 .../ObservabilityDiagnosticNames.cs | 0 .../FluxFlow.Components.Observability.csproj | 8 +- .../Nodes/CanonicalObservabilityNode.cs | 110 + .../Nodes/FlowCounterNode.cs | 34 +- .../Nodes/FlowLoggerNode.cs | 30 +- .../Nodes/FlowMetricsNode.cs | 30 +- .../Nodes/ObservabilityPipeline.cs | 0 .../ObservabilityErrorCodeNames.cs | 0 .../ObservabilityResultKinds.cs | 0 .../Options/FlowCounterOptions.cs | 0 .../Options/FlowLoggerOptions.cs | 0 .../Options/FlowMetricsOptions.cs | 0 .../Options/OneOrManyStringJsonConverter.cs | 0 .../README.md | 0 .../CompatibilitySuppressions.xml | 62 + ...low.Components.Payloads.Composition.csproj | 8 +- .../PayloadsAuthoringExtensions.cs | 10 +- .../PayloadsComponentDefinition.cs | 0 .../PayloadsServiceCollectionExtensions.cs | 4 +- .../README.md | 0 .../CompatibilitySuppressions.xml | 20 + .../Contracts/PayloadInspectionResult.cs | 0 .../Contracts/PayloadKind.cs | 0 .../Diagnostics/PayloadDiagnosticNames.cs | 0 .../FluxFlow.Components.Payloads.csproj | 6 +- .../Nodes/PayloadInspectNode.cs | 55 +- .../Options/PayloadInspectOptions.cs | 0 .../PayloadErrorCodeNames.cs | 0 .../PayloadInspectionResultKinds.cs | 0 .../FluxFlow.Components.Payloads/README.md | 0 .../CompatibilitySuppressions.xml | 62 + ....Components.Projections.Composition.csproj | 10 +- .../ProjectionsAuthoringExtensions.cs | 12 +- .../ProjectionsComponentDefinition.cs | 0 .../ProjectionsServiceCollectionExtensions.cs | 4 +- .../README.md | 0 .../CompatibilitySuppressions.xml | 20 + .../Contracts/EventFilter.cs | 0 .../Contracts/EventFilterMatcher.cs | 0 .../Contracts/EventProjectionSnapshot.cs | 0 .../Contracts/EventSummary.cs | 0 .../ProjectionContractNormalization.cs | 0 .../Contracts/ProjectionEvent.cs | 0 .../Diagnostics/ProjectionDiagnosticNames.cs | 0 .../FluxFlow.Components.Projections.csproj | 6 +- .../ProjectionEventMaterializer.cs | 14 + .../Nodes/EventProjectionNode.cs | 53 +- .../Options/EventProjectionOptions.cs | 0 .../ProjectionErrorCodeNames.cs | 0 .../ProjectionResultKinds.cs | 0 .../ProjectionsErrorCodes.cs | 0 .../FluxFlow.Components.Projections/README.md | 0 .../CompatibilitySuppressions.xml | 20 + .../CorrelatedRequestTracker.cs | 0 .../CorrelatedRequestTrackerOptions.cs | 0 .../FluxFlow.Components.RequestReply.csproj | 8 +- .../IRequestContext.cs | 0 .../README.md | 0 .../RequestReplyCoordinator.cs | 6 +- .../RequestReplyOptions.cs | 0 .../CompatibilitySuppressions.xml | 48 + ...w.Components.Resilience.Composition.csproj | 10 +- .../README.md | 0 .../ResilienceAuthoringExtensions.cs | 14 +- .../ResilienceComponentDefinition.cs | 0 .../ResilienceServiceCollectionExtensions.cs | 11 +- .../CompatibilitySuppressions.xml | 20 + .../Contracts/RetrySignal.cs | 0 .../Diagnostics/RetryDiagnosticNames.cs | 0 .../FluxFlow.Components.Resilience.csproj | 10 +- .../Nodes/FlowRetryNode.cs | 127 + .../Nodes/FlowValueRetryNode.cs | 120 + .../Nodes/RetryAttemptKey.cs | 0 .../Nodes/RetryFeedback.cs | 0 .../Nodes/RetryOperationCoordinator.cs | 507 +++ .../Nodes/RetrySignalTarget.cs | 0 .../Options/FlowRetryOptionValidation.cs | 0 .../Options/FlowRetryOptions.cs | 0 .../Properties/AssemblyInfo.cs | 3 + .../FluxFlow.Components.Resilience/README.md | 0 .../RetryErrorCodeNames.cs | 0 .../RetryResultKinds.cs | 0 .../CompatibilitySuppressions.xml | 132 + ...Flow.Components.Routing.Composition.csproj | 8 +- .../README.md | 0 .../RoutingAuthoringExtensions.cs | 26 +- .../RoutingComponentDefinition.cs | 0 .../RoutingServiceCollectionExtensions.cs | 15 +- .../CompatibilitySuppressions.xml | 90 + .../Contracts/FlowCorrelationMatch.cs | 0 .../Contracts/FlowCorrelationOutcome.cs | 0 .../Contracts/FlowCorrelationTimeout.cs | 0 .../Contracts/FlowJoinOutcome.cs | 0 .../Contracts/FlowJoinResult.cs | 0 .../Contracts/FlowJoinSide.cs | 0 .../Contracts/FlowJoinTimeout.cs | 0 .../Contracts/FlowWindow.cs | 0 .../Contracts/FlowWindowEmitReason.cs | 0 .../Diagnostics/RoutingDiagnosticNames.cs | 0 .../FluxFlow.Components.Routing.csproj | 6 +- .../Nodes/CanonicalRoutingNode.cs | 247 ++ .../Nodes/CorrelationNode.cs | 33 +- .../Nodes/CorrelationNodeRuntime.cs | 0 .../Nodes/CorrelationPendingStore.cs | 0 .../Nodes/JoinNode.cs | 36 +- .../Nodes/JoinNodeRuntime.cs | 6 +- .../Nodes/JoinPendingStore.cs | 0 .../Nodes/WindowNode.cs | 28 +- .../Nodes/WindowNodeRuntime.cs | 0 .../Options/CorrelationRoutingOptions.cs | 0 .../Options/JoinRoutingOptions.cs | 0 .../Options/WindowRoutingOptions.cs | 0 .../FluxFlow.Components.Routing/README.md | 0 .../RoutingErrorCodeNames.cs | 0 .../RoutingErrorCodes.cs | 0 .../RoutingResultKinds.cs | 0 .../CompatibilitySuppressions.xml | 342 ++ ...omponents.Serialization.Composition.csproj | 8 +- .../README.md | 0 .../SerializationAuthoringExtensions.cs | 52 +- .../SerializationComponentDefinition.cs | 0 ...erializationServiceCollectionExtensions.cs | 25 +- .../CompatibilitySuppressions.xml | 258 ++ .../SerializationDiagnosticNames.cs | 0 .../FluxFlow.Components.Serialization.csproj | 6 +- .../Nodes/Base64DecodeNode.cs | 7 +- .../Nodes/Base64EncodeNode.cs | 7 +- .../Nodes/JsonParseNode.cs | 7 +- .../Nodes/JsonStringifyNode.cs | 7 +- .../Nodes/SerializationConverters.cs | 0 .../Nodes/SerializationFailureException.cs | 0 .../Nodes/SerializationPipeline.cs | 56 +- .../Nodes/TextDecodeNode.cs | 7 +- .../Nodes/TextEncodeNode.cs | 7 +- .../Options/SerializationNodeOptions.cs | 0 .../README.md | 0 .../SerializationErrorCodeNames.cs | 0 .../SerializationResultKinds.cs | 0 .../CompatibilitySuppressions.xml | 132 + ...low.Components.Sessions.Composition.csproj | 8 +- .../README.md | 0 .../SessionsAuthoringExtensions.cs | 26 +- .../SessionsComponentDefinition.cs | 0 .../SessionsCompositionStoreResolver.cs | 0 .../SessionsServiceCollectionExtensions.cs | 10 +- .../CompatibilitySuppressions.xml | 104 + .../Contracts/ISessionStore.cs | 0 .../Contracts/ISessionStoreFactory.cs | 0 .../Contracts/SessionAppendRequest.cs | 0 .../Contracts/SessionCompleteRequest.cs | 0 .../Contracts/SessionContentContractMap.cs | 0 .../Contracts/SessionContentRecord.cs | 0 .../Contracts/SessionContentRecordInput.cs | 0 .../Contracts/SessionContractNormalization.cs | 0 .../Contracts/SessionMetadata.cs | 0 .../Contracts/SessionQueryOutcome.cs | 0 .../Contracts/SessionQueryRequest.cs | 0 .../Contracts/SessionReadRequest.cs | 0 .../Contracts/SessionRecord.cs | 0 .../Contracts/SessionRecordInput.cs | 0 .../Contracts/SessionReplayMode.cs | 0 .../Contracts/SessionStartRequest.cs | 0 .../Contracts/SessionStoreContext.cs | 0 .../Contracts/SessionStoreLease.cs | 0 .../Diagnostics/SessionsDiagnosticNames.cs | 0 .../FluxFlow.Components.Sessions.csproj | 6 +- .../SessionRequestMaterializers.cs | 16 + .../Nodes/SessionContentNodeSupport.cs | 0 .../Nodes/SessionContentOperationException.cs | 0 .../Nodes/SessionContentRecordMapper.cs | 0 .../Nodes/SessionOperationPipeline.cs | 93 + .../Nodes/SessionQueryNode.cs | 13 +- .../Nodes/SessionRecorderNode.cs | 9 +- .../Nodes/SessionReplayNode.cs | 6 +- .../Options/SessionOptionValidation.cs | 0 .../Options/SessionQueryOptions.cs | 0 .../Options/SessionRecorderOptions.cs | 0 .../Options/SessionReplayOptions.cs | 0 .../FluxFlow.Components.Sessions/README.md | 0 .../SessionErrorCodeNames.cs | 0 .../SessionResultKinds.cs | 0 .../CompatibilitySuppressions.xml | 90 + ...Flow.Components.Sources.Composition.csproj | 8 +- .../README.md | 0 .../SourcesAuthoringExtensions.cs | 18 +- .../SourcesComponentDefinition.cs | 0 .../SourcesServiceCollectionExtensions.cs | 4 +- .../CompatibilitySuppressions.xml | 62 + .../Contracts/SequenceItem.cs | 0 .../Diagnostics/SourceDiagnosticNames.cs | 0 .../FluxFlow.Components.Sources.csproj | 6 +- .../Nodes/GeneratedSourceNode.cs | 9 +- .../Nodes/SequenceSourceNode.cs | 9 +- .../Nodes/SourceNodeTiming.cs | 0 .../Options/GeneratedSourceOptions.cs | 0 .../Options/SequenceSourceOptions.cs | 0 .../FluxFlow.Components.Sources/README.md | 0 .../CompatibilitySuppressions.xml | 48 + ...uxFlow.Components.State.Composition.csproj | 10 +- .../README.md | 0 .../StateAuthoringExtensions.cs | 10 +- .../StateComponentDefinition.cs | 0 .../StateReducerConfiguration.cs | 0 .../StateServiceCollectionExtensions.cs | 4 +- .../CompatibilitySuppressions.xml | 34 + .../Contracts/StateContractNormalization.cs | 0 .../Contracts/StateReducerInput.cs | 0 .../Contracts/StateReducerOperation.cs | 0 .../Contracts/StateReducerResult.cs | 0 .../Diagnostics/StateDiagnosticNames.cs | 0 .../FluxFlow.Components.State.csproj | 8 +- .../StateReducerInputMaterializer.cs | 13 + .../Nodes/StateReducerNode.cs | 68 +- .../Options/StateOptionValidation.cs | 0 .../Options/StateReducerOptions.cs | 0 .../FluxFlow.Components.State/README.md | 0 .../StateErrorCodeNames.cs | 0 .../StateResultKinds.cs | 0 .../CompatibilitySuppressions.xml | 174 + ...Flow.Components.Storage.Composition.csproj | 8 +- .../README.md | 0 .../StorageAuthoringExtensions.cs | 30 +- .../StorageComponentDefinition.cs | 0 .../StorageCompositionStoreResolver.cs | 0 .../StorageServiceCollectionExtensions.cs | 16 +- .../FileSystemStorageRegistrationBuilder.cs | 0 ...FileSystemStorageRegistrationExtensions.cs | 0 ...ystemStorageServiceCollectionExtensions.cs | 0 .../FileSystemStorageStore.cs | 0 .../FileSystemStorageStoreFactory.cs | 0 .../FileSystemStorageStoreOptions.cs | 0 .../FileSystemStorageStoreSettings.cs | 0 ...xFlow.Components.Storage.FileSystem.csproj | 4 +- .../README.md | 0 ...FluxFlow.Components.Storage.SqlFile.csproj | 4 +- .../README.md | 0 .../SqlFileStorageRegistrationBuilder.cs | 0 .../SqlFileStorageRegistrationExtensions.cs | 0 ...lFileStorageServiceCollectionExtensions.cs | 0 .../SqlFileStorageStore.cs | 0 .../SqlFileStorageStoreFactory.cs | 0 .../SqlFileStorageStoreOptions.cs | 0 .../SqlFileStorageStoreSettings.cs | 0 .../CompatibilitySuppressions.xml | 174 + .../Contracts/IStorageStore.cs | 0 .../Contracts/IStorageStoreFactory.cs | 0 .../Contracts/StorageContentContractMap.cs | 0 .../Contracts/StorageContentPutRequest.cs | 0 .../Contracts/StorageContentRecord.cs | 0 .../Contracts/StorageContractNormalization.cs | 0 .../Contracts/StorageDeleteOutcome.cs | 0 .../Contracts/StorageDeleteRequest.cs | 0 .../Contracts/StorageGetOutcome.cs | 0 .../Contracts/StorageGetRequest.cs | 0 .../Contracts/StoragePutOutcome.cs | 0 .../Contracts/StoragePutRequest.cs | 0 .../Contracts/StorageQueryMatcher.cs | 0 .../Contracts/StorageQueryOutcome.cs | 0 .../Contracts/StorageQueryRequest.cs | 0 .../Contracts/StorageRecord.cs | 0 .../Contracts/StorageResult.cs | 0 .../Contracts/StorageStoreContext.cs | 0 .../Contracts/StorageStoreLease.cs | 0 .../Contracts/StorageWriteMode.cs | 0 .../Diagnostics/StorageDiagnosticNames.cs | 0 .../FluxFlow.Components.Storage.csproj | 6 +- .../StorageRequestMaterializers.cs | 28 + .../Nodes/StorageContentOperationException.cs | 0 .../Nodes/StorageContentRecordMapper.cs | 0 .../Nodes/StorageDeleteNode.cs | 13 +- .../Nodes/StorageGetNode.cs | 13 +- .../Nodes/StorageNodeSupport.cs | 0 .../Nodes/StorageOperationPipeline.cs | 84 + .../Nodes/StoragePutNode.cs | 9 +- .../Nodes/StorageQueryNode.cs | 13 +- .../Options/StorageComponentOptions.cs | 0 .../Options/StorageDeleteOptions.cs | 0 .../Options/StorageGetOptions.cs | 0 .../Options/StorageOptionValidation.cs | 0 .../Options/StoragePutOptions.cs | 0 .../Options/StorageQueryOptions.cs | 0 .../FluxFlow.Components.Storage/README.md | 0 .../StorageErrorCodeNames.cs | 0 .../StorageResultKinds.cs | 0 .../CompatibilitySuppressions.xml | 216 ++ ...xFlow.Components.Timers.Composition.csproj | 8 +- .../README.md | 0 .../TimersAuthoringExtensions.cs | 40 +- .../TimersComponentDefinition.cs | 0 .../TimersServiceCollectionExtensions.cs | 32 +- .../CompatibilitySuppressions.xml | 104 + .../Contracts/TimerIntervalTick.cs | 0 .../Contracts/TimerScheduleTick.cs | 0 .../Diagnostics/TimerDiagnosticNames.cs | 0 .../FluxFlow.Components.Timers.csproj | 6 +- .../Nodes/FlowValueTimerDebounceNode.cs | 266 ++ .../Nodes/FlowValueTimerDelayNode.cs | 212 ++ .../Nodes/FlowValueTimerNodeSupport.cs | 84 + .../Nodes/FlowValueTimerThrottleNode.cs | 174 + .../Nodes/TimerDebounceNode.cs | 7 +- .../Nodes/TimerDelayNode.cs | 7 +- .../Nodes/TimerIntervalNode.cs | 11 +- .../Nodes/TimerNodeSupport.cs | 0 .../Nodes/TimerResultPipeline.cs | 30 +- .../Nodes/TimerScheduleNode.cs | 11 +- .../Nodes/TimerThrottleNode.cs | 7 +- .../Options/CronSchedule.cs | 0 .../Options/TimerDebounceSettings.cs | 0 .../Options/TimerDelaySettings.cs | 0 .../Options/TimerIntervalSettings.cs | 0 .../Options/TimerScheduleSettings.cs | 0 .../Options/TimerThrottleSettings.cs | 0 .../Properties/AssemblyInfo.cs | 1 + .../FluxFlow.Components.Timers/README.md | 0 .../TimerErrorCodeNames.cs | 0 .../TimerResultKinds.cs | 0 .../CompatibilitySuppressions.xml | 62 + ...w.Components.Validation.Composition.csproj | 8 +- .../README.md | 0 .../ValidationAuthoringExtensions.cs | 12 +- .../ValidationComponentDefinition.cs | 0 .../ValidationServiceCollectionExtensions.cs | 6 +- .../CompatibilitySuppressions.xml | 20 + .../Contracts/IJsonSchemaValueSelector.cs | 0 .../Contracts/JsonSchemaValidationIssue.cs | 0 .../Contracts/JsonSchemaValidationResult.cs | 0 .../Contracts/JsonSchemaValidatorContext.cs | 0 .../Diagnostics/ValidationDiagnosticNames.cs | 0 .../FluxFlow.Components.Validation.csproj | 6 +- .../Nodes/JsonSchemaValidatorNode.cs | 28 +- .../Options/JsonSchemaValidatorOptions.cs | 0 .../FluxFlow.Components.Validation/README.md | 0 .../ValidationErrorCodeNames.cs | 0 .../ValidationResultKinds.cs | 0 .../Addressing/ApplicationAddress.cs | 0 .../Addressing/ApplicationAddressKind.cs | 0 .../ApplicationLinkCompilationResult.cs | 0 .../ApplicationLinkCompiler.cs | 212 +- .../ApplicationLinkDeclarationParser.cs | 0 .../ApplicationLinkDeclarationProjection.cs | 0 .../ApplicationLinkDeclarationSide.cs | 0 .../ApplicationLinkDefinition.cs | 16 +- .../ApplicationLinkDiagnostic.cs | 0 .../ApplicationLinkDiagnosticCode.cs | 0 .../ApplicationSystemOutputMetadata.cs | 0 .../CompiledApplicationLink.cs | 0 .../ApplicationModel/ApplicationDefinition.cs | 0 .../ApplicationDefinitionJson.cs | 0 .../ApplicationDefinitionJsonConverter.cs | 0 .../CanonicalApplicationProperties.cs | 0 .../ApplicationModel/ComponentDefinition.cs | 0 .../ApplicationModel/DefinitionRules.cs | 0 .../ApplicationModel/ResourceDefinition.cs | 0 .../ResourceGroupDefinition.cs | 0 .../ResourceInstanceDefinition.cs | 0 .../ApplicationModel/WorkflowDefinition.cs | 0 .../Authoring/ApplicationDefinitionBuilder.cs | 0 .../ApplicationResourceAuthoringExtensions.cs | 0 .../Authoring/ApplicationResourceContract.cs | 0 .../ApplicationResourceContractCollection.cs | 0 .../Authoring/AuthoringHandles.cs | 16 +- .../Authoring/AuthoringScope.cs | 0 .../Authoring/ComponentContract.cs | 0 .../Authoring/ComponentContractCollection.cs | 0 .../Authoring/DefinitionPropertyBuilder.cs | 0 .../ResourceDefinitionContainerBuilder.cs | 0 .../Authoring/WorkflowDefinitionBuilder.cs | 0 .../CompatibilitySuppressions.xml | 82 +- .../CompositionConfigurationException.cs | 0 .../FluxFlowServiceCollectionExtensions.cs | 26 + .../NonOwningDataflowViews.cs | 0 .../Factories/ComponentActivationContext.cs | 0 .../Factories/ComponentCatalog.cs | 0 .../Factories/ComponentDescriptor.cs | 17 + .../Factories/ComponentFactory.cs | 0 .../Factories/ComponentNodeActivation.cs | 0 .../Factories/ComponentOptionMetadata.cs | 0 .../Factories/ComponentOptions.cs | 0 .../Factories/ComponentPortKind.cs | 0 .../Factories/ComponentPortLinkCardinality.cs | 0 .../Factories/ComponentPortMetadata.cs | 14 + .../Factories/ComponentResourceMetadata.cs | 0 .../Factories/ComponentResources.cs | 0 .../Factories/IComponentPortTypeVisitor.cs | 0 .../FluxFlow.Composition.csproj | 8 +- .../CompositionProcessingCapabilities.cs | 0 .../CompositionProcessingConfiguration.cs | 0 .../CompositionProcessingProfile.cs | 0 .../CompositionProcessingResourceTypes.cs | 0 .../CompositionProcessingSettings.cs | 0 ...faultCompositionProcessingProfileMapper.cs | 0 .../ICompositionProcessingProfileMapper.cs | 0 .../FluxFlow.Composition/README.md | 18 +- .../FluxFlowRegistrationBuilder.cs | 0 .../FluxFlowRegistrationExtensions.cs | 1 + .../RuntimeComponentBindingBuilder.cs | 99 +- .../RuntimeComponentRegistrationBuilder.cs | 44 +- .../ApplicationResourceRegistrationContext.cs | 0 ...tionResourceServiceCollectionExtensions.cs | 0 .../IApplicationResourceRegistrar.cs | 0 .../Runtime/ApplicationRuntime.cs | 26 +- .../Runtime/ApplicationRuntimeComponent.cs | 0 .../Runtime/ComponentActivityBridge.cs} | 89 +- .../Runtime/ComponentEventSource.cs | 4 +- .../Runtime/ComponentInputPort.cs | 16 + .../Runtime/ComponentInstance.cs | 50 +- .../Runtime/ComponentOutputPort.cs | 73 + .../Runtime/ComponentPorts.cs | 12 +- .../Runtime/RuntimeNodeKey.cs | 0 .../FluxFlow.Coordination.csproj | 6 +- .../PendingExchangeCompletion.cs | 0 .../PendingExchangeCoordinator.cs | 0 .../PendingExchangeCoordinatorOptions.cs | 0 .../PendingExchangeFeedback.cs | 0 .../PendingExchangeStart.cs | 0 .../PendingExchangeStatus.cs | 0 .../FluxFlow.Coordination/README.md | 0 .../FluxFlow.Resilience.csproj | 0 .../FluxFlow.Resilience/IRetryJitterSource.cs | 0 .../Execution}/FluxFlow.Resilience/README.md | 0 .../FluxFlow.Resilience/RetryExecutor.cs | 0 .../FluxFlow.Resilience/RetryPlanner.cs | 0 .../FluxFlow.Resilience/RetryPolicy.cs | 0 .../FluxFlow.Resilience/RetrySchedule.cs | 0 .../FluxFlow.Resilience/RetryStateMachine.cs | 0 .../FluxFlow.Mapping/DelegateFlowMapper.cs | 0 .../FluxFlow.Mapping/DelegateFlowPredicate.cs | 0 .../EvaluatingCompiledExpression.cs | 0 .../FluxFlow.Mapping/ExpressionFlowMapper.cs | 0 .../ExpressionFlowPredicate.cs | 0 .../FluxFlow.Mapping/FlowMapContext.cs | 0 .../FluxFlow.Mapping/FluxFlow.Mapping.csproj | 0 .../IFlowCompiledExpression.cs | 0 .../FluxFlow.Mapping/IFlowExpressionEngine.cs | 0 .../IFlowMapContextFactory.cs | 0 .../FluxFlow.Mapping/IFlowMapper.cs | 0 .../FluxFlow.Mapping/IFlowPredicate.cs | 0 .../Foundation}/FluxFlow.Mapping/README.md | 0 .../CompatibilitySuppressions.xml | 34 + .../FluxFlow.Nodes/CorrelationId.cs | 0 .../FluxFlow.Nodes/Data/FlowContent.cs | 7 +- .../Data/FlowContentJsonConverter.cs | 0 .../FluxFlow.Nodes/Data/FlowError.cs | 0 .../FluxFlow.Nodes/Data/FlowValue.cs | 106 + .../Data/FlowValueJsonConverter.cs | 22 + .../Data/FlowValueMaterializers.cs | 184 ++ .../FluxFlow.Nodes/Data/FlowValueShape.cs | 143 + .../Data/IFlowValueMaterializer.cs | 46 + .../Foundation/FluxFlow.Nodes/FlowEvent.cs | 315 ++ .../Foundation/FluxFlow.Nodes/FlowMessage.cs | 599 ++++ .../FlowMessageJsonConverter.cs | 143 + .../Foundation}/FluxFlow.Nodes/FlowNode.cs | 8 +- .../FluxFlow.Nodes/FlowNodeOptions.cs | 0 .../Foundation}/FluxFlow.Nodes/FlowOutput.cs | 0 .../FluxFlow.Nodes/FlowOutputOptions.cs | 0 .../Foundation}/FluxFlow.Nodes/FlowSource.cs | 8 +- .../FluxFlow.Nodes/FlowSourceOptions.cs | 0 .../FluxFlow.Nodes/FlowValueNode.cs | 339 ++ .../FluxFlow.Nodes/FlowValueSource.cs | 314 ++ .../FluxFlow.Nodes/FluxFlow.Nodes.csproj | 4 +- .../Foundation}/FluxFlow.Nodes/IFlowNode.cs | 0 .../FluxFlow.Nodes/IFlowSignalTarget.cs | 20 + .../Foundation}/FluxFlow.Nodes/MessageId.cs | 0 .../Foundation}/FluxFlow.Nodes/README.md | 0 .../Foundation}/FluxFlow.Nodes/TraceId.cs | 0 ...luxFlow.Engine.DurableInput.SqlFile.csproj | 4 +- .../README.md | 0 .../SqlFileDurableInputSchema.cs | 0 ...DurableInputServiceCollectionExtensions.cs | 0 .../SqlFileDurableInputStore.DeadLetters.cs | 0 .../SqlFileDurableInputStore.Retention.cs | 0 .../SqlFileDurableInputStore.Status.cs | 0 .../SqlFileDurableInputStore.cs | 0 .../SqlFileDurableInputStoreOptions.cs | 0 .../SqlFileDurableInputStoreOptionsBuilder.cs | 0 .../FluxFlow.Engine.DurableInput.TSql.csproj | 4 +- .../README.md | 0 .../RelationalDurableInputRows.cs | 0 .../RelationalDurableInputSchema.cs | 0 .../TSqlDurableInputSchemaManagement.cs | 0 ...DurableInputServiceCollectionExtensions.cs | 0 .../TSqlDurableInputStore.DeadLetters.cs | 0 .../TSqlDurableInputStore.Retention.cs | 0 .../TSqlDurableInputStore.Status.cs | 0 .../TSqlDurableInputStore.cs | 0 .../TSqlDurableInputStoreOptions.cs | 0 .../TSqlDurableInputStoreOptionsBuilder.cs | 0 .../DurableApplicationInputs.cs | 0 .../DurableInputCompletion.cs | 0 .../DurableInputContractRegistry.cs | 0 .../DurableInputContracts.cs | 0 .../DurableInputDeadLetterContracts.cs | 0 .../DurableInputDispatcher.cs | 0 .../DurableInputInstrumentation.cs | 0 .../DurableInputOptions.cs | 0 .../DurableInputRetentionContracts.cs | 0 ...DurableInputServiceCollectionExtensions.cs | 0 .../DurableInputStatusContracts.cs | 0 .../FluxFlow.Engine.DurableInput.csproj | 6 +- .../FluxFlow.Engine.DurableInput/README.md | 0 ...uxFlow.Engine.DurableOutput.SqlFile.csproj | 4 +- .../README.md | 0 .../SqlFileDurableOutputDeliverySchema.cs | 0 .../SqlFileDurableOutputSchema.cs | 0 ...urableOutputServiceCollectionExtensions.cs | 0 .../SqlFileDurableOutputStore.DeadLetters.cs | 0 .../SqlFileDurableOutputStore.Delivery.cs | 0 .../SqlFileDurableOutputStore.Retention.cs | 0 .../SqlFileDurableOutputStore.Status.cs | 0 .../SqlFileDurableOutputStore.cs | 0 .../SqlFileDurableOutputStoreOptions.cs | 0 ...SqlFileDurableOutputStoreOptionsBuilder.cs | 0 .../FluxFlow.Engine.DurableOutput.TSql.csproj | 4 +- .../README.md | 0 .../RelationalDurableOutputRows.cs | 0 .../RelationalDurableOutputSchema.cs | 0 .../TSqlDurableOutputSchemaManagement.cs | 0 ...urableOutputServiceCollectionExtensions.cs | 0 .../TSqlDurableOutputStore.DeadLetters.cs | 0 .../TSqlDurableOutputStore.Delivery.cs | 0 .../TSqlDurableOutputStore.Retention.cs | 0 .../TSqlDurableOutputStore.Status.cs | 0 .../TSqlDurableOutputStore.cs | 0 .../TSqlDurableOutputStoreOptions.cs | 0 .../TSqlDurableOutputStoreOptionsBuilder.cs | 0 .../DurableOutputCaptureResolver.cs | 0 .../DurableOutputContracts.cs | 0 .../DurableOutputDeadLetterContracts.cs | 0 .../DurableOutputDeliveryContracts.cs | 0 .../DurableOutputDeliveryDispatcher.cs | 0 .../DurableOutputDeliveryOptions.cs | 0 ...tputDeliveryServiceCollectionExtensions.cs | 0 .../DurableOutputInstrumentation.cs | 0 .../DurableOutputRegistration.cs | 0 .../DurableOutputRetentionContracts.cs | 0 ...urableOutputServiceCollectionExtensions.cs | 0 .../DurableOutputStatusContracts.cs | 0 .../FluxFlow.Engine.DurableOutput.csproj | 6 +- .../FluxFlow.Engine.DurableOutput/README.md | 0 .../FluxFlow.Engine.HealthChecks.csproj | 6 +- .../FluxFlowApplicationHealthCheck.cs | 0 .../FluxFlowHealthChecksBuilderExtensions.cs | 0 .../FluxFlow.Engine.HealthChecks/README.md | 0 .../ApplicationDefinitionSources.cs | 0 .../FluxFlow.Engine/ApplicationPorts.cs | 27 +- .../FluxFlow.Engine/ApplicationSnapshot.cs | 0 .../FluxFlow.Engine/ApplicationState.cs | 0 .../ApplicationUpdateResult.cs | 0 .../CompatibilitySuppressions.xml | 132 + .../FluxFlow.Engine/Core/FlowFanoutSource.cs | 0 .../Events/ApplicationEventAttachment.cs | 31 + .../Events/ApplicationEventOptions.cs | 8 + .../Events/ApplicationEventStream.cs | 46 + .../FluxFlow.Engine/FluxFlow.Engine.csproj | 10 +- .../FluxFlow.Engine/FluxFlowApplication.cs | 9 + .../FluxFlowApplicationOptions.cs | 2 + ...wApplicationServiceCollectionExtensions.cs | 1 + .../Hosting/ApplicationRuntimeAssembler.cs | 29 +- .../ApplicationRuntimeAssemblerException.cs | 0 ...cationRuntimeAssemblerHostingExtensions.cs | 0 .../ApplicationRuntimeAssemblerOptions.cs | 2 + .../Hosting/ApplicationRuntimeCleanup.cs | 0 .../ApplicationRuntimeComponentActivator.cs | 0 .../Hosting/ApplicationRuntimeDrainPlan.cs | 0 .../Hosting/ApplicationRuntimePlanFactory.cs | 0 .../Hosting/ApplicationRuntimePortBinder.cs | 32 + .../ApplicationRuntimePortGeneration.cs | 0 .../Hosting/ApplicationRuntimePortSurface.cs | 7 +- .../Hosting/ApplicationRuntimePreparation.cs | 19 +- ...plicationRuntimeResourceSnapshotFactory.cs | 0 .../ApplicationRuntimeRevisionCandidate.cs | 25 +- .../FluxFlowApplicationHostedService.cs | 0 .../IApplicationDefinitionSource.cs | 0 .../Internal/ConfigurationJsonReader.cs | 0 .../ApplicationResourceRevisionChange.cs | 0 .../ApplicationRevisionChangeKind.cs | 0 .../ApplicationRevisionDiagnostic.cs | 0 .../ApplicationRevisionDiagnosticCode.cs | 0 .../Revisions/ApplicationRevisionEvent.cs | 0 .../Revisions/ApplicationRevisionPhase.cs | 0 .../Revisions/ApplicationRevisionPlan.cs | 0 .../Revisions/ApplicationRevisionPlanner.cs | 0 .../ApplicationRevisionPreparationContext.cs | 0 .../ApplicationWorkflowRevisionChange.cs | 0 .../IApplicationRevisionCandidate.cs | 0 .../Snapshots/CompositionProviderBoundary.cs | 0 .../CompositionProviderSnapshotInfo.cs | 0 .../CompositionServiceProviderSnapshot.cs | 0 ...mpositionServiceProviderSnapshotBuilder.cs | 0 .../Ports/ApplicationInputPort.cs | 0 .../Ports/ApplicationInputPortCore.cs | 0 .../Ports/ApplicationInputRevisionLifetime.cs | 0 .../Ports/ApplicationOutputAttachments.cs | 0 .../Ports/ApplicationOutputCapture.cs | 0 .../Ports/ApplicationOutputConnections.cs | 0 .../Ports/ApplicationOutputPort.cs | 0 .../Ports/ApplicationOutputSubscriptions.cs | 0 .../Ports/ApplicationPortActivity.cs | 0 .../Ports/ApplicationPortContracts.cs | 0 .../Ports/ApplicationPortEventPublisher.cs | 122 +- .../Ports/ApplicationPortRevision.cs | 21 + .../Ports/ApplicationPortRevisionInfo.cs | 0 .../Ports/ApplicationPortRuntime.cs | 336 +- .../Ports/ApplicationPortRuntimeBuilder.cs | 54 +- .../Ports/ApplicationRevisionRouting.cs | 0 .../Ports/ApplicationRuntimeStatus.cs | 0 .../Ports/ApplicationSignalInputPort.cs | 0 .../Ports/FlowValueApplicationInputPort.cs | 109 + .../FlowValueApplicationOutputAttachments.cs | 106 + .../FlowValueApplicationOutputConnections.cs | 76 + .../Ports/FlowValueApplicationOutputPort.cs | 584 ++++ ...FlowValueApplicationOutputSubscriptions.cs | 74 + .../FluxFlow.Engine/Ports/PortObservation.cs | 0 .../Runtime}/FluxFlow.Engine/README.md | 14 +- .../Signals/ApplicationDiagnosticNames.cs | 10 + .../ApplicationRuntimeInstrumentation.cs | 55 +- .../Signals/ApplicationRuntimeSignals.cs | 69 +- .../Signals/ApplicationSignalMessage.cs | 37 + .../Signals/ApplicationSystemEventNames.cs | 24 + .../CompatibilitySuppressions.xml | 49 - .../Nodes/FileSystemOperationPipeline.cs | 40 - .../HttpTriggerNode.cs | 51 - .../Nodes/FlowRetryNode.cs | 759 ----- .../Nodes/SessionOperationPipeline.cs | 49 - .../Nodes/StorageOperationPipeline.cs | 40 - .../Runtime/ComponentEvent.cs | 45 - .../Signals/ApplicationDiagnostic.cs | 87 - .../Signals/ApplicationSystemEvent.cs | 59 - src/FluxFlow.Nodes/FlowEvent.cs | 41 - src/FluxFlow.Nodes/FlowMessage.cs | 261 -- src/FluxFlow.Nodes/IFlowSignalTarget.cs | 10 - .../FluxFlow.Workflow.Acceptance.Tests.csproj | 31 + .../MqttToHttpFlowValueAcceptanceTests.cs | 152 + ...onents.Assertions.Composition.Tests.csproj | 31 - ...ents.Expectations.Composition.Tests.csproj | 31 - ...onents.FileSystem.Composition.Tests.csproj | 30 - ...w.Components.Http.Composition.Tests.csproj | 28 - ...omponents.Mapping.Composition.Tests.csproj | 30 - ...omponents.Metrics.Composition.Tests.csproj | 29 - ...w.Components.Mqtt.Composition.Tests.csproj | 28 - ...nts.Observability.Composition.Tests.csproj | 31 - ...mponents.Payloads.Composition.Tests.csproj | 29 - ...nents.Projections.Composition.Tests.csproj | 29 - ...onents.Resilience.Composition.Tests.csproj | 26 - ...omponents.Routing.Composition.Tests.csproj | 30 - ...nts.Serialization.Composition.Tests.csproj | 30 - ...mponents.Sessions.Composition.Tests.csproj | 30 - ...omponents.Sources.Composition.Tests.csproj | 30 - ....Components.State.Composition.Tests.csproj | 31 - ...omponents.Storage.Composition.Tests.csproj | 29 - ...Components.Timers.Composition.Tests.csproj | 30 - ...onents.Validation.Composition.Tests.csproj | 30 - .../FluxFlow.Release.Tests.csproj | 42 - .../AssemblyInfo.cs | 0 ....DurableInput.TSql.IntegrationTests.csproj | 6 +- .../README.md | 6 +- .../TSqlDurableInputConcurrencyTests.cs | 0 .../TSqlDurableInputConformanceTests.cs | 0 .../TSqlDurableInputPersistenceTests.cs | 0 .../TSqlDurableInputResiliencyTests.cs | 0 .../TSqlDurableInputRetentionTests.cs | 0 .../TSqlDurableInputSchemaTests.cs | 0 .../TSqlDurableInputStatusTests.cs | 0 .../TSqlDurableInputTestSupport.cs | 0 .../TSqlIntegrationEnvironment.cs | 0 .../TSqlIntegrationEnvironmentTests.cs | 0 .../TSqlTestDatabase.cs | 0 .../run-integration.ps1 | 0 .../xunit.runner.json | 0 .../AssemblyInfo.cs | 0 ...DurableOutput.TSql.IntegrationTests.csproj | 6 +- .../README.md | 6 +- .../TSqlDurableOutputConcurrencyTests.cs | 0 .../TSqlDurableOutputConformanceTests.cs | 0 .../TSqlDurableOutputLeaseRenewalTests.cs | 0 .../TSqlDurableOutputPersistenceTests.cs | 0 ...qlDurableOutputProviderIntegrationTests.cs | 0 .../TSqlDurableOutputRetentionTests.cs | 0 .../TSqlDurableOutputSchemaTests.cs | 0 .../TSqlDurableOutputStatusTests.cs | 0 .../TSqlDurableOutputTestSupport.cs | 0 .../TSqlIntegrationEnvironment.cs | 0 .../TSqlIntegrationEnvironmentTests.cs | 0 .../TSqlTestDatabase.cs | 0 .../TSqlTestDatabaseTests.cs | 0 .../run-integration.ps1 | 0 .../xunit.runner.json | 0 ....Workflow.ContainerIntegrationTests.csproj | 38 + .../HttpCaptureProbe.cs | 79 + .../MqttBrokerFixture.cs | 65 + .../MqttToHttpContainerIntegrationTests.cs | 135 + .../README.md | 12 + tests/README.md | 37 + .../ExternalSmokeFactAttribute.cs | 20 + ...luxFlow.Workflow.ExternalSmokeTests.csproj | 37 + .../HttpCaptureProbe.cs | 85 + .../MqttToHttpExternalSettings.cs | 57 + .../MqttToHttpExternalSmokeTests.cs | 141 + .../README.md | 16 + .../CanonicalApplicationTestHost.cs | 0 .../CanonicalTestApplication.cs | 0 .../ComponentCatalogTestHost.cs | 0 .../ComponentDesignMetadataAssertions.cs | 0 .../FluxFlow.Testing/FluxFlow.Testing.csproj | 17 + ...FluxFlow.Expressions.Jsonata.Tests.csproj} | 13 +- .../JsonataFlowExpressionEngineTests.cs | 103 + .../FlowGraphHostingTests.cs | 0 .../FluxFlow.Fluent.Hosting.Tests.csproj | 8 +- .../TestNodes.cs | 0 .../FluxFlow.Fluent.Tests/FlowBuilderTests.cs | 0 .../FlowObservationTests.cs | 0 .../FluxFlow.Fluent.Tests/FlowSegmentTests.cs | 0 .../FluxFlow.Fluent.Tests.csproj | 24 + .../FluxFlow.Fluent.Tests/TestFlowNodes.cs | 0 ...ertionsServiceCollectionExtensionsTests.cs | 16 +- ...onents.Assertions.Composition.Tests.csproj | 31 + .../AssertionNodeTests.cs | 35 +- ...luxFlow.Components.Assertions.Tests.csproj | 8 +- .../RecordingExpressionEngine.cs | 0 .../ComponentDesignDeclarationTests.cs | 0 .../ComponentDesignMetadataCatalogTests.cs | 10 +- .../ComponentResourcePickerHintsTests.cs | 0 .../DesignedComponentBindingBuilderTests.cs | 115 +- .../DesignerApplicationPersistenceTests.cs | 0 .../EventDesignMetadataTests.cs | 68 + .../FluxFlow.Components.Designer.Tests.csproj | 8 +- ...xFlowDesignedComponentRegistrationTests.cs | 4 +- .../InputShapeMetadataTests.cs | 36 + .../PortDesignMetadataAttributesTests.cs | 0 ...tationsServiceCollectionExtensionsTests.cs | 20 +- ...ents.Expectations.Composition.Tests.csproj | 31 + .../EventExpectationNodeTests.cs | 85 +- ...xFlow.Components.Expectations.Tests.csproj | 8 +- ...eSystemServiceCollectionExtensionsTests.cs | 92 +- ...onents.FileSystem.Composition.Tests.csproj | 30 + .../BoundedFileReaderTests.cs | 0 .../DirectoryEnumerateNodeTests.cs | 14 +- .../FileSystemPathConfinementTests.cs | 14 +- .../FileSystemTestHelpers.cs | 13 + .../FileWatchNodeTests.cs | 13 +- .../FlowContentFileSystemNodeTests.cs | 90 +- ...luxFlow.Components.FileSystem.Tests.csproj | 6 +- ...ow.Components.Http.AspNetCore.Tests.csproj | 10 +- .../HttpRequestContextTests.cs | 0 .../HttpTriggerEndpointTests.cs | 19 +- ...w.Components.Http.Composition.Tests.csproj | 28 + .../HttpServiceCollectionExtensionsTests.cs | 23 +- .../FluxFlow.Components.Http.Tests.csproj} | 7 +- .../HttpClientNodeTests.cs | 124 +- .../HttpClientRequestMaterializerTests.cs | 44 + ...omponents.Mapping.Composition.Tests.csproj | 30 + ...MappingServiceCollectionExtensionsTests.cs | 14 +- .../FlowMapperNodeTests.cs | 45 +- .../FluxFlow.Components.Mapping.Tests.csproj | 8 +- .../PostponedTargetBlock.cs | 0 ...omponents.Metrics.Composition.Tests.csproj | 29 + ...MetricsServiceCollectionExtensionsTests.cs | 16 +- .../FluxFlow.Components.Metrics.Tests.csproj | 6 +- .../MetricsAggregateNodeTests.cs | 123 +- .../MetricsContractTests.cs | 0 .../MetricsOptionsTests.cs | 0 ...Flow.Components.Mqtt.Adapters.Tests.csproj | 6 +- .../MqttAdapterRegistrationTests.cs | 0 .../MqttTransportAdapterConformanceTests.cs | 0 ...w.Components.Mqtt.Composition.Tests.csproj | 28 + ...MqttApplicationDefinitionAuthoringTests.cs | 12 +- .../MqttFluentCaptureAuthoringTests.cs | 0 .../MqttServiceCollectionExtensionsTests.cs | 18 +- ...xFlow.Components.Mqtt.MqttNet.Tests.csproj | 4 +- .../MqttNetMessageMapperTests.cs | 0 .../MqttNetTransportSessionTests.cs | 0 .../VNextRecordingMqttNetClient.cs | 0 ...low.Components.Mqtt.PulseMqtt.Tests.csproj | 4 +- .../PulseMqttMessageMapperTests.cs | 0 .../PulseMqttTransportSessionTests.cs | 0 .../FluxFlow.Components.Mqtt.Tests.csproj | 6 +- .../MqttBrokerConfigurationTests.cs | 0 .../MqttClientControllerTests.cs | 114 +- .../MqttContractTests.cs | 0 .../MqttPublishMessageMaterializerTests.cs | 43 + .../MqttTestContext.cs | 0 .../MqttTopicValidatorTests.cs | 0 .../TrackingFakeTimeProvider.cs | 0 .../VNextRecordingMqttTransport.cs | 0 ...nts.Observability.Composition.Tests.csproj | 31 + ...abilityServiceCollectionExtensionsTests.cs | 16 +- ...Flow.Components.Observability.Tests.csproj | 8 +- .../ObservabilityNodeTests.cs | 58 +- .../RecordingExpressionEngine.cs | 0 ...mponents.Payloads.Composition.Tests.csproj | 29 + ...ayloadsServiceCollectionExtensionsTests.cs | 21 +- .../FluxFlow.Components.Payloads.Tests.csproj | 6 +- .../PayloadInspectNodeTests.cs | 64 +- ...nents.Projections.Composition.Tests.csproj | 29 + ...ectionsServiceCollectionExtensionsTests.cs | 16 +- .../EventProjectionNodeTests.cs | 81 +- ...uxFlow.Components.Projections.Tests.csproj | 6 +- .../ProjectionContractTests.cs | 0 .../CorrelatedRequestTrackerTests.cs | 0 ...xFlow.Components.RequestReply.Tests.csproj | 6 +- .../RequestReplyCoordinatorTests.cs | 26 +- ...onents.Resilience.Composition.Tests.csproj | 26 + ...ilienceServiceCollectionExtensionsTests.cs | 7 +- .../FlowRetryNodeTests.cs | 10 +- ...luxFlow.Components.Resilience.Tests.csproj | 6 +- ...omponents.Routing.Composition.Tests.csproj | 30 + ...RoutingServiceCollectionExtensionsTests.cs | 53 +- .../CorrelationNodeRuntimeTests.cs | 6 +- .../CorrelationPendingStoreTests.cs | 0 .../FluxFlow.Components.Routing.Tests.csproj | 8 +- .../JoinNodeRuntimeTests.cs | 4 +- .../JoinPendingStoreTests.cs | 0 .../JsonRoutingNodeTests.cs | 10 +- .../PostponedTargetBlock.cs | 0 .../RoutingTestSink.cs | 0 .../ThrowingTimeProvider.cs | 0 .../TrackingFakeTimeProvider.cs | 0 .../WindowNodeRuntimeTests.cs | 6 +- ...nts.Serialization.Composition.Tests.csproj | 30 + ...izationServiceCollectionExtensionsTests.cs | 16 +- ...Flow.Components.Serialization.Tests.csproj | 6 +- .../SerializationNodeTests.cs | 100 +- ...mponents.Sessions.Composition.Tests.csproj | 30 + ...essionsServiceCollectionExtensionsTests.cs | 77 +- .../FluxFlow.Components.Sessions.Tests.csproj | 6 +- .../SessionComponentTests.cs | 158 +- .../SessionContractTests.cs | 0 .../SessionOptionsTests.cs | 0 .../TrackingFakeTimeProvider.cs | 0 ...omponents.Sources.Composition.Tests.csproj | 30 + ...SourcesServiceCollectionExtensionsTests.cs | 28 +- .../FluxFlow.Components.Sources.Tests.csproj | 6 +- .../GeneratedSourceNodeTests.cs | 29 +- .../PostponedTargetBlock.cs | 0 .../SequenceSourceNodeTests.cs | 22 +- .../SourcesTestSink.cs | 0 .../TrackingFakeTimeProvider.cs | 0 ....Components.State.Composition.Tests.csproj | 31 + .../StateServiceCollectionExtensionsTests.cs | 26 +- .../FluxFlow.Components.State.Tests.csproj | 8 +- .../StateContractTests.cs | 0 .../StateOptionsTests.cs | 0 .../StateReducerNodeTests.cs | 145 +- ...w.Components.Storage.Adapters.Tests.csproj | 6 +- .../StorageAdapterRegistrationTests.cs | 0 ...omponents.Storage.Composition.Tests.csproj | 29 + ...StorageServiceCollectionExtensionsTests.cs | 42 +- .../FileSystemStorageStoreTests.cs | 9 +- ...Components.Storage.FileSystem.Tests.csproj | 6 +- ...ow.Components.Storage.SqlFile.Tests.csproj | 6 +- .../SqlFileStorageStoreTests.cs | 9 +- .../FluxFlow.Components.Storage.Tests.csproj | 6 +- .../InMemoryStorageStore.cs | 0 .../StorageComponentOptionsTests.cs | 0 .../StorageNodeOptionsTests.cs | 0 .../StorageNodeTests.cs | 127 +- .../StorageOutputContractTests.cs | 0 .../StorageRequestContractTests.cs | 0 .../StorageTestSink.cs | 0 ...Components.Timers.Composition.Tests.csproj | 30 + .../TimersServiceCollectionExtensionsTests.cs | 20 +- .../CronScheduleTests.cs | 0 .../FluxFlow.Components.Timers.Tests.csproj | 6 +- .../TimerCanonicalNodeTests.cs | 4 +- .../TimerDebounceNodeTests.cs | 6 +- .../TimerDelayNodeTests.cs | 6 +- .../TimerIntervalNodeTests.cs | 6 +- .../TimerScheduleNodeTests.cs | 6 +- .../TimerTestSink.cs | 0 .../TimerThrottleNodeTests.cs | 6 +- .../TrackingFakeTimeProvider.cs | 0 ...onents.Validation.Composition.Tests.csproj | 30 + ...idationServiceCollectionExtensionsTests.cs | 10 +- ...luxFlow.Components.Validation.Tests.csproj | 6 +- .../JsonSchemaValidatorNodeTests.cs | 72 +- .../ApplicationAddressTests.cs | 0 .../ApplicationDefinitionAuthoringTests.cs | 0 ...ApplicationDefinitionFluentCaptureTests.cs | 0 .../ApplicationDefinitionJsonTests.cs | 0 .../ApplicationLinkCompilerParityTests.cs | 293 ++ .../ApplicationLinkCompilerTests.cs | 6 +- .../ComponentDescriptorTests.cs | 0 .../ComponentEventTests.cs | 34 +- .../ComponentInputShapeTests.cs | 109 + .../ComposedNodeTests.cs | 0 .../CompositionNodeFactoryContextTests.cs | 0 .../CompositionRuntimeReliabilityTests.cs | 2 +- .../FluxFlow.Composition.Tests.csproj | 6 +- .../FluxFlowRegistrationBuilderTests.cs | 2 +- .../RuntimeComponentBindingBuilderTests.cs | 154 +- .../TestCompositionNodes.cs | 12 +- ...TypedCodeFirstApplicationAuthoringTests.cs | 12 +- ...edCodeFirstApplicationLinkCompilerTests.cs | 0 .../TypedCodeFirstResourceAuthoringTests.cs | 0 .../FluxFlow.Coordination.Tests.csproj | 4 +- .../PendingExchangeCoordinatorTests.cs | 0 .../FluxFlow.Resilience.Tests.csproj | 4 +- .../FluxFlow.Resilience.Tests/RetryTests.cs | 0 .../FlowAdapterTests.cs | 0 .../FlowMapContextTests.cs | 0 .../FluxFlow.Mapping.Tests.csproj | 4 +- .../CorrelationIdTests.cs | 0 .../Data/FlowContentTests.cs | 0 .../Data/FlowErrorTests.cs | 0 .../FlowEventMessageTests.cs | 55 + .../FluxFlow.Nodes.Tests/FlowEventTests.cs | 0 .../FlowFaultAndDrainHookTests.cs | 0 .../FluxFlow.Nodes.Tests/FlowMessageTests.cs | 45 + .../FlowMultiOutputAndSourceTests.cs | 2 +- .../FluxFlow.Nodes.Tests/FlowNodeTests.cs | 2 +- .../FluxFlow.Nodes.Tests/FlowOptionsTests.cs | 0 .../FluxFlow.Nodes.Tests/FlowOutputTests.cs | 0 .../FluxFlow.Nodes.Tests/FlowValueTests.cs | 157 + .../FluxFlow.Nodes.Tests.csproj | 4 +- .../ReliableOutputTestTargets.cs | 0 ...w.Engine.DurableInput.SqlFile.Tests.csproj | 4 +- .../SqlFileDeadLetterSchemaAssertions.cs | 0 ...FileDurableInputDeadLetterBoundaryTests.cs | 0 ...ileDurableInputDeadLetterMigrationTests.cs | 0 ...leDurableInputDeadLetterOperationsTests.cs | 0 ...bleInputDeadLetterStoreConformanceTests.cs | 0 ...urableInputLeaseRenewalPersistenceTests.cs | 0 ...eInputLeaseRenewalStoreConformanceTests.cs | 0 .../SqlFileDurableInputRegistrationTests.cs | 0 ...ableInputRetentionStoreConformanceTests.cs | 0 .../SqlFileDurableInputRetentionTests.cs | 0 ...DurableInputStatusStoreConformanceTests.cs | 0 .../SqlFileDurableInputStatusTests.cs | 0 ...qlFileDurableInputStoreConcurrencyTests.cs | 0 ...qlFileDurableInputStoreConformanceTests.cs | 0 .../SqlFileDurableInputStoreOptionsTests.cs | 0 ...qlFileDurableInputStorePersistenceTests.cs | 0 ...urableInputStoreSchemaAndLifecycleTests.cs | 0 .../SqlFileDurableInputTestData.cs | 0 .../SqlFileVersionOneDatabase.cs | 0 .../TemporarySqliteDatabase.cs | 0 ...Flow.Engine.DurableInput.TSql.Tests.csproj | 4 +- .../TSqlDurableInputPackageBoundaryTests.cs | 0 ...qlDurableInputPreflightAndDisposalTests.cs | 0 .../TSqlDurableInputRegistrationTests.cs | 0 .../TSqlDurableInputStoreOptionsTests.cs | 0 .../TSqlDurableInputTestData.cs | 0 .../DurableApplicationInputsTests.cs | 0 .../DurableInputBoundaryTests.cs | 9 +- .../DurableInputCompletionTestSource.cs | 0 .../DurableInputCompletionTests.cs | 0 .../DurableInputContractTests.cs | 0 .../DurableInputDeadLetterContractTests.cs | 0 ...bleInputDeadLetterStoreConformanceTests.cs | 0 .../DurableInputDeadLetterStoreTestContext.cs | 0 .../DurableInputDispatcherTests.cs | 0 .../DurableInputInstrumentationTests.cs | 0 ...eInputLeaseRenewalStoreConformanceTests.cs | 0 ...urableInputLeaseRenewalStoreTestContext.cs | 0 .../DurableInputRegistrationTests.cs | 0 .../DurableInputRetentionContractTests.cs | 0 ...ableInputRetentionStoreConformanceTests.cs | 0 .../DurableInputRetentionStoreTestContext.cs | 0 .../DurableInputStatusContractsTests.cs | 0 ...DurableInputStatusStoreConformanceTests.cs | 0 .../DurableInputStatusStoreTestContext.cs | 0 .../DurableInputStoreConformanceData.cs | 0 .../DurableInputStoreConformanceTests.cs | 0 .../DurableInputStoreContractTests.cs | 0 .../DurableInputStoreTestContext.cs | 0 .../DurableInputTestApplication.cs | 0 .../DurableInputTestData.cs | 0 .../DurableInputTestStore.cs | 0 ...eInputWorkflowCompletionDispatcherTests.cs | 0 .../FluxFlow.Engine.DurableInput.Tests.csproj | 4 +- .../RecordingLogger.cs | 0 ....Engine.DurableOutput.SqlFile.Tests.csproj | 6 +- ...lFileDurableInputOutputCoexistenceTests.cs | 0 ...ableOutputDeadLetterInfrastructureTests.cs | 0 ...leOutputDeadLetterStoreConformanceTests.cs | 0 ...urableOutputDeliveryInfrastructureTests.cs | 0 ...SqlFileDurableOutputDeliverySchemaTests.cs | 0 ...ableOutputDeliveryStoreConformanceTests.cs | 0 .../SqlFileDurableOutputLeaseRenewalTests.cs | 0 .../SqlFileDurableOutputRegistrationTests.cs | 0 ...bleOutputRetentionStoreConformanceTests.cs | 0 .../SqlFileDurableOutputRetentionTests.cs | 0 ...urableOutputStatusStoreConformanceTests.cs | 0 .../SqlFileDurableOutputStatusTests.cs | 0 ...lFileDurableOutputStoreConcurrencyTests.cs | 0 ...lFileDurableOutputStoreConformanceTests.cs | 0 .../SqlFileDurableOutputStoreOptionsTests.cs | 0 ...lFileDurableOutputStorePersistenceTests.cs | 0 ...rableOutputStoreSchemaAndLifecycleTests.cs | 0 .../SqlFileDurableOutputTestData.cs | 0 .../SqlFileDurableOutputTestDatabase.cs | 0 .../TemporarySqliteDatabase.cs | 0 ...low.Engine.DurableOutput.TSql.Tests.csproj | 4 +- .../TSqlDurableOutputPackageBoundaryTests.cs | 0 ...lDurableOutputPreflightAndDisposalTests.cs | 0 .../TSqlDurableOutputRegistrationTests.cs | 0 .../TSqlDurableOutputStoreOptionsTests.cs | 0 .../TSqlDurableOutputTestData.cs | 0 .../DurableOutputCaptureTests.cs | 0 .../DurableOutputContentComparisonTests.cs | 0 .../DurableOutputContractTests.cs | 0 .../DurableOutputDeadLetterContractTests.cs | 0 ...leOutputDeadLetterStoreConformanceTests.cs | 0 ...DurableOutputDeadLetterStoreTestContext.cs | 0 .../DurableOutputDeliveryContractTests.cs | 0 .../DurableOutputDeliveryDispatcherTests.cs | 0 .../DurableOutputDeliveryRegistrationTests.cs | 0 ...ableOutputDeliveryStoreConformanceTests.cs | 0 .../DurableOutputDeliveryStoreTestContext.cs | 0 .../DurableOutputInstrumentationTests.cs | 0 .../DurableOutputRegistrationTests.cs | 0 .../DurableOutputRetentionContractTests.cs | 0 ...bleOutputRetentionStoreConformanceTests.cs | 0 .../DurableOutputRetentionStoreTestContext.cs | 0 .../DurableOutputStatusContractsTests.cs | 0 ...urableOutputStatusStoreConformanceTests.cs | 0 .../DurableOutputStatusStoreTestContext.cs | 0 .../DurableOutputStoreConformanceData.cs | 0 .../DurableOutputStoreConformanceTests.cs | 0 .../DurableOutputStoreTestContext.cs | 0 .../DurableOutputTestData.cs | 0 ...FluxFlow.Engine.DurableOutput.Tests.csproj | 4 +- .../RecordingDurableOutputStore.cs | 0 .../FluxFlow.Engine.HealthChecks.Tests.csproj | 4 +- .../FluxFlowApplicationHealthCheckTests.cs | 0 .../FluxFlowHealthCheckRegistrationTests.cs | 0 .../ApplicationActivityTests.cs | 63 + .../ApplicationDefinitionSourcesTests.cs | 0 .../ApplicationEventStreamTests.cs | 239 ++ .../ApplicationEventsTests.cs | 277 ++ .../ApplicationOutputCaptureTests.cs | 4 +- .../ApplicationPortHandleTests.cs | 1 + .../ApplicationPortRuntimeTests.cs | 152 +- ...ApplicationResourceContractRuntimeTests.cs | 0 .../ApplicationRevisionPlannerTests.cs | 0 ...ssemblerTestServiceCollectionExtensions.cs | 0 .../ApplicationRuntimeAssemblerTests.cs | 16 +- .../ApplicationRuntimeConcurrencyTests.cs | 0 .../ApplicationRuntimeSignalsTests.cs | 197 +- ...CompositionServiceProviderSnapshotTests.cs | 0 .../FluxFlow.Engine.Tests.csproj | 4 +- .../FluxFlowApplicationRegistrationTests.cs | 0 .../FluxFlowApplicationTests.cs | 0 .../BespokeClockInterfaceTests.cs | 7 +- .../CanonicalCleanupLedgerTests.cs | 0 ...irstApplicationAuthoringConventionTests.cs | 5 +- ...onentCompositionMetadataConventionTests.cs | 0 ...ComponentFamilyAuthoringConventionTests.cs | 6 +- .../ComponentFamilyRegistrationMatrixTests.cs | 85 +- .../ComponentPackageBoundaryTests.cs | 0 .../DocumentationBoundaryTests.cs | 6 +- .../DurabilityPackageVersionTests.cs | 12 +- .../FluxFlow.Release.Tests.csproj | 42 + .../HealthReadinessConventionTests.cs | 13 +- .../LinkOwnershipBoundaryTests.cs | 13 +- .../MqttPortableTransportConventionTests.cs | 18 +- .../NodeDataBoundaryTests.cs | 2 +- .../PackageArchiveInspectScriptTests.cs | 0 ...PackageBinaryCompatPreflightScriptTests.cs | 0 .../PackageBinaryCompatibilityPolicyTests.cs | 0 .../PackageConsumerAcceptanceScriptTests.cs | 2 +- .../PackageConsumerSmokeScriptTests.cs | 0 .../PackageFeedVerifyScriptTests.cs | 0 .../PackageListScriptTests.cs | 0 .../FluxFlow.Release.Tests/PackageManifest.cs | 0 .../PackageManifestTests.cs | 0 .../PackageProjectConventionTests.cs | 0 .../PackagePublishWorkflowTests.cs | 68 + .../PackageReleaseAvailabilityScriptTests.cs | 0 .../PackageReleaseDryRunScriptTests.cs | 0 .../PackageReleasePlanScriptTests.cs | 0 .../PackageReleasePreflightScriptTests.cs | 0 .../PackageReleaseTagScriptTests.cs | 0 .../PerformanceHardeningConventionTests.cs | 12 +- .../PublicApiBaselineTests.cs | 0 .../ReleaseOperatorNoteTests.cs | 0 .../ReleaseProcessCollection.cs | 0 .../ReleaseScriptRunner.cs | 0 .../ReleaseScriptTests.cs | 3 +- .../ReleaseTestPaths.cs | 0 .../ReleaseTestProcess.cs | 0 .../ReleaseTestProcessTests.cs | 0 .../SampleDocumentationTests.cs | 0 .../StandaloneCompositionBoundaryTests.cs | 0 .../TestLayoutConventionTests.cs | 79 + .../TypedComponentAuthoringConventionTests.cs | 88 +- ...Flow.ComponentPackageTemplate.Tests.csproj | 23 + .../ManualTimeProvider.cs | 0 .../TemplateEnrichNodeTests.cs | 4 +- .../DesignerHostCatalogTests.cs | 49 + .../FluxFlow.DesignerHost.Tests.csproj | 8 +- .../ValidationMessageMapperTests.cs | 0 .../FluxFlow.ReportingSample.Tests.csproj} | 9 +- .../ReportArchiveTests.cs | 513 +++ .../ReportingCatalogTests.cs | 146 + .../ReportingFilterTests.cs | 191 ++ 1456 files changed, 23829 insertions(+), 6603 deletions(-) create mode 100644 docs/40-flow-value-runtime-migration-execution.md create mode 100644 docs/44-reporting-foundation-design.md create mode 100644 docs/45-reporting-consumer-guide.md create mode 100644 docs/48-canonical-event-migration.md create mode 100644 docs/49-canonical-package-release-train.md create mode 100644 eng/test.ps1 create mode 100644 samples/FluxFlow.ReportingSample/ApplicationReportCatalog.cs create mode 100644 samples/FluxFlow.ReportingSample/ApplicationReportContracts.cs create mode 100644 samples/FluxFlow.ReportingSample/ApplicationReportFilter.cs create mode 100644 samples/FluxFlow.ReportingSample/ApplicationReportServiceCollectionExtensions.cs rename tests/FluxFlow.Testing/FluxFlow.Testing.csproj => samples/FluxFlow.ReportingSample/FluxFlow.ReportingSample.csproj (54%) create mode 100644 samples/FluxFlow.ReportingSample/IApplicationReport.cs create mode 100644 samples/FluxFlow.ReportingSample/IReportArchive.cs create mode 100644 samples/FluxFlow.ReportingSample/Program.cs create mode 100644 samples/FluxFlow.ReportingSample/QuantityReport.cs create mode 100644 samples/FluxFlow.ReportingSample/README.md create mode 100644 samples/FluxFlow.ReportingSample/ReportArchive.cs create mode 100644 src/Adapters/Expressions/FluxFlow.Expressions.Jsonata/FluxFlow.Expressions.Jsonata.csproj create mode 100644 src/Adapters/Expressions/FluxFlow.Expressions.Jsonata/JsonataFlowExpressionEngine.cs create mode 100644 src/Adapters/Expressions/FluxFlow.Expressions.Jsonata/README.md rename src/{ => Authoring}/FluxFlow.Fluent.Hosting/FlowGraphHostedService.cs (100%) rename src/{ => Authoring}/FluxFlow.Fluent.Hosting/FluxFlow.Fluent.Hosting.csproj (78%) rename src/{ => Authoring}/FluxFlow.Fluent.Hosting/FluxFlowFluentHostingServiceCollectionExtensions.cs (100%) rename src/{ => Authoring}/FluxFlow.Fluent.Hosting/README.md (100%) rename src/{ => Authoring}/FluxFlow.Fluent/CompatibilitySuppressions.xml (64%) rename src/{ => Authoring}/FluxFlow.Fluent/Flow.cs (100%) rename src/{ => Authoring}/FluxFlow.Fluent/FlowBuilder.cs (100%) rename src/{ => Authoring}/FluxFlow.Fluent/FlowGraph.cs (93%) rename src/{ => Authoring}/FluxFlow.Fluent/FlowGraphBuilder.cs (94%) rename src/{ => Authoring}/FluxFlow.Fluent/FlowSegment.cs (100%) rename src/{ => Authoring}/FluxFlow.Fluent/FlowTerminal.cs (100%) rename src/{ => Authoring}/FluxFlow.Fluent/FluxFlow.Fluent.csproj (65%) rename src/{ => Authoring}/FluxFlow.Fluent/README.md (100%) rename src/{ => Components/Assertions}/FluxFlow.Components.Assertions.Composition/AssertionsAuthoringExtensions.cs (86%) rename src/{ => Components/Assertions}/FluxFlow.Components.Assertions.Composition/AssertionsComponentDefinition.cs (100%) rename src/{ => Components/Assertions}/FluxFlow.Components.Assertions.Composition/AssertionsServiceCollectionExtensions.cs (98%) create mode 100644 src/Components/Assertions/FluxFlow.Components.Assertions.Composition/CompatibilitySuppressions.xml rename src/{ => Components/Assertions}/FluxFlow.Components.Assertions.Composition/FluxFlow.Components.Assertions.Composition.csproj (59%) rename src/{ => Components/Assertions}/FluxFlow.Components.Assertions.Composition/README.md (100%) rename src/{ => Components/Assertions}/FluxFlow.Components.Assertions/AssertionErrorCodeNames.cs (100%) rename src/{ => Components/Assertions}/FluxFlow.Components.Assertions/AssertionResultKinds.cs (100%) create mode 100644 src/Components/Assertions/FluxFlow.Components.Assertions/CompatibilitySuppressions.xml rename src/{ => Components/Assertions}/FluxFlow.Components.Assertions/Contracts/AssertionResult.cs (100%) rename src/{ => Components/Assertions}/FluxFlow.Components.Assertions/Diagnostics/AssertionDiagnosticNames.cs (100%) rename src/{ => Components/Assertions}/FluxFlow.Components.Assertions/FluxFlow.Components.Assertions.csproj (63%) rename src/{ => Components/Assertions}/FluxFlow.Components.Assertions/Nodes/AssertionNode.cs (52%) rename src/{ => Components/Assertions}/FluxFlow.Components.Assertions/Options/AssertionOptions.cs (100%) rename src/{ => Components/Assertions}/FluxFlow.Components.Assertions/README.md (100%) create mode 100644 src/Components/Designer/FluxFlow.Components.Designer/CompatibilitySuppressions.xml rename src/{ => Components/Designer}/FluxFlow.Components.Designer/ComponentDesignDeclaration.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/ComponentDesignMetadataCatalog.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/ComponentDesignMetadataFinalizer.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/ComponentDesignMetadataSnapshot.cs (91%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/ComponentDesignMetadataValidator.cs (89%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/ComponentRegistrationBuilder.cs (98%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/ComponentRegistrationExtensions.cs (94%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/ComponentResourcePickerHint.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/ComponentResourcePickerHints.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/ComponentAttributeName.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/ComponentAttributeValue.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/ComponentCategory.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/ComponentDesignMetadata.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/ComponentIconKey.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/ComponentMetadataText.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/ComponentOptionChoiceValue.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/ComponentOptionName.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/ComponentPortGroup.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/ComponentPortName.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/ComponentPreferredNodeName.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/ComponentResourceName.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/ComponentType.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/ComponentValueTypeHint.cs (100%) create mode 100644 src/Components/Designer/FluxFlow.Components.Designer/Contracts/EventDesignMetadata.cs rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/OptionChoiceMetadata.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/OptionDesignMetadata.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/OptionDesignMetadataAttributes.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/OptionValueKind.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/PortDesignMetadata.cs (86%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/PortDesignMetadataAttributes.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/PortDirection.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/ResourceDesignMetadata.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Contracts/ResourceDesignMetadataAttributes.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/DesignedComponentBindingBuilder.cs (71%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/DesignedComponentContract.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/DesignerMetadataValidationError.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/FluxFlow.Components.Designer.csproj (65%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Persistence/DesignerApplicationDocument.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Persistence/DesignerApplicationLink.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Persistence/DesignerApplicationLoadResult.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Persistence/DesignerApplicationPersistence.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Persistence/DesignerComponent.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Persistence/DesignerResource.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Persistence/DesignerResourceNamespace.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Persistence/DesignerResourceNode.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Persistence/DesignerResourceReference.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/Persistence/DesignerWorkflow.cs (100%) rename src/{ => Components/Designer}/FluxFlow.Components.Designer/README.md (94%) create mode 100644 src/Components/Expectations/FluxFlow.Components.Expectations.Composition/CompatibilitySuppressions.xml rename src/{ => Components/Expectations}/FluxFlow.Components.Expectations.Composition/ExpectationsAuthoringExtensions.cs (82%) rename src/{ => Components/Expectations}/FluxFlow.Components.Expectations.Composition/ExpectationsComponentDefinition.cs (100%) rename src/{ => Components/Expectations}/FluxFlow.Components.Expectations.Composition/ExpectationsServiceCollectionExtensions.cs (90%) rename src/{ => Components/Expectations}/FluxFlow.Components.Expectations.Composition/FluxFlow.Components.Expectations.Composition.csproj (55%) rename src/{ => Components/Expectations}/FluxFlow.Components.Expectations.Composition/README.md (100%) create mode 100644 src/Components/Expectations/FluxFlow.Components.Expectations/CompatibilitySuppressions.xml rename src/{ => Components/Expectations}/FluxFlow.Components.Expectations/Contracts/EventExpectationResult.cs (100%) rename src/{ => Components/Expectations}/FluxFlow.Components.Expectations/Contracts/EventExpectationResultKind.cs (100%) rename src/{ => Components/Expectations}/FluxFlow.Components.Expectations/Diagnostics/ExpectationDiagnosticNames.cs (100%) rename src/{ => Components/Expectations}/FluxFlow.Components.Expectations/ExpectationErrorCodeNames.cs (100%) rename src/{ => Components/Expectations}/FluxFlow.Components.Expectations/ExpectationResultKinds.cs (100%) rename src/{ => Components/Expectations}/FluxFlow.Components.Expectations/FluxFlow.Components.Expectations.csproj (58%) rename src/{ => Components/Expectations}/FluxFlow.Components.Expectations/Nodes/EventExpectationNode.cs (89%) rename src/{ => Components/Expectations}/FluxFlow.Components.Expectations/Nodes/EventExpectationNodeKind.cs (100%) rename src/{ => Components/Expectations}/FluxFlow.Components.Expectations/Options/EventExpectationOptions.cs (100%) rename src/{ => Components/Expectations}/FluxFlow.Components.Expectations/README.md (100%) create mode 100644 src/Components/FileSystem/FluxFlow.Components.FileSystem.Composition/CompatibilitySuppressions.xml rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem.Composition/FileSystemAuthoringExtensions.cs (81%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem.Composition/FileSystemComponentDefinition.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem.Composition/FileSystemServiceCollectionExtensions.cs (90%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem.Composition/FluxFlow.Components.FileSystem.Composition.csproj (64%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem.Composition/README.md (100%) create mode 100644 src/Components/FileSystem/FluxFlow.Components.FileSystem/CompatibilitySuppressions.xml rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Contracts/DirectoryEntry.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Contracts/FileChange.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Contracts/FileContentWriteRequest.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Contracts/FileReadContent.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Contracts/FileReadMode.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Contracts/FileReadRequest.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Contracts/FileWriteMode.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Contracts/FileWriteResult.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Diagnostics/FileSystemDiagnosticNames.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Diagnostics/FileSystemEventNames.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/FileSystemErrorCodeNames.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/FileSystemErrorCodes.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/FileSystemResultKinds.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/FluxFlow.Components.FileSystem.csproj (69%) create mode 100644 src/Components/FileSystem/FluxFlow.Components.FileSystem/Materialization/FileSystemRequestMaterializers.cs rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Nodes/BoundedFileReader.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Nodes/DirectoryEnumerateNode.cs (97%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Nodes/FileReadNode.cs (97%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Nodes/FileSystemOperationException.cs (100%) create mode 100644 src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/FileSystemOperationPipeline.cs rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Nodes/FileSystemSourceException.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Nodes/FileSystemSourcePipeline.cs (90%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Nodes/FileWatchNode.cs (97%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Nodes/FileWriteNode.cs (97%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Options/DirectoryEnumerateOptions.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Options/FileReadOptions.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Options/FileSystemPathPolicy.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Options/FileSystemPathResolutionException.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Options/FileSystemPathResolver.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Options/FileWatchNotifyFilters.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Options/FileWatchOptions.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/Options/FileWriteOptions.cs (100%) rename src/{ => Components/FileSystem}/FluxFlow.Components.FileSystem/README.md (100%) create mode 100644 src/Components/Http/FluxFlow.Components.Http.AspNetCore/CompatibilitySuppressions.xml rename src/{ => Components/Http}/FluxFlow.Components.Http.AspNetCore/FluxFlow.Components.Http.AspNetCore.csproj (74%) rename src/{ => Components/Http}/FluxFlow.Components.Http.AspNetCore/FluxFlowHttpTriggerServiceCollectionExtensions.cs (100%) rename src/{ => Components/Http}/FluxFlow.Components.Http.AspNetCore/FluxFlowTriggerEndpointExtensions.cs (100%) rename src/{ => Components/Http}/FluxFlow.Components.Http.AspNetCore/HttpRequestContext.cs (100%) create mode 100644 src/Components/Http/FluxFlow.Components.Http.AspNetCore/HttpTriggerNode.cs rename src/{ => Components/Http}/FluxFlow.Components.Http.AspNetCore/HttpTriggerSource.cs (100%) rename src/{ => Components/Http}/FluxFlow.Components.Http.AspNetCore/README.md (100%) create mode 100644 src/Components/Http/FluxFlow.Components.Http.Composition/CompatibilitySuppressions.xml rename src/{ => Components/Http}/FluxFlow.Components.Http.Composition/FluxFlow.Components.Http.Composition.csproj (65%) rename src/{ => Components/Http}/FluxFlow.Components.Http.Composition/HttpAuthoringExtensions.cs (82%) rename src/{ => Components/Http}/FluxFlow.Components.Http.Composition/HttpComponentDefinition.cs (100%) rename src/{ => Components/Http}/FluxFlow.Components.Http.Composition/HttpServiceCollectionExtensions.cs (90%) rename src/{ => Components/Http}/FluxFlow.Components.Http.Composition/README.md (93%) create mode 100644 src/Components/Http/FluxFlow.Components.Http/CompatibilitySuppressions.xml rename src/{ => Components/Http}/FluxFlow.Components.Http/Contracts/HttpClientRequest.cs (100%) rename src/{ => Components/Http}/FluxFlow.Components.Http/Contracts/HttpResponseResult.cs (100%) rename src/{ => Components/Http}/FluxFlow.Components.Http/Contracts/HttpTriggerReply.cs (100%) rename src/{ => Components/Http}/FluxFlow.Components.Http/Contracts/HttpTriggerRequest.cs (100%) rename src/{ => Components/Http}/FluxFlow.Components.Http/FluxFlow.Components.Http.csproj (65%) rename src/{ => Components/Http}/FluxFlow.Components.Http/HttpErrorCodeNames.cs (100%) rename src/{ => Components/Http}/FluxFlow.Components.Http/HttpResultKinds.cs (100%) create mode 100644 src/Components/Http/FluxFlow.Components.Http/Materialization/HttpClientRequestMaterializer.cs rename src/{ => Components/Http}/FluxFlow.Components.Http/Nodes/HttpClientNode.cs (93%) rename src/{ => Components/Http}/FluxFlow.Components.Http/Options/HttpClientNodeOptions.cs (100%) rename src/{ => Components/Http}/FluxFlow.Components.Http/README.md (55%) create mode 100644 src/Components/Mapping/FluxFlow.Components.Mapping.Composition/CompatibilitySuppressions.xml rename src/{ => Components/Mapping}/FluxFlow.Components.Mapping.Composition/FluxFlow.Components.Mapping.Composition.csproj (61%) rename src/{ => Components/Mapping}/FluxFlow.Components.Mapping.Composition/MappingAuthoringExtensions.cs (87%) rename src/{ => Components/Mapping}/FluxFlow.Components.Mapping.Composition/MappingComponentDefinition.cs (100%) rename src/{ => Components/Mapping}/FluxFlow.Components.Mapping.Composition/MappingServiceCollectionExtensions.cs (98%) rename src/{ => Components/Mapping}/FluxFlow.Components.Mapping.Composition/README.md (100%) create mode 100644 src/Components/Mapping/FluxFlow.Components.Mapping/CompatibilitySuppressions.xml rename src/{ => Components/Mapping}/FluxFlow.Components.Mapping/Contracts/DefaultMappingContextFactory.cs (100%) rename src/{ => Components/Mapping}/FluxFlow.Components.Mapping/Contracts/IMappingContextFactory.cs (100%) rename src/{ => Components/Mapping}/FluxFlow.Components.Mapping/Contracts/MappingNodeContext.cs (100%) rename src/{ => Components/Mapping}/FluxFlow.Components.Mapping/Diagnostics/MappingDiagnosticNames.cs (100%) rename src/{ => Components/Mapping}/FluxFlow.Components.Mapping/FluxFlow.Components.Mapping.csproj (63%) rename src/{ => Components/Mapping}/FluxFlow.Components.Mapping/MappingErrorCodeNames.cs (100%) rename src/{ => Components/Mapping}/FluxFlow.Components.Mapping/MappingResultKinds.cs (100%) rename src/{ => Components/Mapping}/FluxFlow.Components.Mapping/Nodes/FlowMapperNode.cs (52%) rename src/{ => Components/Mapping}/FluxFlow.Components.Mapping/Options/MapperOptions.cs (100%) rename src/{ => Components/Mapping}/FluxFlow.Components.Mapping/README.md (100%) create mode 100644 src/Components/Metrics/FluxFlow.Components.Metrics.Composition/CompatibilitySuppressions.xml rename src/{ => Components/Metrics}/FluxFlow.Components.Metrics.Composition/FluxFlow.Components.Metrics.Composition.csproj (58%) rename src/{ => Components/Metrics}/FluxFlow.Components.Metrics.Composition/MetricsAuthoringExtensions.cs (83%) rename src/{ => Components/Metrics}/FluxFlow.Components.Metrics.Composition/MetricsComponentDefinition.cs (100%) rename src/{ => Components/Metrics}/FluxFlow.Components.Metrics.Composition/MetricsServiceCollectionExtensions.cs (91%) rename src/{ => Components/Metrics}/FluxFlow.Components.Metrics.Composition/README.md (100%) create mode 100644 src/Components/Metrics/FluxFlow.Components.Metrics/CompatibilitySuppressions.xml rename src/{ => Components/Metrics}/FluxFlow.Components.Metrics/Contracts/MetricGroupSnapshot.cs (100%) rename src/{ => Components/Metrics}/FluxFlow.Components.Metrics/Contracts/MetricSampleInput.cs (100%) rename src/{ => Components/Metrics}/FluxFlow.Components.Metrics/Contracts/MetricSnapshotOutput.cs (100%) rename src/{ => Components/Metrics}/FluxFlow.Components.Metrics/Contracts/MetricsContractNormalization.cs (100%) rename src/{ => Components/Metrics}/FluxFlow.Components.Metrics/Diagnostics/MetricsDiagnosticNames.cs (100%) rename src/{ => Components/Metrics}/FluxFlow.Components.Metrics/FluxFlow.Components.Metrics.csproj (64%) create mode 100644 src/Components/Metrics/FluxFlow.Components.Metrics/Materialization/MetricSampleInputMaterializer.cs rename src/{ => Components/Metrics}/FluxFlow.Components.Metrics/MetricsErrorCodeNames.cs (100%) rename src/{ => Components/Metrics}/FluxFlow.Components.Metrics/MetricsErrorCodes.cs (100%) rename src/{ => Components/Metrics}/FluxFlow.Components.Metrics/MetricsResultKinds.cs (100%) rename src/{ => Components/Metrics}/FluxFlow.Components.Metrics/Nodes/MetricsAggregateNode.cs (89%) rename src/{ => Components/Metrics}/FluxFlow.Components.Metrics/Options/MetricsAggregateOptions.cs (100%) rename src/{ => Components/Metrics}/FluxFlow.Components.Metrics/Options/MetricsOptionValidation.cs (100%) rename src/{ => Components/Metrics}/FluxFlow.Components.Metrics/README.md (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.Composition/Authoring/MqttApplicationAuthoringExtensions.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.Composition/Authoring/MqttComponentAuthoring.cs (79%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.Composition/Authoring/MqttResourceAuthoring.cs (100%) create mode 100644 src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/CompatibilitySuppressions.xml rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.Composition/FluxFlow.Components.Mqtt.Composition.csproj (70%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.Composition/IMqttInlineSecretPolicy.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttClientResourceBinding.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttComponentDefinition.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionConfigurationConverter.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionNodeFactories.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionResourceIndex.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionResourceRegistrar.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionResourceValidator.cs (100%) create mode 100644 src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttEventDesignMetadata.cs rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttEventsCompositionOptions.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttPublishCompositionOptions.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttServiceCollectionExtensions.cs (84%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttTriggerCompositionOptions.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.Composition/README.md (99%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.MqttNet/FluxFlow.Components.Mqtt.MqttNet.csproj (81%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.MqttNet/MqttNetMessageMapper.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.MqttNet/MqttNetTransportFactory.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.MqttNet/MqttNetTransportSession.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.MqttNet/README.md (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/FluxFlow.Components.Mqtt.PulseMqtt.csproj (81%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/PulseMqttMessageMapper.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/PulseMqttTransportFactory.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/PulseMqttTransportSession.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/README.md (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Acknowledgements/MqttAcknowledgementPolicies.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Client/IMqttClientController.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientCommandDispatcher.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientConfigurationValidator.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientConnectionLifecycle.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientController.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientErrors.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientEventHub.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientOperation.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientOperationException.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientRequest.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientResult.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientResultFactory.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientRuntime.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientStatus.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientSubscriptionState.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Client/MqttReceivedMessageDispatcher.cs (100%) create mode 100644 src/Components/Mqtt/FluxFlow.Components.Mqtt/CompatibilitySuppressions.xml rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttBrokerConfiguration.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttBrokerTransport.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttClientCertificate.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttClientConfiguration.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttCredentialConfiguration.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttReconnectConfiguration.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttRetryPolicy.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Contracts/MqttPublishMessage.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Contracts/MqttQos.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Contracts/MqttReceivedApplicationMessage.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Events/MqttClientEvent.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Events/MqttClientEventSubscription.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/FluxFlow.Components.Mqtt.csproj (60%) create mode 100644 src/Components/Mqtt/FluxFlow.Components.Mqtt/Materialization/MqttPublishMessageMaterializer.cs rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttClientEventsNode.cs (81%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttControlNode.cs (74%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttPublishOperationNode.cs (58%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttSignalTarget.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttSourcePump.cs (90%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttSubscriptionTriggerNode.cs (96%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Options/MqttControlOptions.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Options/MqttSubscriptionTriggerOptions.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/README.md (98%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttSubscriptionDefinition.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttSubscriptionJsonConverters.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttSubscriptionTarget.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttTopicFilterMatcher.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttTriggerRegistration.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Transport/MqttTransportCapabilities.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Transport/MqttTransportContracts.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Transport/MqttTransportException.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Validation/MqttTopicValidationResult.cs (100%) rename src/{ => Components}/Mqtt/FluxFlow.Components.Mqtt/Validation/MqttTopicValidator.cs (100%) create mode 100644 src/Components/Observability/FluxFlow.Components.Observability.Composition/CompatibilitySuppressions.xml rename src/{ => Components/Observability}/FluxFlow.Components.Observability.Composition/FluxFlow.Components.Observability.Composition.csproj (56%) rename src/{ => Components/Observability}/FluxFlow.Components.Observability.Composition/ObservabilityAuthoringExtensions.cs (82%) rename src/{ => Components/Observability}/FluxFlow.Components.Observability.Composition/ObservabilityComponentDefinition.cs (100%) rename src/{ => Components/Observability}/FluxFlow.Components.Observability.Composition/ObservabilityServiceCollectionExtensions.cs (91%) rename src/{ => Components/Observability}/FluxFlow.Components.Observability.Composition/README.md (100%) create mode 100644 src/Components/Observability/FluxFlow.Components.Observability/CompatibilitySuppressions.xml rename src/{ => Components/Observability}/FluxFlow.Components.Observability/Contracts/FlowCounterSnapshot.cs (100%) rename src/{ => Components/Observability}/FluxFlow.Components.Observability/Contracts/FlowLogEntry.cs (100%) rename src/{ => Components/Observability}/FluxFlow.Components.Observability/Contracts/FlowLogLevel.cs (100%) rename src/{ => Components/Observability}/FluxFlow.Components.Observability/Contracts/FlowMetricSnapshot.cs (100%) rename src/{ => Components/Observability}/FluxFlow.Components.Observability/Contracts/IObservabilityValueSelector.cs (100%) rename src/{ => Components/Observability}/FluxFlow.Components.Observability/Contracts/ObservabilityNodeContext.cs (100%) rename src/{ => Components/Observability}/FluxFlow.Components.Observability/Diagnostics/ObservabilityDiagnosticNames.cs (100%) rename src/{ => Components/Observability}/FluxFlow.Components.Observability/FluxFlow.Components.Observability.csproj (60%) create mode 100644 src/Components/Observability/FluxFlow.Components.Observability/Nodes/CanonicalObservabilityNode.cs rename src/{ => Components/Observability}/FluxFlow.Components.Observability/Nodes/FlowCounterNode.cs (87%) rename src/{ => Components/Observability}/FluxFlow.Components.Observability/Nodes/FlowLoggerNode.cs (93%) rename src/{ => Components/Observability}/FluxFlow.Components.Observability/Nodes/FlowMetricsNode.cs (91%) rename src/{ => Components/Observability}/FluxFlow.Components.Observability/Nodes/ObservabilityPipeline.cs (100%) rename src/{ => Components/Observability}/FluxFlow.Components.Observability/ObservabilityErrorCodeNames.cs (100%) rename src/{ => Components/Observability}/FluxFlow.Components.Observability/ObservabilityResultKinds.cs (100%) rename src/{ => Components/Observability}/FluxFlow.Components.Observability/Options/FlowCounterOptions.cs (100%) rename src/{ => Components/Observability}/FluxFlow.Components.Observability/Options/FlowLoggerOptions.cs (100%) rename src/{ => Components/Observability}/FluxFlow.Components.Observability/Options/FlowMetricsOptions.cs (100%) rename src/{ => Components/Observability}/FluxFlow.Components.Observability/Options/OneOrManyStringJsonConverter.cs (100%) rename src/{ => Components/Observability}/FluxFlow.Components.Observability/README.md (100%) create mode 100644 src/Components/Payloads/FluxFlow.Components.Payloads.Composition/CompatibilitySuppressions.xml rename src/{ => Components/Payloads}/FluxFlow.Components.Payloads.Composition/FluxFlow.Components.Payloads.Composition.csproj (64%) rename src/{ => Components/Payloads}/FluxFlow.Components.Payloads.Composition/PayloadsAuthoringExtensions.cs (84%) rename src/{ => Components/Payloads}/FluxFlow.Components.Payloads.Composition/PayloadsComponentDefinition.cs (100%) rename src/{ => Components/Payloads}/FluxFlow.Components.Payloads.Composition/PayloadsServiceCollectionExtensions.cs (91%) rename src/{ => Components/Payloads}/FluxFlow.Components.Payloads.Composition/README.md (100%) create mode 100644 src/Components/Payloads/FluxFlow.Components.Payloads/CompatibilitySuppressions.xml rename src/{ => Components/Payloads}/FluxFlow.Components.Payloads/Contracts/PayloadInspectionResult.cs (100%) rename src/{ => Components/Payloads}/FluxFlow.Components.Payloads/Contracts/PayloadKind.cs (100%) rename src/{ => Components/Payloads}/FluxFlow.Components.Payloads/Diagnostics/PayloadDiagnosticNames.cs (100%) rename src/{ => Components/Payloads}/FluxFlow.Components.Payloads/FluxFlow.Components.Payloads.csproj (66%) rename src/{ => Components/Payloads}/FluxFlow.Components.Payloads/Nodes/PayloadInspectNode.cs (88%) rename src/{ => Components/Payloads}/FluxFlow.Components.Payloads/Options/PayloadInspectOptions.cs (100%) rename src/{ => Components/Payloads}/FluxFlow.Components.Payloads/PayloadErrorCodeNames.cs (100%) rename src/{ => Components/Payloads}/FluxFlow.Components.Payloads/PayloadInspectionResultKinds.cs (100%) rename src/{ => Components/Payloads}/FluxFlow.Components.Payloads/README.md (100%) create mode 100644 src/Components/Projections/FluxFlow.Components.Projections.Composition/CompatibilitySuppressions.xml rename src/{ => Components/Projections}/FluxFlow.Components.Projections.Composition/FluxFlow.Components.Projections.Composition.csproj (59%) rename src/{ => Components/Projections}/FluxFlow.Components.Projections.Composition/ProjectionsAuthoringExtensions.cs (82%) rename src/{ => Components/Projections}/FluxFlow.Components.Projections.Composition/ProjectionsComponentDefinition.cs (100%) rename src/{ => Components/Projections}/FluxFlow.Components.Projections.Composition/ProjectionsServiceCollectionExtensions.cs (90%) rename src/{ => Components/Projections}/FluxFlow.Components.Projections.Composition/README.md (100%) create mode 100644 src/Components/Projections/FluxFlow.Components.Projections/CompatibilitySuppressions.xml rename src/{ => Components/Projections}/FluxFlow.Components.Projections/Contracts/EventFilter.cs (100%) rename src/{ => Components/Projections}/FluxFlow.Components.Projections/Contracts/EventFilterMatcher.cs (100%) rename src/{ => Components/Projections}/FluxFlow.Components.Projections/Contracts/EventProjectionSnapshot.cs (100%) rename src/{ => Components/Projections}/FluxFlow.Components.Projections/Contracts/EventSummary.cs (100%) rename src/{ => Components/Projections}/FluxFlow.Components.Projections/Contracts/ProjectionContractNormalization.cs (100%) rename src/{ => Components/Projections}/FluxFlow.Components.Projections/Contracts/ProjectionEvent.cs (100%) rename src/{ => Components/Projections}/FluxFlow.Components.Projections/Diagnostics/ProjectionDiagnosticNames.cs (100%) rename src/{ => Components/Projections}/FluxFlow.Components.Projections/FluxFlow.Components.Projections.csproj (65%) create mode 100644 src/Components/Projections/FluxFlow.Components.Projections/Materialization/ProjectionEventMaterializer.cs rename src/{ => Components/Projections}/FluxFlow.Components.Projections/Nodes/EventProjectionNode.cs (83%) rename src/{ => Components/Projections}/FluxFlow.Components.Projections/Options/EventProjectionOptions.cs (100%) rename src/{ => Components/Projections}/FluxFlow.Components.Projections/ProjectionErrorCodeNames.cs (100%) rename src/{ => Components/Projections}/FluxFlow.Components.Projections/ProjectionResultKinds.cs (100%) rename src/{ => Components/Projections}/FluxFlow.Components.Projections/ProjectionsErrorCodes.cs (100%) rename src/{ => Components/Projections}/FluxFlow.Components.Projections/README.md (100%) create mode 100644 src/Components/RequestReply/FluxFlow.Components.RequestReply/CompatibilitySuppressions.xml rename src/{ => Components/RequestReply}/FluxFlow.Components.RequestReply/CorrelatedRequestTracker.cs (100%) rename src/{ => Components/RequestReply}/FluxFlow.Components.RequestReply/CorrelatedRequestTrackerOptions.cs (100%) rename src/{ => Components/RequestReply}/FluxFlow.Components.RequestReply/FluxFlow.Components.RequestReply.csproj (64%) rename src/{ => Components/RequestReply}/FluxFlow.Components.RequestReply/IRequestContext.cs (100%) rename src/{ => Components/RequestReply}/FluxFlow.Components.RequestReply/README.md (100%) rename src/{ => Components/RequestReply}/FluxFlow.Components.RequestReply/RequestReplyCoordinator.cs (98%) rename src/{ => Components/RequestReply}/FluxFlow.Components.RequestReply/RequestReplyOptions.cs (100%) create mode 100644 src/Components/Resilience/FluxFlow.Components.Resilience.Composition/CompatibilitySuppressions.xml rename src/{ => Components/Resilience}/FluxFlow.Components.Resilience.Composition/FluxFlow.Components.Resilience.Composition.csproj (58%) rename src/{ => Components/Resilience}/FluxFlow.Components.Resilience.Composition/README.md (100%) rename src/{ => Components/Resilience}/FluxFlow.Components.Resilience.Composition/ResilienceAuthoringExtensions.cs (89%) rename src/{ => Components/Resilience}/FluxFlow.Components.Resilience.Composition/ResilienceComponentDefinition.cs (100%) rename src/{ => Components/Resilience}/FluxFlow.Components.Resilience.Composition/ResilienceServiceCollectionExtensions.cs (90%) create mode 100644 src/Components/Resilience/FluxFlow.Components.Resilience/CompatibilitySuppressions.xml rename src/{ => Components/Resilience}/FluxFlow.Components.Resilience/Contracts/RetrySignal.cs (100%) rename src/{ => Components/Resilience}/FluxFlow.Components.Resilience/Diagnostics/RetryDiagnosticNames.cs (100%) rename src/{ => Components/Resilience}/FluxFlow.Components.Resilience/FluxFlow.Components.Resilience.csproj (54%) create mode 100644 src/Components/Resilience/FluxFlow.Components.Resilience/Nodes/FlowRetryNode.cs create mode 100644 src/Components/Resilience/FluxFlow.Components.Resilience/Nodes/FlowValueRetryNode.cs rename src/{ => Components/Resilience}/FluxFlow.Components.Resilience/Nodes/RetryAttemptKey.cs (100%) rename src/{ => Components/Resilience}/FluxFlow.Components.Resilience/Nodes/RetryFeedback.cs (100%) create mode 100644 src/Components/Resilience/FluxFlow.Components.Resilience/Nodes/RetryOperationCoordinator.cs rename src/{ => Components/Resilience}/FluxFlow.Components.Resilience/Nodes/RetrySignalTarget.cs (100%) rename src/{ => Components/Resilience}/FluxFlow.Components.Resilience/Options/FlowRetryOptionValidation.cs (100%) rename src/{ => Components/Resilience}/FluxFlow.Components.Resilience/Options/FlowRetryOptions.cs (100%) create mode 100644 src/Components/Resilience/FluxFlow.Components.Resilience/Properties/AssemblyInfo.cs rename src/{ => Components/Resilience}/FluxFlow.Components.Resilience/README.md (100%) rename src/{ => Components/Resilience}/FluxFlow.Components.Resilience/RetryErrorCodeNames.cs (100%) rename src/{ => Components/Resilience}/FluxFlow.Components.Resilience/RetryResultKinds.cs (100%) create mode 100644 src/Components/Routing/FluxFlow.Components.Routing.Composition/CompatibilitySuppressions.xml rename src/{ => Components/Routing}/FluxFlow.Components.Routing.Composition/FluxFlow.Components.Routing.Composition.csproj (62%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing.Composition/README.md (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing.Composition/RoutingAuthoringExtensions.cs (82%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing.Composition/RoutingComponentDefinition.cs (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing.Composition/RoutingServiceCollectionExtensions.cs (90%) create mode 100644 src/Components/Routing/FluxFlow.Components.Routing/CompatibilitySuppressions.xml rename src/{ => Components/Routing}/FluxFlow.Components.Routing/Contracts/FlowCorrelationMatch.cs (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/Contracts/FlowCorrelationOutcome.cs (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/Contracts/FlowCorrelationTimeout.cs (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/Contracts/FlowJoinOutcome.cs (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/Contracts/FlowJoinResult.cs (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/Contracts/FlowJoinSide.cs (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/Contracts/FlowJoinTimeout.cs (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/Contracts/FlowWindow.cs (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/Contracts/FlowWindowEmitReason.cs (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/Diagnostics/RoutingDiagnosticNames.cs (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/FluxFlow.Components.Routing.csproj (71%) create mode 100644 src/Components/Routing/FluxFlow.Components.Routing/Nodes/CanonicalRoutingNode.cs rename src/{ => Components/Routing}/FluxFlow.Components.Routing/Nodes/CorrelationNode.cs (60%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/Nodes/CorrelationNodeRuntime.cs (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/Nodes/CorrelationPendingStore.cs (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/Nodes/JoinNode.cs (58%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/Nodes/JoinNodeRuntime.cs (99%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/Nodes/JoinPendingStore.cs (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/Nodes/WindowNode.cs (56%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/Nodes/WindowNodeRuntime.cs (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/Options/CorrelationRoutingOptions.cs (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/Options/JoinRoutingOptions.cs (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/Options/WindowRoutingOptions.cs (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/README.md (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/RoutingErrorCodeNames.cs (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/RoutingErrorCodes.cs (100%) rename src/{ => Components/Routing}/FluxFlow.Components.Routing/RoutingResultKinds.cs (100%) create mode 100644 src/Components/Serialization/FluxFlow.Components.Serialization.Composition/CompatibilitySuppressions.xml rename src/{ => Components/Serialization}/FluxFlow.Components.Serialization.Composition/FluxFlow.Components.Serialization.Composition.csproj (63%) rename src/{ => Components/Serialization}/FluxFlow.Components.Serialization.Composition/README.md (100%) rename src/{ => Components/Serialization}/FluxFlow.Components.Serialization.Composition/SerializationAuthoringExtensions.cs (79%) rename src/{ => Components/Serialization}/FluxFlow.Components.Serialization.Composition/SerializationComponentDefinition.cs (100%) rename src/{ => Components/Serialization}/FluxFlow.Components.Serialization.Composition/SerializationServiceCollectionExtensions.cs (77%) create mode 100644 src/Components/Serialization/FluxFlow.Components.Serialization/CompatibilitySuppressions.xml rename src/{ => Components/Serialization}/FluxFlow.Components.Serialization/Diagnostics/SerializationDiagnosticNames.cs (100%) rename src/{ => Components/Serialization}/FluxFlow.Components.Serialization/FluxFlow.Components.Serialization.csproj (68%) rename src/{ => Components/Serialization}/FluxFlow.Components.Serialization/Nodes/Base64DecodeNode.cs (84%) rename src/{ => Components/Serialization}/FluxFlow.Components.Serialization/Nodes/Base64EncodeNode.cs (84%) rename src/{ => Components/Serialization}/FluxFlow.Components.Serialization/Nodes/JsonParseNode.cs (84%) rename src/{ => Components/Serialization}/FluxFlow.Components.Serialization/Nodes/JsonStringifyNode.cs (84%) rename src/{ => Components/Serialization}/FluxFlow.Components.Serialization/Nodes/SerializationConverters.cs (100%) rename src/{ => Components/Serialization}/FluxFlow.Components.Serialization/Nodes/SerializationFailureException.cs (100%) rename src/{ => Components/Serialization}/FluxFlow.Components.Serialization/Nodes/SerializationPipeline.cs (81%) rename src/{ => Components/Serialization}/FluxFlow.Components.Serialization/Nodes/TextDecodeNode.cs (83%) rename src/{ => Components/Serialization}/FluxFlow.Components.Serialization/Nodes/TextEncodeNode.cs (84%) rename src/{ => Components/Serialization}/FluxFlow.Components.Serialization/Options/SerializationNodeOptions.cs (100%) rename src/{ => Components/Serialization}/FluxFlow.Components.Serialization/README.md (100%) rename src/{ => Components/Serialization}/FluxFlow.Components.Serialization/SerializationErrorCodeNames.cs (100%) rename src/{ => Components/Serialization}/FluxFlow.Components.Serialization/SerializationResultKinds.cs (100%) create mode 100644 src/Components/Sessions/FluxFlow.Components.Sessions.Composition/CompatibilitySuppressions.xml rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions.Composition/FluxFlow.Components.Sessions.Composition.csproj (66%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions.Composition/README.md (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions.Composition/SessionsAuthoringExtensions.cs (81%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions.Composition/SessionsComponentDefinition.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions.Composition/SessionsCompositionStoreResolver.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions.Composition/SessionsServiceCollectionExtensions.cs (92%) create mode 100644 src/Components/Sessions/FluxFlow.Components.Sessions/CompatibilitySuppressions.xml rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Contracts/ISessionStore.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Contracts/ISessionStoreFactory.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Contracts/SessionAppendRequest.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Contracts/SessionCompleteRequest.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Contracts/SessionContentContractMap.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Contracts/SessionContentRecord.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Contracts/SessionContentRecordInput.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Contracts/SessionContractNormalization.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Contracts/SessionMetadata.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Contracts/SessionQueryOutcome.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Contracts/SessionQueryRequest.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Contracts/SessionReadRequest.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Contracts/SessionRecord.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Contracts/SessionRecordInput.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Contracts/SessionReplayMode.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Contracts/SessionStartRequest.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Contracts/SessionStoreContext.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Contracts/SessionStoreLease.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Diagnostics/SessionsDiagnosticNames.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/FluxFlow.Components.Sessions.csproj (71%) create mode 100644 src/Components/Sessions/FluxFlow.Components.Sessions/Materialization/SessionRequestMaterializers.cs rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Nodes/SessionContentNodeSupport.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Nodes/SessionContentOperationException.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Nodes/SessionContentRecordMapper.cs (100%) create mode 100644 src/Components/Sessions/FluxFlow.Components.Sessions/Nodes/SessionOperationPipeline.cs rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Nodes/SessionQueryNode.cs (92%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Nodes/SessionRecorderNode.cs (96%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Nodes/SessionReplayNode.cs (97%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Options/SessionOptionValidation.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Options/SessionQueryOptions.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Options/SessionRecorderOptions.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/Options/SessionReplayOptions.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/README.md (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/SessionErrorCodeNames.cs (100%) rename src/{ => Components/Sessions}/FluxFlow.Components.Sessions/SessionResultKinds.cs (100%) create mode 100644 src/Components/Sources/FluxFlow.Components.Sources.Composition/CompatibilitySuppressions.xml rename src/{ => Components/Sources}/FluxFlow.Components.Sources.Composition/FluxFlow.Components.Sources.Composition.csproj (62%) rename src/{ => Components/Sources}/FluxFlow.Components.Sources.Composition/README.md (100%) rename src/{ => Components/Sources}/FluxFlow.Components.Sources.Composition/SourcesAuthoringExtensions.cs (85%) rename src/{ => Components/Sources}/FluxFlow.Components.Sources.Composition/SourcesComponentDefinition.cs (100%) rename src/{ => Components/Sources}/FluxFlow.Components.Sources.Composition/SourcesServiceCollectionExtensions.cs (95%) create mode 100644 src/Components/Sources/FluxFlow.Components.Sources/CompatibilitySuppressions.xml rename src/{ => Components/Sources}/FluxFlow.Components.Sources/Contracts/SequenceItem.cs (100%) rename src/{ => Components/Sources}/FluxFlow.Components.Sources/Diagnostics/SourceDiagnosticNames.cs (100%) rename src/{ => Components/Sources}/FluxFlow.Components.Sources/FluxFlow.Components.Sources.csproj (65%) rename src/{ => Components/Sources}/FluxFlow.Components.Sources/Nodes/GeneratedSourceNode.cs (96%) rename src/{ => Components/Sources}/FluxFlow.Components.Sources/Nodes/SequenceSourceNode.cs (96%) rename src/{ => Components/Sources}/FluxFlow.Components.Sources/Nodes/SourceNodeTiming.cs (100%) rename src/{ => Components/Sources}/FluxFlow.Components.Sources/Options/GeneratedSourceOptions.cs (100%) rename src/{ => Components/Sources}/FluxFlow.Components.Sources/Options/SequenceSourceOptions.cs (100%) rename src/{ => Components/Sources}/FluxFlow.Components.Sources/README.md (100%) create mode 100644 src/Components/State/FluxFlow.Components.State.Composition/CompatibilitySuppressions.xml rename src/{ => Components/State}/FluxFlow.Components.State.Composition/FluxFlow.Components.State.Composition.csproj (58%) rename src/{ => Components/State}/FluxFlow.Components.State.Composition/README.md (100%) rename src/{ => Components/State}/FluxFlow.Components.State.Composition/StateAuthoringExtensions.cs (82%) rename src/{ => Components/State}/FluxFlow.Components.State.Composition/StateComponentDefinition.cs (100%) rename src/{ => Components/State}/FluxFlow.Components.State.Composition/StateReducerConfiguration.cs (100%) rename src/{ => Components/State}/FluxFlow.Components.State.Composition/StateServiceCollectionExtensions.cs (93%) create mode 100644 src/Components/State/FluxFlow.Components.State/CompatibilitySuppressions.xml rename src/{ => Components/State}/FluxFlow.Components.State/Contracts/StateContractNormalization.cs (100%) rename src/{ => Components/State}/FluxFlow.Components.State/Contracts/StateReducerInput.cs (100%) rename src/{ => Components/State}/FluxFlow.Components.State/Contracts/StateReducerOperation.cs (100%) rename src/{ => Components/State}/FluxFlow.Components.State/Contracts/StateReducerResult.cs (100%) rename src/{ => Components/State}/FluxFlow.Components.State/Diagnostics/StateDiagnosticNames.cs (100%) rename src/{ => Components/State}/FluxFlow.Components.State/FluxFlow.Components.State.csproj (59%) create mode 100644 src/Components/State/FluxFlow.Components.State/Materialization/StateReducerInputMaterializer.cs rename src/{ => Components/State}/FluxFlow.Components.State/Nodes/StateReducerNode.cs (85%) rename src/{ => Components/State}/FluxFlow.Components.State/Options/StateOptionValidation.cs (100%) rename src/{ => Components/State}/FluxFlow.Components.State/Options/StateReducerOptions.cs (100%) rename src/{ => Components/State}/FluxFlow.Components.State/README.md (100%) rename src/{ => Components/State}/FluxFlow.Components.State/StateErrorCodeNames.cs (100%) rename src/{ => Components/State}/FluxFlow.Components.State/StateResultKinds.cs (100%) create mode 100644 src/Components/Storage/FluxFlow.Components.Storage.Composition/CompatibilitySuppressions.xml rename src/{ => Components/Storage}/FluxFlow.Components.Storage.Composition/FluxFlow.Components.Storage.Composition.csproj (68%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.Composition/README.md (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.Composition/StorageAuthoringExtensions.cs (82%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.Composition/StorageComponentDefinition.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.Composition/StorageCompositionStoreResolver.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.Composition/StorageServiceCollectionExtensions.cs (85%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.FileSystem/FileSystemStorageRegistrationBuilder.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.FileSystem/FileSystemStorageRegistrationExtensions.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.FileSystem/FileSystemStorageServiceCollectionExtensions.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.FileSystem/FileSystemStorageStore.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.FileSystem/FileSystemStorageStoreFactory.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.FileSystem/FileSystemStorageStoreOptions.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.FileSystem/FileSystemStorageStoreSettings.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.FileSystem/FluxFlow.Components.Storage.FileSystem.csproj (77%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.FileSystem/README.md (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.SqlFile/FluxFlow.Components.Storage.SqlFile.csproj (87%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.SqlFile/README.md (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.SqlFile/SqlFileStorageRegistrationBuilder.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.SqlFile/SqlFileStorageRegistrationExtensions.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.SqlFile/SqlFileStorageServiceCollectionExtensions.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.SqlFile/SqlFileStorageStore.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.SqlFile/SqlFileStorageStoreFactory.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.SqlFile/SqlFileStorageStoreOptions.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage.SqlFile/SqlFileStorageStoreSettings.cs (100%) create mode 100644 src/Components/Storage/FluxFlow.Components.Storage/CompatibilitySuppressions.xml rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Contracts/IStorageStore.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Contracts/IStorageStoreFactory.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Contracts/StorageContentContractMap.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Contracts/StorageContentPutRequest.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Contracts/StorageContentRecord.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Contracts/StorageContractNormalization.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Contracts/StorageDeleteOutcome.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Contracts/StorageDeleteRequest.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Contracts/StorageGetOutcome.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Contracts/StorageGetRequest.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Contracts/StoragePutOutcome.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Contracts/StoragePutRequest.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Contracts/StorageQueryMatcher.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Contracts/StorageQueryOutcome.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Contracts/StorageQueryRequest.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Contracts/StorageRecord.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Contracts/StorageResult.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Contracts/StorageStoreContext.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Contracts/StorageStoreLease.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Contracts/StorageWriteMode.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Diagnostics/StorageDiagnosticNames.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/FluxFlow.Components.Storage.csproj (69%) create mode 100644 src/Components/Storage/FluxFlow.Components.Storage/Materialization/StorageRequestMaterializers.cs rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Nodes/StorageContentOperationException.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Nodes/StorageContentRecordMapper.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Nodes/StorageDeleteNode.cs (92%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Nodes/StorageGetNode.cs (92%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Nodes/StorageNodeSupport.cs (100%) create mode 100644 src/Components/Storage/FluxFlow.Components.Storage/Nodes/StorageOperationPipeline.cs rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Nodes/StoragePutNode.cs (94%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Nodes/StorageQueryNode.cs (93%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Options/StorageComponentOptions.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Options/StorageDeleteOptions.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Options/StorageGetOptions.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Options/StorageOptionValidation.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Options/StoragePutOptions.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/Options/StorageQueryOptions.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/README.md (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/StorageErrorCodeNames.cs (100%) rename src/{ => Components/Storage}/FluxFlow.Components.Storage/StorageResultKinds.cs (100%) create mode 100644 src/Components/Timers/FluxFlow.Components.Timers.Composition/CompatibilitySuppressions.xml rename src/{ => Components/Timers}/FluxFlow.Components.Timers.Composition/FluxFlow.Components.Timers.Composition.csproj (63%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers.Composition/README.md (100%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers.Composition/TimersAuthoringExtensions.cs (84%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers.Composition/TimersComponentDefinition.cs (100%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers.Composition/TimersServiceCollectionExtensions.cs (82%) create mode 100644 src/Components/Timers/FluxFlow.Components.Timers/CompatibilitySuppressions.xml rename src/{ => Components/Timers}/FluxFlow.Components.Timers/Contracts/TimerIntervalTick.cs (100%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers/Contracts/TimerScheduleTick.cs (100%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers/Diagnostics/TimerDiagnosticNames.cs (100%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers/FluxFlow.Components.Timers.csproj (66%) create mode 100644 src/Components/Timers/FluxFlow.Components.Timers/Nodes/FlowValueTimerDebounceNode.cs create mode 100644 src/Components/Timers/FluxFlow.Components.Timers/Nodes/FlowValueTimerDelayNode.cs create mode 100644 src/Components/Timers/FluxFlow.Components.Timers/Nodes/FlowValueTimerNodeSupport.cs create mode 100644 src/Components/Timers/FluxFlow.Components.Timers/Nodes/FlowValueTimerThrottleNode.cs rename src/{ => Components/Timers}/FluxFlow.Components.Timers/Nodes/TimerDebounceNode.cs (97%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers/Nodes/TimerDelayNode.cs (96%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers/Nodes/TimerIntervalNode.cs (95%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers/Nodes/TimerNodeSupport.cs (100%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers/Nodes/TimerResultPipeline.cs (86%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers/Nodes/TimerScheduleNode.cs (95%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers/Nodes/TimerThrottleNode.cs (95%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers/Options/CronSchedule.cs (100%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers/Options/TimerDebounceSettings.cs (100%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers/Options/TimerDelaySettings.cs (100%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers/Options/TimerIntervalSettings.cs (100%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers/Options/TimerScheduleSettings.cs (100%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers/Options/TimerThrottleSettings.cs (100%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers/Properties/AssemblyInfo.cs (59%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers/README.md (100%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers/TimerErrorCodeNames.cs (100%) rename src/{ => Components/Timers}/FluxFlow.Components.Timers/TimerResultKinds.cs (100%) create mode 100644 src/Components/Validation/FluxFlow.Components.Validation.Composition/CompatibilitySuppressions.xml rename src/{ => Components/Validation}/FluxFlow.Components.Validation.Composition/FluxFlow.Components.Validation.Composition.csproj (64%) rename src/{ => Components/Validation}/FluxFlow.Components.Validation.Composition/README.md (100%) rename src/{ => Components/Validation}/FluxFlow.Components.Validation.Composition/ValidationAuthoringExtensions.cs (83%) rename src/{ => Components/Validation}/FluxFlow.Components.Validation.Composition/ValidationComponentDefinition.cs (100%) rename src/{ => Components/Validation}/FluxFlow.Components.Validation.Composition/ValidationServiceCollectionExtensions.cs (91%) create mode 100644 src/Components/Validation/FluxFlow.Components.Validation/CompatibilitySuppressions.xml rename src/{ => Components/Validation}/FluxFlow.Components.Validation/Contracts/IJsonSchemaValueSelector.cs (100%) rename src/{ => Components/Validation}/FluxFlow.Components.Validation/Contracts/JsonSchemaValidationIssue.cs (100%) rename src/{ => Components/Validation}/FluxFlow.Components.Validation/Contracts/JsonSchemaValidationResult.cs (100%) rename src/{ => Components/Validation}/FluxFlow.Components.Validation/Contracts/JsonSchemaValidatorContext.cs (100%) rename src/{ => Components/Validation}/FluxFlow.Components.Validation/Diagnostics/ValidationDiagnosticNames.cs (100%) rename src/{ => Components/Validation}/FluxFlow.Components.Validation/FluxFlow.Components.Validation.csproj (70%) rename src/{ => Components/Validation}/FluxFlow.Components.Validation/Nodes/JsonSchemaValidatorNode.cs (91%) rename src/{ => Components/Validation}/FluxFlow.Components.Validation/Options/JsonSchemaValidatorOptions.cs (100%) rename src/{ => Components/Validation}/FluxFlow.Components.Validation/README.md (100%) rename src/{ => Components/Validation}/FluxFlow.Components.Validation/ValidationErrorCodeNames.cs (100%) rename src/{ => Components/Validation}/FluxFlow.Components.Validation/ValidationResultKinds.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Addressing/ApplicationAddress.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Addressing/ApplicationAddressKind.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/ApplicationLinks/ApplicationLinkCompilationResult.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/ApplicationLinks/ApplicationLinkCompiler.cs (84%) rename src/{ => Core/Application}/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDeclarationParser.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDeclarationProjection.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDeclarationSide.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDefinition.cs (87%) rename src/{ => Core/Application}/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDiagnostic.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDiagnosticCode.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/ApplicationLinks/ApplicationSystemOutputMetadata.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/ApplicationLinks/CompiledApplicationLink.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/ApplicationModel/ApplicationDefinition.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/ApplicationModel/ApplicationDefinitionJson.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/ApplicationModel/ApplicationDefinitionJsonConverter.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/ApplicationModel/CanonicalApplicationProperties.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/ApplicationModel/ComponentDefinition.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/ApplicationModel/DefinitionRules.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/ApplicationModel/ResourceDefinition.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/ApplicationModel/ResourceGroupDefinition.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/ApplicationModel/ResourceInstanceDefinition.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/ApplicationModel/WorkflowDefinition.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Authoring/ApplicationDefinitionBuilder.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Authoring/ApplicationResourceAuthoringExtensions.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Authoring/ApplicationResourceContract.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Authoring/ApplicationResourceContractCollection.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Authoring/AuthoringHandles.cs (93%) rename src/{ => Core/Application}/FluxFlow.Composition/Authoring/AuthoringScope.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Authoring/ComponentContract.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Authoring/ComponentContractCollection.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Authoring/DefinitionPropertyBuilder.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Authoring/ResourceDefinitionContainerBuilder.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Authoring/WorkflowDefinitionBuilder.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/CompatibilitySuppressions.xml (66%) rename src/{ => Core/Application}/FluxFlow.Composition/Configuration/CompositionConfigurationException.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/DependencyInjection/FluxFlowServiceCollectionExtensions.cs (89%) rename src/{ => Core/Application}/FluxFlow.Composition/DependencyInjection/NonOwningDataflowViews.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Factories/ComponentActivationContext.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Factories/ComponentCatalog.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Factories/ComponentDescriptor.cs (84%) rename src/{ => Core/Application}/FluxFlow.Composition/Factories/ComponentFactory.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Factories/ComponentNodeActivation.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Factories/ComponentOptionMetadata.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Factories/ComponentOptions.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Factories/ComponentPortKind.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Factories/ComponentPortLinkCardinality.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Factories/ComponentPortMetadata.cs (87%) rename src/{ => Core/Application}/FluxFlow.Composition/Factories/ComponentResourceMetadata.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Factories/ComponentResources.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Factories/IComponentPortTypeVisitor.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/FluxFlow.Composition.csproj (70%) rename src/{ => Core/Application}/FluxFlow.Composition/Processing/CompositionProcessingCapabilities.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Processing/CompositionProcessingConfiguration.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Processing/CompositionProcessingProfile.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Processing/CompositionProcessingResourceTypes.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Processing/CompositionProcessingSettings.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Processing/DefaultCompositionProcessingProfileMapper.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Processing/ICompositionProcessingProfileMapper.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/README.md (88%) rename src/{ => Core/Application}/FluxFlow.Composition/Registration/FluxFlowRegistrationBuilder.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Registration/FluxFlowRegistrationExtensions.cs (98%) rename src/{ => Core/Application}/FluxFlow.Composition/Registration/RuntimeComponentBindingBuilder.cs (62%) rename src/{ => Core/Application}/FluxFlow.Composition/Registration/RuntimeComponentRegistrationBuilder.cs (87%) rename src/{ => Core/Application}/FluxFlow.Composition/Resources/ApplicationResourceRegistrationContext.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Resources/ApplicationResourceServiceCollectionExtensions.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Resources/IApplicationResourceRegistrar.cs (100%) rename src/{ => Core/Application}/FluxFlow.Composition/Runtime/ApplicationRuntime.cs (84%) rename src/{ => Core/Application}/FluxFlow.Composition/Runtime/ApplicationRuntimeComponent.cs (100%) rename src/{FluxFlow.Composition/Runtime/ComponentEventBridge.cs => Core/Application/FluxFlow.Composition/Runtime/ComponentActivityBridge.cs} (59%) rename src/{ => Core/Application}/FluxFlow.Composition/Runtime/ComponentEventSource.cs (72%) rename src/{ => Core/Application}/FluxFlow.Composition/Runtime/ComponentInputPort.cs (77%) rename src/{ => Core/Application}/FluxFlow.Composition/Runtime/ComponentInstance.cs (70%) rename src/{ => Core/Application}/FluxFlow.Composition/Runtime/ComponentOutputPort.cs (56%) rename src/{ => Core/Application}/FluxFlow.Composition/Runtime/ComponentPorts.cs (78%) rename src/{ => Core/Application}/FluxFlow.Composition/Runtime/RuntimeNodeKey.cs (100%) rename src/{ => Core/Execution}/FluxFlow.Coordination/FluxFlow.Coordination.csproj (69%) rename src/{ => Core/Execution}/FluxFlow.Coordination/PendingExchangeCompletion.cs (100%) rename src/{ => Core/Execution}/FluxFlow.Coordination/PendingExchangeCoordinator.cs (100%) rename src/{ => Core/Execution}/FluxFlow.Coordination/PendingExchangeCoordinatorOptions.cs (100%) rename src/{ => Core/Execution}/FluxFlow.Coordination/PendingExchangeFeedback.cs (100%) rename src/{ => Core/Execution}/FluxFlow.Coordination/PendingExchangeStart.cs (100%) rename src/{ => Core/Execution}/FluxFlow.Coordination/PendingExchangeStatus.cs (100%) rename src/{ => Core/Execution}/FluxFlow.Coordination/README.md (100%) rename src/{ => Core/Execution}/FluxFlow.Resilience/FluxFlow.Resilience.csproj (100%) rename src/{ => Core/Execution}/FluxFlow.Resilience/IRetryJitterSource.cs (100%) rename src/{ => Core/Execution}/FluxFlow.Resilience/README.md (100%) rename src/{ => Core/Execution}/FluxFlow.Resilience/RetryExecutor.cs (100%) rename src/{ => Core/Execution}/FluxFlow.Resilience/RetryPlanner.cs (100%) rename src/{ => Core/Execution}/FluxFlow.Resilience/RetryPolicy.cs (100%) rename src/{ => Core/Execution}/FluxFlow.Resilience/RetrySchedule.cs (100%) rename src/{ => Core/Execution}/FluxFlow.Resilience/RetryStateMachine.cs (100%) rename src/{ => Core/Foundation}/FluxFlow.Mapping/DelegateFlowMapper.cs (100%) rename src/{ => Core/Foundation}/FluxFlow.Mapping/DelegateFlowPredicate.cs (100%) rename src/{ => Core/Foundation}/FluxFlow.Mapping/EvaluatingCompiledExpression.cs (100%) rename src/{ => Core/Foundation}/FluxFlow.Mapping/ExpressionFlowMapper.cs (100%) rename src/{ => Core/Foundation}/FluxFlow.Mapping/ExpressionFlowPredicate.cs (100%) rename src/{ => Core/Foundation}/FluxFlow.Mapping/FlowMapContext.cs (100%) rename src/{ => Core/Foundation}/FluxFlow.Mapping/FluxFlow.Mapping.csproj (100%) rename src/{ => Core/Foundation}/FluxFlow.Mapping/IFlowCompiledExpression.cs (100%) rename src/{ => Core/Foundation}/FluxFlow.Mapping/IFlowExpressionEngine.cs (100%) rename src/{ => Core/Foundation}/FluxFlow.Mapping/IFlowMapContextFactory.cs (100%) rename src/{ => Core/Foundation}/FluxFlow.Mapping/IFlowMapper.cs (100%) rename src/{ => Core/Foundation}/FluxFlow.Mapping/IFlowPredicate.cs (100%) rename src/{ => Core/Foundation}/FluxFlow.Mapping/README.md (100%) create mode 100644 src/Core/Foundation/FluxFlow.Nodes/CompatibilitySuppressions.xml rename src/{ => Core/Foundation}/FluxFlow.Nodes/CorrelationId.cs (100%) rename src/{ => Core/Foundation}/FluxFlow.Nodes/Data/FlowContent.cs (73%) rename src/{ => Core/Foundation}/FluxFlow.Nodes/Data/FlowContentJsonConverter.cs (100%) rename src/{ => Core/Foundation}/FluxFlow.Nodes/Data/FlowError.cs (100%) create mode 100644 src/Core/Foundation/FluxFlow.Nodes/Data/FlowValue.cs create mode 100644 src/Core/Foundation/FluxFlow.Nodes/Data/FlowValueJsonConverter.cs create mode 100644 src/Core/Foundation/FluxFlow.Nodes/Data/FlowValueMaterializers.cs create mode 100644 src/Core/Foundation/FluxFlow.Nodes/Data/FlowValueShape.cs create mode 100644 src/Core/Foundation/FluxFlow.Nodes/Data/IFlowValueMaterializer.cs create mode 100644 src/Core/Foundation/FluxFlow.Nodes/FlowEvent.cs create mode 100644 src/Core/Foundation/FluxFlow.Nodes/FlowMessage.cs rename src/{ => Core/Foundation}/FluxFlow.Nodes/FlowMessageJsonConverter.cs (52%) rename src/{ => Core/Foundation}/FluxFlow.Nodes/FlowNode.cs (97%) rename src/{ => Core/Foundation}/FluxFlow.Nodes/FlowNodeOptions.cs (100%) rename src/{ => Core/Foundation}/FluxFlow.Nodes/FlowOutput.cs (100%) rename src/{ => Core/Foundation}/FluxFlow.Nodes/FlowOutputOptions.cs (100%) rename src/{ => Core/Foundation}/FluxFlow.Nodes/FlowSource.cs (97%) rename src/{ => Core/Foundation}/FluxFlow.Nodes/FlowSourceOptions.cs (100%) create mode 100644 src/Core/Foundation/FluxFlow.Nodes/FlowValueNode.cs create mode 100644 src/Core/Foundation/FluxFlow.Nodes/FlowValueSource.cs rename src/{ => Core/Foundation}/FluxFlow.Nodes/FluxFlow.Nodes.csproj (77%) rename src/{ => Core/Foundation}/FluxFlow.Nodes/IFlowNode.cs (100%) create mode 100644 src/Core/Foundation/FluxFlow.Nodes/IFlowSignalTarget.cs rename src/{ => Core/Foundation}/FluxFlow.Nodes/MessageId.cs (100%) rename src/{ => Core/Foundation}/FluxFlow.Nodes/README.md (100%) rename src/{ => Core/Foundation}/FluxFlow.Nodes/TraceId.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile/FluxFlow.Engine.DurableInput.SqlFile.csproj (77%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile/README.md (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputSchema.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputServiceCollectionExtensions.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStore.DeadLetters.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStore.Retention.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStore.Status.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStore.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStoreOptions.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStoreOptionsBuilder.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.TSql/FluxFlow.Engine.DurableInput.TSql.csproj (80%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.TSql/README.md (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.TSql/RelationalDurableInputRows.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.TSql/RelationalDurableInputSchema.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputSchemaManagement.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputServiceCollectionExtensions.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStore.DeadLetters.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStore.Retention.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStore.Status.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStore.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStoreOptions.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStoreOptionsBuilder.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput/DurableApplicationInputs.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput/DurableInputCompletion.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput/DurableInputContractRegistry.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput/DurableInputContracts.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput/DurableInputDeadLetterContracts.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput/DurableInputDispatcher.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput/DurableInputInstrumentation.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput/DurableInputOptions.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput/DurableInputRetentionContracts.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput/DurableInputServiceCollectionExtensions.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput/DurableInputStatusContracts.cs (100%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput/FluxFlow.Engine.DurableInput.csproj (73%) rename src/{ => Engine/DurableInput}/FluxFlow.Engine.DurableInput/README.md (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile/FluxFlow.Engine.DurableOutput.SqlFile.csproj (80%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile/README.md (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputDeliverySchema.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputSchema.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputServiceCollectionExtensions.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.DeadLetters.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.Delivery.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.Retention.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.Status.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStoreOptions.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStoreOptionsBuilder.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql/FluxFlow.Engine.DurableOutput.TSql.csproj (80%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql/README.md (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql/RelationalDurableOutputRows.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql/RelationalDurableOutputSchema.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputSchemaManagement.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputServiceCollectionExtensions.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.DeadLetters.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.Delivery.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.Retention.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.Status.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStoreOptions.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStoreOptionsBuilder.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput/DurableOutputCaptureResolver.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput/DurableOutputContracts.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput/DurableOutputDeadLetterContracts.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput/DurableOutputDeliveryContracts.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput/DurableOutputDeliveryDispatcher.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput/DurableOutputDeliveryOptions.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput/DurableOutputDeliveryServiceCollectionExtensions.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput/DurableOutputInstrumentation.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput/DurableOutputRegistration.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput/DurableOutputRetentionContracts.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput/DurableOutputServiceCollectionExtensions.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput/DurableOutputStatusContracts.cs (100%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput/FluxFlow.Engine.DurableOutput.csproj (75%) rename src/{ => Engine/DurableOutput}/FluxFlow.Engine.DurableOutput/README.md (100%) rename src/{ => Engine/Health}/FluxFlow.Engine.HealthChecks/FluxFlow.Engine.HealthChecks.csproj (73%) rename src/{ => Engine/Health}/FluxFlow.Engine.HealthChecks/FluxFlowApplicationHealthCheck.cs (100%) rename src/{ => Engine/Health}/FluxFlow.Engine.HealthChecks/FluxFlowHealthChecksBuilderExtensions.cs (100%) rename src/{ => Engine/Health}/FluxFlow.Engine.HealthChecks/README.md (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/ApplicationDefinitionSources.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/ApplicationPorts.cs (83%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/ApplicationSnapshot.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/ApplicationState.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/ApplicationUpdateResult.cs (100%) create mode 100644 src/Engine/Runtime/FluxFlow.Engine/CompatibilitySuppressions.xml rename src/{ => Engine/Runtime}/FluxFlow.Engine/Core/FlowFanoutSource.cs (100%) create mode 100644 src/Engine/Runtime/FluxFlow.Engine/Events/ApplicationEventAttachment.cs create mode 100644 src/Engine/Runtime/FluxFlow.Engine/Events/ApplicationEventOptions.cs create mode 100644 src/Engine/Runtime/FluxFlow.Engine/Events/ApplicationEventStream.cs rename src/{ => Engine/Runtime}/FluxFlow.Engine/FluxFlow.Engine.csproj (70%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/FluxFlowApplication.cs (97%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/FluxFlowApplicationOptions.cs (86%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/FluxFlowApplicationServiceCollectionExtensions.cs (98%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Hosting/ApplicationRuntimeAssembler.cs (83%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Hosting/ApplicationRuntimeAssemblerException.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Hosting/ApplicationRuntimeAssemblerHostingExtensions.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Hosting/ApplicationRuntimeAssemblerOptions.cs (81%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Hosting/ApplicationRuntimeCleanup.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Hosting/ApplicationRuntimeComponentActivator.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Hosting/ApplicationRuntimeDrainPlan.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Hosting/ApplicationRuntimePlanFactory.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Hosting/ApplicationRuntimePortBinder.cs (82%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Hosting/ApplicationRuntimePortGeneration.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Hosting/ApplicationRuntimePortSurface.cs (91%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Hosting/ApplicationRuntimePreparation.cs (86%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Hosting/ApplicationRuntimeResourceSnapshotFactory.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Hosting/ApplicationRuntimeRevisionCandidate.cs (87%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Hosting/FluxFlowApplicationHostedService.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/IApplicationDefinitionSource.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Internal/ConfigurationJsonReader.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Internal/Revisions/ApplicationResourceRevisionChange.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionChangeKind.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionDiagnostic.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionDiagnosticCode.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionEvent.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionPhase.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionPlan.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionPlanner.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionPreparationContext.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Internal/Revisions/ApplicationWorkflowRevisionChange.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Internal/Revisions/IApplicationRevisionCandidate.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Internal/Snapshots/CompositionProviderBoundary.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Internal/Snapshots/CompositionProviderSnapshotInfo.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Internal/Snapshots/CompositionServiceProviderSnapshot.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Internal/Snapshots/CompositionServiceProviderSnapshotBuilder.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Ports/ApplicationInputPort.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Ports/ApplicationInputPortCore.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Ports/ApplicationInputRevisionLifetime.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Ports/ApplicationOutputAttachments.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Ports/ApplicationOutputCapture.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Ports/ApplicationOutputConnections.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Ports/ApplicationOutputPort.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Ports/ApplicationOutputSubscriptions.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Ports/ApplicationPortActivity.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Ports/ApplicationPortContracts.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Ports/ApplicationPortEventPublisher.cs (67%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Ports/ApplicationPortRevision.cs (94%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Ports/ApplicationPortRevisionInfo.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Ports/ApplicationPortRuntime.cs (70%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Ports/ApplicationPortRuntimeBuilder.cs (74%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Ports/ApplicationRevisionRouting.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Ports/ApplicationRuntimeStatus.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Ports/ApplicationSignalInputPort.cs (100%) create mode 100644 src/Engine/Runtime/FluxFlow.Engine/Ports/FlowValueApplicationInputPort.cs create mode 100644 src/Engine/Runtime/FluxFlow.Engine/Ports/FlowValueApplicationOutputAttachments.cs create mode 100644 src/Engine/Runtime/FluxFlow.Engine/Ports/FlowValueApplicationOutputConnections.cs create mode 100644 src/Engine/Runtime/FluxFlow.Engine/Ports/FlowValueApplicationOutputPort.cs create mode 100644 src/Engine/Runtime/FluxFlow.Engine/Ports/FlowValueApplicationOutputSubscriptions.cs rename src/{ => Engine/Runtime}/FluxFlow.Engine/Ports/PortObservation.cs (100%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/README.md (92%) create mode 100644 src/Engine/Runtime/FluxFlow.Engine/Signals/ApplicationDiagnosticNames.cs rename src/{ => Engine/Runtime}/FluxFlow.Engine/Signals/ApplicationRuntimeInstrumentation.cs (70%) rename src/{ => Engine/Runtime}/FluxFlow.Engine/Signals/ApplicationRuntimeSignals.cs (59%) create mode 100644 src/Engine/Runtime/FluxFlow.Engine/Signals/ApplicationSignalMessage.cs create mode 100644 src/Engine/Runtime/FluxFlow.Engine/Signals/ApplicationSystemEventNames.cs delete mode 100644 src/FluxFlow.Components.Designer/CompatibilitySuppressions.xml delete mode 100644 src/FluxFlow.Components.FileSystem/Nodes/FileSystemOperationPipeline.cs delete mode 100644 src/FluxFlow.Components.Http.AspNetCore/HttpTriggerNode.cs delete mode 100644 src/FluxFlow.Components.Resilience/Nodes/FlowRetryNode.cs delete mode 100644 src/FluxFlow.Components.Sessions/Nodes/SessionOperationPipeline.cs delete mode 100644 src/FluxFlow.Components.Storage/Nodes/StorageOperationPipeline.cs delete mode 100644 src/FluxFlow.Composition/Runtime/ComponentEvent.cs delete mode 100644 src/FluxFlow.Engine/Signals/ApplicationDiagnostic.cs delete mode 100644 src/FluxFlow.Engine/Signals/ApplicationSystemEvent.cs delete mode 100644 src/FluxFlow.Nodes/FlowEvent.cs delete mode 100644 src/FluxFlow.Nodes/FlowMessage.cs delete mode 100644 src/FluxFlow.Nodes/IFlowSignalTarget.cs create mode 100644 tests/Acceptance/Workflows/MqttToHttp/FluxFlow.Workflow.Acceptance.Tests/FluxFlow.Workflow.Acceptance.Tests.csproj create mode 100644 tests/Acceptance/Workflows/MqttToHttp/FluxFlow.Workflow.Acceptance.Tests/MqttToHttpFlowValueAcceptanceTests.cs delete mode 100644 tests/FluxFlow.Components.Assertions.Composition.Tests/FluxFlow.Components.Assertions.Composition.Tests.csproj delete mode 100644 tests/FluxFlow.Components.Expectations.Composition.Tests/FluxFlow.Components.Expectations.Composition.Tests.csproj delete mode 100644 tests/FluxFlow.Components.FileSystem.Composition.Tests/FluxFlow.Components.FileSystem.Composition.Tests.csproj delete mode 100644 tests/FluxFlow.Components.Http.Composition.Tests/FluxFlow.Components.Http.Composition.Tests.csproj delete mode 100644 tests/FluxFlow.Components.Mapping.Composition.Tests/FluxFlow.Components.Mapping.Composition.Tests.csproj delete mode 100644 tests/FluxFlow.Components.Metrics.Composition.Tests/FluxFlow.Components.Metrics.Composition.Tests.csproj delete mode 100644 tests/FluxFlow.Components.Mqtt.Composition.Tests/FluxFlow.Components.Mqtt.Composition.Tests.csproj delete mode 100644 tests/FluxFlow.Components.Observability.Composition.Tests/FluxFlow.Components.Observability.Composition.Tests.csproj delete mode 100644 tests/FluxFlow.Components.Payloads.Composition.Tests/FluxFlow.Components.Payloads.Composition.Tests.csproj delete mode 100644 tests/FluxFlow.Components.Projections.Composition.Tests/FluxFlow.Components.Projections.Composition.Tests.csproj delete mode 100644 tests/FluxFlow.Components.Resilience.Composition.Tests/FluxFlow.Components.Resilience.Composition.Tests.csproj delete mode 100644 tests/FluxFlow.Components.Routing.Composition.Tests/FluxFlow.Components.Routing.Composition.Tests.csproj delete mode 100644 tests/FluxFlow.Components.Serialization.Composition.Tests/FluxFlow.Components.Serialization.Composition.Tests.csproj delete mode 100644 tests/FluxFlow.Components.Sessions.Composition.Tests/FluxFlow.Components.Sessions.Composition.Tests.csproj delete mode 100644 tests/FluxFlow.Components.Sources.Composition.Tests/FluxFlow.Components.Sources.Composition.Tests.csproj delete mode 100644 tests/FluxFlow.Components.State.Composition.Tests/FluxFlow.Components.State.Composition.Tests.csproj delete mode 100644 tests/FluxFlow.Components.Storage.Composition.Tests/FluxFlow.Components.Storage.Composition.Tests.csproj delete mode 100644 tests/FluxFlow.Components.Timers.Composition.Tests/FluxFlow.Components.Timers.Composition.Tests.csproj delete mode 100644 tests/FluxFlow.Components.Validation.Composition.Tests/FluxFlow.Components.Validation.Composition.Tests.csproj delete mode 100644 tests/FluxFlow.Release.Tests/FluxFlow.Release.Tests.csproj rename tests/{ => Integration/Containers/Databases/TSql/DurableInput}/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/AssemblyInfo.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableInput}/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests.csproj (67%) rename tests/{ => Integration/Containers/Databases/TSql/DurableInput}/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/README.md (72%) rename tests/{ => Integration/Containers/Databases/TSql/DurableInput}/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputConcurrencyTests.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableInput}/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputConformanceTests.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableInput}/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputPersistenceTests.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableInput}/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputResiliencyTests.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableInput}/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputRetentionTests.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableInput}/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputSchemaTests.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableInput}/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputStatusTests.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableInput}/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputTestSupport.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableInput}/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlIntegrationEnvironment.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableInput}/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlIntegrationEnvironmentTests.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableInput}/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlTestDatabase.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableInput}/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/run-integration.ps1 (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableInput}/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/xunit.runner.json (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/AssemblyInfo.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests.csproj (67%) rename tests/{ => Integration/Containers/Databases/TSql/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/README.md (73%) rename tests/{ => Integration/Containers/Databases/TSql/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputConcurrencyTests.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputConformanceTests.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputLeaseRenewalTests.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputPersistenceTests.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputProviderIntegrationTests.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputRetentionTests.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputSchemaTests.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputStatusTests.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputTestSupport.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlIntegrationEnvironment.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlIntegrationEnvironmentTests.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlTestDatabase.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlTestDatabaseTests.cs (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/run-integration.ps1 (100%) rename tests/{ => Integration/Containers/Databases/TSql/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/xunit.runner.json (100%) create mode 100644 tests/Integration/Containers/Workflows/MqttToHttp/FluxFlow.Workflow.ContainerIntegrationTests/FluxFlow.Workflow.ContainerIntegrationTests.csproj create mode 100644 tests/Integration/Containers/Workflows/MqttToHttp/FluxFlow.Workflow.ContainerIntegrationTests/HttpCaptureProbe.cs create mode 100644 tests/Integration/Containers/Workflows/MqttToHttp/FluxFlow.Workflow.ContainerIntegrationTests/MqttBrokerFixture.cs create mode 100644 tests/Integration/Containers/Workflows/MqttToHttp/FluxFlow.Workflow.ContainerIntegrationTests/MqttToHttpContainerIntegrationTests.cs create mode 100644 tests/Integration/Containers/Workflows/MqttToHttp/FluxFlow.Workflow.ContainerIntegrationTests/README.md create mode 100644 tests/README.md create mode 100644 tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/ExternalSmokeFactAttribute.cs create mode 100644 tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/FluxFlow.Workflow.ExternalSmokeTests.csproj create mode 100644 tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/HttpCaptureProbe.cs create mode 100644 tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/MqttToHttpExternalSettings.cs create mode 100644 tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/MqttToHttpExternalSmokeTests.cs create mode 100644 tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/README.md rename tests/{ => Support}/FluxFlow.Testing/CanonicalApplicationTestHost.cs (100%) rename tests/{ => Support}/FluxFlow.Testing/CanonicalTestApplication.cs (100%) rename tests/{ => Support}/FluxFlow.Testing/ComponentCatalogTestHost.cs (100%) rename tests/{ => Support}/FluxFlow.Testing/ComponentDesignMetadataAssertions.cs (100%) create mode 100644 tests/Support/FluxFlow.Testing/FluxFlow.Testing.csproj rename tests/{FluxFlow.ComponentPackageTemplate.Tests/FluxFlow.ComponentPackageTemplate.Tests.csproj => Unit/Adapters/Expressions/FluxFlow.Expressions.Jsonata.Tests/FluxFlow.Expressions.Jsonata.Tests.csproj} (70%) create mode 100644 tests/Unit/Adapters/Expressions/FluxFlow.Expressions.Jsonata.Tests/JsonataFlowExpressionEngineTests.cs rename tests/{ => Unit/Authoring}/FluxFlow.Fluent.Hosting.Tests/FlowGraphHostingTests.cs (100%) rename tests/{ => Unit/Authoring}/FluxFlow.Fluent.Hosting.Tests/FluxFlow.Fluent.Hosting.Tests.csproj (64%) rename tests/{ => Unit/Authoring}/FluxFlow.Fluent.Hosting.Tests/TestNodes.cs (100%) rename tests/{ => Unit/Authoring}/FluxFlow.Fluent.Tests/FlowBuilderTests.cs (100%) rename tests/{ => Unit/Authoring}/FluxFlow.Fluent.Tests/FlowObservationTests.cs (100%) rename tests/{ => Unit/Authoring}/FluxFlow.Fluent.Tests/FlowSegmentTests.cs (100%) create mode 100644 tests/Unit/Authoring/FluxFlow.Fluent.Tests/FluxFlow.Fluent.Tests.csproj rename tests/{ => Unit/Authoring}/FluxFlow.Fluent.Tests/TestFlowNodes.cs (100%) rename tests/{ => Unit/Components/Assertions}/FluxFlow.Components.Assertions.Composition.Tests/AssertionsServiceCollectionExtensionsTests.cs (98%) create mode 100644 tests/Unit/Components/Assertions/FluxFlow.Components.Assertions.Composition.Tests/FluxFlow.Components.Assertions.Composition.Tests.csproj rename tests/{ => Unit/Components/Assertions}/FluxFlow.Components.Assertions.Tests/AssertionNodeTests.cs (84%) rename tests/{ => Unit/Components/Assertions}/FluxFlow.Components.Assertions.Tests/FluxFlow.Components.Assertions.Tests.csproj (61%) rename tests/{ => Unit/Components/Assertions}/FluxFlow.Components.Assertions.Tests/RecordingExpressionEngine.cs (100%) rename tests/{ => Unit/Components/Designer}/FluxFlow.Components.Designer.Tests/ComponentDesignDeclarationTests.cs (100%) rename tests/{ => Unit/Components/Designer}/FluxFlow.Components.Designer.Tests/ComponentDesignMetadataCatalogTests.cs (99%) rename tests/{ => Unit/Components/Designer}/FluxFlow.Components.Designer.Tests/ComponentResourcePickerHintsTests.cs (100%) rename tests/{ => Unit/Components/Designer}/FluxFlow.Components.Designer.Tests/DesignedComponentBindingBuilderTests.cs (73%) rename tests/{ => Unit/Components/Designer}/FluxFlow.Components.Designer.Tests/DesignerApplicationPersistenceTests.cs (100%) create mode 100644 tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/EventDesignMetadataTests.cs rename tests/{ => Unit/Components/Designer}/FluxFlow.Components.Designer.Tests/FluxFlow.Components.Designer.Tests.csproj (61%) rename tests/{ => Unit/Components/Designer}/FluxFlow.Components.Designer.Tests/FluxFlowDesignedComponentRegistrationTests.cs (99%) create mode 100644 tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/InputShapeMetadataTests.cs rename tests/{ => Unit/Components/Designer}/FluxFlow.Components.Designer.Tests/PortDesignMetadataAttributesTests.cs (100%) rename tests/{ => Unit/Components/Expectations}/FluxFlow.Components.Expectations.Composition.Tests/ExpectationsServiceCollectionExtensionsTests.cs (97%) create mode 100644 tests/Unit/Components/Expectations/FluxFlow.Components.Expectations.Composition.Tests/FluxFlow.Components.Expectations.Composition.Tests.csproj rename tests/{ => Unit/Components/Expectations}/FluxFlow.Components.Expectations.Tests/EventExpectationNodeTests.cs (78%) rename tests/{ => Unit/Components/Expectations}/FluxFlow.Components.Expectations.Tests/FluxFlow.Components.Expectations.Tests.csproj (59%) rename tests/{ => Unit/Components/FileSystem}/FluxFlow.Components.FileSystem.Composition.Tests/FileSystemServiceCollectionExtensionsTests.cs (92%) create mode 100644 tests/Unit/Components/FileSystem/FluxFlow.Components.FileSystem.Composition.Tests/FluxFlow.Components.FileSystem.Composition.Tests.csproj rename tests/{ => Unit/Components/FileSystem}/FluxFlow.Components.FileSystem.Tests/BoundedFileReaderTests.cs (100%) rename tests/{ => Unit/Components/FileSystem}/FluxFlow.Components.FileSystem.Tests/DirectoryEnumerateNodeTests.cs (95%) rename tests/{ => Unit/Components/FileSystem}/FluxFlow.Components.FileSystem.Tests/FileSystemPathConfinementTests.cs (90%) rename tests/{ => Unit/Components/FileSystem}/FluxFlow.Components.FileSystem.Tests/FileSystemTestHelpers.cs (81%) rename tests/{ => Unit/Components/FileSystem}/FluxFlow.Components.FileSystem.Tests/FileWatchNodeTests.cs (96%) rename tests/{ => Unit/Components/FileSystem}/FluxFlow.Components.FileSystem.Tests/FlowContentFileSystemNodeTests.cs (81%) rename tests/{ => Unit/Components/FileSystem}/FluxFlow.Components.FileSystem.Tests/FluxFlow.Components.FileSystem.Tests.csproj (68%) rename tests/{ => Unit/Components/Http}/FluxFlow.Components.Http.AspNetCore.Tests/FluxFlow.Components.Http.AspNetCore.Tests.csproj (55%) rename tests/{ => Unit/Components/Http}/FluxFlow.Components.Http.AspNetCore.Tests/HttpRequestContextTests.cs (100%) rename tests/{ => Unit/Components/Http}/FluxFlow.Components.Http.AspNetCore.Tests/HttpTriggerEndpointTests.cs (95%) create mode 100644 tests/Unit/Components/Http/FluxFlow.Components.Http.Composition.Tests/FluxFlow.Components.Http.Composition.Tests.csproj rename tests/{ => Unit/Components/Http}/FluxFlow.Components.Http.Composition.Tests/HttpServiceCollectionExtensionsTests.cs (95%) rename tests/{FluxFlow.Fluent.Tests/FluxFlow.Fluent.Tests.csproj => Unit/Components/Http/FluxFlow.Components.Http.Tests/FluxFlow.Components.Http.Tests.csproj} (65%) rename tests/{ => Unit/Components/Http}/FluxFlow.Components.Http.Tests/HttpClientNodeTests.cs (80%) create mode 100644 tests/Unit/Components/Http/FluxFlow.Components.Http.Tests/HttpClientRequestMaterializerTests.cs create mode 100644 tests/Unit/Components/Mapping/FluxFlow.Components.Mapping.Composition.Tests/FluxFlow.Components.Mapping.Composition.Tests.csproj rename tests/{ => Unit/Components/Mapping}/FluxFlow.Components.Mapping.Composition.Tests/MappingServiceCollectionExtensionsTests.cs (98%) rename tests/{ => Unit/Components/Mapping}/FluxFlow.Components.Mapping.Tests/FlowMapperNodeTests.cs (87%) rename tests/{ => Unit/Components/Mapping}/FluxFlow.Components.Mapping.Tests/FluxFlow.Components.Mapping.Tests.csproj (62%) rename tests/{ => Unit/Components/Mapping}/FluxFlow.Components.Mapping.Tests/PostponedTargetBlock.cs (100%) create mode 100644 tests/Unit/Components/Metrics/FluxFlow.Components.Metrics.Composition.Tests/FluxFlow.Components.Metrics.Composition.Tests.csproj rename tests/{ => Unit/Components/Metrics}/FluxFlow.Components.Metrics.Composition.Tests/MetricsServiceCollectionExtensionsTests.cs (97%) rename tests/{ => Unit/Components/Metrics}/FluxFlow.Components.Metrics.Tests/FluxFlow.Components.Metrics.Tests.csproj (69%) rename tests/{ => Unit/Components/Metrics}/FluxFlow.Components.Metrics.Tests/MetricsAggregateNodeTests.cs (76%) rename tests/{ => Unit/Components/Metrics}/FluxFlow.Components.Metrics.Tests/MetricsContractTests.cs (100%) rename tests/{ => Unit/Components/Metrics}/FluxFlow.Components.Metrics.Tests/MetricsOptionsTests.cs (100%) rename tests/{ => Unit/Components/Mqtt}/FluxFlow.Components.Mqtt.Adapters.Tests/FluxFlow.Components.Mqtt.Adapters.Tests.csproj (67%) rename tests/{ => Unit/Components/Mqtt}/FluxFlow.Components.Mqtt.Adapters.Tests/MqttAdapterRegistrationTests.cs (100%) rename tests/{ => Unit/Components/Mqtt}/FluxFlow.Components.Mqtt.Adapters.Tests/MqttTransportAdapterConformanceTests.cs (100%) create mode 100644 tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Composition.Tests/FluxFlow.Components.Mqtt.Composition.Tests.csproj rename tests/{ => Unit/Components/Mqtt}/FluxFlow.Components.Mqtt.Composition.Tests/MqttApplicationDefinitionAuthoringTests.cs (98%) rename tests/{ => Unit/Components/Mqtt}/FluxFlow.Components.Mqtt.Composition.Tests/MqttFluentCaptureAuthoringTests.cs (100%) rename tests/{ => Unit/Components/Mqtt}/FluxFlow.Components.Mqtt.Composition.Tests/MqttServiceCollectionExtensionsTests.cs (99%) rename tests/{ => Unit/Components/Mqtt}/FluxFlow.Components.Mqtt.MqttNet.Tests/FluxFlow.Components.Mqtt.MqttNet.Tests.csproj (75%) rename tests/{ => Unit/Components/Mqtt}/FluxFlow.Components.Mqtt.MqttNet.Tests/MqttNetMessageMapperTests.cs (100%) rename tests/{ => Unit/Components/Mqtt}/FluxFlow.Components.Mqtt.MqttNet.Tests/MqttNetTransportSessionTests.cs (100%) rename tests/{ => Unit/Components/Mqtt}/FluxFlow.Components.Mqtt.MqttNet.Tests/VNextRecordingMqttNetClient.cs (100%) rename tests/{ => Unit/Components/Mqtt}/FluxFlow.Components.Mqtt.PulseMqtt.Tests/FluxFlow.Components.Mqtt.PulseMqtt.Tests.csproj (76%) rename tests/{ => Unit/Components/Mqtt}/FluxFlow.Components.Mqtt.PulseMqtt.Tests/PulseMqttMessageMapperTests.cs (100%) rename tests/{ => Unit/Components/Mqtt}/FluxFlow.Components.Mqtt.PulseMqtt.Tests/PulseMqttTransportSessionTests.cs (100%) rename tests/{ => Unit/Components/Mqtt}/FluxFlow.Components.Mqtt.Tests/FluxFlow.Components.Mqtt.Tests.csproj (70%) rename tests/{ => Unit/Components/Mqtt}/FluxFlow.Components.Mqtt.Tests/MqttBrokerConfigurationTests.cs (100%) rename tests/{ => Unit/Components/Mqtt}/FluxFlow.Components.Mqtt.Tests/MqttClientControllerTests.cs (90%) rename tests/{ => Unit/Components/Mqtt}/FluxFlow.Components.Mqtt.Tests/MqttContractTests.cs (100%) create mode 100644 tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/MqttPublishMessageMaterializerTests.cs rename tests/{ => Unit/Components/Mqtt}/FluxFlow.Components.Mqtt.Tests/MqttTestContext.cs (100%) rename tests/{ => Unit/Components/Mqtt}/FluxFlow.Components.Mqtt.Tests/MqttTopicValidatorTests.cs (100%) rename tests/{ => Unit/Components/Mqtt}/FluxFlow.Components.Mqtt.Tests/TrackingFakeTimeProvider.cs (100%) rename tests/{ => Unit/Components/Mqtt}/FluxFlow.Components.Mqtt.Tests/VNextRecordingMqttTransport.cs (100%) create mode 100644 tests/Unit/Components/Observability/FluxFlow.Components.Observability.Composition.Tests/FluxFlow.Components.Observability.Composition.Tests.csproj rename tests/{ => Unit/Components/Observability}/FluxFlow.Components.Observability.Composition.Tests/ObservabilityServiceCollectionExtensionsTests.cs (98%) rename tests/{ => Unit/Components/Observability}/FluxFlow.Components.Observability.Tests/FluxFlow.Components.Observability.Tests.csproj (60%) rename tests/{ => Unit/Components/Observability}/FluxFlow.Components.Observability.Tests/ObservabilityNodeTests.cs (89%) rename tests/{ => Unit/Components/Observability}/FluxFlow.Components.Observability.Tests/RecordingExpressionEngine.cs (100%) create mode 100644 tests/Unit/Components/Payloads/FluxFlow.Components.Payloads.Composition.Tests/FluxFlow.Components.Payloads.Composition.Tests.csproj rename tests/{ => Unit/Components/Payloads}/FluxFlow.Components.Payloads.Composition.Tests/PayloadsServiceCollectionExtensionsTests.cs (95%) rename tests/{ => Unit/Components/Payloads}/FluxFlow.Components.Payloads.Tests/FluxFlow.Components.Payloads.Tests.csproj (69%) rename tests/{ => Unit/Components/Payloads}/FluxFlow.Components.Payloads.Tests/PayloadInspectNodeTests.cs (80%) create mode 100644 tests/Unit/Components/Projections/FluxFlow.Components.Projections.Composition.Tests/FluxFlow.Components.Projections.Composition.Tests.csproj rename tests/{ => Unit/Components/Projections}/FluxFlow.Components.Projections.Composition.Tests/ProjectionsServiceCollectionExtensionsTests.cs (97%) rename tests/{ => Unit/Components/Projections}/FluxFlow.Components.Projections.Tests/EventProjectionNodeTests.cs (80%) rename tests/{ => Unit/Components/Projections}/FluxFlow.Components.Projections.Tests/FluxFlow.Components.Projections.Tests.csproj (68%) rename tests/{ => Unit/Components/Projections}/FluxFlow.Components.Projections.Tests/ProjectionContractTests.cs (100%) rename tests/{ => Unit/Components/RequestReply}/FluxFlow.Components.RequestReply.Tests/CorrelatedRequestTrackerTests.cs (100%) rename tests/{ => Unit/Components/RequestReply}/FluxFlow.Components.RequestReply.Tests/FluxFlow.Components.RequestReply.Tests.csproj (68%) rename tests/{ => Unit/Components/RequestReply}/FluxFlow.Components.RequestReply.Tests/RequestReplyCoordinatorTests.cs (94%) create mode 100644 tests/Unit/Components/Resilience/FluxFlow.Components.Resilience.Composition.Tests/FluxFlow.Components.Resilience.Composition.Tests.csproj rename tests/{ => Unit/Components/Resilience}/FluxFlow.Components.Resilience.Composition.Tests/ResilienceServiceCollectionExtensionsTests.cs (97%) rename tests/{ => Unit/Components/Resilience}/FluxFlow.Components.Resilience.Tests/FlowRetryNodeTests.cs (97%) rename tests/{ => Unit/Components/Resilience}/FluxFlow.Components.Resilience.Tests/FluxFlow.Components.Resilience.Tests.csproj (68%) create mode 100644 tests/Unit/Components/Routing/FluxFlow.Components.Routing.Composition.Tests/FluxFlow.Components.Routing.Composition.Tests.csproj rename tests/{ => Unit/Components/Routing}/FluxFlow.Components.Routing.Composition.Tests/RoutingServiceCollectionExtensionsTests.cs (95%) rename tests/{ => Unit/Components/Routing}/FluxFlow.Components.Routing.Tests/CorrelationNodeRuntimeTests.cs (97%) rename tests/{ => Unit/Components/Routing}/FluxFlow.Components.Routing.Tests/CorrelationPendingStoreTests.cs (100%) rename tests/{ => Unit/Components/Routing}/FluxFlow.Components.Routing.Tests/FluxFlow.Components.Routing.Tests.csproj (62%) rename tests/{ => Unit/Components/Routing}/FluxFlow.Components.Routing.Tests/JoinNodeRuntimeTests.cs (98%) rename tests/{ => Unit/Components/Routing}/FluxFlow.Components.Routing.Tests/JoinPendingStoreTests.cs (100%) rename tests/{ => Unit/Components/Routing}/FluxFlow.Components.Routing.Tests/JsonRoutingNodeTests.cs (95%) rename tests/{ => Unit/Components/Routing}/FluxFlow.Components.Routing.Tests/PostponedTargetBlock.cs (100%) rename tests/{ => Unit/Components/Routing}/FluxFlow.Components.Routing.Tests/RoutingTestSink.cs (100%) rename tests/{ => Unit/Components/Routing}/FluxFlow.Components.Routing.Tests/ThrowingTimeProvider.cs (100%) rename tests/{ => Unit/Components/Routing}/FluxFlow.Components.Routing.Tests/TrackingFakeTimeProvider.cs (100%) rename tests/{ => Unit/Components/Routing}/FluxFlow.Components.Routing.Tests/WindowNodeRuntimeTests.cs (97%) create mode 100644 tests/Unit/Components/Serialization/FluxFlow.Components.Serialization.Composition.Tests/FluxFlow.Components.Serialization.Composition.Tests.csproj rename tests/{ => Unit/Components/Serialization}/FluxFlow.Components.Serialization.Composition.Tests/SerializationServiceCollectionExtensionsTests.cs (97%) rename tests/{ => Unit/Components/Serialization}/FluxFlow.Components.Serialization.Tests/FluxFlow.Components.Serialization.Tests.csproj (68%) rename tests/{ => Unit/Components/Serialization}/FluxFlow.Components.Serialization.Tests/SerializationNodeTests.cs (67%) create mode 100644 tests/Unit/Components/Sessions/FluxFlow.Components.Sessions.Composition.Tests/FluxFlow.Components.Sessions.Composition.Tests.csproj rename tests/{ => Unit/Components/Sessions}/FluxFlow.Components.Sessions.Composition.Tests/SessionsServiceCollectionExtensionsTests.cs (95%) rename tests/{ => Unit/Components/Sessions}/FluxFlow.Components.Sessions.Tests/FluxFlow.Components.Sessions.Tests.csproj (71%) rename tests/{ => Unit/Components/Sessions}/FluxFlow.Components.Sessions.Tests/SessionComponentTests.cs (86%) rename tests/{ => Unit/Components/Sessions}/FluxFlow.Components.Sessions.Tests/SessionContractTests.cs (100%) rename tests/{ => Unit/Components/Sessions}/FluxFlow.Components.Sessions.Tests/SessionOptionsTests.cs (100%) rename tests/{ => Unit/Components/Sessions}/FluxFlow.Components.Sessions.Tests/TrackingFakeTimeProvider.cs (100%) create mode 100644 tests/Unit/Components/Sources/FluxFlow.Components.Sources.Composition.Tests/FluxFlow.Components.Sources.Composition.Tests.csproj rename tests/{ => Unit/Components/Sources}/FluxFlow.Components.Sources.Composition.Tests/SourcesServiceCollectionExtensionsTests.cs (96%) rename tests/{ => Unit/Components/Sources}/FluxFlow.Components.Sources.Tests/FluxFlow.Components.Sources.Tests.csproj (69%) rename tests/{ => Unit/Components/Sources}/FluxFlow.Components.Sources.Tests/GeneratedSourceNodeTests.cs (90%) rename tests/{ => Unit/Components/Sources}/FluxFlow.Components.Sources.Tests/PostponedTargetBlock.cs (100%) rename tests/{ => Unit/Components/Sources}/FluxFlow.Components.Sources.Tests/SequenceSourceNodeTests.cs (91%) rename tests/{ => Unit/Components/Sources}/FluxFlow.Components.Sources.Tests/SourcesTestSink.cs (100%) rename tests/{ => Unit/Components/Sources}/FluxFlow.Components.Sources.Tests/TrackingFakeTimeProvider.cs (100%) create mode 100644 tests/Unit/Components/State/FluxFlow.Components.State.Composition.Tests/FluxFlow.Components.State.Composition.Tests.csproj rename tests/{ => Unit/Components/State}/FluxFlow.Components.State.Composition.Tests/StateServiceCollectionExtensionsTests.cs (96%) rename tests/{ => Unit/Components/State}/FluxFlow.Components.State.Tests/FluxFlow.Components.State.Tests.csproj (62%) rename tests/{ => Unit/Components/State}/FluxFlow.Components.State.Tests/StateContractTests.cs (100%) rename tests/{ => Unit/Components/State}/FluxFlow.Components.State.Tests/StateOptionsTests.cs (100%) rename tests/{ => Unit/Components/State}/FluxFlow.Components.State.Tests/StateReducerNodeTests.cs (60%) rename tests/{ => Unit/Components/Storage}/FluxFlow.Components.Storage.Adapters.Tests/FluxFlow.Components.Storage.Adapters.Tests.csproj (68%) rename tests/{ => Unit/Components/Storage}/FluxFlow.Components.Storage.Adapters.Tests/StorageAdapterRegistrationTests.cs (100%) create mode 100644 tests/Unit/Components/Storage/FluxFlow.Components.Storage.Composition.Tests/FluxFlow.Components.Storage.Composition.Tests.csproj rename tests/{ => Unit/Components/Storage}/FluxFlow.Components.Storage.Composition.Tests/StorageServiceCollectionExtensionsTests.cs (96%) rename tests/{ => Unit/Components/Storage}/FluxFlow.Components.Storage.FileSystem.Tests/FileSystemStorageStoreTests.cs (98%) rename tests/{ => Unit/Components/Storage}/FluxFlow.Components.Storage.FileSystem.Tests/FluxFlow.Components.Storage.FileSystem.Tests.csproj (68%) rename tests/{ => Unit/Components/Storage}/FluxFlow.Components.Storage.SqlFile.Tests/FluxFlow.Components.Storage.SqlFile.Tests.csproj (77%) rename tests/{ => Unit/Components/Storage}/FluxFlow.Components.Storage.SqlFile.Tests/SqlFileStorageStoreTests.cs (98%) rename tests/{ => Unit/Components/Storage}/FluxFlow.Components.Storage.Tests/FluxFlow.Components.Storage.Tests.csproj (69%) rename tests/{ => Unit/Components/Storage}/FluxFlow.Components.Storage.Tests/InMemoryStorageStore.cs (100%) rename tests/{ => Unit/Components/Storage}/FluxFlow.Components.Storage.Tests/StorageComponentOptionsTests.cs (100%) rename tests/{ => Unit/Components/Storage}/FluxFlow.Components.Storage.Tests/StorageNodeOptionsTests.cs (100%) rename tests/{ => Unit/Components/Storage}/FluxFlow.Components.Storage.Tests/StorageNodeTests.cs (80%) rename tests/{ => Unit/Components/Storage}/FluxFlow.Components.Storage.Tests/StorageOutputContractTests.cs (100%) rename tests/{ => Unit/Components/Storage}/FluxFlow.Components.Storage.Tests/StorageRequestContractTests.cs (100%) rename tests/{ => Unit/Components/Storage}/FluxFlow.Components.Storage.Tests/StorageTestSink.cs (100%) create mode 100644 tests/Unit/Components/Timers/FluxFlow.Components.Timers.Composition.Tests/FluxFlow.Components.Timers.Composition.Tests.csproj rename tests/{ => Unit/Components/Timers}/FluxFlow.Components.Timers.Composition.Tests/TimersServiceCollectionExtensionsTests.cs (98%) rename tests/{ => Unit/Components/Timers}/FluxFlow.Components.Timers.Tests/CronScheduleTests.cs (100%) rename tests/{ => Unit/Components/Timers}/FluxFlow.Components.Timers.Tests/FluxFlow.Components.Timers.Tests.csproj (69%) rename tests/{ => Unit/Components/Timers}/FluxFlow.Components.Timers.Tests/TimerCanonicalNodeTests.cs (98%) rename tests/{ => Unit/Components/Timers}/FluxFlow.Components.Timers.Tests/TimerDebounceNodeTests.cs (96%) rename tests/{ => Unit/Components/Timers}/FluxFlow.Components.Timers.Tests/TimerDelayNodeTests.cs (97%) rename tests/{ => Unit/Components/Timers}/FluxFlow.Components.Timers.Tests/TimerIntervalNodeTests.cs (97%) rename tests/{ => Unit/Components/Timers}/FluxFlow.Components.Timers.Tests/TimerScheduleNodeTests.cs (97%) rename tests/{ => Unit/Components/Timers}/FluxFlow.Components.Timers.Tests/TimerTestSink.cs (100%) rename tests/{ => Unit/Components/Timers}/FluxFlow.Components.Timers.Tests/TimerThrottleNodeTests.cs (96%) rename tests/{ => Unit/Components/Timers}/FluxFlow.Components.Timers.Tests/TrackingFakeTimeProvider.cs (100%) create mode 100644 tests/Unit/Components/Validation/FluxFlow.Components.Validation.Composition.Tests/FluxFlow.Components.Validation.Composition.Tests.csproj rename tests/{ => Unit/Components/Validation}/FluxFlow.Components.Validation.Composition.Tests/ValidationServiceCollectionExtensionsTests.cs (98%) rename tests/{ => Unit/Components/Validation}/FluxFlow.Components.Validation.Tests/FluxFlow.Components.Validation.Tests.csproj (68%) rename tests/{ => Unit/Components/Validation}/FluxFlow.Components.Validation.Tests/JsonSchemaValidatorNodeTests.cs (76%) rename tests/{ => Unit/Core/Application}/FluxFlow.Composition.Tests/ApplicationAddressTests.cs (100%) rename tests/{ => Unit/Core/Application}/FluxFlow.Composition.Tests/ApplicationDefinitionAuthoringTests.cs (100%) rename tests/{ => Unit/Core/Application}/FluxFlow.Composition.Tests/ApplicationDefinitionFluentCaptureTests.cs (100%) rename tests/{ => Unit/Core/Application}/FluxFlow.Composition.Tests/ApplicationDefinitionJsonTests.cs (100%) create mode 100644 tests/Unit/Core/Application/FluxFlow.Composition.Tests/ApplicationLinkCompilerParityTests.cs rename tests/{ => Unit/Core/Application}/FluxFlow.Composition.Tests/ApplicationLinkCompilerTests.cs (99%) rename tests/{ => Unit/Core/Application}/FluxFlow.Composition.Tests/ComponentDescriptorTests.cs (100%) rename tests/{ => Unit/Core/Application}/FluxFlow.Composition.Tests/ComponentEventTests.cs (84%) create mode 100644 tests/Unit/Core/Application/FluxFlow.Composition.Tests/ComponentInputShapeTests.cs rename tests/{ => Unit/Core/Application}/FluxFlow.Composition.Tests/ComposedNodeTests.cs (100%) rename tests/{ => Unit/Core/Application}/FluxFlow.Composition.Tests/CompositionNodeFactoryContextTests.cs (100%) rename tests/{ => Unit/Core/Application}/FluxFlow.Composition.Tests/CompositionRuntimeReliabilityTests.cs (98%) rename tests/{ => Unit/Core/Application}/FluxFlow.Composition.Tests/FluxFlow.Composition.Tests.csproj (70%) rename tests/{ => Unit/Core/Application}/FluxFlow.Composition.Tests/FluxFlowRegistrationBuilderTests.cs (99%) rename tests/{ => Unit/Core/Application}/FluxFlow.Composition.Tests/RuntimeComponentBindingBuilderTests.cs (77%) rename tests/{ => Unit/Core/Application}/FluxFlow.Composition.Tests/TestCompositionNodes.cs (93%) rename tests/{ => Unit/Core/Application}/FluxFlow.Composition.Tests/TypedCodeFirstApplicationAuthoringTests.cs (98%) rename tests/{ => Unit/Core/Application}/FluxFlow.Composition.Tests/TypedCodeFirstApplicationLinkCompilerTests.cs (100%) rename tests/{ => Unit/Core/Application}/FluxFlow.Composition.Tests/TypedCodeFirstResourceAuthoringTests.cs (100%) rename tests/{ => Unit/Core/Execution}/FluxFlow.Coordination.Tests/FluxFlow.Coordination.Tests.csproj (80%) rename tests/{ => Unit/Core/Execution}/FluxFlow.Coordination.Tests/PendingExchangeCoordinatorTests.cs (100%) rename tests/{ => Unit/Core/Execution}/FluxFlow.Resilience.Tests/FluxFlow.Resilience.Tests.csproj (80%) rename tests/{ => Unit/Core/Execution}/FluxFlow.Resilience.Tests/RetryTests.cs (100%) rename tests/{ => Unit/Core/Foundation}/FluxFlow.Mapping.Tests/FlowAdapterTests.cs (100%) rename tests/{ => Unit/Core/Foundation}/FluxFlow.Mapping.Tests/FlowMapContextTests.cs (100%) rename tests/{ => Unit/Core/Foundation}/FluxFlow.Mapping.Tests/FluxFlow.Mapping.Tests.csproj (79%) rename tests/{ => Unit/Core/Foundation}/FluxFlow.Nodes.Tests/CorrelationIdTests.cs (100%) rename tests/{ => Unit/Core/Foundation}/FluxFlow.Nodes.Tests/Data/FlowContentTests.cs (100%) rename tests/{ => Unit/Core/Foundation}/FluxFlow.Nodes.Tests/Data/FlowErrorTests.cs (100%) create mode 100644 tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowEventMessageTests.cs rename tests/{ => Unit/Core/Foundation}/FluxFlow.Nodes.Tests/FlowEventTests.cs (100%) rename tests/{ => Unit/Core/Foundation}/FluxFlow.Nodes.Tests/FlowFaultAndDrainHookTests.cs (100%) rename tests/{ => Unit/Core/Foundation}/FluxFlow.Nodes.Tests/FlowMessageTests.cs (85%) rename tests/{ => Unit/Core/Foundation}/FluxFlow.Nodes.Tests/FlowMultiOutputAndSourceTests.cs (99%) rename tests/{ => Unit/Core/Foundation}/FluxFlow.Nodes.Tests/FlowNodeTests.cs (99%) rename tests/{ => Unit/Core/Foundation}/FluxFlow.Nodes.Tests/FlowOptionsTests.cs (100%) rename tests/{ => Unit/Core/Foundation}/FluxFlow.Nodes.Tests/FlowOutputTests.cs (100%) create mode 100644 tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowValueTests.cs rename tests/{ => Unit/Core/Foundation}/FluxFlow.Nodes.Tests/FluxFlow.Nodes.Tests.csproj (79%) rename tests/{ => Unit/Core/Foundation}/FluxFlow.Nodes.Tests/ReliableOutputTestTargets.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile.Tests/FluxFlow.Engine.DurableInput.SqlFile.Tests.csproj (84%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDeadLetterSchemaAssertions.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputDeadLetterBoundaryTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputDeadLetterMigrationTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputDeadLetterOperationsTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputDeadLetterStoreConformanceTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputLeaseRenewalPersistenceTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputLeaseRenewalStoreConformanceTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputRegistrationTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputRetentionStoreConformanceTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputRetentionTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStatusStoreConformanceTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStatusTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStoreConcurrencyTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStoreConformanceTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStoreOptionsTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStorePersistenceTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStoreSchemaAndLifecycleTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputTestData.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileVersionOneDatabase.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.SqlFile.Tests/TemporarySqliteDatabase.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.TSql.Tests/FluxFlow.Engine.DurableInput.TSql.Tests.csproj (79%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputPackageBoundaryTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputPreflightAndDisposalTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputRegistrationTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputStoreOptionsTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputTestData.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableApplicationInputsTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputBoundaryTests.cs (93%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputCompletionTestSource.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputCompletionTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputContractTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputDeadLetterContractTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputDeadLetterStoreConformanceTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputDeadLetterStoreTestContext.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputDispatcherTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputInstrumentationTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputLeaseRenewalStoreConformanceTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputLeaseRenewalStoreTestContext.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputRegistrationTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputRetentionContractTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputRetentionStoreConformanceTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputRetentionStoreTestContext.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputStatusContractsTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputStatusStoreConformanceTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputStatusStoreTestContext.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputStoreConformanceData.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputStoreConformanceTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputStoreContractTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputStoreTestContext.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputTestApplication.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputTestData.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputTestStore.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/DurableInputWorkflowCompletionDispatcherTests.cs (100%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/FluxFlow.Engine.DurableInput.Tests.csproj (80%) rename tests/{ => Unit/Engine/DurableInput}/FluxFlow.Engine.DurableInput.Tests/RecordingLogger.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile.Tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests.csproj (74%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableInputOutputCoexistenceTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeadLetterInfrastructureTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeadLetterStoreConformanceTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeliveryInfrastructureTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeliverySchemaTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeliveryStoreConformanceTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputLeaseRenewalTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputRegistrationTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputRetentionStoreConformanceTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputRetentionTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStatusStoreConformanceTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStatusTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStoreConcurrencyTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStoreConformanceTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStoreOptionsTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStorePersistenceTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStoreSchemaAndLifecycleTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputTestData.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputTestDatabase.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.SqlFile.Tests/TemporarySqliteDatabase.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.Tests/FluxFlow.Engine.DurableOutput.TSql.Tests.csproj (78%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputPackageBoundaryTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputPreflightAndDisposalTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputRegistrationTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputStoreOptionsTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputTestData.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputCaptureTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputContentComparisonTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputContractTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeadLetterContractTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeadLetterStoreConformanceTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeadLetterStoreTestContext.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryContractTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryDispatcherTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryRegistrationTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryStoreConformanceTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryStoreTestContext.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputInstrumentationTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputRegistrationTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputRetentionContractTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputRetentionStoreConformanceTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputRetentionStoreTestContext.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStatusContractsTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStatusStoreConformanceTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStatusStoreTestContext.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStoreConformanceData.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStoreConformanceTests.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStoreTestContext.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/DurableOutputTestData.cs (100%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/FluxFlow.Engine.DurableOutput.Tests.csproj (79%) rename tests/{ => Unit/Engine/DurableOutput}/FluxFlow.Engine.DurableOutput.Tests/RecordingDurableOutputStore.cs (100%) rename tests/{ => Unit/Engine/Health}/FluxFlow.Engine.HealthChecks.Tests/FluxFlow.Engine.HealthChecks.Tests.csproj (82%) rename tests/{ => Unit/Engine/Health}/FluxFlow.Engine.HealthChecks.Tests/FluxFlowApplicationHealthCheckTests.cs (100%) rename tests/{ => Unit/Engine/Health}/FluxFlow.Engine.HealthChecks.Tests/FluxFlowHealthCheckRegistrationTests.cs (100%) create mode 100644 tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationActivityTests.cs rename tests/{ => Unit/Engine/Runtime}/FluxFlow.Engine.Tests/ApplicationDefinitionSourcesTests.cs (100%) create mode 100644 tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationEventStreamTests.cs create mode 100644 tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationEventsTests.cs rename tests/{ => Unit/Engine/Runtime}/FluxFlow.Engine.Tests/ApplicationOutputCaptureTests.cs (99%) rename tests/{ => Unit/Engine/Runtime}/FluxFlow.Engine.Tests/ApplicationPortHandleTests.cs (99%) rename tests/{ => Unit/Engine/Runtime}/FluxFlow.Engine.Tests/ApplicationPortRuntimeTests.cs (84%) rename tests/{ => Unit/Engine/Runtime}/FluxFlow.Engine.Tests/ApplicationResourceContractRuntimeTests.cs (100%) rename tests/{ => Unit/Engine/Runtime}/FluxFlow.Engine.Tests/ApplicationRevisionPlannerTests.cs (100%) rename tests/{ => Unit/Engine/Runtime}/FluxFlow.Engine.Tests/ApplicationRuntimeAssemblerTestServiceCollectionExtensions.cs (100%) rename tests/{ => Unit/Engine/Runtime}/FluxFlow.Engine.Tests/ApplicationRuntimeAssemblerTests.cs (99%) rename tests/{ => Unit/Engine/Runtime}/FluxFlow.Engine.Tests/ApplicationRuntimeConcurrencyTests.cs (100%) rename tests/{ => Unit/Engine/Runtime}/FluxFlow.Engine.Tests/ApplicationRuntimeSignalsTests.cs (84%) rename tests/{ => Unit/Engine/Runtime}/FluxFlow.Engine.Tests/CompositionServiceProviderSnapshotTests.cs (100%) rename tests/{ => Unit/Engine/Runtime}/FluxFlow.Engine.Tests/FluxFlow.Engine.Tests.csproj (83%) rename tests/{ => Unit/Engine/Runtime}/FluxFlow.Engine.Tests/FluxFlowApplicationRegistrationTests.cs (100%) rename tests/{ => Unit/Engine/Runtime}/FluxFlow.Engine.Tests/FluxFlowApplicationTests.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/BespokeClockInterfaceTests.cs (81%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/CanonicalCleanupLedgerTests.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/CodeFirstApplicationAuthoringConventionTests.cs (99%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/ComponentCompositionMetadataConventionTests.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/ComponentFamilyAuthoringConventionTests.cs (98%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/ComponentFamilyRegistrationMatrixTests.cs (91%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/ComponentPackageBoundaryTests.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/DocumentationBoundaryTests.cs (98%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/DurabilityPackageVersionTests.cs (51%) create mode 100644 tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/FluxFlow.Release.Tests.csproj rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/HealthReadinessConventionTests.cs (95%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/LinkOwnershipBoundaryTests.cs (80%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/MqttPortableTransportConventionTests.cs (94%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/NodeDataBoundaryTests.cs (94%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/PackageArchiveInspectScriptTests.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/PackageBinaryCompatPreflightScriptTests.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/PackageBinaryCompatibilityPolicyTests.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/PackageConsumerAcceptanceScriptTests.cs (99%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/PackageConsumerSmokeScriptTests.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/PackageFeedVerifyScriptTests.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/PackageListScriptTests.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/PackageManifest.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/PackageManifestTests.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/PackageProjectConventionTests.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/PackagePublishWorkflowTests.cs (68%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/PackageReleaseAvailabilityScriptTests.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/PackageReleaseDryRunScriptTests.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/PackageReleasePlanScriptTests.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/PackageReleasePreflightScriptTests.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/PackageReleaseTagScriptTests.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/PerformanceHardeningConventionTests.cs (94%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/PublicApiBaselineTests.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/ReleaseOperatorNoteTests.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/ReleaseProcessCollection.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/ReleaseScriptRunner.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/ReleaseScriptTests.cs (97%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/ReleaseTestPaths.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/ReleaseTestProcess.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/ReleaseTestProcessTests.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/SampleDocumentationTests.cs (100%) rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/StandaloneCompositionBoundaryTests.cs (100%) create mode 100644 tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/TestLayoutConventionTests.cs rename tests/{ => Unit/Infrastructure/Release}/FluxFlow.Release.Tests/TypedComponentAuthoringConventionTests.cs (71%) create mode 100644 tests/Unit/Samples/FluxFlow.ComponentPackageTemplate.Tests/FluxFlow.ComponentPackageTemplate.Tests.csproj rename tests/{ => Unit/Samples}/FluxFlow.ComponentPackageTemplate.Tests/ManualTimeProvider.cs (100%) rename tests/{ => Unit/Samples}/FluxFlow.ComponentPackageTemplate.Tests/TemplateEnrichNodeTests.cs (95%) rename tests/{ => Unit/Samples}/FluxFlow.DesignerHost.Tests/DesignerHostCatalogTests.cs (87%) rename tests/{ => Unit/Samples}/FluxFlow.DesignerHost.Tests/FluxFlow.DesignerHost.Tests.csproj (62%) rename tests/{ => Unit/Samples}/FluxFlow.DesignerHost.Tests/ValidationMessageMapperTests.cs (100%) rename tests/{FluxFlow.Components.Http.Tests/FluxFlow.Components.Http.Tests.csproj => Unit/Samples/FluxFlow.ReportingSample.Tests/FluxFlow.ReportingSample.Tests.csproj} (72%) create mode 100644 tests/Unit/Samples/FluxFlow.ReportingSample.Tests/ReportArchiveTests.cs create mode 100644 tests/Unit/Samples/FluxFlow.ReportingSample.Tests/ReportingCatalogTests.cs create mode 100644 tests/Unit/Samples/FluxFlow.ReportingSample.Tests/ReportingFilterTests.cs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index abe8da61..5d00410e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,8 +30,17 @@ jobs: - name: Build run: dotnet build FluxFlow.sln --configuration Release --no-restore - - name: Test - run: dotnet test FluxFlow.sln --configuration Release --no-build --logger "trx;LogFileName=test-results.trx" + - name: Test unit suite + shell: pwsh + run: ./eng/test.ps1 -Suite Unit -Configuration Release -NoBuild + + - name: Acceptance tests + shell: pwsh + run: ./eng/test.ps1 -Suite Acceptance -Configuration Release -NoBuild + + - name: Container integration tests + shell: pwsh + run: ./eng/test.ps1 -Suite Integration -Configuration Release -NoBuild - name: Validate package consumer behavior shell: pwsh diff --git a/.github/workflows/publish-nuget.yml b/.github/workflows/publish-nuget.yml index 702dab44..3d78c32c 100644 --- a/.github/workflows/publish-nuget.yml +++ b/.github/workflows/publish-nuget.yml @@ -56,16 +56,25 @@ jobs: - name: Build run: dotnet build FluxFlow.sln --configuration Release --no-restore -p:ContinuousIntegrationBuild=true - - name: Test - run: dotnet test FluxFlow.sln --configuration Release --no-build + - name: Test unit suite + shell: pwsh + run: ./eng/test.ps1 -Suite Unit -Configuration Release -NoBuild + + - name: Acceptance tests + shell: pwsh + run: ./eng/test.ps1 -Suite Acceptance -Configuration Release -NoBuild + + - name: Container integration tests + shell: pwsh + run: ./eng/test.ps1 -Suite Integration -Configuration Release -NoBuild - name: Validate durable input provider shell: pwsh - run: ./tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/run-integration.ps1 -AcceptLicense + run: ./tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/run-integration.ps1 -AcceptLicense - name: Validate durable output provider shell: pwsh - run: ./tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/run-integration.ps1 -AcceptLicense + run: ./tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/run-integration.ps1 -AcceptLicense - name: Validate binary compatibility and pack shell: pwsh diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b28ca91..b9b79f0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,535 @@ Current framework simplification release train. Historical entries below describ rejected invalid-candidate rollback, exact active revision retention, and a fresh request through the retained JSON route. +## FluxFlow.Engine 9.0.0-rc.2 + +- Fixes passive observation overflow: canonical FlowValue observation uses one buffer; converted observation faults and reports rejection without interrupting output delivery. + +## FluxFlow.Fluent 6.0.0-rc.2 + +- Advances the Engine dependency closure to require the corrected passive-observation candidate. + +## FluxFlow.Fluent.Hosting 6.0.0-rc.2 + +- Advances the Engine dependency closure to require the corrected passive-observation candidate. + +## FluxFlow.Engine.DurableInput 3.0.0-rc.2 + +- Advances the Engine dependency closure to require the corrected passive-observation candidate. + +## FluxFlow.Engine.DurableInput.SqlFile 3.0.0-rc.2 + +- Advances the Engine dependency closure to require the corrected passive-observation candidate. + +## FluxFlow.Engine.DurableInput.TSql 3.0.0-rc.2 + +- Advances the Engine dependency closure to require the corrected passive-observation candidate. + +## FluxFlow.Engine.DurableOutput 5.0.0-rc.2 + +- Advances the Engine dependency closure to require the corrected passive-observation candidate. + +## FluxFlow.Engine.DurableOutput.SqlFile 5.0.0-rc.2 + +- Advances the Engine dependency closure to require the corrected passive-observation candidate. + +## FluxFlow.Engine.DurableOutput.TSql 4.0.0-rc.2 + +- Advances the Engine dependency closure to require the corrected passive-observation candidate. + +## FluxFlow.Engine.HealthChecks 2.0.0-rc.2 + +- Advances the Engine dependency closure to require the corrected passive-observation candidate. + +## FluxFlow.Coordination 3.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Resilience 3.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Coordination 3.0.0-rc.1, FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Resilience.Composition 6.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Designer 7.0.0-rc.1, FluxFlow.Components.Resilience 3.0.0-rc.1, FluxFlow.Composition 8.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.RequestReply 3.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Coordination 3.0.0-rc.1, FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Http.AspNetCore 3.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Http 7.0.0-rc.1, FluxFlow.Components.RequestReply 3.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Mqtt 8.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Coordination 3.0.0-rc.1, FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Mqtt.Composition 8.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Mqtt 8.0.0-rc.1, FluxFlow.Components.Designer 7.0.0-rc.1, FluxFlow.Composition 8.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Mqtt.MqttNet 4.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Mqtt 8.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Mqtt.PulseMqtt 5.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Mqtt 8.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Mapping 7.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Mapping.Composition 8.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Mapping 7.0.0-rc.1, FluxFlow.Components.Designer 7.0.0-rc.1, FluxFlow.Composition 8.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Assertions 7.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Assertions.Composition 8.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Assertions 7.0.0-rc.1, FluxFlow.Components.Designer 7.0.0-rc.1, FluxFlow.Composition 8.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Sources 7.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Sources.Composition 8.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Sources 7.0.0-rc.1, FluxFlow.Components.Designer 7.0.0-rc.1, FluxFlow.Composition 8.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Routing 7.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Routing.Composition 8.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Routing 7.0.0-rc.1, FluxFlow.Components.Designer 7.0.0-rc.1, FluxFlow.Composition 8.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Validation 7.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Validation.Composition 8.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Validation 7.0.0-rc.1, FluxFlow.Components.Designer 7.0.0-rc.1, FluxFlow.Composition 8.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.FileSystem 7.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.FileSystem.Composition 8.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.FileSystem 7.0.0-rc.1, FluxFlow.Components.Designer 7.0.0-rc.1, FluxFlow.Composition 8.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Observability 8.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Observability.Composition 8.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Observability 8.0.0-rc.1, FluxFlow.Components.Designer 7.0.0-rc.1, FluxFlow.Composition 8.0.0-rc.1, FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Timers 7.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Timers.Composition 8.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Timers 7.0.0-rc.1, FluxFlow.Components.Designer 7.0.0-rc.1, FluxFlow.Composition 8.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Payloads 7.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Payloads.Composition 7.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Payloads 7.0.0-rc.1, FluxFlow.Components.Designer 7.0.0-rc.1, FluxFlow.Composition 8.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Http 7.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Http.Composition 8.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Http 7.0.0-rc.1, FluxFlow.Components.Designer 7.0.0-rc.1, FluxFlow.Composition 8.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Serialization 7.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Serialization.Composition 7.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Serialization 7.0.0-rc.1, FluxFlow.Components.Designer 7.0.0-rc.1, FluxFlow.Composition 8.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Metrics 7.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Metrics.Composition 7.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Metrics 7.0.0-rc.1, FluxFlow.Components.Designer 7.0.0-rc.1, FluxFlow.Composition 8.0.0-rc.1, FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Projections 8.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Projections.Composition 7.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Projections 8.0.0-rc.1, FluxFlow.Components.Designer 7.0.0-rc.1, FluxFlow.Composition 8.0.0-rc.1, FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Expectations 7.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Nodes 5.0.0-rc.1, FluxFlow.Components.Projections 8.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Expectations.Composition 8.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Expectations 7.0.0-rc.1, FluxFlow.Components.Designer 7.0.0-rc.1, FluxFlow.Components.Projections 8.0.0-rc.1, FluxFlow.Composition 8.0.0-rc.1, FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Designer 7.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Composition 8.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Sessions 7.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Sessions.Composition 8.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Sessions 7.0.0-rc.1, FluxFlow.Components.Designer 7.0.0-rc.1, FluxFlow.Composition 8.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.State 7.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.State.Composition 8.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.State 7.0.0-rc.1, FluxFlow.Components.Designer 7.0.0-rc.1, FluxFlow.Composition 8.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Storage 8.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Nodes 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Storage.Composition 8.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Storage 8.0.0-rc.1, FluxFlow.Components.Designer 7.0.0-rc.1, FluxFlow.Composition 8.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Storage.FileSystem 6.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Storage 8.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Components.Storage.SqlFile 6.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Components.Storage 8.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Fluent 6.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Nodes 5.0.0-rc.1, FluxFlow.Composition 8.0.0-rc.1, FluxFlow.Engine 9.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Fluent.Hosting 6.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Fluent 6.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Engine.DurableInput 3.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Engine 9.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Engine.DurableInput.SqlFile 3.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Engine.DurableInput 3.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Engine.DurableInput.TSql 3.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Engine.DurableInput 3.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Engine.DurableOutput 5.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Engine 9.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Engine.DurableOutput.SqlFile 5.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Engine.DurableOutput 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Engine.DurableOutput.TSql 4.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Engine.DurableOutput 5.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Engine.HealthChecks 2.0.0-rc.1 + +- Breaking dependency upgrade: rebuilt for the canonical runtime/message and + event contracts; consumers must update the coordinated package set and recompile. +- Updated direct dependencies: FluxFlow.Engine 9.0.0-rc.1. +- See docs/49-canonical-package-release-train.md for the release order and + docs/48-canonical-event-migration.md for event consumer migration. + +## FluxFlow.Engine 9.0.0-rc.1 + +- Breaking: system-event and diagnostic ports now carry canonical FlowMessage + envelopes; the old Signals payload types are retired. Recompile consumers. +- See docs/48-canonical-event-migration.md for the coordinated migration. +- Adds FluxFlowApplication.Events, an application-lifetime native Dataflow feed + carrying canonical FlowMessage events with application and producing-revision context. +- Replaces the unshipped reporting framework: no core report catalog, saved-filter + language, replay journal, report wrapper or coordinated report snapshot. +- Retains DI-selected reports, portable filters and historical queries in the + consumer sample only. Live observations explicitly do not guarantee complete history. + +## FluxFlow.Composition 8.0.0-rc.1 + +- Breaking: event bindings carry FlowMessage instead of FlowEvent; + ApplicationRuntime.Activity replaces ApplicationRuntime.Events. +- Rebuild registrations and dependent components against this major version. +- Adds native ComponentInstance.Activity observations for named and legacy event + sources, preserving canonical identity and source headers. +- Replaces the unshipped callback registry with ordinary Dataflow links and bounded forwarding. + +## FluxFlow.Nodes 5.0.0-rc.1 + +- Breaking: FlowNode.Events and FlowSource.Events expose ISourceBlock + instead of ISourceBlock. FlowEvent remains an authoring/access helper, + not a second runtime transport contract. +- Adds the canonical event revision header for application-level event provenance. +- Gives input shapes structural equality for repeatable contract registration, + including unordered accepted kinds and case-insensitive required property names. + +## FluxFlow.Composition 7.1.0-rc.1 + +- Carries component-owned input shapes through runtime descriptors and canonical + input bindings, including instance factories. +- Adds sample input preflight without activating components. An undescribed + input remains unchecked; structural success leaves domain validation to the component. +- Rejects conflicting input-shape registrations and input shapes attached to outputs. + +## FluxFlow.Components.Designer 6.1.0-rc.1 + +- Derives runtime and designer input shapes from the same binding declaration. +- Validates shape placement and includes shapes in registration identity. +- The designer host sample exposes serializable input-shape hints on its port models. + +## FluxFlow.Expressions.Jsonata 1.0.0 + +- Adds the independently packaged JSONata expression adapter for runtime mapping. +- Keeps expression evaluation behind the existing host-owned expression boundary. + ## FluxFlow.Components.Mqtt 7.1.0 - Adds a provider-neutral `MqttBrokerTransport` choice and WebSocket path while diff --git a/Directory.Packages.props b/Directory.Packages.props index b7486865..d5ce3c0e 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -7,6 +7,7 @@ + @@ -31,6 +32,7 @@ + diff --git a/FluxFlow.sln b/FluxFlow.sln index 2e8709df..8026768e 100644 --- a/FluxFlow.sln +++ b/FluxFlow.sln @@ -3,287 +3,479 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluxFlow.Engine", "src\FluxFlow.Engine\FluxFlow.Engine.csproj", "{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluxFlow.Engine.Tests", "tests\FluxFlow.Engine.Tests\FluxFlow.Engine.Tests.csproj", "{B2C3D4E5-F6A7-8901-BCDE-F01234567891}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluxFlow.SampleApp", "samples\FluxFlow.SampleApp\FluxFlow.SampleApp.csproj", "{6B0C7186-C19B-4999-905A-D0FA6AC4D40F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Components", "Components", "{3343A86A-4869-510C-AD07-13D327905271}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Assertions", "Assertions", "{FC069441-2B75-5077-8159-CC5FDF28943E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Designer", "Designer", "{7217D8FE-8057-5113-805D-4D373443C140}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Expectations", "Expectations", "{2D7F1E7A-8F85-5168-BEC1-0458C71D976F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FileSystem", "FileSystem", "{43B38725-E052-50F8-9922-F92C485D4325}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Http", "Http", "{E6B086F8-F6EC-5680-B584-F6ACDC8629BD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mapping", "Mapping", "{D52429C2-2147-59EC-BE18-3795B1C7CD2F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Metrics", "Metrics", "{AB7B6314-0F6B-5223-AD50-73B38D64CCEB}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mqtt", "Mqtt", "{42F8CF29-5E51-4E5F-9F63-5B98C1AE2A65}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mqtt", "src\Mqtt\FluxFlow.Components.Mqtt\FluxFlow.Components.Mqtt.csproj", "{2C850AE8-F45A-486D-91A8-153434BC9051}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Observability", "Observability", "{BFAD4AB5-4732-53FD-ADB3-7BC0D393BF70}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0AB3BF05-4346-4AA6-1389-037BE0695223}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Payloads", "Payloads", "{85AC3E1A-96A8-5E48-B1C7-6AFC0F0D9A35}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Projections", "Projections", "{8CD5853E-8A7A-5E15-A416-949270C86FC5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RequestReply", "RequestReply", "{1053E335-E0CB-5B86-A85D-F57052CB3670}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Resilience", "Resilience", "{DB06F3C9-1316-5A9D-B089-70F85612B135}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Routing", "Routing", "{AEB62502-2E7C-5609-A87B-1EA547E15DDF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mqtt.Tests", "tests\FluxFlow.Components.Mqtt.Tests\FluxFlow.Components.Mqtt.Tests.csproj", "{B0332B14-CA7D-4D78-92DA-B1C09D83056B}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Serialization", "Serialization", "{E84BAC45-A985-5152-AFC2-081546467439}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mapping", "src\FluxFlow.Components.Mapping\FluxFlow.Components.Mapping.csproj", "{D9130A71-1A89-4C6F-95E2-578AB2CBE920}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sessions", "Sessions", "{5E27F3E8-17E7-5399-A77A-013DF14DFC23}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mapping.Tests", "tests\FluxFlow.Components.Mapping.Tests\FluxFlow.Components.Mapping.Tests.csproj", "{5B104CB9-ACCB-42F3-9157-AF84FE8B3E4D}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sources", "Sources", "{8BDA4D98-75C5-5A9E-8243-2E4455E353A5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "State", "State", "{5CFF86F2-769E-515F-A062-D6D211F9DF1F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Storage", "Storage", "{2DB928DC-1312-5CB7-9ECB-19AA2B4D558A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Timers", "Timers", "{7787A5BD-F8D9-5B08-8B8D-D6D2929B3280}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Validation", "Validation", "{62172793-7918-5CED-8232-6D96E9FCB9C6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mqtt", "src\Components\Mqtt\FluxFlow.Components.Mqtt\FluxFlow.Components.Mqtt.csproj", "{2C850AE8-F45A-486D-91A8-153434BC9051}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mapping", "src\Components\Mapping\FluxFlow.Components.Mapping\FluxFlow.Components.Mapping.csproj", "{D9130A71-1A89-4C6F-95E2-578AB2CBE920}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{5D20AA90-6969-D8BD-9DCD-8634F4692FDA}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.ComponentPackageTemplate", "samples\FluxFlow.ComponentPackageTemplate\FluxFlow.ComponentPackageTemplate.csproj", "{9549CDB0-B187-4860-B06C-5A5A445E088B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.ComponentPackageTemplate.Tests", "tests\FluxFlow.ComponentPackageTemplate.Tests\FluxFlow.ComponentPackageTemplate.Tests.csproj", "{32378CF0-CB7D-4242-957B-676908420E8A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Validation", "src\Components\Validation\FluxFlow.Components.Validation\FluxFlow.Components.Validation.csproj", "{5AEBC439-9CA8-4D02-A118-B19090E66223}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Validation", "src\FluxFlow.Components.Validation\FluxFlow.Components.Validation.csproj", "{5AEBC439-9CA8-4D02-A118-B19090E66223}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.FileSystem", "src\Components\FileSystem\FluxFlow.Components.FileSystem\FluxFlow.Components.FileSystem.csproj", "{BDB248AE-6CBB-4BB5-9FB1-8A8FDD18C4CE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Validation.Tests", "tests\FluxFlow.Components.Validation.Tests\FluxFlow.Components.Validation.Tests.csproj", "{BD693153-6B2D-4B54-BFC9-35E20C996270}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Observability", "src\Components\Observability\FluxFlow.Components.Observability\FluxFlow.Components.Observability.csproj", "{D03E7529-5E28-4478-A0DC-596B674C11CC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.FileSystem", "src\FluxFlow.Components.FileSystem\FluxFlow.Components.FileSystem.csproj", "{BDB248AE-6CBB-4BB5-9FB1-8A8FDD18C4CE}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Timers", "src\Components\Timers\FluxFlow.Components.Timers\FluxFlow.Components.Timers.csproj", "{5EC25549-ADE1-46C0-9AD3-88D6BE2DD2E4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.FileSystem.Tests", "tests\FluxFlow.Components.FileSystem.Tests\FluxFlow.Components.FileSystem.Tests.csproj", "{44DA15EF-BB86-4C4F-8809-A5BCA7B7FA18}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Payloads", "src\Components\Payloads\FluxFlow.Components.Payloads\FluxFlow.Components.Payloads.csproj", "{C4F428B3-4841-4364-894A-0993AD1E8A91}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Observability", "src\FluxFlow.Components.Observability\FluxFlow.Components.Observability.csproj", "{D03E7529-5E28-4478-A0DC-596B674C11CC}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Http", "src\Components\Http\FluxFlow.Components.Http\FluxFlow.Components.Http.csproj", "{FEB9A077-5585-4071-99FB-CAD05E6577D3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Observability.Tests", "tests\FluxFlow.Components.Observability.Tests\FluxFlow.Components.Observability.Tests.csproj", "{4E0630FC-BB47-4454-B395-5AFC89AAA207}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Serialization", "src\Components\Serialization\FluxFlow.Components.Serialization\FluxFlow.Components.Serialization.csproj", "{FE1B7B2A-0B26-4861-B0B8-EF96297C3E51}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Timers", "src\FluxFlow.Components.Timers\FluxFlow.Components.Timers.csproj", "{5EC25549-ADE1-46C0-9AD3-88D6BE2DD2E4}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Metrics", "src\Components\Metrics\FluxFlow.Components.Metrics\FluxFlow.Components.Metrics.csproj", "{C04187FA-99A2-489D-87A3-9FBEA11788AA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Timers.Tests", "tests\FluxFlow.Components.Timers.Tests\FluxFlow.Components.Timers.Tests.csproj", "{3AB2EDD3-29CD-4439-824A-AA77A83D8313}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Sessions", "src\Components\Sessions\FluxFlow.Components.Sessions\FluxFlow.Components.Sessions.csproj", "{79B7BC52-F1BA-4FCE-87FD-E64F6242750E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Payloads", "src\FluxFlow.Components.Payloads\FluxFlow.Components.Payloads.csproj", "{C4F428B3-4841-4364-894A-0993AD1E8A91}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.State", "src\Components\State\FluxFlow.Components.State\FluxFlow.Components.State.csproj", "{464A3592-557A-45A6-BE61-AC49919CC6ED}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Payloads.Tests", "tests\FluxFlow.Components.Payloads.Tests\FluxFlow.Components.Payloads.Tests.csproj", "{79FFF590-89D6-4677-A127-A8C0504E53B8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Storage", "src\Components\Storage\FluxFlow.Components.Storage\FluxFlow.Components.Storage.csproj", "{F154572F-A92B-4C9C-A814-9A957A6F7A4F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Http", "src\FluxFlow.Components.Http\FluxFlow.Components.Http.csproj", "{FEB9A077-5585-4071-99FB-CAD05E6577D3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Assertions", "src\Components\Assertions\FluxFlow.Components.Assertions\FluxFlow.Components.Assertions.csproj", "{82DD1D7F-0693-415D-A254-85327169B674}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Http.Tests", "tests\FluxFlow.Components.Http.Tests\FluxFlow.Components.Http.Tests.csproj", "{4C3AC3C0-A552-4631-A59B-CB4FB37CE4ED}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Sources", "src\Components\Sources\FluxFlow.Components.Sources\FluxFlow.Components.Sources.csproj", "{CDE70675-83CC-4D27-842C-7001827E8DF7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Serialization", "src\FluxFlow.Components.Serialization\FluxFlow.Components.Serialization.csproj", "{FE1B7B2A-0B26-4861-B0B8-EF96297C3E51}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Routing", "src\Components\Routing\FluxFlow.Components.Routing\FluxFlow.Components.Routing.csproj", "{2F1F57EC-2E49-452B-AE39-EBC978BB1F2F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Serialization.Tests", "tests\FluxFlow.Components.Serialization.Tests\FluxFlow.Components.Serialization.Tests.csproj", "{69ED7731-C250-43B0-A021-C908C0E2CF1C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Storage.FileSystem", "src\Components\Storage\FluxFlow.Components.Storage.FileSystem\FluxFlow.Components.Storage.FileSystem.csproj", "{8B40C04A-E3B8-4830-9203-3A2234A000BD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Metrics", "src\FluxFlow.Components.Metrics\FluxFlow.Components.Metrics.csproj", "{C04187FA-99A2-489D-87A3-9FBEA11788AA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Storage.SqlFile", "src\Components\Storage\FluxFlow.Components.Storage.SqlFile\FluxFlow.Components.Storage.SqlFile.csproj", "{FF8A1168-FB4E-4953-9A50-34CC841C5A5A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Metrics.Tests", "tests\FluxFlow.Components.Metrics.Tests\FluxFlow.Components.Metrics.Tests.csproj", "{4EB52804-F20C-4196-811D-DFB484B9E57B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Projections", "src\Components\Projections\FluxFlow.Components.Projections\FluxFlow.Components.Projections.csproj", "{B93984FE-7EB4-452C-9E33-2A9E8F79D25F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Sessions", "src\FluxFlow.Components.Sessions\FluxFlow.Components.Sessions.csproj", "{79B7BC52-F1BA-4FCE-87FD-E64F6242750E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Expectations", "src\Components\Expectations\FluxFlow.Components.Expectations\FluxFlow.Components.Expectations.csproj", "{2D7D23EC-C51C-4DFE-BFFB-7DB40B589BE5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Sessions.Tests", "tests\FluxFlow.Components.Sessions.Tests\FluxFlow.Components.Sessions.Tests.csproj", "{11695913-2A5F-4D42-AE85-5B40328234A8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Designer", "src\Components\Designer\FluxFlow.Components.Designer\FluxFlow.Components.Designer.csproj", "{F65C6724-1675-4108-8563-A63D24B04E01}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.State", "src\FluxFlow.Components.State\FluxFlow.Components.State.csproj", "{464A3592-557A-45A6-BE61-AC49919CC6ED}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.RequestReply", "src\Components\RequestReply\FluxFlow.Components.RequestReply\FluxFlow.Components.RequestReply.csproj", "{D46BA872-478C-4C05-A9C8-7079A9200B98}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.State.Tests", "tests\FluxFlow.Components.State.Tests\FluxFlow.Components.State.Tests.csproj", "{2E69C800-64CF-4279-9E3E-32B3934B3493}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Http.AspNetCore", "src\Components\Http\FluxFlow.Components.Http.AspNetCore\FluxFlow.Components.Http.AspNetCore.csproj", "{EA9665A2-4B01-4A8E-8FBB-9951A3A61A82}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Storage", "src\FluxFlow.Components.Storage\FluxFlow.Components.Storage.csproj", "{F154572F-A92B-4C9C-A814-9A957A6F7A4F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.HttpTriggerSample", "samples\FluxFlow.HttpTriggerSample\FluxFlow.HttpTriggerSample.csproj", "{2036BE09-BFDD-425A-B2CF-F5B695570A86}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Storage.Tests", "tests\FluxFlow.Components.Storage.Tests\FluxFlow.Components.Storage.Tests.csproj", "{2D0583B6-E9DC-4E37-A4AA-D758CD909B41}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mqtt.MqttNet", "src\Components\Mqtt\FluxFlow.Components.Mqtt.MqttNet\FluxFlow.Components.Mqtt.MqttNet.csproj", "{66404561-7A1D-4AE2-BDE2-EB9DCC4C19AE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Assertions", "src\FluxFlow.Components.Assertions\FluxFlow.Components.Assertions.csproj", "{82DD1D7F-0693-415D-A254-85327169B674}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mqtt.PulseMqtt", "src\Components\Mqtt\FluxFlow.Components.Mqtt.PulseMqtt\FluxFlow.Components.Mqtt.PulseMqtt.csproj", "{5505EC4F-B4ED-41E7-A56F-EBDA7396BDAC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Assertions.Tests", "tests\FluxFlow.Components.Assertions.Tests\FluxFlow.Components.Assertions.Tests.csproj", "{99456ADC-FBD9-4794-B07C-5C6DFFEEBB17}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.CompositionSample", "samples\FluxFlow.CompositionSample\FluxFlow.CompositionSample.csproj", "{16CC09AA-6719-41A2-8F8D-6447DB53A662}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Sources", "src\FluxFlow.Components.Sources\FluxFlow.Components.Sources.csproj", "{CDE70675-83CC-4D27-842C-7001827E8DF7}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.DurabilityOperationsSample", "samples\FluxFlow.DurabilityOperationsSample\FluxFlow.DurabilityOperationsSample.csproj", "{7C4D2A89-8E31-4A6D-9B57-4F1C2E8A6D03}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Sources.Tests", "tests\FluxFlow.Components.Sources.Tests\FluxFlow.Components.Sources.Tests.csproj", "{432A8BDA-C545-4F5B-A3E9-3F6F12F6B0D7}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mqtt.Composition", "src\Components\Mqtt\FluxFlow.Components.Mqtt.Composition\FluxFlow.Components.Mqtt.Composition.csproj", "{A40DAFE0-CC32-41ED-8600-790957786B3F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Routing", "src\FluxFlow.Components.Routing\FluxFlow.Components.Routing.csproj", "{2F1F57EC-2E49-452B-AE39-EBC978BB1F2F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.MqttCompositionSample", "samples\FluxFlow.MqttCompositionSample\FluxFlow.MqttCompositionSample.csproj", "{EF8779B2-A4E4-4D86-9328-5CFA6E4C482B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Routing.Tests", "tests\FluxFlow.Components.Routing.Tests\FluxFlow.Components.Routing.Tests.csproj", "{B0171216-C945-4267-B5DE-632DDE1A61A9}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Http.Composition", "src\Components\Http\FluxFlow.Components.Http.Composition\FluxFlow.Components.Http.Composition.csproj", "{D264432C-9CC4-496C-BC9B-81AFDF059BEE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Storage.FileSystem", "src\FluxFlow.Components.Storage.FileSystem\FluxFlow.Components.Storage.FileSystem.csproj", "{8B40C04A-E3B8-4830-9203-3A2234A000BD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mapping.Composition", "src\Components\Mapping\FluxFlow.Components.Mapping.Composition\FluxFlow.Components.Mapping.Composition.csproj", "{2BF4E16C-0BCA-49F2-8AF7-EA68C2A0515B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Storage.FileSystem.Tests", "tests\FluxFlow.Components.Storage.FileSystem.Tests\FluxFlow.Components.Storage.FileSystem.Tests.csproj", "{4747A8FD-A4EE-4A01-A732-EDFA7EBB347B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Assertions.Composition", "src\Components\Assertions\FluxFlow.Components.Assertions.Composition\FluxFlow.Components.Assertions.Composition.csproj", "{D842D167-961A-4632-8886-959890559ABC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Storage.SqlFile", "src\FluxFlow.Components.Storage.SqlFile\FluxFlow.Components.Storage.SqlFile.csproj", "{FF8A1168-FB4E-4953-9A50-34CC841C5A5A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Validation.Composition", "src\Components\Validation\FluxFlow.Components.Validation.Composition\FluxFlow.Components.Validation.Composition.csproj", "{D8737EF1-E976-42F9-B183-1812EB5EF3AC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Storage.SqlFile.Tests", "tests\FluxFlow.Components.Storage.SqlFile.Tests\FluxFlow.Components.Storage.SqlFile.Tests.csproj", "{E839236F-292C-4D05-A038-1AC727739559}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Timers.Composition", "src\Components\Timers\FluxFlow.Components.Timers.Composition\FluxFlow.Components.Timers.Composition.csproj", "{FC2D4CBB-B81B-403B-BCD7-E7E0B3644EDB}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Projections", "src\FluxFlow.Components.Projections\FluxFlow.Components.Projections.csproj", "{B93984FE-7EB4-452C-9E33-2A9E8F79D25F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Sources.Composition", "src\Components\Sources\FluxFlow.Components.Sources.Composition\FluxFlow.Components.Sources.Composition.csproj", "{193DC9F9-E972-4E70-A137-717571603DEB}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Projections.Tests", "tests\FluxFlow.Components.Projections.Tests\FluxFlow.Components.Projections.Tests.csproj", "{7FB17C60-24EA-48EA-A69F-33FE394CD33B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Routing.Composition", "src\Components\Routing\FluxFlow.Components.Routing.Composition\FluxFlow.Components.Routing.Composition.csproj", "{6F069A41-9187-4C48-AC02-F387B8319AF7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Expectations", "src\FluxFlow.Components.Expectations\FluxFlow.Components.Expectations.csproj", "{2D7D23EC-C51C-4DFE-BFFB-7DB40B589BE5}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Serialization.Composition", "src\Components\Serialization\FluxFlow.Components.Serialization.Composition\FluxFlow.Components.Serialization.Composition.csproj", "{3B0EFBF8-E424-44CD-B34B-35DCF9F5284B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Expectations.Tests", "tests\FluxFlow.Components.Expectations.Tests\FluxFlow.Components.Expectations.Tests.csproj", "{2E3EF875-D295-4B81-BBB9-C0A7D4BCADC6}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Payloads.Composition", "src\Components\Payloads\FluxFlow.Components.Payloads.Composition\FluxFlow.Components.Payloads.Composition.csproj", "{659C28C4-3CE9-48C1-B16F-4ECD7674C135}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Designer", "src\FluxFlow.Components.Designer\FluxFlow.Components.Designer.csproj", "{F65C6724-1675-4108-8563-A63D24B04E01}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Observability.Composition", "src\Components\Observability\FluxFlow.Components.Observability.Composition\FluxFlow.Components.Observability.Composition.csproj", "{E05FD627-EE38-470D-A112-71AE23B7C390}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Designer.Tests", "tests\FluxFlow.Components.Designer.Tests\FluxFlow.Components.Designer.Tests.csproj", "{970109A7-21AB-4502-AED0-F48EFAE91788}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Projections.Composition", "src\Components\Projections\FluxFlow.Components.Projections.Composition\FluxFlow.Components.Projections.Composition.csproj", "{DEC8DD3D-E7C2-4205-BB92-F5EB55F7EA39}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Release.Tests", "tests\FluxFlow.Release.Tests\FluxFlow.Release.Tests.csproj", "{57BAFB0D-D015-4ADD-956E-6E71A10A00F3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Metrics.Composition", "src\Components\Metrics\FluxFlow.Components.Metrics.Composition\FluxFlow.Components.Metrics.Composition.csproj", "{B0923D0C-DC61-41FF-88B7-49D6679E1075}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Nodes", "src\FluxFlow.Nodes\FluxFlow.Nodes.csproj", "{64127B9A-3925-42A0-AC01-B5894A422505}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Expectations.Composition", "src\Components\Expectations\FluxFlow.Components.Expectations.Composition\FluxFlow.Components.Expectations.Composition.csproj", "{DFEDFB6D-5709-45B1-BCBF-F1B978535F80}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Nodes.Tests", "tests\FluxFlow.Nodes.Tests\FluxFlow.Nodes.Tests.csproj", "{858FEA39-13EC-4238-83AF-F444CF3A5618}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.FileSystem.Composition", "src\Components\FileSystem\FluxFlow.Components.FileSystem.Composition\FluxFlow.Components.FileSystem.Composition.csproj", "{E4BF4425-A857-4A19-B83B-960743FA53C5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.RequestReply", "src\FluxFlow.Components.RequestReply\FluxFlow.Components.RequestReply.csproj", "{D46BA872-478C-4C05-A9C8-7079A9200B98}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.State.Composition", "src\Components\State\FluxFlow.Components.State.Composition\FluxFlow.Components.State.Composition.csproj", "{B35BA5D1-80E9-43E9-820A-FA5F80B95A03}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.RequestReply.Tests", "tests\FluxFlow.Components.RequestReply.Tests\FluxFlow.Components.RequestReply.Tests.csproj", "{383085B7-C38A-42E1-A2C9-9634875239E0}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Storage.Composition", "src\Components\Storage\FluxFlow.Components.Storage.Composition\FluxFlow.Components.Storage.Composition.csproj", "{0CB8FA7E-8DD0-43CB-BE05-AD02565C62B7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Http.AspNetCore", "src\FluxFlow.Components.Http.AspNetCore\FluxFlow.Components.Http.AspNetCore.csproj", "{EA9665A2-4B01-4A8E-8FBB-9951A3A61A82}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Sessions.Composition", "src\Components\Sessions\FluxFlow.Components.Sessions.Composition\FluxFlow.Components.Sessions.Composition.csproj", "{0F6E846E-2832-4202-9442-B5F495F2D057}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Http.AspNetCore.Tests", "tests\FluxFlow.Components.Http.AspNetCore.Tests\FluxFlow.Components.Http.AspNetCore.Tests.csproj", "{6EE604C9-E53C-41F9-A302-A91566D64DD2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.DesignerHost", "samples\FluxFlow.DesignerHost\FluxFlow.DesignerHost.csproj", "{0FAA6A94-E11B-405B-8EA8-0025D8304EA7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.HttpTriggerSample", "samples\FluxFlow.HttpTriggerSample\FluxFlow.HttpTriggerSample.csproj", "{2036BE09-BFDD-425A-B2CF-F5B695570A86}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.DesignerApp", "samples\FluxFlow.DesignerApp\FluxFlow.DesignerApp.csproj", "{64BA9455-0E0E-464F-800A-C3C5DCED40ED}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.FluentSample", "samples\FluxFlow.FluentSample\FluxFlow.FluentSample.csproj", "{563D9741-DD6B-418C-84BB-F5DECD671D87}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Mapping", "src\FluxFlow.Mapping\FluxFlow.Mapping.csproj", "{E9DD3A37-1970-465F-8935-54A3CF37E999}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Resilience", "src\Components\Resilience\FluxFlow.Components.Resilience\FluxFlow.Components.Resilience.csproj", "{B1F60948-867B-434D-B201-4E3FEB0B667E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mqtt.MqttNet", "src\Mqtt\FluxFlow.Components.Mqtt.MqttNet\FluxFlow.Components.Mqtt.MqttNet.csproj", "{66404561-7A1D-4AE2-BDE2-EB9DCC4C19AE}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Resilience.Composition", "src\Components\Resilience\FluxFlow.Components.Resilience.Composition\FluxFlow.Components.Resilience.Composition.csproj", "{F37866D9-8D7E-4814-94B8-29706B64CE1C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mqtt.MqttNet.Tests", "tests\FluxFlow.Components.Mqtt.MqttNet.Tests\FluxFlow.Components.Mqtt.MqttNet.Tests.csproj", "{73E2DF06-B8BE-4839-87BD-2B0F255776B6}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "benchmarks", "benchmarks", "{66320409-64EC-F7C5-3DEF-65E7510DAAD1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mqtt.PulseMqtt", "src\Mqtt\FluxFlow.Components.Mqtt.PulseMqtt\FluxFlow.Components.Mqtt.PulseMqtt.csproj", "{5505EC4F-B4ED-41E7-A56F-EBDA7396BDAC}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.Benchmarks", "benchmarks\FluxFlow.Engine.Benchmarks\FluxFlow.Engine.Benchmarks.csproj", "{47340D45-F196-4B44-94FE-6DF9DD848232}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mqtt.PulseMqtt.Tests", "tests\FluxFlow.Components.Mqtt.PulseMqtt.Tests\FluxFlow.Components.Mqtt.PulseMqtt.Tests.csproj", "{EC652E03-DE93-48E6-8F46-D44EA0EBFD2C}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{8D626EA8-CB54-BC41-363A-217881BEBA6E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Composition", "src\FluxFlow.Composition\FluxFlow.Composition.csproj", "{B271ABAC-531D-44F8-A3C1-DE91E4FB8B2B}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Foundation", "Foundation", "{F5D7951B-46E2-C453-7B0B-4723FE704F28}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Composition.Tests", "tests\FluxFlow.Composition.Tests\FluxFlow.Composition.Tests.csproj", "{D7A1ED59-115B-46B2-9FEB-C81F1291DF40}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Nodes", "src\Core\Foundation\FluxFlow.Nodes\FluxFlow.Nodes.csproj", "{51C6C4A1-9B64-4E00-A300-D5DC3B537DC5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.CompositionSample", "samples\FluxFlow.CompositionSample\FluxFlow.CompositionSample.csproj", "{16CC09AA-6719-41A2-8F8D-6447DB53A662}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Mapping", "src\Core\Foundation\FluxFlow.Mapping\FluxFlow.Mapping.csproj", "{BD84E505-A39E-424F-8B36-1F417290066E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.DurabilityOperationsSample", "samples\FluxFlow.DurabilityOperationsSample\FluxFlow.DurabilityOperationsSample.csproj", "{7C4D2A89-8E31-4A6D-9B57-4F1C2E8A6D03}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Application", "Application", "{0CDA018B-BDBD-8926-19A4-D41D9F91466A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mqtt.Composition", "src\Mqtt\FluxFlow.Components.Mqtt.Composition\FluxFlow.Components.Mqtt.Composition.csproj", "{A40DAFE0-CC32-41ED-8600-790957786B3F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Composition", "src\Core\Application\FluxFlow.Composition\FluxFlow.Composition.csproj", "{F0AB3A20-E876-4588-9C7B-F0705CB0DB1F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mqtt.Composition.Tests", "tests\FluxFlow.Components.Mqtt.Composition.Tests\FluxFlow.Components.Mqtt.Composition.Tests.csproj", "{66195D0B-C425-436A-ABBA-AA512A25F89E}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Execution", "Execution", "{C76ADD0A-930A-AB31-907C-945FD26FE7C1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.MqttCompositionSample", "samples\FluxFlow.MqttCompositionSample\FluxFlow.MqttCompositionSample.csproj", "{EF8779B2-A4E4-4D86-9328-5CFA6E4C482B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Coordination", "src\Core\Execution\FluxFlow.Coordination\FluxFlow.Coordination.csproj", "{EB59443E-B4D6-440A-854D-4888D675488C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Http.Composition", "src\FluxFlow.Components.Http.Composition\FluxFlow.Components.Http.Composition.csproj", "{D264432C-9CC4-496C-BC9B-81AFDF059BEE}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Resilience", "src\Core\Execution\FluxFlow.Resilience\FluxFlow.Resilience.csproj", "{C0D55877-C3E5-44AF-ACE9-AE5310B4FB9E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Http.Composition.Tests", "tests\FluxFlow.Components.Http.Composition.Tests\FluxFlow.Components.Http.Composition.Tests.csproj", "{FFB6C189-5FE6-425A-929F-22BA25A3C076}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Authoring", "Authoring", "{22B10ACD-AD9E-B2C9-D6D4-4063DE5BCEC5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mapping.Composition", "src\FluxFlow.Components.Mapping.Composition\FluxFlow.Components.Mapping.Composition.csproj", "{2BF4E16C-0BCA-49F2-8AF7-EA68C2A0515B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Fluent", "src\Authoring\FluxFlow.Fluent\FluxFlow.Fluent.csproj", "{F1C835DA-50AC-482C-9C9C-85583954118B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mapping.Composition.Tests", "tests\FluxFlow.Components.Mapping.Composition.Tests\FluxFlow.Components.Mapping.Composition.Tests.csproj", "{C6DC8FAF-2F7C-44B6-B832-3F8210C37EFD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Fluent.Hosting", "src\Authoring\FluxFlow.Fluent.Hosting\FluxFlow.Fluent.Hosting.csproj", "{4556A84D-B735-46A6-B77B-C843ACC2868F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Assertions.Composition.Tests", "tests\FluxFlow.Components.Assertions.Composition.Tests\FluxFlow.Components.Assertions.Composition.Tests.csproj", "{C399B7E3-5A72-45DA-9450-D284F298E7F0}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engine", "Engine", "{581C1AFC-A79E-7578-3E64-521365DC72E1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Assertions.Composition", "src\FluxFlow.Components.Assertions.Composition\FluxFlow.Components.Assertions.Composition.csproj", "{D842D167-961A-4632-8886-959890559ABC}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DurableInput", "DurableInput", "{0465CEC1-3384-A4C8-5864-AB25891933F8}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Validation.Composition.Tests", "tests\FluxFlow.Components.Validation.Composition.Tests\FluxFlow.Components.Validation.Composition.Tests.csproj", "{73C3D493-3626-47D8-ABD3-AAC83C4BD8E2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableInput", "src\Engine\DurableInput\FluxFlow.Engine.DurableInput\FluxFlow.Engine.DurableInput.csproj", "{B33C7FD3-EABC-40F9-8F80-D5E236328985}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Validation.Composition", "src\FluxFlow.Components.Validation.Composition\FluxFlow.Components.Validation.Composition.csproj", "{D8737EF1-E976-42F9-B183-1812EB5EF3AC}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableInput.SqlFile", "src\Engine\DurableInput\FluxFlow.Engine.DurableInput.SqlFile\FluxFlow.Engine.DurableInput.SqlFile.csproj", "{010D8B4E-F365-48CC-A330-D2E4C212BC28}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Timers.Composition.Tests", "tests\FluxFlow.Components.Timers.Composition.Tests\FluxFlow.Components.Timers.Composition.Tests.csproj", "{3CA6E8DF-AF0C-453E-9361-B9EE207DC5BA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableInput.TSql", "src\Engine\DurableInput\FluxFlow.Engine.DurableInput.TSql\FluxFlow.Engine.DurableInput.TSql.csproj", "{E249B557-A53A-4449-9D5C-C97AD5FECCBA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Timers.Composition", "src\FluxFlow.Components.Timers.Composition\FluxFlow.Components.Timers.Composition.csproj", "{FC2D4CBB-B81B-403B-BCD7-E7E0B3644EDB}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DurableOutput", "DurableOutput", "{79BF9758-D842-F411-45E4-8F4A5C558EE7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Sources.Composition.Tests", "tests\FluxFlow.Components.Sources.Composition.Tests\FluxFlow.Components.Sources.Composition.Tests.csproj", "{45266E18-8EBA-41C3-AAE6-AC737A640E0D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableOutput", "src\Engine\DurableOutput\FluxFlow.Engine.DurableOutput\FluxFlow.Engine.DurableOutput.csproj", "{61C4ECD9-4ECE-4DB7-B8CB-7C5C412E8FBC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Sources.Composition", "src\FluxFlow.Components.Sources.Composition\FluxFlow.Components.Sources.Composition.csproj", "{193DC9F9-E972-4E70-A137-717571603DEB}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableOutput.SqlFile", "src\Engine\DurableOutput\FluxFlow.Engine.DurableOutput.SqlFile\FluxFlow.Engine.DurableOutput.SqlFile.csproj", "{EBFFBB42-17DF-41D3-80EC-4D578FBAA899}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Routing.Composition", "src\FluxFlow.Components.Routing.Composition\FluxFlow.Components.Routing.Composition.csproj", "{6F069A41-9187-4C48-AC02-F387B8319AF7}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableOutput.TSql", "src\Engine\DurableOutput\FluxFlow.Engine.DurableOutput.TSql\FluxFlow.Engine.DurableOutput.TSql.csproj", "{AF20824B-A44D-4417-BC90-27F73CD70D07}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Routing.Composition.Tests", "tests\FluxFlow.Components.Routing.Composition.Tests\FluxFlow.Components.Routing.Composition.Tests.csproj", "{FD44E0D2-EE92-450D-AEB9-BA87C8174122}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Health", "Health", "{970E1635-8A0F-958A-81F0-D9C580AB2CAE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Serialization.Composition", "src\FluxFlow.Components.Serialization.Composition\FluxFlow.Components.Serialization.Composition.csproj", "{3B0EFBF8-E424-44CD-B34B-35DCF9F5284B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.HealthChecks", "src\Engine\Health\FluxFlow.Engine.HealthChecks\FluxFlow.Engine.HealthChecks.csproj", "{FDCE41C9-4A8D-4297-84B1-5AF613825142}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Serialization.Composition.Tests", "tests\FluxFlow.Components.Serialization.Composition.Tests\FluxFlow.Components.Serialization.Composition.Tests.csproj", "{308F48A3-B8F7-4859-9583-9F6975133391}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0AB3BF05-4346-4AA6-1389-037BE0695223}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Payloads.Composition", "src\FluxFlow.Components.Payloads.Composition\FluxFlow.Components.Payloads.Composition.csproj", "{659C28C4-3CE9-48C1-B16F-4ECD7674C135}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.ComponentPackageTemplate.Tests", "tests\Unit\Samples\FluxFlow.ComponentPackageTemplate.Tests\FluxFlow.ComponentPackageTemplate.Tests.csproj", "{741B0A23-C181-4C96-B293-579DC7297E95}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Payloads.Composition.Tests", "tests\FluxFlow.Components.Payloads.Composition.Tests\FluxFlow.Components.Payloads.Composition.Tests.csproj", "{F8C7CBD6-3788-49EE-B278-7787D1A87E21}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.DesignerHost.Tests", "tests\Unit\Samples\FluxFlow.DesignerHost.Tests\FluxFlow.DesignerHost.Tests.csproj", "{04074FB8-69AA-4A30-9DFA-1D5E9B3FF58E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Observability.Composition", "src\FluxFlow.Components.Observability.Composition\FluxFlow.Components.Observability.Composition.csproj", "{E05FD627-EE38-470D-A112-71AE23B7C390}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Testing", "tests\Support\FluxFlow.Testing\FluxFlow.Testing.csproj", "{074BD54D-0C3D-4B25-B187-72A244534D86}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Observability.Composition.Tests", "tests\FluxFlow.Components.Observability.Composition.Tests\FluxFlow.Components.Observability.Composition.Tests.csproj", "{AC605855-F7B7-4A98-A9C6-4DC3D6ECB958}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Assertions.Composition.Tests", "tests\Unit\Components\Assertions\FluxFlow.Components.Assertions.Composition.Tests\FluxFlow.Components.Assertions.Composition.Tests.csproj", "{45EE3C27-EFDB-4DD6-BD12-22FC16976B67}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Projections.Composition", "src\FluxFlow.Components.Projections.Composition\FluxFlow.Components.Projections.Composition.csproj", "{DEC8DD3D-E7C2-4205-BB92-F5EB55F7EA39}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Assertions.Tests", "tests\Unit\Components\Assertions\FluxFlow.Components.Assertions.Tests\FluxFlow.Components.Assertions.Tests.csproj", "{F5BA06AB-54D9-4883-9CEB-C657DCEDF2AF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Projections.Composition.Tests", "tests\FluxFlow.Components.Projections.Composition.Tests\FluxFlow.Components.Projections.Composition.Tests.csproj", "{50F18FB9-E213-4FDA-B99B-6CB3974E81B7}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Designer.Tests", "tests\Unit\Components\Designer\FluxFlow.Components.Designer.Tests\FluxFlow.Components.Designer.Tests.csproj", "{B5C35C2A-F6F3-4BC1-8F9F-6CB51B9DE7CD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Metrics.Composition", "src\FluxFlow.Components.Metrics.Composition\FluxFlow.Components.Metrics.Composition.csproj", "{B0923D0C-DC61-41FF-88B7-49D6679E1075}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Expectations.Composition.Tests", "tests\Unit\Components\Expectations\FluxFlow.Components.Expectations.Composition.Tests\FluxFlow.Components.Expectations.Composition.Tests.csproj", "{7346A356-DF87-4112-AA88-8E63623D0294}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Metrics.Composition.Tests", "tests\FluxFlow.Components.Metrics.Composition.Tests\FluxFlow.Components.Metrics.Composition.Tests.csproj", "{D553F21C-D561-484A-ACA7-78DC1D9C8589}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Expectations.Tests", "tests\Unit\Components\Expectations\FluxFlow.Components.Expectations.Tests\FluxFlow.Components.Expectations.Tests.csproj", "{CC589D36-55E1-4433-BABD-33674DF92534}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Expectations.Composition", "src\FluxFlow.Components.Expectations.Composition\FluxFlow.Components.Expectations.Composition.csproj", "{DFEDFB6D-5709-45B1-BCBF-F1B978535F80}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.FileSystem.Composition.Tests", "tests\Unit\Components\FileSystem\FluxFlow.Components.FileSystem.Composition.Tests\FluxFlow.Components.FileSystem.Composition.Tests.csproj", "{A42573BF-BEE2-4041-8C7B-483A559D2194}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Expectations.Composition.Tests", "tests\FluxFlow.Components.Expectations.Composition.Tests\FluxFlow.Components.Expectations.Composition.Tests.csproj", "{9A89F2D4-29AD-4747-905A-1FE7A3D181B3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.FileSystem.Tests", "tests\Unit\Components\FileSystem\FluxFlow.Components.FileSystem.Tests\FluxFlow.Components.FileSystem.Tests.csproj", "{DDFBAA9D-416B-4418-A697-1F6414AE1DFC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.FileSystem.Composition", "src\FluxFlow.Components.FileSystem.Composition\FluxFlow.Components.FileSystem.Composition.csproj", "{E4BF4425-A857-4A19-B83B-960743FA53C5}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Http.AspNetCore.Tests", "tests\Unit\Components\Http\FluxFlow.Components.Http.AspNetCore.Tests\FluxFlow.Components.Http.AspNetCore.Tests.csproj", "{E1445FE8-FCA2-4740-9F69-107BF92F1EA1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.FileSystem.Composition.Tests", "tests\FluxFlow.Components.FileSystem.Composition.Tests\FluxFlow.Components.FileSystem.Composition.Tests.csproj", "{BDC7398B-EFE3-443F-BD49-6658C892C8CA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Http.Composition.Tests", "tests\Unit\Components\Http\FluxFlow.Components.Http.Composition.Tests\FluxFlow.Components.Http.Composition.Tests.csproj", "{4944C6D1-575E-46D9-A5DF-0AA17EF721BE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.State.Composition", "src\FluxFlow.Components.State.Composition\FluxFlow.Components.State.Composition.csproj", "{B35BA5D1-80E9-43E9-820A-FA5F80B95A03}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Http.Tests", "tests\Unit\Components\Http\FluxFlow.Components.Http.Tests\FluxFlow.Components.Http.Tests.csproj", "{53900074-9F84-4F09-90CF-35045B95ABDE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.State.Composition.Tests", "tests\FluxFlow.Components.State.Composition.Tests\FluxFlow.Components.State.Composition.Tests.csproj", "{712C8147-6F50-488E-98FB-8E8EC49DEFC6}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mapping.Composition.Tests", "tests\Unit\Components\Mapping\FluxFlow.Components.Mapping.Composition.Tests\FluxFlow.Components.Mapping.Composition.Tests.csproj", "{D086CD6F-28E2-40D5-99BA-2EB2C1C579CC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Storage.Composition", "src\FluxFlow.Components.Storage.Composition\FluxFlow.Components.Storage.Composition.csproj", "{0CB8FA7E-8DD0-43CB-BE05-AD02565C62B7}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mapping.Tests", "tests\Unit\Components\Mapping\FluxFlow.Components.Mapping.Tests\FluxFlow.Components.Mapping.Tests.csproj", "{CBF66CC9-7414-42F0-8695-7B085A91A078}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Storage.Composition.Tests", "tests\FluxFlow.Components.Storage.Composition.Tests\FluxFlow.Components.Storage.Composition.Tests.csproj", "{A42EDE1A-59B0-4B1B-B06B-E2999180EDE2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Metrics.Composition.Tests", "tests\Unit\Components\Metrics\FluxFlow.Components.Metrics.Composition.Tests\FluxFlow.Components.Metrics.Composition.Tests.csproj", "{5EF8288A-936B-4037-A5B6-8C760DC8EF47}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Sessions.Composition", "src\FluxFlow.Components.Sessions.Composition\FluxFlow.Components.Sessions.Composition.csproj", "{0F6E846E-2832-4202-9442-B5F495F2D057}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Metrics.Tests", "tests\Unit\Components\Metrics\FluxFlow.Components.Metrics.Tests\FluxFlow.Components.Metrics.Tests.csproj", "{386DD33E-6973-4FAE-B6D5-E1908E4FB410}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Sessions.Composition.Tests", "tests\FluxFlow.Components.Sessions.Composition.Tests\FluxFlow.Components.Sessions.Composition.Tests.csproj", "{6C92A8D0-0F6F-4BEB-B242-19D04F173694}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mqtt.Adapters.Tests", "tests\Unit\Components\Mqtt\FluxFlow.Components.Mqtt.Adapters.Tests\FluxFlow.Components.Mqtt.Adapters.Tests.csproj", "{1872225F-5804-4ED5-BC4E-5FEC1B7C802E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Mapping.Tests", "tests\FluxFlow.Mapping.Tests\FluxFlow.Mapping.Tests.csproj", "{DFDAE3C3-FE5B-43FC-B71D-23E656B5190B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mqtt.Composition.Tests", "tests\Unit\Components\Mqtt\FluxFlow.Components.Mqtt.Composition.Tests\FluxFlow.Components.Mqtt.Composition.Tests.csproj", "{303F01E1-A8D3-4CE1-86CE-C3A8AE5DF7DB}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mqtt.Adapters.Tests", "tests\FluxFlow.Components.Mqtt.Adapters.Tests\FluxFlow.Components.Mqtt.Adapters.Tests.csproj", "{B43D2E6E-E197-49A9-9577-F8AF9EB903C0}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mqtt.MqttNet.Tests", "tests\Unit\Components\Mqtt\FluxFlow.Components.Mqtt.MqttNet.Tests\FluxFlow.Components.Mqtt.MqttNet.Tests.csproj", "{BE99B540-9882-4585-B741-58BB99B4F82A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Storage.Adapters.Tests", "tests\FluxFlow.Components.Storage.Adapters.Tests\FluxFlow.Components.Storage.Adapters.Tests.csproj", "{2F119C97-4FDC-43F3-8C25-906294C1FF0C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mqtt.PulseMqtt.Tests", "tests\Unit\Components\Mqtt\FluxFlow.Components.Mqtt.PulseMqtt.Tests\FluxFlow.Components.Mqtt.PulseMqtt.Tests.csproj", "{03744BE4-74A4-43B2-8AA6-6A193C9354A1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.DesignerHost", "samples\FluxFlow.DesignerHost\FluxFlow.DesignerHost.csproj", "{0FAA6A94-E11B-405B-8EA8-0025D8304EA7}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Mqtt.Tests", "tests\Unit\Components\Mqtt\FluxFlow.Components.Mqtt.Tests\FluxFlow.Components.Mqtt.Tests.csproj", "{196FF6B3-7BAB-44AE-B647-E03754FC703F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.DesignerHost.Tests", "tests\FluxFlow.DesignerHost.Tests\FluxFlow.DesignerHost.Tests.csproj", "{78560140-8F73-4E6B-A7F8-CB2DA756EB1B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Observability.Composition.Tests", "tests\Unit\Components\Observability\FluxFlow.Components.Observability.Composition.Tests\FluxFlow.Components.Observability.Composition.Tests.csproj", "{5D173EBB-9658-490F-95D1-01D126273382}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.DesignerApp", "samples\FluxFlow.DesignerApp\FluxFlow.DesignerApp.csproj", "{64BA9455-0E0E-464F-800A-C3C5DCED40ED}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Observability.Tests", "tests\Unit\Components\Observability\FluxFlow.Components.Observability.Tests\FluxFlow.Components.Observability.Tests.csproj", "{97FD7520-2802-4188-B33A-5CAC39FD4F5F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Fluent", "src\FluxFlow.Fluent\FluxFlow.Fluent.csproj", "{1C09DF05-D227-4FBB-908C-24F5755A0780}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Payloads.Composition.Tests", "tests\Unit\Components\Payloads\FluxFlow.Components.Payloads.Composition.Tests\FluxFlow.Components.Payloads.Composition.Tests.csproj", "{D4959172-0EB9-440F-B828-CAC8F922849D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Fluent.Tests", "tests\FluxFlow.Fluent.Tests\FluxFlow.Fluent.Tests.csproj", "{7847D656-F494-41B5-8E1A-322D6D22DB52}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Payloads.Tests", "tests\Unit\Components\Payloads\FluxFlow.Components.Payloads.Tests\FluxFlow.Components.Payloads.Tests.csproj", "{E46BF95A-E81E-4625-80D2-640849218A88}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.FluentSample", "samples\FluxFlow.FluentSample\FluxFlow.FluentSample.csproj", "{563D9741-DD6B-418C-84BB-F5DECD671D87}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Projections.Composition.Tests", "tests\Unit\Components\Projections\FluxFlow.Components.Projections.Composition.Tests\FluxFlow.Components.Projections.Composition.Tests.csproj", "{4A8CDF3E-F09B-4486-AC6A-465CF921C653}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Fluent.Hosting", "src\FluxFlow.Fluent.Hosting\FluxFlow.Fluent.Hosting.csproj", "{2C47C9BC-3AEE-4212-A3BE-74583A079B68}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Projections.Tests", "tests\Unit\Components\Projections\FluxFlow.Components.Projections.Tests\FluxFlow.Components.Projections.Tests.csproj", "{03D7E2E8-F00D-44B8-88EF-83E4FDA0E79B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Fluent.Hosting.Tests", "tests\FluxFlow.Fluent.Hosting.Tests\FluxFlow.Fluent.Hosting.Tests.csproj", "{678BC29A-A571-4B0C-9697-4C2258F6681D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.RequestReply.Tests", "tests\Unit\Components\RequestReply\FluxFlow.Components.RequestReply.Tests\FluxFlow.Components.RequestReply.Tests.csproj", "{F1FEED9A-B4C8-4B05-98AB-DA695D9578AA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Testing", "tests\FluxFlow.Testing\FluxFlow.Testing.csproj", "{B742E7EF-E51C-4D60-8067-1EA6D1022099}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Resilience.Composition.Tests", "tests\Unit\Components\Resilience\FluxFlow.Components.Resilience.Composition.Tests\FluxFlow.Components.Resilience.Composition.Tests.csproj", "{0B9200B0-2289-4269-B420-26AE29231903}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Coordination", "src\FluxFlow.Coordination\FluxFlow.Coordination.csproj", "{2E92C012-F76A-4F25-91F4-359A5F0DEC4D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Resilience.Tests", "tests\Unit\Components\Resilience\FluxFlow.Components.Resilience.Tests\FluxFlow.Components.Resilience.Tests.csproj", "{4F9B0010-6E34-44A2-B88F-477E2F9C9A5D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Coordination.Tests", "tests\FluxFlow.Coordination.Tests\FluxFlow.Coordination.Tests.csproj", "{FAC2E957-E941-4258-9563-A4823C8629AF}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Routing.Composition.Tests", "tests\Unit\Components\Routing\FluxFlow.Components.Routing.Composition.Tests\FluxFlow.Components.Routing.Composition.Tests.csproj", "{72A253E0-79E2-453B-869C-6E343221B822}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Resilience", "src\FluxFlow.Resilience\FluxFlow.Resilience.csproj", "{BDF96F0D-D649-4B0A-B52F-077BC9A312A5}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Routing.Tests", "tests\Unit\Components\Routing\FluxFlow.Components.Routing.Tests\FluxFlow.Components.Routing.Tests.csproj", "{A92D9AD1-67D0-48A4-B954-47A0F022B180}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Resilience.Tests", "tests\FluxFlow.Resilience.Tests\FluxFlow.Resilience.Tests.csproj", "{A7BCCBE7-402B-4151-B74B-CD2CC52DE0BD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Serialization.Composition.Tests", "tests\Unit\Components\Serialization\FluxFlow.Components.Serialization.Composition.Tests\FluxFlow.Components.Serialization.Composition.Tests.csproj", "{3749BDC6-B308-4ED0-8F98-52FB92D35054}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Resilience", "src\FluxFlow.Components.Resilience\FluxFlow.Components.Resilience.csproj", "{B1F60948-867B-434D-B201-4E3FEB0B667E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Serialization.Tests", "tests\Unit\Components\Serialization\FluxFlow.Components.Serialization.Tests\FluxFlow.Components.Serialization.Tests.csproj", "{652B4625-5A23-4915-B694-922EFCFADF10}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Resilience.Composition", "src\FluxFlow.Components.Resilience.Composition\FluxFlow.Components.Resilience.Composition.csproj", "{F37866D9-8D7E-4814-94B8-29706B64CE1C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Sessions.Composition.Tests", "tests\Unit\Components\Sessions\FluxFlow.Components.Sessions.Composition.Tests\FluxFlow.Components.Sessions.Composition.Tests.csproj", "{A07A1342-BCA9-4B57-8504-DB111609AFC0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Resilience.Tests", "tests\FluxFlow.Components.Resilience.Tests\FluxFlow.Components.Resilience.Tests.csproj", "{2C683E50-6139-41C1-9EC3-8D245BF879FF}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Sessions.Tests", "tests\Unit\Components\Sessions\FluxFlow.Components.Sessions.Tests\FluxFlow.Components.Sessions.Tests.csproj", "{F08E51D8-9967-4CCD-AF44-0F365CF23D97}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Resilience.Composition.Tests", "tests\FluxFlow.Components.Resilience.Composition.Tests\FluxFlow.Components.Resilience.Composition.Tests.csproj", "{F2F329F1-997A-4744-9518-DCB3AA9625CF}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Sources.Composition.Tests", "tests\Unit\Components\Sources\FluxFlow.Components.Sources.Composition.Tests\FluxFlow.Components.Sources.Composition.Tests.csproj", "{EBBC276F-EDB3-41BA-9D4D-C45E6CF7596C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableInput", "src\FluxFlow.Engine.DurableInput\FluxFlow.Engine.DurableInput.csproj", "{18BCD74D-62BC-4C31-A66D-6083E95DECAE}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Sources.Tests", "tests\Unit\Components\Sources\FluxFlow.Components.Sources.Tests\FluxFlow.Components.Sources.Tests.csproj", "{0CE45C9E-4ACF-45B6-B215-EC68A7B88FAF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableInput.Tests", "tests\FluxFlow.Engine.DurableInput.Tests\FluxFlow.Engine.DurableInput.Tests.csproj", "{1837E4A6-C9C0-4DD0-A151-D3EBB6AC6A61}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.State.Composition.Tests", "tests\Unit\Components\State\FluxFlow.Components.State.Composition.Tests\FluxFlow.Components.State.Composition.Tests.csproj", "{586A61E0-822E-4D94-BFBF-6C6EB70B5839}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableInput.SqlFile", "src\FluxFlow.Engine.DurableInput.SqlFile\FluxFlow.Engine.DurableInput.SqlFile.csproj", "{CA2F6BC9-7B33-451F-8272-D2893B8E6DD2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.State.Tests", "tests\Unit\Components\State\FluxFlow.Components.State.Tests\FluxFlow.Components.State.Tests.csproj", "{AD930AFA-A61A-4EAA-A678-512315198E44}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableInput.SqlFile.Tests", "tests\FluxFlow.Engine.DurableInput.SqlFile.Tests\FluxFlow.Engine.DurableInput.SqlFile.Tests.csproj", "{B9814B8D-B4F0-436E-ADD7-73B9DD8FFBEC}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Storage.Adapters.Tests", "tests\Unit\Components\Storage\FluxFlow.Components.Storage.Adapters.Tests\FluxFlow.Components.Storage.Adapters.Tests.csproj", "{B99877F0-4005-413A-AB0A-D98721CA2CD8}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableInput.TSql", "src\FluxFlow.Engine.DurableInput.TSql\FluxFlow.Engine.DurableInput.TSql.csproj", "{9C03E9A7-120D-4C69-A429-01A240E15385}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Storage.Composition.Tests", "tests\Unit\Components\Storage\FluxFlow.Components.Storage.Composition.Tests\FluxFlow.Components.Storage.Composition.Tests.csproj", "{5D2F3278-38BE-4BB8-84E0-ACA54DEE50B4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableInput.TSql.Tests", "tests\FluxFlow.Engine.DurableInput.TSql.Tests\FluxFlow.Engine.DurableInput.TSql.Tests.csproj", "{E4108F5B-6D1F-46B4-A981-F9D72DCE8159}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Storage.FileSystem.Tests", "tests\Unit\Components\Storage\FluxFlow.Components.Storage.FileSystem.Tests\FluxFlow.Components.Storage.FileSystem.Tests.csproj", "{D0D57D09-0433-480C-8322-CECA921E4E69}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableOutput", "src\FluxFlow.Engine.DurableOutput\FluxFlow.Engine.DurableOutput.csproj", "{6D36096D-1269-45A5-A3A1-222FAEE0B221}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Storage.SqlFile.Tests", "tests\Unit\Components\Storage\FluxFlow.Components.Storage.SqlFile.Tests\FluxFlow.Components.Storage.SqlFile.Tests.csproj", "{8A0F6DA4-4D5A-44E5-B816-D0ED481FE5AF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableOutput.Tests", "tests\FluxFlow.Engine.DurableOutput.Tests\FluxFlow.Engine.DurableOutput.Tests.csproj", "{0A16F586-1571-4BB0-813F-A87C65924B14}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Storage.Tests", "tests\Unit\Components\Storage\FluxFlow.Components.Storage.Tests\FluxFlow.Components.Storage.Tests.csproj", "{8116E1B5-0B44-45A4-8A6B-6D8A3C81BAFA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableOutput.SqlFile", "src\FluxFlow.Engine.DurableOutput.SqlFile\FluxFlow.Engine.DurableOutput.SqlFile.csproj", "{A7F4BE09-7C20-4B20-98CC-3BB61C854229}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Timers.Composition.Tests", "tests\Unit\Components\Timers\FluxFlow.Components.Timers.Composition.Tests\FluxFlow.Components.Timers.Composition.Tests.csproj", "{16BA813B-EE0F-47E3-9141-D0B33C5421C4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableOutput.SqlFile.Tests", "tests\FluxFlow.Engine.DurableOutput.SqlFile.Tests\FluxFlow.Engine.DurableOutput.SqlFile.Tests.csproj", "{5292D24D-2D7A-4AB1-A065-EB5E5D2C994E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Timers.Tests", "tests\Unit\Components\Timers\FluxFlow.Components.Timers.Tests\FluxFlow.Components.Timers.Tests.csproj", "{2C4887E0-ED95-4748-90AA-A5DF454DED38}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableOutput.TSql", "src\FluxFlow.Engine.DurableOutput.TSql\FluxFlow.Engine.DurableOutput.TSql.csproj", "{D4B0F37C-2B33-4F24-BF38-2EAC26949F1A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Validation.Composition.Tests", "tests\Unit\Components\Validation\FluxFlow.Components.Validation.Composition.Tests\FluxFlow.Components.Validation.Composition.Tests.csproj", "{CDCE0C6E-F696-47B5-BE7F-03B41CFFD99D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableOutput.TSql.Tests", "tests\FluxFlow.Engine.DurableOutput.TSql.Tests\FluxFlow.Engine.DurableOutput.TSql.Tests.csproj", "{7E415CFB-33D1-4FBA-9D60-AB884D8F72B2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Components.Validation.Tests", "tests\Unit\Components\Validation\FluxFlow.Components.Validation.Tests\FluxFlow.Components.Validation.Tests.csproj", "{3E08EBB2-E3DA-4644-87F6-77173D9EAB53}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.HealthChecks", "src\FluxFlow.Engine.HealthChecks\FluxFlow.Engine.HealthChecks.csproj", "{1A9633CE-05CB-4A96-A44C-63C9E8B0A841}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Composition.Tests", "tests\Unit\Core\Application\FluxFlow.Composition.Tests\FluxFlow.Composition.Tests.csproj", "{504488A0-6FBF-4060-B1EF-ADD9AA1E84B2}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.HealthChecks.Tests", "tests\FluxFlow.Engine.HealthChecks.Tests\FluxFlow.Engine.HealthChecks.Tests.csproj", "{B51F2E78-3A24-4F12-9D78-6D38E9D01A22}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Coordination.Tests", "tests\Unit\Core\Execution\FluxFlow.Coordination.Tests\FluxFlow.Coordination.Tests.csproj", "{96FC6FB4-F779-4CDB-B680-DB845A1451FB}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "benchmarks", "benchmarks", "{66320409-64EC-F7C5-3DEF-65E7510DAAD1}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Resilience.Tests", "tests\Unit\Core\Execution\FluxFlow.Resilience.Tests\FluxFlow.Resilience.Tests.csproj", "{E299CEF3-0317-440D-9F04-7D7303D3E1A2}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.Benchmarks", "benchmarks\FluxFlow.Engine.Benchmarks\FluxFlow.Engine.Benchmarks.csproj", "{47340D45-F196-4B44-94FE-6DF9DD848232}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableInput.SqlFile.Tests", "tests\Unit\Engine\DurableInput\FluxFlow.Engine.DurableInput.SqlFile.Tests\FluxFlow.Engine.DurableInput.SqlFile.Tests.csproj", "{2E82B11C-BD0E-4B67-B7EB-95F10BA48FA8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableInput.Tests", "tests\Unit\Engine\DurableInput\FluxFlow.Engine.DurableInput.Tests\FluxFlow.Engine.DurableInput.Tests.csproj", "{BE74FCCF-368C-47A4-A185-D45F0AE6AA46}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableInput.TSql.IntegrationTests", "tests\Integration\Containers\Databases\TSql\DurableInput\FluxFlow.Engine.DurableInput.TSql.IntegrationTests\FluxFlow.Engine.DurableInput.TSql.IntegrationTests.csproj", "{FA6978D1-029D-4FC9-B3CB-64BDE7C2D5A4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableInput.TSql.Tests", "tests\Unit\Engine\DurableInput\FluxFlow.Engine.DurableInput.TSql.Tests\FluxFlow.Engine.DurableInput.TSql.Tests.csproj", "{1755CB0E-AB66-4EF1-B8B0-083C015A4D44}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableOutput.SqlFile.Tests", "tests\Unit\Engine\DurableOutput\FluxFlow.Engine.DurableOutput.SqlFile.Tests\FluxFlow.Engine.DurableOutput.SqlFile.Tests.csproj", "{EA62799E-E766-4E7E-95B6-C374E38027AD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableOutput.Tests", "tests\Unit\Engine\DurableOutput\FluxFlow.Engine.DurableOutput.Tests\FluxFlow.Engine.DurableOutput.Tests.csproj", "{F36C3C36-3D7A-4BB6-9F42-E64E610144AB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableOutput.TSql.IntegrationTests", "tests\Integration\Containers\Databases\TSql\DurableOutput\FluxFlow.Engine.DurableOutput.TSql.IntegrationTests\FluxFlow.Engine.DurableOutput.TSql.IntegrationTests.csproj", "{1467CBD2-32BA-4A1F-915F-047EE8689712}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.DurableOutput.TSql.Tests", "tests\Unit\Engine\DurableOutput\FluxFlow.Engine.DurableOutput.TSql.Tests\FluxFlow.Engine.DurableOutput.TSql.Tests.csproj", "{47751B7D-94B0-435B-8CE6-1848871AB432}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.HealthChecks.Tests", "tests\Unit\Engine\Health\FluxFlow.Engine.HealthChecks.Tests\FluxFlow.Engine.HealthChecks.Tests.csproj", "{48EB6B57-F2D2-4031-B0A4-49E9F7993952}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine.Tests", "tests\Unit\Engine\Runtime\FluxFlow.Engine.Tests\FluxFlow.Engine.Tests.csproj", "{EF3F5B1D-D5E0-4535-B2F9-0E0829B4948F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Fluent.Hosting.Tests", "tests\Unit\Authoring\FluxFlow.Fluent.Hosting.Tests\FluxFlow.Fluent.Hosting.Tests.csproj", "{9F33CDC6-783A-4E0B-99D8-BC56FBF5D994}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Fluent.Tests", "tests\Unit\Authoring\FluxFlow.Fluent.Tests\FluxFlow.Fluent.Tests.csproj", "{759BC5A2-033C-42AE-8DD9-CAAF90997E40}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Mapping.Tests", "tests\Unit\Core\Foundation\FluxFlow.Mapping.Tests\FluxFlow.Mapping.Tests.csproj", "{20E08040-3C48-48DE-B323-896B58142F84}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Nodes.Tests", "tests\Unit\Core\Foundation\FluxFlow.Nodes.Tests\FluxFlow.Nodes.Tests.csproj", "{2C620263-59CA-42CA-9810-E5CFCDAC4975}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Release.Tests", "tests\Unit\Infrastructure\Release\FluxFlow.Release.Tests\FluxFlow.Release.Tests.csproj", "{A0D7AC02-2142-4207-8672-2E576EA2F6D9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Runtime", "Runtime", "{E767E4F9-C44C-2913-F3A0-3215D526EE28}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Engine", "src\Engine\Runtime\FluxFlow.Engine\FluxFlow.Engine.csproj", "{187A777D-F60C-4EDE-AD47-68A7AA7B1989}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Workflow.Acceptance.Tests", "tests\Acceptance\Workflows\MqttToHttp\FluxFlow.Workflow.Acceptance.Tests\FluxFlow.Workflow.Acceptance.Tests.csproj", "{2F141597-3D18-4358-9ADE-75879DB844F8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Adapters", "Adapters", "{3E9C3776-17C9-28DE-3735-A8B9F121C183}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Expressions", "Expressions", "{E4931818-134D-AEEF-71F4-DA5A58798841}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Expressions.Jsonata", "src\Adapters\Expressions\FluxFlow.Expressions.Jsonata\FluxFlow.Expressions.Jsonata.csproj", "{DE27E0B8-1B3F-4737-8092-080282D912EF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Workflow.ExternalSmokeTests", "tests\Smoke\External\Workflows\MqttToHttp\FluxFlow.Workflow.ExternalSmokeTests\FluxFlow.Workflow.ExternalSmokeTests.csproj", "{0D983CD9-53D7-451C-865E-4F2F48A2173A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Workflow.ContainerIntegrationTests", "tests\Integration\Containers\Workflows\MqttToHttp\FluxFlow.Workflow.ContainerIntegrationTests\FluxFlow.Workflow.ContainerIntegrationTests.csproj", "{E292F84C-E625-4AB2-9010-103DB8255709}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Unit", "Unit", "{80B7E2C3-F5C5-44C4-A518-1966B4E49DD1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{009DFFFB-F0BD-48B4-AEAD-CEDF35BC0E9C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Support", "Support", "{0E9EA34E-5250-418B-A9BA-7E99935F0E8D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Components", "Components", "{BED798C9-347C-4379-B11F-0B2139AD4881}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Assertions", "Assertions", "{D788411F-8792-45E3-928F-F9DCFFF75E30}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Designer", "Designer", "{37C89777-2B74-4A6F-842F-4C10158F46FF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Expectations", "Expectations", "{66CB70AE-BDD6-4A8A-9DB5-0858F6D320F0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FileSystem", "FileSystem", "{31A327CD-8594-46C4-8BD5-531D6E60796C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Http", "Http", "{DFBBD151-823C-4D36-B023-06EB4B6FE282}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mapping", "Mapping", "{FF82FB03-E845-4CD2-A25F-C3A2BF508FAA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Metrics", "Metrics", "{35F9248B-D56E-438C-9961-79FA629832EC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mqtt", "Mqtt", "{7E62ACA7-080B-4DC5-BF12-23F4CA3EC978}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Observability", "Observability", "{6323151F-5E4A-40DE-AFE6-A45DA29ABAC0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Payloads", "Payloads", "{83EC8217-AD1A-4CDE-ADF3-FEA926D045C2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Projections", "Projections", "{A0394335-5687-43FB-9420-321993485A92}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RequestReply", "RequestReply", "{C083AF48-D3C2-4418-953A-5A6E76DA11C7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Resilience", "Resilience", "{66908F26-A8F9-4F35-AFE8-178D5058F546}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Routing", "Routing", "{205AA9E6-AFE8-443B-BF8F-A4289865EE94}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Serialization", "Serialization", "{8AEA82E4-86D0-443D-BF00-75B676F19209}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sessions", "Sessions", "{AED1A7AD-5670-498B-9385-C2132866F96C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sources", "Sources", "{32CD5BDB-4168-4621-AD7D-12EEB1C1D20C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "State", "State", "{7C7566E4-8190-4413-A07A-06D0BED86B17}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Storage", "Storage", "{F62E0701-4AA8-489A-8B17-CC54B592E7AA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Timers", "Timers", "{4E121254-230B-48DE-B33F-99DD22488F86}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Validation", "Validation", "{5BD13311-A355-45D5-B6B7-B995E915DB8E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{CD5EE415-0F19-4214-8ED6-D553E4DCF711}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Application", "Application", "{937AF118-35AB-4549-A8E9-22A456C2CF6D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Execution", "Execution", "{2D764CC1-42B1-4988-B491-F334C49D539A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engine", "Engine", "{A0F5AD1E-66F8-409B-A43F-80FC7D3BC2EA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DurableInput", "DurableInput", "{94B4D334-3D38-40B2-AC85-880DE1B6DA3C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Integration", "Integration", "{C9529F91-97D0-4D71-8B84-0149EF9E59EA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Containers", "Containers", "{000AAC75-0F73-4D56-90BF-D1A72F2F30C1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Databases", "Databases", "{438A8FF4-7722-4C33-A323-7B5A8E76BA3E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TSql", "TSql", "{276BBDF3-56D1-4B09-A345-45A0B2C4382A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DurableInput", "DurableInput", "{DE2B6C08-BC6F-4B4D-81EB-939560AF4ACF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DurableOutput", "DurableOutput", "{71C52D7C-B9CB-4F92-A4E0-A50CE085CC86}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DurableOutput", "DurableOutput", "{0854471C-7B75-41B5-9F84-B5785B6F7DC9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Health", "Health", "{680F99D3-BC16-43AA-AB7A-6A63514E991F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Runtime", "Runtime", "{3CEE47B8-E41C-4CE6-A8E5-212C5CE2E483}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Authoring", "Authoring", "{362F5C76-5177-488D-B130-ECB52FAFB364}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Foundation", "Foundation", "{A33CCF80-2F1D-49B7-ACCA-91B45CD6494F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Infrastructure", "Infrastructure", "{76BC07A0-07D4-4A5D-B114-458370689B46}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Release", "Release", "{5A7B40BA-F07C-40E7-B77D-F5FCA356B578}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Acceptance", "Acceptance", "{5D201C11-712E-449C-BC98-08AA8A95C4CA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Workflows", "Workflows", "{43BF38EC-642D-417B-9232-914240101F70}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MqttToHttp", "MqttToHttp", "{F5304D7C-4593-49EE-998C-31837B0EE58E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Smoke", "Smoke", "{39D51957-0B92-47CE-8648-A3C5106E3C14}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External", "External", "{EA288710-2EA9-45A9-9909-9D908B171AF8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Workflows", "Workflows", "{7A807F6C-FB62-4A27-8311-D2AD26053BD8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MqttToHttp", "MqttToHttp", "{EBB14FFE-44D2-4D1C-9298-3DC24FBE65EC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Workflows", "Workflows", "{4DD286CE-A6D9-4664-B21E-EA3ABCCA4FDF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MqttToHttp", "MqttToHttp", "{BA9CAB86-7DE4-4483-8C91-D3F25B6E3555}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Adapters", "Adapters", "{92085A4E-5C5F-59FF-D309-E162C4CC7E01}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Expressions", "Expressions", "{7D9B31E4-735C-FC86-8AE5-F0C462F05946}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.Expressions.Jsonata.Tests", "tests\Unit\Adapters\Expressions\FluxFlow.Expressions.Jsonata.Tests\FluxFlow.Expressions.Jsonata.Tests.csproj", "{4ADB6559-157F-4500-996B-74B1ECE8F02C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.ReportingSample", "samples\FluxFlow.ReportingSample\FluxFlow.ReportingSample.csproj", "{205D2986-285B-4C26-B48E-6540AED0975C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluxFlow.ReportingSample.Tests", "tests\Unit\Samples\FluxFlow.ReportingSample.Tests\FluxFlow.ReportingSample.Tests.csproj", "{AB5342AF-A53E-48E6-B345-045E8F27084C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -295,30 +487,6 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Debug|x64.ActiveCfg = Debug|Any CPU - {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Debug|x64.Build.0 = Debug|Any CPU - {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Debug|x86.ActiveCfg = Debug|Any CPU - {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Debug|x86.Build.0 = Debug|Any CPU - {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Release|Any CPU.Build.0 = Release|Any CPU - {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Release|x64.ActiveCfg = Release|Any CPU - {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Release|x64.Build.0 = Release|Any CPU - {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Release|x86.ActiveCfg = Release|Any CPU - {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Release|x86.Build.0 = Release|Any CPU - {B2C3D4E5-F6A7-8901-BCDE-F01234567891}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B2C3D4E5-F6A7-8901-BCDE-F01234567891}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B2C3D4E5-F6A7-8901-BCDE-F01234567891}.Debug|x64.ActiveCfg = Debug|Any CPU - {B2C3D4E5-F6A7-8901-BCDE-F01234567891}.Debug|x64.Build.0 = Debug|Any CPU - {B2C3D4E5-F6A7-8901-BCDE-F01234567891}.Debug|x86.ActiveCfg = Debug|Any CPU - {B2C3D4E5-F6A7-8901-BCDE-F01234567891}.Debug|x86.Build.0 = Debug|Any CPU - {B2C3D4E5-F6A7-8901-BCDE-F01234567891}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B2C3D4E5-F6A7-8901-BCDE-F01234567891}.Release|Any CPU.Build.0 = Release|Any CPU - {B2C3D4E5-F6A7-8901-BCDE-F01234567891}.Release|x64.ActiveCfg = Release|Any CPU - {B2C3D4E5-F6A7-8901-BCDE-F01234567891}.Release|x64.Build.0 = Release|Any CPU - {B2C3D4E5-F6A7-8901-BCDE-F01234567891}.Release|x86.ActiveCfg = Release|Any CPU - {B2C3D4E5-F6A7-8901-BCDE-F01234567891}.Release|x86.Build.0 = Release|Any CPU {6B0C7186-C19B-4999-905A-D0FA6AC4D40F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6B0C7186-C19B-4999-905A-D0FA6AC4D40F}.Debug|Any CPU.Build.0 = Debug|Any CPU {6B0C7186-C19B-4999-905A-D0FA6AC4D40F}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -343,18 +511,6 @@ Global {2C850AE8-F45A-486D-91A8-153434BC9051}.Release|x64.Build.0 = Release|Any CPU {2C850AE8-F45A-486D-91A8-153434BC9051}.Release|x86.ActiveCfg = Release|Any CPU {2C850AE8-F45A-486D-91A8-153434BC9051}.Release|x86.Build.0 = Release|Any CPU - {B0332B14-CA7D-4D78-92DA-B1C09D83056B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B0332B14-CA7D-4D78-92DA-B1C09D83056B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B0332B14-CA7D-4D78-92DA-B1C09D83056B}.Debug|x64.ActiveCfg = Debug|Any CPU - {B0332B14-CA7D-4D78-92DA-B1C09D83056B}.Debug|x64.Build.0 = Debug|Any CPU - {B0332B14-CA7D-4D78-92DA-B1C09D83056B}.Debug|x86.ActiveCfg = Debug|Any CPU - {B0332B14-CA7D-4D78-92DA-B1C09D83056B}.Debug|x86.Build.0 = Debug|Any CPU - {B0332B14-CA7D-4D78-92DA-B1C09D83056B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B0332B14-CA7D-4D78-92DA-B1C09D83056B}.Release|Any CPU.Build.0 = Release|Any CPU - {B0332B14-CA7D-4D78-92DA-B1C09D83056B}.Release|x64.ActiveCfg = Release|Any CPU - {B0332B14-CA7D-4D78-92DA-B1C09D83056B}.Release|x64.Build.0 = Release|Any CPU - {B0332B14-CA7D-4D78-92DA-B1C09D83056B}.Release|x86.ActiveCfg = Release|Any CPU - {B0332B14-CA7D-4D78-92DA-B1C09D83056B}.Release|x86.Build.0 = Release|Any CPU {D9130A71-1A89-4C6F-95E2-578AB2CBE920}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D9130A71-1A89-4C6F-95E2-578AB2CBE920}.Debug|Any CPU.Build.0 = Debug|Any CPU {D9130A71-1A89-4C6F-95E2-578AB2CBE920}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -367,18 +523,6 @@ Global {D9130A71-1A89-4C6F-95E2-578AB2CBE920}.Release|x64.Build.0 = Release|Any CPU {D9130A71-1A89-4C6F-95E2-578AB2CBE920}.Release|x86.ActiveCfg = Release|Any CPU {D9130A71-1A89-4C6F-95E2-578AB2CBE920}.Release|x86.Build.0 = Release|Any CPU - {5B104CB9-ACCB-42F3-9157-AF84FE8B3E4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5B104CB9-ACCB-42F3-9157-AF84FE8B3E4D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5B104CB9-ACCB-42F3-9157-AF84FE8B3E4D}.Debug|x64.ActiveCfg = Debug|Any CPU - {5B104CB9-ACCB-42F3-9157-AF84FE8B3E4D}.Debug|x64.Build.0 = Debug|Any CPU - {5B104CB9-ACCB-42F3-9157-AF84FE8B3E4D}.Debug|x86.ActiveCfg = Debug|Any CPU - {5B104CB9-ACCB-42F3-9157-AF84FE8B3E4D}.Debug|x86.Build.0 = Debug|Any CPU - {5B104CB9-ACCB-42F3-9157-AF84FE8B3E4D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5B104CB9-ACCB-42F3-9157-AF84FE8B3E4D}.Release|Any CPU.Build.0 = Release|Any CPU - {5B104CB9-ACCB-42F3-9157-AF84FE8B3E4D}.Release|x64.ActiveCfg = Release|Any CPU - {5B104CB9-ACCB-42F3-9157-AF84FE8B3E4D}.Release|x64.Build.0 = Release|Any CPU - {5B104CB9-ACCB-42F3-9157-AF84FE8B3E4D}.Release|x86.ActiveCfg = Release|Any CPU - {5B104CB9-ACCB-42F3-9157-AF84FE8B3E4D}.Release|x86.Build.0 = Release|Any CPU {9549CDB0-B187-4860-B06C-5A5A445E088B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9549CDB0-B187-4860-B06C-5A5A445E088B}.Debug|Any CPU.Build.0 = Debug|Any CPU {9549CDB0-B187-4860-B06C-5A5A445E088B}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -391,18 +535,6 @@ Global {9549CDB0-B187-4860-B06C-5A5A445E088B}.Release|x64.Build.0 = Release|Any CPU {9549CDB0-B187-4860-B06C-5A5A445E088B}.Release|x86.ActiveCfg = Release|Any CPU {9549CDB0-B187-4860-B06C-5A5A445E088B}.Release|x86.Build.0 = Release|Any CPU - {32378CF0-CB7D-4242-957B-676908420E8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {32378CF0-CB7D-4242-957B-676908420E8A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {32378CF0-CB7D-4242-957B-676908420E8A}.Debug|x64.ActiveCfg = Debug|Any CPU - {32378CF0-CB7D-4242-957B-676908420E8A}.Debug|x64.Build.0 = Debug|Any CPU - {32378CF0-CB7D-4242-957B-676908420E8A}.Debug|x86.ActiveCfg = Debug|Any CPU - {32378CF0-CB7D-4242-957B-676908420E8A}.Debug|x86.Build.0 = Debug|Any CPU - {32378CF0-CB7D-4242-957B-676908420E8A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {32378CF0-CB7D-4242-957B-676908420E8A}.Release|Any CPU.Build.0 = Release|Any CPU - {32378CF0-CB7D-4242-957B-676908420E8A}.Release|x64.ActiveCfg = Release|Any CPU - {32378CF0-CB7D-4242-957B-676908420E8A}.Release|x64.Build.0 = Release|Any CPU - {32378CF0-CB7D-4242-957B-676908420E8A}.Release|x86.ActiveCfg = Release|Any CPU - {32378CF0-CB7D-4242-957B-676908420E8A}.Release|x86.Build.0 = Release|Any CPU {5AEBC439-9CA8-4D02-A118-B19090E66223}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5AEBC439-9CA8-4D02-A118-B19090E66223}.Debug|Any CPU.Build.0 = Debug|Any CPU {5AEBC439-9CA8-4D02-A118-B19090E66223}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -415,18 +547,6 @@ Global {5AEBC439-9CA8-4D02-A118-B19090E66223}.Release|x64.Build.0 = Release|Any CPU {5AEBC439-9CA8-4D02-A118-B19090E66223}.Release|x86.ActiveCfg = Release|Any CPU {5AEBC439-9CA8-4D02-A118-B19090E66223}.Release|x86.Build.0 = Release|Any CPU - {BD693153-6B2D-4B54-BFC9-35E20C996270}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BD693153-6B2D-4B54-BFC9-35E20C996270}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BD693153-6B2D-4B54-BFC9-35E20C996270}.Debug|x64.ActiveCfg = Debug|Any CPU - {BD693153-6B2D-4B54-BFC9-35E20C996270}.Debug|x64.Build.0 = Debug|Any CPU - {BD693153-6B2D-4B54-BFC9-35E20C996270}.Debug|x86.ActiveCfg = Debug|Any CPU - {BD693153-6B2D-4B54-BFC9-35E20C996270}.Debug|x86.Build.0 = Debug|Any CPU - {BD693153-6B2D-4B54-BFC9-35E20C996270}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BD693153-6B2D-4B54-BFC9-35E20C996270}.Release|Any CPU.Build.0 = Release|Any CPU - {BD693153-6B2D-4B54-BFC9-35E20C996270}.Release|x64.ActiveCfg = Release|Any CPU - {BD693153-6B2D-4B54-BFC9-35E20C996270}.Release|x64.Build.0 = Release|Any CPU - {BD693153-6B2D-4B54-BFC9-35E20C996270}.Release|x86.ActiveCfg = Release|Any CPU - {BD693153-6B2D-4B54-BFC9-35E20C996270}.Release|x86.Build.0 = Release|Any CPU {BDB248AE-6CBB-4BB5-9FB1-8A8FDD18C4CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BDB248AE-6CBB-4BB5-9FB1-8A8FDD18C4CE}.Debug|Any CPU.Build.0 = Debug|Any CPU {BDB248AE-6CBB-4BB5-9FB1-8A8FDD18C4CE}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -439,18 +559,6 @@ Global {BDB248AE-6CBB-4BB5-9FB1-8A8FDD18C4CE}.Release|x64.Build.0 = Release|Any CPU {BDB248AE-6CBB-4BB5-9FB1-8A8FDD18C4CE}.Release|x86.ActiveCfg = Release|Any CPU {BDB248AE-6CBB-4BB5-9FB1-8A8FDD18C4CE}.Release|x86.Build.0 = Release|Any CPU - {44DA15EF-BB86-4C4F-8809-A5BCA7B7FA18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {44DA15EF-BB86-4C4F-8809-A5BCA7B7FA18}.Debug|Any CPU.Build.0 = Debug|Any CPU - {44DA15EF-BB86-4C4F-8809-A5BCA7B7FA18}.Debug|x64.ActiveCfg = Debug|Any CPU - {44DA15EF-BB86-4C4F-8809-A5BCA7B7FA18}.Debug|x64.Build.0 = Debug|Any CPU - {44DA15EF-BB86-4C4F-8809-A5BCA7B7FA18}.Debug|x86.ActiveCfg = Debug|Any CPU - {44DA15EF-BB86-4C4F-8809-A5BCA7B7FA18}.Debug|x86.Build.0 = Debug|Any CPU - {44DA15EF-BB86-4C4F-8809-A5BCA7B7FA18}.Release|Any CPU.ActiveCfg = Release|Any CPU - {44DA15EF-BB86-4C4F-8809-A5BCA7B7FA18}.Release|Any CPU.Build.0 = Release|Any CPU - {44DA15EF-BB86-4C4F-8809-A5BCA7B7FA18}.Release|x64.ActiveCfg = Release|Any CPU - {44DA15EF-BB86-4C4F-8809-A5BCA7B7FA18}.Release|x64.Build.0 = Release|Any CPU - {44DA15EF-BB86-4C4F-8809-A5BCA7B7FA18}.Release|x86.ActiveCfg = Release|Any CPU - {44DA15EF-BB86-4C4F-8809-A5BCA7B7FA18}.Release|x86.Build.0 = Release|Any CPU {D03E7529-5E28-4478-A0DC-596B674C11CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D03E7529-5E28-4478-A0DC-596B674C11CC}.Debug|Any CPU.Build.0 = Debug|Any CPU {D03E7529-5E28-4478-A0DC-596B674C11CC}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -463,18 +571,6 @@ Global {D03E7529-5E28-4478-A0DC-596B674C11CC}.Release|x64.Build.0 = Release|Any CPU {D03E7529-5E28-4478-A0DC-596B674C11CC}.Release|x86.ActiveCfg = Release|Any CPU {D03E7529-5E28-4478-A0DC-596B674C11CC}.Release|x86.Build.0 = Release|Any CPU - {4E0630FC-BB47-4454-B395-5AFC89AAA207}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4E0630FC-BB47-4454-B395-5AFC89AAA207}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4E0630FC-BB47-4454-B395-5AFC89AAA207}.Debug|x64.ActiveCfg = Debug|Any CPU - {4E0630FC-BB47-4454-B395-5AFC89AAA207}.Debug|x64.Build.0 = Debug|Any CPU - {4E0630FC-BB47-4454-B395-5AFC89AAA207}.Debug|x86.ActiveCfg = Debug|Any CPU - {4E0630FC-BB47-4454-B395-5AFC89AAA207}.Debug|x86.Build.0 = Debug|Any CPU - {4E0630FC-BB47-4454-B395-5AFC89AAA207}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4E0630FC-BB47-4454-B395-5AFC89AAA207}.Release|Any CPU.Build.0 = Release|Any CPU - {4E0630FC-BB47-4454-B395-5AFC89AAA207}.Release|x64.ActiveCfg = Release|Any CPU - {4E0630FC-BB47-4454-B395-5AFC89AAA207}.Release|x64.Build.0 = Release|Any CPU - {4E0630FC-BB47-4454-B395-5AFC89AAA207}.Release|x86.ActiveCfg = Release|Any CPU - {4E0630FC-BB47-4454-B395-5AFC89AAA207}.Release|x86.Build.0 = Release|Any CPU {5EC25549-ADE1-46C0-9AD3-88D6BE2DD2E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EC25549-ADE1-46C0-9AD3-88D6BE2DD2E4}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EC25549-ADE1-46C0-9AD3-88D6BE2DD2E4}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -487,18 +583,6 @@ Global {5EC25549-ADE1-46C0-9AD3-88D6BE2DD2E4}.Release|x64.Build.0 = Release|Any CPU {5EC25549-ADE1-46C0-9AD3-88D6BE2DD2E4}.Release|x86.ActiveCfg = Release|Any CPU {5EC25549-ADE1-46C0-9AD3-88D6BE2DD2E4}.Release|x86.Build.0 = Release|Any CPU - {3AB2EDD3-29CD-4439-824A-AA77A83D8313}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3AB2EDD3-29CD-4439-824A-AA77A83D8313}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3AB2EDD3-29CD-4439-824A-AA77A83D8313}.Debug|x64.ActiveCfg = Debug|Any CPU - {3AB2EDD3-29CD-4439-824A-AA77A83D8313}.Debug|x64.Build.0 = Debug|Any CPU - {3AB2EDD3-29CD-4439-824A-AA77A83D8313}.Debug|x86.ActiveCfg = Debug|Any CPU - {3AB2EDD3-29CD-4439-824A-AA77A83D8313}.Debug|x86.Build.0 = Debug|Any CPU - {3AB2EDD3-29CD-4439-824A-AA77A83D8313}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3AB2EDD3-29CD-4439-824A-AA77A83D8313}.Release|Any CPU.Build.0 = Release|Any CPU - {3AB2EDD3-29CD-4439-824A-AA77A83D8313}.Release|x64.ActiveCfg = Release|Any CPU - {3AB2EDD3-29CD-4439-824A-AA77A83D8313}.Release|x64.Build.0 = Release|Any CPU - {3AB2EDD3-29CD-4439-824A-AA77A83D8313}.Release|x86.ActiveCfg = Release|Any CPU - {3AB2EDD3-29CD-4439-824A-AA77A83D8313}.Release|x86.Build.0 = Release|Any CPU {C4F428B3-4841-4364-894A-0993AD1E8A91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C4F428B3-4841-4364-894A-0993AD1E8A91}.Debug|Any CPU.Build.0 = Debug|Any CPU {C4F428B3-4841-4364-894A-0993AD1E8A91}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -511,18 +595,6 @@ Global {C4F428B3-4841-4364-894A-0993AD1E8A91}.Release|x64.Build.0 = Release|Any CPU {C4F428B3-4841-4364-894A-0993AD1E8A91}.Release|x86.ActiveCfg = Release|Any CPU {C4F428B3-4841-4364-894A-0993AD1E8A91}.Release|x86.Build.0 = Release|Any CPU - {79FFF590-89D6-4677-A127-A8C0504E53B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {79FFF590-89D6-4677-A127-A8C0504E53B8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {79FFF590-89D6-4677-A127-A8C0504E53B8}.Debug|x64.ActiveCfg = Debug|Any CPU - {79FFF590-89D6-4677-A127-A8C0504E53B8}.Debug|x64.Build.0 = Debug|Any CPU - {79FFF590-89D6-4677-A127-A8C0504E53B8}.Debug|x86.ActiveCfg = Debug|Any CPU - {79FFF590-89D6-4677-A127-A8C0504E53B8}.Debug|x86.Build.0 = Debug|Any CPU - {79FFF590-89D6-4677-A127-A8C0504E53B8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {79FFF590-89D6-4677-A127-A8C0504E53B8}.Release|Any CPU.Build.0 = Release|Any CPU - {79FFF590-89D6-4677-A127-A8C0504E53B8}.Release|x64.ActiveCfg = Release|Any CPU - {79FFF590-89D6-4677-A127-A8C0504E53B8}.Release|x64.Build.0 = Release|Any CPU - {79FFF590-89D6-4677-A127-A8C0504E53B8}.Release|x86.ActiveCfg = Release|Any CPU - {79FFF590-89D6-4677-A127-A8C0504E53B8}.Release|x86.Build.0 = Release|Any CPU {FEB9A077-5585-4071-99FB-CAD05E6577D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FEB9A077-5585-4071-99FB-CAD05E6577D3}.Debug|Any CPU.Build.0 = Debug|Any CPU {FEB9A077-5585-4071-99FB-CAD05E6577D3}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -535,18 +607,6 @@ Global {FEB9A077-5585-4071-99FB-CAD05E6577D3}.Release|x64.Build.0 = Release|Any CPU {FEB9A077-5585-4071-99FB-CAD05E6577D3}.Release|x86.ActiveCfg = Release|Any CPU {FEB9A077-5585-4071-99FB-CAD05E6577D3}.Release|x86.Build.0 = Release|Any CPU - {4C3AC3C0-A552-4631-A59B-CB4FB37CE4ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4C3AC3C0-A552-4631-A59B-CB4FB37CE4ED}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4C3AC3C0-A552-4631-A59B-CB4FB37CE4ED}.Debug|x64.ActiveCfg = Debug|Any CPU - {4C3AC3C0-A552-4631-A59B-CB4FB37CE4ED}.Debug|x64.Build.0 = Debug|Any CPU - {4C3AC3C0-A552-4631-A59B-CB4FB37CE4ED}.Debug|x86.ActiveCfg = Debug|Any CPU - {4C3AC3C0-A552-4631-A59B-CB4FB37CE4ED}.Debug|x86.Build.0 = Debug|Any CPU - {4C3AC3C0-A552-4631-A59B-CB4FB37CE4ED}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4C3AC3C0-A552-4631-A59B-CB4FB37CE4ED}.Release|Any CPU.Build.0 = Release|Any CPU - {4C3AC3C0-A552-4631-A59B-CB4FB37CE4ED}.Release|x64.ActiveCfg = Release|Any CPU - {4C3AC3C0-A552-4631-A59B-CB4FB37CE4ED}.Release|x64.Build.0 = Release|Any CPU - {4C3AC3C0-A552-4631-A59B-CB4FB37CE4ED}.Release|x86.ActiveCfg = Release|Any CPU - {4C3AC3C0-A552-4631-A59B-CB4FB37CE4ED}.Release|x86.Build.0 = Release|Any CPU {FE1B7B2A-0B26-4861-B0B8-EF96297C3E51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FE1B7B2A-0B26-4861-B0B8-EF96297C3E51}.Debug|Any CPU.Build.0 = Debug|Any CPU {FE1B7B2A-0B26-4861-B0B8-EF96297C3E51}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -559,18 +619,6 @@ Global {FE1B7B2A-0B26-4861-B0B8-EF96297C3E51}.Release|x64.Build.0 = Release|Any CPU {FE1B7B2A-0B26-4861-B0B8-EF96297C3E51}.Release|x86.ActiveCfg = Release|Any CPU {FE1B7B2A-0B26-4861-B0B8-EF96297C3E51}.Release|x86.Build.0 = Release|Any CPU - {69ED7731-C250-43B0-A021-C908C0E2CF1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {69ED7731-C250-43B0-A021-C908C0E2CF1C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {69ED7731-C250-43B0-A021-C908C0E2CF1C}.Debug|x64.ActiveCfg = Debug|Any CPU - {69ED7731-C250-43B0-A021-C908C0E2CF1C}.Debug|x64.Build.0 = Debug|Any CPU - {69ED7731-C250-43B0-A021-C908C0E2CF1C}.Debug|x86.ActiveCfg = Debug|Any CPU - {69ED7731-C250-43B0-A021-C908C0E2CF1C}.Debug|x86.Build.0 = Debug|Any CPU - {69ED7731-C250-43B0-A021-C908C0E2CF1C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {69ED7731-C250-43B0-A021-C908C0E2CF1C}.Release|Any CPU.Build.0 = Release|Any CPU - {69ED7731-C250-43B0-A021-C908C0E2CF1C}.Release|x64.ActiveCfg = Release|Any CPU - {69ED7731-C250-43B0-A021-C908C0E2CF1C}.Release|x64.Build.0 = Release|Any CPU - {69ED7731-C250-43B0-A021-C908C0E2CF1C}.Release|x86.ActiveCfg = Release|Any CPU - {69ED7731-C250-43B0-A021-C908C0E2CF1C}.Release|x86.Build.0 = Release|Any CPU {C04187FA-99A2-489D-87A3-9FBEA11788AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C04187FA-99A2-489D-87A3-9FBEA11788AA}.Debug|Any CPU.Build.0 = Debug|Any CPU {C04187FA-99A2-489D-87A3-9FBEA11788AA}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -583,18 +631,6 @@ Global {C04187FA-99A2-489D-87A3-9FBEA11788AA}.Release|x64.Build.0 = Release|Any CPU {C04187FA-99A2-489D-87A3-9FBEA11788AA}.Release|x86.ActiveCfg = Release|Any CPU {C04187FA-99A2-489D-87A3-9FBEA11788AA}.Release|x86.Build.0 = Release|Any CPU - {4EB52804-F20C-4196-811D-DFB484B9E57B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4EB52804-F20C-4196-811D-DFB484B9E57B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4EB52804-F20C-4196-811D-DFB484B9E57B}.Debug|x64.ActiveCfg = Debug|Any CPU - {4EB52804-F20C-4196-811D-DFB484B9E57B}.Debug|x64.Build.0 = Debug|Any CPU - {4EB52804-F20C-4196-811D-DFB484B9E57B}.Debug|x86.ActiveCfg = Debug|Any CPU - {4EB52804-F20C-4196-811D-DFB484B9E57B}.Debug|x86.Build.0 = Debug|Any CPU - {4EB52804-F20C-4196-811D-DFB484B9E57B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4EB52804-F20C-4196-811D-DFB484B9E57B}.Release|Any CPU.Build.0 = Release|Any CPU - {4EB52804-F20C-4196-811D-DFB484B9E57B}.Release|x64.ActiveCfg = Release|Any CPU - {4EB52804-F20C-4196-811D-DFB484B9E57B}.Release|x64.Build.0 = Release|Any CPU - {4EB52804-F20C-4196-811D-DFB484B9E57B}.Release|x86.ActiveCfg = Release|Any CPU - {4EB52804-F20C-4196-811D-DFB484B9E57B}.Release|x86.Build.0 = Release|Any CPU {79B7BC52-F1BA-4FCE-87FD-E64F6242750E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {79B7BC52-F1BA-4FCE-87FD-E64F6242750E}.Debug|Any CPU.Build.0 = Debug|Any CPU {79B7BC52-F1BA-4FCE-87FD-E64F6242750E}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -607,18 +643,6 @@ Global {79B7BC52-F1BA-4FCE-87FD-E64F6242750E}.Release|x64.Build.0 = Release|Any CPU {79B7BC52-F1BA-4FCE-87FD-E64F6242750E}.Release|x86.ActiveCfg = Release|Any CPU {79B7BC52-F1BA-4FCE-87FD-E64F6242750E}.Release|x86.Build.0 = Release|Any CPU - {11695913-2A5F-4D42-AE85-5B40328234A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {11695913-2A5F-4D42-AE85-5B40328234A8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {11695913-2A5F-4D42-AE85-5B40328234A8}.Debug|x64.ActiveCfg = Debug|Any CPU - {11695913-2A5F-4D42-AE85-5B40328234A8}.Debug|x64.Build.0 = Debug|Any CPU - {11695913-2A5F-4D42-AE85-5B40328234A8}.Debug|x86.ActiveCfg = Debug|Any CPU - {11695913-2A5F-4D42-AE85-5B40328234A8}.Debug|x86.Build.0 = Debug|Any CPU - {11695913-2A5F-4D42-AE85-5B40328234A8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {11695913-2A5F-4D42-AE85-5B40328234A8}.Release|Any CPU.Build.0 = Release|Any CPU - {11695913-2A5F-4D42-AE85-5B40328234A8}.Release|x64.ActiveCfg = Release|Any CPU - {11695913-2A5F-4D42-AE85-5B40328234A8}.Release|x64.Build.0 = Release|Any CPU - {11695913-2A5F-4D42-AE85-5B40328234A8}.Release|x86.ActiveCfg = Release|Any CPU - {11695913-2A5F-4D42-AE85-5B40328234A8}.Release|x86.Build.0 = Release|Any CPU {464A3592-557A-45A6-BE61-AC49919CC6ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {464A3592-557A-45A6-BE61-AC49919CC6ED}.Debug|Any CPU.Build.0 = Debug|Any CPU {464A3592-557A-45A6-BE61-AC49919CC6ED}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -631,18 +655,6 @@ Global {464A3592-557A-45A6-BE61-AC49919CC6ED}.Release|x64.Build.0 = Release|Any CPU {464A3592-557A-45A6-BE61-AC49919CC6ED}.Release|x86.ActiveCfg = Release|Any CPU {464A3592-557A-45A6-BE61-AC49919CC6ED}.Release|x86.Build.0 = Release|Any CPU - {2E69C800-64CF-4279-9E3E-32B3934B3493}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2E69C800-64CF-4279-9E3E-32B3934B3493}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2E69C800-64CF-4279-9E3E-32B3934B3493}.Debug|x64.ActiveCfg = Debug|Any CPU - {2E69C800-64CF-4279-9E3E-32B3934B3493}.Debug|x64.Build.0 = Debug|Any CPU - {2E69C800-64CF-4279-9E3E-32B3934B3493}.Debug|x86.ActiveCfg = Debug|Any CPU - {2E69C800-64CF-4279-9E3E-32B3934B3493}.Debug|x86.Build.0 = Debug|Any CPU - {2E69C800-64CF-4279-9E3E-32B3934B3493}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2E69C800-64CF-4279-9E3E-32B3934B3493}.Release|Any CPU.Build.0 = Release|Any CPU - {2E69C800-64CF-4279-9E3E-32B3934B3493}.Release|x64.ActiveCfg = Release|Any CPU - {2E69C800-64CF-4279-9E3E-32B3934B3493}.Release|x64.Build.0 = Release|Any CPU - {2E69C800-64CF-4279-9E3E-32B3934B3493}.Release|x86.ActiveCfg = Release|Any CPU - {2E69C800-64CF-4279-9E3E-32B3934B3493}.Release|x86.Build.0 = Release|Any CPU {F154572F-A92B-4C9C-A814-9A957A6F7A4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F154572F-A92B-4C9C-A814-9A957A6F7A4F}.Debug|Any CPU.Build.0 = Debug|Any CPU {F154572F-A92B-4C9C-A814-9A957A6F7A4F}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -655,18 +667,6 @@ Global {F154572F-A92B-4C9C-A814-9A957A6F7A4F}.Release|x64.Build.0 = Release|Any CPU {F154572F-A92B-4C9C-A814-9A957A6F7A4F}.Release|x86.ActiveCfg = Release|Any CPU {F154572F-A92B-4C9C-A814-9A957A6F7A4F}.Release|x86.Build.0 = Release|Any CPU - {2D0583B6-E9DC-4E37-A4AA-D758CD909B41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2D0583B6-E9DC-4E37-A4AA-D758CD909B41}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2D0583B6-E9DC-4E37-A4AA-D758CD909B41}.Debug|x64.ActiveCfg = Debug|Any CPU - {2D0583B6-E9DC-4E37-A4AA-D758CD909B41}.Debug|x64.Build.0 = Debug|Any CPU - {2D0583B6-E9DC-4E37-A4AA-D758CD909B41}.Debug|x86.ActiveCfg = Debug|Any CPU - {2D0583B6-E9DC-4E37-A4AA-D758CD909B41}.Debug|x86.Build.0 = Debug|Any CPU - {2D0583B6-E9DC-4E37-A4AA-D758CD909B41}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2D0583B6-E9DC-4E37-A4AA-D758CD909B41}.Release|Any CPU.Build.0 = Release|Any CPU - {2D0583B6-E9DC-4E37-A4AA-D758CD909B41}.Release|x64.ActiveCfg = Release|Any CPU - {2D0583B6-E9DC-4E37-A4AA-D758CD909B41}.Release|x64.Build.0 = Release|Any CPU - {2D0583B6-E9DC-4E37-A4AA-D758CD909B41}.Release|x86.ActiveCfg = Release|Any CPU - {2D0583B6-E9DC-4E37-A4AA-D758CD909B41}.Release|x86.Build.0 = Release|Any CPU {82DD1D7F-0693-415D-A254-85327169B674}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {82DD1D7F-0693-415D-A254-85327169B674}.Debug|Any CPU.Build.0 = Debug|Any CPU {82DD1D7F-0693-415D-A254-85327169B674}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -679,18 +679,6 @@ Global {82DD1D7F-0693-415D-A254-85327169B674}.Release|x64.Build.0 = Release|Any CPU {82DD1D7F-0693-415D-A254-85327169B674}.Release|x86.ActiveCfg = Release|Any CPU {82DD1D7F-0693-415D-A254-85327169B674}.Release|x86.Build.0 = Release|Any CPU - {99456ADC-FBD9-4794-B07C-5C6DFFEEBB17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {99456ADC-FBD9-4794-B07C-5C6DFFEEBB17}.Debug|Any CPU.Build.0 = Debug|Any CPU - {99456ADC-FBD9-4794-B07C-5C6DFFEEBB17}.Debug|x64.ActiveCfg = Debug|Any CPU - {99456ADC-FBD9-4794-B07C-5C6DFFEEBB17}.Debug|x64.Build.0 = Debug|Any CPU - {99456ADC-FBD9-4794-B07C-5C6DFFEEBB17}.Debug|x86.ActiveCfg = Debug|Any CPU - {99456ADC-FBD9-4794-B07C-5C6DFFEEBB17}.Debug|x86.Build.0 = Debug|Any CPU - {99456ADC-FBD9-4794-B07C-5C6DFFEEBB17}.Release|Any CPU.ActiveCfg = Release|Any CPU - {99456ADC-FBD9-4794-B07C-5C6DFFEEBB17}.Release|Any CPU.Build.0 = Release|Any CPU - {99456ADC-FBD9-4794-B07C-5C6DFFEEBB17}.Release|x64.ActiveCfg = Release|Any CPU - {99456ADC-FBD9-4794-B07C-5C6DFFEEBB17}.Release|x64.Build.0 = Release|Any CPU - {99456ADC-FBD9-4794-B07C-5C6DFFEEBB17}.Release|x86.ActiveCfg = Release|Any CPU - {99456ADC-FBD9-4794-B07C-5C6DFFEEBB17}.Release|x86.Build.0 = Release|Any CPU {CDE70675-83CC-4D27-842C-7001827E8DF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CDE70675-83CC-4D27-842C-7001827E8DF7}.Debug|Any CPU.Build.0 = Debug|Any CPU {CDE70675-83CC-4D27-842C-7001827E8DF7}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -703,18 +691,6 @@ Global {CDE70675-83CC-4D27-842C-7001827E8DF7}.Release|x64.Build.0 = Release|Any CPU {CDE70675-83CC-4D27-842C-7001827E8DF7}.Release|x86.ActiveCfg = Release|Any CPU {CDE70675-83CC-4D27-842C-7001827E8DF7}.Release|x86.Build.0 = Release|Any CPU - {432A8BDA-C545-4F5B-A3E9-3F6F12F6B0D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {432A8BDA-C545-4F5B-A3E9-3F6F12F6B0D7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {432A8BDA-C545-4F5B-A3E9-3F6F12F6B0D7}.Debug|x64.ActiveCfg = Debug|Any CPU - {432A8BDA-C545-4F5B-A3E9-3F6F12F6B0D7}.Debug|x64.Build.0 = Debug|Any CPU - {432A8BDA-C545-4F5B-A3E9-3F6F12F6B0D7}.Debug|x86.ActiveCfg = Debug|Any CPU - {432A8BDA-C545-4F5B-A3E9-3F6F12F6B0D7}.Debug|x86.Build.0 = Debug|Any CPU - {432A8BDA-C545-4F5B-A3E9-3F6F12F6B0D7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {432A8BDA-C545-4F5B-A3E9-3F6F12F6B0D7}.Release|Any CPU.Build.0 = Release|Any CPU - {432A8BDA-C545-4F5B-A3E9-3F6F12F6B0D7}.Release|x64.ActiveCfg = Release|Any CPU - {432A8BDA-C545-4F5B-A3E9-3F6F12F6B0D7}.Release|x64.Build.0 = Release|Any CPU - {432A8BDA-C545-4F5B-A3E9-3F6F12F6B0D7}.Release|x86.ActiveCfg = Release|Any CPU - {432A8BDA-C545-4F5B-A3E9-3F6F12F6B0D7}.Release|x86.Build.0 = Release|Any CPU {2F1F57EC-2E49-452B-AE39-EBC978BB1F2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F1F57EC-2E49-452B-AE39-EBC978BB1F2F}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F1F57EC-2E49-452B-AE39-EBC978BB1F2F}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -727,18 +703,6 @@ Global {2F1F57EC-2E49-452B-AE39-EBC978BB1F2F}.Release|x64.Build.0 = Release|Any CPU {2F1F57EC-2E49-452B-AE39-EBC978BB1F2F}.Release|x86.ActiveCfg = Release|Any CPU {2F1F57EC-2E49-452B-AE39-EBC978BB1F2F}.Release|x86.Build.0 = Release|Any CPU - {B0171216-C945-4267-B5DE-632DDE1A61A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B0171216-C945-4267-B5DE-632DDE1A61A9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B0171216-C945-4267-B5DE-632DDE1A61A9}.Debug|x64.ActiveCfg = Debug|Any CPU - {B0171216-C945-4267-B5DE-632DDE1A61A9}.Debug|x64.Build.0 = Debug|Any CPU - {B0171216-C945-4267-B5DE-632DDE1A61A9}.Debug|x86.ActiveCfg = Debug|Any CPU - {B0171216-C945-4267-B5DE-632DDE1A61A9}.Debug|x86.Build.0 = Debug|Any CPU - {B0171216-C945-4267-B5DE-632DDE1A61A9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B0171216-C945-4267-B5DE-632DDE1A61A9}.Release|Any CPU.Build.0 = Release|Any CPU - {B0171216-C945-4267-B5DE-632DDE1A61A9}.Release|x64.ActiveCfg = Release|Any CPU - {B0171216-C945-4267-B5DE-632DDE1A61A9}.Release|x64.Build.0 = Release|Any CPU - {B0171216-C945-4267-B5DE-632DDE1A61A9}.Release|x86.ActiveCfg = Release|Any CPU - {B0171216-C945-4267-B5DE-632DDE1A61A9}.Release|x86.Build.0 = Release|Any CPU {8B40C04A-E3B8-4830-9203-3A2234A000BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B40C04A-E3B8-4830-9203-3A2234A000BD}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B40C04A-E3B8-4830-9203-3A2234A000BD}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -751,18 +715,6 @@ Global {8B40C04A-E3B8-4830-9203-3A2234A000BD}.Release|x64.Build.0 = Release|Any CPU {8B40C04A-E3B8-4830-9203-3A2234A000BD}.Release|x86.ActiveCfg = Release|Any CPU {8B40C04A-E3B8-4830-9203-3A2234A000BD}.Release|x86.Build.0 = Release|Any CPU - {4747A8FD-A4EE-4A01-A732-EDFA7EBB347B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4747A8FD-A4EE-4A01-A732-EDFA7EBB347B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4747A8FD-A4EE-4A01-A732-EDFA7EBB347B}.Debug|x64.ActiveCfg = Debug|Any CPU - {4747A8FD-A4EE-4A01-A732-EDFA7EBB347B}.Debug|x64.Build.0 = Debug|Any CPU - {4747A8FD-A4EE-4A01-A732-EDFA7EBB347B}.Debug|x86.ActiveCfg = Debug|Any CPU - {4747A8FD-A4EE-4A01-A732-EDFA7EBB347B}.Debug|x86.Build.0 = Debug|Any CPU - {4747A8FD-A4EE-4A01-A732-EDFA7EBB347B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4747A8FD-A4EE-4A01-A732-EDFA7EBB347B}.Release|Any CPU.Build.0 = Release|Any CPU - {4747A8FD-A4EE-4A01-A732-EDFA7EBB347B}.Release|x64.ActiveCfg = Release|Any CPU - {4747A8FD-A4EE-4A01-A732-EDFA7EBB347B}.Release|x64.Build.0 = Release|Any CPU - {4747A8FD-A4EE-4A01-A732-EDFA7EBB347B}.Release|x86.ActiveCfg = Release|Any CPU - {4747A8FD-A4EE-4A01-A732-EDFA7EBB347B}.Release|x86.Build.0 = Release|Any CPU {FF8A1168-FB4E-4953-9A50-34CC841C5A5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FF8A1168-FB4E-4953-9A50-34CC841C5A5A}.Debug|Any CPU.Build.0 = Debug|Any CPU {FF8A1168-FB4E-4953-9A50-34CC841C5A5A}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -775,18 +727,6 @@ Global {FF8A1168-FB4E-4953-9A50-34CC841C5A5A}.Release|x64.Build.0 = Release|Any CPU {FF8A1168-FB4E-4953-9A50-34CC841C5A5A}.Release|x86.ActiveCfg = Release|Any CPU {FF8A1168-FB4E-4953-9A50-34CC841C5A5A}.Release|x86.Build.0 = Release|Any CPU - {E839236F-292C-4D05-A038-1AC727739559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E839236F-292C-4D05-A038-1AC727739559}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E839236F-292C-4D05-A038-1AC727739559}.Debug|x64.ActiveCfg = Debug|Any CPU - {E839236F-292C-4D05-A038-1AC727739559}.Debug|x64.Build.0 = Debug|Any CPU - {E839236F-292C-4D05-A038-1AC727739559}.Debug|x86.ActiveCfg = Debug|Any CPU - {E839236F-292C-4D05-A038-1AC727739559}.Debug|x86.Build.0 = Debug|Any CPU - {E839236F-292C-4D05-A038-1AC727739559}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E839236F-292C-4D05-A038-1AC727739559}.Release|Any CPU.Build.0 = Release|Any CPU - {E839236F-292C-4D05-A038-1AC727739559}.Release|x64.ActiveCfg = Release|Any CPU - {E839236F-292C-4D05-A038-1AC727739559}.Release|x64.Build.0 = Release|Any CPU - {E839236F-292C-4D05-A038-1AC727739559}.Release|x86.ActiveCfg = Release|Any CPU - {E839236F-292C-4D05-A038-1AC727739559}.Release|x86.Build.0 = Release|Any CPU {B93984FE-7EB4-452C-9E33-2A9E8F79D25F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B93984FE-7EB4-452C-9E33-2A9E8F79D25F}.Debug|Any CPU.Build.0 = Debug|Any CPU {B93984FE-7EB4-452C-9E33-2A9E8F79D25F}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -799,18 +739,6 @@ Global {B93984FE-7EB4-452C-9E33-2A9E8F79D25F}.Release|x64.Build.0 = Release|Any CPU {B93984FE-7EB4-452C-9E33-2A9E8F79D25F}.Release|x86.ActiveCfg = Release|Any CPU {B93984FE-7EB4-452C-9E33-2A9E8F79D25F}.Release|x86.Build.0 = Release|Any CPU - {7FB17C60-24EA-48EA-A69F-33FE394CD33B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7FB17C60-24EA-48EA-A69F-33FE394CD33B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7FB17C60-24EA-48EA-A69F-33FE394CD33B}.Debug|x64.ActiveCfg = Debug|Any CPU - {7FB17C60-24EA-48EA-A69F-33FE394CD33B}.Debug|x64.Build.0 = Debug|Any CPU - {7FB17C60-24EA-48EA-A69F-33FE394CD33B}.Debug|x86.ActiveCfg = Debug|Any CPU - {7FB17C60-24EA-48EA-A69F-33FE394CD33B}.Debug|x86.Build.0 = Debug|Any CPU - {7FB17C60-24EA-48EA-A69F-33FE394CD33B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7FB17C60-24EA-48EA-A69F-33FE394CD33B}.Release|Any CPU.Build.0 = Release|Any CPU - {7FB17C60-24EA-48EA-A69F-33FE394CD33B}.Release|x64.ActiveCfg = Release|Any CPU - {7FB17C60-24EA-48EA-A69F-33FE394CD33B}.Release|x64.Build.0 = Release|Any CPU - {7FB17C60-24EA-48EA-A69F-33FE394CD33B}.Release|x86.ActiveCfg = Release|Any CPU - {7FB17C60-24EA-48EA-A69F-33FE394CD33B}.Release|x86.Build.0 = Release|Any CPU {2D7D23EC-C51C-4DFE-BFFB-7DB40B589BE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2D7D23EC-C51C-4DFE-BFFB-7DB40B589BE5}.Debug|Any CPU.Build.0 = Debug|Any CPU {2D7D23EC-C51C-4DFE-BFFB-7DB40B589BE5}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -823,18 +751,6 @@ Global {2D7D23EC-C51C-4DFE-BFFB-7DB40B589BE5}.Release|x64.Build.0 = Release|Any CPU {2D7D23EC-C51C-4DFE-BFFB-7DB40B589BE5}.Release|x86.ActiveCfg = Release|Any CPU {2D7D23EC-C51C-4DFE-BFFB-7DB40B589BE5}.Release|x86.Build.0 = Release|Any CPU - {2E3EF875-D295-4B81-BBB9-C0A7D4BCADC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2E3EF875-D295-4B81-BBB9-C0A7D4BCADC6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2E3EF875-D295-4B81-BBB9-C0A7D4BCADC6}.Debug|x64.ActiveCfg = Debug|Any CPU - {2E3EF875-D295-4B81-BBB9-C0A7D4BCADC6}.Debug|x64.Build.0 = Debug|Any CPU - {2E3EF875-D295-4B81-BBB9-C0A7D4BCADC6}.Debug|x86.ActiveCfg = Debug|Any CPU - {2E3EF875-D295-4B81-BBB9-C0A7D4BCADC6}.Debug|x86.Build.0 = Debug|Any CPU - {2E3EF875-D295-4B81-BBB9-C0A7D4BCADC6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2E3EF875-D295-4B81-BBB9-C0A7D4BCADC6}.Release|Any CPU.Build.0 = Release|Any CPU - {2E3EF875-D295-4B81-BBB9-C0A7D4BCADC6}.Release|x64.ActiveCfg = Release|Any CPU - {2E3EF875-D295-4B81-BBB9-C0A7D4BCADC6}.Release|x64.Build.0 = Release|Any CPU - {2E3EF875-D295-4B81-BBB9-C0A7D4BCADC6}.Release|x86.ActiveCfg = Release|Any CPU - {2E3EF875-D295-4B81-BBB9-C0A7D4BCADC6}.Release|x86.Build.0 = Release|Any CPU {F65C6724-1675-4108-8563-A63D24B04E01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F65C6724-1675-4108-8563-A63D24B04E01}.Debug|Any CPU.Build.0 = Debug|Any CPU {F65C6724-1675-4108-8563-A63D24B04E01}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -847,54 +763,6 @@ Global {F65C6724-1675-4108-8563-A63D24B04E01}.Release|x64.Build.0 = Release|Any CPU {F65C6724-1675-4108-8563-A63D24B04E01}.Release|x86.ActiveCfg = Release|Any CPU {F65C6724-1675-4108-8563-A63D24B04E01}.Release|x86.Build.0 = Release|Any CPU - {970109A7-21AB-4502-AED0-F48EFAE91788}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {970109A7-21AB-4502-AED0-F48EFAE91788}.Debug|Any CPU.Build.0 = Debug|Any CPU - {970109A7-21AB-4502-AED0-F48EFAE91788}.Debug|x64.ActiveCfg = Debug|Any CPU - {970109A7-21AB-4502-AED0-F48EFAE91788}.Debug|x64.Build.0 = Debug|Any CPU - {970109A7-21AB-4502-AED0-F48EFAE91788}.Debug|x86.ActiveCfg = Debug|Any CPU - {970109A7-21AB-4502-AED0-F48EFAE91788}.Debug|x86.Build.0 = Debug|Any CPU - {970109A7-21AB-4502-AED0-F48EFAE91788}.Release|Any CPU.ActiveCfg = Release|Any CPU - {970109A7-21AB-4502-AED0-F48EFAE91788}.Release|Any CPU.Build.0 = Release|Any CPU - {970109A7-21AB-4502-AED0-F48EFAE91788}.Release|x64.ActiveCfg = Release|Any CPU - {970109A7-21AB-4502-AED0-F48EFAE91788}.Release|x64.Build.0 = Release|Any CPU - {970109A7-21AB-4502-AED0-F48EFAE91788}.Release|x86.ActiveCfg = Release|Any CPU - {970109A7-21AB-4502-AED0-F48EFAE91788}.Release|x86.Build.0 = Release|Any CPU - {57BAFB0D-D015-4ADD-956E-6E71A10A00F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {57BAFB0D-D015-4ADD-956E-6E71A10A00F3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {57BAFB0D-D015-4ADD-956E-6E71A10A00F3}.Debug|x64.ActiveCfg = Debug|Any CPU - {57BAFB0D-D015-4ADD-956E-6E71A10A00F3}.Debug|x64.Build.0 = Debug|Any CPU - {57BAFB0D-D015-4ADD-956E-6E71A10A00F3}.Debug|x86.ActiveCfg = Debug|Any CPU - {57BAFB0D-D015-4ADD-956E-6E71A10A00F3}.Debug|x86.Build.0 = Debug|Any CPU - {57BAFB0D-D015-4ADD-956E-6E71A10A00F3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {57BAFB0D-D015-4ADD-956E-6E71A10A00F3}.Release|Any CPU.Build.0 = Release|Any CPU - {57BAFB0D-D015-4ADD-956E-6E71A10A00F3}.Release|x64.ActiveCfg = Release|Any CPU - {57BAFB0D-D015-4ADD-956E-6E71A10A00F3}.Release|x64.Build.0 = Release|Any CPU - {57BAFB0D-D015-4ADD-956E-6E71A10A00F3}.Release|x86.ActiveCfg = Release|Any CPU - {57BAFB0D-D015-4ADD-956E-6E71A10A00F3}.Release|x86.Build.0 = Release|Any CPU - {64127B9A-3925-42A0-AC01-B5894A422505}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {64127B9A-3925-42A0-AC01-B5894A422505}.Debug|Any CPU.Build.0 = Debug|Any CPU - {64127B9A-3925-42A0-AC01-B5894A422505}.Debug|x64.ActiveCfg = Debug|Any CPU - {64127B9A-3925-42A0-AC01-B5894A422505}.Debug|x64.Build.0 = Debug|Any CPU - {64127B9A-3925-42A0-AC01-B5894A422505}.Debug|x86.ActiveCfg = Debug|Any CPU - {64127B9A-3925-42A0-AC01-B5894A422505}.Debug|x86.Build.0 = Debug|Any CPU - {64127B9A-3925-42A0-AC01-B5894A422505}.Release|Any CPU.ActiveCfg = Release|Any CPU - {64127B9A-3925-42A0-AC01-B5894A422505}.Release|Any CPU.Build.0 = Release|Any CPU - {64127B9A-3925-42A0-AC01-B5894A422505}.Release|x64.ActiveCfg = Release|Any CPU - {64127B9A-3925-42A0-AC01-B5894A422505}.Release|x64.Build.0 = Release|Any CPU - {64127B9A-3925-42A0-AC01-B5894A422505}.Release|x86.ActiveCfg = Release|Any CPU - {64127B9A-3925-42A0-AC01-B5894A422505}.Release|x86.Build.0 = Release|Any CPU - {858FEA39-13EC-4238-83AF-F444CF3A5618}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {858FEA39-13EC-4238-83AF-F444CF3A5618}.Debug|Any CPU.Build.0 = Debug|Any CPU - {858FEA39-13EC-4238-83AF-F444CF3A5618}.Debug|x64.ActiveCfg = Debug|Any CPU - {858FEA39-13EC-4238-83AF-F444CF3A5618}.Debug|x64.Build.0 = Debug|Any CPU - {858FEA39-13EC-4238-83AF-F444CF3A5618}.Debug|x86.ActiveCfg = Debug|Any CPU - {858FEA39-13EC-4238-83AF-F444CF3A5618}.Debug|x86.Build.0 = Debug|Any CPU - {858FEA39-13EC-4238-83AF-F444CF3A5618}.Release|Any CPU.ActiveCfg = Release|Any CPU - {858FEA39-13EC-4238-83AF-F444CF3A5618}.Release|Any CPU.Build.0 = Release|Any CPU - {858FEA39-13EC-4238-83AF-F444CF3A5618}.Release|x64.ActiveCfg = Release|Any CPU - {858FEA39-13EC-4238-83AF-F444CF3A5618}.Release|x64.Build.0 = Release|Any CPU - {858FEA39-13EC-4238-83AF-F444CF3A5618}.Release|x86.ActiveCfg = Release|Any CPU - {858FEA39-13EC-4238-83AF-F444CF3A5618}.Release|x86.Build.0 = Release|Any CPU {D46BA872-478C-4C05-A9C8-7079A9200B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D46BA872-478C-4C05-A9C8-7079A9200B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {D46BA872-478C-4C05-A9C8-7079A9200B98}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -907,18 +775,6 @@ Global {D46BA872-478C-4C05-A9C8-7079A9200B98}.Release|x64.Build.0 = Release|Any CPU {D46BA872-478C-4C05-A9C8-7079A9200B98}.Release|x86.ActiveCfg = Release|Any CPU {D46BA872-478C-4C05-A9C8-7079A9200B98}.Release|x86.Build.0 = Release|Any CPU - {383085B7-C38A-42E1-A2C9-9634875239E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {383085B7-C38A-42E1-A2C9-9634875239E0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {383085B7-C38A-42E1-A2C9-9634875239E0}.Debug|x64.ActiveCfg = Debug|Any CPU - {383085B7-C38A-42E1-A2C9-9634875239E0}.Debug|x64.Build.0 = Debug|Any CPU - {383085B7-C38A-42E1-A2C9-9634875239E0}.Debug|x86.ActiveCfg = Debug|Any CPU - {383085B7-C38A-42E1-A2C9-9634875239E0}.Debug|x86.Build.0 = Debug|Any CPU - {383085B7-C38A-42E1-A2C9-9634875239E0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {383085B7-C38A-42E1-A2C9-9634875239E0}.Release|Any CPU.Build.0 = Release|Any CPU - {383085B7-C38A-42E1-A2C9-9634875239E0}.Release|x64.ActiveCfg = Release|Any CPU - {383085B7-C38A-42E1-A2C9-9634875239E0}.Release|x64.Build.0 = Release|Any CPU - {383085B7-C38A-42E1-A2C9-9634875239E0}.Release|x86.ActiveCfg = Release|Any CPU - {383085B7-C38A-42E1-A2C9-9634875239E0}.Release|x86.Build.0 = Release|Any CPU {EA9665A2-4B01-4A8E-8FBB-9951A3A61A82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EA9665A2-4B01-4A8E-8FBB-9951A3A61A82}.Debug|Any CPU.Build.0 = Debug|Any CPU {EA9665A2-4B01-4A8E-8FBB-9951A3A61A82}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -931,18 +787,6 @@ Global {EA9665A2-4B01-4A8E-8FBB-9951A3A61A82}.Release|x64.Build.0 = Release|Any CPU {EA9665A2-4B01-4A8E-8FBB-9951A3A61A82}.Release|x86.ActiveCfg = Release|Any CPU {EA9665A2-4B01-4A8E-8FBB-9951A3A61A82}.Release|x86.Build.0 = Release|Any CPU - {6EE604C9-E53C-41F9-A302-A91566D64DD2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6EE604C9-E53C-41F9-A302-A91566D64DD2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6EE604C9-E53C-41F9-A302-A91566D64DD2}.Debug|x64.ActiveCfg = Debug|Any CPU - {6EE604C9-E53C-41F9-A302-A91566D64DD2}.Debug|x64.Build.0 = Debug|Any CPU - {6EE604C9-E53C-41F9-A302-A91566D64DD2}.Debug|x86.ActiveCfg = Debug|Any CPU - {6EE604C9-E53C-41F9-A302-A91566D64DD2}.Debug|x86.Build.0 = Debug|Any CPU - {6EE604C9-E53C-41F9-A302-A91566D64DD2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6EE604C9-E53C-41F9-A302-A91566D64DD2}.Release|Any CPU.Build.0 = Release|Any CPU - {6EE604C9-E53C-41F9-A302-A91566D64DD2}.Release|x64.ActiveCfg = Release|Any CPU - {6EE604C9-E53C-41F9-A302-A91566D64DD2}.Release|x64.Build.0 = Release|Any CPU - {6EE604C9-E53C-41F9-A302-A91566D64DD2}.Release|x86.ActiveCfg = Release|Any CPU - {6EE604C9-E53C-41F9-A302-A91566D64DD2}.Release|x86.Build.0 = Release|Any CPU {2036BE09-BFDD-425A-B2CF-F5B695570A86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2036BE09-BFDD-425A-B2CF-F5B695570A86}.Debug|Any CPU.Build.0 = Debug|Any CPU {2036BE09-BFDD-425A-B2CF-F5B695570A86}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -955,18 +799,6 @@ Global {2036BE09-BFDD-425A-B2CF-F5B695570A86}.Release|x64.Build.0 = Release|Any CPU {2036BE09-BFDD-425A-B2CF-F5B695570A86}.Release|x86.ActiveCfg = Release|Any CPU {2036BE09-BFDD-425A-B2CF-F5B695570A86}.Release|x86.Build.0 = Release|Any CPU - {E9DD3A37-1970-465F-8935-54A3CF37E999}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E9DD3A37-1970-465F-8935-54A3CF37E999}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E9DD3A37-1970-465F-8935-54A3CF37E999}.Debug|x64.ActiveCfg = Debug|Any CPU - {E9DD3A37-1970-465F-8935-54A3CF37E999}.Debug|x64.Build.0 = Debug|Any CPU - {E9DD3A37-1970-465F-8935-54A3CF37E999}.Debug|x86.ActiveCfg = Debug|Any CPU - {E9DD3A37-1970-465F-8935-54A3CF37E999}.Debug|x86.Build.0 = Debug|Any CPU - {E9DD3A37-1970-465F-8935-54A3CF37E999}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E9DD3A37-1970-465F-8935-54A3CF37E999}.Release|Any CPU.Build.0 = Release|Any CPU - {E9DD3A37-1970-465F-8935-54A3CF37E999}.Release|x64.ActiveCfg = Release|Any CPU - {E9DD3A37-1970-465F-8935-54A3CF37E999}.Release|x64.Build.0 = Release|Any CPU - {E9DD3A37-1970-465F-8935-54A3CF37E999}.Release|x86.ActiveCfg = Release|Any CPU - {E9DD3A37-1970-465F-8935-54A3CF37E999}.Release|x86.Build.0 = Release|Any CPU {66404561-7A1D-4AE2-BDE2-EB9DCC4C19AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {66404561-7A1D-4AE2-BDE2-EB9DCC4C19AE}.Debug|Any CPU.Build.0 = Debug|Any CPU {66404561-7A1D-4AE2-BDE2-EB9DCC4C19AE}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -979,18 +811,6 @@ Global {66404561-7A1D-4AE2-BDE2-EB9DCC4C19AE}.Release|x64.Build.0 = Release|Any CPU {66404561-7A1D-4AE2-BDE2-EB9DCC4C19AE}.Release|x86.ActiveCfg = Release|Any CPU {66404561-7A1D-4AE2-BDE2-EB9DCC4C19AE}.Release|x86.Build.0 = Release|Any CPU - {73E2DF06-B8BE-4839-87BD-2B0F255776B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {73E2DF06-B8BE-4839-87BD-2B0F255776B6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {73E2DF06-B8BE-4839-87BD-2B0F255776B6}.Debug|x64.ActiveCfg = Debug|Any CPU - {73E2DF06-B8BE-4839-87BD-2B0F255776B6}.Debug|x64.Build.0 = Debug|Any CPU - {73E2DF06-B8BE-4839-87BD-2B0F255776B6}.Debug|x86.ActiveCfg = Debug|Any CPU - {73E2DF06-B8BE-4839-87BD-2B0F255776B6}.Debug|x86.Build.0 = Debug|Any CPU - {73E2DF06-B8BE-4839-87BD-2B0F255776B6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {73E2DF06-B8BE-4839-87BD-2B0F255776B6}.Release|Any CPU.Build.0 = Release|Any CPU - {73E2DF06-B8BE-4839-87BD-2B0F255776B6}.Release|x64.ActiveCfg = Release|Any CPU - {73E2DF06-B8BE-4839-87BD-2B0F255776B6}.Release|x64.Build.0 = Release|Any CPU - {73E2DF06-B8BE-4839-87BD-2B0F255776B6}.Release|x86.ActiveCfg = Release|Any CPU - {73E2DF06-B8BE-4839-87BD-2B0F255776B6}.Release|x86.Build.0 = Release|Any CPU {5505EC4F-B4ED-41E7-A56F-EBDA7396BDAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5505EC4F-B4ED-41E7-A56F-EBDA7396BDAC}.Debug|Any CPU.Build.0 = Debug|Any CPU {5505EC4F-B4ED-41E7-A56F-EBDA7396BDAC}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1003,42 +823,6 @@ Global {5505EC4F-B4ED-41E7-A56F-EBDA7396BDAC}.Release|x64.Build.0 = Release|Any CPU {5505EC4F-B4ED-41E7-A56F-EBDA7396BDAC}.Release|x86.ActiveCfg = Release|Any CPU {5505EC4F-B4ED-41E7-A56F-EBDA7396BDAC}.Release|x86.Build.0 = Release|Any CPU - {EC652E03-DE93-48E6-8F46-D44EA0EBFD2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EC652E03-DE93-48E6-8F46-D44EA0EBFD2C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EC652E03-DE93-48E6-8F46-D44EA0EBFD2C}.Debug|x64.ActiveCfg = Debug|Any CPU - {EC652E03-DE93-48E6-8F46-D44EA0EBFD2C}.Debug|x64.Build.0 = Debug|Any CPU - {EC652E03-DE93-48E6-8F46-D44EA0EBFD2C}.Debug|x86.ActiveCfg = Debug|Any CPU - {EC652E03-DE93-48E6-8F46-D44EA0EBFD2C}.Debug|x86.Build.0 = Debug|Any CPU - {EC652E03-DE93-48E6-8F46-D44EA0EBFD2C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EC652E03-DE93-48E6-8F46-D44EA0EBFD2C}.Release|Any CPU.Build.0 = Release|Any CPU - {EC652E03-DE93-48E6-8F46-D44EA0EBFD2C}.Release|x64.ActiveCfg = Release|Any CPU - {EC652E03-DE93-48E6-8F46-D44EA0EBFD2C}.Release|x64.Build.0 = Release|Any CPU - {EC652E03-DE93-48E6-8F46-D44EA0EBFD2C}.Release|x86.ActiveCfg = Release|Any CPU - {EC652E03-DE93-48E6-8F46-D44EA0EBFD2C}.Release|x86.Build.0 = Release|Any CPU - {B271ABAC-531D-44F8-A3C1-DE91E4FB8B2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B271ABAC-531D-44F8-A3C1-DE91E4FB8B2B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B271ABAC-531D-44F8-A3C1-DE91E4FB8B2B}.Debug|x64.ActiveCfg = Debug|Any CPU - {B271ABAC-531D-44F8-A3C1-DE91E4FB8B2B}.Debug|x64.Build.0 = Debug|Any CPU - {B271ABAC-531D-44F8-A3C1-DE91E4FB8B2B}.Debug|x86.ActiveCfg = Debug|Any CPU - {B271ABAC-531D-44F8-A3C1-DE91E4FB8B2B}.Debug|x86.Build.0 = Debug|Any CPU - {B271ABAC-531D-44F8-A3C1-DE91E4FB8B2B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B271ABAC-531D-44F8-A3C1-DE91E4FB8B2B}.Release|Any CPU.Build.0 = Release|Any CPU - {B271ABAC-531D-44F8-A3C1-DE91E4FB8B2B}.Release|x64.ActiveCfg = Release|Any CPU - {B271ABAC-531D-44F8-A3C1-DE91E4FB8B2B}.Release|x64.Build.0 = Release|Any CPU - {B271ABAC-531D-44F8-A3C1-DE91E4FB8B2B}.Release|x86.ActiveCfg = Release|Any CPU - {B271ABAC-531D-44F8-A3C1-DE91E4FB8B2B}.Release|x86.Build.0 = Release|Any CPU - {D7A1ED59-115B-46B2-9FEB-C81F1291DF40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D7A1ED59-115B-46B2-9FEB-C81F1291DF40}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D7A1ED59-115B-46B2-9FEB-C81F1291DF40}.Debug|x64.ActiveCfg = Debug|Any CPU - {D7A1ED59-115B-46B2-9FEB-C81F1291DF40}.Debug|x64.Build.0 = Debug|Any CPU - {D7A1ED59-115B-46B2-9FEB-C81F1291DF40}.Debug|x86.ActiveCfg = Debug|Any CPU - {D7A1ED59-115B-46B2-9FEB-C81F1291DF40}.Debug|x86.Build.0 = Debug|Any CPU - {D7A1ED59-115B-46B2-9FEB-C81F1291DF40}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D7A1ED59-115B-46B2-9FEB-C81F1291DF40}.Release|Any CPU.Build.0 = Release|Any CPU - {D7A1ED59-115B-46B2-9FEB-C81F1291DF40}.Release|x64.ActiveCfg = Release|Any CPU - {D7A1ED59-115B-46B2-9FEB-C81F1291DF40}.Release|x64.Build.0 = Release|Any CPU - {D7A1ED59-115B-46B2-9FEB-C81F1291DF40}.Release|x86.ActiveCfg = Release|Any CPU - {D7A1ED59-115B-46B2-9FEB-C81F1291DF40}.Release|x86.Build.0 = Release|Any CPU {16CC09AA-6719-41A2-8F8D-6447DB53A662}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {16CC09AA-6719-41A2-8F8D-6447DB53A662}.Debug|Any CPU.Build.0 = Debug|Any CPU {16CC09AA-6719-41A2-8F8D-6447DB53A662}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1075,18 +859,6 @@ Global {A40DAFE0-CC32-41ED-8600-790957786B3F}.Release|x64.Build.0 = Release|Any CPU {A40DAFE0-CC32-41ED-8600-790957786B3F}.Release|x86.ActiveCfg = Release|Any CPU {A40DAFE0-CC32-41ED-8600-790957786B3F}.Release|x86.Build.0 = Release|Any CPU - {66195D0B-C425-436A-ABBA-AA512A25F89E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {66195D0B-C425-436A-ABBA-AA512A25F89E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {66195D0B-C425-436A-ABBA-AA512A25F89E}.Debug|x64.ActiveCfg = Debug|Any CPU - {66195D0B-C425-436A-ABBA-AA512A25F89E}.Debug|x64.Build.0 = Debug|Any CPU - {66195D0B-C425-436A-ABBA-AA512A25F89E}.Debug|x86.ActiveCfg = Debug|Any CPU - {66195D0B-C425-436A-ABBA-AA512A25F89E}.Debug|x86.Build.0 = Debug|Any CPU - {66195D0B-C425-436A-ABBA-AA512A25F89E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {66195D0B-C425-436A-ABBA-AA512A25F89E}.Release|Any CPU.Build.0 = Release|Any CPU - {66195D0B-C425-436A-ABBA-AA512A25F89E}.Release|x64.ActiveCfg = Release|Any CPU - {66195D0B-C425-436A-ABBA-AA512A25F89E}.Release|x64.Build.0 = Release|Any CPU - {66195D0B-C425-436A-ABBA-AA512A25F89E}.Release|x86.ActiveCfg = Release|Any CPU - {66195D0B-C425-436A-ABBA-AA512A25F89E}.Release|x86.Build.0 = Release|Any CPU {EF8779B2-A4E4-4D86-9328-5CFA6E4C482B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EF8779B2-A4E4-4D86-9328-5CFA6E4C482B}.Debug|Any CPU.Build.0 = Debug|Any CPU {EF8779B2-A4E4-4D86-9328-5CFA6E4C482B}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1111,18 +883,6 @@ Global {D264432C-9CC4-496C-BC9B-81AFDF059BEE}.Release|x64.Build.0 = Release|Any CPU {D264432C-9CC4-496C-BC9B-81AFDF059BEE}.Release|x86.ActiveCfg = Release|Any CPU {D264432C-9CC4-496C-BC9B-81AFDF059BEE}.Release|x86.Build.0 = Release|Any CPU - {FFB6C189-5FE6-425A-929F-22BA25A3C076}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FFB6C189-5FE6-425A-929F-22BA25A3C076}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FFB6C189-5FE6-425A-929F-22BA25A3C076}.Debug|x64.ActiveCfg = Debug|Any CPU - {FFB6C189-5FE6-425A-929F-22BA25A3C076}.Debug|x64.Build.0 = Debug|Any CPU - {FFB6C189-5FE6-425A-929F-22BA25A3C076}.Debug|x86.ActiveCfg = Debug|Any CPU - {FFB6C189-5FE6-425A-929F-22BA25A3C076}.Debug|x86.Build.0 = Debug|Any CPU - {FFB6C189-5FE6-425A-929F-22BA25A3C076}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FFB6C189-5FE6-425A-929F-22BA25A3C076}.Release|Any CPU.Build.0 = Release|Any CPU - {FFB6C189-5FE6-425A-929F-22BA25A3C076}.Release|x64.ActiveCfg = Release|Any CPU - {FFB6C189-5FE6-425A-929F-22BA25A3C076}.Release|x64.Build.0 = Release|Any CPU - {FFB6C189-5FE6-425A-929F-22BA25A3C076}.Release|x86.ActiveCfg = Release|Any CPU - {FFB6C189-5FE6-425A-929F-22BA25A3C076}.Release|x86.Build.0 = Release|Any CPU {2BF4E16C-0BCA-49F2-8AF7-EA68C2A0515B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2BF4E16C-0BCA-49F2-8AF7-EA68C2A0515B}.Debug|Any CPU.Build.0 = Debug|Any CPU {2BF4E16C-0BCA-49F2-8AF7-EA68C2A0515B}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1135,30 +895,6 @@ Global {2BF4E16C-0BCA-49F2-8AF7-EA68C2A0515B}.Release|x64.Build.0 = Release|Any CPU {2BF4E16C-0BCA-49F2-8AF7-EA68C2A0515B}.Release|x86.ActiveCfg = Release|Any CPU {2BF4E16C-0BCA-49F2-8AF7-EA68C2A0515B}.Release|x86.Build.0 = Release|Any CPU - {C6DC8FAF-2F7C-44B6-B832-3F8210C37EFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C6DC8FAF-2F7C-44B6-B832-3F8210C37EFD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C6DC8FAF-2F7C-44B6-B832-3F8210C37EFD}.Debug|x64.ActiveCfg = Debug|Any CPU - {C6DC8FAF-2F7C-44B6-B832-3F8210C37EFD}.Debug|x64.Build.0 = Debug|Any CPU - {C6DC8FAF-2F7C-44B6-B832-3F8210C37EFD}.Debug|x86.ActiveCfg = Debug|Any CPU - {C6DC8FAF-2F7C-44B6-B832-3F8210C37EFD}.Debug|x86.Build.0 = Debug|Any CPU - {C6DC8FAF-2F7C-44B6-B832-3F8210C37EFD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C6DC8FAF-2F7C-44B6-B832-3F8210C37EFD}.Release|Any CPU.Build.0 = Release|Any CPU - {C6DC8FAF-2F7C-44B6-B832-3F8210C37EFD}.Release|x64.ActiveCfg = Release|Any CPU - {C6DC8FAF-2F7C-44B6-B832-3F8210C37EFD}.Release|x64.Build.0 = Release|Any CPU - {C6DC8FAF-2F7C-44B6-B832-3F8210C37EFD}.Release|x86.ActiveCfg = Release|Any CPU - {C6DC8FAF-2F7C-44B6-B832-3F8210C37EFD}.Release|x86.Build.0 = Release|Any CPU - {C399B7E3-5A72-45DA-9450-D284F298E7F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C399B7E3-5A72-45DA-9450-D284F298E7F0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C399B7E3-5A72-45DA-9450-D284F298E7F0}.Debug|x64.ActiveCfg = Debug|Any CPU - {C399B7E3-5A72-45DA-9450-D284F298E7F0}.Debug|x64.Build.0 = Debug|Any CPU - {C399B7E3-5A72-45DA-9450-D284F298E7F0}.Debug|x86.ActiveCfg = Debug|Any CPU - {C399B7E3-5A72-45DA-9450-D284F298E7F0}.Debug|x86.Build.0 = Debug|Any CPU - {C399B7E3-5A72-45DA-9450-D284F298E7F0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C399B7E3-5A72-45DA-9450-D284F298E7F0}.Release|Any CPU.Build.0 = Release|Any CPU - {C399B7E3-5A72-45DA-9450-D284F298E7F0}.Release|x64.ActiveCfg = Release|Any CPU - {C399B7E3-5A72-45DA-9450-D284F298E7F0}.Release|x64.Build.0 = Release|Any CPU - {C399B7E3-5A72-45DA-9450-D284F298E7F0}.Release|x86.ActiveCfg = Release|Any CPU - {C399B7E3-5A72-45DA-9450-D284F298E7F0}.Release|x86.Build.0 = Release|Any CPU {D842D167-961A-4632-8886-959890559ABC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D842D167-961A-4632-8886-959890559ABC}.Debug|Any CPU.Build.0 = Debug|Any CPU {D842D167-961A-4632-8886-959890559ABC}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1171,18 +907,6 @@ Global {D842D167-961A-4632-8886-959890559ABC}.Release|x64.Build.0 = Release|Any CPU {D842D167-961A-4632-8886-959890559ABC}.Release|x86.ActiveCfg = Release|Any CPU {D842D167-961A-4632-8886-959890559ABC}.Release|x86.Build.0 = Release|Any CPU - {73C3D493-3626-47D8-ABD3-AAC83C4BD8E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {73C3D493-3626-47D8-ABD3-AAC83C4BD8E2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {73C3D493-3626-47D8-ABD3-AAC83C4BD8E2}.Debug|x64.ActiveCfg = Debug|Any CPU - {73C3D493-3626-47D8-ABD3-AAC83C4BD8E2}.Debug|x64.Build.0 = Debug|Any CPU - {73C3D493-3626-47D8-ABD3-AAC83C4BD8E2}.Debug|x86.ActiveCfg = Debug|Any CPU - {73C3D493-3626-47D8-ABD3-AAC83C4BD8E2}.Debug|x86.Build.0 = Debug|Any CPU - {73C3D493-3626-47D8-ABD3-AAC83C4BD8E2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {73C3D493-3626-47D8-ABD3-AAC83C4BD8E2}.Release|Any CPU.Build.0 = Release|Any CPU - {73C3D493-3626-47D8-ABD3-AAC83C4BD8E2}.Release|x64.ActiveCfg = Release|Any CPU - {73C3D493-3626-47D8-ABD3-AAC83C4BD8E2}.Release|x64.Build.0 = Release|Any CPU - {73C3D493-3626-47D8-ABD3-AAC83C4BD8E2}.Release|x86.ActiveCfg = Release|Any CPU - {73C3D493-3626-47D8-ABD3-AAC83C4BD8E2}.Release|x86.Build.0 = Release|Any CPU {D8737EF1-E976-42F9-B183-1812EB5EF3AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D8737EF1-E976-42F9-B183-1812EB5EF3AC}.Debug|Any CPU.Build.0 = Debug|Any CPU {D8737EF1-E976-42F9-B183-1812EB5EF3AC}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1195,18 +919,6 @@ Global {D8737EF1-E976-42F9-B183-1812EB5EF3AC}.Release|x64.Build.0 = Release|Any CPU {D8737EF1-E976-42F9-B183-1812EB5EF3AC}.Release|x86.ActiveCfg = Release|Any CPU {D8737EF1-E976-42F9-B183-1812EB5EF3AC}.Release|x86.Build.0 = Release|Any CPU - {3CA6E8DF-AF0C-453E-9361-B9EE207DC5BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3CA6E8DF-AF0C-453E-9361-B9EE207DC5BA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3CA6E8DF-AF0C-453E-9361-B9EE207DC5BA}.Debug|x64.ActiveCfg = Debug|Any CPU - {3CA6E8DF-AF0C-453E-9361-B9EE207DC5BA}.Debug|x64.Build.0 = Debug|Any CPU - {3CA6E8DF-AF0C-453E-9361-B9EE207DC5BA}.Debug|x86.ActiveCfg = Debug|Any CPU - {3CA6E8DF-AF0C-453E-9361-B9EE207DC5BA}.Debug|x86.Build.0 = Debug|Any CPU - {3CA6E8DF-AF0C-453E-9361-B9EE207DC5BA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3CA6E8DF-AF0C-453E-9361-B9EE207DC5BA}.Release|Any CPU.Build.0 = Release|Any CPU - {3CA6E8DF-AF0C-453E-9361-B9EE207DC5BA}.Release|x64.ActiveCfg = Release|Any CPU - {3CA6E8DF-AF0C-453E-9361-B9EE207DC5BA}.Release|x64.Build.0 = Release|Any CPU - {3CA6E8DF-AF0C-453E-9361-B9EE207DC5BA}.Release|x86.ActiveCfg = Release|Any CPU - {3CA6E8DF-AF0C-453E-9361-B9EE207DC5BA}.Release|x86.Build.0 = Release|Any CPU {FC2D4CBB-B81B-403B-BCD7-E7E0B3644EDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FC2D4CBB-B81B-403B-BCD7-E7E0B3644EDB}.Debug|Any CPU.Build.0 = Debug|Any CPU {FC2D4CBB-B81B-403B-BCD7-E7E0B3644EDB}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1219,18 +931,6 @@ Global {FC2D4CBB-B81B-403B-BCD7-E7E0B3644EDB}.Release|x64.Build.0 = Release|Any CPU {FC2D4CBB-B81B-403B-BCD7-E7E0B3644EDB}.Release|x86.ActiveCfg = Release|Any CPU {FC2D4CBB-B81B-403B-BCD7-E7E0B3644EDB}.Release|x86.Build.0 = Release|Any CPU - {45266E18-8EBA-41C3-AAE6-AC737A640E0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {45266E18-8EBA-41C3-AAE6-AC737A640E0D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {45266E18-8EBA-41C3-AAE6-AC737A640E0D}.Debug|x64.ActiveCfg = Debug|Any CPU - {45266E18-8EBA-41C3-AAE6-AC737A640E0D}.Debug|x64.Build.0 = Debug|Any CPU - {45266E18-8EBA-41C3-AAE6-AC737A640E0D}.Debug|x86.ActiveCfg = Debug|Any CPU - {45266E18-8EBA-41C3-AAE6-AC737A640E0D}.Debug|x86.Build.0 = Debug|Any CPU - {45266E18-8EBA-41C3-AAE6-AC737A640E0D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {45266E18-8EBA-41C3-AAE6-AC737A640E0D}.Release|Any CPU.Build.0 = Release|Any CPU - {45266E18-8EBA-41C3-AAE6-AC737A640E0D}.Release|x64.ActiveCfg = Release|Any CPU - {45266E18-8EBA-41C3-AAE6-AC737A640E0D}.Release|x64.Build.0 = Release|Any CPU - {45266E18-8EBA-41C3-AAE6-AC737A640E0D}.Release|x86.ActiveCfg = Release|Any CPU - {45266E18-8EBA-41C3-AAE6-AC737A640E0D}.Release|x86.Build.0 = Release|Any CPU {193DC9F9-E972-4E70-A137-717571603DEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {193DC9F9-E972-4E70-A137-717571603DEB}.Debug|Any CPU.Build.0 = Debug|Any CPU {193DC9F9-E972-4E70-A137-717571603DEB}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1255,18 +955,6 @@ Global {6F069A41-9187-4C48-AC02-F387B8319AF7}.Release|x64.Build.0 = Release|Any CPU {6F069A41-9187-4C48-AC02-F387B8319AF7}.Release|x86.ActiveCfg = Release|Any CPU {6F069A41-9187-4C48-AC02-F387B8319AF7}.Release|x86.Build.0 = Release|Any CPU - {FD44E0D2-EE92-450D-AEB9-BA87C8174122}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FD44E0D2-EE92-450D-AEB9-BA87C8174122}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FD44E0D2-EE92-450D-AEB9-BA87C8174122}.Debug|x64.ActiveCfg = Debug|Any CPU - {FD44E0D2-EE92-450D-AEB9-BA87C8174122}.Debug|x64.Build.0 = Debug|Any CPU - {FD44E0D2-EE92-450D-AEB9-BA87C8174122}.Debug|x86.ActiveCfg = Debug|Any CPU - {FD44E0D2-EE92-450D-AEB9-BA87C8174122}.Debug|x86.Build.0 = Debug|Any CPU - {FD44E0D2-EE92-450D-AEB9-BA87C8174122}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FD44E0D2-EE92-450D-AEB9-BA87C8174122}.Release|Any CPU.Build.0 = Release|Any CPU - {FD44E0D2-EE92-450D-AEB9-BA87C8174122}.Release|x64.ActiveCfg = Release|Any CPU - {FD44E0D2-EE92-450D-AEB9-BA87C8174122}.Release|x64.Build.0 = Release|Any CPU - {FD44E0D2-EE92-450D-AEB9-BA87C8174122}.Release|x86.ActiveCfg = Release|Any CPU - {FD44E0D2-EE92-450D-AEB9-BA87C8174122}.Release|x86.Build.0 = Release|Any CPU {3B0EFBF8-E424-44CD-B34B-35DCF9F5284B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3B0EFBF8-E424-44CD-B34B-35DCF9F5284B}.Debug|Any CPU.Build.0 = Debug|Any CPU {3B0EFBF8-E424-44CD-B34B-35DCF9F5284B}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1279,18 +967,6 @@ Global {3B0EFBF8-E424-44CD-B34B-35DCF9F5284B}.Release|x64.Build.0 = Release|Any CPU {3B0EFBF8-E424-44CD-B34B-35DCF9F5284B}.Release|x86.ActiveCfg = Release|Any CPU {3B0EFBF8-E424-44CD-B34B-35DCF9F5284B}.Release|x86.Build.0 = Release|Any CPU - {308F48A3-B8F7-4859-9583-9F6975133391}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {308F48A3-B8F7-4859-9583-9F6975133391}.Debug|Any CPU.Build.0 = Debug|Any CPU - {308F48A3-B8F7-4859-9583-9F6975133391}.Debug|x64.ActiveCfg = Debug|Any CPU - {308F48A3-B8F7-4859-9583-9F6975133391}.Debug|x64.Build.0 = Debug|Any CPU - {308F48A3-B8F7-4859-9583-9F6975133391}.Debug|x86.ActiveCfg = Debug|Any CPU - {308F48A3-B8F7-4859-9583-9F6975133391}.Debug|x86.Build.0 = Debug|Any CPU - {308F48A3-B8F7-4859-9583-9F6975133391}.Release|Any CPU.ActiveCfg = Release|Any CPU - {308F48A3-B8F7-4859-9583-9F6975133391}.Release|Any CPU.Build.0 = Release|Any CPU - {308F48A3-B8F7-4859-9583-9F6975133391}.Release|x64.ActiveCfg = Release|Any CPU - {308F48A3-B8F7-4859-9583-9F6975133391}.Release|x64.Build.0 = Release|Any CPU - {308F48A3-B8F7-4859-9583-9F6975133391}.Release|x86.ActiveCfg = Release|Any CPU - {308F48A3-B8F7-4859-9583-9F6975133391}.Release|x86.Build.0 = Release|Any CPU {659C28C4-3CE9-48C1-B16F-4ECD7674C135}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {659C28C4-3CE9-48C1-B16F-4ECD7674C135}.Debug|Any CPU.Build.0 = Debug|Any CPU {659C28C4-3CE9-48C1-B16F-4ECD7674C135}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1303,18 +979,6 @@ Global {659C28C4-3CE9-48C1-B16F-4ECD7674C135}.Release|x64.Build.0 = Release|Any CPU {659C28C4-3CE9-48C1-B16F-4ECD7674C135}.Release|x86.ActiveCfg = Release|Any CPU {659C28C4-3CE9-48C1-B16F-4ECD7674C135}.Release|x86.Build.0 = Release|Any CPU - {F8C7CBD6-3788-49EE-B278-7787D1A87E21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F8C7CBD6-3788-49EE-B278-7787D1A87E21}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F8C7CBD6-3788-49EE-B278-7787D1A87E21}.Debug|x64.ActiveCfg = Debug|Any CPU - {F8C7CBD6-3788-49EE-B278-7787D1A87E21}.Debug|x64.Build.0 = Debug|Any CPU - {F8C7CBD6-3788-49EE-B278-7787D1A87E21}.Debug|x86.ActiveCfg = Debug|Any CPU - {F8C7CBD6-3788-49EE-B278-7787D1A87E21}.Debug|x86.Build.0 = Debug|Any CPU - {F8C7CBD6-3788-49EE-B278-7787D1A87E21}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F8C7CBD6-3788-49EE-B278-7787D1A87E21}.Release|Any CPU.Build.0 = Release|Any CPU - {F8C7CBD6-3788-49EE-B278-7787D1A87E21}.Release|x64.ActiveCfg = Release|Any CPU - {F8C7CBD6-3788-49EE-B278-7787D1A87E21}.Release|x64.Build.0 = Release|Any CPU - {F8C7CBD6-3788-49EE-B278-7787D1A87E21}.Release|x86.ActiveCfg = Release|Any CPU - {F8C7CBD6-3788-49EE-B278-7787D1A87E21}.Release|x86.Build.0 = Release|Any CPU {E05FD627-EE38-470D-A112-71AE23B7C390}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E05FD627-EE38-470D-A112-71AE23B7C390}.Debug|Any CPU.Build.0 = Debug|Any CPU {E05FD627-EE38-470D-A112-71AE23B7C390}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1327,18 +991,6 @@ Global {E05FD627-EE38-470D-A112-71AE23B7C390}.Release|x64.Build.0 = Release|Any CPU {E05FD627-EE38-470D-A112-71AE23B7C390}.Release|x86.ActiveCfg = Release|Any CPU {E05FD627-EE38-470D-A112-71AE23B7C390}.Release|x86.Build.0 = Release|Any CPU - {AC605855-F7B7-4A98-A9C6-4DC3D6ECB958}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AC605855-F7B7-4A98-A9C6-4DC3D6ECB958}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AC605855-F7B7-4A98-A9C6-4DC3D6ECB958}.Debug|x64.ActiveCfg = Debug|Any CPU - {AC605855-F7B7-4A98-A9C6-4DC3D6ECB958}.Debug|x64.Build.0 = Debug|Any CPU - {AC605855-F7B7-4A98-A9C6-4DC3D6ECB958}.Debug|x86.ActiveCfg = Debug|Any CPU - {AC605855-F7B7-4A98-A9C6-4DC3D6ECB958}.Debug|x86.Build.0 = Debug|Any CPU - {AC605855-F7B7-4A98-A9C6-4DC3D6ECB958}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AC605855-F7B7-4A98-A9C6-4DC3D6ECB958}.Release|Any CPU.Build.0 = Release|Any CPU - {AC605855-F7B7-4A98-A9C6-4DC3D6ECB958}.Release|x64.ActiveCfg = Release|Any CPU - {AC605855-F7B7-4A98-A9C6-4DC3D6ECB958}.Release|x64.Build.0 = Release|Any CPU - {AC605855-F7B7-4A98-A9C6-4DC3D6ECB958}.Release|x86.ActiveCfg = Release|Any CPU - {AC605855-F7B7-4A98-A9C6-4DC3D6ECB958}.Release|x86.Build.0 = Release|Any CPU {DEC8DD3D-E7C2-4205-BB92-F5EB55F7EA39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DEC8DD3D-E7C2-4205-BB92-F5EB55F7EA39}.Debug|Any CPU.Build.0 = Debug|Any CPU {DEC8DD3D-E7C2-4205-BB92-F5EB55F7EA39}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1351,18 +1003,6 @@ Global {DEC8DD3D-E7C2-4205-BB92-F5EB55F7EA39}.Release|x64.Build.0 = Release|Any CPU {DEC8DD3D-E7C2-4205-BB92-F5EB55F7EA39}.Release|x86.ActiveCfg = Release|Any CPU {DEC8DD3D-E7C2-4205-BB92-F5EB55F7EA39}.Release|x86.Build.0 = Release|Any CPU - {50F18FB9-E213-4FDA-B99B-6CB3974E81B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {50F18FB9-E213-4FDA-B99B-6CB3974E81B7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {50F18FB9-E213-4FDA-B99B-6CB3974E81B7}.Debug|x64.ActiveCfg = Debug|Any CPU - {50F18FB9-E213-4FDA-B99B-6CB3974E81B7}.Debug|x64.Build.0 = Debug|Any CPU - {50F18FB9-E213-4FDA-B99B-6CB3974E81B7}.Debug|x86.ActiveCfg = Debug|Any CPU - {50F18FB9-E213-4FDA-B99B-6CB3974E81B7}.Debug|x86.Build.0 = Debug|Any CPU - {50F18FB9-E213-4FDA-B99B-6CB3974E81B7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {50F18FB9-E213-4FDA-B99B-6CB3974E81B7}.Release|Any CPU.Build.0 = Release|Any CPU - {50F18FB9-E213-4FDA-B99B-6CB3974E81B7}.Release|x64.ActiveCfg = Release|Any CPU - {50F18FB9-E213-4FDA-B99B-6CB3974E81B7}.Release|x64.Build.0 = Release|Any CPU - {50F18FB9-E213-4FDA-B99B-6CB3974E81B7}.Release|x86.ActiveCfg = Release|Any CPU - {50F18FB9-E213-4FDA-B99B-6CB3974E81B7}.Release|x86.Build.0 = Release|Any CPU {B0923D0C-DC61-41FF-88B7-49D6679E1075}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B0923D0C-DC61-41FF-88B7-49D6679E1075}.Debug|Any CPU.Build.0 = Debug|Any CPU {B0923D0C-DC61-41FF-88B7-49D6679E1075}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1375,18 +1015,6 @@ Global {B0923D0C-DC61-41FF-88B7-49D6679E1075}.Release|x64.Build.0 = Release|Any CPU {B0923D0C-DC61-41FF-88B7-49D6679E1075}.Release|x86.ActiveCfg = Release|Any CPU {B0923D0C-DC61-41FF-88B7-49D6679E1075}.Release|x86.Build.0 = Release|Any CPU - {D553F21C-D561-484A-ACA7-78DC1D9C8589}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D553F21C-D561-484A-ACA7-78DC1D9C8589}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D553F21C-D561-484A-ACA7-78DC1D9C8589}.Debug|x64.ActiveCfg = Debug|Any CPU - {D553F21C-D561-484A-ACA7-78DC1D9C8589}.Debug|x64.Build.0 = Debug|Any CPU - {D553F21C-D561-484A-ACA7-78DC1D9C8589}.Debug|x86.ActiveCfg = Debug|Any CPU - {D553F21C-D561-484A-ACA7-78DC1D9C8589}.Debug|x86.Build.0 = Debug|Any CPU - {D553F21C-D561-484A-ACA7-78DC1D9C8589}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D553F21C-D561-484A-ACA7-78DC1D9C8589}.Release|Any CPU.Build.0 = Release|Any CPU - {D553F21C-D561-484A-ACA7-78DC1D9C8589}.Release|x64.ActiveCfg = Release|Any CPU - {D553F21C-D561-484A-ACA7-78DC1D9C8589}.Release|x64.Build.0 = Release|Any CPU - {D553F21C-D561-484A-ACA7-78DC1D9C8589}.Release|x86.ActiveCfg = Release|Any CPU - {D553F21C-D561-484A-ACA7-78DC1D9C8589}.Release|x86.Build.0 = Release|Any CPU {DFEDFB6D-5709-45B1-BCBF-F1B978535F80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DFEDFB6D-5709-45B1-BCBF-F1B978535F80}.Debug|Any CPU.Build.0 = Debug|Any CPU {DFEDFB6D-5709-45B1-BCBF-F1B978535F80}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1399,18 +1027,6 @@ Global {DFEDFB6D-5709-45B1-BCBF-F1B978535F80}.Release|x64.Build.0 = Release|Any CPU {DFEDFB6D-5709-45B1-BCBF-F1B978535F80}.Release|x86.ActiveCfg = Release|Any CPU {DFEDFB6D-5709-45B1-BCBF-F1B978535F80}.Release|x86.Build.0 = Release|Any CPU - {9A89F2D4-29AD-4747-905A-1FE7A3D181B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9A89F2D4-29AD-4747-905A-1FE7A3D181B3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9A89F2D4-29AD-4747-905A-1FE7A3D181B3}.Debug|x64.ActiveCfg = Debug|Any CPU - {9A89F2D4-29AD-4747-905A-1FE7A3D181B3}.Debug|x64.Build.0 = Debug|Any CPU - {9A89F2D4-29AD-4747-905A-1FE7A3D181B3}.Debug|x86.ActiveCfg = Debug|Any CPU - {9A89F2D4-29AD-4747-905A-1FE7A3D181B3}.Debug|x86.Build.0 = Debug|Any CPU - {9A89F2D4-29AD-4747-905A-1FE7A3D181B3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9A89F2D4-29AD-4747-905A-1FE7A3D181B3}.Release|Any CPU.Build.0 = Release|Any CPU - {9A89F2D4-29AD-4747-905A-1FE7A3D181B3}.Release|x64.ActiveCfg = Release|Any CPU - {9A89F2D4-29AD-4747-905A-1FE7A3D181B3}.Release|x64.Build.0 = Release|Any CPU - {9A89F2D4-29AD-4747-905A-1FE7A3D181B3}.Release|x86.ActiveCfg = Release|Any CPU - {9A89F2D4-29AD-4747-905A-1FE7A3D181B3}.Release|x86.Build.0 = Release|Any CPU {E4BF4425-A857-4A19-B83B-960743FA53C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E4BF4425-A857-4A19-B83B-960743FA53C5}.Debug|Any CPU.Build.0 = Debug|Any CPU {E4BF4425-A857-4A19-B83B-960743FA53C5}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1423,18 +1039,6 @@ Global {E4BF4425-A857-4A19-B83B-960743FA53C5}.Release|x64.Build.0 = Release|Any CPU {E4BF4425-A857-4A19-B83B-960743FA53C5}.Release|x86.ActiveCfg = Release|Any CPU {E4BF4425-A857-4A19-B83B-960743FA53C5}.Release|x86.Build.0 = Release|Any CPU - {BDC7398B-EFE3-443F-BD49-6658C892C8CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BDC7398B-EFE3-443F-BD49-6658C892C8CA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BDC7398B-EFE3-443F-BD49-6658C892C8CA}.Debug|x64.ActiveCfg = Debug|Any CPU - {BDC7398B-EFE3-443F-BD49-6658C892C8CA}.Debug|x64.Build.0 = Debug|Any CPU - {BDC7398B-EFE3-443F-BD49-6658C892C8CA}.Debug|x86.ActiveCfg = Debug|Any CPU - {BDC7398B-EFE3-443F-BD49-6658C892C8CA}.Debug|x86.Build.0 = Debug|Any CPU - {BDC7398B-EFE3-443F-BD49-6658C892C8CA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BDC7398B-EFE3-443F-BD49-6658C892C8CA}.Release|Any CPU.Build.0 = Release|Any CPU - {BDC7398B-EFE3-443F-BD49-6658C892C8CA}.Release|x64.ActiveCfg = Release|Any CPU - {BDC7398B-EFE3-443F-BD49-6658C892C8CA}.Release|x64.Build.0 = Release|Any CPU - {BDC7398B-EFE3-443F-BD49-6658C892C8CA}.Release|x86.ActiveCfg = Release|Any CPU - {BDC7398B-EFE3-443F-BD49-6658C892C8CA}.Release|x86.Build.0 = Release|Any CPU {B35BA5D1-80E9-43E9-820A-FA5F80B95A03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B35BA5D1-80E9-43E9-820A-FA5F80B95A03}.Debug|Any CPU.Build.0 = Debug|Any CPU {B35BA5D1-80E9-43E9-820A-FA5F80B95A03}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1447,18 +1051,6 @@ Global {B35BA5D1-80E9-43E9-820A-FA5F80B95A03}.Release|x64.Build.0 = Release|Any CPU {B35BA5D1-80E9-43E9-820A-FA5F80B95A03}.Release|x86.ActiveCfg = Release|Any CPU {B35BA5D1-80E9-43E9-820A-FA5F80B95A03}.Release|x86.Build.0 = Release|Any CPU - {712C8147-6F50-488E-98FB-8E8EC49DEFC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {712C8147-6F50-488E-98FB-8E8EC49DEFC6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {712C8147-6F50-488E-98FB-8E8EC49DEFC6}.Debug|x64.ActiveCfg = Debug|Any CPU - {712C8147-6F50-488E-98FB-8E8EC49DEFC6}.Debug|x64.Build.0 = Debug|Any CPU - {712C8147-6F50-488E-98FB-8E8EC49DEFC6}.Debug|x86.ActiveCfg = Debug|Any CPU - {712C8147-6F50-488E-98FB-8E8EC49DEFC6}.Debug|x86.Build.0 = Debug|Any CPU - {712C8147-6F50-488E-98FB-8E8EC49DEFC6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {712C8147-6F50-488E-98FB-8E8EC49DEFC6}.Release|Any CPU.Build.0 = Release|Any CPU - {712C8147-6F50-488E-98FB-8E8EC49DEFC6}.Release|x64.ActiveCfg = Release|Any CPU - {712C8147-6F50-488E-98FB-8E8EC49DEFC6}.Release|x64.Build.0 = Release|Any CPU - {712C8147-6F50-488E-98FB-8E8EC49DEFC6}.Release|x86.ActiveCfg = Release|Any CPU - {712C8147-6F50-488E-98FB-8E8EC49DEFC6}.Release|x86.Build.0 = Release|Any CPU {0CB8FA7E-8DD0-43CB-BE05-AD02565C62B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0CB8FA7E-8DD0-43CB-BE05-AD02565C62B7}.Debug|Any CPU.Build.0 = Debug|Any CPU {0CB8FA7E-8DD0-43CB-BE05-AD02565C62B7}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1471,18 +1063,6 @@ Global {0CB8FA7E-8DD0-43CB-BE05-AD02565C62B7}.Release|x64.Build.0 = Release|Any CPU {0CB8FA7E-8DD0-43CB-BE05-AD02565C62B7}.Release|x86.ActiveCfg = Release|Any CPU {0CB8FA7E-8DD0-43CB-BE05-AD02565C62B7}.Release|x86.Build.0 = Release|Any CPU - {A42EDE1A-59B0-4B1B-B06B-E2999180EDE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A42EDE1A-59B0-4B1B-B06B-E2999180EDE2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A42EDE1A-59B0-4B1B-B06B-E2999180EDE2}.Debug|x64.ActiveCfg = Debug|Any CPU - {A42EDE1A-59B0-4B1B-B06B-E2999180EDE2}.Debug|x64.Build.0 = Debug|Any CPU - {A42EDE1A-59B0-4B1B-B06B-E2999180EDE2}.Debug|x86.ActiveCfg = Debug|Any CPU - {A42EDE1A-59B0-4B1B-B06B-E2999180EDE2}.Debug|x86.Build.0 = Debug|Any CPU - {A42EDE1A-59B0-4B1B-B06B-E2999180EDE2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A42EDE1A-59B0-4B1B-B06B-E2999180EDE2}.Release|Any CPU.Build.0 = Release|Any CPU - {A42EDE1A-59B0-4B1B-B06B-E2999180EDE2}.Release|x64.ActiveCfg = Release|Any CPU - {A42EDE1A-59B0-4B1B-B06B-E2999180EDE2}.Release|x64.Build.0 = Release|Any CPU - {A42EDE1A-59B0-4B1B-B06B-E2999180EDE2}.Release|x86.ActiveCfg = Release|Any CPU - {A42EDE1A-59B0-4B1B-B06B-E2999180EDE2}.Release|x86.Build.0 = Release|Any CPU {0F6E846E-2832-4202-9442-B5F495F2D057}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0F6E846E-2832-4202-9442-B5F495F2D057}.Debug|Any CPU.Build.0 = Debug|Any CPU {0F6E846E-2832-4202-9442-B5F495F2D057}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1495,54 +1075,6 @@ Global {0F6E846E-2832-4202-9442-B5F495F2D057}.Release|x64.Build.0 = Release|Any CPU {0F6E846E-2832-4202-9442-B5F495F2D057}.Release|x86.ActiveCfg = Release|Any CPU {0F6E846E-2832-4202-9442-B5F495F2D057}.Release|x86.Build.0 = Release|Any CPU - {6C92A8D0-0F6F-4BEB-B242-19D04F173694}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6C92A8D0-0F6F-4BEB-B242-19D04F173694}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6C92A8D0-0F6F-4BEB-B242-19D04F173694}.Debug|x64.ActiveCfg = Debug|Any CPU - {6C92A8D0-0F6F-4BEB-B242-19D04F173694}.Debug|x64.Build.0 = Debug|Any CPU - {6C92A8D0-0F6F-4BEB-B242-19D04F173694}.Debug|x86.ActiveCfg = Debug|Any CPU - {6C92A8D0-0F6F-4BEB-B242-19D04F173694}.Debug|x86.Build.0 = Debug|Any CPU - {6C92A8D0-0F6F-4BEB-B242-19D04F173694}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6C92A8D0-0F6F-4BEB-B242-19D04F173694}.Release|Any CPU.Build.0 = Release|Any CPU - {6C92A8D0-0F6F-4BEB-B242-19D04F173694}.Release|x64.ActiveCfg = Release|Any CPU - {6C92A8D0-0F6F-4BEB-B242-19D04F173694}.Release|x64.Build.0 = Release|Any CPU - {6C92A8D0-0F6F-4BEB-B242-19D04F173694}.Release|x86.ActiveCfg = Release|Any CPU - {6C92A8D0-0F6F-4BEB-B242-19D04F173694}.Release|x86.Build.0 = Release|Any CPU - {DFDAE3C3-FE5B-43FC-B71D-23E656B5190B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DFDAE3C3-FE5B-43FC-B71D-23E656B5190B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DFDAE3C3-FE5B-43FC-B71D-23E656B5190B}.Debug|x64.ActiveCfg = Debug|Any CPU - {DFDAE3C3-FE5B-43FC-B71D-23E656B5190B}.Debug|x64.Build.0 = Debug|Any CPU - {DFDAE3C3-FE5B-43FC-B71D-23E656B5190B}.Debug|x86.ActiveCfg = Debug|Any CPU - {DFDAE3C3-FE5B-43FC-B71D-23E656B5190B}.Debug|x86.Build.0 = Debug|Any CPU - {DFDAE3C3-FE5B-43FC-B71D-23E656B5190B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DFDAE3C3-FE5B-43FC-B71D-23E656B5190B}.Release|Any CPU.Build.0 = Release|Any CPU - {DFDAE3C3-FE5B-43FC-B71D-23E656B5190B}.Release|x64.ActiveCfg = Release|Any CPU - {DFDAE3C3-FE5B-43FC-B71D-23E656B5190B}.Release|x64.Build.0 = Release|Any CPU - {DFDAE3C3-FE5B-43FC-B71D-23E656B5190B}.Release|x86.ActiveCfg = Release|Any CPU - {DFDAE3C3-FE5B-43FC-B71D-23E656B5190B}.Release|x86.Build.0 = Release|Any CPU - {B43D2E6E-E197-49A9-9577-F8AF9EB903C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B43D2E6E-E197-49A9-9577-F8AF9EB903C0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B43D2E6E-E197-49A9-9577-F8AF9EB903C0}.Debug|x64.ActiveCfg = Debug|Any CPU - {B43D2E6E-E197-49A9-9577-F8AF9EB903C0}.Debug|x64.Build.0 = Debug|Any CPU - {B43D2E6E-E197-49A9-9577-F8AF9EB903C0}.Debug|x86.ActiveCfg = Debug|Any CPU - {B43D2E6E-E197-49A9-9577-F8AF9EB903C0}.Debug|x86.Build.0 = Debug|Any CPU - {B43D2E6E-E197-49A9-9577-F8AF9EB903C0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B43D2E6E-E197-49A9-9577-F8AF9EB903C0}.Release|Any CPU.Build.0 = Release|Any CPU - {B43D2E6E-E197-49A9-9577-F8AF9EB903C0}.Release|x64.ActiveCfg = Release|Any CPU - {B43D2E6E-E197-49A9-9577-F8AF9EB903C0}.Release|x64.Build.0 = Release|Any CPU - {B43D2E6E-E197-49A9-9577-F8AF9EB903C0}.Release|x86.ActiveCfg = Release|Any CPU - {B43D2E6E-E197-49A9-9577-F8AF9EB903C0}.Release|x86.Build.0 = Release|Any CPU - {2F119C97-4FDC-43F3-8C25-906294C1FF0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2F119C97-4FDC-43F3-8C25-906294C1FF0C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2F119C97-4FDC-43F3-8C25-906294C1FF0C}.Debug|x64.ActiveCfg = Debug|Any CPU - {2F119C97-4FDC-43F3-8C25-906294C1FF0C}.Debug|x64.Build.0 = Debug|Any CPU - {2F119C97-4FDC-43F3-8C25-906294C1FF0C}.Debug|x86.ActiveCfg = Debug|Any CPU - {2F119C97-4FDC-43F3-8C25-906294C1FF0C}.Debug|x86.Build.0 = Debug|Any CPU - {2F119C97-4FDC-43F3-8C25-906294C1FF0C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2F119C97-4FDC-43F3-8C25-906294C1FF0C}.Release|Any CPU.Build.0 = Release|Any CPU - {2F119C97-4FDC-43F3-8C25-906294C1FF0C}.Release|x64.ActiveCfg = Release|Any CPU - {2F119C97-4FDC-43F3-8C25-906294C1FF0C}.Release|x64.Build.0 = Release|Any CPU - {2F119C97-4FDC-43F3-8C25-906294C1FF0C}.Release|x86.ActiveCfg = Release|Any CPU - {2F119C97-4FDC-43F3-8C25-906294C1FF0C}.Release|x86.Build.0 = Release|Any CPU {0FAA6A94-E11B-405B-8EA8-0025D8304EA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0FAA6A94-E11B-405B-8EA8-0025D8304EA7}.Debug|Any CPU.Build.0 = Debug|Any CPU {0FAA6A94-E11B-405B-8EA8-0025D8304EA7}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1555,18 +1087,6 @@ Global {0FAA6A94-E11B-405B-8EA8-0025D8304EA7}.Release|x64.Build.0 = Release|Any CPU {0FAA6A94-E11B-405B-8EA8-0025D8304EA7}.Release|x86.ActiveCfg = Release|Any CPU {0FAA6A94-E11B-405B-8EA8-0025D8304EA7}.Release|x86.Build.0 = Release|Any CPU - {78560140-8F73-4E6B-A7F8-CB2DA756EB1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {78560140-8F73-4E6B-A7F8-CB2DA756EB1B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {78560140-8F73-4E6B-A7F8-CB2DA756EB1B}.Debug|x64.ActiveCfg = Debug|Any CPU - {78560140-8F73-4E6B-A7F8-CB2DA756EB1B}.Debug|x64.Build.0 = Debug|Any CPU - {78560140-8F73-4E6B-A7F8-CB2DA756EB1B}.Debug|x86.ActiveCfg = Debug|Any CPU - {78560140-8F73-4E6B-A7F8-CB2DA756EB1B}.Debug|x86.Build.0 = Debug|Any CPU - {78560140-8F73-4E6B-A7F8-CB2DA756EB1B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {78560140-8F73-4E6B-A7F8-CB2DA756EB1B}.Release|Any CPU.Build.0 = Release|Any CPU - {78560140-8F73-4E6B-A7F8-CB2DA756EB1B}.Release|x64.ActiveCfg = Release|Any CPU - {78560140-8F73-4E6B-A7F8-CB2DA756EB1B}.Release|x64.Build.0 = Release|Any CPU - {78560140-8F73-4E6B-A7F8-CB2DA756EB1B}.Release|x86.ActiveCfg = Release|Any CPU - {78560140-8F73-4E6B-A7F8-CB2DA756EB1B}.Release|x86.Build.0 = Release|Any CPU {64BA9455-0E0E-464F-800A-C3C5DCED40ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64BA9455-0E0E-464F-800A-C3C5DCED40ED}.Debug|Any CPU.Build.0 = Debug|Any CPU {64BA9455-0E0E-464F-800A-C3C5DCED40ED}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1579,30 +1099,6 @@ Global {64BA9455-0E0E-464F-800A-C3C5DCED40ED}.Release|x64.Build.0 = Release|Any CPU {64BA9455-0E0E-464F-800A-C3C5DCED40ED}.Release|x86.ActiveCfg = Release|Any CPU {64BA9455-0E0E-464F-800A-C3C5DCED40ED}.Release|x86.Build.0 = Release|Any CPU - {1C09DF05-D227-4FBB-908C-24F5755A0780}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1C09DF05-D227-4FBB-908C-24F5755A0780}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1C09DF05-D227-4FBB-908C-24F5755A0780}.Debug|x64.ActiveCfg = Debug|Any CPU - {1C09DF05-D227-4FBB-908C-24F5755A0780}.Debug|x64.Build.0 = Debug|Any CPU - {1C09DF05-D227-4FBB-908C-24F5755A0780}.Debug|x86.ActiveCfg = Debug|Any CPU - {1C09DF05-D227-4FBB-908C-24F5755A0780}.Debug|x86.Build.0 = Debug|Any CPU - {1C09DF05-D227-4FBB-908C-24F5755A0780}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1C09DF05-D227-4FBB-908C-24F5755A0780}.Release|Any CPU.Build.0 = Release|Any CPU - {1C09DF05-D227-4FBB-908C-24F5755A0780}.Release|x64.ActiveCfg = Release|Any CPU - {1C09DF05-D227-4FBB-908C-24F5755A0780}.Release|x64.Build.0 = Release|Any CPU - {1C09DF05-D227-4FBB-908C-24F5755A0780}.Release|x86.ActiveCfg = Release|Any CPU - {1C09DF05-D227-4FBB-908C-24F5755A0780}.Release|x86.Build.0 = Release|Any CPU - {7847D656-F494-41B5-8E1A-322D6D22DB52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7847D656-F494-41B5-8E1A-322D6D22DB52}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7847D656-F494-41B5-8E1A-322D6D22DB52}.Debug|x64.ActiveCfg = Debug|Any CPU - {7847D656-F494-41B5-8E1A-322D6D22DB52}.Debug|x64.Build.0 = Debug|Any CPU - {7847D656-F494-41B5-8E1A-322D6D22DB52}.Debug|x86.ActiveCfg = Debug|Any CPU - {7847D656-F494-41B5-8E1A-322D6D22DB52}.Debug|x86.Build.0 = Debug|Any CPU - {7847D656-F494-41B5-8E1A-322D6D22DB52}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7847D656-F494-41B5-8E1A-322D6D22DB52}.Release|Any CPU.Build.0 = Release|Any CPU - {7847D656-F494-41B5-8E1A-322D6D22DB52}.Release|x64.ActiveCfg = Release|Any CPU - {7847D656-F494-41B5-8E1A-322D6D22DB52}.Release|x64.Build.0 = Release|Any CPU - {7847D656-F494-41B5-8E1A-322D6D22DB52}.Release|x86.ActiveCfg = Release|Any CPU - {7847D656-F494-41B5-8E1A-322D6D22DB52}.Release|x86.Build.0 = Release|Any CPU {563D9741-DD6B-418C-84BB-F5DECD671D87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {563D9741-DD6B-418C-84BB-F5DECD671D87}.Debug|Any CPU.Build.0 = Debug|Any CPU {563D9741-DD6B-418C-84BB-F5DECD671D87}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1615,90 +1111,6 @@ Global {563D9741-DD6B-418C-84BB-F5DECD671D87}.Release|x64.Build.0 = Release|Any CPU {563D9741-DD6B-418C-84BB-F5DECD671D87}.Release|x86.ActiveCfg = Release|Any CPU {563D9741-DD6B-418C-84BB-F5DECD671D87}.Release|x86.Build.0 = Release|Any CPU - {2C47C9BC-3AEE-4212-A3BE-74583A079B68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2C47C9BC-3AEE-4212-A3BE-74583A079B68}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2C47C9BC-3AEE-4212-A3BE-74583A079B68}.Debug|x64.ActiveCfg = Debug|Any CPU - {2C47C9BC-3AEE-4212-A3BE-74583A079B68}.Debug|x64.Build.0 = Debug|Any CPU - {2C47C9BC-3AEE-4212-A3BE-74583A079B68}.Debug|x86.ActiveCfg = Debug|Any CPU - {2C47C9BC-3AEE-4212-A3BE-74583A079B68}.Debug|x86.Build.0 = Debug|Any CPU - {2C47C9BC-3AEE-4212-A3BE-74583A079B68}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2C47C9BC-3AEE-4212-A3BE-74583A079B68}.Release|Any CPU.Build.0 = Release|Any CPU - {2C47C9BC-3AEE-4212-A3BE-74583A079B68}.Release|x64.ActiveCfg = Release|Any CPU - {2C47C9BC-3AEE-4212-A3BE-74583A079B68}.Release|x64.Build.0 = Release|Any CPU - {2C47C9BC-3AEE-4212-A3BE-74583A079B68}.Release|x86.ActiveCfg = Release|Any CPU - {2C47C9BC-3AEE-4212-A3BE-74583A079B68}.Release|x86.Build.0 = Release|Any CPU - {678BC29A-A571-4B0C-9697-4C2258F6681D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {678BC29A-A571-4B0C-9697-4C2258F6681D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {678BC29A-A571-4B0C-9697-4C2258F6681D}.Debug|x64.ActiveCfg = Debug|Any CPU - {678BC29A-A571-4B0C-9697-4C2258F6681D}.Debug|x64.Build.0 = Debug|Any CPU - {678BC29A-A571-4B0C-9697-4C2258F6681D}.Debug|x86.ActiveCfg = Debug|Any CPU - {678BC29A-A571-4B0C-9697-4C2258F6681D}.Debug|x86.Build.0 = Debug|Any CPU - {678BC29A-A571-4B0C-9697-4C2258F6681D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {678BC29A-A571-4B0C-9697-4C2258F6681D}.Release|Any CPU.Build.0 = Release|Any CPU - {678BC29A-A571-4B0C-9697-4C2258F6681D}.Release|x64.ActiveCfg = Release|Any CPU - {678BC29A-A571-4B0C-9697-4C2258F6681D}.Release|x64.Build.0 = Release|Any CPU - {678BC29A-A571-4B0C-9697-4C2258F6681D}.Release|x86.ActiveCfg = Release|Any CPU - {678BC29A-A571-4B0C-9697-4C2258F6681D}.Release|x86.Build.0 = Release|Any CPU - {B742E7EF-E51C-4D60-8067-1EA6D1022099}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B742E7EF-E51C-4D60-8067-1EA6D1022099}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B742E7EF-E51C-4D60-8067-1EA6D1022099}.Debug|x64.ActiveCfg = Debug|Any CPU - {B742E7EF-E51C-4D60-8067-1EA6D1022099}.Debug|x64.Build.0 = Debug|Any CPU - {B742E7EF-E51C-4D60-8067-1EA6D1022099}.Debug|x86.ActiveCfg = Debug|Any CPU - {B742E7EF-E51C-4D60-8067-1EA6D1022099}.Debug|x86.Build.0 = Debug|Any CPU - {B742E7EF-E51C-4D60-8067-1EA6D1022099}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B742E7EF-E51C-4D60-8067-1EA6D1022099}.Release|Any CPU.Build.0 = Release|Any CPU - {B742E7EF-E51C-4D60-8067-1EA6D1022099}.Release|x64.ActiveCfg = Release|Any CPU - {B742E7EF-E51C-4D60-8067-1EA6D1022099}.Release|x64.Build.0 = Release|Any CPU - {B742E7EF-E51C-4D60-8067-1EA6D1022099}.Release|x86.ActiveCfg = Release|Any CPU - {B742E7EF-E51C-4D60-8067-1EA6D1022099}.Release|x86.Build.0 = Release|Any CPU - {2E92C012-F76A-4F25-91F4-359A5F0DEC4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2E92C012-F76A-4F25-91F4-359A5F0DEC4D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2E92C012-F76A-4F25-91F4-359A5F0DEC4D}.Debug|x64.ActiveCfg = Debug|Any CPU - {2E92C012-F76A-4F25-91F4-359A5F0DEC4D}.Debug|x64.Build.0 = Debug|Any CPU - {2E92C012-F76A-4F25-91F4-359A5F0DEC4D}.Debug|x86.ActiveCfg = Debug|Any CPU - {2E92C012-F76A-4F25-91F4-359A5F0DEC4D}.Debug|x86.Build.0 = Debug|Any CPU - {2E92C012-F76A-4F25-91F4-359A5F0DEC4D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2E92C012-F76A-4F25-91F4-359A5F0DEC4D}.Release|Any CPU.Build.0 = Release|Any CPU - {2E92C012-F76A-4F25-91F4-359A5F0DEC4D}.Release|x64.ActiveCfg = Release|Any CPU - {2E92C012-F76A-4F25-91F4-359A5F0DEC4D}.Release|x64.Build.0 = Release|Any CPU - {2E92C012-F76A-4F25-91F4-359A5F0DEC4D}.Release|x86.ActiveCfg = Release|Any CPU - {2E92C012-F76A-4F25-91F4-359A5F0DEC4D}.Release|x86.Build.0 = Release|Any CPU - {FAC2E957-E941-4258-9563-A4823C8629AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FAC2E957-E941-4258-9563-A4823C8629AF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FAC2E957-E941-4258-9563-A4823C8629AF}.Debug|x64.ActiveCfg = Debug|Any CPU - {FAC2E957-E941-4258-9563-A4823C8629AF}.Debug|x64.Build.0 = Debug|Any CPU - {FAC2E957-E941-4258-9563-A4823C8629AF}.Debug|x86.ActiveCfg = Debug|Any CPU - {FAC2E957-E941-4258-9563-A4823C8629AF}.Debug|x86.Build.0 = Debug|Any CPU - {FAC2E957-E941-4258-9563-A4823C8629AF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FAC2E957-E941-4258-9563-A4823C8629AF}.Release|Any CPU.Build.0 = Release|Any CPU - {FAC2E957-E941-4258-9563-A4823C8629AF}.Release|x64.ActiveCfg = Release|Any CPU - {FAC2E957-E941-4258-9563-A4823C8629AF}.Release|x64.Build.0 = Release|Any CPU - {FAC2E957-E941-4258-9563-A4823C8629AF}.Release|x86.ActiveCfg = Release|Any CPU - {FAC2E957-E941-4258-9563-A4823C8629AF}.Release|x86.Build.0 = Release|Any CPU - {BDF96F0D-D649-4B0A-B52F-077BC9A312A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BDF96F0D-D649-4B0A-B52F-077BC9A312A5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BDF96F0D-D649-4B0A-B52F-077BC9A312A5}.Debug|x64.ActiveCfg = Debug|Any CPU - {BDF96F0D-D649-4B0A-B52F-077BC9A312A5}.Debug|x64.Build.0 = Debug|Any CPU - {BDF96F0D-D649-4B0A-B52F-077BC9A312A5}.Debug|x86.ActiveCfg = Debug|Any CPU - {BDF96F0D-D649-4B0A-B52F-077BC9A312A5}.Debug|x86.Build.0 = Debug|Any CPU - {BDF96F0D-D649-4B0A-B52F-077BC9A312A5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BDF96F0D-D649-4B0A-B52F-077BC9A312A5}.Release|Any CPU.Build.0 = Release|Any CPU - {BDF96F0D-D649-4B0A-B52F-077BC9A312A5}.Release|x64.ActiveCfg = Release|Any CPU - {BDF96F0D-D649-4B0A-B52F-077BC9A312A5}.Release|x64.Build.0 = Release|Any CPU - {BDF96F0D-D649-4B0A-B52F-077BC9A312A5}.Release|x86.ActiveCfg = Release|Any CPU - {BDF96F0D-D649-4B0A-B52F-077BC9A312A5}.Release|x86.Build.0 = Release|Any CPU - {A7BCCBE7-402B-4151-B74B-CD2CC52DE0BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A7BCCBE7-402B-4151-B74B-CD2CC52DE0BD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A7BCCBE7-402B-4151-B74B-CD2CC52DE0BD}.Debug|x64.ActiveCfg = Debug|Any CPU - {A7BCCBE7-402B-4151-B74B-CD2CC52DE0BD}.Debug|x64.Build.0 = Debug|Any CPU - {A7BCCBE7-402B-4151-B74B-CD2CC52DE0BD}.Debug|x86.ActiveCfg = Debug|Any CPU - {A7BCCBE7-402B-4151-B74B-CD2CC52DE0BD}.Debug|x86.Build.0 = Debug|Any CPU - {A7BCCBE7-402B-4151-B74B-CD2CC52DE0BD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A7BCCBE7-402B-4151-B74B-CD2CC52DE0BD}.Release|Any CPU.Build.0 = Release|Any CPU - {A7BCCBE7-402B-4151-B74B-CD2CC52DE0BD}.Release|x64.ActiveCfg = Release|Any CPU - {A7BCCBE7-402B-4151-B74B-CD2CC52DE0BD}.Release|x64.Build.0 = Release|Any CPU - {A7BCCBE7-402B-4151-B74B-CD2CC52DE0BD}.Release|x86.ActiveCfg = Release|Any CPU - {A7BCCBE7-402B-4151-B74B-CD2CC52DE0BD}.Release|x86.Build.0 = Release|Any CPU {B1F60948-867B-434D-B201-4E3FEB0B667E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B1F60948-867B-434D-B201-4E3FEB0B667E}.Debug|Any CPU.Build.0 = Debug|Any CPU {B1F60948-867B-434D-B201-4E3FEB0B667E}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1723,198 +1135,6 @@ Global {F37866D9-8D7E-4814-94B8-29706B64CE1C}.Release|x64.Build.0 = Release|Any CPU {F37866D9-8D7E-4814-94B8-29706B64CE1C}.Release|x86.ActiveCfg = Release|Any CPU {F37866D9-8D7E-4814-94B8-29706B64CE1C}.Release|x86.Build.0 = Release|Any CPU - {2C683E50-6139-41C1-9EC3-8D245BF879FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2C683E50-6139-41C1-9EC3-8D245BF879FF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2C683E50-6139-41C1-9EC3-8D245BF879FF}.Debug|x64.ActiveCfg = Debug|Any CPU - {2C683E50-6139-41C1-9EC3-8D245BF879FF}.Debug|x64.Build.0 = Debug|Any CPU - {2C683E50-6139-41C1-9EC3-8D245BF879FF}.Debug|x86.ActiveCfg = Debug|Any CPU - {2C683E50-6139-41C1-9EC3-8D245BF879FF}.Debug|x86.Build.0 = Debug|Any CPU - {2C683E50-6139-41C1-9EC3-8D245BF879FF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2C683E50-6139-41C1-9EC3-8D245BF879FF}.Release|Any CPU.Build.0 = Release|Any CPU - {2C683E50-6139-41C1-9EC3-8D245BF879FF}.Release|x64.ActiveCfg = Release|Any CPU - {2C683E50-6139-41C1-9EC3-8D245BF879FF}.Release|x64.Build.0 = Release|Any CPU - {2C683E50-6139-41C1-9EC3-8D245BF879FF}.Release|x86.ActiveCfg = Release|Any CPU - {2C683E50-6139-41C1-9EC3-8D245BF879FF}.Release|x86.Build.0 = Release|Any CPU - {F2F329F1-997A-4744-9518-DCB3AA9625CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F2F329F1-997A-4744-9518-DCB3AA9625CF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F2F329F1-997A-4744-9518-DCB3AA9625CF}.Debug|x64.ActiveCfg = Debug|Any CPU - {F2F329F1-997A-4744-9518-DCB3AA9625CF}.Debug|x64.Build.0 = Debug|Any CPU - {F2F329F1-997A-4744-9518-DCB3AA9625CF}.Debug|x86.ActiveCfg = Debug|Any CPU - {F2F329F1-997A-4744-9518-DCB3AA9625CF}.Debug|x86.Build.0 = Debug|Any CPU - {F2F329F1-997A-4744-9518-DCB3AA9625CF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F2F329F1-997A-4744-9518-DCB3AA9625CF}.Release|Any CPU.Build.0 = Release|Any CPU - {F2F329F1-997A-4744-9518-DCB3AA9625CF}.Release|x64.ActiveCfg = Release|Any CPU - {F2F329F1-997A-4744-9518-DCB3AA9625CF}.Release|x64.Build.0 = Release|Any CPU - {F2F329F1-997A-4744-9518-DCB3AA9625CF}.Release|x86.ActiveCfg = Release|Any CPU - {F2F329F1-997A-4744-9518-DCB3AA9625CF}.Release|x86.Build.0 = Release|Any CPU - {18BCD74D-62BC-4C31-A66D-6083E95DECAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {18BCD74D-62BC-4C31-A66D-6083E95DECAE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {18BCD74D-62BC-4C31-A66D-6083E95DECAE}.Debug|x64.ActiveCfg = Debug|Any CPU - {18BCD74D-62BC-4C31-A66D-6083E95DECAE}.Debug|x64.Build.0 = Debug|Any CPU - {18BCD74D-62BC-4C31-A66D-6083E95DECAE}.Debug|x86.ActiveCfg = Debug|Any CPU - {18BCD74D-62BC-4C31-A66D-6083E95DECAE}.Debug|x86.Build.0 = Debug|Any CPU - {18BCD74D-62BC-4C31-A66D-6083E95DECAE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {18BCD74D-62BC-4C31-A66D-6083E95DECAE}.Release|Any CPU.Build.0 = Release|Any CPU - {18BCD74D-62BC-4C31-A66D-6083E95DECAE}.Release|x64.ActiveCfg = Release|Any CPU - {18BCD74D-62BC-4C31-A66D-6083E95DECAE}.Release|x64.Build.0 = Release|Any CPU - {18BCD74D-62BC-4C31-A66D-6083E95DECAE}.Release|x86.ActiveCfg = Release|Any CPU - {18BCD74D-62BC-4C31-A66D-6083E95DECAE}.Release|x86.Build.0 = Release|Any CPU - {1837E4A6-C9C0-4DD0-A151-D3EBB6AC6A61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1837E4A6-C9C0-4DD0-A151-D3EBB6AC6A61}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1837E4A6-C9C0-4DD0-A151-D3EBB6AC6A61}.Debug|x64.ActiveCfg = Debug|Any CPU - {1837E4A6-C9C0-4DD0-A151-D3EBB6AC6A61}.Debug|x64.Build.0 = Debug|Any CPU - {1837E4A6-C9C0-4DD0-A151-D3EBB6AC6A61}.Debug|x86.ActiveCfg = Debug|Any CPU - {1837E4A6-C9C0-4DD0-A151-D3EBB6AC6A61}.Debug|x86.Build.0 = Debug|Any CPU - {1837E4A6-C9C0-4DD0-A151-D3EBB6AC6A61}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1837E4A6-C9C0-4DD0-A151-D3EBB6AC6A61}.Release|Any CPU.Build.0 = Release|Any CPU - {1837E4A6-C9C0-4DD0-A151-D3EBB6AC6A61}.Release|x64.ActiveCfg = Release|Any CPU - {1837E4A6-C9C0-4DD0-A151-D3EBB6AC6A61}.Release|x64.Build.0 = Release|Any CPU - {1837E4A6-C9C0-4DD0-A151-D3EBB6AC6A61}.Release|x86.ActiveCfg = Release|Any CPU - {1837E4A6-C9C0-4DD0-A151-D3EBB6AC6A61}.Release|x86.Build.0 = Release|Any CPU - {CA2F6BC9-7B33-451F-8272-D2893B8E6DD2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CA2F6BC9-7B33-451F-8272-D2893B8E6DD2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CA2F6BC9-7B33-451F-8272-D2893B8E6DD2}.Debug|x64.ActiveCfg = Debug|Any CPU - {CA2F6BC9-7B33-451F-8272-D2893B8E6DD2}.Debug|x64.Build.0 = Debug|Any CPU - {CA2F6BC9-7B33-451F-8272-D2893B8E6DD2}.Debug|x86.ActiveCfg = Debug|Any CPU - {CA2F6BC9-7B33-451F-8272-D2893B8E6DD2}.Debug|x86.Build.0 = Debug|Any CPU - {CA2F6BC9-7B33-451F-8272-D2893B8E6DD2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CA2F6BC9-7B33-451F-8272-D2893B8E6DD2}.Release|Any CPU.Build.0 = Release|Any CPU - {CA2F6BC9-7B33-451F-8272-D2893B8E6DD2}.Release|x64.ActiveCfg = Release|Any CPU - {CA2F6BC9-7B33-451F-8272-D2893B8E6DD2}.Release|x64.Build.0 = Release|Any CPU - {CA2F6BC9-7B33-451F-8272-D2893B8E6DD2}.Release|x86.ActiveCfg = Release|Any CPU - {CA2F6BC9-7B33-451F-8272-D2893B8E6DD2}.Release|x86.Build.0 = Release|Any CPU - {B9814B8D-B4F0-436E-ADD7-73B9DD8FFBEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B9814B8D-B4F0-436E-ADD7-73B9DD8FFBEC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B9814B8D-B4F0-436E-ADD7-73B9DD8FFBEC}.Debug|x64.ActiveCfg = Debug|Any CPU - {B9814B8D-B4F0-436E-ADD7-73B9DD8FFBEC}.Debug|x64.Build.0 = Debug|Any CPU - {B9814B8D-B4F0-436E-ADD7-73B9DD8FFBEC}.Debug|x86.ActiveCfg = Debug|Any CPU - {B9814B8D-B4F0-436E-ADD7-73B9DD8FFBEC}.Debug|x86.Build.0 = Debug|Any CPU - {B9814B8D-B4F0-436E-ADD7-73B9DD8FFBEC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B9814B8D-B4F0-436E-ADD7-73B9DD8FFBEC}.Release|Any CPU.Build.0 = Release|Any CPU - {B9814B8D-B4F0-436E-ADD7-73B9DD8FFBEC}.Release|x64.ActiveCfg = Release|Any CPU - {B9814B8D-B4F0-436E-ADD7-73B9DD8FFBEC}.Release|x64.Build.0 = Release|Any CPU - {B9814B8D-B4F0-436E-ADD7-73B9DD8FFBEC}.Release|x86.ActiveCfg = Release|Any CPU - {B9814B8D-B4F0-436E-ADD7-73B9DD8FFBEC}.Release|x86.Build.0 = Release|Any CPU - {9C03E9A7-120D-4C69-A429-01A240E15385}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9C03E9A7-120D-4C69-A429-01A240E15385}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9C03E9A7-120D-4C69-A429-01A240E15385}.Debug|x64.ActiveCfg = Debug|Any CPU - {9C03E9A7-120D-4C69-A429-01A240E15385}.Debug|x64.Build.0 = Debug|Any CPU - {9C03E9A7-120D-4C69-A429-01A240E15385}.Debug|x86.ActiveCfg = Debug|Any CPU - {9C03E9A7-120D-4C69-A429-01A240E15385}.Debug|x86.Build.0 = Debug|Any CPU - {9C03E9A7-120D-4C69-A429-01A240E15385}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9C03E9A7-120D-4C69-A429-01A240E15385}.Release|Any CPU.Build.0 = Release|Any CPU - {9C03E9A7-120D-4C69-A429-01A240E15385}.Release|x64.ActiveCfg = Release|Any CPU - {9C03E9A7-120D-4C69-A429-01A240E15385}.Release|x64.Build.0 = Release|Any CPU - {9C03E9A7-120D-4C69-A429-01A240E15385}.Release|x86.ActiveCfg = Release|Any CPU - {9C03E9A7-120D-4C69-A429-01A240E15385}.Release|x86.Build.0 = Release|Any CPU - {E4108F5B-6D1F-46B4-A981-F9D72DCE8159}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E4108F5B-6D1F-46B4-A981-F9D72DCE8159}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E4108F5B-6D1F-46B4-A981-F9D72DCE8159}.Debug|x64.ActiveCfg = Debug|Any CPU - {E4108F5B-6D1F-46B4-A981-F9D72DCE8159}.Debug|x64.Build.0 = Debug|Any CPU - {E4108F5B-6D1F-46B4-A981-F9D72DCE8159}.Debug|x86.ActiveCfg = Debug|Any CPU - {E4108F5B-6D1F-46B4-A981-F9D72DCE8159}.Debug|x86.Build.0 = Debug|Any CPU - {E4108F5B-6D1F-46B4-A981-F9D72DCE8159}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E4108F5B-6D1F-46B4-A981-F9D72DCE8159}.Release|Any CPU.Build.0 = Release|Any CPU - {E4108F5B-6D1F-46B4-A981-F9D72DCE8159}.Release|x64.ActiveCfg = Release|Any CPU - {E4108F5B-6D1F-46B4-A981-F9D72DCE8159}.Release|x64.Build.0 = Release|Any CPU - {E4108F5B-6D1F-46B4-A981-F9D72DCE8159}.Release|x86.ActiveCfg = Release|Any CPU - {E4108F5B-6D1F-46B4-A981-F9D72DCE8159}.Release|x86.Build.0 = Release|Any CPU - {6D36096D-1269-45A5-A3A1-222FAEE0B221}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6D36096D-1269-45A5-A3A1-222FAEE0B221}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6D36096D-1269-45A5-A3A1-222FAEE0B221}.Debug|x64.ActiveCfg = Debug|Any CPU - {6D36096D-1269-45A5-A3A1-222FAEE0B221}.Debug|x64.Build.0 = Debug|Any CPU - {6D36096D-1269-45A5-A3A1-222FAEE0B221}.Debug|x86.ActiveCfg = Debug|Any CPU - {6D36096D-1269-45A5-A3A1-222FAEE0B221}.Debug|x86.Build.0 = Debug|Any CPU - {6D36096D-1269-45A5-A3A1-222FAEE0B221}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6D36096D-1269-45A5-A3A1-222FAEE0B221}.Release|Any CPU.Build.0 = Release|Any CPU - {6D36096D-1269-45A5-A3A1-222FAEE0B221}.Release|x64.ActiveCfg = Release|Any CPU - {6D36096D-1269-45A5-A3A1-222FAEE0B221}.Release|x64.Build.0 = Release|Any CPU - {6D36096D-1269-45A5-A3A1-222FAEE0B221}.Release|x86.ActiveCfg = Release|Any CPU - {6D36096D-1269-45A5-A3A1-222FAEE0B221}.Release|x86.Build.0 = Release|Any CPU - {0A16F586-1571-4BB0-813F-A87C65924B14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0A16F586-1571-4BB0-813F-A87C65924B14}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0A16F586-1571-4BB0-813F-A87C65924B14}.Debug|x64.ActiveCfg = Debug|Any CPU - {0A16F586-1571-4BB0-813F-A87C65924B14}.Debug|x64.Build.0 = Debug|Any CPU - {0A16F586-1571-4BB0-813F-A87C65924B14}.Debug|x86.ActiveCfg = Debug|Any CPU - {0A16F586-1571-4BB0-813F-A87C65924B14}.Debug|x86.Build.0 = Debug|Any CPU - {0A16F586-1571-4BB0-813F-A87C65924B14}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0A16F586-1571-4BB0-813F-A87C65924B14}.Release|Any CPU.Build.0 = Release|Any CPU - {0A16F586-1571-4BB0-813F-A87C65924B14}.Release|x64.ActiveCfg = Release|Any CPU - {0A16F586-1571-4BB0-813F-A87C65924B14}.Release|x64.Build.0 = Release|Any CPU - {0A16F586-1571-4BB0-813F-A87C65924B14}.Release|x86.ActiveCfg = Release|Any CPU - {0A16F586-1571-4BB0-813F-A87C65924B14}.Release|x86.Build.0 = Release|Any CPU - {A7F4BE09-7C20-4B20-98CC-3BB61C854229}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A7F4BE09-7C20-4B20-98CC-3BB61C854229}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A7F4BE09-7C20-4B20-98CC-3BB61C854229}.Debug|x64.ActiveCfg = Debug|Any CPU - {A7F4BE09-7C20-4B20-98CC-3BB61C854229}.Debug|x64.Build.0 = Debug|Any CPU - {A7F4BE09-7C20-4B20-98CC-3BB61C854229}.Debug|x86.ActiveCfg = Debug|Any CPU - {A7F4BE09-7C20-4B20-98CC-3BB61C854229}.Debug|x86.Build.0 = Debug|Any CPU - {A7F4BE09-7C20-4B20-98CC-3BB61C854229}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A7F4BE09-7C20-4B20-98CC-3BB61C854229}.Release|Any CPU.Build.0 = Release|Any CPU - {A7F4BE09-7C20-4B20-98CC-3BB61C854229}.Release|x64.ActiveCfg = Release|Any CPU - {A7F4BE09-7C20-4B20-98CC-3BB61C854229}.Release|x64.Build.0 = Release|Any CPU - {A7F4BE09-7C20-4B20-98CC-3BB61C854229}.Release|x86.ActiveCfg = Release|Any CPU - {A7F4BE09-7C20-4B20-98CC-3BB61C854229}.Release|x86.Build.0 = Release|Any CPU - {5292D24D-2D7A-4AB1-A065-EB5E5D2C994E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5292D24D-2D7A-4AB1-A065-EB5E5D2C994E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5292D24D-2D7A-4AB1-A065-EB5E5D2C994E}.Debug|x64.ActiveCfg = Debug|Any CPU - {5292D24D-2D7A-4AB1-A065-EB5E5D2C994E}.Debug|x64.Build.0 = Debug|Any CPU - {5292D24D-2D7A-4AB1-A065-EB5E5D2C994E}.Debug|x86.ActiveCfg = Debug|Any CPU - {5292D24D-2D7A-4AB1-A065-EB5E5D2C994E}.Debug|x86.Build.0 = Debug|Any CPU - {5292D24D-2D7A-4AB1-A065-EB5E5D2C994E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5292D24D-2D7A-4AB1-A065-EB5E5D2C994E}.Release|Any CPU.Build.0 = Release|Any CPU - {5292D24D-2D7A-4AB1-A065-EB5E5D2C994E}.Release|x64.ActiveCfg = Release|Any CPU - {5292D24D-2D7A-4AB1-A065-EB5E5D2C994E}.Release|x64.Build.0 = Release|Any CPU - {5292D24D-2D7A-4AB1-A065-EB5E5D2C994E}.Release|x86.ActiveCfg = Release|Any CPU - {5292D24D-2D7A-4AB1-A065-EB5E5D2C994E}.Release|x86.Build.0 = Release|Any CPU - {D4B0F37C-2B33-4F24-BF38-2EAC26949F1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D4B0F37C-2B33-4F24-BF38-2EAC26949F1A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D4B0F37C-2B33-4F24-BF38-2EAC26949F1A}.Debug|x64.ActiveCfg = Debug|Any CPU - {D4B0F37C-2B33-4F24-BF38-2EAC26949F1A}.Debug|x64.Build.0 = Debug|Any CPU - {D4B0F37C-2B33-4F24-BF38-2EAC26949F1A}.Debug|x86.ActiveCfg = Debug|Any CPU - {D4B0F37C-2B33-4F24-BF38-2EAC26949F1A}.Debug|x86.Build.0 = Debug|Any CPU - {D4B0F37C-2B33-4F24-BF38-2EAC26949F1A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D4B0F37C-2B33-4F24-BF38-2EAC26949F1A}.Release|Any CPU.Build.0 = Release|Any CPU - {D4B0F37C-2B33-4F24-BF38-2EAC26949F1A}.Release|x64.ActiveCfg = Release|Any CPU - {D4B0F37C-2B33-4F24-BF38-2EAC26949F1A}.Release|x64.Build.0 = Release|Any CPU - {D4B0F37C-2B33-4F24-BF38-2EAC26949F1A}.Release|x86.ActiveCfg = Release|Any CPU - {D4B0F37C-2B33-4F24-BF38-2EAC26949F1A}.Release|x86.Build.0 = Release|Any CPU - {7E415CFB-33D1-4FBA-9D60-AB884D8F72B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7E415CFB-33D1-4FBA-9D60-AB884D8F72B2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7E415CFB-33D1-4FBA-9D60-AB884D8F72B2}.Debug|x64.ActiveCfg = Debug|Any CPU - {7E415CFB-33D1-4FBA-9D60-AB884D8F72B2}.Debug|x64.Build.0 = Debug|Any CPU - {7E415CFB-33D1-4FBA-9D60-AB884D8F72B2}.Debug|x86.ActiveCfg = Debug|Any CPU - {7E415CFB-33D1-4FBA-9D60-AB884D8F72B2}.Debug|x86.Build.0 = Debug|Any CPU - {7E415CFB-33D1-4FBA-9D60-AB884D8F72B2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7E415CFB-33D1-4FBA-9D60-AB884D8F72B2}.Release|Any CPU.Build.0 = Release|Any CPU - {7E415CFB-33D1-4FBA-9D60-AB884D8F72B2}.Release|x64.ActiveCfg = Release|Any CPU - {7E415CFB-33D1-4FBA-9D60-AB884D8F72B2}.Release|x64.Build.0 = Release|Any CPU - {7E415CFB-33D1-4FBA-9D60-AB884D8F72B2}.Release|x86.ActiveCfg = Release|Any CPU - {7E415CFB-33D1-4FBA-9D60-AB884D8F72B2}.Release|x86.Build.0 = Release|Any CPU - {1A9633CE-05CB-4A96-A44C-63C9E8B0A841}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1A9633CE-05CB-4A96-A44C-63C9E8B0A841}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1A9633CE-05CB-4A96-A44C-63C9E8B0A841}.Debug|x64.ActiveCfg = Debug|Any CPU - {1A9633CE-05CB-4A96-A44C-63C9E8B0A841}.Debug|x64.Build.0 = Debug|Any CPU - {1A9633CE-05CB-4A96-A44C-63C9E8B0A841}.Debug|x86.ActiveCfg = Debug|Any CPU - {1A9633CE-05CB-4A96-A44C-63C9E8B0A841}.Debug|x86.Build.0 = Debug|Any CPU - {1A9633CE-05CB-4A96-A44C-63C9E8B0A841}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1A9633CE-05CB-4A96-A44C-63C9E8B0A841}.Release|Any CPU.Build.0 = Release|Any CPU - {1A9633CE-05CB-4A96-A44C-63C9E8B0A841}.Release|x64.ActiveCfg = Release|Any CPU - {1A9633CE-05CB-4A96-A44C-63C9E8B0A841}.Release|x64.Build.0 = Release|Any CPU - {1A9633CE-05CB-4A96-A44C-63C9E8B0A841}.Release|x86.ActiveCfg = Release|Any CPU - {1A9633CE-05CB-4A96-A44C-63C9E8B0A841}.Release|x86.Build.0 = Release|Any CPU - {B51F2E78-3A24-4F12-9D78-6D38E9D01A22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B51F2E78-3A24-4F12-9D78-6D38E9D01A22}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B51F2E78-3A24-4F12-9D78-6D38E9D01A22}.Debug|x64.ActiveCfg = Debug|Any CPU - {B51F2E78-3A24-4F12-9D78-6D38E9D01A22}.Debug|x64.Build.0 = Debug|Any CPU - {B51F2E78-3A24-4F12-9D78-6D38E9D01A22}.Debug|x86.ActiveCfg = Debug|Any CPU - {B51F2E78-3A24-4F12-9D78-6D38E9D01A22}.Debug|x86.Build.0 = Debug|Any CPU - {B51F2E78-3A24-4F12-9D78-6D38E9D01A22}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B51F2E78-3A24-4F12-9D78-6D38E9D01A22}.Release|Any CPU.Build.0 = Release|Any CPU - {B51F2E78-3A24-4F12-9D78-6D38E9D01A22}.Release|x64.ActiveCfg = Release|Any CPU - {B51F2E78-3A24-4F12-9D78-6D38E9D01A22}.Release|x64.Build.0 = Release|Any CPU - {B51F2E78-3A24-4F12-9D78-6D38E9D01A22}.Release|x86.ActiveCfg = Release|Any CPU - {B51F2E78-3A24-4F12-9D78-6D38E9D01A22}.Release|x86.Build.0 = Release|Any CPU {47340D45-F196-4B44-94FE-6DF9DD848232}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {47340D45-F196-4B44-94FE-6DF9DD848232}.Debug|Any CPU.Build.0 = Debug|Any CPU {47340D45-F196-4B44-94FE-6DF9DD848232}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1927,142 +1147,1322 @@ Global {47340D45-F196-4B44-94FE-6DF9DD848232}.Release|x64.Build.0 = Release|Any CPU {47340D45-F196-4B44-94FE-6DF9DD848232}.Release|x86.ActiveCfg = Release|Any CPU {47340D45-F196-4B44-94FE-6DF9DD848232}.Release|x86.Build.0 = Release|Any CPU + {51C6C4A1-9B64-4E00-A300-D5DC3B537DC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {51C6C4A1-9B64-4E00-A300-D5DC3B537DC5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {51C6C4A1-9B64-4E00-A300-D5DC3B537DC5}.Debug|x64.ActiveCfg = Debug|Any CPU + {51C6C4A1-9B64-4E00-A300-D5DC3B537DC5}.Debug|x64.Build.0 = Debug|Any CPU + {51C6C4A1-9B64-4E00-A300-D5DC3B537DC5}.Debug|x86.ActiveCfg = Debug|Any CPU + {51C6C4A1-9B64-4E00-A300-D5DC3B537DC5}.Debug|x86.Build.0 = Debug|Any CPU + {51C6C4A1-9B64-4E00-A300-D5DC3B537DC5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {51C6C4A1-9B64-4E00-A300-D5DC3B537DC5}.Release|Any CPU.Build.0 = Release|Any CPU + {51C6C4A1-9B64-4E00-A300-D5DC3B537DC5}.Release|x64.ActiveCfg = Release|Any CPU + {51C6C4A1-9B64-4E00-A300-D5DC3B537DC5}.Release|x64.Build.0 = Release|Any CPU + {51C6C4A1-9B64-4E00-A300-D5DC3B537DC5}.Release|x86.ActiveCfg = Release|Any CPU + {51C6C4A1-9B64-4E00-A300-D5DC3B537DC5}.Release|x86.Build.0 = Release|Any CPU + {BD84E505-A39E-424F-8B36-1F417290066E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BD84E505-A39E-424F-8B36-1F417290066E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BD84E505-A39E-424F-8B36-1F417290066E}.Debug|x64.ActiveCfg = Debug|Any CPU + {BD84E505-A39E-424F-8B36-1F417290066E}.Debug|x64.Build.0 = Debug|Any CPU + {BD84E505-A39E-424F-8B36-1F417290066E}.Debug|x86.ActiveCfg = Debug|Any CPU + {BD84E505-A39E-424F-8B36-1F417290066E}.Debug|x86.Build.0 = Debug|Any CPU + {BD84E505-A39E-424F-8B36-1F417290066E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BD84E505-A39E-424F-8B36-1F417290066E}.Release|Any CPU.Build.0 = Release|Any CPU + {BD84E505-A39E-424F-8B36-1F417290066E}.Release|x64.ActiveCfg = Release|Any CPU + {BD84E505-A39E-424F-8B36-1F417290066E}.Release|x64.Build.0 = Release|Any CPU + {BD84E505-A39E-424F-8B36-1F417290066E}.Release|x86.ActiveCfg = Release|Any CPU + {BD84E505-A39E-424F-8B36-1F417290066E}.Release|x86.Build.0 = Release|Any CPU + {F0AB3A20-E876-4588-9C7B-F0705CB0DB1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F0AB3A20-E876-4588-9C7B-F0705CB0DB1F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F0AB3A20-E876-4588-9C7B-F0705CB0DB1F}.Debug|x64.ActiveCfg = Debug|Any CPU + {F0AB3A20-E876-4588-9C7B-F0705CB0DB1F}.Debug|x64.Build.0 = Debug|Any CPU + {F0AB3A20-E876-4588-9C7B-F0705CB0DB1F}.Debug|x86.ActiveCfg = Debug|Any CPU + {F0AB3A20-E876-4588-9C7B-F0705CB0DB1F}.Debug|x86.Build.0 = Debug|Any CPU + {F0AB3A20-E876-4588-9C7B-F0705CB0DB1F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F0AB3A20-E876-4588-9C7B-F0705CB0DB1F}.Release|Any CPU.Build.0 = Release|Any CPU + {F0AB3A20-E876-4588-9C7B-F0705CB0DB1F}.Release|x64.ActiveCfg = Release|Any CPU + {F0AB3A20-E876-4588-9C7B-F0705CB0DB1F}.Release|x64.Build.0 = Release|Any CPU + {F0AB3A20-E876-4588-9C7B-F0705CB0DB1F}.Release|x86.ActiveCfg = Release|Any CPU + {F0AB3A20-E876-4588-9C7B-F0705CB0DB1F}.Release|x86.Build.0 = Release|Any CPU + {EB59443E-B4D6-440A-854D-4888D675488C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EB59443E-B4D6-440A-854D-4888D675488C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EB59443E-B4D6-440A-854D-4888D675488C}.Debug|x64.ActiveCfg = Debug|Any CPU + {EB59443E-B4D6-440A-854D-4888D675488C}.Debug|x64.Build.0 = Debug|Any CPU + {EB59443E-B4D6-440A-854D-4888D675488C}.Debug|x86.ActiveCfg = Debug|Any CPU + {EB59443E-B4D6-440A-854D-4888D675488C}.Debug|x86.Build.0 = Debug|Any CPU + {EB59443E-B4D6-440A-854D-4888D675488C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EB59443E-B4D6-440A-854D-4888D675488C}.Release|Any CPU.Build.0 = Release|Any CPU + {EB59443E-B4D6-440A-854D-4888D675488C}.Release|x64.ActiveCfg = Release|Any CPU + {EB59443E-B4D6-440A-854D-4888D675488C}.Release|x64.Build.0 = Release|Any CPU + {EB59443E-B4D6-440A-854D-4888D675488C}.Release|x86.ActiveCfg = Release|Any CPU + {EB59443E-B4D6-440A-854D-4888D675488C}.Release|x86.Build.0 = Release|Any CPU + {C0D55877-C3E5-44AF-ACE9-AE5310B4FB9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C0D55877-C3E5-44AF-ACE9-AE5310B4FB9E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C0D55877-C3E5-44AF-ACE9-AE5310B4FB9E}.Debug|x64.ActiveCfg = Debug|Any CPU + {C0D55877-C3E5-44AF-ACE9-AE5310B4FB9E}.Debug|x64.Build.0 = Debug|Any CPU + {C0D55877-C3E5-44AF-ACE9-AE5310B4FB9E}.Debug|x86.ActiveCfg = Debug|Any CPU + {C0D55877-C3E5-44AF-ACE9-AE5310B4FB9E}.Debug|x86.Build.0 = Debug|Any CPU + {C0D55877-C3E5-44AF-ACE9-AE5310B4FB9E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C0D55877-C3E5-44AF-ACE9-AE5310B4FB9E}.Release|Any CPU.Build.0 = Release|Any CPU + {C0D55877-C3E5-44AF-ACE9-AE5310B4FB9E}.Release|x64.ActiveCfg = Release|Any CPU + {C0D55877-C3E5-44AF-ACE9-AE5310B4FB9E}.Release|x64.Build.0 = Release|Any CPU + {C0D55877-C3E5-44AF-ACE9-AE5310B4FB9E}.Release|x86.ActiveCfg = Release|Any CPU + {C0D55877-C3E5-44AF-ACE9-AE5310B4FB9E}.Release|x86.Build.0 = Release|Any CPU + {F1C835DA-50AC-482C-9C9C-85583954118B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F1C835DA-50AC-482C-9C9C-85583954118B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F1C835DA-50AC-482C-9C9C-85583954118B}.Debug|x64.ActiveCfg = Debug|Any CPU + {F1C835DA-50AC-482C-9C9C-85583954118B}.Debug|x64.Build.0 = Debug|Any CPU + {F1C835DA-50AC-482C-9C9C-85583954118B}.Debug|x86.ActiveCfg = Debug|Any CPU + {F1C835DA-50AC-482C-9C9C-85583954118B}.Debug|x86.Build.0 = Debug|Any CPU + {F1C835DA-50AC-482C-9C9C-85583954118B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F1C835DA-50AC-482C-9C9C-85583954118B}.Release|Any CPU.Build.0 = Release|Any CPU + {F1C835DA-50AC-482C-9C9C-85583954118B}.Release|x64.ActiveCfg = Release|Any CPU + {F1C835DA-50AC-482C-9C9C-85583954118B}.Release|x64.Build.0 = Release|Any CPU + {F1C835DA-50AC-482C-9C9C-85583954118B}.Release|x86.ActiveCfg = Release|Any CPU + {F1C835DA-50AC-482C-9C9C-85583954118B}.Release|x86.Build.0 = Release|Any CPU + {4556A84D-B735-46A6-B77B-C843ACC2868F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4556A84D-B735-46A6-B77B-C843ACC2868F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4556A84D-B735-46A6-B77B-C843ACC2868F}.Debug|x64.ActiveCfg = Debug|Any CPU + {4556A84D-B735-46A6-B77B-C843ACC2868F}.Debug|x64.Build.0 = Debug|Any CPU + {4556A84D-B735-46A6-B77B-C843ACC2868F}.Debug|x86.ActiveCfg = Debug|Any CPU + {4556A84D-B735-46A6-B77B-C843ACC2868F}.Debug|x86.Build.0 = Debug|Any CPU + {4556A84D-B735-46A6-B77B-C843ACC2868F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4556A84D-B735-46A6-B77B-C843ACC2868F}.Release|Any CPU.Build.0 = Release|Any CPU + {4556A84D-B735-46A6-B77B-C843ACC2868F}.Release|x64.ActiveCfg = Release|Any CPU + {4556A84D-B735-46A6-B77B-C843ACC2868F}.Release|x64.Build.0 = Release|Any CPU + {4556A84D-B735-46A6-B77B-C843ACC2868F}.Release|x86.ActiveCfg = Release|Any CPU + {4556A84D-B735-46A6-B77B-C843ACC2868F}.Release|x86.Build.0 = Release|Any CPU + {B33C7FD3-EABC-40F9-8F80-D5E236328985}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B33C7FD3-EABC-40F9-8F80-D5E236328985}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B33C7FD3-EABC-40F9-8F80-D5E236328985}.Debug|x64.ActiveCfg = Debug|Any CPU + {B33C7FD3-EABC-40F9-8F80-D5E236328985}.Debug|x64.Build.0 = Debug|Any CPU + {B33C7FD3-EABC-40F9-8F80-D5E236328985}.Debug|x86.ActiveCfg = Debug|Any CPU + {B33C7FD3-EABC-40F9-8F80-D5E236328985}.Debug|x86.Build.0 = Debug|Any CPU + {B33C7FD3-EABC-40F9-8F80-D5E236328985}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B33C7FD3-EABC-40F9-8F80-D5E236328985}.Release|Any CPU.Build.0 = Release|Any CPU + {B33C7FD3-EABC-40F9-8F80-D5E236328985}.Release|x64.ActiveCfg = Release|Any CPU + {B33C7FD3-EABC-40F9-8F80-D5E236328985}.Release|x64.Build.0 = Release|Any CPU + {B33C7FD3-EABC-40F9-8F80-D5E236328985}.Release|x86.ActiveCfg = Release|Any CPU + {B33C7FD3-EABC-40F9-8F80-D5E236328985}.Release|x86.Build.0 = Release|Any CPU + {010D8B4E-F365-48CC-A330-D2E4C212BC28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {010D8B4E-F365-48CC-A330-D2E4C212BC28}.Debug|Any CPU.Build.0 = Debug|Any CPU + {010D8B4E-F365-48CC-A330-D2E4C212BC28}.Debug|x64.ActiveCfg = Debug|Any CPU + {010D8B4E-F365-48CC-A330-D2E4C212BC28}.Debug|x64.Build.0 = Debug|Any CPU + {010D8B4E-F365-48CC-A330-D2E4C212BC28}.Debug|x86.ActiveCfg = Debug|Any CPU + {010D8B4E-F365-48CC-A330-D2E4C212BC28}.Debug|x86.Build.0 = Debug|Any CPU + {010D8B4E-F365-48CC-A330-D2E4C212BC28}.Release|Any CPU.ActiveCfg = Release|Any CPU + {010D8B4E-F365-48CC-A330-D2E4C212BC28}.Release|Any CPU.Build.0 = Release|Any CPU + {010D8B4E-F365-48CC-A330-D2E4C212BC28}.Release|x64.ActiveCfg = Release|Any CPU + {010D8B4E-F365-48CC-A330-D2E4C212BC28}.Release|x64.Build.0 = Release|Any CPU + {010D8B4E-F365-48CC-A330-D2E4C212BC28}.Release|x86.ActiveCfg = Release|Any CPU + {010D8B4E-F365-48CC-A330-D2E4C212BC28}.Release|x86.Build.0 = Release|Any CPU + {E249B557-A53A-4449-9D5C-C97AD5FECCBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E249B557-A53A-4449-9D5C-C97AD5FECCBA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E249B557-A53A-4449-9D5C-C97AD5FECCBA}.Debug|x64.ActiveCfg = Debug|Any CPU + {E249B557-A53A-4449-9D5C-C97AD5FECCBA}.Debug|x64.Build.0 = Debug|Any CPU + {E249B557-A53A-4449-9D5C-C97AD5FECCBA}.Debug|x86.ActiveCfg = Debug|Any CPU + {E249B557-A53A-4449-9D5C-C97AD5FECCBA}.Debug|x86.Build.0 = Debug|Any CPU + {E249B557-A53A-4449-9D5C-C97AD5FECCBA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E249B557-A53A-4449-9D5C-C97AD5FECCBA}.Release|Any CPU.Build.0 = Release|Any CPU + {E249B557-A53A-4449-9D5C-C97AD5FECCBA}.Release|x64.ActiveCfg = Release|Any CPU + {E249B557-A53A-4449-9D5C-C97AD5FECCBA}.Release|x64.Build.0 = Release|Any CPU + {E249B557-A53A-4449-9D5C-C97AD5FECCBA}.Release|x86.ActiveCfg = Release|Any CPU + {E249B557-A53A-4449-9D5C-C97AD5FECCBA}.Release|x86.Build.0 = Release|Any CPU + {61C4ECD9-4ECE-4DB7-B8CB-7C5C412E8FBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {61C4ECD9-4ECE-4DB7-B8CB-7C5C412E8FBC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {61C4ECD9-4ECE-4DB7-B8CB-7C5C412E8FBC}.Debug|x64.ActiveCfg = Debug|Any CPU + {61C4ECD9-4ECE-4DB7-B8CB-7C5C412E8FBC}.Debug|x64.Build.0 = Debug|Any CPU + {61C4ECD9-4ECE-4DB7-B8CB-7C5C412E8FBC}.Debug|x86.ActiveCfg = Debug|Any CPU + {61C4ECD9-4ECE-4DB7-B8CB-7C5C412E8FBC}.Debug|x86.Build.0 = Debug|Any CPU + {61C4ECD9-4ECE-4DB7-B8CB-7C5C412E8FBC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {61C4ECD9-4ECE-4DB7-B8CB-7C5C412E8FBC}.Release|Any CPU.Build.0 = Release|Any CPU + {61C4ECD9-4ECE-4DB7-B8CB-7C5C412E8FBC}.Release|x64.ActiveCfg = Release|Any CPU + {61C4ECD9-4ECE-4DB7-B8CB-7C5C412E8FBC}.Release|x64.Build.0 = Release|Any CPU + {61C4ECD9-4ECE-4DB7-B8CB-7C5C412E8FBC}.Release|x86.ActiveCfg = Release|Any CPU + {61C4ECD9-4ECE-4DB7-B8CB-7C5C412E8FBC}.Release|x86.Build.0 = Release|Any CPU + {EBFFBB42-17DF-41D3-80EC-4D578FBAA899}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EBFFBB42-17DF-41D3-80EC-4D578FBAA899}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EBFFBB42-17DF-41D3-80EC-4D578FBAA899}.Debug|x64.ActiveCfg = Debug|Any CPU + {EBFFBB42-17DF-41D3-80EC-4D578FBAA899}.Debug|x64.Build.0 = Debug|Any CPU + {EBFFBB42-17DF-41D3-80EC-4D578FBAA899}.Debug|x86.ActiveCfg = Debug|Any CPU + {EBFFBB42-17DF-41D3-80EC-4D578FBAA899}.Debug|x86.Build.0 = Debug|Any CPU + {EBFFBB42-17DF-41D3-80EC-4D578FBAA899}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EBFFBB42-17DF-41D3-80EC-4D578FBAA899}.Release|Any CPU.Build.0 = Release|Any CPU + {EBFFBB42-17DF-41D3-80EC-4D578FBAA899}.Release|x64.ActiveCfg = Release|Any CPU + {EBFFBB42-17DF-41D3-80EC-4D578FBAA899}.Release|x64.Build.0 = Release|Any CPU + {EBFFBB42-17DF-41D3-80EC-4D578FBAA899}.Release|x86.ActiveCfg = Release|Any CPU + {EBFFBB42-17DF-41D3-80EC-4D578FBAA899}.Release|x86.Build.0 = Release|Any CPU + {AF20824B-A44D-4417-BC90-27F73CD70D07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AF20824B-A44D-4417-BC90-27F73CD70D07}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AF20824B-A44D-4417-BC90-27F73CD70D07}.Debug|x64.ActiveCfg = Debug|Any CPU + {AF20824B-A44D-4417-BC90-27F73CD70D07}.Debug|x64.Build.0 = Debug|Any CPU + {AF20824B-A44D-4417-BC90-27F73CD70D07}.Debug|x86.ActiveCfg = Debug|Any CPU + {AF20824B-A44D-4417-BC90-27F73CD70D07}.Debug|x86.Build.0 = Debug|Any CPU + {AF20824B-A44D-4417-BC90-27F73CD70D07}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AF20824B-A44D-4417-BC90-27F73CD70D07}.Release|Any CPU.Build.0 = Release|Any CPU + {AF20824B-A44D-4417-BC90-27F73CD70D07}.Release|x64.ActiveCfg = Release|Any CPU + {AF20824B-A44D-4417-BC90-27F73CD70D07}.Release|x64.Build.0 = Release|Any CPU + {AF20824B-A44D-4417-BC90-27F73CD70D07}.Release|x86.ActiveCfg = Release|Any CPU + {AF20824B-A44D-4417-BC90-27F73CD70D07}.Release|x86.Build.0 = Release|Any CPU + {FDCE41C9-4A8D-4297-84B1-5AF613825142}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FDCE41C9-4A8D-4297-84B1-5AF613825142}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FDCE41C9-4A8D-4297-84B1-5AF613825142}.Debug|x64.ActiveCfg = Debug|Any CPU + {FDCE41C9-4A8D-4297-84B1-5AF613825142}.Debug|x64.Build.0 = Debug|Any CPU + {FDCE41C9-4A8D-4297-84B1-5AF613825142}.Debug|x86.ActiveCfg = Debug|Any CPU + {FDCE41C9-4A8D-4297-84B1-5AF613825142}.Debug|x86.Build.0 = Debug|Any CPU + {FDCE41C9-4A8D-4297-84B1-5AF613825142}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FDCE41C9-4A8D-4297-84B1-5AF613825142}.Release|Any CPU.Build.0 = Release|Any CPU + {FDCE41C9-4A8D-4297-84B1-5AF613825142}.Release|x64.ActiveCfg = Release|Any CPU + {FDCE41C9-4A8D-4297-84B1-5AF613825142}.Release|x64.Build.0 = Release|Any CPU + {FDCE41C9-4A8D-4297-84B1-5AF613825142}.Release|x86.ActiveCfg = Release|Any CPU + {FDCE41C9-4A8D-4297-84B1-5AF613825142}.Release|x86.Build.0 = Release|Any CPU + {741B0A23-C181-4C96-B293-579DC7297E95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {741B0A23-C181-4C96-B293-579DC7297E95}.Debug|Any CPU.Build.0 = Debug|Any CPU + {741B0A23-C181-4C96-B293-579DC7297E95}.Debug|x64.ActiveCfg = Debug|Any CPU + {741B0A23-C181-4C96-B293-579DC7297E95}.Debug|x64.Build.0 = Debug|Any CPU + {741B0A23-C181-4C96-B293-579DC7297E95}.Debug|x86.ActiveCfg = Debug|Any CPU + {741B0A23-C181-4C96-B293-579DC7297E95}.Debug|x86.Build.0 = Debug|Any CPU + {741B0A23-C181-4C96-B293-579DC7297E95}.Release|Any CPU.ActiveCfg = Release|Any CPU + {741B0A23-C181-4C96-B293-579DC7297E95}.Release|Any CPU.Build.0 = Release|Any CPU + {741B0A23-C181-4C96-B293-579DC7297E95}.Release|x64.ActiveCfg = Release|Any CPU + {741B0A23-C181-4C96-B293-579DC7297E95}.Release|x64.Build.0 = Release|Any CPU + {741B0A23-C181-4C96-B293-579DC7297E95}.Release|x86.ActiveCfg = Release|Any CPU + {741B0A23-C181-4C96-B293-579DC7297E95}.Release|x86.Build.0 = Release|Any CPU + {04074FB8-69AA-4A30-9DFA-1D5E9B3FF58E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {04074FB8-69AA-4A30-9DFA-1D5E9B3FF58E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {04074FB8-69AA-4A30-9DFA-1D5E9B3FF58E}.Debug|x64.ActiveCfg = Debug|Any CPU + {04074FB8-69AA-4A30-9DFA-1D5E9B3FF58E}.Debug|x64.Build.0 = Debug|Any CPU + {04074FB8-69AA-4A30-9DFA-1D5E9B3FF58E}.Debug|x86.ActiveCfg = Debug|Any CPU + {04074FB8-69AA-4A30-9DFA-1D5E9B3FF58E}.Debug|x86.Build.0 = Debug|Any CPU + {04074FB8-69AA-4A30-9DFA-1D5E9B3FF58E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {04074FB8-69AA-4A30-9DFA-1D5E9B3FF58E}.Release|Any CPU.Build.0 = Release|Any CPU + {04074FB8-69AA-4A30-9DFA-1D5E9B3FF58E}.Release|x64.ActiveCfg = Release|Any CPU + {04074FB8-69AA-4A30-9DFA-1D5E9B3FF58E}.Release|x64.Build.0 = Release|Any CPU + {04074FB8-69AA-4A30-9DFA-1D5E9B3FF58E}.Release|x86.ActiveCfg = Release|Any CPU + {04074FB8-69AA-4A30-9DFA-1D5E9B3FF58E}.Release|x86.Build.0 = Release|Any CPU + {074BD54D-0C3D-4B25-B187-72A244534D86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {074BD54D-0C3D-4B25-B187-72A244534D86}.Debug|Any CPU.Build.0 = Debug|Any CPU + {074BD54D-0C3D-4B25-B187-72A244534D86}.Debug|x64.ActiveCfg = Debug|Any CPU + {074BD54D-0C3D-4B25-B187-72A244534D86}.Debug|x64.Build.0 = Debug|Any CPU + {074BD54D-0C3D-4B25-B187-72A244534D86}.Debug|x86.ActiveCfg = Debug|Any CPU + {074BD54D-0C3D-4B25-B187-72A244534D86}.Debug|x86.Build.0 = Debug|Any CPU + {074BD54D-0C3D-4B25-B187-72A244534D86}.Release|Any CPU.ActiveCfg = Release|Any CPU + {074BD54D-0C3D-4B25-B187-72A244534D86}.Release|Any CPU.Build.0 = Release|Any CPU + {074BD54D-0C3D-4B25-B187-72A244534D86}.Release|x64.ActiveCfg = Release|Any CPU + {074BD54D-0C3D-4B25-B187-72A244534D86}.Release|x64.Build.0 = Release|Any CPU + {074BD54D-0C3D-4B25-B187-72A244534D86}.Release|x86.ActiveCfg = Release|Any CPU + {074BD54D-0C3D-4B25-B187-72A244534D86}.Release|x86.Build.0 = Release|Any CPU + {45EE3C27-EFDB-4DD6-BD12-22FC16976B67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45EE3C27-EFDB-4DD6-BD12-22FC16976B67}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45EE3C27-EFDB-4DD6-BD12-22FC16976B67}.Debug|x64.ActiveCfg = Debug|Any CPU + {45EE3C27-EFDB-4DD6-BD12-22FC16976B67}.Debug|x64.Build.0 = Debug|Any CPU + {45EE3C27-EFDB-4DD6-BD12-22FC16976B67}.Debug|x86.ActiveCfg = Debug|Any CPU + {45EE3C27-EFDB-4DD6-BD12-22FC16976B67}.Debug|x86.Build.0 = Debug|Any CPU + {45EE3C27-EFDB-4DD6-BD12-22FC16976B67}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45EE3C27-EFDB-4DD6-BD12-22FC16976B67}.Release|Any CPU.Build.0 = Release|Any CPU + {45EE3C27-EFDB-4DD6-BD12-22FC16976B67}.Release|x64.ActiveCfg = Release|Any CPU + {45EE3C27-EFDB-4DD6-BD12-22FC16976B67}.Release|x64.Build.0 = Release|Any CPU + {45EE3C27-EFDB-4DD6-BD12-22FC16976B67}.Release|x86.ActiveCfg = Release|Any CPU + {45EE3C27-EFDB-4DD6-BD12-22FC16976B67}.Release|x86.Build.0 = Release|Any CPU + {F5BA06AB-54D9-4883-9CEB-C657DCEDF2AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F5BA06AB-54D9-4883-9CEB-C657DCEDF2AF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F5BA06AB-54D9-4883-9CEB-C657DCEDF2AF}.Debug|x64.ActiveCfg = Debug|Any CPU + {F5BA06AB-54D9-4883-9CEB-C657DCEDF2AF}.Debug|x64.Build.0 = Debug|Any CPU + {F5BA06AB-54D9-4883-9CEB-C657DCEDF2AF}.Debug|x86.ActiveCfg = Debug|Any CPU + {F5BA06AB-54D9-4883-9CEB-C657DCEDF2AF}.Debug|x86.Build.0 = Debug|Any CPU + {F5BA06AB-54D9-4883-9CEB-C657DCEDF2AF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F5BA06AB-54D9-4883-9CEB-C657DCEDF2AF}.Release|Any CPU.Build.0 = Release|Any CPU + {F5BA06AB-54D9-4883-9CEB-C657DCEDF2AF}.Release|x64.ActiveCfg = Release|Any CPU + {F5BA06AB-54D9-4883-9CEB-C657DCEDF2AF}.Release|x64.Build.0 = Release|Any CPU + {F5BA06AB-54D9-4883-9CEB-C657DCEDF2AF}.Release|x86.ActiveCfg = Release|Any CPU + {F5BA06AB-54D9-4883-9CEB-C657DCEDF2AF}.Release|x86.Build.0 = Release|Any CPU + {B5C35C2A-F6F3-4BC1-8F9F-6CB51B9DE7CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B5C35C2A-F6F3-4BC1-8F9F-6CB51B9DE7CD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B5C35C2A-F6F3-4BC1-8F9F-6CB51B9DE7CD}.Debug|x64.ActiveCfg = Debug|Any CPU + {B5C35C2A-F6F3-4BC1-8F9F-6CB51B9DE7CD}.Debug|x64.Build.0 = Debug|Any CPU + {B5C35C2A-F6F3-4BC1-8F9F-6CB51B9DE7CD}.Debug|x86.ActiveCfg = Debug|Any CPU + {B5C35C2A-F6F3-4BC1-8F9F-6CB51B9DE7CD}.Debug|x86.Build.0 = Debug|Any CPU + {B5C35C2A-F6F3-4BC1-8F9F-6CB51B9DE7CD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B5C35C2A-F6F3-4BC1-8F9F-6CB51B9DE7CD}.Release|Any CPU.Build.0 = Release|Any CPU + {B5C35C2A-F6F3-4BC1-8F9F-6CB51B9DE7CD}.Release|x64.ActiveCfg = Release|Any CPU + {B5C35C2A-F6F3-4BC1-8F9F-6CB51B9DE7CD}.Release|x64.Build.0 = Release|Any CPU + {B5C35C2A-F6F3-4BC1-8F9F-6CB51B9DE7CD}.Release|x86.ActiveCfg = Release|Any CPU + {B5C35C2A-F6F3-4BC1-8F9F-6CB51B9DE7CD}.Release|x86.Build.0 = Release|Any CPU + {7346A356-DF87-4112-AA88-8E63623D0294}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7346A356-DF87-4112-AA88-8E63623D0294}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7346A356-DF87-4112-AA88-8E63623D0294}.Debug|x64.ActiveCfg = Debug|Any CPU + {7346A356-DF87-4112-AA88-8E63623D0294}.Debug|x64.Build.0 = Debug|Any CPU + {7346A356-DF87-4112-AA88-8E63623D0294}.Debug|x86.ActiveCfg = Debug|Any CPU + {7346A356-DF87-4112-AA88-8E63623D0294}.Debug|x86.Build.0 = Debug|Any CPU + {7346A356-DF87-4112-AA88-8E63623D0294}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7346A356-DF87-4112-AA88-8E63623D0294}.Release|Any CPU.Build.0 = Release|Any CPU + {7346A356-DF87-4112-AA88-8E63623D0294}.Release|x64.ActiveCfg = Release|Any CPU + {7346A356-DF87-4112-AA88-8E63623D0294}.Release|x64.Build.0 = Release|Any CPU + {7346A356-DF87-4112-AA88-8E63623D0294}.Release|x86.ActiveCfg = Release|Any CPU + {7346A356-DF87-4112-AA88-8E63623D0294}.Release|x86.Build.0 = Release|Any CPU + {CC589D36-55E1-4433-BABD-33674DF92534}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CC589D36-55E1-4433-BABD-33674DF92534}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CC589D36-55E1-4433-BABD-33674DF92534}.Debug|x64.ActiveCfg = Debug|Any CPU + {CC589D36-55E1-4433-BABD-33674DF92534}.Debug|x64.Build.0 = Debug|Any CPU + {CC589D36-55E1-4433-BABD-33674DF92534}.Debug|x86.ActiveCfg = Debug|Any CPU + {CC589D36-55E1-4433-BABD-33674DF92534}.Debug|x86.Build.0 = Debug|Any CPU + {CC589D36-55E1-4433-BABD-33674DF92534}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CC589D36-55E1-4433-BABD-33674DF92534}.Release|Any CPU.Build.0 = Release|Any CPU + {CC589D36-55E1-4433-BABD-33674DF92534}.Release|x64.ActiveCfg = Release|Any CPU + {CC589D36-55E1-4433-BABD-33674DF92534}.Release|x64.Build.0 = Release|Any CPU + {CC589D36-55E1-4433-BABD-33674DF92534}.Release|x86.ActiveCfg = Release|Any CPU + {CC589D36-55E1-4433-BABD-33674DF92534}.Release|x86.Build.0 = Release|Any CPU + {A42573BF-BEE2-4041-8C7B-483A559D2194}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A42573BF-BEE2-4041-8C7B-483A559D2194}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A42573BF-BEE2-4041-8C7B-483A559D2194}.Debug|x64.ActiveCfg = Debug|Any CPU + {A42573BF-BEE2-4041-8C7B-483A559D2194}.Debug|x64.Build.0 = Debug|Any CPU + {A42573BF-BEE2-4041-8C7B-483A559D2194}.Debug|x86.ActiveCfg = Debug|Any CPU + {A42573BF-BEE2-4041-8C7B-483A559D2194}.Debug|x86.Build.0 = Debug|Any CPU + {A42573BF-BEE2-4041-8C7B-483A559D2194}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A42573BF-BEE2-4041-8C7B-483A559D2194}.Release|Any CPU.Build.0 = Release|Any CPU + {A42573BF-BEE2-4041-8C7B-483A559D2194}.Release|x64.ActiveCfg = Release|Any CPU + {A42573BF-BEE2-4041-8C7B-483A559D2194}.Release|x64.Build.0 = Release|Any CPU + {A42573BF-BEE2-4041-8C7B-483A559D2194}.Release|x86.ActiveCfg = Release|Any CPU + {A42573BF-BEE2-4041-8C7B-483A559D2194}.Release|x86.Build.0 = Release|Any CPU + {DDFBAA9D-416B-4418-A697-1F6414AE1DFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DDFBAA9D-416B-4418-A697-1F6414AE1DFC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DDFBAA9D-416B-4418-A697-1F6414AE1DFC}.Debug|x64.ActiveCfg = Debug|Any CPU + {DDFBAA9D-416B-4418-A697-1F6414AE1DFC}.Debug|x64.Build.0 = Debug|Any CPU + {DDFBAA9D-416B-4418-A697-1F6414AE1DFC}.Debug|x86.ActiveCfg = Debug|Any CPU + {DDFBAA9D-416B-4418-A697-1F6414AE1DFC}.Debug|x86.Build.0 = Debug|Any CPU + {DDFBAA9D-416B-4418-A697-1F6414AE1DFC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DDFBAA9D-416B-4418-A697-1F6414AE1DFC}.Release|Any CPU.Build.0 = Release|Any CPU + {DDFBAA9D-416B-4418-A697-1F6414AE1DFC}.Release|x64.ActiveCfg = Release|Any CPU + {DDFBAA9D-416B-4418-A697-1F6414AE1DFC}.Release|x64.Build.0 = Release|Any CPU + {DDFBAA9D-416B-4418-A697-1F6414AE1DFC}.Release|x86.ActiveCfg = Release|Any CPU + {DDFBAA9D-416B-4418-A697-1F6414AE1DFC}.Release|x86.Build.0 = Release|Any CPU + {E1445FE8-FCA2-4740-9F69-107BF92F1EA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E1445FE8-FCA2-4740-9F69-107BF92F1EA1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E1445FE8-FCA2-4740-9F69-107BF92F1EA1}.Debug|x64.ActiveCfg = Debug|Any CPU + {E1445FE8-FCA2-4740-9F69-107BF92F1EA1}.Debug|x64.Build.0 = Debug|Any CPU + {E1445FE8-FCA2-4740-9F69-107BF92F1EA1}.Debug|x86.ActiveCfg = Debug|Any CPU + {E1445FE8-FCA2-4740-9F69-107BF92F1EA1}.Debug|x86.Build.0 = Debug|Any CPU + {E1445FE8-FCA2-4740-9F69-107BF92F1EA1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E1445FE8-FCA2-4740-9F69-107BF92F1EA1}.Release|Any CPU.Build.0 = Release|Any CPU + {E1445FE8-FCA2-4740-9F69-107BF92F1EA1}.Release|x64.ActiveCfg = Release|Any CPU + {E1445FE8-FCA2-4740-9F69-107BF92F1EA1}.Release|x64.Build.0 = Release|Any CPU + {E1445FE8-FCA2-4740-9F69-107BF92F1EA1}.Release|x86.ActiveCfg = Release|Any CPU + {E1445FE8-FCA2-4740-9F69-107BF92F1EA1}.Release|x86.Build.0 = Release|Any CPU + {4944C6D1-575E-46D9-A5DF-0AA17EF721BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4944C6D1-575E-46D9-A5DF-0AA17EF721BE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4944C6D1-575E-46D9-A5DF-0AA17EF721BE}.Debug|x64.ActiveCfg = Debug|Any CPU + {4944C6D1-575E-46D9-A5DF-0AA17EF721BE}.Debug|x64.Build.0 = Debug|Any CPU + {4944C6D1-575E-46D9-A5DF-0AA17EF721BE}.Debug|x86.ActiveCfg = Debug|Any CPU + {4944C6D1-575E-46D9-A5DF-0AA17EF721BE}.Debug|x86.Build.0 = Debug|Any CPU + {4944C6D1-575E-46D9-A5DF-0AA17EF721BE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4944C6D1-575E-46D9-A5DF-0AA17EF721BE}.Release|Any CPU.Build.0 = Release|Any CPU + {4944C6D1-575E-46D9-A5DF-0AA17EF721BE}.Release|x64.ActiveCfg = Release|Any CPU + {4944C6D1-575E-46D9-A5DF-0AA17EF721BE}.Release|x64.Build.0 = Release|Any CPU + {4944C6D1-575E-46D9-A5DF-0AA17EF721BE}.Release|x86.ActiveCfg = Release|Any CPU + {4944C6D1-575E-46D9-A5DF-0AA17EF721BE}.Release|x86.Build.0 = Release|Any CPU + {53900074-9F84-4F09-90CF-35045B95ABDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {53900074-9F84-4F09-90CF-35045B95ABDE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {53900074-9F84-4F09-90CF-35045B95ABDE}.Debug|x64.ActiveCfg = Debug|Any CPU + {53900074-9F84-4F09-90CF-35045B95ABDE}.Debug|x64.Build.0 = Debug|Any CPU + {53900074-9F84-4F09-90CF-35045B95ABDE}.Debug|x86.ActiveCfg = Debug|Any CPU + {53900074-9F84-4F09-90CF-35045B95ABDE}.Debug|x86.Build.0 = Debug|Any CPU + {53900074-9F84-4F09-90CF-35045B95ABDE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {53900074-9F84-4F09-90CF-35045B95ABDE}.Release|Any CPU.Build.0 = Release|Any CPU + {53900074-9F84-4F09-90CF-35045B95ABDE}.Release|x64.ActiveCfg = Release|Any CPU + {53900074-9F84-4F09-90CF-35045B95ABDE}.Release|x64.Build.0 = Release|Any CPU + {53900074-9F84-4F09-90CF-35045B95ABDE}.Release|x86.ActiveCfg = Release|Any CPU + {53900074-9F84-4F09-90CF-35045B95ABDE}.Release|x86.Build.0 = Release|Any CPU + {D086CD6F-28E2-40D5-99BA-2EB2C1C579CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D086CD6F-28E2-40D5-99BA-2EB2C1C579CC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D086CD6F-28E2-40D5-99BA-2EB2C1C579CC}.Debug|x64.ActiveCfg = Debug|Any CPU + {D086CD6F-28E2-40D5-99BA-2EB2C1C579CC}.Debug|x64.Build.0 = Debug|Any CPU + {D086CD6F-28E2-40D5-99BA-2EB2C1C579CC}.Debug|x86.ActiveCfg = Debug|Any CPU + {D086CD6F-28E2-40D5-99BA-2EB2C1C579CC}.Debug|x86.Build.0 = Debug|Any CPU + {D086CD6F-28E2-40D5-99BA-2EB2C1C579CC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D086CD6F-28E2-40D5-99BA-2EB2C1C579CC}.Release|Any CPU.Build.0 = Release|Any CPU + {D086CD6F-28E2-40D5-99BA-2EB2C1C579CC}.Release|x64.ActiveCfg = Release|Any CPU + {D086CD6F-28E2-40D5-99BA-2EB2C1C579CC}.Release|x64.Build.0 = Release|Any CPU + {D086CD6F-28E2-40D5-99BA-2EB2C1C579CC}.Release|x86.ActiveCfg = Release|Any CPU + {D086CD6F-28E2-40D5-99BA-2EB2C1C579CC}.Release|x86.Build.0 = Release|Any CPU + {CBF66CC9-7414-42F0-8695-7B085A91A078}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CBF66CC9-7414-42F0-8695-7B085A91A078}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CBF66CC9-7414-42F0-8695-7B085A91A078}.Debug|x64.ActiveCfg = Debug|Any CPU + {CBF66CC9-7414-42F0-8695-7B085A91A078}.Debug|x64.Build.0 = Debug|Any CPU + {CBF66CC9-7414-42F0-8695-7B085A91A078}.Debug|x86.ActiveCfg = Debug|Any CPU + {CBF66CC9-7414-42F0-8695-7B085A91A078}.Debug|x86.Build.0 = Debug|Any CPU + {CBF66CC9-7414-42F0-8695-7B085A91A078}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CBF66CC9-7414-42F0-8695-7B085A91A078}.Release|Any CPU.Build.0 = Release|Any CPU + {CBF66CC9-7414-42F0-8695-7B085A91A078}.Release|x64.ActiveCfg = Release|Any CPU + {CBF66CC9-7414-42F0-8695-7B085A91A078}.Release|x64.Build.0 = Release|Any CPU + {CBF66CC9-7414-42F0-8695-7B085A91A078}.Release|x86.ActiveCfg = Release|Any CPU + {CBF66CC9-7414-42F0-8695-7B085A91A078}.Release|x86.Build.0 = Release|Any CPU + {5EF8288A-936B-4037-A5B6-8C760DC8EF47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5EF8288A-936B-4037-A5B6-8C760DC8EF47}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5EF8288A-936B-4037-A5B6-8C760DC8EF47}.Debug|x64.ActiveCfg = Debug|Any CPU + {5EF8288A-936B-4037-A5B6-8C760DC8EF47}.Debug|x64.Build.0 = Debug|Any CPU + {5EF8288A-936B-4037-A5B6-8C760DC8EF47}.Debug|x86.ActiveCfg = Debug|Any CPU + {5EF8288A-936B-4037-A5B6-8C760DC8EF47}.Debug|x86.Build.0 = Debug|Any CPU + {5EF8288A-936B-4037-A5B6-8C760DC8EF47}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5EF8288A-936B-4037-A5B6-8C760DC8EF47}.Release|Any CPU.Build.0 = Release|Any CPU + {5EF8288A-936B-4037-A5B6-8C760DC8EF47}.Release|x64.ActiveCfg = Release|Any CPU + {5EF8288A-936B-4037-A5B6-8C760DC8EF47}.Release|x64.Build.0 = Release|Any CPU + {5EF8288A-936B-4037-A5B6-8C760DC8EF47}.Release|x86.ActiveCfg = Release|Any CPU + {5EF8288A-936B-4037-A5B6-8C760DC8EF47}.Release|x86.Build.0 = Release|Any CPU + {386DD33E-6973-4FAE-B6D5-E1908E4FB410}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {386DD33E-6973-4FAE-B6D5-E1908E4FB410}.Debug|Any CPU.Build.0 = Debug|Any CPU + {386DD33E-6973-4FAE-B6D5-E1908E4FB410}.Debug|x64.ActiveCfg = Debug|Any CPU + {386DD33E-6973-4FAE-B6D5-E1908E4FB410}.Debug|x64.Build.0 = Debug|Any CPU + {386DD33E-6973-4FAE-B6D5-E1908E4FB410}.Debug|x86.ActiveCfg = Debug|Any CPU + {386DD33E-6973-4FAE-B6D5-E1908E4FB410}.Debug|x86.Build.0 = Debug|Any CPU + {386DD33E-6973-4FAE-B6D5-E1908E4FB410}.Release|Any CPU.ActiveCfg = Release|Any CPU + {386DD33E-6973-4FAE-B6D5-E1908E4FB410}.Release|Any CPU.Build.0 = Release|Any CPU + {386DD33E-6973-4FAE-B6D5-E1908E4FB410}.Release|x64.ActiveCfg = Release|Any CPU + {386DD33E-6973-4FAE-B6D5-E1908E4FB410}.Release|x64.Build.0 = Release|Any CPU + {386DD33E-6973-4FAE-B6D5-E1908E4FB410}.Release|x86.ActiveCfg = Release|Any CPU + {386DD33E-6973-4FAE-B6D5-E1908E4FB410}.Release|x86.Build.0 = Release|Any CPU + {1872225F-5804-4ED5-BC4E-5FEC1B7C802E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1872225F-5804-4ED5-BC4E-5FEC1B7C802E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1872225F-5804-4ED5-BC4E-5FEC1B7C802E}.Debug|x64.ActiveCfg = Debug|Any CPU + {1872225F-5804-4ED5-BC4E-5FEC1B7C802E}.Debug|x64.Build.0 = Debug|Any CPU + {1872225F-5804-4ED5-BC4E-5FEC1B7C802E}.Debug|x86.ActiveCfg = Debug|Any CPU + {1872225F-5804-4ED5-BC4E-5FEC1B7C802E}.Debug|x86.Build.0 = Debug|Any CPU + {1872225F-5804-4ED5-BC4E-5FEC1B7C802E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1872225F-5804-4ED5-BC4E-5FEC1B7C802E}.Release|Any CPU.Build.0 = Release|Any CPU + {1872225F-5804-4ED5-BC4E-5FEC1B7C802E}.Release|x64.ActiveCfg = Release|Any CPU + {1872225F-5804-4ED5-BC4E-5FEC1B7C802E}.Release|x64.Build.0 = Release|Any CPU + {1872225F-5804-4ED5-BC4E-5FEC1B7C802E}.Release|x86.ActiveCfg = Release|Any CPU + {1872225F-5804-4ED5-BC4E-5FEC1B7C802E}.Release|x86.Build.0 = Release|Any CPU + {303F01E1-A8D3-4CE1-86CE-C3A8AE5DF7DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {303F01E1-A8D3-4CE1-86CE-C3A8AE5DF7DB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {303F01E1-A8D3-4CE1-86CE-C3A8AE5DF7DB}.Debug|x64.ActiveCfg = Debug|Any CPU + {303F01E1-A8D3-4CE1-86CE-C3A8AE5DF7DB}.Debug|x64.Build.0 = Debug|Any CPU + {303F01E1-A8D3-4CE1-86CE-C3A8AE5DF7DB}.Debug|x86.ActiveCfg = Debug|Any CPU + {303F01E1-A8D3-4CE1-86CE-C3A8AE5DF7DB}.Debug|x86.Build.0 = Debug|Any CPU + {303F01E1-A8D3-4CE1-86CE-C3A8AE5DF7DB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {303F01E1-A8D3-4CE1-86CE-C3A8AE5DF7DB}.Release|Any CPU.Build.0 = Release|Any CPU + {303F01E1-A8D3-4CE1-86CE-C3A8AE5DF7DB}.Release|x64.ActiveCfg = Release|Any CPU + {303F01E1-A8D3-4CE1-86CE-C3A8AE5DF7DB}.Release|x64.Build.0 = Release|Any CPU + {303F01E1-A8D3-4CE1-86CE-C3A8AE5DF7DB}.Release|x86.ActiveCfg = Release|Any CPU + {303F01E1-A8D3-4CE1-86CE-C3A8AE5DF7DB}.Release|x86.Build.0 = Release|Any CPU + {BE99B540-9882-4585-B741-58BB99B4F82A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BE99B540-9882-4585-B741-58BB99B4F82A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BE99B540-9882-4585-B741-58BB99B4F82A}.Debug|x64.ActiveCfg = Debug|Any CPU + {BE99B540-9882-4585-B741-58BB99B4F82A}.Debug|x64.Build.0 = Debug|Any CPU + {BE99B540-9882-4585-B741-58BB99B4F82A}.Debug|x86.ActiveCfg = Debug|Any CPU + {BE99B540-9882-4585-B741-58BB99B4F82A}.Debug|x86.Build.0 = Debug|Any CPU + {BE99B540-9882-4585-B741-58BB99B4F82A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BE99B540-9882-4585-B741-58BB99B4F82A}.Release|Any CPU.Build.0 = Release|Any CPU + {BE99B540-9882-4585-B741-58BB99B4F82A}.Release|x64.ActiveCfg = Release|Any CPU + {BE99B540-9882-4585-B741-58BB99B4F82A}.Release|x64.Build.0 = Release|Any CPU + {BE99B540-9882-4585-B741-58BB99B4F82A}.Release|x86.ActiveCfg = Release|Any CPU + {BE99B540-9882-4585-B741-58BB99B4F82A}.Release|x86.Build.0 = Release|Any CPU + {03744BE4-74A4-43B2-8AA6-6A193C9354A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {03744BE4-74A4-43B2-8AA6-6A193C9354A1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {03744BE4-74A4-43B2-8AA6-6A193C9354A1}.Debug|x64.ActiveCfg = Debug|Any CPU + {03744BE4-74A4-43B2-8AA6-6A193C9354A1}.Debug|x64.Build.0 = Debug|Any CPU + {03744BE4-74A4-43B2-8AA6-6A193C9354A1}.Debug|x86.ActiveCfg = Debug|Any CPU + {03744BE4-74A4-43B2-8AA6-6A193C9354A1}.Debug|x86.Build.0 = Debug|Any CPU + {03744BE4-74A4-43B2-8AA6-6A193C9354A1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {03744BE4-74A4-43B2-8AA6-6A193C9354A1}.Release|Any CPU.Build.0 = Release|Any CPU + {03744BE4-74A4-43B2-8AA6-6A193C9354A1}.Release|x64.ActiveCfg = Release|Any CPU + {03744BE4-74A4-43B2-8AA6-6A193C9354A1}.Release|x64.Build.0 = Release|Any CPU + {03744BE4-74A4-43B2-8AA6-6A193C9354A1}.Release|x86.ActiveCfg = Release|Any CPU + {03744BE4-74A4-43B2-8AA6-6A193C9354A1}.Release|x86.Build.0 = Release|Any CPU + {196FF6B3-7BAB-44AE-B647-E03754FC703F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {196FF6B3-7BAB-44AE-B647-E03754FC703F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {196FF6B3-7BAB-44AE-B647-E03754FC703F}.Debug|x64.ActiveCfg = Debug|Any CPU + {196FF6B3-7BAB-44AE-B647-E03754FC703F}.Debug|x64.Build.0 = Debug|Any CPU + {196FF6B3-7BAB-44AE-B647-E03754FC703F}.Debug|x86.ActiveCfg = Debug|Any CPU + {196FF6B3-7BAB-44AE-B647-E03754FC703F}.Debug|x86.Build.0 = Debug|Any CPU + {196FF6B3-7BAB-44AE-B647-E03754FC703F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {196FF6B3-7BAB-44AE-B647-E03754FC703F}.Release|Any CPU.Build.0 = Release|Any CPU + {196FF6B3-7BAB-44AE-B647-E03754FC703F}.Release|x64.ActiveCfg = Release|Any CPU + {196FF6B3-7BAB-44AE-B647-E03754FC703F}.Release|x64.Build.0 = Release|Any CPU + {196FF6B3-7BAB-44AE-B647-E03754FC703F}.Release|x86.ActiveCfg = Release|Any CPU + {196FF6B3-7BAB-44AE-B647-E03754FC703F}.Release|x86.Build.0 = Release|Any CPU + {5D173EBB-9658-490F-95D1-01D126273382}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5D173EBB-9658-490F-95D1-01D126273382}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5D173EBB-9658-490F-95D1-01D126273382}.Debug|x64.ActiveCfg = Debug|Any CPU + {5D173EBB-9658-490F-95D1-01D126273382}.Debug|x64.Build.0 = Debug|Any CPU + {5D173EBB-9658-490F-95D1-01D126273382}.Debug|x86.ActiveCfg = Debug|Any CPU + {5D173EBB-9658-490F-95D1-01D126273382}.Debug|x86.Build.0 = Debug|Any CPU + {5D173EBB-9658-490F-95D1-01D126273382}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5D173EBB-9658-490F-95D1-01D126273382}.Release|Any CPU.Build.0 = Release|Any CPU + {5D173EBB-9658-490F-95D1-01D126273382}.Release|x64.ActiveCfg = Release|Any CPU + {5D173EBB-9658-490F-95D1-01D126273382}.Release|x64.Build.0 = Release|Any CPU + {5D173EBB-9658-490F-95D1-01D126273382}.Release|x86.ActiveCfg = Release|Any CPU + {5D173EBB-9658-490F-95D1-01D126273382}.Release|x86.Build.0 = Release|Any CPU + {97FD7520-2802-4188-B33A-5CAC39FD4F5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {97FD7520-2802-4188-B33A-5CAC39FD4F5F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {97FD7520-2802-4188-B33A-5CAC39FD4F5F}.Debug|x64.ActiveCfg = Debug|Any CPU + {97FD7520-2802-4188-B33A-5CAC39FD4F5F}.Debug|x64.Build.0 = Debug|Any CPU + {97FD7520-2802-4188-B33A-5CAC39FD4F5F}.Debug|x86.ActiveCfg = Debug|Any CPU + {97FD7520-2802-4188-B33A-5CAC39FD4F5F}.Debug|x86.Build.0 = Debug|Any CPU + {97FD7520-2802-4188-B33A-5CAC39FD4F5F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {97FD7520-2802-4188-B33A-5CAC39FD4F5F}.Release|Any CPU.Build.0 = Release|Any CPU + {97FD7520-2802-4188-B33A-5CAC39FD4F5F}.Release|x64.ActiveCfg = Release|Any CPU + {97FD7520-2802-4188-B33A-5CAC39FD4F5F}.Release|x64.Build.0 = Release|Any CPU + {97FD7520-2802-4188-B33A-5CAC39FD4F5F}.Release|x86.ActiveCfg = Release|Any CPU + {97FD7520-2802-4188-B33A-5CAC39FD4F5F}.Release|x86.Build.0 = Release|Any CPU + {D4959172-0EB9-440F-B828-CAC8F922849D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D4959172-0EB9-440F-B828-CAC8F922849D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D4959172-0EB9-440F-B828-CAC8F922849D}.Debug|x64.ActiveCfg = Debug|Any CPU + {D4959172-0EB9-440F-B828-CAC8F922849D}.Debug|x64.Build.0 = Debug|Any CPU + {D4959172-0EB9-440F-B828-CAC8F922849D}.Debug|x86.ActiveCfg = Debug|Any CPU + {D4959172-0EB9-440F-B828-CAC8F922849D}.Debug|x86.Build.0 = Debug|Any CPU + {D4959172-0EB9-440F-B828-CAC8F922849D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D4959172-0EB9-440F-B828-CAC8F922849D}.Release|Any CPU.Build.0 = Release|Any CPU + {D4959172-0EB9-440F-B828-CAC8F922849D}.Release|x64.ActiveCfg = Release|Any CPU + {D4959172-0EB9-440F-B828-CAC8F922849D}.Release|x64.Build.0 = Release|Any CPU + {D4959172-0EB9-440F-B828-CAC8F922849D}.Release|x86.ActiveCfg = Release|Any CPU + {D4959172-0EB9-440F-B828-CAC8F922849D}.Release|x86.Build.0 = Release|Any CPU + {E46BF95A-E81E-4625-80D2-640849218A88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E46BF95A-E81E-4625-80D2-640849218A88}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E46BF95A-E81E-4625-80D2-640849218A88}.Debug|x64.ActiveCfg = Debug|Any CPU + {E46BF95A-E81E-4625-80D2-640849218A88}.Debug|x64.Build.0 = Debug|Any CPU + {E46BF95A-E81E-4625-80D2-640849218A88}.Debug|x86.ActiveCfg = Debug|Any CPU + {E46BF95A-E81E-4625-80D2-640849218A88}.Debug|x86.Build.0 = Debug|Any CPU + {E46BF95A-E81E-4625-80D2-640849218A88}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E46BF95A-E81E-4625-80D2-640849218A88}.Release|Any CPU.Build.0 = Release|Any CPU + {E46BF95A-E81E-4625-80D2-640849218A88}.Release|x64.ActiveCfg = Release|Any CPU + {E46BF95A-E81E-4625-80D2-640849218A88}.Release|x64.Build.0 = Release|Any CPU + {E46BF95A-E81E-4625-80D2-640849218A88}.Release|x86.ActiveCfg = Release|Any CPU + {E46BF95A-E81E-4625-80D2-640849218A88}.Release|x86.Build.0 = Release|Any CPU + {4A8CDF3E-F09B-4486-AC6A-465CF921C653}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A8CDF3E-F09B-4486-AC6A-465CF921C653}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A8CDF3E-F09B-4486-AC6A-465CF921C653}.Debug|x64.ActiveCfg = Debug|Any CPU + {4A8CDF3E-F09B-4486-AC6A-465CF921C653}.Debug|x64.Build.0 = Debug|Any CPU + {4A8CDF3E-F09B-4486-AC6A-465CF921C653}.Debug|x86.ActiveCfg = Debug|Any CPU + {4A8CDF3E-F09B-4486-AC6A-465CF921C653}.Debug|x86.Build.0 = Debug|Any CPU + {4A8CDF3E-F09B-4486-AC6A-465CF921C653}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A8CDF3E-F09B-4486-AC6A-465CF921C653}.Release|Any CPU.Build.0 = Release|Any CPU + {4A8CDF3E-F09B-4486-AC6A-465CF921C653}.Release|x64.ActiveCfg = Release|Any CPU + {4A8CDF3E-F09B-4486-AC6A-465CF921C653}.Release|x64.Build.0 = Release|Any CPU + {4A8CDF3E-F09B-4486-AC6A-465CF921C653}.Release|x86.ActiveCfg = Release|Any CPU + {4A8CDF3E-F09B-4486-AC6A-465CF921C653}.Release|x86.Build.0 = Release|Any CPU + {03D7E2E8-F00D-44B8-88EF-83E4FDA0E79B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {03D7E2E8-F00D-44B8-88EF-83E4FDA0E79B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {03D7E2E8-F00D-44B8-88EF-83E4FDA0E79B}.Debug|x64.ActiveCfg = Debug|Any CPU + {03D7E2E8-F00D-44B8-88EF-83E4FDA0E79B}.Debug|x64.Build.0 = Debug|Any CPU + {03D7E2E8-F00D-44B8-88EF-83E4FDA0E79B}.Debug|x86.ActiveCfg = Debug|Any CPU + {03D7E2E8-F00D-44B8-88EF-83E4FDA0E79B}.Debug|x86.Build.0 = Debug|Any CPU + {03D7E2E8-F00D-44B8-88EF-83E4FDA0E79B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {03D7E2E8-F00D-44B8-88EF-83E4FDA0E79B}.Release|Any CPU.Build.0 = Release|Any CPU + {03D7E2E8-F00D-44B8-88EF-83E4FDA0E79B}.Release|x64.ActiveCfg = Release|Any CPU + {03D7E2E8-F00D-44B8-88EF-83E4FDA0E79B}.Release|x64.Build.0 = Release|Any CPU + {03D7E2E8-F00D-44B8-88EF-83E4FDA0E79B}.Release|x86.ActiveCfg = Release|Any CPU + {03D7E2E8-F00D-44B8-88EF-83E4FDA0E79B}.Release|x86.Build.0 = Release|Any CPU + {F1FEED9A-B4C8-4B05-98AB-DA695D9578AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F1FEED9A-B4C8-4B05-98AB-DA695D9578AA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F1FEED9A-B4C8-4B05-98AB-DA695D9578AA}.Debug|x64.ActiveCfg = Debug|Any CPU + {F1FEED9A-B4C8-4B05-98AB-DA695D9578AA}.Debug|x64.Build.0 = Debug|Any CPU + {F1FEED9A-B4C8-4B05-98AB-DA695D9578AA}.Debug|x86.ActiveCfg = Debug|Any CPU + {F1FEED9A-B4C8-4B05-98AB-DA695D9578AA}.Debug|x86.Build.0 = Debug|Any CPU + {F1FEED9A-B4C8-4B05-98AB-DA695D9578AA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F1FEED9A-B4C8-4B05-98AB-DA695D9578AA}.Release|Any CPU.Build.0 = Release|Any CPU + {F1FEED9A-B4C8-4B05-98AB-DA695D9578AA}.Release|x64.ActiveCfg = Release|Any CPU + {F1FEED9A-B4C8-4B05-98AB-DA695D9578AA}.Release|x64.Build.0 = Release|Any CPU + {F1FEED9A-B4C8-4B05-98AB-DA695D9578AA}.Release|x86.ActiveCfg = Release|Any CPU + {F1FEED9A-B4C8-4B05-98AB-DA695D9578AA}.Release|x86.Build.0 = Release|Any CPU + {0B9200B0-2289-4269-B420-26AE29231903}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0B9200B0-2289-4269-B420-26AE29231903}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0B9200B0-2289-4269-B420-26AE29231903}.Debug|x64.ActiveCfg = Debug|Any CPU + {0B9200B0-2289-4269-B420-26AE29231903}.Debug|x64.Build.0 = Debug|Any CPU + {0B9200B0-2289-4269-B420-26AE29231903}.Debug|x86.ActiveCfg = Debug|Any CPU + {0B9200B0-2289-4269-B420-26AE29231903}.Debug|x86.Build.0 = Debug|Any CPU + {0B9200B0-2289-4269-B420-26AE29231903}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0B9200B0-2289-4269-B420-26AE29231903}.Release|Any CPU.Build.0 = Release|Any CPU + {0B9200B0-2289-4269-B420-26AE29231903}.Release|x64.ActiveCfg = Release|Any CPU + {0B9200B0-2289-4269-B420-26AE29231903}.Release|x64.Build.0 = Release|Any CPU + {0B9200B0-2289-4269-B420-26AE29231903}.Release|x86.ActiveCfg = Release|Any CPU + {0B9200B0-2289-4269-B420-26AE29231903}.Release|x86.Build.0 = Release|Any CPU + {4F9B0010-6E34-44A2-B88F-477E2F9C9A5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F9B0010-6E34-44A2-B88F-477E2F9C9A5D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F9B0010-6E34-44A2-B88F-477E2F9C9A5D}.Debug|x64.ActiveCfg = Debug|Any CPU + {4F9B0010-6E34-44A2-B88F-477E2F9C9A5D}.Debug|x64.Build.0 = Debug|Any CPU + {4F9B0010-6E34-44A2-B88F-477E2F9C9A5D}.Debug|x86.ActiveCfg = Debug|Any CPU + {4F9B0010-6E34-44A2-B88F-477E2F9C9A5D}.Debug|x86.Build.0 = Debug|Any CPU + {4F9B0010-6E34-44A2-B88F-477E2F9C9A5D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4F9B0010-6E34-44A2-B88F-477E2F9C9A5D}.Release|Any CPU.Build.0 = Release|Any CPU + {4F9B0010-6E34-44A2-B88F-477E2F9C9A5D}.Release|x64.ActiveCfg = Release|Any CPU + {4F9B0010-6E34-44A2-B88F-477E2F9C9A5D}.Release|x64.Build.0 = Release|Any CPU + {4F9B0010-6E34-44A2-B88F-477E2F9C9A5D}.Release|x86.ActiveCfg = Release|Any CPU + {4F9B0010-6E34-44A2-B88F-477E2F9C9A5D}.Release|x86.Build.0 = Release|Any CPU + {72A253E0-79E2-453B-869C-6E343221B822}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {72A253E0-79E2-453B-869C-6E343221B822}.Debug|Any CPU.Build.0 = Debug|Any CPU + {72A253E0-79E2-453B-869C-6E343221B822}.Debug|x64.ActiveCfg = Debug|Any CPU + {72A253E0-79E2-453B-869C-6E343221B822}.Debug|x64.Build.0 = Debug|Any CPU + {72A253E0-79E2-453B-869C-6E343221B822}.Debug|x86.ActiveCfg = Debug|Any CPU + {72A253E0-79E2-453B-869C-6E343221B822}.Debug|x86.Build.0 = Debug|Any CPU + {72A253E0-79E2-453B-869C-6E343221B822}.Release|Any CPU.ActiveCfg = Release|Any CPU + {72A253E0-79E2-453B-869C-6E343221B822}.Release|Any CPU.Build.0 = Release|Any CPU + {72A253E0-79E2-453B-869C-6E343221B822}.Release|x64.ActiveCfg = Release|Any CPU + {72A253E0-79E2-453B-869C-6E343221B822}.Release|x64.Build.0 = Release|Any CPU + {72A253E0-79E2-453B-869C-6E343221B822}.Release|x86.ActiveCfg = Release|Any CPU + {72A253E0-79E2-453B-869C-6E343221B822}.Release|x86.Build.0 = Release|Any CPU + {A92D9AD1-67D0-48A4-B954-47A0F022B180}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A92D9AD1-67D0-48A4-B954-47A0F022B180}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A92D9AD1-67D0-48A4-B954-47A0F022B180}.Debug|x64.ActiveCfg = Debug|Any CPU + {A92D9AD1-67D0-48A4-B954-47A0F022B180}.Debug|x64.Build.0 = Debug|Any CPU + {A92D9AD1-67D0-48A4-B954-47A0F022B180}.Debug|x86.ActiveCfg = Debug|Any CPU + {A92D9AD1-67D0-48A4-B954-47A0F022B180}.Debug|x86.Build.0 = Debug|Any CPU + {A92D9AD1-67D0-48A4-B954-47A0F022B180}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A92D9AD1-67D0-48A4-B954-47A0F022B180}.Release|Any CPU.Build.0 = Release|Any CPU + {A92D9AD1-67D0-48A4-B954-47A0F022B180}.Release|x64.ActiveCfg = Release|Any CPU + {A92D9AD1-67D0-48A4-B954-47A0F022B180}.Release|x64.Build.0 = Release|Any CPU + {A92D9AD1-67D0-48A4-B954-47A0F022B180}.Release|x86.ActiveCfg = Release|Any CPU + {A92D9AD1-67D0-48A4-B954-47A0F022B180}.Release|x86.Build.0 = Release|Any CPU + {3749BDC6-B308-4ED0-8F98-52FB92D35054}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3749BDC6-B308-4ED0-8F98-52FB92D35054}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3749BDC6-B308-4ED0-8F98-52FB92D35054}.Debug|x64.ActiveCfg = Debug|Any CPU + {3749BDC6-B308-4ED0-8F98-52FB92D35054}.Debug|x64.Build.0 = Debug|Any CPU + {3749BDC6-B308-4ED0-8F98-52FB92D35054}.Debug|x86.ActiveCfg = Debug|Any CPU + {3749BDC6-B308-4ED0-8F98-52FB92D35054}.Debug|x86.Build.0 = Debug|Any CPU + {3749BDC6-B308-4ED0-8F98-52FB92D35054}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3749BDC6-B308-4ED0-8F98-52FB92D35054}.Release|Any CPU.Build.0 = Release|Any CPU + {3749BDC6-B308-4ED0-8F98-52FB92D35054}.Release|x64.ActiveCfg = Release|Any CPU + {3749BDC6-B308-4ED0-8F98-52FB92D35054}.Release|x64.Build.0 = Release|Any CPU + {3749BDC6-B308-4ED0-8F98-52FB92D35054}.Release|x86.ActiveCfg = Release|Any CPU + {3749BDC6-B308-4ED0-8F98-52FB92D35054}.Release|x86.Build.0 = Release|Any CPU + {652B4625-5A23-4915-B694-922EFCFADF10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {652B4625-5A23-4915-B694-922EFCFADF10}.Debug|Any CPU.Build.0 = Debug|Any CPU + {652B4625-5A23-4915-B694-922EFCFADF10}.Debug|x64.ActiveCfg = Debug|Any CPU + {652B4625-5A23-4915-B694-922EFCFADF10}.Debug|x64.Build.0 = Debug|Any CPU + {652B4625-5A23-4915-B694-922EFCFADF10}.Debug|x86.ActiveCfg = Debug|Any CPU + {652B4625-5A23-4915-B694-922EFCFADF10}.Debug|x86.Build.0 = Debug|Any CPU + {652B4625-5A23-4915-B694-922EFCFADF10}.Release|Any CPU.ActiveCfg = Release|Any CPU + {652B4625-5A23-4915-B694-922EFCFADF10}.Release|Any CPU.Build.0 = Release|Any CPU + {652B4625-5A23-4915-B694-922EFCFADF10}.Release|x64.ActiveCfg = Release|Any CPU + {652B4625-5A23-4915-B694-922EFCFADF10}.Release|x64.Build.0 = Release|Any CPU + {652B4625-5A23-4915-B694-922EFCFADF10}.Release|x86.ActiveCfg = Release|Any CPU + {652B4625-5A23-4915-B694-922EFCFADF10}.Release|x86.Build.0 = Release|Any CPU + {A07A1342-BCA9-4B57-8504-DB111609AFC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A07A1342-BCA9-4B57-8504-DB111609AFC0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A07A1342-BCA9-4B57-8504-DB111609AFC0}.Debug|x64.ActiveCfg = Debug|Any CPU + {A07A1342-BCA9-4B57-8504-DB111609AFC0}.Debug|x64.Build.0 = Debug|Any CPU + {A07A1342-BCA9-4B57-8504-DB111609AFC0}.Debug|x86.ActiveCfg = Debug|Any CPU + {A07A1342-BCA9-4B57-8504-DB111609AFC0}.Debug|x86.Build.0 = Debug|Any CPU + {A07A1342-BCA9-4B57-8504-DB111609AFC0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A07A1342-BCA9-4B57-8504-DB111609AFC0}.Release|Any CPU.Build.0 = Release|Any CPU + {A07A1342-BCA9-4B57-8504-DB111609AFC0}.Release|x64.ActiveCfg = Release|Any CPU + {A07A1342-BCA9-4B57-8504-DB111609AFC0}.Release|x64.Build.0 = Release|Any CPU + {A07A1342-BCA9-4B57-8504-DB111609AFC0}.Release|x86.ActiveCfg = Release|Any CPU + {A07A1342-BCA9-4B57-8504-DB111609AFC0}.Release|x86.Build.0 = Release|Any CPU + {F08E51D8-9967-4CCD-AF44-0F365CF23D97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F08E51D8-9967-4CCD-AF44-0F365CF23D97}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F08E51D8-9967-4CCD-AF44-0F365CF23D97}.Debug|x64.ActiveCfg = Debug|Any CPU + {F08E51D8-9967-4CCD-AF44-0F365CF23D97}.Debug|x64.Build.0 = Debug|Any CPU + {F08E51D8-9967-4CCD-AF44-0F365CF23D97}.Debug|x86.ActiveCfg = Debug|Any CPU + {F08E51D8-9967-4CCD-AF44-0F365CF23D97}.Debug|x86.Build.0 = Debug|Any CPU + {F08E51D8-9967-4CCD-AF44-0F365CF23D97}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F08E51D8-9967-4CCD-AF44-0F365CF23D97}.Release|Any CPU.Build.0 = Release|Any CPU + {F08E51D8-9967-4CCD-AF44-0F365CF23D97}.Release|x64.ActiveCfg = Release|Any CPU + {F08E51D8-9967-4CCD-AF44-0F365CF23D97}.Release|x64.Build.0 = Release|Any CPU + {F08E51D8-9967-4CCD-AF44-0F365CF23D97}.Release|x86.ActiveCfg = Release|Any CPU + {F08E51D8-9967-4CCD-AF44-0F365CF23D97}.Release|x86.Build.0 = Release|Any CPU + {EBBC276F-EDB3-41BA-9D4D-C45E6CF7596C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EBBC276F-EDB3-41BA-9D4D-C45E6CF7596C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EBBC276F-EDB3-41BA-9D4D-C45E6CF7596C}.Debug|x64.ActiveCfg = Debug|Any CPU + {EBBC276F-EDB3-41BA-9D4D-C45E6CF7596C}.Debug|x64.Build.0 = Debug|Any CPU + {EBBC276F-EDB3-41BA-9D4D-C45E6CF7596C}.Debug|x86.ActiveCfg = Debug|Any CPU + {EBBC276F-EDB3-41BA-9D4D-C45E6CF7596C}.Debug|x86.Build.0 = Debug|Any CPU + {EBBC276F-EDB3-41BA-9D4D-C45E6CF7596C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EBBC276F-EDB3-41BA-9D4D-C45E6CF7596C}.Release|Any CPU.Build.0 = Release|Any CPU + {EBBC276F-EDB3-41BA-9D4D-C45E6CF7596C}.Release|x64.ActiveCfg = Release|Any CPU + {EBBC276F-EDB3-41BA-9D4D-C45E6CF7596C}.Release|x64.Build.0 = Release|Any CPU + {EBBC276F-EDB3-41BA-9D4D-C45E6CF7596C}.Release|x86.ActiveCfg = Release|Any CPU + {EBBC276F-EDB3-41BA-9D4D-C45E6CF7596C}.Release|x86.Build.0 = Release|Any CPU + {0CE45C9E-4ACF-45B6-B215-EC68A7B88FAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0CE45C9E-4ACF-45B6-B215-EC68A7B88FAF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0CE45C9E-4ACF-45B6-B215-EC68A7B88FAF}.Debug|x64.ActiveCfg = Debug|Any CPU + {0CE45C9E-4ACF-45B6-B215-EC68A7B88FAF}.Debug|x64.Build.0 = Debug|Any CPU + {0CE45C9E-4ACF-45B6-B215-EC68A7B88FAF}.Debug|x86.ActiveCfg = Debug|Any CPU + {0CE45C9E-4ACF-45B6-B215-EC68A7B88FAF}.Debug|x86.Build.0 = Debug|Any CPU + {0CE45C9E-4ACF-45B6-B215-EC68A7B88FAF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0CE45C9E-4ACF-45B6-B215-EC68A7B88FAF}.Release|Any CPU.Build.0 = Release|Any CPU + {0CE45C9E-4ACF-45B6-B215-EC68A7B88FAF}.Release|x64.ActiveCfg = Release|Any CPU + {0CE45C9E-4ACF-45B6-B215-EC68A7B88FAF}.Release|x64.Build.0 = Release|Any CPU + {0CE45C9E-4ACF-45B6-B215-EC68A7B88FAF}.Release|x86.ActiveCfg = Release|Any CPU + {0CE45C9E-4ACF-45B6-B215-EC68A7B88FAF}.Release|x86.Build.0 = Release|Any CPU + {586A61E0-822E-4D94-BFBF-6C6EB70B5839}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {586A61E0-822E-4D94-BFBF-6C6EB70B5839}.Debug|Any CPU.Build.0 = Debug|Any CPU + {586A61E0-822E-4D94-BFBF-6C6EB70B5839}.Debug|x64.ActiveCfg = Debug|Any CPU + {586A61E0-822E-4D94-BFBF-6C6EB70B5839}.Debug|x64.Build.0 = Debug|Any CPU + {586A61E0-822E-4D94-BFBF-6C6EB70B5839}.Debug|x86.ActiveCfg = Debug|Any CPU + {586A61E0-822E-4D94-BFBF-6C6EB70B5839}.Debug|x86.Build.0 = Debug|Any CPU + {586A61E0-822E-4D94-BFBF-6C6EB70B5839}.Release|Any CPU.ActiveCfg = Release|Any CPU + {586A61E0-822E-4D94-BFBF-6C6EB70B5839}.Release|Any CPU.Build.0 = Release|Any CPU + {586A61E0-822E-4D94-BFBF-6C6EB70B5839}.Release|x64.ActiveCfg = Release|Any CPU + {586A61E0-822E-4D94-BFBF-6C6EB70B5839}.Release|x64.Build.0 = Release|Any CPU + {586A61E0-822E-4D94-BFBF-6C6EB70B5839}.Release|x86.ActiveCfg = Release|Any CPU + {586A61E0-822E-4D94-BFBF-6C6EB70B5839}.Release|x86.Build.0 = Release|Any CPU + {AD930AFA-A61A-4EAA-A678-512315198E44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AD930AFA-A61A-4EAA-A678-512315198E44}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AD930AFA-A61A-4EAA-A678-512315198E44}.Debug|x64.ActiveCfg = Debug|Any CPU + {AD930AFA-A61A-4EAA-A678-512315198E44}.Debug|x64.Build.0 = Debug|Any CPU + {AD930AFA-A61A-4EAA-A678-512315198E44}.Debug|x86.ActiveCfg = Debug|Any CPU + {AD930AFA-A61A-4EAA-A678-512315198E44}.Debug|x86.Build.0 = Debug|Any CPU + {AD930AFA-A61A-4EAA-A678-512315198E44}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AD930AFA-A61A-4EAA-A678-512315198E44}.Release|Any CPU.Build.0 = Release|Any CPU + {AD930AFA-A61A-4EAA-A678-512315198E44}.Release|x64.ActiveCfg = Release|Any CPU + {AD930AFA-A61A-4EAA-A678-512315198E44}.Release|x64.Build.0 = Release|Any CPU + {AD930AFA-A61A-4EAA-A678-512315198E44}.Release|x86.ActiveCfg = Release|Any CPU + {AD930AFA-A61A-4EAA-A678-512315198E44}.Release|x86.Build.0 = Release|Any CPU + {B99877F0-4005-413A-AB0A-D98721CA2CD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B99877F0-4005-413A-AB0A-D98721CA2CD8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B99877F0-4005-413A-AB0A-D98721CA2CD8}.Debug|x64.ActiveCfg = Debug|Any CPU + {B99877F0-4005-413A-AB0A-D98721CA2CD8}.Debug|x64.Build.0 = Debug|Any CPU + {B99877F0-4005-413A-AB0A-D98721CA2CD8}.Debug|x86.ActiveCfg = Debug|Any CPU + {B99877F0-4005-413A-AB0A-D98721CA2CD8}.Debug|x86.Build.0 = Debug|Any CPU + {B99877F0-4005-413A-AB0A-D98721CA2CD8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B99877F0-4005-413A-AB0A-D98721CA2CD8}.Release|Any CPU.Build.0 = Release|Any CPU + {B99877F0-4005-413A-AB0A-D98721CA2CD8}.Release|x64.ActiveCfg = Release|Any CPU + {B99877F0-4005-413A-AB0A-D98721CA2CD8}.Release|x64.Build.0 = Release|Any CPU + {B99877F0-4005-413A-AB0A-D98721CA2CD8}.Release|x86.ActiveCfg = Release|Any CPU + {B99877F0-4005-413A-AB0A-D98721CA2CD8}.Release|x86.Build.0 = Release|Any CPU + {5D2F3278-38BE-4BB8-84E0-ACA54DEE50B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5D2F3278-38BE-4BB8-84E0-ACA54DEE50B4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5D2F3278-38BE-4BB8-84E0-ACA54DEE50B4}.Debug|x64.ActiveCfg = Debug|Any CPU + {5D2F3278-38BE-4BB8-84E0-ACA54DEE50B4}.Debug|x64.Build.0 = Debug|Any CPU + {5D2F3278-38BE-4BB8-84E0-ACA54DEE50B4}.Debug|x86.ActiveCfg = Debug|Any CPU + {5D2F3278-38BE-4BB8-84E0-ACA54DEE50B4}.Debug|x86.Build.0 = Debug|Any CPU + {5D2F3278-38BE-4BB8-84E0-ACA54DEE50B4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5D2F3278-38BE-4BB8-84E0-ACA54DEE50B4}.Release|Any CPU.Build.0 = Release|Any CPU + {5D2F3278-38BE-4BB8-84E0-ACA54DEE50B4}.Release|x64.ActiveCfg = Release|Any CPU + {5D2F3278-38BE-4BB8-84E0-ACA54DEE50B4}.Release|x64.Build.0 = Release|Any CPU + {5D2F3278-38BE-4BB8-84E0-ACA54DEE50B4}.Release|x86.ActiveCfg = Release|Any CPU + {5D2F3278-38BE-4BB8-84E0-ACA54DEE50B4}.Release|x86.Build.0 = Release|Any CPU + {D0D57D09-0433-480C-8322-CECA921E4E69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D0D57D09-0433-480C-8322-CECA921E4E69}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D0D57D09-0433-480C-8322-CECA921E4E69}.Debug|x64.ActiveCfg = Debug|Any CPU + {D0D57D09-0433-480C-8322-CECA921E4E69}.Debug|x64.Build.0 = Debug|Any CPU + {D0D57D09-0433-480C-8322-CECA921E4E69}.Debug|x86.ActiveCfg = Debug|Any CPU + {D0D57D09-0433-480C-8322-CECA921E4E69}.Debug|x86.Build.0 = Debug|Any CPU + {D0D57D09-0433-480C-8322-CECA921E4E69}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D0D57D09-0433-480C-8322-CECA921E4E69}.Release|Any CPU.Build.0 = Release|Any CPU + {D0D57D09-0433-480C-8322-CECA921E4E69}.Release|x64.ActiveCfg = Release|Any CPU + {D0D57D09-0433-480C-8322-CECA921E4E69}.Release|x64.Build.0 = Release|Any CPU + {D0D57D09-0433-480C-8322-CECA921E4E69}.Release|x86.ActiveCfg = Release|Any CPU + {D0D57D09-0433-480C-8322-CECA921E4E69}.Release|x86.Build.0 = Release|Any CPU + {8A0F6DA4-4D5A-44E5-B816-D0ED481FE5AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8A0F6DA4-4D5A-44E5-B816-D0ED481FE5AF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8A0F6DA4-4D5A-44E5-B816-D0ED481FE5AF}.Debug|x64.ActiveCfg = Debug|Any CPU + {8A0F6DA4-4D5A-44E5-B816-D0ED481FE5AF}.Debug|x64.Build.0 = Debug|Any CPU + {8A0F6DA4-4D5A-44E5-B816-D0ED481FE5AF}.Debug|x86.ActiveCfg = Debug|Any CPU + {8A0F6DA4-4D5A-44E5-B816-D0ED481FE5AF}.Debug|x86.Build.0 = Debug|Any CPU + {8A0F6DA4-4D5A-44E5-B816-D0ED481FE5AF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8A0F6DA4-4D5A-44E5-B816-D0ED481FE5AF}.Release|Any CPU.Build.0 = Release|Any CPU + {8A0F6DA4-4D5A-44E5-B816-D0ED481FE5AF}.Release|x64.ActiveCfg = Release|Any CPU + {8A0F6DA4-4D5A-44E5-B816-D0ED481FE5AF}.Release|x64.Build.0 = Release|Any CPU + {8A0F6DA4-4D5A-44E5-B816-D0ED481FE5AF}.Release|x86.ActiveCfg = Release|Any CPU + {8A0F6DA4-4D5A-44E5-B816-D0ED481FE5AF}.Release|x86.Build.0 = Release|Any CPU + {8116E1B5-0B44-45A4-8A6B-6D8A3C81BAFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8116E1B5-0B44-45A4-8A6B-6D8A3C81BAFA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8116E1B5-0B44-45A4-8A6B-6D8A3C81BAFA}.Debug|x64.ActiveCfg = Debug|Any CPU + {8116E1B5-0B44-45A4-8A6B-6D8A3C81BAFA}.Debug|x64.Build.0 = Debug|Any CPU + {8116E1B5-0B44-45A4-8A6B-6D8A3C81BAFA}.Debug|x86.ActiveCfg = Debug|Any CPU + {8116E1B5-0B44-45A4-8A6B-6D8A3C81BAFA}.Debug|x86.Build.0 = Debug|Any CPU + {8116E1B5-0B44-45A4-8A6B-6D8A3C81BAFA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8116E1B5-0B44-45A4-8A6B-6D8A3C81BAFA}.Release|Any CPU.Build.0 = Release|Any CPU + {8116E1B5-0B44-45A4-8A6B-6D8A3C81BAFA}.Release|x64.ActiveCfg = Release|Any CPU + {8116E1B5-0B44-45A4-8A6B-6D8A3C81BAFA}.Release|x64.Build.0 = Release|Any CPU + {8116E1B5-0B44-45A4-8A6B-6D8A3C81BAFA}.Release|x86.ActiveCfg = Release|Any CPU + {8116E1B5-0B44-45A4-8A6B-6D8A3C81BAFA}.Release|x86.Build.0 = Release|Any CPU + {16BA813B-EE0F-47E3-9141-D0B33C5421C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {16BA813B-EE0F-47E3-9141-D0B33C5421C4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {16BA813B-EE0F-47E3-9141-D0B33C5421C4}.Debug|x64.ActiveCfg = Debug|Any CPU + {16BA813B-EE0F-47E3-9141-D0B33C5421C4}.Debug|x64.Build.0 = Debug|Any CPU + {16BA813B-EE0F-47E3-9141-D0B33C5421C4}.Debug|x86.ActiveCfg = Debug|Any CPU + {16BA813B-EE0F-47E3-9141-D0B33C5421C4}.Debug|x86.Build.0 = Debug|Any CPU + {16BA813B-EE0F-47E3-9141-D0B33C5421C4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {16BA813B-EE0F-47E3-9141-D0B33C5421C4}.Release|Any CPU.Build.0 = Release|Any CPU + {16BA813B-EE0F-47E3-9141-D0B33C5421C4}.Release|x64.ActiveCfg = Release|Any CPU + {16BA813B-EE0F-47E3-9141-D0B33C5421C4}.Release|x64.Build.0 = Release|Any CPU + {16BA813B-EE0F-47E3-9141-D0B33C5421C4}.Release|x86.ActiveCfg = Release|Any CPU + {16BA813B-EE0F-47E3-9141-D0B33C5421C4}.Release|x86.Build.0 = Release|Any CPU + {2C4887E0-ED95-4748-90AA-A5DF454DED38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2C4887E0-ED95-4748-90AA-A5DF454DED38}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2C4887E0-ED95-4748-90AA-A5DF454DED38}.Debug|x64.ActiveCfg = Debug|Any CPU + {2C4887E0-ED95-4748-90AA-A5DF454DED38}.Debug|x64.Build.0 = Debug|Any CPU + {2C4887E0-ED95-4748-90AA-A5DF454DED38}.Debug|x86.ActiveCfg = Debug|Any CPU + {2C4887E0-ED95-4748-90AA-A5DF454DED38}.Debug|x86.Build.0 = Debug|Any CPU + {2C4887E0-ED95-4748-90AA-A5DF454DED38}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2C4887E0-ED95-4748-90AA-A5DF454DED38}.Release|Any CPU.Build.0 = Release|Any CPU + {2C4887E0-ED95-4748-90AA-A5DF454DED38}.Release|x64.ActiveCfg = Release|Any CPU + {2C4887E0-ED95-4748-90AA-A5DF454DED38}.Release|x64.Build.0 = Release|Any CPU + {2C4887E0-ED95-4748-90AA-A5DF454DED38}.Release|x86.ActiveCfg = Release|Any CPU + {2C4887E0-ED95-4748-90AA-A5DF454DED38}.Release|x86.Build.0 = Release|Any CPU + {CDCE0C6E-F696-47B5-BE7F-03B41CFFD99D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CDCE0C6E-F696-47B5-BE7F-03B41CFFD99D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CDCE0C6E-F696-47B5-BE7F-03B41CFFD99D}.Debug|x64.ActiveCfg = Debug|Any CPU + {CDCE0C6E-F696-47B5-BE7F-03B41CFFD99D}.Debug|x64.Build.0 = Debug|Any CPU + {CDCE0C6E-F696-47B5-BE7F-03B41CFFD99D}.Debug|x86.ActiveCfg = Debug|Any CPU + {CDCE0C6E-F696-47B5-BE7F-03B41CFFD99D}.Debug|x86.Build.0 = Debug|Any CPU + {CDCE0C6E-F696-47B5-BE7F-03B41CFFD99D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CDCE0C6E-F696-47B5-BE7F-03B41CFFD99D}.Release|Any CPU.Build.0 = Release|Any CPU + {CDCE0C6E-F696-47B5-BE7F-03B41CFFD99D}.Release|x64.ActiveCfg = Release|Any CPU + {CDCE0C6E-F696-47B5-BE7F-03B41CFFD99D}.Release|x64.Build.0 = Release|Any CPU + {CDCE0C6E-F696-47B5-BE7F-03B41CFFD99D}.Release|x86.ActiveCfg = Release|Any CPU + {CDCE0C6E-F696-47B5-BE7F-03B41CFFD99D}.Release|x86.Build.0 = Release|Any CPU + {3E08EBB2-E3DA-4644-87F6-77173D9EAB53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3E08EBB2-E3DA-4644-87F6-77173D9EAB53}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3E08EBB2-E3DA-4644-87F6-77173D9EAB53}.Debug|x64.ActiveCfg = Debug|Any CPU + {3E08EBB2-E3DA-4644-87F6-77173D9EAB53}.Debug|x64.Build.0 = Debug|Any CPU + {3E08EBB2-E3DA-4644-87F6-77173D9EAB53}.Debug|x86.ActiveCfg = Debug|Any CPU + {3E08EBB2-E3DA-4644-87F6-77173D9EAB53}.Debug|x86.Build.0 = Debug|Any CPU + {3E08EBB2-E3DA-4644-87F6-77173D9EAB53}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3E08EBB2-E3DA-4644-87F6-77173D9EAB53}.Release|Any CPU.Build.0 = Release|Any CPU + {3E08EBB2-E3DA-4644-87F6-77173D9EAB53}.Release|x64.ActiveCfg = Release|Any CPU + {3E08EBB2-E3DA-4644-87F6-77173D9EAB53}.Release|x64.Build.0 = Release|Any CPU + {3E08EBB2-E3DA-4644-87F6-77173D9EAB53}.Release|x86.ActiveCfg = Release|Any CPU + {3E08EBB2-E3DA-4644-87F6-77173D9EAB53}.Release|x86.Build.0 = Release|Any CPU + {504488A0-6FBF-4060-B1EF-ADD9AA1E84B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {504488A0-6FBF-4060-B1EF-ADD9AA1E84B2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {504488A0-6FBF-4060-B1EF-ADD9AA1E84B2}.Debug|x64.ActiveCfg = Debug|Any CPU + {504488A0-6FBF-4060-B1EF-ADD9AA1E84B2}.Debug|x64.Build.0 = Debug|Any CPU + {504488A0-6FBF-4060-B1EF-ADD9AA1E84B2}.Debug|x86.ActiveCfg = Debug|Any CPU + {504488A0-6FBF-4060-B1EF-ADD9AA1E84B2}.Debug|x86.Build.0 = Debug|Any CPU + {504488A0-6FBF-4060-B1EF-ADD9AA1E84B2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {504488A0-6FBF-4060-B1EF-ADD9AA1E84B2}.Release|Any CPU.Build.0 = Release|Any CPU + {504488A0-6FBF-4060-B1EF-ADD9AA1E84B2}.Release|x64.ActiveCfg = Release|Any CPU + {504488A0-6FBF-4060-B1EF-ADD9AA1E84B2}.Release|x64.Build.0 = Release|Any CPU + {504488A0-6FBF-4060-B1EF-ADD9AA1E84B2}.Release|x86.ActiveCfg = Release|Any CPU + {504488A0-6FBF-4060-B1EF-ADD9AA1E84B2}.Release|x86.Build.0 = Release|Any CPU + {96FC6FB4-F779-4CDB-B680-DB845A1451FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {96FC6FB4-F779-4CDB-B680-DB845A1451FB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {96FC6FB4-F779-4CDB-B680-DB845A1451FB}.Debug|x64.ActiveCfg = Debug|Any CPU + {96FC6FB4-F779-4CDB-B680-DB845A1451FB}.Debug|x64.Build.0 = Debug|Any CPU + {96FC6FB4-F779-4CDB-B680-DB845A1451FB}.Debug|x86.ActiveCfg = Debug|Any CPU + {96FC6FB4-F779-4CDB-B680-DB845A1451FB}.Debug|x86.Build.0 = Debug|Any CPU + {96FC6FB4-F779-4CDB-B680-DB845A1451FB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {96FC6FB4-F779-4CDB-B680-DB845A1451FB}.Release|Any CPU.Build.0 = Release|Any CPU + {96FC6FB4-F779-4CDB-B680-DB845A1451FB}.Release|x64.ActiveCfg = Release|Any CPU + {96FC6FB4-F779-4CDB-B680-DB845A1451FB}.Release|x64.Build.0 = Release|Any CPU + {96FC6FB4-F779-4CDB-B680-DB845A1451FB}.Release|x86.ActiveCfg = Release|Any CPU + {96FC6FB4-F779-4CDB-B680-DB845A1451FB}.Release|x86.Build.0 = Release|Any CPU + {E299CEF3-0317-440D-9F04-7D7303D3E1A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E299CEF3-0317-440D-9F04-7D7303D3E1A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E299CEF3-0317-440D-9F04-7D7303D3E1A2}.Debug|x64.ActiveCfg = Debug|Any CPU + {E299CEF3-0317-440D-9F04-7D7303D3E1A2}.Debug|x64.Build.0 = Debug|Any CPU + {E299CEF3-0317-440D-9F04-7D7303D3E1A2}.Debug|x86.ActiveCfg = Debug|Any CPU + {E299CEF3-0317-440D-9F04-7D7303D3E1A2}.Debug|x86.Build.0 = Debug|Any CPU + {E299CEF3-0317-440D-9F04-7D7303D3E1A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E299CEF3-0317-440D-9F04-7D7303D3E1A2}.Release|Any CPU.Build.0 = Release|Any CPU + {E299CEF3-0317-440D-9F04-7D7303D3E1A2}.Release|x64.ActiveCfg = Release|Any CPU + {E299CEF3-0317-440D-9F04-7D7303D3E1A2}.Release|x64.Build.0 = Release|Any CPU + {E299CEF3-0317-440D-9F04-7D7303D3E1A2}.Release|x86.ActiveCfg = Release|Any CPU + {E299CEF3-0317-440D-9F04-7D7303D3E1A2}.Release|x86.Build.0 = Release|Any CPU + {2E82B11C-BD0E-4B67-B7EB-95F10BA48FA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2E82B11C-BD0E-4B67-B7EB-95F10BA48FA8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2E82B11C-BD0E-4B67-B7EB-95F10BA48FA8}.Debug|x64.ActiveCfg = Debug|Any CPU + {2E82B11C-BD0E-4B67-B7EB-95F10BA48FA8}.Debug|x64.Build.0 = Debug|Any CPU + {2E82B11C-BD0E-4B67-B7EB-95F10BA48FA8}.Debug|x86.ActiveCfg = Debug|Any CPU + {2E82B11C-BD0E-4B67-B7EB-95F10BA48FA8}.Debug|x86.Build.0 = Debug|Any CPU + {2E82B11C-BD0E-4B67-B7EB-95F10BA48FA8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2E82B11C-BD0E-4B67-B7EB-95F10BA48FA8}.Release|Any CPU.Build.0 = Release|Any CPU + {2E82B11C-BD0E-4B67-B7EB-95F10BA48FA8}.Release|x64.ActiveCfg = Release|Any CPU + {2E82B11C-BD0E-4B67-B7EB-95F10BA48FA8}.Release|x64.Build.0 = Release|Any CPU + {2E82B11C-BD0E-4B67-B7EB-95F10BA48FA8}.Release|x86.ActiveCfg = Release|Any CPU + {2E82B11C-BD0E-4B67-B7EB-95F10BA48FA8}.Release|x86.Build.0 = Release|Any CPU + {BE74FCCF-368C-47A4-A185-D45F0AE6AA46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BE74FCCF-368C-47A4-A185-D45F0AE6AA46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BE74FCCF-368C-47A4-A185-D45F0AE6AA46}.Debug|x64.ActiveCfg = Debug|Any CPU + {BE74FCCF-368C-47A4-A185-D45F0AE6AA46}.Debug|x64.Build.0 = Debug|Any CPU + {BE74FCCF-368C-47A4-A185-D45F0AE6AA46}.Debug|x86.ActiveCfg = Debug|Any CPU + {BE74FCCF-368C-47A4-A185-D45F0AE6AA46}.Debug|x86.Build.0 = Debug|Any CPU + {BE74FCCF-368C-47A4-A185-D45F0AE6AA46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BE74FCCF-368C-47A4-A185-D45F0AE6AA46}.Release|Any CPU.Build.0 = Release|Any CPU + {BE74FCCF-368C-47A4-A185-D45F0AE6AA46}.Release|x64.ActiveCfg = Release|Any CPU + {BE74FCCF-368C-47A4-A185-D45F0AE6AA46}.Release|x64.Build.0 = Release|Any CPU + {BE74FCCF-368C-47A4-A185-D45F0AE6AA46}.Release|x86.ActiveCfg = Release|Any CPU + {BE74FCCF-368C-47A4-A185-D45F0AE6AA46}.Release|x86.Build.0 = Release|Any CPU + {FA6978D1-029D-4FC9-B3CB-64BDE7C2D5A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA6978D1-029D-4FC9-B3CB-64BDE7C2D5A4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA6978D1-029D-4FC9-B3CB-64BDE7C2D5A4}.Debug|x64.ActiveCfg = Debug|Any CPU + {FA6978D1-029D-4FC9-B3CB-64BDE7C2D5A4}.Debug|x64.Build.0 = Debug|Any CPU + {FA6978D1-029D-4FC9-B3CB-64BDE7C2D5A4}.Debug|x86.ActiveCfg = Debug|Any CPU + {FA6978D1-029D-4FC9-B3CB-64BDE7C2D5A4}.Debug|x86.Build.0 = Debug|Any CPU + {FA6978D1-029D-4FC9-B3CB-64BDE7C2D5A4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA6978D1-029D-4FC9-B3CB-64BDE7C2D5A4}.Release|Any CPU.Build.0 = Release|Any CPU + {FA6978D1-029D-4FC9-B3CB-64BDE7C2D5A4}.Release|x64.ActiveCfg = Release|Any CPU + {FA6978D1-029D-4FC9-B3CB-64BDE7C2D5A4}.Release|x64.Build.0 = Release|Any CPU + {FA6978D1-029D-4FC9-B3CB-64BDE7C2D5A4}.Release|x86.ActiveCfg = Release|Any CPU + {FA6978D1-029D-4FC9-B3CB-64BDE7C2D5A4}.Release|x86.Build.0 = Release|Any CPU + {1755CB0E-AB66-4EF1-B8B0-083C015A4D44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1755CB0E-AB66-4EF1-B8B0-083C015A4D44}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1755CB0E-AB66-4EF1-B8B0-083C015A4D44}.Debug|x64.ActiveCfg = Debug|Any CPU + {1755CB0E-AB66-4EF1-B8B0-083C015A4D44}.Debug|x64.Build.0 = Debug|Any CPU + {1755CB0E-AB66-4EF1-B8B0-083C015A4D44}.Debug|x86.ActiveCfg = Debug|Any CPU + {1755CB0E-AB66-4EF1-B8B0-083C015A4D44}.Debug|x86.Build.0 = Debug|Any CPU + {1755CB0E-AB66-4EF1-B8B0-083C015A4D44}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1755CB0E-AB66-4EF1-B8B0-083C015A4D44}.Release|Any CPU.Build.0 = Release|Any CPU + {1755CB0E-AB66-4EF1-B8B0-083C015A4D44}.Release|x64.ActiveCfg = Release|Any CPU + {1755CB0E-AB66-4EF1-B8B0-083C015A4D44}.Release|x64.Build.0 = Release|Any CPU + {1755CB0E-AB66-4EF1-B8B0-083C015A4D44}.Release|x86.ActiveCfg = Release|Any CPU + {1755CB0E-AB66-4EF1-B8B0-083C015A4D44}.Release|x86.Build.0 = Release|Any CPU + {EA62799E-E766-4E7E-95B6-C374E38027AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EA62799E-E766-4E7E-95B6-C374E38027AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EA62799E-E766-4E7E-95B6-C374E38027AD}.Debug|x64.ActiveCfg = Debug|Any CPU + {EA62799E-E766-4E7E-95B6-C374E38027AD}.Debug|x64.Build.0 = Debug|Any CPU + {EA62799E-E766-4E7E-95B6-C374E38027AD}.Debug|x86.ActiveCfg = Debug|Any CPU + {EA62799E-E766-4E7E-95B6-C374E38027AD}.Debug|x86.Build.0 = Debug|Any CPU + {EA62799E-E766-4E7E-95B6-C374E38027AD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EA62799E-E766-4E7E-95B6-C374E38027AD}.Release|Any CPU.Build.0 = Release|Any CPU + {EA62799E-E766-4E7E-95B6-C374E38027AD}.Release|x64.ActiveCfg = Release|Any CPU + {EA62799E-E766-4E7E-95B6-C374E38027AD}.Release|x64.Build.0 = Release|Any CPU + {EA62799E-E766-4E7E-95B6-C374E38027AD}.Release|x86.ActiveCfg = Release|Any CPU + {EA62799E-E766-4E7E-95B6-C374E38027AD}.Release|x86.Build.0 = Release|Any CPU + {F36C3C36-3D7A-4BB6-9F42-E64E610144AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F36C3C36-3D7A-4BB6-9F42-E64E610144AB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F36C3C36-3D7A-4BB6-9F42-E64E610144AB}.Debug|x64.ActiveCfg = Debug|Any CPU + {F36C3C36-3D7A-4BB6-9F42-E64E610144AB}.Debug|x64.Build.0 = Debug|Any CPU + {F36C3C36-3D7A-4BB6-9F42-E64E610144AB}.Debug|x86.ActiveCfg = Debug|Any CPU + {F36C3C36-3D7A-4BB6-9F42-E64E610144AB}.Debug|x86.Build.0 = Debug|Any CPU + {F36C3C36-3D7A-4BB6-9F42-E64E610144AB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F36C3C36-3D7A-4BB6-9F42-E64E610144AB}.Release|Any CPU.Build.0 = Release|Any CPU + {F36C3C36-3D7A-4BB6-9F42-E64E610144AB}.Release|x64.ActiveCfg = Release|Any CPU + {F36C3C36-3D7A-4BB6-9F42-E64E610144AB}.Release|x64.Build.0 = Release|Any CPU + {F36C3C36-3D7A-4BB6-9F42-E64E610144AB}.Release|x86.ActiveCfg = Release|Any CPU + {F36C3C36-3D7A-4BB6-9F42-E64E610144AB}.Release|x86.Build.0 = Release|Any CPU + {1467CBD2-32BA-4A1F-915F-047EE8689712}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1467CBD2-32BA-4A1F-915F-047EE8689712}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1467CBD2-32BA-4A1F-915F-047EE8689712}.Debug|x64.ActiveCfg = Debug|Any CPU + {1467CBD2-32BA-4A1F-915F-047EE8689712}.Debug|x64.Build.0 = Debug|Any CPU + {1467CBD2-32BA-4A1F-915F-047EE8689712}.Debug|x86.ActiveCfg = Debug|Any CPU + {1467CBD2-32BA-4A1F-915F-047EE8689712}.Debug|x86.Build.0 = Debug|Any CPU + {1467CBD2-32BA-4A1F-915F-047EE8689712}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1467CBD2-32BA-4A1F-915F-047EE8689712}.Release|Any CPU.Build.0 = Release|Any CPU + {1467CBD2-32BA-4A1F-915F-047EE8689712}.Release|x64.ActiveCfg = Release|Any CPU + {1467CBD2-32BA-4A1F-915F-047EE8689712}.Release|x64.Build.0 = Release|Any CPU + {1467CBD2-32BA-4A1F-915F-047EE8689712}.Release|x86.ActiveCfg = Release|Any CPU + {1467CBD2-32BA-4A1F-915F-047EE8689712}.Release|x86.Build.0 = Release|Any CPU + {47751B7D-94B0-435B-8CE6-1848871AB432}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {47751B7D-94B0-435B-8CE6-1848871AB432}.Debug|Any CPU.Build.0 = Debug|Any CPU + {47751B7D-94B0-435B-8CE6-1848871AB432}.Debug|x64.ActiveCfg = Debug|Any CPU + {47751B7D-94B0-435B-8CE6-1848871AB432}.Debug|x64.Build.0 = Debug|Any CPU + {47751B7D-94B0-435B-8CE6-1848871AB432}.Debug|x86.ActiveCfg = Debug|Any CPU + {47751B7D-94B0-435B-8CE6-1848871AB432}.Debug|x86.Build.0 = Debug|Any CPU + {47751B7D-94B0-435B-8CE6-1848871AB432}.Release|Any CPU.ActiveCfg = Release|Any CPU + {47751B7D-94B0-435B-8CE6-1848871AB432}.Release|Any CPU.Build.0 = Release|Any CPU + {47751B7D-94B0-435B-8CE6-1848871AB432}.Release|x64.ActiveCfg = Release|Any CPU + {47751B7D-94B0-435B-8CE6-1848871AB432}.Release|x64.Build.0 = Release|Any CPU + {47751B7D-94B0-435B-8CE6-1848871AB432}.Release|x86.ActiveCfg = Release|Any CPU + {47751B7D-94B0-435B-8CE6-1848871AB432}.Release|x86.Build.0 = Release|Any CPU + {48EB6B57-F2D2-4031-B0A4-49E9F7993952}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {48EB6B57-F2D2-4031-B0A4-49E9F7993952}.Debug|Any CPU.Build.0 = Debug|Any CPU + {48EB6B57-F2D2-4031-B0A4-49E9F7993952}.Debug|x64.ActiveCfg = Debug|Any CPU + {48EB6B57-F2D2-4031-B0A4-49E9F7993952}.Debug|x64.Build.0 = Debug|Any CPU + {48EB6B57-F2D2-4031-B0A4-49E9F7993952}.Debug|x86.ActiveCfg = Debug|Any CPU + {48EB6B57-F2D2-4031-B0A4-49E9F7993952}.Debug|x86.Build.0 = Debug|Any CPU + {48EB6B57-F2D2-4031-B0A4-49E9F7993952}.Release|Any CPU.ActiveCfg = Release|Any CPU + {48EB6B57-F2D2-4031-B0A4-49E9F7993952}.Release|Any CPU.Build.0 = Release|Any CPU + {48EB6B57-F2D2-4031-B0A4-49E9F7993952}.Release|x64.ActiveCfg = Release|Any CPU + {48EB6B57-F2D2-4031-B0A4-49E9F7993952}.Release|x64.Build.0 = Release|Any CPU + {48EB6B57-F2D2-4031-B0A4-49E9F7993952}.Release|x86.ActiveCfg = Release|Any CPU + {48EB6B57-F2D2-4031-B0A4-49E9F7993952}.Release|x86.Build.0 = Release|Any CPU + {EF3F5B1D-D5E0-4535-B2F9-0E0829B4948F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EF3F5B1D-D5E0-4535-B2F9-0E0829B4948F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EF3F5B1D-D5E0-4535-B2F9-0E0829B4948F}.Debug|x64.ActiveCfg = Debug|Any CPU + {EF3F5B1D-D5E0-4535-B2F9-0E0829B4948F}.Debug|x64.Build.0 = Debug|Any CPU + {EF3F5B1D-D5E0-4535-B2F9-0E0829B4948F}.Debug|x86.ActiveCfg = Debug|Any CPU + {EF3F5B1D-D5E0-4535-B2F9-0E0829B4948F}.Debug|x86.Build.0 = Debug|Any CPU + {EF3F5B1D-D5E0-4535-B2F9-0E0829B4948F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EF3F5B1D-D5E0-4535-B2F9-0E0829B4948F}.Release|Any CPU.Build.0 = Release|Any CPU + {EF3F5B1D-D5E0-4535-B2F9-0E0829B4948F}.Release|x64.ActiveCfg = Release|Any CPU + {EF3F5B1D-D5E0-4535-B2F9-0E0829B4948F}.Release|x64.Build.0 = Release|Any CPU + {EF3F5B1D-D5E0-4535-B2F9-0E0829B4948F}.Release|x86.ActiveCfg = Release|Any CPU + {EF3F5B1D-D5E0-4535-B2F9-0E0829B4948F}.Release|x86.Build.0 = Release|Any CPU + {9F33CDC6-783A-4E0B-99D8-BC56FBF5D994}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9F33CDC6-783A-4E0B-99D8-BC56FBF5D994}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9F33CDC6-783A-4E0B-99D8-BC56FBF5D994}.Debug|x64.ActiveCfg = Debug|Any CPU + {9F33CDC6-783A-4E0B-99D8-BC56FBF5D994}.Debug|x64.Build.0 = Debug|Any CPU + {9F33CDC6-783A-4E0B-99D8-BC56FBF5D994}.Debug|x86.ActiveCfg = Debug|Any CPU + {9F33CDC6-783A-4E0B-99D8-BC56FBF5D994}.Debug|x86.Build.0 = Debug|Any CPU + {9F33CDC6-783A-4E0B-99D8-BC56FBF5D994}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F33CDC6-783A-4E0B-99D8-BC56FBF5D994}.Release|Any CPU.Build.0 = Release|Any CPU + {9F33CDC6-783A-4E0B-99D8-BC56FBF5D994}.Release|x64.ActiveCfg = Release|Any CPU + {9F33CDC6-783A-4E0B-99D8-BC56FBF5D994}.Release|x64.Build.0 = Release|Any CPU + {9F33CDC6-783A-4E0B-99D8-BC56FBF5D994}.Release|x86.ActiveCfg = Release|Any CPU + {9F33CDC6-783A-4E0B-99D8-BC56FBF5D994}.Release|x86.Build.0 = Release|Any CPU + {759BC5A2-033C-42AE-8DD9-CAAF90997E40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {759BC5A2-033C-42AE-8DD9-CAAF90997E40}.Debug|Any CPU.Build.0 = Debug|Any CPU + {759BC5A2-033C-42AE-8DD9-CAAF90997E40}.Debug|x64.ActiveCfg = Debug|Any CPU + {759BC5A2-033C-42AE-8DD9-CAAF90997E40}.Debug|x64.Build.0 = Debug|Any CPU + {759BC5A2-033C-42AE-8DD9-CAAF90997E40}.Debug|x86.ActiveCfg = Debug|Any CPU + {759BC5A2-033C-42AE-8DD9-CAAF90997E40}.Debug|x86.Build.0 = Debug|Any CPU + {759BC5A2-033C-42AE-8DD9-CAAF90997E40}.Release|Any CPU.ActiveCfg = Release|Any CPU + {759BC5A2-033C-42AE-8DD9-CAAF90997E40}.Release|Any CPU.Build.0 = Release|Any CPU + {759BC5A2-033C-42AE-8DD9-CAAF90997E40}.Release|x64.ActiveCfg = Release|Any CPU + {759BC5A2-033C-42AE-8DD9-CAAF90997E40}.Release|x64.Build.0 = Release|Any CPU + {759BC5A2-033C-42AE-8DD9-CAAF90997E40}.Release|x86.ActiveCfg = Release|Any CPU + {759BC5A2-033C-42AE-8DD9-CAAF90997E40}.Release|x86.Build.0 = Release|Any CPU + {20E08040-3C48-48DE-B323-896B58142F84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {20E08040-3C48-48DE-B323-896B58142F84}.Debug|Any CPU.Build.0 = Debug|Any CPU + {20E08040-3C48-48DE-B323-896B58142F84}.Debug|x64.ActiveCfg = Debug|Any CPU + {20E08040-3C48-48DE-B323-896B58142F84}.Debug|x64.Build.0 = Debug|Any CPU + {20E08040-3C48-48DE-B323-896B58142F84}.Debug|x86.ActiveCfg = Debug|Any CPU + {20E08040-3C48-48DE-B323-896B58142F84}.Debug|x86.Build.0 = Debug|Any CPU + {20E08040-3C48-48DE-B323-896B58142F84}.Release|Any CPU.ActiveCfg = Release|Any CPU + {20E08040-3C48-48DE-B323-896B58142F84}.Release|Any CPU.Build.0 = Release|Any CPU + {20E08040-3C48-48DE-B323-896B58142F84}.Release|x64.ActiveCfg = Release|Any CPU + {20E08040-3C48-48DE-B323-896B58142F84}.Release|x64.Build.0 = Release|Any CPU + {20E08040-3C48-48DE-B323-896B58142F84}.Release|x86.ActiveCfg = Release|Any CPU + {20E08040-3C48-48DE-B323-896B58142F84}.Release|x86.Build.0 = Release|Any CPU + {2C620263-59CA-42CA-9810-E5CFCDAC4975}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2C620263-59CA-42CA-9810-E5CFCDAC4975}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2C620263-59CA-42CA-9810-E5CFCDAC4975}.Debug|x64.ActiveCfg = Debug|Any CPU + {2C620263-59CA-42CA-9810-E5CFCDAC4975}.Debug|x64.Build.0 = Debug|Any CPU + {2C620263-59CA-42CA-9810-E5CFCDAC4975}.Debug|x86.ActiveCfg = Debug|Any CPU + {2C620263-59CA-42CA-9810-E5CFCDAC4975}.Debug|x86.Build.0 = Debug|Any CPU + {2C620263-59CA-42CA-9810-E5CFCDAC4975}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2C620263-59CA-42CA-9810-E5CFCDAC4975}.Release|Any CPU.Build.0 = Release|Any CPU + {2C620263-59CA-42CA-9810-E5CFCDAC4975}.Release|x64.ActiveCfg = Release|Any CPU + {2C620263-59CA-42CA-9810-E5CFCDAC4975}.Release|x64.Build.0 = Release|Any CPU + {2C620263-59CA-42CA-9810-E5CFCDAC4975}.Release|x86.ActiveCfg = Release|Any CPU + {2C620263-59CA-42CA-9810-E5CFCDAC4975}.Release|x86.Build.0 = Release|Any CPU + {A0D7AC02-2142-4207-8672-2E576EA2F6D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A0D7AC02-2142-4207-8672-2E576EA2F6D9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A0D7AC02-2142-4207-8672-2E576EA2F6D9}.Debug|x64.ActiveCfg = Debug|Any CPU + {A0D7AC02-2142-4207-8672-2E576EA2F6D9}.Debug|x64.Build.0 = Debug|Any CPU + {A0D7AC02-2142-4207-8672-2E576EA2F6D9}.Debug|x86.ActiveCfg = Debug|Any CPU + {A0D7AC02-2142-4207-8672-2E576EA2F6D9}.Debug|x86.Build.0 = Debug|Any CPU + {A0D7AC02-2142-4207-8672-2E576EA2F6D9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A0D7AC02-2142-4207-8672-2E576EA2F6D9}.Release|Any CPU.Build.0 = Release|Any CPU + {A0D7AC02-2142-4207-8672-2E576EA2F6D9}.Release|x64.ActiveCfg = Release|Any CPU + {A0D7AC02-2142-4207-8672-2E576EA2F6D9}.Release|x64.Build.0 = Release|Any CPU + {A0D7AC02-2142-4207-8672-2E576EA2F6D9}.Release|x86.ActiveCfg = Release|Any CPU + {A0D7AC02-2142-4207-8672-2E576EA2F6D9}.Release|x86.Build.0 = Release|Any CPU + {187A777D-F60C-4EDE-AD47-68A7AA7B1989}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {187A777D-F60C-4EDE-AD47-68A7AA7B1989}.Debug|Any CPU.Build.0 = Debug|Any CPU + {187A777D-F60C-4EDE-AD47-68A7AA7B1989}.Debug|x64.ActiveCfg = Debug|Any CPU + {187A777D-F60C-4EDE-AD47-68A7AA7B1989}.Debug|x64.Build.0 = Debug|Any CPU + {187A777D-F60C-4EDE-AD47-68A7AA7B1989}.Debug|x86.ActiveCfg = Debug|Any CPU + {187A777D-F60C-4EDE-AD47-68A7AA7B1989}.Debug|x86.Build.0 = Debug|Any CPU + {187A777D-F60C-4EDE-AD47-68A7AA7B1989}.Release|Any CPU.ActiveCfg = Release|Any CPU + {187A777D-F60C-4EDE-AD47-68A7AA7B1989}.Release|Any CPU.Build.0 = Release|Any CPU + {187A777D-F60C-4EDE-AD47-68A7AA7B1989}.Release|x64.ActiveCfg = Release|Any CPU + {187A777D-F60C-4EDE-AD47-68A7AA7B1989}.Release|x64.Build.0 = Release|Any CPU + {187A777D-F60C-4EDE-AD47-68A7AA7B1989}.Release|x86.ActiveCfg = Release|Any CPU + {187A777D-F60C-4EDE-AD47-68A7AA7B1989}.Release|x86.Build.0 = Release|Any CPU + {2F141597-3D18-4358-9ADE-75879DB844F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2F141597-3D18-4358-9ADE-75879DB844F8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2F141597-3D18-4358-9ADE-75879DB844F8}.Debug|x64.ActiveCfg = Debug|Any CPU + {2F141597-3D18-4358-9ADE-75879DB844F8}.Debug|x64.Build.0 = Debug|Any CPU + {2F141597-3D18-4358-9ADE-75879DB844F8}.Debug|x86.ActiveCfg = Debug|Any CPU + {2F141597-3D18-4358-9ADE-75879DB844F8}.Debug|x86.Build.0 = Debug|Any CPU + {2F141597-3D18-4358-9ADE-75879DB844F8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2F141597-3D18-4358-9ADE-75879DB844F8}.Release|Any CPU.Build.0 = Release|Any CPU + {2F141597-3D18-4358-9ADE-75879DB844F8}.Release|x64.ActiveCfg = Release|Any CPU + {2F141597-3D18-4358-9ADE-75879DB844F8}.Release|x64.Build.0 = Release|Any CPU + {2F141597-3D18-4358-9ADE-75879DB844F8}.Release|x86.ActiveCfg = Release|Any CPU + {2F141597-3D18-4358-9ADE-75879DB844F8}.Release|x86.Build.0 = Release|Any CPU + {DE27E0B8-1B3F-4737-8092-080282D912EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DE27E0B8-1B3F-4737-8092-080282D912EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DE27E0B8-1B3F-4737-8092-080282D912EF}.Debug|x64.ActiveCfg = Debug|Any CPU + {DE27E0B8-1B3F-4737-8092-080282D912EF}.Debug|x64.Build.0 = Debug|Any CPU + {DE27E0B8-1B3F-4737-8092-080282D912EF}.Debug|x86.ActiveCfg = Debug|Any CPU + {DE27E0B8-1B3F-4737-8092-080282D912EF}.Debug|x86.Build.0 = Debug|Any CPU + {DE27E0B8-1B3F-4737-8092-080282D912EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DE27E0B8-1B3F-4737-8092-080282D912EF}.Release|Any CPU.Build.0 = Release|Any CPU + {DE27E0B8-1B3F-4737-8092-080282D912EF}.Release|x64.ActiveCfg = Release|Any CPU + {DE27E0B8-1B3F-4737-8092-080282D912EF}.Release|x64.Build.0 = Release|Any CPU + {DE27E0B8-1B3F-4737-8092-080282D912EF}.Release|x86.ActiveCfg = Release|Any CPU + {DE27E0B8-1B3F-4737-8092-080282D912EF}.Release|x86.Build.0 = Release|Any CPU + {0D983CD9-53D7-451C-865E-4F2F48A2173A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0D983CD9-53D7-451C-865E-4F2F48A2173A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0D983CD9-53D7-451C-865E-4F2F48A2173A}.Debug|x64.ActiveCfg = Debug|Any CPU + {0D983CD9-53D7-451C-865E-4F2F48A2173A}.Debug|x64.Build.0 = Debug|Any CPU + {0D983CD9-53D7-451C-865E-4F2F48A2173A}.Debug|x86.ActiveCfg = Debug|Any CPU + {0D983CD9-53D7-451C-865E-4F2F48A2173A}.Debug|x86.Build.0 = Debug|Any CPU + {0D983CD9-53D7-451C-865E-4F2F48A2173A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0D983CD9-53D7-451C-865E-4F2F48A2173A}.Release|Any CPU.Build.0 = Release|Any CPU + {0D983CD9-53D7-451C-865E-4F2F48A2173A}.Release|x64.ActiveCfg = Release|Any CPU + {0D983CD9-53D7-451C-865E-4F2F48A2173A}.Release|x64.Build.0 = Release|Any CPU + {0D983CD9-53D7-451C-865E-4F2F48A2173A}.Release|x86.ActiveCfg = Release|Any CPU + {0D983CD9-53D7-451C-865E-4F2F48A2173A}.Release|x86.Build.0 = Release|Any CPU + {E292F84C-E625-4AB2-9010-103DB8255709}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E292F84C-E625-4AB2-9010-103DB8255709}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E292F84C-E625-4AB2-9010-103DB8255709}.Debug|x64.ActiveCfg = Debug|Any CPU + {E292F84C-E625-4AB2-9010-103DB8255709}.Debug|x64.Build.0 = Debug|Any CPU + {E292F84C-E625-4AB2-9010-103DB8255709}.Debug|x86.ActiveCfg = Debug|Any CPU + {E292F84C-E625-4AB2-9010-103DB8255709}.Debug|x86.Build.0 = Debug|Any CPU + {E292F84C-E625-4AB2-9010-103DB8255709}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E292F84C-E625-4AB2-9010-103DB8255709}.Release|Any CPU.Build.0 = Release|Any CPU + {E292F84C-E625-4AB2-9010-103DB8255709}.Release|x64.ActiveCfg = Release|Any CPU + {E292F84C-E625-4AB2-9010-103DB8255709}.Release|x64.Build.0 = Release|Any CPU + {E292F84C-E625-4AB2-9010-103DB8255709}.Release|x86.ActiveCfg = Release|Any CPU + {E292F84C-E625-4AB2-9010-103DB8255709}.Release|x86.Build.0 = Release|Any CPU + {4ADB6559-157F-4500-996B-74B1ECE8F02C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4ADB6559-157F-4500-996B-74B1ECE8F02C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4ADB6559-157F-4500-996B-74B1ECE8F02C}.Debug|x64.ActiveCfg = Debug|Any CPU + {4ADB6559-157F-4500-996B-74B1ECE8F02C}.Debug|x64.Build.0 = Debug|Any CPU + {4ADB6559-157F-4500-996B-74B1ECE8F02C}.Debug|x86.ActiveCfg = Debug|Any CPU + {4ADB6559-157F-4500-996B-74B1ECE8F02C}.Debug|x86.Build.0 = Debug|Any CPU + {4ADB6559-157F-4500-996B-74B1ECE8F02C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4ADB6559-157F-4500-996B-74B1ECE8F02C}.Release|Any CPU.Build.0 = Release|Any CPU + {4ADB6559-157F-4500-996B-74B1ECE8F02C}.Release|x64.ActiveCfg = Release|Any CPU + {4ADB6559-157F-4500-996B-74B1ECE8F02C}.Release|x64.Build.0 = Release|Any CPU + {4ADB6559-157F-4500-996B-74B1ECE8F02C}.Release|x86.ActiveCfg = Release|Any CPU + {4ADB6559-157F-4500-996B-74B1ECE8F02C}.Release|x86.Build.0 = Release|Any CPU + {205D2986-285B-4C26-B48E-6540AED0975C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {205D2986-285B-4C26-B48E-6540AED0975C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {205D2986-285B-4C26-B48E-6540AED0975C}.Debug|x64.ActiveCfg = Debug|Any CPU + {205D2986-285B-4C26-B48E-6540AED0975C}.Debug|x64.Build.0 = Debug|Any CPU + {205D2986-285B-4C26-B48E-6540AED0975C}.Debug|x86.ActiveCfg = Debug|Any CPU + {205D2986-285B-4C26-B48E-6540AED0975C}.Debug|x86.Build.0 = Debug|Any CPU + {205D2986-285B-4C26-B48E-6540AED0975C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {205D2986-285B-4C26-B48E-6540AED0975C}.Release|Any CPU.Build.0 = Release|Any CPU + {205D2986-285B-4C26-B48E-6540AED0975C}.Release|x64.ActiveCfg = Release|Any CPU + {205D2986-285B-4C26-B48E-6540AED0975C}.Release|x64.Build.0 = Release|Any CPU + {205D2986-285B-4C26-B48E-6540AED0975C}.Release|x86.ActiveCfg = Release|Any CPU + {205D2986-285B-4C26-B48E-6540AED0975C}.Release|x86.Build.0 = Release|Any CPU + {AB5342AF-A53E-48E6-B345-045E8F27084C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AB5342AF-A53E-48E6-B345-045E8F27084C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AB5342AF-A53E-48E6-B345-045E8F27084C}.Debug|x64.ActiveCfg = Debug|Any CPU + {AB5342AF-A53E-48E6-B345-045E8F27084C}.Debug|x64.Build.0 = Debug|Any CPU + {AB5342AF-A53E-48E6-B345-045E8F27084C}.Debug|x86.ActiveCfg = Debug|Any CPU + {AB5342AF-A53E-48E6-B345-045E8F27084C}.Debug|x86.Build.0 = Debug|Any CPU + {AB5342AF-A53E-48E6-B345-045E8F27084C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AB5342AF-A53E-48E6-B345-045E8F27084C}.Release|Any CPU.Build.0 = Release|Any CPU + {AB5342AF-A53E-48E6-B345-045E8F27084C}.Release|x64.ActiveCfg = Release|Any CPU + {AB5342AF-A53E-48E6-B345-045E8F27084C}.Release|x64.Build.0 = Release|Any CPU + {AB5342AF-A53E-48E6-B345-045E8F27084C}.Release|x86.ActiveCfg = Release|Any CPU + {AB5342AF-A53E-48E6-B345-045E8F27084C}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {42F8CF29-5E51-4E5F-9F63-5B98C1AE2A65} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} + {3343A86A-4869-510C-AD07-13D327905271} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} + {FC069441-2B75-5077-8159-CC5FDF28943E} = {3343A86A-4869-510C-AD07-13D327905271} + {7217D8FE-8057-5113-805D-4D373443C140} = {3343A86A-4869-510C-AD07-13D327905271} + {2D7F1E7A-8F85-5168-BEC1-0458C71D976F} = {3343A86A-4869-510C-AD07-13D327905271} + {43B38725-E052-50F8-9922-F92C485D4325} = {3343A86A-4869-510C-AD07-13D327905271} + {E6B086F8-F6EC-5680-B584-F6ACDC8629BD} = {3343A86A-4869-510C-AD07-13D327905271} + {D52429C2-2147-59EC-BE18-3795B1C7CD2F} = {3343A86A-4869-510C-AD07-13D327905271} + {AB7B6314-0F6B-5223-AD50-73B38D64CCEB} = {3343A86A-4869-510C-AD07-13D327905271} + {42F8CF29-5E51-4E5F-9F63-5B98C1AE2A65} = {3343A86A-4869-510C-AD07-13D327905271} + {BFAD4AB5-4732-53FD-ADB3-7BC0D393BF70} = {3343A86A-4869-510C-AD07-13D327905271} + {85AC3E1A-96A8-5E48-B1C7-6AFC0F0D9A35} = {3343A86A-4869-510C-AD07-13D327905271} + {8CD5853E-8A7A-5E15-A416-949270C86FC5} = {3343A86A-4869-510C-AD07-13D327905271} + {1053E335-E0CB-5B86-A85D-F57052CB3670} = {3343A86A-4869-510C-AD07-13D327905271} + {DB06F3C9-1316-5A9D-B089-70F85612B135} = {3343A86A-4869-510C-AD07-13D327905271} + {AEB62502-2E7C-5609-A87B-1EA547E15DDF} = {3343A86A-4869-510C-AD07-13D327905271} + {E84BAC45-A985-5152-AFC2-081546467439} = {3343A86A-4869-510C-AD07-13D327905271} + {5E27F3E8-17E7-5399-A77A-013DF14DFC23} = {3343A86A-4869-510C-AD07-13D327905271} + {8BDA4D98-75C5-5A9E-8243-2E4455E353A5} = {3343A86A-4869-510C-AD07-13D327905271} + {5CFF86F2-769E-515F-A062-D6D211F9DF1F} = {3343A86A-4869-510C-AD07-13D327905271} + {2DB928DC-1312-5CB7-9ECB-19AA2B4D558A} = {3343A86A-4869-510C-AD07-13D327905271} + {7787A5BD-F8D9-5B08-8B8D-D6D2929B3280} = {3343A86A-4869-510C-AD07-13D327905271} + {62172793-7918-5CED-8232-6D96E9FCB9C6} = {3343A86A-4869-510C-AD07-13D327905271} {2C850AE8-F45A-486D-91A8-153434BC9051} = {42F8CF29-5E51-4E5F-9F63-5B98C1AE2A65} - {B0332B14-CA7D-4D78-92DA-B1C09D83056B} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {D9130A71-1A89-4C6F-95E2-578AB2CBE920} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {5B104CB9-ACCB-42F3-9157-AF84FE8B3E4D} = {0AB3BF05-4346-4AA6-1389-037BE0695223} + {D9130A71-1A89-4C6F-95E2-578AB2CBE920} = {D52429C2-2147-59EC-BE18-3795B1C7CD2F} {9549CDB0-B187-4860-B06C-5A5A445E088B} = {5D20AA90-6969-D8BD-9DCD-8634F4692FDA} - {32378CF0-CB7D-4242-957B-676908420E8A} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {5AEBC439-9CA8-4D02-A118-B19090E66223} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {BD693153-6B2D-4B54-BFC9-35E20C996270} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {BDB248AE-6CBB-4BB5-9FB1-8A8FDD18C4CE} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {44DA15EF-BB86-4C4F-8809-A5BCA7B7FA18} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {D03E7529-5E28-4478-A0DC-596B674C11CC} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {4E0630FC-BB47-4454-B395-5AFC89AAA207} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {5EC25549-ADE1-46C0-9AD3-88D6BE2DD2E4} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {3AB2EDD3-29CD-4439-824A-AA77A83D8313} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {C4F428B3-4841-4364-894A-0993AD1E8A91} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {79FFF590-89D6-4677-A127-A8C0504E53B8} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {FEB9A077-5585-4071-99FB-CAD05E6577D3} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {4C3AC3C0-A552-4631-A59B-CB4FB37CE4ED} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {FE1B7B2A-0B26-4861-B0B8-EF96297C3E51} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {69ED7731-C250-43B0-A021-C908C0E2CF1C} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {C04187FA-99A2-489D-87A3-9FBEA11788AA} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {4EB52804-F20C-4196-811D-DFB484B9E57B} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {79B7BC52-F1BA-4FCE-87FD-E64F6242750E} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {11695913-2A5F-4D42-AE85-5B40328234A8} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {464A3592-557A-45A6-BE61-AC49919CC6ED} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {2E69C800-64CF-4279-9E3E-32B3934B3493} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {F154572F-A92B-4C9C-A814-9A957A6F7A4F} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {2D0583B6-E9DC-4E37-A4AA-D758CD909B41} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {82DD1D7F-0693-415D-A254-85327169B674} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {99456ADC-FBD9-4794-B07C-5C6DFFEEBB17} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {CDE70675-83CC-4D27-842C-7001827E8DF7} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {432A8BDA-C545-4F5B-A3E9-3F6F12F6B0D7} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {2F1F57EC-2E49-452B-AE39-EBC978BB1F2F} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {B0171216-C945-4267-B5DE-632DDE1A61A9} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {8B40C04A-E3B8-4830-9203-3A2234A000BD} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {4747A8FD-A4EE-4A01-A732-EDFA7EBB347B} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {FF8A1168-FB4E-4953-9A50-34CC841C5A5A} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {E839236F-292C-4D05-A038-1AC727739559} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {B93984FE-7EB4-452C-9E33-2A9E8F79D25F} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {7FB17C60-24EA-48EA-A69F-33FE394CD33B} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {2D7D23EC-C51C-4DFE-BFFB-7DB40B589BE5} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {2E3EF875-D295-4B81-BBB9-C0A7D4BCADC6} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {F65C6724-1675-4108-8563-A63D24B04E01} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {970109A7-21AB-4502-AED0-F48EFAE91788} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {57BAFB0D-D015-4ADD-956E-6E71A10A00F3} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {64127B9A-3925-42A0-AC01-B5894A422505} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {858FEA39-13EC-4238-83AF-F444CF3A5618} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {D46BA872-478C-4C05-A9C8-7079A9200B98} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {383085B7-C38A-42E1-A2C9-9634875239E0} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {EA9665A2-4B01-4A8E-8FBB-9951A3A61A82} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {6EE604C9-E53C-41F9-A302-A91566D64DD2} = {0AB3BF05-4346-4AA6-1389-037BE0695223} + {5AEBC439-9CA8-4D02-A118-B19090E66223} = {62172793-7918-5CED-8232-6D96E9FCB9C6} + {BDB248AE-6CBB-4BB5-9FB1-8A8FDD18C4CE} = {43B38725-E052-50F8-9922-F92C485D4325} + {D03E7529-5E28-4478-A0DC-596B674C11CC} = {BFAD4AB5-4732-53FD-ADB3-7BC0D393BF70} + {5EC25549-ADE1-46C0-9AD3-88D6BE2DD2E4} = {7787A5BD-F8D9-5B08-8B8D-D6D2929B3280} + {C4F428B3-4841-4364-894A-0993AD1E8A91} = {85AC3E1A-96A8-5E48-B1C7-6AFC0F0D9A35} + {FEB9A077-5585-4071-99FB-CAD05E6577D3} = {E6B086F8-F6EC-5680-B584-F6ACDC8629BD} + {FE1B7B2A-0B26-4861-B0B8-EF96297C3E51} = {E84BAC45-A985-5152-AFC2-081546467439} + {C04187FA-99A2-489D-87A3-9FBEA11788AA} = {AB7B6314-0F6B-5223-AD50-73B38D64CCEB} + {79B7BC52-F1BA-4FCE-87FD-E64F6242750E} = {5E27F3E8-17E7-5399-A77A-013DF14DFC23} + {464A3592-557A-45A6-BE61-AC49919CC6ED} = {5CFF86F2-769E-515F-A062-D6D211F9DF1F} + {F154572F-A92B-4C9C-A814-9A957A6F7A4F} = {2DB928DC-1312-5CB7-9ECB-19AA2B4D558A} + {82DD1D7F-0693-415D-A254-85327169B674} = {FC069441-2B75-5077-8159-CC5FDF28943E} + {CDE70675-83CC-4D27-842C-7001827E8DF7} = {8BDA4D98-75C5-5A9E-8243-2E4455E353A5} + {2F1F57EC-2E49-452B-AE39-EBC978BB1F2F} = {AEB62502-2E7C-5609-A87B-1EA547E15DDF} + {8B40C04A-E3B8-4830-9203-3A2234A000BD} = {2DB928DC-1312-5CB7-9ECB-19AA2B4D558A} + {FF8A1168-FB4E-4953-9A50-34CC841C5A5A} = {2DB928DC-1312-5CB7-9ECB-19AA2B4D558A} + {B93984FE-7EB4-452C-9E33-2A9E8F79D25F} = {8CD5853E-8A7A-5E15-A416-949270C86FC5} + {2D7D23EC-C51C-4DFE-BFFB-7DB40B589BE5} = {2D7F1E7A-8F85-5168-BEC1-0458C71D976F} + {F65C6724-1675-4108-8563-A63D24B04E01} = {7217D8FE-8057-5113-805D-4D373443C140} + {D46BA872-478C-4C05-A9C8-7079A9200B98} = {1053E335-E0CB-5B86-A85D-F57052CB3670} + {EA9665A2-4B01-4A8E-8FBB-9951A3A61A82} = {E6B086F8-F6EC-5680-B584-F6ACDC8629BD} {2036BE09-BFDD-425A-B2CF-F5B695570A86} = {5D20AA90-6969-D8BD-9DCD-8634F4692FDA} - {E9DD3A37-1970-465F-8935-54A3CF37E999} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} {66404561-7A1D-4AE2-BDE2-EB9DCC4C19AE} = {42F8CF29-5E51-4E5F-9F63-5B98C1AE2A65} - {73E2DF06-B8BE-4839-87BD-2B0F255776B6} = {0AB3BF05-4346-4AA6-1389-037BE0695223} {5505EC4F-B4ED-41E7-A56F-EBDA7396BDAC} = {42F8CF29-5E51-4E5F-9F63-5B98C1AE2A65} - {EC652E03-DE93-48E6-8F46-D44EA0EBFD2C} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {B271ABAC-531D-44F8-A3C1-DE91E4FB8B2B} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {D7A1ED59-115B-46B2-9FEB-C81F1291DF40} = {0AB3BF05-4346-4AA6-1389-037BE0695223} {16CC09AA-6719-41A2-8F8D-6447DB53A662} = {5D20AA90-6969-D8BD-9DCD-8634F4692FDA} {7C4D2A89-8E31-4A6D-9B57-4F1C2E8A6D03} = {5D20AA90-6969-D8BD-9DCD-8634F4692FDA} {A40DAFE0-CC32-41ED-8600-790957786B3F} = {42F8CF29-5E51-4E5F-9F63-5B98C1AE2A65} - {66195D0B-C425-436A-ABBA-AA512A25F89E} = {0AB3BF05-4346-4AA6-1389-037BE0695223} {EF8779B2-A4E4-4D86-9328-5CFA6E4C482B} = {5D20AA90-6969-D8BD-9DCD-8634F4692FDA} - {D264432C-9CC4-496C-BC9B-81AFDF059BEE} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {FFB6C189-5FE6-425A-929F-22BA25A3C076} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {2BF4E16C-0BCA-49F2-8AF7-EA68C2A0515B} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {C6DC8FAF-2F7C-44B6-B832-3F8210C37EFD} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {C399B7E3-5A72-45DA-9450-D284F298E7F0} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {D842D167-961A-4632-8886-959890559ABC} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {73C3D493-3626-47D8-ABD3-AAC83C4BD8E2} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {D8737EF1-E976-42F9-B183-1812EB5EF3AC} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {3CA6E8DF-AF0C-453E-9361-B9EE207DC5BA} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {FC2D4CBB-B81B-403B-BCD7-E7E0B3644EDB} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {45266E18-8EBA-41C3-AAE6-AC737A640E0D} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {193DC9F9-E972-4E70-A137-717571603DEB} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {6F069A41-9187-4C48-AC02-F387B8319AF7} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {FD44E0D2-EE92-450D-AEB9-BA87C8174122} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {3B0EFBF8-E424-44CD-B34B-35DCF9F5284B} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {308F48A3-B8F7-4859-9583-9F6975133391} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {659C28C4-3CE9-48C1-B16F-4ECD7674C135} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {F8C7CBD6-3788-49EE-B278-7787D1A87E21} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {E05FD627-EE38-470D-A112-71AE23B7C390} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {AC605855-F7B7-4A98-A9C6-4DC3D6ECB958} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {DEC8DD3D-E7C2-4205-BB92-F5EB55F7EA39} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {50F18FB9-E213-4FDA-B99B-6CB3974E81B7} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {B0923D0C-DC61-41FF-88B7-49D6679E1075} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {D553F21C-D561-484A-ACA7-78DC1D9C8589} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {DFEDFB6D-5709-45B1-BCBF-F1B978535F80} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {9A89F2D4-29AD-4747-905A-1FE7A3D181B3} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {E4BF4425-A857-4A19-B83B-960743FA53C5} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {BDC7398B-EFE3-443F-BD49-6658C892C8CA} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {B35BA5D1-80E9-43E9-820A-FA5F80B95A03} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {712C8147-6F50-488E-98FB-8E8EC49DEFC6} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {0CB8FA7E-8DD0-43CB-BE05-AD02565C62B7} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {A42EDE1A-59B0-4B1B-B06B-E2999180EDE2} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {0F6E846E-2832-4202-9442-B5F495F2D057} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {6C92A8D0-0F6F-4BEB-B242-19D04F173694} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {DFDAE3C3-FE5B-43FC-B71D-23E656B5190B} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {B43D2E6E-E197-49A9-9577-F8AF9EB903C0} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {2F119C97-4FDC-43F3-8C25-906294C1FF0C} = {0AB3BF05-4346-4AA6-1389-037BE0695223} + {D264432C-9CC4-496C-BC9B-81AFDF059BEE} = {E6B086F8-F6EC-5680-B584-F6ACDC8629BD} + {2BF4E16C-0BCA-49F2-8AF7-EA68C2A0515B} = {D52429C2-2147-59EC-BE18-3795B1C7CD2F} + {D842D167-961A-4632-8886-959890559ABC} = {FC069441-2B75-5077-8159-CC5FDF28943E} + {D8737EF1-E976-42F9-B183-1812EB5EF3AC} = {62172793-7918-5CED-8232-6D96E9FCB9C6} + {FC2D4CBB-B81B-403B-BCD7-E7E0B3644EDB} = {7787A5BD-F8D9-5B08-8B8D-D6D2929B3280} + {193DC9F9-E972-4E70-A137-717571603DEB} = {8BDA4D98-75C5-5A9E-8243-2E4455E353A5} + {6F069A41-9187-4C48-AC02-F387B8319AF7} = {AEB62502-2E7C-5609-A87B-1EA547E15DDF} + {3B0EFBF8-E424-44CD-B34B-35DCF9F5284B} = {E84BAC45-A985-5152-AFC2-081546467439} + {659C28C4-3CE9-48C1-B16F-4ECD7674C135} = {85AC3E1A-96A8-5E48-B1C7-6AFC0F0D9A35} + {E05FD627-EE38-470D-A112-71AE23B7C390} = {BFAD4AB5-4732-53FD-ADB3-7BC0D393BF70} + {DEC8DD3D-E7C2-4205-BB92-F5EB55F7EA39} = {8CD5853E-8A7A-5E15-A416-949270C86FC5} + {B0923D0C-DC61-41FF-88B7-49D6679E1075} = {AB7B6314-0F6B-5223-AD50-73B38D64CCEB} + {DFEDFB6D-5709-45B1-BCBF-F1B978535F80} = {2D7F1E7A-8F85-5168-BEC1-0458C71D976F} + {E4BF4425-A857-4A19-B83B-960743FA53C5} = {43B38725-E052-50F8-9922-F92C485D4325} + {B35BA5D1-80E9-43E9-820A-FA5F80B95A03} = {5CFF86F2-769E-515F-A062-D6D211F9DF1F} + {0CB8FA7E-8DD0-43CB-BE05-AD02565C62B7} = {2DB928DC-1312-5CB7-9ECB-19AA2B4D558A} + {0F6E846E-2832-4202-9442-B5F495F2D057} = {5E27F3E8-17E7-5399-A77A-013DF14DFC23} {0FAA6A94-E11B-405B-8EA8-0025D8304EA7} = {5D20AA90-6969-D8BD-9DCD-8634F4692FDA} - {78560140-8F73-4E6B-A7F8-CB2DA756EB1B} = {0AB3BF05-4346-4AA6-1389-037BE0695223} {64BA9455-0E0E-464F-800A-C3C5DCED40ED} = {5D20AA90-6969-D8BD-9DCD-8634F4692FDA} - {1C09DF05-D227-4FBB-908C-24F5755A0780} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {7847D656-F494-41B5-8E1A-322D6D22DB52} = {0AB3BF05-4346-4AA6-1389-037BE0695223} {563D9741-DD6B-418C-84BB-F5DECD671D87} = {5D20AA90-6969-D8BD-9DCD-8634F4692FDA} - {2C47C9BC-3AEE-4212-A3BE-74583A079B68} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {678BC29A-A571-4B0C-9697-4C2258F6681D} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {B742E7EF-E51C-4D60-8067-1EA6D1022099} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {2E92C012-F76A-4F25-91F4-359A5F0DEC4D} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {FAC2E957-E941-4258-9563-A4823C8629AF} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {BDF96F0D-D649-4B0A-B52F-077BC9A312A5} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {A7BCCBE7-402B-4151-B74B-CD2CC52DE0BD} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {B1F60948-867B-434D-B201-4E3FEB0B667E} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {F37866D9-8D7E-4814-94B8-29706B64CE1C} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {2C683E50-6139-41C1-9EC3-8D245BF879FF} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {F2F329F1-997A-4744-9518-DCB3AA9625CF} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {18BCD74D-62BC-4C31-A66D-6083E95DECAE} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {1837E4A6-C9C0-4DD0-A151-D3EBB6AC6A61} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {CA2F6BC9-7B33-451F-8272-D2893B8E6DD2} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {B9814B8D-B4F0-436E-ADD7-73B9DD8FFBEC} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {9C03E9A7-120D-4C69-A429-01A240E15385} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {E4108F5B-6D1F-46B4-A981-F9D72DCE8159} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {6D36096D-1269-45A5-A3A1-222FAEE0B221} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {0A16F586-1571-4BB0-813F-A87C65924B14} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {A7F4BE09-7C20-4B20-98CC-3BB61C854229} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {5292D24D-2D7A-4AB1-A065-EB5E5D2C994E} = {0AB3BF05-4346-4AA6-1389-037BE0695223} - {1A9633CE-05CB-4A96-A44C-63C9E8B0A841} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {B51F2E78-3A24-4F12-9D78-6D38E9D01A22} = {0AB3BF05-4346-4AA6-1389-037BE0695223} + {B1F60948-867B-434D-B201-4E3FEB0B667E} = {DB06F3C9-1316-5A9D-B089-70F85612B135} + {F37866D9-8D7E-4814-94B8-29706B64CE1C} = {DB06F3C9-1316-5A9D-B089-70F85612B135} {47340D45-F196-4B44-94FE-6DF9DD848232} = {66320409-64EC-F7C5-3DEF-65E7510DAAD1} + {8D626EA8-CB54-BC41-363A-217881BEBA6E} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} + {F5D7951B-46E2-C453-7B0B-4723FE704F28} = {8D626EA8-CB54-BC41-363A-217881BEBA6E} + {51C6C4A1-9B64-4E00-A300-D5DC3B537DC5} = {F5D7951B-46E2-C453-7B0B-4723FE704F28} + {BD84E505-A39E-424F-8B36-1F417290066E} = {F5D7951B-46E2-C453-7B0B-4723FE704F28} + {0CDA018B-BDBD-8926-19A4-D41D9F91466A} = {8D626EA8-CB54-BC41-363A-217881BEBA6E} + {F0AB3A20-E876-4588-9C7B-F0705CB0DB1F} = {0CDA018B-BDBD-8926-19A4-D41D9F91466A} + {C76ADD0A-930A-AB31-907C-945FD26FE7C1} = {8D626EA8-CB54-BC41-363A-217881BEBA6E} + {EB59443E-B4D6-440A-854D-4888D675488C} = {C76ADD0A-930A-AB31-907C-945FD26FE7C1} + {C0D55877-C3E5-44AF-ACE9-AE5310B4FB9E} = {C76ADD0A-930A-AB31-907C-945FD26FE7C1} + {22B10ACD-AD9E-B2C9-D6D4-4063DE5BCEC5} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} + {F1C835DA-50AC-482C-9C9C-85583954118B} = {22B10ACD-AD9E-B2C9-D6D4-4063DE5BCEC5} + {4556A84D-B735-46A6-B77B-C843ACC2868F} = {22B10ACD-AD9E-B2C9-D6D4-4063DE5BCEC5} + {581C1AFC-A79E-7578-3E64-521365DC72E1} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} + {0465CEC1-3384-A4C8-5864-AB25891933F8} = {581C1AFC-A79E-7578-3E64-521365DC72E1} + {B33C7FD3-EABC-40F9-8F80-D5E236328985} = {0465CEC1-3384-A4C8-5864-AB25891933F8} + {010D8B4E-F365-48CC-A330-D2E4C212BC28} = {0465CEC1-3384-A4C8-5864-AB25891933F8} + {E249B557-A53A-4449-9D5C-C97AD5FECCBA} = {0465CEC1-3384-A4C8-5864-AB25891933F8} + {79BF9758-D842-F411-45E4-8F4A5C558EE7} = {581C1AFC-A79E-7578-3E64-521365DC72E1} + {61C4ECD9-4ECE-4DB7-B8CB-7C5C412E8FBC} = {79BF9758-D842-F411-45E4-8F4A5C558EE7} + {EBFFBB42-17DF-41D3-80EC-4D578FBAA899} = {79BF9758-D842-F411-45E4-8F4A5C558EE7} + {AF20824B-A44D-4417-BC90-27F73CD70D07} = {79BF9758-D842-F411-45E4-8F4A5C558EE7} + {970E1635-8A0F-958A-81F0-D9C580AB2CAE} = {581C1AFC-A79E-7578-3E64-521365DC72E1} + {FDCE41C9-4A8D-4297-84B1-5AF613825142} = {970E1635-8A0F-958A-81F0-D9C580AB2CAE} + {741B0A23-C181-4C96-B293-579DC7297E95} = {009DFFFB-F0BD-48B4-AEAD-CEDF35BC0E9C} + {04074FB8-69AA-4A30-9DFA-1D5E9B3FF58E} = {009DFFFB-F0BD-48B4-AEAD-CEDF35BC0E9C} + {074BD54D-0C3D-4B25-B187-72A244534D86} = {0E9EA34E-5250-418B-A9BA-7E99935F0E8D} + {45EE3C27-EFDB-4DD6-BD12-22FC16976B67} = {D788411F-8792-45E3-928F-F9DCFFF75E30} + {F5BA06AB-54D9-4883-9CEB-C657DCEDF2AF} = {D788411F-8792-45E3-928F-F9DCFFF75E30} + {B5C35C2A-F6F3-4BC1-8F9F-6CB51B9DE7CD} = {37C89777-2B74-4A6F-842F-4C10158F46FF} + {7346A356-DF87-4112-AA88-8E63623D0294} = {66CB70AE-BDD6-4A8A-9DB5-0858F6D320F0} + {CC589D36-55E1-4433-BABD-33674DF92534} = {66CB70AE-BDD6-4A8A-9DB5-0858F6D320F0} + {A42573BF-BEE2-4041-8C7B-483A559D2194} = {31A327CD-8594-46C4-8BD5-531D6E60796C} + {DDFBAA9D-416B-4418-A697-1F6414AE1DFC} = {31A327CD-8594-46C4-8BD5-531D6E60796C} + {E1445FE8-FCA2-4740-9F69-107BF92F1EA1} = {DFBBD151-823C-4D36-B023-06EB4B6FE282} + {4944C6D1-575E-46D9-A5DF-0AA17EF721BE} = {DFBBD151-823C-4D36-B023-06EB4B6FE282} + {53900074-9F84-4F09-90CF-35045B95ABDE} = {DFBBD151-823C-4D36-B023-06EB4B6FE282} + {D086CD6F-28E2-40D5-99BA-2EB2C1C579CC} = {FF82FB03-E845-4CD2-A25F-C3A2BF508FAA} + {CBF66CC9-7414-42F0-8695-7B085A91A078} = {FF82FB03-E845-4CD2-A25F-C3A2BF508FAA} + {5EF8288A-936B-4037-A5B6-8C760DC8EF47} = {35F9248B-D56E-438C-9961-79FA629832EC} + {386DD33E-6973-4FAE-B6D5-E1908E4FB410} = {35F9248B-D56E-438C-9961-79FA629832EC} + {1872225F-5804-4ED5-BC4E-5FEC1B7C802E} = {7E62ACA7-080B-4DC5-BF12-23F4CA3EC978} + {303F01E1-A8D3-4CE1-86CE-C3A8AE5DF7DB} = {7E62ACA7-080B-4DC5-BF12-23F4CA3EC978} + {BE99B540-9882-4585-B741-58BB99B4F82A} = {7E62ACA7-080B-4DC5-BF12-23F4CA3EC978} + {03744BE4-74A4-43B2-8AA6-6A193C9354A1} = {7E62ACA7-080B-4DC5-BF12-23F4CA3EC978} + {196FF6B3-7BAB-44AE-B647-E03754FC703F} = {7E62ACA7-080B-4DC5-BF12-23F4CA3EC978} + {5D173EBB-9658-490F-95D1-01D126273382} = {6323151F-5E4A-40DE-AFE6-A45DA29ABAC0} + {97FD7520-2802-4188-B33A-5CAC39FD4F5F} = {6323151F-5E4A-40DE-AFE6-A45DA29ABAC0} + {D4959172-0EB9-440F-B828-CAC8F922849D} = {83EC8217-AD1A-4CDE-ADF3-FEA926D045C2} + {E46BF95A-E81E-4625-80D2-640849218A88} = {83EC8217-AD1A-4CDE-ADF3-FEA926D045C2} + {4A8CDF3E-F09B-4486-AC6A-465CF921C653} = {A0394335-5687-43FB-9420-321993485A92} + {03D7E2E8-F00D-44B8-88EF-83E4FDA0E79B} = {A0394335-5687-43FB-9420-321993485A92} + {F1FEED9A-B4C8-4B05-98AB-DA695D9578AA} = {C083AF48-D3C2-4418-953A-5A6E76DA11C7} + {0B9200B0-2289-4269-B420-26AE29231903} = {66908F26-A8F9-4F35-AFE8-178D5058F546} + {4F9B0010-6E34-44A2-B88F-477E2F9C9A5D} = {66908F26-A8F9-4F35-AFE8-178D5058F546} + {72A253E0-79E2-453B-869C-6E343221B822} = {205AA9E6-AFE8-443B-BF8F-A4289865EE94} + {A92D9AD1-67D0-48A4-B954-47A0F022B180} = {205AA9E6-AFE8-443B-BF8F-A4289865EE94} + {3749BDC6-B308-4ED0-8F98-52FB92D35054} = {8AEA82E4-86D0-443D-BF00-75B676F19209} + {652B4625-5A23-4915-B694-922EFCFADF10} = {8AEA82E4-86D0-443D-BF00-75B676F19209} + {A07A1342-BCA9-4B57-8504-DB111609AFC0} = {AED1A7AD-5670-498B-9385-C2132866F96C} + {F08E51D8-9967-4CCD-AF44-0F365CF23D97} = {AED1A7AD-5670-498B-9385-C2132866F96C} + {EBBC276F-EDB3-41BA-9D4D-C45E6CF7596C} = {32CD5BDB-4168-4621-AD7D-12EEB1C1D20C} + {0CE45C9E-4ACF-45B6-B215-EC68A7B88FAF} = {32CD5BDB-4168-4621-AD7D-12EEB1C1D20C} + {586A61E0-822E-4D94-BFBF-6C6EB70B5839} = {7C7566E4-8190-4413-A07A-06D0BED86B17} + {AD930AFA-A61A-4EAA-A678-512315198E44} = {7C7566E4-8190-4413-A07A-06D0BED86B17} + {B99877F0-4005-413A-AB0A-D98721CA2CD8} = {F62E0701-4AA8-489A-8B17-CC54B592E7AA} + {5D2F3278-38BE-4BB8-84E0-ACA54DEE50B4} = {F62E0701-4AA8-489A-8B17-CC54B592E7AA} + {D0D57D09-0433-480C-8322-CECA921E4E69} = {F62E0701-4AA8-489A-8B17-CC54B592E7AA} + {8A0F6DA4-4D5A-44E5-B816-D0ED481FE5AF} = {F62E0701-4AA8-489A-8B17-CC54B592E7AA} + {8116E1B5-0B44-45A4-8A6B-6D8A3C81BAFA} = {F62E0701-4AA8-489A-8B17-CC54B592E7AA} + {16BA813B-EE0F-47E3-9141-D0B33C5421C4} = {4E121254-230B-48DE-B33F-99DD22488F86} + {2C4887E0-ED95-4748-90AA-A5DF454DED38} = {4E121254-230B-48DE-B33F-99DD22488F86} + {CDCE0C6E-F696-47B5-BE7F-03B41CFFD99D} = {5BD13311-A355-45D5-B6B7-B995E915DB8E} + {3E08EBB2-E3DA-4644-87F6-77173D9EAB53} = {5BD13311-A355-45D5-B6B7-B995E915DB8E} + {504488A0-6FBF-4060-B1EF-ADD9AA1E84B2} = {937AF118-35AB-4549-A8E9-22A456C2CF6D} + {96FC6FB4-F779-4CDB-B680-DB845A1451FB} = {2D764CC1-42B1-4988-B491-F334C49D539A} + {E299CEF3-0317-440D-9F04-7D7303D3E1A2} = {2D764CC1-42B1-4988-B491-F334C49D539A} + {2E82B11C-BD0E-4B67-B7EB-95F10BA48FA8} = {94B4D334-3D38-40B2-AC85-880DE1B6DA3C} + {BE74FCCF-368C-47A4-A185-D45F0AE6AA46} = {94B4D334-3D38-40B2-AC85-880DE1B6DA3C} + {FA6978D1-029D-4FC9-B3CB-64BDE7C2D5A4} = {DE2B6C08-BC6F-4B4D-81EB-939560AF4ACF} + {1755CB0E-AB66-4EF1-B8B0-083C015A4D44} = {94B4D334-3D38-40B2-AC85-880DE1B6DA3C} + {EA62799E-E766-4E7E-95B6-C374E38027AD} = {71C52D7C-B9CB-4F92-A4E0-A50CE085CC86} + {F36C3C36-3D7A-4BB6-9F42-E64E610144AB} = {71C52D7C-B9CB-4F92-A4E0-A50CE085CC86} + {1467CBD2-32BA-4A1F-915F-047EE8689712} = {0854471C-7B75-41B5-9F84-B5785B6F7DC9} + {47751B7D-94B0-435B-8CE6-1848871AB432} = {71C52D7C-B9CB-4F92-A4E0-A50CE085CC86} + {48EB6B57-F2D2-4031-B0A4-49E9F7993952} = {680F99D3-BC16-43AA-AB7A-6A63514E991F} + {EF3F5B1D-D5E0-4535-B2F9-0E0829B4948F} = {3CEE47B8-E41C-4CE6-A8E5-212C5CE2E483} + {9F33CDC6-783A-4E0B-99D8-BC56FBF5D994} = {362F5C76-5177-488D-B130-ECB52FAFB364} + {759BC5A2-033C-42AE-8DD9-CAAF90997E40} = {362F5C76-5177-488D-B130-ECB52FAFB364} + {20E08040-3C48-48DE-B323-896B58142F84} = {A33CCF80-2F1D-49B7-ACCA-91B45CD6494F} + {2C620263-59CA-42CA-9810-E5CFCDAC4975} = {A33CCF80-2F1D-49B7-ACCA-91B45CD6494F} + {A0D7AC02-2142-4207-8672-2E576EA2F6D9} = {5A7B40BA-F07C-40E7-B77D-F5FCA356B578} + {E767E4F9-C44C-2913-F3A0-3215D526EE28} = {581C1AFC-A79E-7578-3E64-521365DC72E1} + {187A777D-F60C-4EDE-AD47-68A7AA7B1989} = {E767E4F9-C44C-2913-F3A0-3215D526EE28} + {2F141597-3D18-4358-9ADE-75879DB844F8} = {F5304D7C-4593-49EE-998C-31837B0EE58E} + {3E9C3776-17C9-28DE-3735-A8B9F121C183} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} + {E4931818-134D-AEEF-71F4-DA5A58798841} = {3E9C3776-17C9-28DE-3735-A8B9F121C183} + {DE27E0B8-1B3F-4737-8092-080282D912EF} = {E4931818-134D-AEEF-71F4-DA5A58798841} + {0D983CD9-53D7-451C-865E-4F2F48A2173A} = {EBB14FFE-44D2-4D1C-9298-3DC24FBE65EC} + {E292F84C-E625-4AB2-9010-103DB8255709} = {BA9CAB86-7DE4-4483-8C91-D3F25B6E3555} + {80B7E2C3-F5C5-44C4-A518-1966B4E49DD1} = {0AB3BF05-4346-4AA6-1389-037BE0695223} + {009DFFFB-F0BD-48B4-AEAD-CEDF35BC0E9C} = {80B7E2C3-F5C5-44C4-A518-1966B4E49DD1} + {0E9EA34E-5250-418B-A9BA-7E99935F0E8D} = {0AB3BF05-4346-4AA6-1389-037BE0695223} + {BED798C9-347C-4379-B11F-0B2139AD4881} = {80B7E2C3-F5C5-44C4-A518-1966B4E49DD1} + {D788411F-8792-45E3-928F-F9DCFFF75E30} = {BED798C9-347C-4379-B11F-0B2139AD4881} + {37C89777-2B74-4A6F-842F-4C10158F46FF} = {BED798C9-347C-4379-B11F-0B2139AD4881} + {66CB70AE-BDD6-4A8A-9DB5-0858F6D320F0} = {BED798C9-347C-4379-B11F-0B2139AD4881} + {31A327CD-8594-46C4-8BD5-531D6E60796C} = {BED798C9-347C-4379-B11F-0B2139AD4881} + {DFBBD151-823C-4D36-B023-06EB4B6FE282} = {BED798C9-347C-4379-B11F-0B2139AD4881} + {FF82FB03-E845-4CD2-A25F-C3A2BF508FAA} = {BED798C9-347C-4379-B11F-0B2139AD4881} + {35F9248B-D56E-438C-9961-79FA629832EC} = {BED798C9-347C-4379-B11F-0B2139AD4881} + {7E62ACA7-080B-4DC5-BF12-23F4CA3EC978} = {BED798C9-347C-4379-B11F-0B2139AD4881} + {6323151F-5E4A-40DE-AFE6-A45DA29ABAC0} = {BED798C9-347C-4379-B11F-0B2139AD4881} + {83EC8217-AD1A-4CDE-ADF3-FEA926D045C2} = {BED798C9-347C-4379-B11F-0B2139AD4881} + {A0394335-5687-43FB-9420-321993485A92} = {BED798C9-347C-4379-B11F-0B2139AD4881} + {C083AF48-D3C2-4418-953A-5A6E76DA11C7} = {BED798C9-347C-4379-B11F-0B2139AD4881} + {66908F26-A8F9-4F35-AFE8-178D5058F546} = {BED798C9-347C-4379-B11F-0B2139AD4881} + {205AA9E6-AFE8-443B-BF8F-A4289865EE94} = {BED798C9-347C-4379-B11F-0B2139AD4881} + {8AEA82E4-86D0-443D-BF00-75B676F19209} = {BED798C9-347C-4379-B11F-0B2139AD4881} + {AED1A7AD-5670-498B-9385-C2132866F96C} = {BED798C9-347C-4379-B11F-0B2139AD4881} + {32CD5BDB-4168-4621-AD7D-12EEB1C1D20C} = {BED798C9-347C-4379-B11F-0B2139AD4881} + {7C7566E4-8190-4413-A07A-06D0BED86B17} = {BED798C9-347C-4379-B11F-0B2139AD4881} + {F62E0701-4AA8-489A-8B17-CC54B592E7AA} = {BED798C9-347C-4379-B11F-0B2139AD4881} + {4E121254-230B-48DE-B33F-99DD22488F86} = {BED798C9-347C-4379-B11F-0B2139AD4881} + {5BD13311-A355-45D5-B6B7-B995E915DB8E} = {BED798C9-347C-4379-B11F-0B2139AD4881} + {CD5EE415-0F19-4214-8ED6-D553E4DCF711} = {80B7E2C3-F5C5-44C4-A518-1966B4E49DD1} + {937AF118-35AB-4549-A8E9-22A456C2CF6D} = {CD5EE415-0F19-4214-8ED6-D553E4DCF711} + {2D764CC1-42B1-4988-B491-F334C49D539A} = {CD5EE415-0F19-4214-8ED6-D553E4DCF711} + {A0F5AD1E-66F8-409B-A43F-80FC7D3BC2EA} = {80B7E2C3-F5C5-44C4-A518-1966B4E49DD1} + {94B4D334-3D38-40B2-AC85-880DE1B6DA3C} = {A0F5AD1E-66F8-409B-A43F-80FC7D3BC2EA} + {C9529F91-97D0-4D71-8B84-0149EF9E59EA} = {0AB3BF05-4346-4AA6-1389-037BE0695223} + {000AAC75-0F73-4D56-90BF-D1A72F2F30C1} = {C9529F91-97D0-4D71-8B84-0149EF9E59EA} + {438A8FF4-7722-4C33-A323-7B5A8E76BA3E} = {000AAC75-0F73-4D56-90BF-D1A72F2F30C1} + {276BBDF3-56D1-4B09-A345-45A0B2C4382A} = {438A8FF4-7722-4C33-A323-7B5A8E76BA3E} + {DE2B6C08-BC6F-4B4D-81EB-939560AF4ACF} = {276BBDF3-56D1-4B09-A345-45A0B2C4382A} + {71C52D7C-B9CB-4F92-A4E0-A50CE085CC86} = {A0F5AD1E-66F8-409B-A43F-80FC7D3BC2EA} + {0854471C-7B75-41B5-9F84-B5785B6F7DC9} = {276BBDF3-56D1-4B09-A345-45A0B2C4382A} + {680F99D3-BC16-43AA-AB7A-6A63514E991F} = {A0F5AD1E-66F8-409B-A43F-80FC7D3BC2EA} + {3CEE47B8-E41C-4CE6-A8E5-212C5CE2E483} = {A0F5AD1E-66F8-409B-A43F-80FC7D3BC2EA} + {362F5C76-5177-488D-B130-ECB52FAFB364} = {80B7E2C3-F5C5-44C4-A518-1966B4E49DD1} + {A33CCF80-2F1D-49B7-ACCA-91B45CD6494F} = {CD5EE415-0F19-4214-8ED6-D553E4DCF711} + {76BC07A0-07D4-4A5D-B114-458370689B46} = {80B7E2C3-F5C5-44C4-A518-1966B4E49DD1} + {5A7B40BA-F07C-40E7-B77D-F5FCA356B578} = {76BC07A0-07D4-4A5D-B114-458370689B46} + {5D201C11-712E-449C-BC98-08AA8A95C4CA} = {0AB3BF05-4346-4AA6-1389-037BE0695223} + {43BF38EC-642D-417B-9232-914240101F70} = {5D201C11-712E-449C-BC98-08AA8A95C4CA} + {F5304D7C-4593-49EE-998C-31837B0EE58E} = {43BF38EC-642D-417B-9232-914240101F70} + {39D51957-0B92-47CE-8648-A3C5106E3C14} = {0AB3BF05-4346-4AA6-1389-037BE0695223} + {EA288710-2EA9-45A9-9909-9D908B171AF8} = {39D51957-0B92-47CE-8648-A3C5106E3C14} + {7A807F6C-FB62-4A27-8311-D2AD26053BD8} = {EA288710-2EA9-45A9-9909-9D908B171AF8} + {EBB14FFE-44D2-4D1C-9298-3DC24FBE65EC} = {7A807F6C-FB62-4A27-8311-D2AD26053BD8} + {4DD286CE-A6D9-4664-B21E-EA3ABCCA4FDF} = {000AAC75-0F73-4D56-90BF-D1A72F2F30C1} + {BA9CAB86-7DE4-4483-8C91-D3F25B6E3555} = {4DD286CE-A6D9-4664-B21E-EA3ABCCA4FDF} + {92085A4E-5C5F-59FF-D309-E162C4CC7E01} = {80B7E2C3-F5C5-44C4-A518-1966B4E49DD1} + {7D9B31E4-735C-FC86-8AE5-F0C462F05946} = {92085A4E-5C5F-59FF-D309-E162C4CC7E01} + {4ADB6559-157F-4500-996B-74B1ECE8F02C} = {7D9B31E4-735C-FC86-8AE5-F0C462F05946} + {205D2986-285B-4C26-B48E-6540AED0975C} = {5D20AA90-6969-D8BD-9DCD-8634F4692FDA} + {AB5342AF-A53E-48E6-B345-045E8F27084C} = {009DFFFB-F0BD-48B4-AEAD-CEDF35BC0E9C} EndGlobalSection EndGlobal diff --git a/benchmarks/FluxFlow.Engine.Benchmarks/FluxFlow.Engine.Benchmarks.csproj b/benchmarks/FluxFlow.Engine.Benchmarks/FluxFlow.Engine.Benchmarks.csproj index 73ef6a6a..c063f5be 100644 --- a/benchmarks/FluxFlow.Engine.Benchmarks/FluxFlow.Engine.Benchmarks.csproj +++ b/benchmarks/FluxFlow.Engine.Benchmarks/FluxFlow.Engine.Benchmarks.csproj @@ -12,9 +12,9 @@ - - - + + + diff --git a/docs/01-getting-started.md b/docs/01-getting-started.md index f2854044..0a9345c8 100644 --- a/docs/01-getting-started.md +++ b/docs/01-getting-started.md @@ -101,7 +101,7 @@ var sent = await application.Ports.SendAsync( "Main.Map.Input", FlowMessage.Create(input)); -var output = await application.Ports.ReceiveAsync( +var output = await application.Ports.ReceiveAsync( "Main.Map.Output", TimeSpan.FromSeconds(10)); ``` diff --git a/docs/03-node-authoring.md b/docs/03-node-authoring.md index c16223db..1fdd48a9 100644 --- a/docs/03-node-authoring.md +++ b/docs/03-node-authoring.md @@ -142,7 +142,7 @@ Extra outputs are completed, faulted, and disposed with the node. ## Events And Errors -Use `FlowEvent` for workflow activity that a host may store, filter, or show as +Use `FlowEvent` as a code-first builder for workflow activity that a host may store, filter, or show as history: ```csharp @@ -201,8 +201,9 @@ The `Has...` prefix is intentional: the selected node member already exists; the call describes the component contract and maps its external port name to that existing member rather than creating another Dataflow port. Factories and selectors are not executed during registration. `HasEvents` -selects an `ISourceBlock` and exposes the bridged public -`FlowMessage` output under the chosen name. There is no +selects an `ISourceBlock` whose non-null value follows the canonical +event schema. Calling `EmitEvent(FlowEvent)` serializes directly into that stream; +it does not create a hidden component or Dataflow node. There is no implicit or globally reserved `Events` port. Signal targets use the same single-declaration model and retain signal diff --git a/docs/04-package-authoring.md b/docs/04-package-authoring.md index e6ea0589..60489746 100644 --- a/docs/04-package-authoring.md +++ b/docs/04-package-authoring.md @@ -78,8 +78,9 @@ private static OrderReviewNode CreateOrderReview( The selected node type drives message-type inference. The one public port call produces immutable descriptor metadata and the runtime binding; no reflection, scanning, attributes, or property-name convention is involved. Event sources -remain `FlowEvent` streams internally and are bridged to the public -`ComponentEvent` output named by `HasEvents`. Omitting `HasEvents` means the +use canonical `FlowMessage`/`FlowValue` transport. `FlowEvent` remains an +optional emitter-side builder, and `HasEvents` exposes the same stream without +inserting a hidden node. Omitting `HasEvents` means the component has no event output, and a normal output may use the name `Events`. For the uncommon case where a package must construct the complete runtime diff --git a/docs/05-hosting-and-observability.md b/docs/05-hosting-and-observability.md index f88e697a..10e028b8 100644 --- a/docs/05-hosting-and-observability.md +++ b/docs/05-hosting-and-observability.md @@ -120,6 +120,8 @@ client, reconnect, credential, and transport ownership. Each canonical component exposes a traced `Workflow.Component.Events` output. Engine also exposes: +- `application.Ports.Activity` for one canonical, filterable stream containing + component events, lifecycle events, and diagnostics. - `System.Events.Output` and `application.Ports.SystemEvents` for reliable, ordered application and revision transitions. - `System.Diagnostics.Output` and `application.Ports.Diagnostics` for bounded, @@ -127,6 +129,13 @@ Engine also exposes: - `application.Ports.Rejections`, `Status`, and `Completion` for direct runtime observation. +`Activity` carries non-generic `FlowMessage` envelopes with non-null `FlowValue` +payloads. Stable `flow.event.*` headers support fast routing; the payload contains +`type`, `kind`, `level`, `dimensions`, `measurements`, `details`, and legacy +`attributes`. The aggregate is observational and never backpressures workflow +execution. Reliable system-event delivery and best-effort diagnostics retain +their existing independent policies. + Accepted system events are delivered in order with bounded backpressure. Diagnostic overflow rejects immediately; accepted diagnostics remain ordered. Observer or listener failure is isolated from workflow processing. diff --git a/docs/07-validation-and-errors.md b/docs/07-validation-and-errors.md index dd023a8e..e8655e28 100644 --- a/docs/07-validation-and-errors.md +++ b/docs/07-validation-and-errors.md @@ -17,6 +17,29 @@ Caller cancellation remains cancellation. A source-load failure leaves the host `Degraded` when no revision is active. A rejected update keeps the prior active revision running. +## Sample Input Preflight + +Runtime descriptors expose the destination materializer's declared input shape. +For a selected descriptor and sample value: + +```csharp +var result = descriptor.ValidateInputShape("Input", sample); +if (result is null) +{ + // No shape was declared; this sample has not been checked. +} +else if (!result.IsValid) +{ + Console.WriteLine(result.Error); +} +``` + +This check runs without component activation and reports top-level kind or +required-property mismatches. Success is structural only. Runtime materialization +and domain validation still belong to the destination component. Unknown output +shapes do not make a canonical graph link invalid. See +[Flow Data Contracts](20-flow-data-contracts.md#discoverable-input-shapes). + ## Runtime Channels Canonical components follow one model: @@ -24,7 +47,7 @@ Canonical components follow one model: | Channel | Contract | Use | |---------|----------|-----| | `Output` | `FlowMessage` | A typed value or `FlowError` that workflow logic may handle. | -| `Events` | `FlowMessage` | Lifecycle, diagnostics, observations, warnings, and metrics. | +| `Events` | `FlowMessage` with a non-null canonical `FlowValue` | Lifecycle, diagnostics, observations, warnings, and metrics. | | `Completion` | `Task` | Unrecoverable implementation, infrastructure, or lifecycle failure. | There is no new universal `Errors` port. A validation rejection, HTTP failure, @@ -52,9 +75,11 @@ correlated where source information exists, and carried in the normal traced message envelope. They can feed logging, metrics, mapping, conditional links, another workflow, or direct observation. -`System.Events.Output` is separate. It carries Engine application and revision -events; component events are not duplicated into it. `System.Diagnostics.Output` -remains the Engine best-effort diagnostic stream. +`System.Events.Output` is the reliable canonical stream for Engine application and +revision transitions. `System.Diagnostics.Output` is the best-effort canonical +diagnostic stream. `application.Ports.Activity` mirrors both and +aggregates component event outputs into one canonical, dynamically filterable +stream without coupling workflow execution to observers. ## Completion diff --git a/docs/10-expression-mapping.md b/docs/10-expression-mapping.md index 75017293..7931cf08 100644 --- a/docs/10-expression-mapping.md +++ b/docs/10-expression-mapping.md @@ -115,9 +115,10 @@ in it. Engine-specific adaptation belongs in the engine implementation. ## Schema-less JSON -`JsonMapperNode` is the explicit `JsonElement` specialization used by the -configuration-driven `data.map` registration. It accepts and emits detached -JSON values. Use it only when JSON semantics are part of the workflow contract. +`JsonMapperNode` is the internal `JsonElement` specialization used by the +configuration-driven `data.map` registration. Its runtime-authored ports expose +`FlowValue`; binding adapters materialize detached JSON for the node and wrap +its result back into `FlowValue`. Known application types should stay typed. If a workflow intentionally needs a dynamic CLR shape, make that conversion explicit in a mapper and emit the @@ -126,8 +127,8 @@ payloads, not FluxFlow foundation types. ## Composition Registration -`FluxFlow.Components.Mapping.Composition` registers the schema-less JSON -component descriptor and its explicit Designer declaration: +`FluxFlow.Components.Mapping.Composition` registers the schema-less mapper and +its explicit Designer declaration: ```csharp services.AddFluxFlowComponents().AddMapping(); @@ -135,9 +136,9 @@ services.AddFluxFlowComponents().AddMapping(); The host provides a keyed `IFlowExpressionEngine`; `IMappingContextFactory` and `TimeProvider` are optional host-owned resources. Metadata exposes one -`JsonElement` Input, one `JsonElement` Output, and Events. `InputType` and -`OutputType` remain diagnostic/configuration hints and do not introduce runtime -reflection or automatic conversion. +`FlowValue` Input, one `FlowValue` Output, and Events. `InputType` and +`OutputType` remain diagnostic/configuration hints; the mapper performs the +configured value transformation. ## Expression Adapter Rules @@ -146,5 +147,5 @@ reflection or automatic conversion. - Let JSON-oriented engines project or consume `JsonElement` explicitly. - An engine may create an internal read-only dynamic view for evaluation, but that view must not become a public component or persistence contract. -- Do not add assembly scanning, reflection registration, implicit link - conversion, or a universal dynamic object. +- Do not add assembly scanning, reflection registration, or a registry that + attempts to convert every component contract into every other contract. diff --git a/docs/11-package-versioning.md b/docs/11-package-versioning.md index 701d72bb..8c46c005 100644 --- a/docs/11-package-versioning.md +++ b/docs/11-package-versioning.md @@ -109,6 +109,25 @@ published. Same-version readiness checks remain valid. A bounded local check can provide `-BaselineVersion` to compare against another deliberate version; the manifest property is still required and validated. +## Intentional breaking releases + +A compatibility failure is evidence of a contract change, not a requirement to +retain a parallel legacy API. A reviewed breaking release can retire the old +contract when the replacement is simpler and preserves the required behavior. + +- Give each affected post-1.0 package a new major version, including prerelease + candidates. Rebuild dependent packages that consume changed signatures. +- Keep the published comparison baseline; never set it to null to bypass a break. +- Record only individually reviewed breaks in the package-local + `CompatibilitySuppressions.xml`. Keep package validation enabled, including + validation between target frameworks. Do not use global diagnostic suppression. +- Document each replacement and migration step. A passing comparison with these + exceptions means the remaining differences are accepted, not that old binaries + are compatible. Future baselines require a fresh review of the exception list. + +The [canonical event migration](48-canonical-event-migration.md) records the +current intentional change and its consumer responsibilities. + ## Release Checklist Before publishing: diff --git a/docs/12-component-composition.md b/docs/12-component-composition.md index 4457075d..9243983e 100644 --- a/docs/12-component-composition.md +++ b/docs/12-component-composition.md @@ -157,13 +157,14 @@ and can be mapped, conditioned, recorded, retried, or sent to another workflow. Removed error-port declarations are rejected; canonical registrations do not expose them. -Every canonical registration reserves `Events` as an output carrying -`FlowMessage`. The address +Every canonical event registration exposes its chosen event output as a +non-generic `FlowMessage` carrying the canonical event `FlowValue`. The address `OrderProcessing.ValidateOrder.Events` participates in links and direct runtime observation like any other output. Its message envelope remains the authority for trace, correlation, message, and causation identity. -Component events are not copied into `System.Events.Output`. The latter is the +Component events are not copied into the reliable `System.Events.Output` lifecycle +stream. They are aggregated into `application.Ports.Activity`. The former is the Engine-owned application/revision event stream, so observing both does not produce duplicate component events. diff --git a/docs/14-public-api-overview.md b/docs/14-public-api-overview.md index a80249ab..21267016 100644 --- a/docs/14-public-api-overview.md +++ b/docs/14-public-api-overview.md @@ -244,8 +244,10 @@ remain normal value-or-error messages. ## Component Contracts -The following table lists the maintained runtime surface. Every output type is -inside `FlowMessage` and may instead carry `FlowError`. +The following table lists the maintained direct node surface. Every output type +is inside `FlowMessage` and may instead carry `FlowError`. Runtime-authored +composition descriptors expose `FlowValue` for ordinary data ports and adapt +to these module-owned types at the component boundary. | Family | Primary nodes | Value contracts | |--------|---------------|-----------------| @@ -277,12 +279,13 @@ after contract initialization cannot change projection or expectation behavior. ## Mapping, JSON, and Expressions -Typed components keep CLR values typed. Configuration-driven mapping, -assertion, routing, state, and validation registrations use explicit -`JsonElement` specializations where their document contract is schema-less. -Expression engines adapt those values according to their own language. A mapper -may intentionally emit a CLR record, dictionary, or `ExpandoObject`, but no -dynamic object is required by the runtime. +Direct code-first nodes keep CLR values typed. Runtime-authored normal-data +ports use `FlowValue`, while signal and diagnostic-event ports retain their +dedicated contracts. Each component family owns the materializer from +`FlowValue` to its internal request type; there is no global domain mapper. +Expression engines adapt detached JSON according to their own language. +`FluxFlow.Expressions.Jsonata` provides the JSONata expression adapter without +changing the runtime's `FlowValue` boundary or introducing a shared domain mapper. ## Content and Transport Boundaries diff --git a/docs/15-engine-compatibility.md b/docs/15-engine-compatibility.md index 128d11a7..667a1da7 100644 --- a/docs/15-engine-compatibility.md +++ b/docs/15-engine-compatibility.md @@ -93,12 +93,11 @@ baseline process; it does not change canonical application JSON, component addresses, normal-data delivery, or Engine's exact descriptor/instance validation. -The typed builder uses `HasInput`, `HasSignalInput`, `HasOutput`, and -`HasEvents`. These names are declarative: the node already owns the selected -Dataflow member, while the component declaration maps an external port name to -it. The short-lived typed `Add...` names were removed rather than retained as -aliases; this is another intentional authoring-only break with no runtime or -JSON behavior change. +The builder uses `HasInput` and `HasOutput` for direct typed contracts, +`HasFlowValueInput` and `HasFlowValueOutput` for runtime-authored normal data, +and `HasSignalInput` and `HasEvents` for their dedicated channels. A +`HasFlowValueInput` declaration requires a component-owned materializer for the +node's internal request type; output adaptation is representation-only. Event outputs are explicit through `HasEvents(name, selector)`. Engine no longer injects or reserves `Events`; built-in packages explicitly retain that diff --git a/docs/19-vnext-runtime-architecture.md b/docs/19-vnext-runtime-architecture.md index e24fc97b..cf3321e7 100644 --- a/docs/19-vnext-runtime-architecture.md +++ b/docs/19-vnext-runtime-architecture.md @@ -48,14 +48,18 @@ relation, not a data-processing cycle. ## Typed Message Processing -Each port declares its actual `FlowMessage` type. A message contains either -T or `FlowError`; there is no nested result wrapper and no universal error port. -Trace identity remains stable through a lineage while each emitted message gets -a new message identity and immediate causation. - -Known commands, results, and events remain CLR records. Explicit JSON nodes use -detached `JsonElement`. Exact transport bodies use `FlowContent`. Dynamic CLR -objects are mapper outputs only when a workflow explicitly requests them. +Direct code-first ports declare their actual `FlowMessage` type. +Runtime-authored ordinary data ports declare `FlowMessage` so links +remain stable when workflow values originate outside the CLR type system. A +message contains either its value or `FlowError`; there is no universal error +port. Representation adapters preserve message identity, while semantic node +processing creates normal causation. + +Each component family materializes `FlowValue` into the narrow request type it +owns. This keeps HTTP, MQTT, storage, state, and other domain knowledge out of a +global converter. Signals and diagnostic events retain dedicated CLR contracts. +Exact transport bodies remain `FlowContent` values nested in the relevant +module contract. Dataflow inputs provide bounded buffering and semantic processing profiles map user-facing mode/order/buffer choices to technical block settings. Outputs diff --git a/docs/20-flow-data-contracts.md b/docs/20-flow-data-contracts.md index f7aeec68..b62ce359 100644 --- a/docs/20-flow-data-contracts.md +++ b/docs/20-flow-data-contracts.md @@ -6,24 +6,69 @@ renames; namespace ownership does not imply a separate package or assembly. The former `FluxFlow.Data` package is retired without a forwarding package or type forwarding. -FluxFlow does not define a universal workflow value. Each component uses the -narrowest contract it owns: a CLR type for normal commands and results, -`JsonElement` for explicitly schema-less JSON work, and `FlowContent` for exact -transport bytes. `FlowMessage` adds workflow identity and carries either the -declared value or `FlowError`. +FluxFlow uses `FlowValue` as the canonical structured value exchanged by +runtime-authored ordinary data ports. Direct code-first nodes remain generic +and keep the narrow CLR contracts they own. `FlowContent` represents exact +transport bytes inside values that require byte fidelity. `FlowMessage` adds +workflow identity and carries either the declared value or `FlowError`. ## Representation Boundaries | Need | Contract | |------|----------| -| Known command, event, or result | A typed immutable CLR record or scalar | -| Schema-less JSON operation | A detached `JsonElement` | -| Intentionally dynamic C# branch | A mapper-produced CLR object or `ExpandoObject` | -| Exact transport body | `FlowContent` | +| Runtime-authored normal-data link | `FlowValue` | +| Direct code-first node | A typed immutable CLR record or scalar | +| Module implementation | A module-owned request/result type materialized from or wrapped as `FlowValue` | +| Schema-less expression implementation | A detached `JsonElement` behind the runtime boundary | +| Exact transport body | `FlowContent` nested in the owning module contract | | Processing failure | `FlowError` inside `FlowMessage` | -There is no replacement for the removed `FlowValue` tree. Dynamic access is an -opt-in mapper or expression-engine behavior, not an engine storage model. +`FlowValue` is deliberately small: it owns one detached JSON value and supports +serialization/deserialization mechanics. It is not a registry, dynamic proxy, +or God object that understands HTTP, MQTT, storage, or any other component. + +## Module-Owned Materialization + +Every runtime component that needs a typed input supplies an +`IFlowValueMaterializer` from the module that owns `T`. A materializer checks +the structural input it accepts, normalizes module-specific conveniences, and +returns either the typed request or a stable module-owned `FlowError`. + +For example, the HTTP module accepts an object with request fields and owns the +conversion to `HttpClientRequest`; MQTT independently owns conversion to +`MqttPublishMessage`. The framework never scans for conversions and never tries +to map arbitrary types to arbitrary types. Runtime mapper components transform +`FlowValue` to `FlowValue` explicitly in workflow topology. + +## Discoverable Input Shapes + +`IFlowValueMaterializer.InputShape` describes accepted top-level JSON kinds and +required object property names. Declare that same immutable `FlowValueShape` with +`HasFlowValueInput(name, selector, materializer.InputShape)` when registering a +canonical node. Instance factories use `HasFlowValueInput(name, inputShape)`. +Both runtime `ComponentPortMetadata.InputShape` and designer +`PortDesignMetadata.InputShape` retain the declaration. These are destination +contracts; they do not change the canonical `FlowMessage` connection type. + +Hosts can call `descriptor.ValidateInputShape("Input", sample)` before execution. +The result is `null` when no shape was declared, a failed result for a definite +structural mismatch, or success when the sample satisfies the declared top-level +checks. No factory, selector, materializer, or workflow is executed by this check. + +Required property names are compared case-insensitively, matching the request +materializers' web JSON conventions. Presence alone is checked: nested fields, +property value types, null property values, defaults and domain rules remain the +destination's responsibility. A shape that accepts the JSON null kind accepts +`FlowValue.Null`; an absent shape is metadata uncertainty, not null message data. + +Shapes round-trip through JSON. Equivalent declarations compare accepted kinds +and required properties as sets while retaining the description as part of +registration identity. Registering a changed shape for an existing component +type is a conflict. + +Graph compilation cannot infer future values from an output's `FlowValue` type. +It therefore preserves dynamic links in both C# and JSON definitions. Sample +preflight is opt-in and does not prove that every future message will materialize. ## FlowMessage @@ -131,9 +176,10 @@ when both exact raw bytes and a decoded value are required. ## JSON and Dynamic CLR Values -Use `JsonElement` only where JSON semantics are part of the contract. Clone it -when ownership is uncertain. `JsonNode` is not the default because it is -mutable. Known domain values stay typed. +`FlowValue` owns and clones its detached JSON representation. Module internals +may use `JsonElement` where JSON semantics are part of their implementation; +`JsonNode` is not the shared value because it is mutable. Known domain values +stay typed inside direct nodes and behind module boundaries. A mapper may explicitly return a CLR record, dictionary, or `ExpandoObject`. After publication, downstream nodes treat that value as owned and immutable by @@ -148,8 +194,8 @@ evaluation, but that view is not a component, persistence, or core data type. - Immutable payloads can be shared across Dataflow broadcast branches. - A component that accepts a mutable user type must document ownership and must not mutate shared input unexpectedly. -- Persistence and transport adapters serialize the declared contract; they do - not silently normalize it into a universal value tree. +- Runtime-authored persistence and transport adapters serialize `FlowValue`; + direct typed adapters serialize their declared contract. - Component packages remain standalone. Composition describes configuration, ports, resources, and Designer hints without owning runtime resources. diff --git a/docs/32-tsql-durable-outputs.md b/docs/32-tsql-durable-outputs.md index 713453bc..bc8934c4 100644 --- a/docs/32-tsql-durable-outputs.md +++ b/docs/32-tsql-durable-outputs.md @@ -1,4 +1,4 @@ -# T-SQL Durable Outputs +# T-SQL Durable Outputs `FluxFlow.Engine.DurableOutput.TSql` is the production opt-in networked durable-output provider. It implements capture, renewable leased delivery state, dead-letter inspection, generation-protected replay, payload-free status, and bounded terminal retention behind the existing provider-neutral contracts. Installing it does not change Engine or the in-process default, and registration performs no database I/O. @@ -92,7 +92,7 @@ Provider validation rejects identifiers that cannot fit the schema before openin The explicit integration project is outside the normal solution test path so normal builds do not require Docker or a network. Its runner can create an ephemeral official SQL Server 2022 Linux container or use an externally managed test database. Container execution requires explicit license acceptance, uses unique temporary resources, prints no credential, runs with zero skipped cases, and removes the container in a `finally` block by default. -See the runner README in `tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests` for the exact command and the currently validated image digest. +See the runner README in `tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests` for the exact command and the currently validated image digest. ## Related pages diff --git a/docs/34-tsql-durable-inputs.md b/docs/34-tsql-durable-inputs.md index bfab7021..08991f0e 100644 --- a/docs/34-tsql-durable-inputs.md +++ b/docs/34-tsql-durable-inputs.md @@ -1,4 +1,4 @@ -# T-SQL Durable Inputs +# T-SQL Durable Inputs `FluxFlow.Engine.DurableInput.TSql` is the opt-in production provider for durable ingress shared by multiple application processes. It implements the @@ -156,7 +156,7 @@ renewal updates only the current token's expiry. See ## Explicit Real-Server Validation The default solution remains network- and container-free. The separate -`tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests` project inherits all +`tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests` project inherits all three provider-neutral conformance suites and adds schema, restart, multi-instance, locking, corruption, cancellation, and concurrency coverage. Its explicit runner requires affirmative image-license acceptance, creates an diff --git a/docs/38-release-validation.md b/docs/38-release-validation.md index cca754a3..b6b4288b 100644 --- a/docs/38-release-validation.md +++ b/docs/38-release-validation.md @@ -1,4 +1,4 @@ -# Release Validation +# Release Validation FluxFlow keeps ordinary continuous integration server-free. The normal workflow restores, builds, and tests `FluxFlow.sln`; local SQL-file providers need no @@ -22,13 +22,13 @@ machine and compare like-for-like reports. See Run the durable-input suite from the repository root: ```powershell -powershell -NoProfile -ExecutionPolicy Bypass -File ./tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/run-integration.ps1 -AcceptLicense +powershell -NoProfile -ExecutionPolicy Bypass -File ./tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/run-integration.ps1 -AcceptLicense ``` Run the durable-output suite separately: ```powershell -powershell -NoProfile -ExecutionPolicy Bypass -File ./tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/run-integration.ps1 -AcceptLicense +powershell -NoProfile -ExecutionPolicy Bypass -File ./tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/run-integration.ps1 -AcceptLicense ``` The explicit `-AcceptLicense` switch confirms acceptance of the container image diff --git a/docs/39-typed-code-first-authoring.md b/docs/39-typed-code-first-authoring.md index 3b01a7ef..5f9d3f6b 100644 --- a/docs/39-typed-code-first-authoring.md +++ b/docs/39-typed-code-first-authoring.md @@ -60,8 +60,8 @@ internal sealed class OrderSourceHandle(ComponentHandle component) public OutputPortHandle Output { get; } = component.Output(OrderComponentPorts.Output); - public OutputPortHandle Events { get; } = - component.Output(OrderComponentPorts.Events); + public OutputPortHandle Events { get; } = + component.Output(OrderComponentPorts.Events); } ``` diff --git a/docs/40-flow-value-runtime-migration-execution.md b/docs/40-flow-value-runtime-migration-execution.md new file mode 100644 index 00000000..3f1c454c --- /dev/null +++ b/docs/40-flow-value-runtime-migration-execution.md @@ -0,0 +1,159 @@ +# FlowValue Runtime Migration Execution Prompt + +## Role + +Act as the senior engineer responsible for completing FluxFlow's canonical +runtime-value migration. Execute the work in the ordered slices below. Do not +stop at compatibility adapters or partial registration changes. + +## Objective + +Make every dynamically authored workflow data port physically carry the +canonical `FlowValue` payload. Each visible component must materialize its own +private domain input and canonicalize its own output. The final framework and +engine transport must use the non-generic `FlowMessage` envelope. Generic +messages may return later only as optional code-first authoring helpers outside +the runtime contract. + +## Non-negotiable invariants + +1. Never introduce a global materializer, mapping registry, service locator, or + God object. +2. Never insert an implicit Dataflow block between two components. The runtime + graph, designer graph, logs, events, and user mental model must describe the + same visible components. +3. A component owns `IFlowValueMaterializer` for the internal + type it needs. The materializer remains in that component's module. +4. Materialization failure is normal workflow data: return a module-owned + `FlowError`, emit a rejection event from the visible component, do not invoke + the underlying operation, and do not fault the pipeline. +5. Successful outputs are converted to `FlowValue` inside the visible + component. Preserve message, correlation, trace, causation, headers, and + timestamp semantics through `With`/canonical message operations. +6. Intentional JSON null is `FlowValue.Null`; successful runtime messages do + not carry a null `FlowValue` reference. +7. Signals and diagnostic events keep their dedicated contracts. Only workflow + data ports use `FlowValue`. +8. Designer input-shape metadata comes from the component-owned materializer. + Registration must not execute materialization. +9. Preserve bounded capacity, ordering, concurrency, cancellation, completion, + fan-out, disposal, and transport/resource ownership behavior. +10. Do not weaken domain validation or convert expected operational failures + into thrown exceptions. + +## Per-component execution algorithm + +For every dynamically registered component with a typed data port: + +1. Identify every physical input and output block and its registration. +2. Change physical data ports to `FlowMessage` during the component + migration stage. +3. Inject or construct the module-owned materializer inside the node. Optional + constructor injection is allowed for deterministic testing. +4. At input processing start, propagate an incoming error unchanged. +5. Materialize the successful `FlowValue` into the private domain request. +6. On rejection, emit `..rejected`, include the module-owned + error code, return `WithError`, and continue accepting messages. +7. Execute all existing domain and transport behavior using the materialized + request. +8. Convert successful domain output with `FlowValue.From(...)` before emission. +9. Change registration to the exact direct `HasFlowValueInput` or + `HasFlowValueOutput` overload. Pass only `materializer.InputShape` for input + design metadata. +10. Update runtime tests, composition tests, examples, and public API baseline. + +## Ordered implementation slices + +### Slice 1: FileSystem and Storage + +Migrate file read, file write, directory enumeration, file watch, storage put, +storage get, storage query, and storage delete nodes. Keep exact `FlowContent` +bytes and metadata intact. Verify missing/not-found outcomes, receipts, queries, +source fan-out, and file-change events remain canonical values. + +### Slice 2: Sessions + +Migrate session recorder, query, and replay paths. Preserve session identity, +ordering, stored exact content, replay behavior, and normal failure results. + +### Slice 3: State, Metrics, Projections, and Expectations + +Migrate each module independently while keeping its materializer local. Preserve +state revision/concurrency behavior, metric aggregation windows, projection +folding, expectation timeout/completion behavior, and deterministic clocks. + +### Slice 4: Remaining typed dynamic components + +Use compilation and registration searches to find any typed runtime-authored +data port not covered above. Treat HTTP server request/reply ingress as a +separate correlated boundary: migrate it deliberately without collapsing its +request/reply coordination or signal semantics. + +### Slice 5: Remove hidden adapter infrastructure + +After every component has physical value ports: + +1. Delete `FlowValuePortAdapter`. +2. Delete adapter-producing generic `HasFlowValueInput` and + `HasFlowValueOutput` overloads. +3. Keep only exact direct value-port registration plus explicit typed code-first + APIs whose names do not imply dynamic runtime compatibility. +4. Use compiler failures and repository searches to identify missed callers. +5. Assert the public DSL method surface explicitly in composition and designer + tests. + +### Slice 6: Non-generic runtime envelope + +Replace `FlowMessage` with non-generic `FlowMessage` across Nodes, +Composition, Engine, designer/runtime bindings, component ports, application +ports, persistence/restore paths, mapper/expression contexts, and tests. + +The non-generic envelope must expose: + +- flat script-facing `IsError`, `Value`, and `Error` projections; +- private construction that enforces success/error invariants; +- `TryGetValue`, `TryGetError`, and `Match` for safe C# consumption; +- non-throwing script inspection of the inactive projection; +- `FlowValue.Null` for successful JSON null; +- lineage-preserving `With`, `WithError`, restore, and serialization behavior. + +Delete framework usage of `FlowMessage` after migration. If generic +authoring convenience is still desired, design it later as a boundary helper +that converts before entering the runtime and never changes runtime port types. + +## Required tests per migrated node + +1. A representative valid duck-typed object is materialized and processed. +2. A malformed scalar or object returns the module-owned error code. +3. Rejection emits an event from the visible node with correlation and error + code. +4. The rejected message does not invoke the underlying transport/store/action. +5. A valid message after rejection succeeds and the node remains unfaulted. +6. Successful output is script-readable canonical JSON. +7. Correlation, trace, causation, message identity, and headers remain correct. +8. Existing concurrency, fan-out, cancellation, completion, and disposal tests + continue to pass. +9. Dynamic composition sends and receives the physical canonical value type. +10. Input-shape metadata remains discoverable to designers and validators. + +## Validation gates + +For each slice: + +1. Run the affected runtime unit projects. +2. Run the affected composition projects. +3. Run shared Composition and Designer tests when registration APIs change. +4. Review and accept the public API baseline only for deliberate changes. +5. Run the complete release test project. + +Before deleting adapters and generic messages, search the source tree and require +zero dynamic component registrations that depend on typed value adapters. + +Final completion requires: + +- no hidden value adapter block; +- no dynamic component physical data port with a domain payload type; +- no framework or engine dependency on `FlowMessage`; +- all focused and release tests passing with zero warnings; +- documentation and examples showing the same physical contracts as runtime; +- a compact requirement-to-test evidence table in the implementation report. diff --git a/docs/44-reporting-foundation-design.md b/docs/44-reporting-foundation-design.md new file mode 100644 index 00000000..f0084471 --- /dev/null +++ b/docs/44-reporting-foundation-design.md @@ -0,0 +1,53 @@ +# Application events: scope and design + +FluxFlow provides runtime facts. Consumers decide what those facts mean for dashboards, metrics, historical reports and business workflows. + +## Public boundary + +FluxFlowApplication.Events is an application-lifetime ISourceBlock, configured through FluxFlowApplicationOptions.Events (ApplicationEventOptions). It is available before activation and remains the same source across revisions and port-generation replacements. + +There is one canonical representation: FlowEvent describes event data and ToMessage() produces a FlowMessage carrying FlowValue. Different event types may have different structured payloads. New types require neither inheritance nor report registration. Producer-owned typed payloads can be converted to FlowValue; the aggregator does not interpret their schema. + +Message ID, trace/correlation/causation IDs, timestamp, payload and producer headers are preserved. The application adds its configured identity and the producing revision where known. Component and port producers supply source/workflow/component headers. Runtime-wide events may not have a component or revision; missing context is not guessed. + +## Implementation + +```text +Component event sources -> ComponentInstance.Activity --+ + | +Runtime diagnostics/system events --------------------+--> application Events + | BroadcastBlock +Revision lifecycle events (including pre-activation) --+ | + native LinkTo + / | \ + dashboard metrics archive + consumer-owned +``` + +The Engine feature has only three files: + +- ApplicationEventOptions: application label and capacity. +- ApplicationEventStream: canonical envelope enrichment and bounded live broadcast. +- ApplicationEventAttachment: native links and forwarding-block lifetime for one revision. + +ComponentInstance.Activity uses a native broadcast, not a callback registry. Revision attachments use bounded ActionBlocks. Existing port event routes retain their operational responsibilities. Revision lifecycle phase remains in the existing revision event data; there is no competing reporting-phase model. + +## Delivery and ownership + +This is an observational feed, not a durable log. Bounded Post ingress can reject observations; BroadcastBlock keeps the latest value and slow targets can miss intermediate values. Producer event sources can also be lossy. Native links do not establish global causal ordering between concurrent producers. + +The application completes its source when stopped or disposed. Consumers choose link predicates, target capacity, cancellation and completion propagation. Disposing a link detaches it; target cleanup remains consumer-owned. Avoid blocking predicates or custom targets whose OfferMessage blocks. + +History, replay cursors, report definitions/catalogs, saved filters, aggregation and coordinated report snapshots are not library responsibilities. Existing State, Current and Ports.Status remain available; reading them is not a transactional event/history snapshot. Existing operational instrumentation remains unchanged. + +## Preview migration + +The unshipped reporting API is replaced, not retained as a compatibility facade: + +- Reporting.Events -> application.Events, now carrying FlowMessage directly. +- Reporting options -> Events options; replay capacity no longer exists. +- ObserveEvents callbacks -> ComponentInstance.Activity.LinkTo. +- Report wrappers, catalog, definitions, replay journal and GetReportingSnapshotAsync are removed from Engine. +- The non-packaged reporting sample owns its report/filter/archive contracts and tests. + +The consumer example retains historical queries, DI report selection, portable filters and frozen archive cutoffs. Its capture sequence describes received observations only, so it explicitly reports unknown upstream completeness. diff --git a/docs/45-reporting-consumer-guide.md b/docs/45-reporting-consumer-guide.md new file mode 100644 index 00000000..cecd91fc --- /dev/null +++ b/docs/45-reporting-consumer-guide.md @@ -0,0 +1,84 @@ +# Consuming application events + +Upgrading from the previous event contracts? See the +[canonical event migration](48-canonical-event-migration.md) before updating packages. + +## Link once for the application's lifetime + +Application event broadcast and `ApplicationPorts.ObserveAsync` have different +delivery contracts. A passive port observer retires with an overflow fault when +its own bounded buffer fills; workflow output delivery continues independently. +Observe its `Completion` task to detect failure even while a consumer handler is +blocked. `ReadAllAsync` also propagates the fault when enumeration resumes. +Explicit disposal and normal completion drain queued messages successfully. +This does not make the application event broadcast a durable or lossless stream. + +```csharp +using System.Threading.Tasks.Dataflow; +using FluxFlow.Engine; +using FluxFlow.Nodes; + +var sink = new ActionBlock( + message => Console.WriteLine(message.Headers.GetValueOrDefault(FlowEventHeaders.Type)), + new ExecutionDataflowBlockOptions { BoundedCapacity = 256 }); + +using var link = application.Events.LinkTo( + sink, + new DataflowLinkOptions { PropagateCompletion = true }, + message => message.Headers.GetValueOrDefault(FlowEventHeaders.Kind) == "audit"); + +await application.StartAsync(cancellationToken); +// The same link observes subsequent revisions. +await application.StopAsync(cancellationToken); +await sink.Completion.WaitAsync(cancellationToken); +``` + +Resolve FluxFlowApplication normally. Accessing Events does not activate components. The source completes at application shutdown, including when no revision was activated. For early detachment, dispose the link, complete your target, then await its Completion. With PropagateCompletion=false, you must complete the target yourself. A link does not transfer ownership of your target to the library. + +Configure through AddFluxFlow: + +```csharp +options.Events = new() +{ + Application = "order-processing", + Capacity = 256 +}; +``` + +Capacity must be between 1 and 65536. Consumer target bounds are independent. Keep predicates fast and side-effect-free; monitor target Completion for processing failures. + +## Canonical, extensible events + +```csharp +var message = new FlowEvent +{ + Name = "orders.accepted", + Kind = FlowEventKind.Domain, + Details = FluxFlow.Data.FlowValue.From(new + { + orderId = "order-42", + quantity = 12, + region = "north" + }) +}.ToMessage(); +``` + +Publish through the component's existing event output. No ApplicationEvent subclass, report interface or global schema catalog is required. ToFlowEvent reads canonical event data; Details carries the producer's structured schema. Custom headers, identity and correlation survive aggregation. + +Use FlowEventHeaders.Type/Kind/Level for common filtering. Source, Workflow, Component, Application and Revision provide context when known. Revision is the producing workflow revision, not a payload schema version. Consumers may establish their own event-name or schema-version convention without the aggregator interpreting it. + +## Dashboards, metrics and reports + +Native LinkTo predicates can select event types, categories, source addresses or payload values. A dynamic dashboard can compile its saved filter into a predicate in the consumer application. The library provides neither a filter language nor UI metadata catalog. + +The consumer owns metric instruments, business calculations, report definitions, storage and historical queries. Existing runtime operational instrumentation is separate from consumer-specific metrics. + +See the [historical reporting sample](../samples/FluxFlow.ReportingSample/README.md) for DI-selected reports, portable filters and a file archive. Those contracts live entirely in the sample, not in Engine. + +## Reliability limits + +BroadcastBlock is latest-value delivery. Slow targets can miss intermediate events, and bounded ingress can reject events without stopping the workflow. Linking an archive does not make the entire path durable; neither contiguous consumer sequence numbers nor zero locally observed errors prove complete runtime history. + +For exact accounting or audit requirements, use a producer/persistence path with the required acknowledgements and durability. This feed alone cannot supply those guarantees. There is no replay or transactional reporting snapshot API. + +Source completion does not mean every consumer has finished processing. Await your target separately. Events from concurrent components have no promised global causal order. Do not retain unbounded collections in long-lived consumers. diff --git a/docs/46-code-first-major-migration.md b/docs/46-code-first-major-migration.md index 9bd9b43f..b973dc3a 100644 --- a/docs/46-code-first-major-migration.md +++ b/docs/46-code-first-major-migration.md @@ -72,7 +72,9 @@ contract. The runtime binding vocabulary describes existing node members: - `HasEvents`, not `AddEvents` or an implicit global event port. Events are explicit named output ports. A component handle should expose them as -`OutputPortHandle` when the component supports events. +`OutputPortHandle` when the component supports events. `FlowEvent` is +only an optional C# construction and projection helper; runtime transport is the +same non-generic `FlowMessage` contract used by dynamic workflows. `ComponentAuthoringContract` has been replaced by `ComponentContract`. Consumers should select the package's exported complete contract rather than diff --git a/docs/48-canonical-event-migration.md b/docs/48-canonical-event-migration.md new file mode 100644 index 00000000..fecba0c1 --- /dev/null +++ b/docs/48-canonical-event-migration.md @@ -0,0 +1,93 @@ +# Canonical event migration + +## Decision and scope + +Runtime event streams use one transport contract: `ISourceBlock`. +The envelope owns message identity, timing, tracing, correlation and headers. +An event payload describes what happened. `FlowEvent` is a convenient creation +and access model, not a second transport contract or a base class for every event. +Custom event details belong to their producer; adding an event does not require +an application-wide registry, an event subclass or a reporting service. + +This is an intentional breaking release. No parallel legacy event stream, +callback subscription registry or forwarding compatibility package is added. + +| Package | Published comparison | New candidate | +| --- | --- | --- | +| FluxFlow.Nodes | 4.0.0 | 5.0.0-rc.1 | +| FluxFlow.Composition | 7.0.0-rc.1 | 8.0.0-rc.1 | +| FluxFlow.Engine | 8.0.0-rc.1 | 9.0.0-rc.1 | + +The [coordinated package train](49-canonical-package-release-train.md) records +dependent candidates, published comparisons and dependency waves. Do not mix +previously compiled components with these new contracts without validating them. + +## API replacements + +| Previous contract | Replacement | +| --- | --- | +| FlowNode.Events and FlowSource.Events carrying FlowEvent | The same port names carrying FlowMessage | +| Event bindings accepting ISourceBlock | Event bindings accepting ISourceBlock | +| ComponentEventSource, ComponentInstance and ComponentPorts event signatures | Canonical FlowMessage sources; recompile factories and registrations | +| Typed authoring handles' Events properties | Recompile against the canonical event port handle types | +| ApplicationRuntime.Events | ApplicationRuntime.Activity | +| ApplicationPorts.SystemEvents and Diagnostics with typed Signals payloads | The same port names carrying canonical FlowMessage events | +| ApplicationDiagnostic / ApplicationSystemEvent and their supporting Signals types | Event type/kind/level metadata and structured event details | +| ComponentEvent wrapper | Canonical message event data and source context | + +For application-lifetime aggregation, link to `FluxFlowApplication.Events`. +Use `ApplicationRuntime.Activity` only when deliberately observing that runtime's +lifetime. The application feed remains linked across workflow revisions. + +## Consumer steps + +1. Update the complete affected package dependency set and rebuild custom nodes, + registrations and consumers. Old compiled binaries are not supported merely + because their type or member names still look the same. +2. Replace `ActionBlock` observation targets with + `ActionBlock`. Use `TryGetFlowEvent` or `ToFlowEvent` when the + payload fields are needed; keep the original message for identity and context. +3. Read event type/kind/level from `FlowEventHeaders` and event-specific data from + the producer's documented payload. Do not equate an old enum's numeric value + with the replacement event name. Review filters for the actual emitted names. +4. Preserve the distinction between a diagnostic event describing a failure and + a workflow error message. Event severity does not mean the envelope is an error. +5. Keep dashboard filters, metric calculations, report definitions and archives + in the consumer. Use ordinary Dataflow links and predicates. + +For example, given an existing application: + +```csharp +var target = new ActionBlock(message => +{ + if (!message.TryGetFlowEvent(out var observed) || observed is null) + return; + + Console.WriteLine($"{observed.Name}: {message.CorrelationId}"); +}, new ExecutionDataflowBlockOptions { BoundedCapacity = 256 }); + +using var link = application.Events.LinkTo(target, + new DataflowLinkOptions { PropagateCompletion = true }, + message => message.Headers.GetValueOrDefault(FlowEventHeaders.Kind) == "diagnostic"); +``` + +Use the `FluxFlow.Nodes` and `System.Threading.Tasks.Dataflow` namespaces. +After application shutdown, await the target's completion. For early detachment, +dispose the link, complete the target and await it separately. + +The feed is best-effort, not a durable audit log. Bounded ingress may reject an +event, and a slow target can miss intermediate observations. Revision metadata +identifies the producing workflow revision, not a payload schema version. +See the [consumer guide](45-reporting-consumer-guide.md) for delivery and ownership. + +## Compatibility review + +Package-local comparison exceptions enumerate the retired or changed public +signatures for this major migration only. The comparison still uses the real +published baseline and checks both supported target frameworks. Do not treat an +exception as an implementation adapter or as proof that old consumers still run. + +Before publication, validate a fresh package-only consumer using the complete +new dependency set, then migrate the client application and test its workflows, +event filters, revision changes, reporting ingestion and shutdown. Source builds +alone do not establish compatibility with previously published dependent binaries. diff --git a/docs/49-canonical-package-release-train.md b/docs/49-canonical-package-release-train.md new file mode 100644 index 00000000..3abe75cc --- /dev/null +++ b/docs/49-canonical-package-release-train.md @@ -0,0 +1,334 @@ +# Canonical package release train + +## Scope and decisions + +This train contains 59 new package artifacts: 58 packages in the reverse dependency +closure of Nodes, Composition and Engine, plus the new expression adapter. +Mapping 1.0.3 and Resilience 1.0.0 are reused from the public feed, not republished. +All affected packages use a new major prerelease identity. Packages whose own APIs +are unchanged still require the breaking dependency contract; this does not claim +that every dependent package removed public members. + +The core candidates are Nodes 5.0.0-rc.1, Composition 8.0.0-rc.1 +and Engine 9.0.0-rc.2. Consumer rehearsal required the Engine correction described +below; its nine-package dependent closure also advances to rc.2. The expression +adapter remains a genuine first release at +1.0.0 and depends only on the reusable Mapping package. HealthChecks is not a first +release: its comparison baseline is the published 1.0.0-rc.1. + +The project files and eng/packages.json remain authoritative. No package versions +are inferred from family names at execution time. Do not mix old dependent binaries +with the new core solely because a package restore can resolve their ranges. + +## Reusable prerequisites + +The 11 Mapping source files and six Resilience source files were compared with +mapping-v1.0.3 and resilience-v1.0.0 respectively, ignoring line-ending differences. +They are unchanged and neither package depends on the changed core. Their exact +versions were found on the public feed. Final package-only validation must use the +published prerequisite archives, not replacement archives packed under those ids. + +## Package inventory + +Public baselines were checked on 2026-09-05. This is an intended release set, not +an assertion that any candidate has been published. A missing candidate is checked +again immediately before its publication. + +| Package | Published comparison | Candidate / reused version | Wave | +| --- | --- | --- | --- | +| FluxFlow.Nodes | 4.0.0 | 5.0.0-rc.1 | 1 | +| FluxFlow.Coordination | 2.0.0 | 3.0.0-rc.1 | 2 | +| FluxFlow.Resilience | 1.0.0 | 1.0.0 | Reuse | +| FluxFlow.Components.Resilience | 2.0.0 | 3.0.0-rc.1 | 3 | +| FluxFlow.Components.Resilience.Composition | 5.0.0-rc.1 | 6.0.0-rc.1 | 4 | +| FluxFlow.Composition | 7.0.0-rc.1 | 8.0.0-rc.1 | 2 | +| FluxFlow.Mapping | 1.0.3 | 1.0.3 | Reuse | +| FluxFlow.Expressions.Jsonata | None (first release) | 1.0.0 | 1 | +| FluxFlow.Components.RequestReply | 2.0.0 | 3.0.0-rc.1 | 3 | +| FluxFlow.Components.Http.AspNetCore | 2.0.0 | 3.0.0-rc.1 | 4 | +| FluxFlow.Engine | 8.0.0-rc.1 | 9.0.0-rc.2 | 3 | +| FluxFlow.Components.Mqtt | 7.1.0 | 8.0.0-rc.1 | 3 | +| FluxFlow.Components.Mqtt.Composition | 7.1.0-rc.1 | 8.0.0-rc.1 | 4 | +| FluxFlow.Components.Mqtt.MqttNet | 3.1.0 | 4.0.0-rc.1 | 4 | +| FluxFlow.Components.Mqtt.PulseMqtt | 4.1.0 | 5.0.0-rc.1 | 4 | +| FluxFlow.Components.Mapping | 6.0.0 | 7.0.0-rc.1 | 2 | +| FluxFlow.Components.Mapping.Composition | 7.0.0-rc.1 | 8.0.0-rc.1 | 4 | +| FluxFlow.Components.Assertions | 6.0.0 | 7.0.0-rc.1 | 2 | +| FluxFlow.Components.Assertions.Composition | 7.0.0-rc.1 | 8.0.0-rc.1 | 4 | +| FluxFlow.Components.Sources | 6.0.0 | 7.0.0-rc.1 | 2 | +| FluxFlow.Components.Sources.Composition | 7.0.0-rc.1 | 8.0.0-rc.1 | 4 | +| FluxFlow.Components.Routing | 6.0.1 | 7.0.0-rc.1 | 2 | +| FluxFlow.Components.Routing.Composition | 7.0.0-rc.1 | 8.0.0-rc.1 | 4 | +| FluxFlow.Components.Validation | 6.0.0 | 7.0.0-rc.1 | 2 | +| FluxFlow.Components.Validation.Composition | 7.0.0-rc.1 | 8.0.0-rc.1 | 4 | +| FluxFlow.Components.FileSystem | 6.0.1 | 7.0.0-rc.1 | 2 | +| FluxFlow.Components.FileSystem.Composition | 7.0.0-rc.1 | 8.0.0-rc.1 | 4 | +| FluxFlow.Components.Observability | 7.0.0 | 8.0.0-rc.1 | 2 | +| FluxFlow.Components.Observability.Composition | 7.0.0-rc.1 | 8.0.0-rc.1 | 4 | +| FluxFlow.Components.Timers | 6.0.0 | 7.0.0-rc.1 | 2 | +| FluxFlow.Components.Timers.Composition | 7.0.0-rc.1 | 8.0.0-rc.1 | 4 | +| FluxFlow.Components.Payloads | 6.0.0 | 7.0.0-rc.1 | 2 | +| FluxFlow.Components.Payloads.Composition | 6.0.0-rc.1 | 7.0.0-rc.1 | 4 | +| FluxFlow.Components.Http | 6.0.0 | 7.0.0-rc.1 | 2 | +| FluxFlow.Components.Http.Composition | 7.0.0-rc.1 | 8.0.0-rc.1 | 4 | +| FluxFlow.Components.Serialization | 6.0.0 | 7.0.0-rc.1 | 2 | +| FluxFlow.Components.Serialization.Composition | 6.0.0-rc.1 | 7.0.0-rc.1 | 4 | +| FluxFlow.Components.Metrics | 6.0.0 | 7.0.0-rc.1 | 2 | +| FluxFlow.Components.Metrics.Composition | 6.0.0-rc.1 | 7.0.0-rc.1 | 4 | +| FluxFlow.Components.Projections | 7.0.0 | 8.0.0-rc.1 | 2 | +| FluxFlow.Components.Projections.Composition | 6.0.0-rc.1 | 7.0.0-rc.1 | 4 | +| FluxFlow.Components.Expectations | 6.0.0 | 7.0.0-rc.1 | 3 | +| FluxFlow.Components.Expectations.Composition | 7.0.0-rc.1 | 8.0.0-rc.1 | 4 | +| FluxFlow.Components.Designer | 6.0.0-rc.1 | 7.0.0-rc.1 | 3 | +| FluxFlow.Components.Sessions | 6.0.1 | 7.0.0-rc.1 | 2 | +| FluxFlow.Components.Sessions.Composition | 7.0.0-rc.1 | 8.0.0-rc.1 | 4 | +| FluxFlow.Components.State | 6.0.0 | 7.0.0-rc.1 | 2 | +| FluxFlow.Components.State.Composition | 7.0.0-rc.1 | 8.0.0-rc.1 | 4 | +| FluxFlow.Components.Storage | 7.0.0 | 8.0.0-rc.1 | 2 | +| FluxFlow.Components.Storage.Composition | 7.0.0-rc.1 | 8.0.0-rc.1 | 4 | +| FluxFlow.Components.Storage.FileSystem | 5.0.0 | 6.0.0-rc.1 | 3 | +| FluxFlow.Components.Storage.SqlFile | 5.0.0 | 6.0.0-rc.1 | 3 | +| FluxFlow.Fluent | 5.0.0-rc.1 | 6.0.0-rc.2 | 4 | +| FluxFlow.Fluent.Hosting | 5.0.0-rc.1 | 6.0.0-rc.2 | 5 | +| FluxFlow.Engine.DurableInput | 2.0.0-rc.1 | 3.0.0-rc.2 | 4 | +| FluxFlow.Engine.DurableInput.SqlFile | 2.0.0-rc.1 | 3.0.0-rc.2 | 5 | +| FluxFlow.Engine.DurableInput.TSql | 2.0.0-rc.1 | 3.0.0-rc.2 | 5 | +| FluxFlow.Engine.DurableOutput | 4.0.0-rc.1 | 5.0.0-rc.2 | 4 | +| FluxFlow.Engine.DurableOutput.SqlFile | 4.0.0-rc.1 | 5.0.0-rc.2 | 5 | +| FluxFlow.Engine.DurableOutput.TSql | 3.0.0-rc.1 | 4.0.0-rc.2 | 5 | +| FluxFlow.Engine.HealthChecks | 1.0.0-rc.1 | 2.0.0-rc.2 | 4 | + +## Dependency order + +Generate the five waves from the actual project references: + +```powershell +./eng/package-release-plan.ps1 -AlreadyAvailable mapping,resilience +``` + +### Wave 1 + +- expressions-jsonata +- nodes + +### Wave 2 + +- components-assertions +- components-filesystem +- components-http +- components-mapping +- components-metrics +- components-observability +- components-payloads +- components-projections +- components-routing +- components-serialization +- components-sessions +- components-sources +- components-state +- components-storage +- components-timers +- components-validation +- composition +- coordination + +### Wave 3 + +- components-designer +- components-expectations +- components-mqtt +- components-requestreply +- components-resilience +- components-storage-filesystem +- components-storage-sqlfile +- engine + +### Wave 4 + +- components-assertions-composition +- components-expectations-composition +- components-filesystem-composition +- components-http-aspnetcore +- components-http-composition +- components-mapping-composition +- components-metrics-composition +- components-mqtt-composition +- components-mqtt-mqttnet +- components-mqtt-pulsemqtt +- components-observability-composition +- components-payloads-composition +- components-projections-composition +- components-resilience-composition +- components-routing-composition +- components-serialization-composition +- components-sessions-composition +- components-sources-composition +- components-state-composition +- components-storage-composition +- components-timers-composition +- components-validation-composition +- engine-durable-input +- engine-durable-output +- engine-healthchecks +- fluent + +### Wave 5 + +- engine-durable-input-sqlfile +- engine-durable-input-tsql +- engine-durable-output-sqlfile +- engine-durable-output-tsql +- fluent-hosting + +Wait for each prerequisite's exact version to be publicly indexed and restorable +before publishing a dependent wave. Recheck collisions; never skip duplicates or +reuse a previously published identity for newly built bytes. Each package still +passes its own publish workflow, archive inspection and post-publication checks. + +## Contract changes and consumer migration + +The existing canonical-value migration and event-stream changes are accepted +breaking changes, not a reason to maintain parallel transports. Consult +[the event migration](48-canonical-event-migration.md) and each package's source +and README for component-owned input/output value shapes. Component factories, +materializers, event bindings and typed authoring helpers must be recompiled. + +Binary checks compare against the latest published package listed above. Only +reviewed API targets may appear in package-local CompatibilitySuppressions.xml; +no global suppression or fake first-release baseline is allowed. An accepted +comparison does not promise compatibility for old compiled consumers. + +The review found 264 distinct API targets across 45 packages, represented by 528 +exact baseline-only exceptions for the two target frameworks. These cover event +and data port signatures, canonical node contracts, materializer-aware +constructors, and typed authoring handles. The other 13 affected packages have +no direct API differences against their published baselines, but still require +the coordinated dependency upgrade. The first-release expression adapter has +no published baseline; neither reused prerequisite needs an exception. + +## Validation and remaining boundaries + +The local rehearsal completed on 2026-09-05: + +| Check | Result | +| --- | --- | +| Release metadata preflight | 61 packages passed | +| Public version availability | 59 candidates missing; both reusable versions present | +| Full Release build | 146 projects; zero errors; eight existing nullable warnings | +| Unit suite | 2,904 passed across 69 test runs; zero failures or skips | +| Release-governance rerun after API review | 202 passed | +| Deterministic acceptance suite | One passed | +| Broker-to-HTTP container integration | One net10.0 test passed; zero failures or skips; real disposable broker and loopback HTTP socket | +| Durable-input database integration | 90 net10.0 tests passed; zero failures or skips; 5 m 6 s | +| Durable-output database integration | 117 net10.0 tests passed; zero failures or skips; 6 m 41 s | +| Final binary/package validation | All 59 candidates passed with exception generation disabled | +| Candidate archive inspection | 59 package and symbol pairs passed | +| Packed internal dependencies | All 61 packages and 244 framework-specific dependency edges matched project references and candidate minimum versions | +| Isolated complete-set restore | 61 exact versions; all restored archive hashes matched the verification feed | +| Complete-set assembly/type loading | All 61 packages loaded on both net8.0 and net10.0 | +| Package-only execution acceptance | Ten-package net8.0 consumer passed workflow, code-first, resource, health, Fluent, durability and separate-process restart recovery checks | + +The complete-set consumer uses exact package references, an isolated cache, no +project references, and a source mapping that restricts all FluxFlow packages to +the verification feed. That feed contains the 59 validated candidate archives and +the two actual published prerequisite archives. Assembly/type loading validates +the dependency closure, not every component's behavior or external integration. + +The rehearsal artifacts are under artifacts/package-train-validated-20260905; +the complete-set consumer and dependency audit are under +artifacts/package-train-consumer-20260905. These are local verification artifacts, +not a replacement for packages built by the publish workflow from a reviewed +release commit. + +Publishing, commit/tag review, remote credential verification and the actual +client application upgrade remain separate operations. +Local acceptance is not a substitute for those release gates or for validating +the client's actual workflows. Nothing was published, tagged, committed or pushed +by this rehearsal. + +Follow-up integration check: the broker-to-HTTP container suite passed using +`./eng/test.ps1 -Suite Integration -Configuration Release -NoBuild`. After explicit +user authorization of the container-image license, both database-provider +runners passed sequentially with `-AcceptLicense -BlameHangTimeoutSeconds 120`. +Both used image digest +`sha256:ba4c8329f48fb8f02e1416be6a930ebfd71268caee78aa985f3af4315e457c89`. +The runners removed their disposable containers and temporary result directories; +cleanup was verified afterward. These are real-provider checks against project +references, supplementing rather than replacing the package-only checks above. +No runtime or test-code changes were needed for the provider verification. + +## Consumer migration handoff + +The user selected FluxMQ-NG at C:/Projects/FluxmqNg, not the older FluxMQ project, +as the pre-publication consumer. Its existing task received the local feed path, +exact dependency versions, current migration guides and behavioral acceptance +checklist. The recipient has started the rehearsal; consumer acceptance is not +yet claimed. + +The feed's package-index.json records all 61 package identities, archive names +and SHA-256 hashes. Keep those archives unchanged while the consumer restores +them into an isolated cache. All FluxFlow dependencies must resolve from that +local feed, without source references or fallback to old cached binaries. +Report any library defect with a minimal reproduction before preparing changed +candidate bytes. No public publication is part of this handoff. + +The recipient was explicitly told that its earlier reporting notes described a +superseded intermediate design. The current event stream has no library-owned +report catalog, filter language, archive/replay or transactional reporting +snapshot. Consumer queries, calculations, persistence and widgets remain +consumer responsibilities; delivery limits must remain visible to users. + +## Consumer-discovered overflow correction + +The initial Engine 9.0.0-rc.1 candidate is blocked for publication: the extra +canonical-observation adapter silently retired when its own buffer filled. +The six new Engine regression cases verify overflow fault/rejection context, +continued output delivery, normal completion and idempotent disposal. Both +overflow cases failed against the original production code before the fix. + +Engine 9.0.0-rc.2 returns the existing canonical observation directly. Converted +observers fault and report ObservationOverflowed when their own target fills. +No public API or compatibility exception was added. The nine dependent packages +advance to rc.2 so every declared Engine dependency path requires the correction. + +The replacement feed is artifacts/package-train-observer-rc2-20260905. It has +61 indexed archives: ten new candidates and 51 byte-identical reused archives. +All 61 original frozen hashes remain unchanged. Do not overwrite either feed. +The replacement complete-set consumer is artifacts/observer-overflow-consumer; +bounded regression evidence and verification scripts are in +artifacts/observer-overflow. + +Verified for the replacement: 146-project nonincremental Release build (zero +errors, eight pre-existing nullable warnings), all 165 Engine tests, solution +discovery of all six new cases, ten binary/package and symbol gates without new +exceptions, 244 internal dependency edges, 61 exact isolated-cache hashes, +61-package type loading on both frameworks, and package-only net8.0 execution +plus separate-process restart recovery. The full unit run found only a missing +candidate changelog heading in the release suite; headings were added and the +202-case release rerun passed with zero failures or skips. Earlier real-provider results above describe +the original candidate, not a rerun of unchanged provider logic for rc.2. + +FluxMQ-NG received the new feed, index and exact Engine version/hash for the +unchanged strong overflow regression and broader consumer retest. Its original +candidate had passed 15 targeted real-broker cases and all 466 Core tests; Runtime +was 206 passed/one failed (overflow). UI had the identical 137-failure baseline +with 1112 passing tests, and some desktop targets lacked the required workload. +Those consumer-only limitations are not erased by a passing library build. +The replacement consumer confirmed the unchanged overflow regression passes and +the full Runtime suite is green (207/207). It verified all 61 feed hashes and +nine isolated restored graphs; its clean Web/Service/E2E build had zero warnings +or errors. The final broker/service rerun passed 18/18 with fixture cleanup +verified. Core passed 466/466. The additional UI wait-timeout failure passed an +unchanged focused repeat, then the unchanged full UI repeat returned 1112 passing +and 137 failing tests with exactly the original failure set (no new or removed +failures). No reproducible candidate UI regression remained. + +FluxMQ-NG accepted Engine 9.0.0-rc.2 for the exercised package-only consumer lane. +This is not product-wide release sign-off: the existing 137 UI failures, stale +browser journey selector and missing desktop workload remain consumer limits. +The browser controller compatibility path also does not establish mapped +workflow/reporting parity. Its detailed report is +C:/Projects/FluxmqNg/docs/development/package-migration-rehearsal-2026-09-05.md; +final results and the exact UI baseline comparison are under that project's +artifacts/package-rehearsal. Both candidate feeds remain immutable. Nothing was +published, committed, tagged or pushed. diff --git a/docs/README.md b/docs/README.md index 1ead4215..02d497b3 100644 --- a/docs/README.md +++ b/docs/README.md @@ -12,6 +12,7 @@ loading them; the runtime accepts only the canonical document shape and names. - `samples/FluxFlow.CompositionSample`: typed code-first application contracts, handles, `ConnectTo`, and direct in-memory hosting. - `samples/FluxFlow.DurabilityOperationsSample`: one local durable cycle with host-owned BCL diagnostics and explicit persisted-status snapshots. +- [Reporting sample](../samples/FluxFlow.ReportingSample/README.md): live measurements across revisions, portable filters, and consumer-owned historical reports. - `samples/FluxFlow.FluentSample`: the concise node-instance fluent facade over the canonical definition and Engine, including branching and fan-in. - `samples/FluxFlow.MqttCompositionSample`: MQTT-shaped hosted composition with an in-memory logical client controller. @@ -76,3 +77,10 @@ loading them; the runtime accepts only the canonical document shape and names. Retired documents require an external, one-time conversion. Current runtime guidance uses only the canonical application and component model. + +## Application events and consumer reporting + +- [Application event design and boundaries](44-reporting-foundation-design.md) +- [Application event consumer guide](45-reporting-consumer-guide.md) +- [Canonical event breaking migration](48-canonical-event-migration.md) +- [Canonical package release train](49-canonical-package-release-train.md) diff --git a/eng/package-consumer-acceptance/Program.cs b/eng/package-consumer-acceptance/Program.cs index 0a2ed709..3b748bd5 100644 --- a/eng/package-consumer-acceptance/Program.cs +++ b/eng/package-consumer-acceptance/Program.cs @@ -479,8 +479,8 @@ internal sealed class UppercaseComponentHandle(ComponentHandle definition) public OutputPortHandle Output { get; } = definition.Output(AcceptanceComponentPorts.Output); - public OutputPortHandle Events { get; } = - definition.Output(AcceptanceComponentPorts.Events); + public OutputPortHandle Events { get; } = + definition.Output(AcceptanceComponentPorts.Events); } internal sealed class UppercaseNode : FlowNode diff --git a/eng/packages.json b/eng/packages.json index bcc482e5..0448de67 100644 --- a/eng/packages.json +++ b/eng/packages.json @@ -1,482 +1,490 @@ [ - { - "alias": "nodes", - "tagPrefix": "nodes", - "packageId": "FluxFlow.Nodes", - "project": "src/FluxFlow.Nodes/FluxFlow.Nodes.csproj", - "notesName": "FluxFlow.Nodes", - "binaryCompatibilityBaseline": "4.0.0" - }, - { - "alias": "coordination", - "tagPrefix": "coordination", - "packageId": "FluxFlow.Coordination", - "project": "src/FluxFlow.Coordination/FluxFlow.Coordination.csproj", - "notesName": "FluxFlow.Coordination", - "binaryCompatibilityBaseline": "2.0.0" - }, - { - "alias": "resilience", - "tagPrefix": "resilience", - "packageId": "FluxFlow.Resilience", - "project": "src/FluxFlow.Resilience/FluxFlow.Resilience.csproj", - "notesName": "FluxFlow.Resilience", - "binaryCompatibilityBaseline": "1.0.0" - }, - { - "alias": "components-resilience", - "tagPrefix": "components-resilience", - "packageId": "FluxFlow.Components.Resilience", - "project": "src/FluxFlow.Components.Resilience/FluxFlow.Components.Resilience.csproj", - "notesName": "FluxFlow.Components.Resilience", - "binaryCompatibilityBaseline": "2.0.0" - }, - { - "alias": "components-resilience-composition", - "tagPrefix": "components-resilience-composition", - "packageId": "FluxFlow.Components.Resilience.Composition", - "project": "src/FluxFlow.Components.Resilience.Composition/FluxFlow.Components.Resilience.Composition.csproj", - "notesName": "FluxFlow.Components.Resilience.Composition", - "binaryCompatibilityBaseline": "4.0.0" - }, - { - "alias": "composition", - "tagPrefix": "composition", - "packageId": "FluxFlow.Composition", - "project": "src/FluxFlow.Composition/FluxFlow.Composition.csproj", - "notesName": "FluxFlow.Composition", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "mapping", - "tagPrefix": "mapping", - "packageId": "FluxFlow.Mapping", - "project": "src/FluxFlow.Mapping/FluxFlow.Mapping.csproj", - "notesName": "FluxFlow.Mapping", - "binaryCompatibilityBaseline": "1.0.3" - }, - { - "alias": "components-requestreply", - "tagPrefix": "components-requestreply", - "packageId": "FluxFlow.Components.RequestReply", - "project": "src/FluxFlow.Components.RequestReply/FluxFlow.Components.RequestReply.csproj", - "notesName": "FluxFlow.Components.RequestReply", - "binaryCompatibilityBaseline": "2.0.0" - }, - { - "alias": "components-http-aspnetcore", - "tagPrefix": "components-http-aspnetcore", - "packageId": "FluxFlow.Components.Http.AspNetCore", - "project": "src/FluxFlow.Components.Http.AspNetCore/FluxFlow.Components.Http.AspNetCore.csproj", - "notesName": "FluxFlow.Components.Http.AspNetCore", - "binaryCompatibilityBaseline": "2.0.0" - }, - { - "alias": "engine", - "tagPrefix": "engine", - "packageId": "FluxFlow.Engine", - "project": "src/FluxFlow.Engine/FluxFlow.Engine.csproj", - "notesName": "FluxFlow.Engine", - "binaryCompatibilityBaseline": "7.0.0" - }, - { - "alias": "components-mqtt", - "tagPrefix": "components-mqtt", - "packageId": "FluxFlow.Components.Mqtt", - "project": "src/Mqtt/FluxFlow.Components.Mqtt/FluxFlow.Components.Mqtt.csproj", - "notesName": "FluxFlow.Components.Mqtt", - "binaryCompatibilityBaseline": "7.0.0" - }, - { - "alias": "components-mqtt-composition", - "tagPrefix": "components-mqtt-composition", - "packageId": "FluxFlow.Components.Mqtt.Composition", - "project": "src/Mqtt/FluxFlow.Components.Mqtt.Composition/FluxFlow.Components.Mqtt.Composition.csproj", - "notesName": "FluxFlow.Components.Mqtt.Composition", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-mqtt-mqttnet", - "tagPrefix": "components-mqtt-mqttnet", - "packageId": "FluxFlow.Components.Mqtt.MqttNet", - "project": "src/Mqtt/FluxFlow.Components.Mqtt.MqttNet/FluxFlow.Components.Mqtt.MqttNet.csproj", - "notesName": "FluxFlow.Components.Mqtt.MqttNet", - "binaryCompatibilityBaseline": "3.0.0" - }, - { - "alias": "components-mqtt-pulsemqtt", - "tagPrefix": "components-mqtt-pulsemqtt", - "packageId": "FluxFlow.Components.Mqtt.PulseMqtt", - "project": "src/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/FluxFlow.Components.Mqtt.PulseMqtt.csproj", - "notesName": "FluxFlow.Components.Mqtt.PulseMqtt", - "binaryCompatibilityBaseline": "4.0.0" - }, - { - "alias": "components-mapping", - "tagPrefix": "components-mapping", - "packageId": "FluxFlow.Components.Mapping", - "project": "src/FluxFlow.Components.Mapping/FluxFlow.Components.Mapping.csproj", - "notesName": "FluxFlow.Components.Mapping", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-mapping-composition", - "tagPrefix": "components-mapping-composition", - "packageId": "FluxFlow.Components.Mapping.Composition", - "project": "src/FluxFlow.Components.Mapping.Composition/FluxFlow.Components.Mapping.Composition.csproj", - "notesName": "FluxFlow.Components.Mapping.Composition", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-assertions", - "tagPrefix": "components-assertions", - "packageId": "FluxFlow.Components.Assertions", - "project": "src/FluxFlow.Components.Assertions/FluxFlow.Components.Assertions.csproj", - "notesName": "FluxFlow.Components.Assertions", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-assertions-composition", - "tagPrefix": "components-assertions-composition", - "packageId": "FluxFlow.Components.Assertions.Composition", - "project": "src/FluxFlow.Components.Assertions.Composition/FluxFlow.Components.Assertions.Composition.csproj", - "notesName": "FluxFlow.Components.Assertions.Composition", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-sources", - "tagPrefix": "components-sources", - "packageId": "FluxFlow.Components.Sources", - "project": "src/FluxFlow.Components.Sources/FluxFlow.Components.Sources.csproj", - "notesName": "FluxFlow.Components.Sources", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-sources-composition", - "tagPrefix": "components-sources-composition", - "packageId": "FluxFlow.Components.Sources.Composition", - "project": "src/FluxFlow.Components.Sources.Composition/FluxFlow.Components.Sources.Composition.csproj", - "notesName": "FluxFlow.Components.Sources.Composition", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-routing", - "tagPrefix": "components-routing", - "packageId": "FluxFlow.Components.Routing", - "project": "src/FluxFlow.Components.Routing/FluxFlow.Components.Routing.csproj", - "notesName": "FluxFlow.Components.Routing", - "binaryCompatibilityBaseline": "6.0.1" - }, - { - "alias": "components-routing-composition", - "tagPrefix": "components-routing-composition", - "packageId": "FluxFlow.Components.Routing.Composition", - "project": "src/FluxFlow.Components.Routing.Composition/FluxFlow.Components.Routing.Composition.csproj", - "notesName": "FluxFlow.Components.Routing.Composition", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-validation", - "tagPrefix": "components-validation", - "packageId": "FluxFlow.Components.Validation", - "project": "src/FluxFlow.Components.Validation/FluxFlow.Components.Validation.csproj", - "notesName": "FluxFlow.Components.Validation", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-validation-composition", - "tagPrefix": "components-validation-composition", - "packageId": "FluxFlow.Components.Validation.Composition", - "project": "src/FluxFlow.Components.Validation.Composition/FluxFlow.Components.Validation.Composition.csproj", - "notesName": "FluxFlow.Components.Validation.Composition", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-filesystem", - "tagPrefix": "components-filesystem", - "packageId": "FluxFlow.Components.FileSystem", - "project": "src/FluxFlow.Components.FileSystem/FluxFlow.Components.FileSystem.csproj", - "notesName": "FluxFlow.Components.FileSystem", - "binaryCompatibilityBaseline": "6.0.1" - }, - { - "alias": "components-filesystem-composition", - "tagPrefix": "components-filesystem-composition", - "packageId": "FluxFlow.Components.FileSystem.Composition", - "project": "src/FluxFlow.Components.FileSystem.Composition/FluxFlow.Components.FileSystem.Composition.csproj", - "notesName": "FluxFlow.Components.FileSystem.Composition", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-observability", - "tagPrefix": "components-observability", - "packageId": "FluxFlow.Components.Observability", - "project": "src/FluxFlow.Components.Observability/FluxFlow.Components.Observability.csproj", - "notesName": "FluxFlow.Components.Observability", - "binaryCompatibilityBaseline": "7.0.0" - }, - { - "alias": "components-observability-composition", - "tagPrefix": "components-observability-composition", - "packageId": "FluxFlow.Components.Observability.Composition", - "project": "src/FluxFlow.Components.Observability.Composition/FluxFlow.Components.Observability.Composition.csproj", - "notesName": "FluxFlow.Components.Observability.Composition", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-timers", - "tagPrefix": "components-timers", - "packageId": "FluxFlow.Components.Timers", - "project": "src/FluxFlow.Components.Timers/FluxFlow.Components.Timers.csproj", - "notesName": "FluxFlow.Components.Timers", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-timers-composition", - "tagPrefix": "components-timers-composition", - "packageId": "FluxFlow.Components.Timers.Composition", - "project": "src/FluxFlow.Components.Timers.Composition/FluxFlow.Components.Timers.Composition.csproj", - "notesName": "FluxFlow.Components.Timers.Composition", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-payloads", - "tagPrefix": "components-payloads", - "packageId": "FluxFlow.Components.Payloads", - "project": "src/FluxFlow.Components.Payloads/FluxFlow.Components.Payloads.csproj", - "notesName": "FluxFlow.Components.Payloads", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-payloads-composition", - "tagPrefix": "components-payloads-composition", - "packageId": "FluxFlow.Components.Payloads.Composition", - "project": "src/FluxFlow.Components.Payloads.Composition/FluxFlow.Components.Payloads.Composition.csproj", - "notesName": "FluxFlow.Components.Payloads.Composition", - "binaryCompatibilityBaseline": "5.0.0" - }, - { - "alias": "components-http", - "tagPrefix": "components-http", - "packageId": "FluxFlow.Components.Http", - "project": "src/FluxFlow.Components.Http/FluxFlow.Components.Http.csproj", - "notesName": "FluxFlow.Components.Http", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-http-composition", - "tagPrefix": "components-http-composition", - "packageId": "FluxFlow.Components.Http.Composition", - "project": "src/FluxFlow.Components.Http.Composition/FluxFlow.Components.Http.Composition.csproj", - "notesName": "FluxFlow.Components.Http.Composition", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-serialization", - "tagPrefix": "components-serialization", - "packageId": "FluxFlow.Components.Serialization", - "project": "src/FluxFlow.Components.Serialization/FluxFlow.Components.Serialization.csproj", - "notesName": "FluxFlow.Components.Serialization", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-serialization-composition", - "tagPrefix": "components-serialization-composition", - "packageId": "FluxFlow.Components.Serialization.Composition", - "project": "src/FluxFlow.Components.Serialization.Composition/FluxFlow.Components.Serialization.Composition.csproj", - "notesName": "FluxFlow.Components.Serialization.Composition", - "binaryCompatibilityBaseline": "5.0.0" - }, - { - "alias": "components-metrics", - "tagPrefix": "components-metrics", - "packageId": "FluxFlow.Components.Metrics", - "project": "src/FluxFlow.Components.Metrics/FluxFlow.Components.Metrics.csproj", - "notesName": "FluxFlow.Components.Metrics", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-metrics-composition", - "tagPrefix": "components-metrics-composition", - "packageId": "FluxFlow.Components.Metrics.Composition", - "project": "src/FluxFlow.Components.Metrics.Composition/FluxFlow.Components.Metrics.Composition.csproj", - "notesName": "FluxFlow.Components.Metrics.Composition", - "binaryCompatibilityBaseline": "5.0.0" - }, - { - "alias": "components-projections", - "tagPrefix": "components-projections", - "packageId": "FluxFlow.Components.Projections", - "project": "src/FluxFlow.Components.Projections/FluxFlow.Components.Projections.csproj", - "notesName": "FluxFlow.Components.Projections", - "binaryCompatibilityBaseline": "7.0.0" - }, - { - "alias": "components-projections-composition", - "tagPrefix": "components-projections-composition", - "packageId": "FluxFlow.Components.Projections.Composition", - "project": "src/FluxFlow.Components.Projections.Composition/FluxFlow.Components.Projections.Composition.csproj", - "notesName": "FluxFlow.Components.Projections.Composition", - "binaryCompatibilityBaseline": "5.0.0" - }, - { - "alias": "components-expectations", - "tagPrefix": "components-expectations", - "packageId": "FluxFlow.Components.Expectations", - "project": "src/FluxFlow.Components.Expectations/FluxFlow.Components.Expectations.csproj", - "notesName": "FluxFlow.Components.Expectations", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-expectations-composition", - "tagPrefix": "components-expectations-composition", - "packageId": "FluxFlow.Components.Expectations.Composition", - "project": "src/FluxFlow.Components.Expectations.Composition/FluxFlow.Components.Expectations.Composition.csproj", - "notesName": "FluxFlow.Components.Expectations.Composition", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-designer", - "tagPrefix": "components-designer", - "packageId": "FluxFlow.Components.Designer", - "project": "src/FluxFlow.Components.Designer/FluxFlow.Components.Designer.csproj", - "notesName": "FluxFlow.Components.Designer", - "binaryCompatibilityBaseline": "5.0.0" - }, - { - "alias": "components-sessions", - "tagPrefix": "components-sessions", - "packageId": "FluxFlow.Components.Sessions", - "project": "src/FluxFlow.Components.Sessions/FluxFlow.Components.Sessions.csproj", - "notesName": "FluxFlow.Components.Sessions", - "binaryCompatibilityBaseline": "6.0.1" - }, - { - "alias": "components-sessions-composition", - "tagPrefix": "components-sessions-composition", - "packageId": "FluxFlow.Components.Sessions.Composition", - "project": "src/FluxFlow.Components.Sessions.Composition/FluxFlow.Components.Sessions.Composition.csproj", - "notesName": "FluxFlow.Components.Sessions.Composition", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-state", - "tagPrefix": "components-state", - "packageId": "FluxFlow.Components.State", - "project": "src/FluxFlow.Components.State/FluxFlow.Components.State.csproj", - "notesName": "FluxFlow.Components.State", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-state-composition", - "tagPrefix": "components-state-composition", - "packageId": "FluxFlow.Components.State.Composition", - "project": "src/FluxFlow.Components.State.Composition/FluxFlow.Components.State.Composition.csproj", - "notesName": "FluxFlow.Components.State.Composition", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-storage", - "tagPrefix": "components-storage", - "packageId": "FluxFlow.Components.Storage", - "project": "src/FluxFlow.Components.Storage/FluxFlow.Components.Storage.csproj", - "notesName": "FluxFlow.Components.Storage", - "binaryCompatibilityBaseline": "7.0.0" - }, - { - "alias": "components-storage-composition", - "tagPrefix": "components-storage-composition", - "packageId": "FluxFlow.Components.Storage.Composition", - "project": "src/FluxFlow.Components.Storage.Composition/FluxFlow.Components.Storage.Composition.csproj", - "notesName": "FluxFlow.Components.Storage.Composition", - "binaryCompatibilityBaseline": "6.0.0" - }, - { - "alias": "components-storage-filesystem", - "tagPrefix": "components-storage-filesystem", - "packageId": "FluxFlow.Components.Storage.FileSystem", - "project": "src/FluxFlow.Components.Storage.FileSystem/FluxFlow.Components.Storage.FileSystem.csproj", - "notesName": "FluxFlow.Components.Storage.FileSystem", - "binaryCompatibilityBaseline": "5.0.0" - }, - { - "alias": "components-storage-sqlfile", - "tagPrefix": "components-storage-sqlfile", - "packageId": "FluxFlow.Components.Storage.SqlFile", - "project": "src/FluxFlow.Components.Storage.SqlFile/FluxFlow.Components.Storage.SqlFile.csproj", - "notesName": "FluxFlow.Components.Storage.SqlFile", - "binaryCompatibilityBaseline": "5.0.0" - }, - { - "alias": "fluent", - "tagPrefix": "fluent", - "packageId": "FluxFlow.Fluent", - "project": "src/FluxFlow.Fluent/FluxFlow.Fluent.csproj", - "notesName": "FluxFlow.Fluent", - "binaryCompatibilityBaseline": "4.0.0" - }, - { - "alias": "fluent-hosting", - "tagPrefix": "fluent-hosting", - "packageId": "FluxFlow.Fluent.Hosting", - "project": "src/FluxFlow.Fluent.Hosting/FluxFlow.Fluent.Hosting.csproj", - "notesName": "FluxFlow.Fluent.Hosting", - "binaryCompatibilityBaseline": "4.0.0" - }, - { - "alias": "engine-durable-input", - "tagPrefix": "engine-durable-input", - "packageId": "FluxFlow.Engine.DurableInput", - "project": "src/FluxFlow.Engine.DurableInput/FluxFlow.Engine.DurableInput.csproj", - "notesName": "FluxFlow.Engine.DurableInput", - "binaryCompatibilityBaseline": "1.3.0" - }, - { - "alias": "engine-durable-input-sqlfile", - "tagPrefix": "engine-durable-input-sqlfile", - "packageId": "FluxFlow.Engine.DurableInput.SqlFile", - "project": "src/FluxFlow.Engine.DurableInput.SqlFile/FluxFlow.Engine.DurableInput.SqlFile.csproj", - "notesName": "FluxFlow.Engine.DurableInput.SqlFile", - "binaryCompatibilityBaseline": "1.3.0" - }, - { - "alias": "engine-durable-input-tsql", - "tagPrefix": "engine-durable-input-tsql", - "packageId": "FluxFlow.Engine.DurableInput.TSql", - "project": "src/FluxFlow.Engine.DurableInput.TSql/FluxFlow.Engine.DurableInput.TSql.csproj", - "notesName": "FluxFlow.Engine.DurableInput.TSql", - "binaryCompatibilityBaseline": "1.2.0" - }, - { - "alias": "engine-durable-output", - "tagPrefix": "engine-durable-output", - "packageId": "FluxFlow.Engine.DurableOutput", - "project": "src/FluxFlow.Engine.DurableOutput/FluxFlow.Engine.DurableOutput.csproj", - "notesName": "FluxFlow.Engine.DurableOutput", - "binaryCompatibilityBaseline": "3.0.0" - }, - { - "alias": "engine-durable-output-sqlfile", - "tagPrefix": "engine-durable-output-sqlfile", - "packageId": "FluxFlow.Engine.DurableOutput.SqlFile", - "project": "src/FluxFlow.Engine.DurableOutput.SqlFile/FluxFlow.Engine.DurableOutput.SqlFile.csproj", - "notesName": "FluxFlow.Engine.DurableOutput.SqlFile", - "binaryCompatibilityBaseline": "3.0.0" - }, - { - "alias": "engine-durable-output-tsql", - "tagPrefix": "engine-durable-output-tsql", - "packageId": "FluxFlow.Engine.DurableOutput.TSql", - "project": "src/FluxFlow.Engine.DurableOutput.TSql/FluxFlow.Engine.DurableOutput.TSql.csproj", - "notesName": "FluxFlow.Engine.DurableOutput.TSql", - "binaryCompatibilityBaseline": "2.0.0" - }, - { - "alias": "engine-healthchecks", - "tagPrefix": "engine-healthchecks", - "packageId": "FluxFlow.Engine.HealthChecks", - "project": "src/FluxFlow.Engine.HealthChecks/FluxFlow.Engine.HealthChecks.csproj", - "notesName": "FluxFlow.Engine.HealthChecks", - "binaryCompatibilityBaseline": null - } + { + "alias": "nodes", + "tagPrefix": "nodes", + "packageId": "FluxFlow.Nodes", + "project": "src/Core/Foundation/FluxFlow.Nodes/FluxFlow.Nodes.csproj", + "notesName": "FluxFlow.Nodes", + "binaryCompatibilityBaseline": "4.0.0" + }, + { + "alias": "coordination", + "tagPrefix": "coordination", + "packageId": "FluxFlow.Coordination", + "project": "src/Core/Execution/FluxFlow.Coordination/FluxFlow.Coordination.csproj", + "notesName": "FluxFlow.Coordination", + "binaryCompatibilityBaseline": "2.0.0" + }, + { + "alias": "resilience", + "tagPrefix": "resilience", + "packageId": "FluxFlow.Resilience", + "project": "src/Core/Execution/FluxFlow.Resilience/FluxFlow.Resilience.csproj", + "notesName": "FluxFlow.Resilience", + "binaryCompatibilityBaseline": "1.0.0" + }, + { + "alias": "components-resilience", + "tagPrefix": "components-resilience", + "packageId": "FluxFlow.Components.Resilience", + "project": "src/Components/Resilience/FluxFlow.Components.Resilience/FluxFlow.Components.Resilience.csproj", + "notesName": "FluxFlow.Components.Resilience", + "binaryCompatibilityBaseline": "2.0.0" + }, + { + "alias": "components-resilience-composition", + "tagPrefix": "components-resilience-composition", + "packageId": "FluxFlow.Components.Resilience.Composition", + "project": "src/Components/Resilience/FluxFlow.Components.Resilience.Composition/FluxFlow.Components.Resilience.Composition.csproj", + "notesName": "FluxFlow.Components.Resilience.Composition", + "binaryCompatibilityBaseline": "5.0.0-rc.1" + }, + { + "alias": "composition", + "tagPrefix": "composition", + "packageId": "FluxFlow.Composition", + "project": "src/Core/Application/FluxFlow.Composition/FluxFlow.Composition.csproj", + "notesName": "FluxFlow.Composition", + "binaryCompatibilityBaseline": "7.0.0-rc.1" + }, + { + "alias": "mapping", + "tagPrefix": "mapping", + "packageId": "FluxFlow.Mapping", + "project": "src/Core/Foundation/FluxFlow.Mapping/FluxFlow.Mapping.csproj", + "notesName": "FluxFlow.Mapping", + "binaryCompatibilityBaseline": "1.0.3" + }, + { + "alias": "expressions-jsonata", + "tagPrefix": "expressions-jsonata", + "packageId": "FluxFlow.Expressions.Jsonata", + "project": "src/Adapters/Expressions/FluxFlow.Expressions.Jsonata/FluxFlow.Expressions.Jsonata.csproj", + "notesName": "FluxFlow.Expressions.Jsonata", + "binaryCompatibilityBaseline": null + }, + { + "alias": "components-requestreply", + "tagPrefix": "components-requestreply", + "packageId": "FluxFlow.Components.RequestReply", + "project": "src/Components/RequestReply/FluxFlow.Components.RequestReply/FluxFlow.Components.RequestReply.csproj", + "notesName": "FluxFlow.Components.RequestReply", + "binaryCompatibilityBaseline": "2.0.0" + }, + { + "alias": "components-http-aspnetcore", + "tagPrefix": "components-http-aspnetcore", + "packageId": "FluxFlow.Components.Http.AspNetCore", + "project": "src/Components/Http/FluxFlow.Components.Http.AspNetCore/FluxFlow.Components.Http.AspNetCore.csproj", + "notesName": "FluxFlow.Components.Http.AspNetCore", + "binaryCompatibilityBaseline": "2.0.0" + }, + { + "alias": "engine", + "tagPrefix": "engine", + "packageId": "FluxFlow.Engine", + "project": "src/Engine/Runtime/FluxFlow.Engine/FluxFlow.Engine.csproj", + "notesName": "FluxFlow.Engine", + "binaryCompatibilityBaseline": "8.0.0-rc.1" + }, + { + "alias": "components-mqtt", + "tagPrefix": "components-mqtt", + "packageId": "FluxFlow.Components.Mqtt", + "project": "src/Components/Mqtt/FluxFlow.Components.Mqtt/FluxFlow.Components.Mqtt.csproj", + "notesName": "FluxFlow.Components.Mqtt", + "binaryCompatibilityBaseline": "7.1.0" + }, + { + "alias": "components-mqtt-composition", + "tagPrefix": "components-mqtt-composition", + "packageId": "FluxFlow.Components.Mqtt.Composition", + "project": "src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/FluxFlow.Components.Mqtt.Composition.csproj", + "notesName": "FluxFlow.Components.Mqtt.Composition", + "binaryCompatibilityBaseline": "7.1.0-rc.1" + }, + { + "alias": "components-mqtt-mqttnet", + "tagPrefix": "components-mqtt-mqttnet", + "packageId": "FluxFlow.Components.Mqtt.MqttNet", + "project": "src/Components/Mqtt/FluxFlow.Components.Mqtt.MqttNet/FluxFlow.Components.Mqtt.MqttNet.csproj", + "notesName": "FluxFlow.Components.Mqtt.MqttNet", + "binaryCompatibilityBaseline": "3.1.0" + }, + { + "alias": "components-mqtt-pulsemqtt", + "tagPrefix": "components-mqtt-pulsemqtt", + "packageId": "FluxFlow.Components.Mqtt.PulseMqtt", + "project": "src/Components/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/FluxFlow.Components.Mqtt.PulseMqtt.csproj", + "notesName": "FluxFlow.Components.Mqtt.PulseMqtt", + "binaryCompatibilityBaseline": "4.1.0" + }, + { + "alias": "components-mapping", + "tagPrefix": "components-mapping", + "packageId": "FluxFlow.Components.Mapping", + "project": "src/Components/Mapping/FluxFlow.Components.Mapping/FluxFlow.Components.Mapping.csproj", + "notesName": "FluxFlow.Components.Mapping", + "binaryCompatibilityBaseline": "6.0.0" + }, + { + "alias": "components-mapping-composition", + "tagPrefix": "components-mapping-composition", + "packageId": "FluxFlow.Components.Mapping.Composition", + "project": "src/Components/Mapping/FluxFlow.Components.Mapping.Composition/FluxFlow.Components.Mapping.Composition.csproj", + "notesName": "FluxFlow.Components.Mapping.Composition", + "binaryCompatibilityBaseline": "7.0.0-rc.1" + }, + { + "alias": "components-assertions", + "tagPrefix": "components-assertions", + "packageId": "FluxFlow.Components.Assertions", + "project": "src/Components/Assertions/FluxFlow.Components.Assertions/FluxFlow.Components.Assertions.csproj", + "notesName": "FluxFlow.Components.Assertions", + "binaryCompatibilityBaseline": "6.0.0" + }, + { + "alias": "components-assertions-composition", + "tagPrefix": "components-assertions-composition", + "packageId": "FluxFlow.Components.Assertions.Composition", + "project": "src/Components/Assertions/FluxFlow.Components.Assertions.Composition/FluxFlow.Components.Assertions.Composition.csproj", + "notesName": "FluxFlow.Components.Assertions.Composition", + "binaryCompatibilityBaseline": "7.0.0-rc.1" + }, + { + "alias": "components-sources", + "tagPrefix": "components-sources", + "packageId": "FluxFlow.Components.Sources", + "project": "src/Components/Sources/FluxFlow.Components.Sources/FluxFlow.Components.Sources.csproj", + "notesName": "FluxFlow.Components.Sources", + "binaryCompatibilityBaseline": "6.0.0" + }, + { + "alias": "components-sources-composition", + "tagPrefix": "components-sources-composition", + "packageId": "FluxFlow.Components.Sources.Composition", + "project": "src/Components/Sources/FluxFlow.Components.Sources.Composition/FluxFlow.Components.Sources.Composition.csproj", + "notesName": "FluxFlow.Components.Sources.Composition", + "binaryCompatibilityBaseline": "7.0.0-rc.1" + }, + { + "alias": "components-routing", + "tagPrefix": "components-routing", + "packageId": "FluxFlow.Components.Routing", + "project": "src/Components/Routing/FluxFlow.Components.Routing/FluxFlow.Components.Routing.csproj", + "notesName": "FluxFlow.Components.Routing", + "binaryCompatibilityBaseline": "6.0.1" + }, + { + "alias": "components-routing-composition", + "tagPrefix": "components-routing-composition", + "packageId": "FluxFlow.Components.Routing.Composition", + "project": "src/Components/Routing/FluxFlow.Components.Routing.Composition/FluxFlow.Components.Routing.Composition.csproj", + "notesName": "FluxFlow.Components.Routing.Composition", + "binaryCompatibilityBaseline": "7.0.0-rc.1" + }, + { + "alias": "components-validation", + "tagPrefix": "components-validation", + "packageId": "FluxFlow.Components.Validation", + "project": "src/Components/Validation/FluxFlow.Components.Validation/FluxFlow.Components.Validation.csproj", + "notesName": "FluxFlow.Components.Validation", + "binaryCompatibilityBaseline": "6.0.0" + }, + { + "alias": "components-validation-composition", + "tagPrefix": "components-validation-composition", + "packageId": "FluxFlow.Components.Validation.Composition", + "project": "src/Components/Validation/FluxFlow.Components.Validation.Composition/FluxFlow.Components.Validation.Composition.csproj", + "notesName": "FluxFlow.Components.Validation.Composition", + "binaryCompatibilityBaseline": "7.0.0-rc.1" + }, + { + "alias": "components-filesystem", + "tagPrefix": "components-filesystem", + "packageId": "FluxFlow.Components.FileSystem", + "project": "src/Components/FileSystem/FluxFlow.Components.FileSystem/FluxFlow.Components.FileSystem.csproj", + "notesName": "FluxFlow.Components.FileSystem", + "binaryCompatibilityBaseline": "6.0.1" + }, + { + "alias": "components-filesystem-composition", + "tagPrefix": "components-filesystem-composition", + "packageId": "FluxFlow.Components.FileSystem.Composition", + "project": "src/Components/FileSystem/FluxFlow.Components.FileSystem.Composition/FluxFlow.Components.FileSystem.Composition.csproj", + "notesName": "FluxFlow.Components.FileSystem.Composition", + "binaryCompatibilityBaseline": "7.0.0-rc.1" + }, + { + "alias": "components-observability", + "tagPrefix": "components-observability", + "packageId": "FluxFlow.Components.Observability", + "project": "src/Components/Observability/FluxFlow.Components.Observability/FluxFlow.Components.Observability.csproj", + "notesName": "FluxFlow.Components.Observability", + "binaryCompatibilityBaseline": "7.0.0" + }, + { + "alias": "components-observability-composition", + "tagPrefix": "components-observability-composition", + "packageId": "FluxFlow.Components.Observability.Composition", + "project": "src/Components/Observability/FluxFlow.Components.Observability.Composition/FluxFlow.Components.Observability.Composition.csproj", + "notesName": "FluxFlow.Components.Observability.Composition", + "binaryCompatibilityBaseline": "7.0.0-rc.1" + }, + { + "alias": "components-timers", + "tagPrefix": "components-timers", + "packageId": "FluxFlow.Components.Timers", + "project": "src/Components/Timers/FluxFlow.Components.Timers/FluxFlow.Components.Timers.csproj", + "notesName": "FluxFlow.Components.Timers", + "binaryCompatibilityBaseline": "6.0.0" + }, + { + "alias": "components-timers-composition", + "tagPrefix": "components-timers-composition", + "packageId": "FluxFlow.Components.Timers.Composition", + "project": "src/Components/Timers/FluxFlow.Components.Timers.Composition/FluxFlow.Components.Timers.Composition.csproj", + "notesName": "FluxFlow.Components.Timers.Composition", + "binaryCompatibilityBaseline": "7.0.0-rc.1" + }, + { + "alias": "components-payloads", + "tagPrefix": "components-payloads", + "packageId": "FluxFlow.Components.Payloads", + "project": "src/Components/Payloads/FluxFlow.Components.Payloads/FluxFlow.Components.Payloads.csproj", + "notesName": "FluxFlow.Components.Payloads", + "binaryCompatibilityBaseline": "6.0.0" + }, + { + "alias": "components-payloads-composition", + "tagPrefix": "components-payloads-composition", + "packageId": "FluxFlow.Components.Payloads.Composition", + "project": "src/Components/Payloads/FluxFlow.Components.Payloads.Composition/FluxFlow.Components.Payloads.Composition.csproj", + "notesName": "FluxFlow.Components.Payloads.Composition", + "binaryCompatibilityBaseline": "6.0.0-rc.1" + }, + { + "alias": "components-http", + "tagPrefix": "components-http", + "packageId": "FluxFlow.Components.Http", + "project": "src/Components/Http/FluxFlow.Components.Http/FluxFlow.Components.Http.csproj", + "notesName": "FluxFlow.Components.Http", + "binaryCompatibilityBaseline": "6.0.0" + }, + { + "alias": "components-http-composition", + "tagPrefix": "components-http-composition", + "packageId": "FluxFlow.Components.Http.Composition", + "project": "src/Components/Http/FluxFlow.Components.Http.Composition/FluxFlow.Components.Http.Composition.csproj", + "notesName": "FluxFlow.Components.Http.Composition", + "binaryCompatibilityBaseline": "7.0.0-rc.1" + }, + { + "alias": "components-serialization", + "tagPrefix": "components-serialization", + "packageId": "FluxFlow.Components.Serialization", + "project": "src/Components/Serialization/FluxFlow.Components.Serialization/FluxFlow.Components.Serialization.csproj", + "notesName": "FluxFlow.Components.Serialization", + "binaryCompatibilityBaseline": "6.0.0" + }, + { + "alias": "components-serialization-composition", + "tagPrefix": "components-serialization-composition", + "packageId": "FluxFlow.Components.Serialization.Composition", + "project": "src/Components/Serialization/FluxFlow.Components.Serialization.Composition/FluxFlow.Components.Serialization.Composition.csproj", + "notesName": "FluxFlow.Components.Serialization.Composition", + "binaryCompatibilityBaseline": "6.0.0-rc.1" + }, + { + "alias": "components-metrics", + "tagPrefix": "components-metrics", + "packageId": "FluxFlow.Components.Metrics", + "project": "src/Components/Metrics/FluxFlow.Components.Metrics/FluxFlow.Components.Metrics.csproj", + "notesName": "FluxFlow.Components.Metrics", + "binaryCompatibilityBaseline": "6.0.0" + }, + { + "alias": "components-metrics-composition", + "tagPrefix": "components-metrics-composition", + "packageId": "FluxFlow.Components.Metrics.Composition", + "project": "src/Components/Metrics/FluxFlow.Components.Metrics.Composition/FluxFlow.Components.Metrics.Composition.csproj", + "notesName": "FluxFlow.Components.Metrics.Composition", + "binaryCompatibilityBaseline": "6.0.0-rc.1" + }, + { + "alias": "components-projections", + "tagPrefix": "components-projections", + "packageId": "FluxFlow.Components.Projections", + "project": "src/Components/Projections/FluxFlow.Components.Projections/FluxFlow.Components.Projections.csproj", + "notesName": "FluxFlow.Components.Projections", + "binaryCompatibilityBaseline": "7.0.0" + }, + { + "alias": "components-projections-composition", + "tagPrefix": "components-projections-composition", + "packageId": "FluxFlow.Components.Projections.Composition", + "project": "src/Components/Projections/FluxFlow.Components.Projections.Composition/FluxFlow.Components.Projections.Composition.csproj", + "notesName": "FluxFlow.Components.Projections.Composition", + "binaryCompatibilityBaseline": "6.0.0-rc.1" + }, + { + "alias": "components-expectations", + "tagPrefix": "components-expectations", + "packageId": "FluxFlow.Components.Expectations", + "project": "src/Components/Expectations/FluxFlow.Components.Expectations/FluxFlow.Components.Expectations.csproj", + "notesName": "FluxFlow.Components.Expectations", + "binaryCompatibilityBaseline": "6.0.0" + }, + { + "alias": "components-expectations-composition", + "tagPrefix": "components-expectations-composition", + "packageId": "FluxFlow.Components.Expectations.Composition", + "project": "src/Components/Expectations/FluxFlow.Components.Expectations.Composition/FluxFlow.Components.Expectations.Composition.csproj", + "notesName": "FluxFlow.Components.Expectations.Composition", + "binaryCompatibilityBaseline": "7.0.0-rc.1" + }, + { + "alias": "components-designer", + "tagPrefix": "components-designer", + "packageId": "FluxFlow.Components.Designer", + "project": "src/Components/Designer/FluxFlow.Components.Designer/FluxFlow.Components.Designer.csproj", + "notesName": "FluxFlow.Components.Designer", + "binaryCompatibilityBaseline": "6.0.0-rc.1" + }, + { + "alias": "components-sessions", + "tagPrefix": "components-sessions", + "packageId": "FluxFlow.Components.Sessions", + "project": "src/Components/Sessions/FluxFlow.Components.Sessions/FluxFlow.Components.Sessions.csproj", + "notesName": "FluxFlow.Components.Sessions", + "binaryCompatibilityBaseline": "6.0.1" + }, + { + "alias": "components-sessions-composition", + "tagPrefix": "components-sessions-composition", + "packageId": "FluxFlow.Components.Sessions.Composition", + "project": "src/Components/Sessions/FluxFlow.Components.Sessions.Composition/FluxFlow.Components.Sessions.Composition.csproj", + "notesName": "FluxFlow.Components.Sessions.Composition", + "binaryCompatibilityBaseline": "7.0.0-rc.1" + }, + { + "alias": "components-state", + "tagPrefix": "components-state", + "packageId": "FluxFlow.Components.State", + "project": "src/Components/State/FluxFlow.Components.State/FluxFlow.Components.State.csproj", + "notesName": "FluxFlow.Components.State", + "binaryCompatibilityBaseline": "6.0.0" + }, + { + "alias": "components-state-composition", + "tagPrefix": "components-state-composition", + "packageId": "FluxFlow.Components.State.Composition", + "project": "src/Components/State/FluxFlow.Components.State.Composition/FluxFlow.Components.State.Composition.csproj", + "notesName": "FluxFlow.Components.State.Composition", + "binaryCompatibilityBaseline": "7.0.0-rc.1" + }, + { + "alias": "components-storage", + "tagPrefix": "components-storage", + "packageId": "FluxFlow.Components.Storage", + "project": "src/Components/Storage/FluxFlow.Components.Storage/FluxFlow.Components.Storage.csproj", + "notesName": "FluxFlow.Components.Storage", + "binaryCompatibilityBaseline": "7.0.0" + }, + { + "alias": "components-storage-composition", + "tagPrefix": "components-storage-composition", + "packageId": "FluxFlow.Components.Storage.Composition", + "project": "src/Components/Storage/FluxFlow.Components.Storage.Composition/FluxFlow.Components.Storage.Composition.csproj", + "notesName": "FluxFlow.Components.Storage.Composition", + "binaryCompatibilityBaseline": "7.0.0-rc.1" + }, + { + "alias": "components-storage-filesystem", + "tagPrefix": "components-storage-filesystem", + "packageId": "FluxFlow.Components.Storage.FileSystem", + "project": "src/Components/Storage/FluxFlow.Components.Storage.FileSystem/FluxFlow.Components.Storage.FileSystem.csproj", + "notesName": "FluxFlow.Components.Storage.FileSystem", + "binaryCompatibilityBaseline": "5.0.0" + }, + { + "alias": "components-storage-sqlfile", + "tagPrefix": "components-storage-sqlfile", + "packageId": "FluxFlow.Components.Storage.SqlFile", + "project": "src/Components/Storage/FluxFlow.Components.Storage.SqlFile/FluxFlow.Components.Storage.SqlFile.csproj", + "notesName": "FluxFlow.Components.Storage.SqlFile", + "binaryCompatibilityBaseline": "5.0.0" + }, + { + "alias": "fluent", + "tagPrefix": "fluent", + "packageId": "FluxFlow.Fluent", + "project": "src/Authoring/FluxFlow.Fluent/FluxFlow.Fluent.csproj", + "notesName": "FluxFlow.Fluent", + "binaryCompatibilityBaseline": "5.0.0-rc.1" + }, + { + "alias": "fluent-hosting", + "tagPrefix": "fluent-hosting", + "packageId": "FluxFlow.Fluent.Hosting", + "project": "src/Authoring/FluxFlow.Fluent.Hosting/FluxFlow.Fluent.Hosting.csproj", + "notesName": "FluxFlow.Fluent.Hosting", + "binaryCompatibilityBaseline": "5.0.0-rc.1" + }, + { + "alias": "engine-durable-input", + "tagPrefix": "engine-durable-input", + "packageId": "FluxFlow.Engine.DurableInput", + "project": "src/Engine/DurableInput/FluxFlow.Engine.DurableInput/FluxFlow.Engine.DurableInput.csproj", + "notesName": "FluxFlow.Engine.DurableInput", + "binaryCompatibilityBaseline": "2.0.0-rc.1" + }, + { + "alias": "engine-durable-input-sqlfile", + "tagPrefix": "engine-durable-input-sqlfile", + "packageId": "FluxFlow.Engine.DurableInput.SqlFile", + "project": "src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/FluxFlow.Engine.DurableInput.SqlFile.csproj", + "notesName": "FluxFlow.Engine.DurableInput.SqlFile", + "binaryCompatibilityBaseline": "2.0.0-rc.1" + }, + { + "alias": "engine-durable-input-tsql", + "tagPrefix": "engine-durable-input-tsql", + "packageId": "FluxFlow.Engine.DurableInput.TSql", + "project": "src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/FluxFlow.Engine.DurableInput.TSql.csproj", + "notesName": "FluxFlow.Engine.DurableInput.TSql", + "binaryCompatibilityBaseline": "2.0.0-rc.1" + }, + { + "alias": "engine-durable-output", + "tagPrefix": "engine-durable-output", + "packageId": "FluxFlow.Engine.DurableOutput", + "project": "src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/FluxFlow.Engine.DurableOutput.csproj", + "notesName": "FluxFlow.Engine.DurableOutput", + "binaryCompatibilityBaseline": "4.0.0-rc.1" + }, + { + "alias": "engine-durable-output-sqlfile", + "tagPrefix": "engine-durable-output-sqlfile", + "packageId": "FluxFlow.Engine.DurableOutput.SqlFile", + "project": "src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/FluxFlow.Engine.DurableOutput.SqlFile.csproj", + "notesName": "FluxFlow.Engine.DurableOutput.SqlFile", + "binaryCompatibilityBaseline": "4.0.0-rc.1" + }, + { + "alias": "engine-durable-output-tsql", + "tagPrefix": "engine-durable-output-tsql", + "packageId": "FluxFlow.Engine.DurableOutput.TSql", + "project": "src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/FluxFlow.Engine.DurableOutput.TSql.csproj", + "notesName": "FluxFlow.Engine.DurableOutput.TSql", + "binaryCompatibilityBaseline": "3.0.0-rc.1" + }, + { + "alias": "engine-healthchecks", + "tagPrefix": "engine-healthchecks", + "packageId": "FluxFlow.Engine.HealthChecks", + "project": "src/Engine/Health/FluxFlow.Engine.HealthChecks/FluxFlow.Engine.HealthChecks.csproj", + "notesName": "FluxFlow.Engine.HealthChecks", + "binaryCompatibilityBaseline": "1.0.0-rc.1" + } ] diff --git a/eng/public-api/README.md b/eng/public-api/README.md index ee269382..14b7937a 100644 --- a/eng/public-api/README.md +++ b/eng/public-api/README.md @@ -30,7 +30,7 @@ When a public declaration change is intentional: ```powershell $env:FLUXFLOW_ACCEPT_PUBLIC_API_BASELINE='1' -dotnet test tests\FluxFlow.Release.Tests\FluxFlow.Release.Tests.csproj --filter FullyQualifiedName~PublicApiBaselineTests +dotnet test tests\Infrastructure\FluxFlow.Release.Tests\FluxFlow.Release.Tests.csproj --filter FullyQualifiedName~PublicApiBaselineTests Remove-Item Env:\FLUXFLOW_ACCEPT_PUBLIC_API_BASELINE ``` diff --git a/eng/public-api/baseline.txt b/eng/public-api/baseline.txt index f4ed8cd4..474a43b2 100644 --- a/eng/public-api/baseline.txt +++ b/eng/public-api/baseline.txt @@ -1,63 +1,64 @@ # FluxFlow public API source-declaration baseline v1 # Entries follow eng/packages.json order. # Format: package-index|public-declaration-count|sha256(normalized declarations) -0|137|23C605AB916E134DED58B40D1A9ABBC194946FC5428D92FE0A8DA19767646537 +0|279|33981DB02F9BB129ABFE36B1F6A64D49CAA70A76446776997A2DCA37F59D5485 1|33|2545168EB6968CF01A18F6C1ABBF983DE96AC7B340F55795D79835BB6F55626C 2|34|D9B1D39D0B90ACFA62761A8803488B6E26F754F9B75804B2B251A45308267F96 -3|70|A3CB27FEBB5534D87F7A2C5146EB49C1DBD6E139CB4FA1802252E7BBF6B6534A -4|48|F6E8EB813FB63F2C2E241D5BADC35412F954DDDBB9859B5F8A850F6E3146B9B2 -5|510|9E7B8FD5CD1A6C3F4F9992459D30B0081EC9EE8A3A8C3FF38AE1DD0F5BF39C65 +3|90|3A66FFF5FBC28E417B174F40F45DBA84FA6C53BC726483C695655F7EA82B2D01 +4|48|D06DAC9401E251E1BB335472B10263A7D357B83BB9E816D10779F63CFEF8872C +5|523|88E2099B3BD1E146F86514E3184C375262AB8645BEAC16C3F75BF0611C8C04D3 6|24|E0D17FEB66936D323B4F51225057CD5583D6B71D12D9E67EBCFAF7BA805DD945 -7|45|5668E1862A4D74837DE5E98809BB1B7F5120EACD5F719263CAFFA574D79EED13 -8|30|2C68BF45E40E57070F67FE5EBA6B34FE7D01F68CA7B1EAB7D73563AFEF8BC020 -9|433|F2F47F95CFE57CA455C2D966BC4D387C18425694E1AFC07E536CD492754673CE -10|307|2284E41590D6353503EC03CD6F25A507227A52BE7EE9272C0DA930FA7BB06F97 -11|185|542E9A189E96F09856F1B863918159958C8E34F2048A4458C5C1362514E54239 -12|16|D293AE12ACD7A232FBD1F638DDED6D55A12ABC7A5261B62F3D4B897EAABF13CB -13|16|E1C6A089B6EE1988D24836D78EDBB68BB51FB540D3DFF0AB6BEF1DBB1A7DB952 -14|32|D86ED4710E121B0E7BCF6D0314D404CF5B5349F6313370A770003C78397A77A4 -15|35|C7DCFDB3286AC4E7D5989E79D76996866333EA6E6C67F10720D9EDC68827C178 -16|40|84DCB2F5AF6F33F9EB8498538543E4E4650000B96818EAB2937C885733203166 -17|37|0DE989966D121A7AE0B434371A2877E6C3102E98C2674E4D9E696266EA90204C -18|59|2F27D9E987B9947871DB2A49298615575CC0F89282F0FBFC56DEB7A079F4DCCF -19|40|C1CF0157065697C61BB680001B9F7025599A2FBEBEDFB03E41B764722B741899 -20|185|7A2A6F3D63160D1E7A7A84DC5EA9D3EDC9DF0F10E545B8992AD76BF6EBCC8798 -21|66|EB70188E8A4917BA44EF3D7C9817682E83BD7FD6246B8F009CCBB6361CEFBBD2 -22|50|2926BF73D93950A7CEFCF31C19AB21349F52C99C60CFB3648FCFA1699A93F855 -23|28|D2B19099B89634EB6D51BDF945709ACE0D2ACCD3157D88BF97C648B1B97441F5 -24|197|7D77C8E8CED283927836D592B2D42DB542A3C32FAF7D932B3C2102853B7FED4E -25|60|A765D2B4188080D86DDD55D9A6E9648A0A08CEA9A6C6E7C07F76BE4A41BDF21D -26|111|201F79EF64977730AF02E2F35FB4DD87FEDFFE12E40184D5CB830C5E23672094 -27|50|BA073676196ED327EA5755D356F5C3BDE43A5BB9FFD67B3C8668BED717C452B3 -28|140|32FA7913E42646C529662A09553451385443F933041EDFCFE26D47BA0E905E47 -29|58|F8908CDD20B8D9A7D7CFC31B0EA58E5E9F4C69AB734E3F56AA4D9B097D6E4EEA -30|42|3D4CB653116BE6048F77090DA48A228C74C7D4879197A51265C71F0B209F603A -31|32|0249628773421CDAEF2C7C6A898BACB595CB2DF2802CE075FD76E86E5CE17D3F -32|62|DC9864B21D5239FAB4CBFB49BC86AE55A288CEB5D9127BD4E52ECD0176F67C15 -33|31|417284C47526EBE1F967765A2FC9158BCF90B3A6DBBD6C55381779A60B136EEC -34|106|306CB0BF2CE52E8153559318379D52E61F9CA71D434E1ECEC8355D36DB0CAF61 -35|55|ADBB158D2453CC5C786912E66E2CAA1B9F54DDA7D918CA36942EBD28E3F7D245 -36|88|737447236DDF80A3A4E394AF6C13F8783FF405B9F52D662A6F57491896C57A42 -37|33|046CB10D5127B7CD3974CC95BD8C6F7F208710C2E32D8AE89A01FB9BC5A20EAF -38|77|35755D6DD05904443F5E2CF712648F72249A3E78A2D667904CB1E05AC042F7A0 -39|29|E39C1D63A9B3E3033E4AD4E4F910EDA5D440313E948FA5AEC48BB239B24ECB5B -40|45|257459D10E92B7E0F49131B156C606005D2BC228812C86C0BBF9470343AA2F51 -41|29|8C6AB4AA1002D1C8047106B18B354BAA518868A449869C65B96A320BA2282111 -42|266|8CA42CB8EEB5434C094E00BB483F04590F46BA98DDA3D452EB9950DFD30E682A -43|196|9EC6133C55B78D7C9DFCCD7D792981112F0CF006D3CE4C03FBA9F51C06706481 -44|62|2D8B00E1BD8DD1032BA5145B429303252C357B200D6B8A77F9F82C1C014E61E0 -45|54|4579A0AB28CA5098F2AA3E5ABEF2650ECC11DA52096BF6D87B749E0D4F860C80 -46|36|C2B41A16F2FD6A1A8B6D79837D201C2B4A327727893DB06A1DCCDD19DFF87833 -47|241|2D317953267ECA8B57DACA783F66F91E7BEE7C54F8DE4972DC98D88EECA490B3 -48|50|87F2DC51D8B3C31F9050F9EC87E1D76CA37CCD5A59BA58BCDA02E47B08B7FC76 -49|48|0CE7A7E203137C2422BAA7FF7EAA8F88EA42E140F8E39DE0CD25F3A3EC49483A -50|35|F093E45D50762B74537072FC614FC8C5464BC4CCD91E7873906C1407FA7C81BC -51|32|4B55506F2DADE095EE1905570E4424C7CC4CC65AB874AD8A65EE85DB9D526A05 -52|6|5CBD53AECC66F9D1D94C1893571063CA7EDB4CD0D8A050DF2D30C155111B1A34 -53|214|444C6140AEBC2D93A5F93F02BBAEC57E7F28CB018AB611A42F6A7D055C6E0716 -54|35|D69BA2F48A9D0D387AB07435D3C702FE5853B1A77428620786DA368E28436391 -55|39|8B16DA287B9BD29CDB9BD32FA4B1569EE818C24AE354605EFBE9991F6149457A -56|188|353AB08D508B6CD630CD823CD8E7EF5615A76AEFAB44E8A883F827E6570A8542 -57|38|37CFB4E42B59150BAA7D1B535304E0FB270D1D74AA35FEDD1F72FE5E7288DB30 -58|40|A7872A40708E186EA7C0EF21BE3707F6175C3B92BA7DD0C496918BDBFCCDEFF4 -59|3|7661FA9E43BC954746438806CC1B10C69962E83BF354BD1311E3DBD233A831C5 +7|5|7C5B5428D5AD792C4AEB786A113F8A66FC6BE087402D2F1E275BB548757E36B5 +8|45|388E5EC5866A357BD9133905B11FDA61E3D6A804F6BFE737C56A183CB022A552 +9|30|5B61A1DD385825DE6AB3C3E58820FFC9AB4CAAF2F0A5EB4040CCB4D0B673366D +10|473|F73586ADDB97872CE8A0F2F7A62D33D71695FDC5FF77D95E4090E820DDF69516 +11|311|DD191EE3D8766FA3204DFB4D375B0DB760DFBD755BB06C1D6B2019C0109FBC9C +12|185|6F94AC7D205F73B1B26A0BB63DAFE562FEF37C76565391948DE0E21CDB8DDDF0 +13|16|D293AE12ACD7A232FBD1F638DDED6D55A12ABC7A5261B62F3D4B897EAABF13CB +14|16|E1C6A089B6EE1988D24836D78EDBB68BB51FB540D3DFF0AB6BEF1DBB1A7DB952 +15|36|6EC01A4FF64EC36E42F6427DC2214389E4B90761AFF7062708D45E14DF44E398 +16|35|CCB0D90252E2562EFCA26091DE11F336ECFEA7DB3FC64174A7FE756B8220403E +17|42|120F7947B1317F1B2353AD512FC8C9E231B4EB485A170247D79179E560A283E2 +18|37|645CAA59268C6C026F4DB3508ACD8DEB7C6D0334149EEE5EB1015AE73B96A3AB +19|59|6D7CB8BB4EB266B4B8C3EC855C4114D32196C4E05AF7CAAD447F00493A5FF403 +20|40|809DEEB20DDB9DE81CB81458B0F3331DF524BC7524AF582F9358E163AFF29E24 +21|222|52B85591483F66BF953E6C23285CE667752C3D283852877DD61F386A05F2142A +22|66|631B8736D65ED98314572062DC9C37924DA378F45D1A96424D1AEECC08E63F93 +23|50|49237ADA918C50A61B43E50C782862707F6F48D39A680E2E8AB13CFFB67F89B8 +24|28|9756EC3D0CFE76C22675A403363E167979607317E8C0E02765A053D405E69F38 +25|200|0B6E325737779DC06538CC219AB07E217D460E782D1064D524E53C245BBC3E4A +26|60|7995DE595A3B7BAB8F94D6F97D8E4E89727A9610A93FC8EBA7301D1DF2740B2B +27|135|2914FE3E37784EDB2FE2CE41B4792D5DAFD6005F397F3ADF8257EF901BB6FB89 +28|50|17E3998DDFD56ED23954DC5761D178A508678C7C6021D7FA527446DD41D3D6D3 +29|167|C5D34D13079EDED2D178FC3EF30E03AA65DE45379D907A553CFE3C9F23D12216 +30|58|1D199FA6F9D5604B8BD951C3FE9FFE98D2814469814D864044A0377D60EB74BF +31|42|E98AE3FBFCC5C6298BACED1AF1F928404773F6CEBBD83120218184E4B1CE1801 +32|32|60682FBB9936E0D32DBB2BA7C895B3683E2F5DDACA0B87ABBA9EBBF0A45FD931 +33|66|182272B7A07E0BE86624D2E40D4DD849DDB52C2B0FE82B82824FC0F56FB68729 +34|31|FDC392FDBD5E8470CD8FE907CC0FEB4F09635C51047C56B3EBCBF13A9B48C829 +35|106|57C3B966757C45893E14E9A14DD2C8A10232670A8E1013312ABCA05B31D9CEDA +36|55|850CD4102BF76AEAD08E6F0E456D9C2692A11DC4E4335D691CFD581EB13C8869 +37|89|2406072CA487E36AC606C920B41E9418E5BB123F4EE85F3DAF32249916021D50 +38|33|7AF52CBF024F605B8A4DD96D9ADB7B0890B9EF910C60BA68B7D6A79D20EF0BD3 +39|78|CEE05F7D0DAEA625F55CDDEC33C31C35114C04DC3490AF79649EE1BC29785E3A +40|29|48F94C2F382FDF5350BDFDEBF36F0A76A7D59B7ACCD097121247A144CDD73C2D +41|45|03EA65B23F2285C243C6F3D8D378E4602B19C74C75B70DB9B7360337DD5BEF6D +42|29|73C6ED6881BE60867FC0BA08C938955D01F9054285AF56D88768F63654357BAC +43|284|CFDB07CB9E6F39DA13764689BFD0489CF9DA4B928CCA1ABBC976F05BBD746951 +44|199|07E0D750964E8690EF11DDA33901DB3E5BAF91F2E00C905DC17E5D4E10C50FD9 +45|62|4F499E83381E1D86DB02AD49116B3EFDD9E2DD37F6902593A09FED3FCA329F0B +46|55|0D3DDB880AC0811080DE2434273C7E6B90DA97CCD4940CFAADED5C7B7117F90D +47|36|F1A1A8DCF4C92F9B9479D15DF23360761146A486F5AF256F75D9D11779B7A70F +48|246|AC48C4DDE65B2FBC484A4A797159059DFB4F0F7C88E534D6BF9F00640B42FDFE +49|50|48D615D503D680E3E638505F3ACC9CE2E589F0FBFCFC20567975745CD42592CF +50|48|0CE7A7E203137C2422BAA7FF7EAA8F88EA42E140F8E39DE0CD25F3A3EC49483A +51|35|F093E45D50762B74537072FC614FC8C5464BC4CCD91E7873906C1407FA7C81BC +52|32|C2DBBDC5037E55987179AE6D5B16DDE05EB86DE1166DA220E6A9A0DC3145115D +53|6|5CBD53AECC66F9D1D94C1893571063CA7EDB4CD0D8A050DF2D30C155111B1A34 +54|214|444C6140AEBC2D93A5F93F02BBAEC57E7F28CB018AB611A42F6A7D055C6E0716 +55|35|D69BA2F48A9D0D387AB07435D3C702FE5853B1A77428620786DA368E28436391 +56|39|8B16DA287B9BD29CDB9BD32FA4B1569EE818C24AE354605EFBE9991F6149457A +57|188|353AB08D508B6CD630CD823CD8E7EF5615A76AEFAB44E8A883F827E6570A8542 +58|38|37CFB4E42B59150BAA7D1B535304E0FB270D1D74AA35FEDD1F72FE5E7288DB30 +59|40|A7872A40708E186EA7C0EF21BE3707F6175C3B92BA7DD0C496918BDBFCCDEFF4 +60|3|7661FA9E43BC954746438806CC1B10C69962E83BF354BD1311E3DBD233A831C5 diff --git a/eng/test.ps1 b/eng/test.ps1 new file mode 100644 index 00000000..d2fad76b --- /dev/null +++ b/eng/test.ps1 @@ -0,0 +1,67 @@ +[CmdletBinding()] +param( + [Parameter()] + [ValidateSet("Unit", "Acceptance", "Integration", "Smoke", "All")] + [string] $Suite = "Unit", + [Parameter()] + [ValidateSet("Debug", "Release")] + [string] $Configuration = "Debug", + [Parameter()] + [switch] $NoBuild, + [Parameter()] + [switch] $IncludeLicensedDatabaseTests +) + +$ErrorActionPreference = "Stop" +$repositoryRoot = Split-Path $PSScriptRoot + +function Invoke-Test([string] $target, [string[]] $additionalArguments = @()) { + $arguments = @("test", $target, "--configuration", $Configuration) + if ($NoBuild) { $arguments += "--no-build" } + $arguments += $additionalArguments + & dotnet @arguments + if ($LASTEXITCODE -ne 0) { throw "Test suite failed: $target" } +} + +function Invoke-UnitTests { + Invoke-Test "FluxFlow.sln" @( + "--filter", + "Category!=Acceptance&Category!=ContainerIntegration&Category!=ExternalSmoke&FullyQualifiedName!~TSql.IntegrationTests" + ) +} + +function Invoke-AcceptanceTests { + Invoke-Test "tests/Acceptance/Workflows/MqttToHttp/FluxFlow.Workflow.Acceptance.Tests/FluxFlow.Workflow.Acceptance.Tests.csproj" +} + +function Invoke-IntegrationTests { + Invoke-Test "tests/Integration/Containers/Workflows/MqttToHttp/FluxFlow.Workflow.ContainerIntegrationTests/FluxFlow.Workflow.ContainerIntegrationTests.csproj" + if ($IncludeLicensedDatabaseTests) { + & "$repositoryRoot/tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/run-integration.ps1" -AcceptLicense + if ($LASTEXITCODE -ne 0) { throw "Durable-input database integration tests failed." } + & "$repositoryRoot/tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/run-integration.ps1" -AcceptLicense + if ($LASTEXITCODE -ne 0) { throw "Durable-output database integration tests failed." } + } +} + +function Invoke-SmokeTests { + Invoke-Test "tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/FluxFlow.Workflow.ExternalSmokeTests.csproj" +} + +Push-Location $repositoryRoot +try { + switch ($Suite) { + "Unit" { Invoke-UnitTests } + "Acceptance" { Invoke-AcceptanceTests } + "Integration" { Invoke-IntegrationTests } + "Smoke" { Invoke-SmokeTests } + "All" { + Invoke-UnitTests + Invoke-AcceptanceTests + Invoke-IntegrationTests + } + } +} +finally { + Pop-Location +} diff --git a/samples/FluxFlow.ComponentPackageTemplate/FluxFlow.ComponentPackageTemplate.csproj b/samples/FluxFlow.ComponentPackageTemplate/FluxFlow.ComponentPackageTemplate.csproj index a2463be3..84975f79 100644 --- a/samples/FluxFlow.ComponentPackageTemplate/FluxFlow.ComponentPackageTemplate.csproj +++ b/samples/FluxFlow.ComponentPackageTemplate/FluxFlow.ComponentPackageTemplate.csproj @@ -6,7 +6,7 @@ - + diff --git a/samples/FluxFlow.ComponentPackageTemplate/README.md b/samples/FluxFlow.ComponentPackageTemplate/README.md index d6f17950..35701c8e 100644 --- a/samples/FluxFlow.ComponentPackageTemplate/README.md +++ b/samples/FluxFlow.ComponentPackageTemplate/README.md @@ -43,5 +43,5 @@ intentionally targets the engine model. Run the template tests from the repository root: ```sh -dotnet test tests/FluxFlow.ComponentPackageTemplate.Tests/FluxFlow.ComponentPackageTemplate.Tests.csproj +dotnet test tests/Samples/FluxFlow.ComponentPackageTemplate.Tests/FluxFlow.ComponentPackageTemplate.Tests.csproj ``` diff --git a/samples/FluxFlow.CompositionSample/FluxFlow.CompositionSample.csproj b/samples/FluxFlow.CompositionSample/FluxFlow.CompositionSample.csproj index cf994a26..4e437e13 100644 --- a/samples/FluxFlow.CompositionSample/FluxFlow.CompositionSample.csproj +++ b/samples/FluxFlow.CompositionSample/FluxFlow.CompositionSample.csproj @@ -7,9 +7,9 @@ - - - + + + diff --git a/samples/FluxFlow.CompositionSample/Program.cs b/samples/FluxFlow.CompositionSample/Program.cs index 1f851baa..bbaaa1d5 100644 --- a/samples/FluxFlow.CompositionSample/Program.cs +++ b/samples/FluxFlow.CompositionSample/Program.cs @@ -149,20 +149,20 @@ internal void Apply(ComponentDefinitionBuilder definition) internal sealed class SourceComponentHandle(ComponentHandle definition) : AuthoredComponentHandle(definition) { public OutputPortHandle Output { get; } = definition.Output(SampleComponentPorts.Output); - public OutputPortHandle Events { get; } = definition.Output(SampleComponentPorts.Events); + public OutputPortHandle Events { get; } = definition.Output(SampleComponentPorts.Events); } internal sealed class UppercaseComponentHandle(ComponentHandle definition) : AuthoredComponentHandle(definition) { public InputPortHandle Input { get; } = definition.Input(SampleComponentPorts.Input); public OutputPortHandle Output { get; } = definition.Output(SampleComponentPorts.Output); - public OutputPortHandle Events { get; } = definition.Output(SampleComponentPorts.Events); + public OutputPortHandle Events { get; } = definition.Output(SampleComponentPorts.Events); } internal sealed class SinkComponentHandle(ComponentHandle definition) : AuthoredComponentHandle(definition) { public InputPortHandle Input { get; } = definition.Input(SampleComponentPorts.Input); - public OutputPortHandle Events { get; } = definition.Output(SampleComponentPorts.Events); + public OutputPortHandle Events { get; } = definition.Output(SampleComponentPorts.Events); } internal sealed class StringCollector diff --git a/samples/FluxFlow.DesignerApp/FluxFlow.DesignerApp.csproj b/samples/FluxFlow.DesignerApp/FluxFlow.DesignerApp.csproj index 381b3e38..fe794d6f 100644 --- a/samples/FluxFlow.DesignerApp/FluxFlow.DesignerApp.csproj +++ b/samples/FluxFlow.DesignerApp/FluxFlow.DesignerApp.csproj @@ -14,13 +14,13 @@ - - - - - - - + + + + + + + diff --git a/samples/FluxFlow.DesignerHost/DesignerHostCatalog.cs b/samples/FluxFlow.DesignerHost/DesignerHostCatalog.cs index 87473ff6..d543d353 100644 --- a/samples/FluxFlow.DesignerHost/DesignerHostCatalog.cs +++ b/samples/FluxFlow.DesignerHost/DesignerHostCatalog.cs @@ -97,7 +97,13 @@ private static IReadOnlyList CreatePorts( Order = port.Order, Summary = port.Summary?.Value, ValueType = port.ValueType?.Value, - IsPrimary = port.IsPrimary + IsPrimary = port.IsPrimary, + InputShape = port.InputShape is { } shape ? new InputShapeModel + { + Description = shape.Description, + AcceptedKinds = shape.AcceptedKinds.Select(static value => value.ToString()).ToArray(), + RequiredProperties = shape.RequiredProperties.ToArray() + } : null }) .ToArray(); diff --git a/samples/FluxFlow.DesignerHost/FluxFlow.DesignerHost.csproj b/samples/FluxFlow.DesignerHost/FluxFlow.DesignerHost.csproj index d1ec769a..7ca89300 100644 --- a/samples/FluxFlow.DesignerHost/FluxFlow.DesignerHost.csproj +++ b/samples/FluxFlow.DesignerHost/FluxFlow.DesignerHost.csproj @@ -6,8 +6,8 @@ - - + + diff --git a/samples/FluxFlow.DesignerHost/PortModel.cs b/samples/FluxFlow.DesignerHost/PortModel.cs index cb17f613..723d240e 100644 --- a/samples/FluxFlow.DesignerHost/PortModel.cs +++ b/samples/FluxFlow.DesignerHost/PortModel.cs @@ -14,6 +14,15 @@ public sealed record PortModel public string? Summary { get; init; } public string? ValueType { get; init; } public bool IsPrimary { get; init; } + public InputShapeModel? InputShape { get; init; } +} + +/// Serializable structural hints for a destination input. +public sealed record InputShapeModel +{ + public required string Description { get; init; } + public IReadOnlyList AcceptedKinds { get; init; } = []; + public IReadOnlyList RequiredProperties { get; init; } = []; } public enum PortKind diff --git a/samples/FluxFlow.DesignerHost/README.md b/samples/FluxFlow.DesignerHost/README.md index 6a4f071b..f9ed6aa2 100644 --- a/samples/FluxFlow.DesignerHost/README.md +++ b/samples/FluxFlow.DesignerHost/README.md @@ -33,8 +33,8 @@ layout persistence, and canvas behavior stay outside this layer. ## Tests -`tests/FluxFlow.DesignerHost.Tests` covers host projection rules with +`tests/Samples/FluxFlow.DesignerHost.Tests` covers host projection rules with builder-made metadata and one integration pass over package-owned component declarations. -`tests/FluxFlow.Components.Designer.Tests` covers canonical persistence, +`tests/Components/Designer/FluxFlow.Components.Designer.Tests` covers canonical persistence, declaration-side preservation, resource projections, and runtime diagnostics. diff --git a/samples/FluxFlow.DurabilityOperationsSample/FluxFlow.DurabilityOperationsSample.csproj b/samples/FluxFlow.DurabilityOperationsSample/FluxFlow.DurabilityOperationsSample.csproj index bee58949..c81233b0 100644 --- a/samples/FluxFlow.DurabilityOperationsSample/FluxFlow.DurabilityOperationsSample.csproj +++ b/samples/FluxFlow.DurabilityOperationsSample/FluxFlow.DurabilityOperationsSample.csproj @@ -7,13 +7,13 @@ - - - - - - - + + + + + + + diff --git a/samples/FluxFlow.DurabilityOperationsSample/SampleWorkflow.cs b/samples/FluxFlow.DurabilityOperationsSample/SampleWorkflow.cs index 1e9efa11..e8a8d3bf 100644 --- a/samples/FluxFlow.DurabilityOperationsSample/SampleWorkflow.cs +++ b/samples/FluxFlow.DurabilityOperationsSample/SampleWorkflow.cs @@ -42,8 +42,8 @@ private sealed class UppercaseHandle(ComponentHandle definition) internal OutputPortHandle Output { get; } = definition.Output("Output"); - internal OutputPortHandle Events { get; } = - definition.Output("Events"); + internal OutputPortHandle Events { get; } = + definition.Output("Events"); } private sealed class UppercaseNode : FlowNode diff --git a/samples/FluxFlow.FluentSample/FluxFlow.FluentSample.csproj b/samples/FluxFlow.FluentSample/FluxFlow.FluentSample.csproj index 0cdad34c..190fef8a 100644 --- a/samples/FluxFlow.FluentSample/FluxFlow.FluentSample.csproj +++ b/samples/FluxFlow.FluentSample/FluxFlow.FluentSample.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/samples/FluxFlow.HttpTriggerSample/FluxFlow.HttpTriggerSample.csproj b/samples/FluxFlow.HttpTriggerSample/FluxFlow.HttpTriggerSample.csproj index 5fb639ad..3b252551 100644 --- a/samples/FluxFlow.HttpTriggerSample/FluxFlow.HttpTriggerSample.csproj +++ b/samples/FluxFlow.HttpTriggerSample/FluxFlow.HttpTriggerSample.csproj @@ -6,10 +6,10 @@ - - - - + + + + diff --git a/samples/FluxFlow.HttpTriggerSample/GreetingNode.cs b/samples/FluxFlow.HttpTriggerSample/GreetingNode.cs index e7e63a74..a4629f34 100644 --- a/samples/FluxFlow.HttpTriggerSample/GreetingNode.cs +++ b/samples/FluxFlow.HttpTriggerSample/GreetingNode.cs @@ -1,4 +1,5 @@ using FluxFlow.Components.Http.Contracts; +using FluxFlow.Data; using FluxFlow.Nodes; using System.Text; @@ -9,17 +10,18 @@ namespace FluxFlow.HttpTriggerSample; /// inbound request into a reply, carrying the correlation id forward with With(...). /// No engine, no registry: it is just a FlowNode you new up and link. /// -public sealed class GreetingNode : FlowNode +public sealed class GreetingNode : FlowNode { - protected override async Task ProcessAsync(FlowMessage message) + protected override async Task ProcessAsync(FlowMessage message) { - var name = message.Value.Body is { Length: > 0 } - ? Encoding.UTF8.GetString(message.Value.Body) + var request = message.Value!.Deserialize(); + var name = request?.Body is { Length: > 0 } + ? Encoding.UTF8.GetString(request.Body) : "world"; await EmitAsync( - message.With(HttpTriggerReply.Text( - $"Hello, {name.Trim()}! (correlation {message.CorrelationId})")), + message.With(FlowValue.From(HttpTriggerReply.Text( + $"Hello, {name.Trim()}! (correlation {message.CorrelationId})"))), Stopping) .ConfigureAwait(false); } diff --git a/samples/FluxFlow.MqttCompositionSample/FluxFlow.MqttCompositionSample.csproj b/samples/FluxFlow.MqttCompositionSample/FluxFlow.MqttCompositionSample.csproj index 348cbd39..8aa797c9 100644 --- a/samples/FluxFlow.MqttCompositionSample/FluxFlow.MqttCompositionSample.csproj +++ b/samples/FluxFlow.MqttCompositionSample/FluxFlow.MqttCompositionSample.csproj @@ -7,11 +7,11 @@ - - - - - + + + + + diff --git a/samples/FluxFlow.MqttCompositionSample/Program.cs b/samples/FluxFlow.MqttCompositionSample/Program.cs index f7c3bdea..c3f69f4e 100644 --- a/samples/FluxFlow.MqttCompositionSample/Program.cs +++ b/samples/FluxFlow.MqttCompositionSample/Program.cs @@ -195,7 +195,7 @@ internal static class SampleComponents runtime .UseFactory(static context => new MqttPublishSourceNode( context.Services.GetRequiredService().Messages)) - .HasOutput(MqttComponentDefinition.Ports.Output, static node => node.Output) + .HasFlowValueOutput(MqttComponentDefinition.Ports.Output, static node => node.Output) .HasEvents(MqttComponentDefinition.Ports.Events, static node => node.Events); }, static component => new PublishSourceHandle(component)); @@ -203,8 +203,8 @@ internal static class SampleComponents internal sealed class PublishSourceHandle(ComponentHandle definition) : AuthoredComponentHandle(definition) { - public OutputPortHandle Output { get; } = - definition.Output(MqttComponentDefinition.Ports.Output); + public OutputPortHandle Output { get; } = + definition.Output(MqttComponentDefinition.Ports.Output); } internal sealed record SampleMessage(string Topic, string Content); @@ -212,7 +212,7 @@ internal sealed record SampleMessage(string Topic, string Content); internal sealed record PublishSourceMessages(IReadOnlyList Messages); internal sealed class MqttPublishSourceNode(IReadOnlyList messages) - : FlowSource + : FlowSource { protected override async Task RunAsync(CancellationToken cancellationToken) { @@ -220,14 +220,14 @@ protected override async Task RunAsync(CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); await EmitAsync( - FlowMessage.Create(new MqttPublishMessage + FlowMessage.Create(FlowValue.From(new MqttPublishMessage { Topic = message.Topic, Content = FlowContent.FromBytes( System.Text.Encoding.UTF8.GetBytes(message.Content), "text/plain", "utf-8") - }), + })), cancellationToken) .ConfigureAwait(false); } diff --git a/samples/FluxFlow.ReportingSample/ApplicationReportCatalog.cs b/samples/FluxFlow.ReportingSample/ApplicationReportCatalog.cs new file mode 100644 index 00000000..3f2f742c --- /dev/null +++ b/samples/FluxFlow.ReportingSample/ApplicationReportCatalog.cs @@ -0,0 +1,107 @@ +using System.Collections.ObjectModel; + +namespace FluxFlow.ReportingSample; + +public enum ApplicationReportFieldKind { String, Number, Boolean, Timestamp, Object } +public enum ApplicationReportMeasurementKind { None, Sample, Gauge, Delta, Cumulative } + +public sealed record ApplicationReportFieldDescriptor +{ + public required string Path { get; init; } + public required string Description { get; init; } + public ApplicationReportFieldKind Kind { get; init; } + public bool Optional { get; init; } = true; + public string? Unit { get; init; } + public ApplicationReportMeasurementKind Measurement { get; init; } + /// Required for cumulative counters; identifies when the counter restarts. + public string? ResetScope { get; init; } +} + +/// Optional discovery metadata, not validation of every possible dynamic event. +public sealed record ApplicationReportDescriptor +{ + public required string Type { get; init; } + public string Category { get; init; } = "general"; + public int Version { get; init; } = 1; + public required string Description { get; init; } + public IReadOnlyList Fields { get; init; } = []; +} + +public sealed class ApplicationReportCatalog +{ + public ApplicationReportCatalog(IEnumerable? reports = null) + { + var implementations = (reports ?? []).Take(513).ToArray(); + if (implementations.Length > 512) throw new ArgumentException("At most 512 reports are supported."); + Reports = Array.AsReadOnly(implementations); + var keys = new HashSet<(string, int)>(); + var frozen = new List(); + foreach (var report in implementations) + { + ArgumentNullException.ThrowIfNull(report); + var descriptor = report.Descriptor; + ArgumentNullException.ThrowIfNull(descriptor); + ArgumentException.ThrowIfNullOrWhiteSpace(descriptor.Type); + ArgumentException.ThrowIfNullOrWhiteSpace(descriptor.Category); + ArgumentException.ThrowIfNullOrWhiteSpace(descriptor.Description); + if (descriptor.Version <= 0 || !keys.Add((descriptor.Type, descriptor.Version))) + throw new ArgumentException("Descriptor type/version must be positive and unique."); + ArgumentNullException.ThrowIfNull(descriptor.Fields); + if (descriptor.Fields.Count > 64) throw new ArgumentException("At most 64 fields per event are supported."); + var fields = new List(); + var paths = new HashSet(StringComparer.Ordinal); + foreach (var field in descriptor.Fields) + { + ArgumentNullException.ThrowIfNull(field); + ArgumentException.ThrowIfNullOrWhiteSpace(field.Description); + if (!paths.Add(field.Path) || !Enum.IsDefined(field.Kind) || !Enum.IsDefined(field.Measurement)) + throw new ArgumentException("Descriptor field paths must be unique and kinds must be defined."); + new ApplicationReportFilter + { + Conditions = [new ApplicationReportCondition { Path = field.Path, Comparison = ApplicationReportComparison.Exists }] + }.Compile(); + if (field.Measurement != ApplicationReportMeasurementKind.None && field.Kind != ApplicationReportFieldKind.Number) + throw new ArgumentException("Measurements must describe numeric fields."); + if (field.Measurement == ApplicationReportMeasurementKind.Cumulative && string.IsNullOrWhiteSpace(field.ResetScope)) + throw new ArgumentException("Cumulative measurements require a reset scope."); + fields.Add(field with { }); + } + frozen.Add(descriptor with { Fields = new ReadOnlyCollection(fields) }); + } + Descriptors = frozen.OrderBy(d => d.Type, StringComparer.Ordinal).ThenBy(d => d.Version).ToList().AsReadOnly(); + } + + public IReadOnlyList Descriptors { get; } + public IReadOnlyList Reports { get; } + + /// Stable fields shared across descriptors; optional source fields may be absent on runtime-level events. + public IReadOnlyList CommonFields { get; } = Array.AsReadOnly(new[] + { + Field("/type", "Event type"), Field("/kind", "Event kind"), Field("/level", "Event level"), + Field("/timestamp", "Event time", ApplicationReportFieldKind.Timestamp), + Field("@application", "Host application identity"), Field("@revision", "Producing revision"), + Field("@schemaVersion", "Event schema version", ApplicationReportFieldKind.Number), + Field("@phase", "Consumer phase classification"), Field("@source", "Event source"), + Field("@workflow", "Workflow"), Field("@component", "Component"), Field("@traceId", "Trace identity") + }); + + private static ApplicationReportFieldDescriptor Field(string path, string description, + ApplicationReportFieldKind kind = ApplicationReportFieldKind.String) + => new() { Path = path, Description = description, Kind = kind }; + + public IReadOnlyList GetComparisons(ApplicationReportFieldKind kind) + { + if (!Enum.IsDefined(kind)) throw new ArgumentOutOfRangeException(nameof(kind)); + var common = new[] { ApplicationReportComparison.Exists, ApplicationReportComparison.Missing, ApplicationReportComparison.IsNull }; + return Array.AsReadOnly(kind switch + { + ApplicationReportFieldKind.Number => [.. common, ApplicationReportComparison.Equal, ApplicationReportComparison.NotEqual, + ApplicationReportComparison.GreaterThan, ApplicationReportComparison.GreaterThanOrEqual, + ApplicationReportComparison.LessThan, ApplicationReportComparison.LessThanOrEqual], + ApplicationReportFieldKind.String or ApplicationReportFieldKind.Timestamp => [.. common, + ApplicationReportComparison.Equal, ApplicationReportComparison.NotEqual, ApplicationReportComparison.Contains, ApplicationReportComparison.StartsWith], + ApplicationReportFieldKind.Boolean => [.. common, ApplicationReportComparison.Equal, ApplicationReportComparison.NotEqual], + _ => common + }); + } +} diff --git a/samples/FluxFlow.ReportingSample/ApplicationReportContracts.cs b/samples/FluxFlow.ReportingSample/ApplicationReportContracts.cs new file mode 100644 index 00000000..87a3a976 --- /dev/null +++ b/samples/FluxFlow.ReportingSample/ApplicationReportContracts.cs @@ -0,0 +1,27 @@ +using FluxFlow.Nodes; + +namespace FluxFlow.ReportingSample; + +/// A position in one consumer-owned capture, not a workflow revision. +public readonly record struct ApplicationReportCursor(Guid StreamId, long Sequence); + +public enum ApplicationReportPhase { Runtime, Preparing, Active, Draining } + +public static class ApplicationReportHeaders +{ + public const string SchemaVersion = "flow.event.schema_version"; +} + +/// Consumer archive metadata around the unchanged canonical message envelope. +public sealed record ApplicationReportEvent +{ + public required ApplicationReportCursor Cursor { get; init; } + public required DateTimeOffset ObservedAt { get; init; } + public string? Application { get; init; } + public string? RevisionId { get; init; } + /// Event schema version, independent of workflow revision; absent producer headers mean version one. + public int SchemaVersion { get; init; } = 1; + /// Consumer-defined classification; the library does not stamp reporting phases. + public ApplicationReportPhase Phase { get; init; } + public required FlowMessage Message { get; init; } +} diff --git a/samples/FluxFlow.ReportingSample/ApplicationReportFilter.cs b/samples/FluxFlow.ReportingSample/ApplicationReportFilter.cs new file mode 100644 index 00000000..398170d8 --- /dev/null +++ b/samples/FluxFlow.ReportingSample/ApplicationReportFilter.cs @@ -0,0 +1,203 @@ +using System.Text.Json; +using FluxFlow.Nodes; + +namespace FluxFlow.ReportingSample; + +public enum ApplicationReportComparison +{ + Exists, Missing, IsNull, Equal, NotEqual, GreaterThan, GreaterThanOrEqual, + LessThan, LessThanOrEqual, Contains, StartsWith +} + +public sealed record ApplicationReportCondition +{ + /// JSON pointer into event data, or @application, @revision, @schemaVersion, @phase, @source, @workflow, @component, @traceId. + public required string Path { get; init; } + public ApplicationReportComparison Comparison { get; init; } = ApplicationReportComparison.Equal; + public JsonElement? Value { get; init; } +} + +/// Portable, ordinal, type-strict filtering; no executable expressions or authorization policy. +public sealed record ApplicationReportFilter +{ + public DateTimeOffset? FromInclusive { get; init; } + public DateTimeOffset? ToExclusive { get; init; } + public IReadOnlyList Conditions { get; init; } = []; + public IReadOnlyList All { get; init; } = []; + public IReadOnlyList Any { get; init; } = []; + + public CompiledApplicationReportFilter Compile() => new(this); +} + +/// An immutable validated filter snapshot reusable for live and historical records. +public sealed class CompiledApplicationReportFilter +{ + private readonly Node _root; + + internal CompiledApplicationReportFilter(ApplicationReportFilter filter) + { + var budget = 64; + _root = CompileNode(filter, 0, ref budget); + } + + public bool IsMatch(ApplicationReportEvent record) + { + ArgumentNullException.ThrowIfNull(record); + return _root.Match(record, record.Message.Value?.ToJsonElement() ?? default); + } + + private static Node CompileNode(ApplicationReportFilter filter, int depth, ref int budget) + { + ArgumentNullException.ThrowIfNull(filter); + if (depth > 8 || --budget < 0) + throw new ArgumentException("Filters support at most 64 nodes/conditions and eight nested groups."); + if (filter.FromInclusive is { } from && filter.ToExclusive is { } to && from >= to) + throw new ArgumentException("The inclusive start must precede the exclusive end."); + ArgumentNullException.ThrowIfNull(filter.Conditions); + ArgumentNullException.ThrowIfNull(filter.All); + ArgumentNullException.ThrowIfNull(filter.Any); + var conditions = new List(); + foreach (var condition in filter.Conditions) + { + if (--budget < 0) + throw new ArgumentException("Filter condition limit exceeded."); + ArgumentNullException.ThrowIfNull(condition); + ArgumentException.ThrowIfNullOrWhiteSpace(condition.Path); + if (!Enum.IsDefined(condition.Comparison)) + throw new ArgumentException("Unknown filter comparison."); + if (condition.Path.Length > 512) + throw new ArgumentException("Filter path is too long."); + string[] segments; + if (condition.Path.StartsWith('@')) + { + if (condition.Path is not ("@application" or "@revision" or "@phase" or "@source" or + "@workflow" or "@component" or "@traceId" or "@schemaVersion")) + throw new ArgumentException($"Unsupported envelope field '{condition.Path}'."); + segments = []; + } + else + { + if (!condition.Path.StartsWith('/')) + throw new ArgumentException("Data paths must be JSON pointers beginning with '/'."); + segments = condition.Path[1..].Split('/').Select(Unescape).ToArray(); + } + var value = condition.Value?.Clone(); + var unary = condition.Comparison is ApplicationReportComparison.Exists or + ApplicationReportComparison.Missing or ApplicationReportComparison.IsNull; + if (!unary && (value is null || value.Value.ValueKind is not + (JsonValueKind.String or JsonValueKind.Number or JsonValueKind.True or JsonValueKind.False or JsonValueKind.Null))) + throw new ArgumentException("A comparison requires a scalar JSON value."); + if (value?.ValueKind == JsonValueKind.String && value.Value.GetString()!.Length > 2048) + throw new ArgumentException("Filter string is too long."); + if (condition.Comparison is ApplicationReportComparison.Contains or ApplicationReportComparison.StartsWith && + value?.ValueKind != JsonValueKind.String) + throw new ArgumentException("Text comparisons require a string."); + if (condition.Comparison is ApplicationReportComparison.GreaterThan or ApplicationReportComparison.GreaterThanOrEqual or + ApplicationReportComparison.LessThan or ApplicationReportComparison.LessThanOrEqual && + value?.ValueKind != JsonValueKind.Number) + throw new ArgumentException("Ordered comparisons require a number."); + if (value?.ValueKind == JsonValueKind.Number && !value.Value.TryGetDecimal(out _)) + throw new ArgumentException("Numeric filters require a decimal-representable value."); + conditions.Add(new Condition(condition.Path, segments, condition.Comparison, value)); + } + var all = new List(); + foreach (var child in filter.All) all.Add(CompileNode(child, depth + 1, ref budget)); + var any = new List(); + foreach (var child in filter.Any) any.Add(CompileNode(child, depth + 1, ref budget)); + return new Node(filter.FromInclusive, filter.ToExclusive, conditions.ToArray(), all.ToArray(), any.ToArray()); + } + + private static string Unescape(string segment) + { + for (var i = 0; i < segment.Length; i++) + if (segment[i] == '~' && (++i >= segment.Length || segment[i] is not ('0' or '1'))) + throw new ArgumentException("Invalid JSON pointer escape."); + return segment.Replace("~1", "/", StringComparison.Ordinal).Replace("~0", "~", StringComparison.Ordinal); + } + + private sealed record Node(DateTimeOffset? From, DateTimeOffset? To, Condition[] Conditions, Node[] All, Node[] Any) + { + public bool Match(ApplicationReportEvent record, JsonElement data) + => (From is null || record.Message.Timestamp >= From) && + (To is null || record.Message.Timestamp < To) && + Conditions.All(condition => condition.Match(record, data)) && + All.All(child => child.Match(record, data)) && + (Any.Length == 0 || Any.Any(child => child.Match(record, data))); + } + + private sealed record Condition(string Path, string[] Segments, ApplicationReportComparison Comparison, JsonElement? Value) + { + public bool Match(ApplicationReportEvent record, JsonElement data) + { + var actual = data; + if (Path.StartsWith('@')) + { + var text = Path switch + { + "@application" => record.Application, + "@revision" => record.RevisionId, + "@phase" => record.Phase.ToString(), + "@traceId" => record.Message.TraceId.Value, + "@source" => Header(FlowEventHeaders.Source), + "@workflow" => Header(FlowEventHeaders.Workflow), + "@component" => Header(FlowEventHeaders.Component), + _ => null + }; + actual = Path == "@schemaVersion" ? JsonSerializer.SerializeToElement(record.SchemaVersion) + : text is null ? default : JsonSerializer.SerializeToElement(text); + } + else + { + foreach (var segment in Segments) + { + if (actual.ValueKind == JsonValueKind.Object && actual.TryGetProperty(segment, out var property)) + actual = property; + else if (actual.ValueKind == JsonValueKind.Array && + (segment == "0" || segment.Length > 0 && segment[0] is >= '1' and <= '9') && + int.TryParse(segment, System.Globalization.NumberStyles.None, System.Globalization.CultureInfo.InvariantCulture, out var index) && + index < actual.GetArrayLength()) + actual = actual[index]; + else { actual = default; break; } + } + } + if (Comparison == ApplicationReportComparison.Exists) return actual.ValueKind != JsonValueKind.Undefined; + if (Comparison == ApplicationReportComparison.Missing) return actual.ValueKind == JsonValueKind.Undefined; + if (Comparison == ApplicationReportComparison.IsNull) return actual.ValueKind == JsonValueKind.Null; + if (actual.ValueKind == JsonValueKind.Undefined) return false; + var expected = Value!.Value; + int comparison; + if (actual.ValueKind == JsonValueKind.Number && expected.ValueKind == JsonValueKind.Number) + { + if (!actual.TryGetDecimal(out var left) || !expected.TryGetDecimal(out var right)) return false; + comparison = left.CompareTo(right); + } + else if (actual.ValueKind == JsonValueKind.String && expected.ValueKind == JsonValueKind.String) + { + var left = actual.GetString()!; + var right = expected.GetString()!; + if (Comparison == ApplicationReportComparison.Contains) return left.Contains(right, StringComparison.Ordinal); + if (Comparison == ApplicationReportComparison.StartsWith) return left.StartsWith(right, StringComparison.Ordinal); + comparison = string.CompareOrdinal(left, right); + } + else if (actual.ValueKind is JsonValueKind.True or JsonValueKind.False && + expected.ValueKind is JsonValueKind.True or JsonValueKind.False) + comparison = actual.GetBoolean().CompareTo(expected.GetBoolean()); + else if (actual.ValueKind == JsonValueKind.Null && expected.ValueKind == JsonValueKind.Null) + comparison = 0; + else return false; + + return Comparison switch + { + ApplicationReportComparison.Equal => comparison == 0, + ApplicationReportComparison.NotEqual => comparison != 0, + ApplicationReportComparison.GreaterThan => comparison > 0, + ApplicationReportComparison.GreaterThanOrEqual => comparison >= 0, + ApplicationReportComparison.LessThan => comparison < 0, + ApplicationReportComparison.LessThanOrEqual => comparison <= 0, + _ => false + }; + + string? Header(string name) => record.Message.Headers.GetValueOrDefault(name); + } + } +} diff --git a/samples/FluxFlow.ReportingSample/ApplicationReportServiceCollectionExtensions.cs b/samples/FluxFlow.ReportingSample/ApplicationReportServiceCollectionExtensions.cs new file mode 100644 index 00000000..f59e7942 --- /dev/null +++ b/samples/FluxFlow.ReportingSample/ApplicationReportServiceCollectionExtensions.cs @@ -0,0 +1,17 @@ +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; + +namespace FluxFlow.ReportingSample; + +public static class ApplicationReportServiceCollectionExtensions +{ + /// Registers one singleton shared by concrete injection and IEnumerable<IApplicationReport>. + public static IServiceCollection AddApplicationReport(this IServiceCollection services) + where TReport : class, IApplicationReport + { + ArgumentNullException.ThrowIfNull(services); + services.TryAddSingleton(); + services.AddSingleton(provider => provider.GetRequiredService()); + return services; + } +} diff --git a/tests/FluxFlow.Testing/FluxFlow.Testing.csproj b/samples/FluxFlow.ReportingSample/FluxFlow.ReportingSample.csproj similarity index 54% rename from tests/FluxFlow.Testing/FluxFlow.Testing.csproj rename to samples/FluxFlow.ReportingSample/FluxFlow.ReportingSample.csproj index c2b976e4..38b5a276 100644 --- a/tests/FluxFlow.Testing/FluxFlow.Testing.csproj +++ b/samples/FluxFlow.ReportingSample/FluxFlow.ReportingSample.csproj @@ -1,17 +1,11 @@ - + Exe net10.0 false - - - - - - + - diff --git a/samples/FluxFlow.ReportingSample/IApplicationReport.cs b/samples/FluxFlow.ReportingSample/IApplicationReport.cs new file mode 100644 index 00000000..56b87251 --- /dev/null +++ b/samples/FluxFlow.ReportingSample/IApplicationReport.cs @@ -0,0 +1,12 @@ +namespace FluxFlow.ReportingSample; + +/// +/// A report definition owns its discovery metadata and event selection. +/// Register implementations in DI; pass Includes to a standard Dataflow LinkTo predicate. +/// Implementations must be thread-safe and must not perform I/O in Includes. +/// +public interface IApplicationReport +{ + ApplicationReportDescriptor Descriptor { get; } + bool Includes(ApplicationReportEvent record); +} diff --git a/samples/FluxFlow.ReportingSample/IReportArchive.cs b/samples/FluxFlow.ReportingSample/IReportArchive.cs new file mode 100644 index 00000000..79da6d23 --- /dev/null +++ b/samples/FluxFlow.ReportingSample/IReportArchive.cs @@ -0,0 +1,8 @@ +namespace FluxFlow.ReportingSample; + +/// The read boundary needed by reports; persistence and capture are separate responsibilities. +public interface IReportArchive +{ + Task QueryAsync(Guid captureId, IApplicationReport report, ApplicationReportFilter filter, + string filterVersion, CancellationToken cancellationToken = default); +} diff --git a/samples/FluxFlow.ReportingSample/Program.cs b/samples/FluxFlow.ReportingSample/Program.cs new file mode 100644 index 00000000..2739c612 --- /dev/null +++ b/samples/FluxFlow.ReportingSample/Program.cs @@ -0,0 +1,108 @@ +using System.Text.Json; +using System.Threading.Tasks.Dataflow; +using FluxFlow.Composition.Model; +using FluxFlow.Engine; +using FluxFlow.ReportingSample; +using FluxFlow.Nodes; +using Microsoft.Extensions.DependencyInjection; + +// Reports, persistence and presentation are consumer-owned services. +var directory = args.Length == 0 + ? Path.Combine(Path.GetTempPath(), "workflow-reports", Guid.NewGuid().ToString("N")) + : Path.GetFullPath(args[0]); +var services = new ServiceCollection(); +services.AddSingleton(new ReportArchive(directory)); +services.AddSingleton(provider => provider.GetRequiredService()); +services.AddApplicationReport(); +var nodes = new List(); +var registration = services.AddFluxFlow(Definition(expanded: false), options => +{ + options.StartWithHost = false; + options.Events = new() { Application = "reporting-example", Capacity = 256 }; +}); +registration.Advanced.AddDynamicComponent("sample.measure", component => component + .UseFactory(_ => { var node = new SampleMetricNode(); nodes.Add(node); return node; }) + .HasOutput("Output", node => node.Output).HasEvents("Events", node => node.Events)); +await using var provider = services.BuildServiceProvider(); +var application = provider.GetRequiredService(); +var archive = provider.GetRequiredService(); +var quantityReport = provider.GetRequiredService(); +var definitions = provider.GetServices().Where(report => report.Descriptor.Category == "measurements"); +Console.WriteLine($"Discovered: {string.Join(", ", definitions.Select(report => report.Descriptor.Type))}"); +using var timeout = new CancellationTokenSource(TimeSpan.FromSeconds(15)); +var filter = new ApplicationReportFilter +{ + Conditions = [new ApplicationReportCondition + { + Path = "/measurements/value", Comparison = ApplicationReportComparison.GreaterThanOrEqual, + Value = JsonSerializer.SerializeToElement(15) + }] +}; +var streamId = Guid.NewGuid(); +long sequence = 0; +var sampleAcknowledgements = new BufferBlock(); +var captureBlock = new ActionBlock(async message => +{ + // This cursor orders observations received by this consumer, not every runtime emission. + var record = new ApplicationReportEvent + { + Cursor = new(streamId, ++sequence), ObservedAt = DateTimeOffset.UtcNow, Message = message, + Application = message.Headers.GetValueOrDefault(FlowEventHeaders.Application), + RevisionId = message.Headers.GetValueOrDefault(FlowEventHeaders.Revision) + }; + await archive.AppendAsync(record, timeout.Token); + if (quantityReport.Includes(record)) sampleAcknowledgements.Post(true); +}, new ExecutionDataflowBlockOptions { BoundedCapacity = 256, CancellationToken = timeout.Token }); +var displayBlock = new ActionBlock( + message => Console.WriteLine($"Selected live: {message.MessageId}"), + new ExecutionDataflowBlockOptions { BoundedCapacity = 256, CancellationToken = timeout.Token }); +var start = new ApplicationReportCursor(streamId, 0); +using var captureLink = application.Events.LinkTo(captureBlock, new DataflowLinkOptions()); +using var displayLink = application.Events.LinkTo(displayBlock, new DataflowLinkOptions(), + message => message.Headers.GetValueOrDefault(FlowEventHeaders.Type) == "sample.measurement" && + message.ToFlowEvent().Measurements.GetValueOrDefault("value") >= 15); +Console.WriteLine($"Initial state: {application.State}"); +await application.StartAsync(timeout.Token); +nodes[0].Measure(10); +await sampleAcknowledgements.ReceiveAsync(timeout.Token); +nodes[0].Measure(20); +await sampleAcknowledgements.ReceiveAsync(timeout.Token); +await application.ApplyAsync("revision-2", Definition(expanded: true), timeout.Token); +nodes[^1].Measure(30); +await sampleAcknowledgements.ReceiveAsync(timeout.Token); + +// Freeze the consumer's observations. There is no runtime replay or completeness guarantee. +captureLink.Dispose(); +displayLink.Dispose(); +captureBlock.Complete(); +displayBlock.Complete(); +await Task.WhenAll(captureBlock.Completion, displayBlock.Completion).WaitAsync(timeout.Token); +var capture = new ReportCapture +{ + Id = Guid.NewGuid(), Start = start, End = new(streamId, sequence), + Dropped = 0, RejectedEvents = 0, SourceCompletenessKnown = false +}; +await archive.SaveCaptureAsync(capture, timeout.Token); + +// Reopen history through the same concrete report, selected and injected through DI. +var reopenedReport = new QuantityReport(new ReportArchive(directory)); +var result = await reopenedReport.GenerateAsync(capture.Id, filter, timeout.Token); +Console.WriteLine(JsonSerializer.Serialize(result, new JsonSerializerOptions { WriteIndented = true })); +Console.WriteLine($"Archive retained at: {directory}"); + +static ApplicationDefinition Definition(bool expanded) => ApplicationDefinitionJson.Deserialize(expanded + ? """{"Resources":{},"Workflows":{"Main":{"Source":{"Type":"sample.measure"},"Extra":{"Type":"sample.measure"}}}}""" + : """{"Resources":{},"Workflows":{"Main":{"Source":{"Type":"sample.measure"}}}}"""); + +sealed class SampleMetricNode : FlowNode +{ + public void Measure(double value) + { + if (!EmitEvent(new FlowEvent + { + Name = "sample.measurement", Kind = FlowEventKind.Domain, + Measurements = new Dictionary { ["value"] = value } + }.ToMessage())) throw new InvalidOperationException("Sample event was not accepted."); + } + protected override Task ProcessAsync(FlowMessage message) => Task.CompletedTask; +} diff --git a/samples/FluxFlow.ReportingSample/QuantityReport.cs b/samples/FluxFlow.ReportingSample/QuantityReport.cs new file mode 100644 index 00000000..879258a1 --- /dev/null +++ b/samples/FluxFlow.ReportingSample/QuantityReport.cs @@ -0,0 +1,27 @@ +using FluxFlow.Nodes; + +namespace FluxFlow.ReportingSample; + +/// A report added through its own implementation and DI registration only. +public sealed class QuantityReport(IReportArchive archive) : IApplicationReport +{ + public ApplicationReportDescriptor Descriptor { get; } = new() + { + Type = "sample.measurement", Category = "measurements", Description = "Observed sample quantity", + Fields = Array.AsReadOnly(new[] + { + new ApplicationReportFieldDescriptor + { + Path = "/measurements/value", Description = "Quantity", Kind = ApplicationReportFieldKind.Number, + Unit = "items", Measurement = ApplicationReportMeasurementKind.Sample + } + }) + }; + + public bool Includes(ApplicationReportEvent record) + => record.SchemaVersion == Descriptor.Version && + record.Message.Headers.GetValueOrDefault(FlowEventHeaders.Type) == Descriptor.Type; + + public Task GenerateAsync(Guid captureId, ApplicationReportFilter filter, CancellationToken token = default) + => archive.QueryAsync(captureId, this, filter, "quantity.v1", token); +} diff --git a/samples/FluxFlow.ReportingSample/README.md b/samples/FluxFlow.ReportingSample/README.md new file mode 100644 index 00000000..ffd466a2 --- /dev/null +++ b/samples/FluxFlow.ReportingSample/README.md @@ -0,0 +1,23 @@ +# Consumer-owned reporting example + +This non-packaged sample builds reports on FluxFlowApplication.Events without making reports part of the runtime library. + +It demonstrates native Dataflow filtering, measurements across two workflow revisions, DI-selected report implementations, portable saved filters, idempotent file persistence and frozen historical queries. QuantityReport depends on the narrow IReportArchive read contract, not the concrete file archive. Add a report implementation and register it through DI; Engine needs no changes. + +Run: + +```shell +dotnet run --project samples/FluxFlow.ReportingSample/FluxFlow.ReportingSample.csproj +``` + +An optional directory argument retains the archive at a chosen location. Otherwise a fresh temporary directory is used and its path printed. Existing records are never overwritten. + +The example emits quantities 10, 20 and 30, reopens the archive and applies a saved quantity >= 15 filter. Expected report count: 2. It waits for each measurement's capture acknowledgement to make the demonstration deterministic; that is not a production delivery guarantee. + +## Ownership and completeness + +ApplicationReportEvent, its cursor, report descriptors/catalog, portable filter language and IApplicationReport belong to this consumer sample. They are not Engine contracts. The archive wrapper stores consumer capture metadata around the unchanged FlowMessage. + +A capture sequence counts received observations, not all runtime emissions. SourceCompletenessKnown remains false for live broadcast. The report is therefore marked Incomplete even when every received record is stored. An archive cannot recover events it never received. + +The archive is single-process and file-per-record, with a one-MiB record limit and bounded query grouping. It is a demonstration, not a high-volume storage recommendation. Storage selection, retention, schema evolution, authentication and dashboard design are consumer decisions. diff --git a/samples/FluxFlow.ReportingSample/ReportArchive.cs b/samples/FluxFlow.ReportingSample/ReportArchive.cs new file mode 100644 index 00000000..1061867e --- /dev/null +++ b/samples/FluxFlow.ReportingSample/ReportArchive.cs @@ -0,0 +1,188 @@ +using System.Globalization; +using System.Text.Json; + +namespace FluxFlow.ReportingSample; + +/// +/// Consumer-owned, single-process sample archive. Atomic per-event files make replay idempotent. +/// This is not a recommended storage engine for high-volume production deployments. +/// +public sealed class ReportArchive : IReportArchive +{ + private const int MaximumRecordBytes = 1024 * 1024; + private readonly string _directory; + + public ReportArchive(string directory) + { + ArgumentException.ThrowIfNullOrWhiteSpace(directory); + _directory = Path.GetFullPath(directory); + Directory.CreateDirectory(_directory); + } + + public async Task AppendAsync(ApplicationReportEvent record, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(record); + if (record.Cursor.StreamId == Guid.Empty || record.Cursor.Sequence <= 0) + throw new ArgumentException("An archived event requires a valid positive cursor."); + var directory = StreamDirectory(record.Cursor.StreamId); + Directory.CreateDirectory(directory); + var path = Path.Combine(directory, record.Cursor.Sequence.ToString("D20", CultureInfo.InvariantCulture) + ".json"); + var bytes = JsonSerializer.SerializeToUtf8Bytes(record); + if (bytes.Length > MaximumRecordBytes) throw new ArgumentException("Sample archive record exceeds one MiB."); + if (File.Exists(path)) return await CheckDuplicateAsync(path, bytes, cancellationToken); + var temporary = Path.Combine(directory, Guid.NewGuid().ToString("N") + ".pending"); + try + { + await using (var stream = new FileStream(temporary, FileMode.CreateNew, FileAccess.Write, FileShare.None)) + { + await stream.WriteAsync(bytes, cancellationToken); + stream.Flush(flushToDisk: true); + } + cancellationToken.ThrowIfCancellationRequested(); + try { File.Move(temporary, path); } + catch (IOException) when (File.Exists(path)) { return await CheckDuplicateAsync(path, bytes, cancellationToken); } + return true; + } + finally { if (File.Exists(temporary)) File.Delete(temporary); } + } + + /// Written only after all received events have been durably acknowledged by AppendAsync. + public async Task SaveCaptureAsync(ReportCapture capture, CancellationToken cancellationToken = default) + { + Validate(capture); + var path = Path.Combine(_directory, capture.Id.ToString("N") + ".capture.json"); + var temporary = path + "." + Guid.NewGuid().ToString("N") + ".pending"; + try + { + var bytes = JsonSerializer.SerializeToUtf8Bytes(capture); + await using (var stream = new FileStream(temporary, FileMode.CreateNew, FileAccess.Write, FileShare.None)) + { + await stream.WriteAsync(bytes, cancellationToken); + stream.Flush(flushToDisk: true); + } + // Captures are immutable. A changed cutoff or loss status is a new capture. + File.Move(temporary, path); + } + finally { if (File.Exists(temporary)) File.Delete(temporary); } + } + + public async Task ReadCaptureAsync(Guid id, CancellationToken cancellationToken = default) + { + var bytes = await ReadBoundedAsync(Path.Combine(_directory, id.ToString("N") + ".capture.json"), cancellationToken); + var capture = JsonSerializer.Deserialize(bytes) ?? throw new InvalidDataException("Missing capture metadata."); + Validate(capture); + if (capture.Id != id) throw new InvalidDataException("Capture identity does not match the requested file."); + return capture; + } + + /// + /// Streams a frozen sequence interval; late arrivals beyond the cutoff cannot change this report. + /// Event-time filtering uses [FromInclusive, ToExclusive). The capture is unfiltered; reports can be re-filtered. + /// + public Task QueryAsync(Guid captureId, ApplicationReportFilter filter, + string filterVersion, CancellationToken cancellationToken = default) + => QueryCoreAsync(captureId, null, filter, filterVersion, cancellationToken); + + public Task QueryAsync(Guid captureId, IApplicationReport report, ApplicationReportFilter filter, + string filterVersion, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(report); + return QueryCoreAsync(captureId, report, filter, filterVersion, cancellationToken); + } + + private async Task QueryCoreAsync(Guid captureId, IApplicationReport? report, + ApplicationReportFilter filter, string filterVersion, CancellationToken cancellationToken) + { + ArgumentException.ThrowIfNullOrWhiteSpace(filterVersion); + var compiled = filter.Compile(); + // Freeze the portable definition too; caller mutations cannot change report provenance. + var serializedFilter = JsonSerializer.Serialize(filter); + var capture = await ReadCaptureAsync(captureId, cancellationToken); + var groups = new SortedDictionary(StringComparer.Ordinal); + long scanned = 0, matched = 0; + var directory = StreamDirectory(capture.Start.StreamId); + if (Directory.Exists(directory)) + { + foreach (var path in Directory.EnumerateFiles(directory, "*.json")) + { + cancellationToken.ThrowIfCancellationRequested(); + if (!long.TryParse(Path.GetFileNameWithoutExtension(path), NumberStyles.None, CultureInfo.InvariantCulture, out var sequence) || + sequence <= capture.Start.Sequence || sequence > capture.End.Sequence) continue; + var record = JsonSerializer.Deserialize(await ReadBoundedAsync(path, cancellationToken)) + ?? throw new InvalidDataException("Missing archived event."); + if (record.Cursor.StreamId != capture.Start.StreamId || record.Cursor.Sequence != sequence) + throw new InvalidDataException("Record identity does not match its archive location."); + scanned++; + if (report is not null && !report.Includes(record) || !compiled.IsMatch(record)) continue; + var type = record.Message.Headers.GetValueOrDefault("flow.event.type") ?? "unknown"; + if (!groups.ContainsKey(type) && groups.Count >= 256) + throw new InvalidOperationException("Report group limit exceeded; narrow the filter."); + groups[type] = groups.GetValueOrDefault(type) + 1; + matched++; + } + } + var complete = capture.SourceCompletenessKnown && capture.Dropped == 0 && capture.RejectedEvents == 0 && + scanned == capture.End.Sequence - capture.Start.Sequence; + return new HistoricalReport + { + Capture = capture, GeneratedAt = DateTimeOffset.UtcNow, FilterVersion = filterVersion, + FilterJson = serializedFilter, Count = matched, CountsByEventType = groups, + Completeness = complete ? "CompleteWithinReportingBoundary" : "Incomplete", + AggregationVersion = "event-count.v1", + ReportType = report?.Descriptor.Type, ReportCategory = report?.Descriptor.Category, + ReportVersion = report?.Descriptor.Version + }; + } + + private string StreamDirectory(Guid streamId) => Path.Combine(_directory, streamId.ToString("N")); + + private static void Validate(ReportCapture capture) + { + ArgumentNullException.ThrowIfNull(capture); + if (capture.Id == Guid.Empty || capture.Start.StreamId == Guid.Empty || capture.Start.StreamId != capture.End.StreamId || + capture.Start.Sequence < 0 || capture.End.Sequence < capture.Start.Sequence || capture.Dropped < 0 || capture.RejectedEvents < 0) + throw new ArgumentException("Invalid capture scope or loss counts."); + } + + private static async Task CheckDuplicateAsync(string path, byte[] bytes, CancellationToken token) + { + if (!(await ReadBoundedAsync(path, token)).AsSpan().SequenceEqual(bytes)) + throw new InvalidDataException("The same report cursor was supplied with different content."); + return false; + } + + private static async Task ReadBoundedAsync(string path, CancellationToken token) + { + await using var stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read); + if (stream.Length > MaximumRecordBytes) throw new InvalidDataException("Archive record exceeds the size limit."); + var bytes = new byte[checked((int)stream.Length)]; + await stream.ReadExactlyAsync(bytes, token); + return bytes; + } +} + +public sealed record ReportCapture +{ + /// False for live observational sources: local contiguous storage cannot prove upstream completeness. + public bool SourceCompletenessKnown { get; init; } + public required Guid Id { get; init; } + public required ApplicationReportCursor Start { get; init; } + public required ApplicationReportCursor End { get; init; } + public required long Dropped { get; init; } + public required long RejectedEvents { get; init; } +} + +public sealed record HistoricalReport +{ + public string? ReportType { get; init; } + public string? ReportCategory { get; init; } + public int? ReportVersion { get; init; } + public required ReportCapture Capture { get; init; } + public required DateTimeOffset GeneratedAt { get; init; } + public required string FilterVersion { get; init; } + public required string FilterJson { get; init; } + public required string AggregationVersion { get; init; } + public required string Completeness { get; init; } + public required long Count { get; init; } + public required IReadOnlyDictionary CountsByEventType { get; init; } +} diff --git a/samples/FluxFlow.SampleApp/FluxFlow.SampleApp.csproj b/samples/FluxFlow.SampleApp/FluxFlow.SampleApp.csproj index e8340f75..2a320f35 100644 --- a/samples/FluxFlow.SampleApp/FluxFlow.SampleApp.csproj +++ b/samples/FluxFlow.SampleApp/FluxFlow.SampleApp.csproj @@ -7,9 +7,9 @@ - - - + + + diff --git a/samples/FluxFlow.SampleApp/OrderNodes.cs b/samples/FluxFlow.SampleApp/OrderNodes.cs index 3cce6440..ae66ae93 100644 --- a/samples/FluxFlow.SampleApp/OrderNodes.cs +++ b/samples/FluxFlow.SampleApp/OrderNodes.cs @@ -1,4 +1,5 @@ using FluxFlow.Composition; +using FluxFlow.Data; using FluxFlow.Nodes; namespace FluxFlow.SampleApp; @@ -13,7 +14,7 @@ internal sealed record OrderSinkOptions public string Category { get; init; } = "default"; } -internal sealed class OrderSourceNode(IReadOnlyList orders) : FlowSource( +internal sealed class OrderSourceNode(IReadOnlyList orders) : FlowSource( new FlowSourceOptions { OutputCapacity = 8 }) { public static OrderSourceNode Create(ComponentActivationContext context) @@ -27,13 +28,13 @@ protected override async Task RunAsync(CancellationToken cancellationToken) foreach (var order in orders) { cancellationToken.ThrowIfCancellationRequested(); - await EmitAsync(FlowMessage.Create(order), cancellationToken) + await EmitAsync(FlowMessage.Create(FlowValue.From(order)), cancellationToken) .ConfigureAwait(false); } } } -internal sealed class OrderReviewNode : FlowNode +internal sealed class OrderReviewNode : FlowNode { private OrderReviewNode() : base(new FlowNodeOptions { InputCapacity = 8 }) @@ -43,31 +44,33 @@ private OrderReviewNode() public static OrderReviewNode Create(ComponentActivationContext context) => new(); - protected override async Task ProcessAsync(FlowMessage message) + protected override async Task ProcessAsync(FlowMessage message) { + var order = message.Value!.Deserialize() + ?? throw new InvalidOperationException("A sample order is required."); var reviewed = new ReviewedOrder( - message.Value.Id, - message.Value.Customer, - message.Value.Total, - Priority: message.Value.Total >= 100m); + order.Id, + order.Customer, + order.Total, + Priority: order.Total >= 100m); - await EmitAsync(message.With(reviewed), Stopping).ConfigureAwait(false); + await EmitAsync(message.With(FlowValue.From(reviewed)), Stopping).ConfigureAwait(false); EmitEvent(new FlowEvent { Timestamp = DateTimeOffset.UtcNow, CorrelationId = message.CorrelationId, Name = "sample.order.reviewed", - Message = $"Reviewed order {message.Value.Id}.", + Message = $"Reviewed order {order.Id}.", Attributes = new Dictionary { - ["orderId"] = message.Value.Id, + ["orderId"] = order.Id, ["priority"] = reviewed.Priority } }); } } -internal sealed class OrderSinkNode : FlowNode +internal sealed class OrderSinkNode : FlowNode { private readonly string _category; private readonly InMemoryOrderStore _store; @@ -87,27 +90,29 @@ public static OrderSinkNode Create( return new OrderSinkNode(options.Category, store); } - protected override Task ProcessAsync(FlowMessage message) + protected override Task ProcessAsync(FlowMessage message) { - _store.Add(_category, message.Value); + var reviewed = message.Value!.Deserialize() + ?? throw new InvalidOperationException("A reviewed order is required."); + _store.Add(_category, reviewed); EmitEvent(new FlowEvent { Timestamp = DateTimeOffset.UtcNow, CorrelationId = message.CorrelationId, Name = "sample.order.stored", - Message = $"Stored order {message.Value.Id}.", + Message = $"Stored order {reviewed.Id}.", Attributes = new Dictionary { - ["orderId"] = message.Value.Id, + ["orderId"] = reviewed.Id, ["category"] = _category, - ["customer"] = message.Value.Customer + ["customer"] = reviewed.Customer } }); return Task.CompletedTask; } } -internal sealed class EventCollectorNode : FlowNode +internal sealed class EventCollectorNode : FlowNode { private readonly InMemoryComponentEventCollector _collector; @@ -122,18 +127,18 @@ public static EventCollectorNode Create( InMemoryComponentEventCollector collector) => new(collector); - protected override Task ProcessAsync(FlowMessage message) + protected override Task ProcessAsync(FlowMessage message) { - _collector.Add(message.Value); + _collector.Add(message.Value ?? global::FluxFlow.Data.FlowValue.Null); return Task.CompletedTask; } } internal sealed class InMemoryComponentEventCollector { - private readonly List _events = []; + private readonly List _events = []; - public IReadOnlyList GetSnapshot() + public IReadOnlyList GetSnapshot() { lock (_events) { @@ -141,7 +146,7 @@ public IReadOnlyList GetSnapshot() } } - public void Add(ComponentEvent value) + public void Add(global::FluxFlow.Data.FlowValue value) { lock (_events) { diff --git a/samples/FluxFlow.SampleApp/Program.cs b/samples/FluxFlow.SampleApp/Program.cs index 1e6024aa..d36bd64a 100644 --- a/samples/FluxFlow.SampleApp/Program.cs +++ b/samples/FluxFlow.SampleApp/Program.cs @@ -52,6 +52,15 @@ static async Task WaitForResultsAsync( TimeSpan timeout) { using var cancellation = new CancellationTokenSource(timeout); - while (store.GetSnapshot().Count < 3 || events.GetSnapshot().Count < 6) - await Task.Delay(TimeSpan.FromMilliseconds(10), cancellation.Token); + try + { + while (store.GetSnapshot().Count < 3 || events.GetSnapshot().Count < 6) + await Task.Delay(TimeSpan.FromMilliseconds(10), cancellation.Token); + } + catch (OperationCanceledException) when (cancellation.IsCancellationRequested) + { + throw new TimeoutException( + $"Sample timed out with {store.GetSnapshot().Count} stored orders and " + + $"{events.GetSnapshot().Count} observed component events."); + } } diff --git a/samples/FluxFlow.SampleApp/SampleComponentRegistration.cs b/samples/FluxFlow.SampleApp/SampleComponentRegistration.cs index f5e2f617..51038800 100644 --- a/samples/FluxFlow.SampleApp/SampleComponentRegistration.cs +++ b/samples/FluxFlow.SampleApp/SampleComponentRegistration.cs @@ -1,5 +1,6 @@ using FluxFlow.Composition; using FluxFlow.Composition.Authoring; +using FluxFlow.Data; using FluxFlow.Nodes; using Microsoft.Extensions.DependencyInjection; @@ -35,7 +36,7 @@ internal static class SampleComponents { runtime .UseFactory(OrderSourceNode.Create) - .HasOutput(SampleComponentPorts.Output, static node => node.Output) + .HasFlowValueOutput(SampleComponentPorts.Output, static node => node.Output) .HasEvents(SampleComponentPorts.Events, static node => node.Events); }, static () => new OrderSourceComponentBuilder(), @@ -49,8 +50,8 @@ internal static class SampleComponents { runtime .UseFactory(OrderReviewNode.Create) - .HasInput(SampleComponentPorts.Input, static node => node.Input) - .HasOutput(SampleComponentPorts.Output, static node => node.Output) + .HasFlowValueInput(SampleComponentPorts.Input, static node => node.Input) + .HasFlowValueOutput(SampleComponentPorts.Output, static node => node.Output) .HasEvents(SampleComponentPorts.Events, static node => node.Events); }, static component => new OrderReviewHandle(component)); @@ -64,7 +65,7 @@ internal static class SampleComponents .UseFactory(static context => OrderSinkNode.Create( context, context.Services.GetRequiredService())) - .HasInput(SampleComponentPorts.Input, static node => node.Input) + .HasFlowValueInput(SampleComponentPorts.Input, static node => node.Input) .HasEvents(SampleComponentPorts.Events, static node => node.Events); }, static () => new OrderSinkComponentBuilder(), @@ -80,7 +81,7 @@ internal static class SampleComponents .UseFactory(static context => EventCollectorNode.Create( context, context.Services.GetRequiredService())) - .HasInput(SampleComponentPorts.Input, static node => node.Input) + .HasFlowValueInput(SampleComponentPorts.Input, static node => node.Input) .HasEvents(SampleComponentPorts.Events, static node => node.Events); }, static component => new EventCollectorHandle(component)); @@ -104,25 +105,25 @@ internal void Apply(ComponentDefinitionBuilder definition) internal sealed class OrderSourceHandle(ComponentHandle definition) : AuthoredComponentHandle(definition) { - public OutputPortHandle Output { get; } = definition.Output(SampleComponentPorts.Output); - public OutputPortHandle Events { get; } = definition.Output(SampleComponentPorts.Events); + public OutputPortHandle Output { get; } = definition.Output(SampleComponentPorts.Output); + public OutputPortHandle Events { get; } = definition.Output(SampleComponentPorts.Events); } internal sealed class OrderReviewHandle(ComponentHandle definition) : AuthoredComponentHandle(definition) { - public InputPortHandle Input { get; } = definition.Input(SampleComponentPorts.Input); - public OutputPortHandle Output { get; } = definition.Output(SampleComponentPorts.Output); - public OutputPortHandle Events { get; } = definition.Output(SampleComponentPorts.Events); + public InputPortHandle Input { get; } = definition.Input(SampleComponentPorts.Input); + public OutputPortHandle Output { get; } = definition.Output(SampleComponentPorts.Output); + public OutputPortHandle Events { get; } = definition.Output(SampleComponentPorts.Events); } internal sealed class OrderSinkHandle(ComponentHandle definition) : AuthoredComponentHandle(definition) { - public InputPortHandle Input { get; } = definition.Input(SampleComponentPorts.Input); - public OutputPortHandle Events { get; } = definition.Output(SampleComponentPorts.Events); + public InputPortHandle Input { get; } = definition.Input(SampleComponentPorts.Input); + public OutputPortHandle Events { get; } = definition.Output(SampleComponentPorts.Events); } internal sealed class EventCollectorHandle(ComponentHandle definition) : AuthoredComponentHandle(definition) { - public InputPortHandle Input { get; } = definition.Input(SampleComponentPorts.Input); - public OutputPortHandle Events { get; } = definition.Output(SampleComponentPorts.Events); + public InputPortHandle Input { get; } = definition.Input(SampleComponentPorts.Input); + public OutputPortHandle Events { get; } = definition.Output(SampleComponentPorts.Events); } diff --git a/samples/FluxFlow.SampleApp/SampleWorkspaceDefinition.cs b/samples/FluxFlow.SampleApp/SampleWorkspaceDefinition.cs index cda72129..54925368 100644 --- a/samples/FluxFlow.SampleApp/SampleWorkspaceDefinition.cs +++ b/samples/FluxFlow.SampleApp/SampleWorkspaceDefinition.cs @@ -49,8 +49,10 @@ public static SampleWorkspaceDefinition CreateDefault() source.Output.ConnectTo(review.Input); review.Output - .ConnectTo(priority.Input, when: static order => order.Priority) - .ConnectTo(standard.Input, when: static order => !order.Priority); + .ConnectTo(priority.Input, when: static value => + value.Deserialize()!.Priority) + .ConnectTo(standard.Input, when: static value => + !value.Deserialize()!.Priority); review.Events.ConnectTo(events.Input); priority.Events.ConnectTo(events.Input); standard.Events.ConnectTo(events.Input); diff --git a/src/Adapters/Expressions/FluxFlow.Expressions.Jsonata/FluxFlow.Expressions.Jsonata.csproj b/src/Adapters/Expressions/FluxFlow.Expressions.Jsonata/FluxFlow.Expressions.Jsonata.csproj new file mode 100644 index 00000000..8eb85d76 --- /dev/null +++ b/src/Adapters/Expressions/FluxFlow.Expressions.Jsonata/FluxFlow.Expressions.Jsonata.csproj @@ -0,0 +1,28 @@ + + + + net8.0;net10.0 + FluxFlow.Expressions.Jsonata + FluxFlow.Expressions.Jsonata + FluxFlow.Expressions.Jsonata + 1.0.0 + Optional JSONata expression-engine adapter for FluxFlow mapping components. + workflow;dataflow;mapping;expressions;jsonata + README.md + Introduces the optional JSONata adapter for the engine-free FluxFlow.Mapping contract. + true + + + + + + + + + + + + + + + diff --git a/src/Adapters/Expressions/FluxFlow.Expressions.Jsonata/JsonataFlowExpressionEngine.cs b/src/Adapters/Expressions/FluxFlow.Expressions.Jsonata/JsonataFlowExpressionEngine.cs new file mode 100644 index 00000000..eeb7b6ab --- /dev/null +++ b/src/Adapters/Expressions/FluxFlow.Expressions.Jsonata/JsonataFlowExpressionEngine.cs @@ -0,0 +1,102 @@ +using System.Text.Json; +using FluxFlow.Mapping; +using Jsonata.Net.Native; + +namespace FluxFlow.Expressions.Jsonata; + +public sealed class JsonataFlowExpressionEngine : IFlowExpressionEngine +{ + private static readonly JsonSerializerOptions SerializerOptions = + new(JsonSerializerDefaults.Web); + + public string Name => "jsonata"; + + public object? Evaluate( + string expression, + FlowMapContext context, + Type resultType) + { + ArgumentException.ThrowIfNullOrWhiteSpace(expression); + ArgumentNullException.ThrowIfNull(context); + ArgumentNullException.ThrowIfNull(resultType); + + return Evaluate( + new JsonataQuery(expression), + context, + resultType); + } + + public IFlowCompiledExpression Compile(string expression) + { + ArgumentException.ThrowIfNullOrWhiteSpace(expression); + return new CompiledExpression(new JsonataQuery(expression)); + } + + private static object? Evaluate( + JsonataQuery query, + FlowMapContext context, + Type resultType) + { + var inputJson = JsonSerializer.Serialize( + ToJsonataVariables(context.Variables), + SerializerOptions); + var resultJson = query.Eval(inputJson); + + using var document = JsonDocument.Parse(resultJson); + return ConvertElement(document.RootElement, resultType); + } + + private static object? ConvertElement(JsonElement element, Type resultType) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + if (resultType == typeof(JsonElement)) + { + return element.Clone(); + } + + if (resultType == typeof(object)) + { + return ConvertUntyped(element); + } + + return element.Deserialize(resultType, SerializerOptions); + } + + private static object? ConvertUntyped(JsonElement element) => + element.ValueKind switch + { + JsonValueKind.String => element.GetString(), + JsonValueKind.Number when element.TryGetInt64(out var integer) => integer, + JsonValueKind.Number => element.GetDouble(), + JsonValueKind.True => true, + JsonValueKind.False => false, + JsonValueKind.Null => null, + _ => element.Clone(), + }; + + private static IReadOnlyDictionary ToJsonataVariables( + IReadOnlyDictionary variables) => + variables + .Where(static pair => pair.Value is not Type and not Delegate) + .ToDictionary( + static pair => pair.Key, + static pair => pair.Value, + StringComparer.Ordinal); + + private sealed class CompiledExpression(JsonataQuery query) + : IFlowCompiledExpression + { + public T Evaluate(FlowMapContext context) + { + ArgumentNullException.ThrowIfNull(context); + return (T)JsonataFlowExpressionEngine.Evaluate( + query, + context, + typeof(T))!; + } + } +} diff --git a/src/Adapters/Expressions/FluxFlow.Expressions.Jsonata/README.md b/src/Adapters/Expressions/FluxFlow.Expressions.Jsonata/README.md new file mode 100644 index 00000000..66b7df13 --- /dev/null +++ b/src/Adapters/Expressions/FluxFlow.Expressions.Jsonata/README.md @@ -0,0 +1,5 @@ +# FluxFlow.Expressions.Jsonata + +Optional JSONata implementation of the engine-free `FluxFlow.Mapping.IFlowExpressionEngine` contract. + +Reference this package only in hosts that choose JSONata. Generic mapping components and the FluxFlow engine do not depend on it. diff --git a/src/FluxFlow.Fluent.Hosting/FlowGraphHostedService.cs b/src/Authoring/FluxFlow.Fluent.Hosting/FlowGraphHostedService.cs similarity index 100% rename from src/FluxFlow.Fluent.Hosting/FlowGraphHostedService.cs rename to src/Authoring/FluxFlow.Fluent.Hosting/FlowGraphHostedService.cs diff --git a/src/FluxFlow.Fluent.Hosting/FluxFlow.Fluent.Hosting.csproj b/src/Authoring/FluxFlow.Fluent.Hosting/FluxFlow.Fluent.Hosting.csproj similarity index 78% rename from src/FluxFlow.Fluent.Hosting/FluxFlow.Fluent.Hosting.csproj rename to src/Authoring/FluxFlow.Fluent.Hosting/FluxFlow.Fluent.Hosting.csproj index 30b17be1..4511637e 100644 --- a/src/FluxFlow.Fluent.Hosting/FluxFlow.Fluent.Hosting.csproj +++ b/src/Authoring/FluxFlow.Fluent.Hosting/FluxFlow.Fluent.Hosting.csproj @@ -5,11 +5,11 @@ FluxFlow.Fluent.Hosting FluxFlow.Fluent.Hosting FluxFlow.Fluent.Hosting - 5.0.0-rc.1 + 6.0.0-rc.2 Optional hosting bridge for FluxFlow.Fluent: register a FlowGraph with AddFlowGraph and run it as an IHostedService — built and started on host start, stopped and disposed on shutdown. The factory delegate resolves nodes from DI. workflow;dataflow;fluent;dsl;hosting README.md - Updates hosted Fluent integration for the canonical-only Composition dependency. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. Requires the corrected passive-observation runtime candidate. true diff --git a/src/FluxFlow.Fluent.Hosting/FluxFlowFluentHostingServiceCollectionExtensions.cs b/src/Authoring/FluxFlow.Fluent.Hosting/FluxFlowFluentHostingServiceCollectionExtensions.cs similarity index 100% rename from src/FluxFlow.Fluent.Hosting/FluxFlowFluentHostingServiceCollectionExtensions.cs rename to src/Authoring/FluxFlow.Fluent.Hosting/FluxFlowFluentHostingServiceCollectionExtensions.cs diff --git a/src/FluxFlow.Fluent.Hosting/README.md b/src/Authoring/FluxFlow.Fluent.Hosting/README.md similarity index 100% rename from src/FluxFlow.Fluent.Hosting/README.md rename to src/Authoring/FluxFlow.Fluent.Hosting/README.md diff --git a/src/FluxFlow.Fluent/CompatibilitySuppressions.xml b/src/Authoring/FluxFlow.Fluent/CompatibilitySuppressions.xml similarity index 64% rename from src/FluxFlow.Fluent/CompatibilitySuppressions.xml rename to src/Authoring/FluxFlow.Fluent/CompatibilitySuppressions.xml index 43a9e845..f5ac5d6e 100644 --- a/src/FluxFlow.Fluent/CompatibilitySuppressions.xml +++ b/src/Authoring/FluxFlow.Fluent/CompatibilitySuppressions.xml @@ -1,19 +1,18 @@  - + CP0002 - M:FluxFlow.Fluent.FlowGraph.get_Runtime + M:FluxFlow.Fluent.FlowGraph.get_Events lib/net10.0/FluxFlow.Fluent.dll lib/net10.0/FluxFlow.Fluent.dll true CP0002 - M:FluxFlow.Fluent.FlowGraph.get_Runtime + M:FluxFlow.Fluent.FlowGraph.get_Events lib/net8.0/FluxFlow.Fluent.dll lib/net8.0/FluxFlow.Fluent.dll true diff --git a/src/FluxFlow.Fluent/Flow.cs b/src/Authoring/FluxFlow.Fluent/Flow.cs similarity index 100% rename from src/FluxFlow.Fluent/Flow.cs rename to src/Authoring/FluxFlow.Fluent/Flow.cs diff --git a/src/FluxFlow.Fluent/FlowBuilder.cs b/src/Authoring/FluxFlow.Fluent/FlowBuilder.cs similarity index 100% rename from src/FluxFlow.Fluent/FlowBuilder.cs rename to src/Authoring/FluxFlow.Fluent/FlowBuilder.cs diff --git a/src/FluxFlow.Fluent/FlowGraph.cs b/src/Authoring/FluxFlow.Fluent/FlowGraph.cs similarity index 93% rename from src/FluxFlow.Fluent/FlowGraph.cs rename to src/Authoring/FluxFlow.Fluent/FlowGraph.cs index d11cd431..f0297d51 100644 --- a/src/FluxFlow.Fluent/FlowGraph.cs +++ b/src/Authoring/FluxFlow.Fluent/FlowGraph.cs @@ -13,7 +13,7 @@ namespace FluxFlow.Fluent; public sealed class FlowGraph : IAsyncDisposable { private readonly IServiceProvider _services; - private readonly BroadcastBlock _events = + private readonly BroadcastBlock _events = new(static flowEvent => flowEvent); private readonly List _subscriptions = []; private readonly Task _sourceCompletion; @@ -26,7 +26,7 @@ public sealed class FlowGraph : IAsyncDisposable internal FlowGraph( ApplicationDefinition definition, - IReadOnlyList> eventSources, + IReadOnlyList> eventSources, IReadOnlyList sourceCompletions) { Definition = definition ?? throw new ArgumentNullException(nameof(definition)); @@ -56,12 +56,16 @@ internal FlowGraph( public Task Completion => _completion.Task; - public ISourceBlock Events => _events; + public ISourceBlock Events => _events; public IDisposable OnEvent(Action handler) { ArgumentNullException.ThrowIfNull(handler); - return Subscribe(_events, handler); + return Subscribe(_events, message => + { + if (message.TryGetFlowEvent(out var @event)) + handler(@event!); + }); } public async ValueTask StartAsync(CancellationToken cancellationToken = default) @@ -146,7 +150,7 @@ private Task EnsureStoppedAsync() return _stopTask ??= Application.StopAsync(CancellationToken.None).AsTask(); } - private async Task CompleteEventsAsync(IReadOnlyList> sources) + private async Task CompleteEventsAsync(IReadOnlyList> sources) { try { diff --git a/src/FluxFlow.Fluent/FlowGraphBuilder.cs b/src/Authoring/FluxFlow.Fluent/FlowGraphBuilder.cs similarity index 94% rename from src/FluxFlow.Fluent/FlowGraphBuilder.cs rename to src/Authoring/FluxFlow.Fluent/FlowGraphBuilder.cs index 75f3cf72..926ad7cc 100644 --- a/src/FluxFlow.Fluent/FlowGraphBuilder.cs +++ b/src/Authoring/FluxFlow.Fluent/FlowGraphBuilder.cs @@ -23,7 +23,7 @@ internal sealed class FlowGraphBuilder new(ReferenceEqualityComparer.Instance); private readonly Dictionary _branches = new(ReferenceEqualityComparer.Instance); - private readonly List> _eventSources = []; + private readonly List> _eventSources = []; private readonly List> _eventHandlers = []; private int _nextComponent; @@ -136,12 +136,12 @@ internal sealed class FluentSourceHandle : AuthoredComponentHandle internal FluentSourceHandle(ComponentHandle definition) : base(definition) { Output = definition.Output("Output"); - Events = definition.Output("Events"); + Events = definition.Output("Events"); } internal OutputPortHandle Output { get; } - internal OutputPortHandle Events { get; } + internal OutputPortHandle Events { get; } } internal sealed class FluentNodeHandle : AuthoredComponentHandle @@ -150,14 +150,14 @@ internal FluentNodeHandle(ComponentHandle definition) : base(definition) { Input = definition.Input("Input"); Output = definition.Output("Output"); - Events = definition.Output("Events"); + Events = definition.Output("Events"); } internal InputPortHandle Input { get; } internal OutputPortHandle Output { get; } - internal OutputPortHandle Events { get; } + internal OutputPortHandle Events { get; } } internal sealed class FluentBranchHandle : AuthoredComponentHandle diff --git a/src/FluxFlow.Fluent/FlowSegment.cs b/src/Authoring/FluxFlow.Fluent/FlowSegment.cs similarity index 100% rename from src/FluxFlow.Fluent/FlowSegment.cs rename to src/Authoring/FluxFlow.Fluent/FlowSegment.cs diff --git a/src/FluxFlow.Fluent/FlowTerminal.cs b/src/Authoring/FluxFlow.Fluent/FlowTerminal.cs similarity index 100% rename from src/FluxFlow.Fluent/FlowTerminal.cs rename to src/Authoring/FluxFlow.Fluent/FlowTerminal.cs diff --git a/src/FluxFlow.Fluent/FluxFlow.Fluent.csproj b/src/Authoring/FluxFlow.Fluent/FluxFlow.Fluent.csproj similarity index 65% rename from src/FluxFlow.Fluent/FluxFlow.Fluent.csproj rename to src/Authoring/FluxFlow.Fluent/FluxFlow.Fluent.csproj index fcefe1e1..83008df8 100644 --- a/src/FluxFlow.Fluent/FluxFlow.Fluent.csproj +++ b/src/Authoring/FluxFlow.Fluent/FluxFlow.Fluent.csproj @@ -5,18 +5,18 @@ FluxFlow.Fluent FluxFlow.Fluent FluxFlow.Fluent - 5.0.0-rc.1 + 6.0.0-rc.2 Type-safe, code-first fluent DSL for composing FluxFlow standalone nodes into a runnable graph — Flow.From(source).Then(node).To(sink) with compile-time-checked wiring, branching, and fan-in. Reuses the FluxFlow.Composition runtime. workflow;dataflow;composition;nodes;fluent;dsl README.md - Updates the code-first graph surface for the canonical-only Composition dependency. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. Requires the corrected passive-observation runtime candidate. true - - - + + + diff --git a/src/FluxFlow.Fluent/README.md b/src/Authoring/FluxFlow.Fluent/README.md similarity index 100% rename from src/FluxFlow.Fluent/README.md rename to src/Authoring/FluxFlow.Fluent/README.md diff --git a/src/FluxFlow.Components.Assertions.Composition/AssertionsAuthoringExtensions.cs b/src/Components/Assertions/FluxFlow.Components.Assertions.Composition/AssertionsAuthoringExtensions.cs similarity index 86% rename from src/FluxFlow.Components.Assertions.Composition/AssertionsAuthoringExtensions.cs rename to src/Components/Assertions/FluxFlow.Components.Assertions.Composition/AssertionsAuthoringExtensions.cs index 9d3c7678..42ae2cc0 100644 --- a/src/FluxFlow.Components.Assertions.Composition/AssertionsAuthoringExtensions.cs +++ b/src/Components/Assertions/FluxFlow.Components.Assertions.Composition/AssertionsAuthoringExtensions.cs @@ -4,22 +4,24 @@ using FluxFlow.Composition.Authoring; using FluxFlow.Mapping; +using FluxFlow.Data; + namespace FluxFlow.Components.Assertions.Composition; public static class AssertionsComponents { - public static ComponentContract>> Assertion { get; } = + public static ComponentContract> Assertion { get; } = DesignedComponentContract.Create( AssertionsComponentDefinition.Types.Assertion, AssertionsServiceCollectionExtensions.ConfigureAssertion, static () => new AssertionComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new InputOutputComponentHandle>(component, AssertionsComponentDefinition.Ports.Input, AssertionsComponentDefinition.Ports.Output, AssertionsComponentDefinition.Ports.Events)); + static component => new InputOutputComponentHandle(component, AssertionsComponentDefinition.Ports.Input, AssertionsComponentDefinition.Ports.Output, AssertionsComponentDefinition.Ports.Events)); } public static class AssertionsAuthoringExtensions { - public static InputOutputComponentHandle> AddAssertion( + public static InputOutputComponentHandle AddAssertion( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -29,7 +31,7 @@ public static WorkflowDefinitionBuilder AddAssertion( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle> assertion) + out InputOutputComponentHandle assertion) { assertion = workflow.AddAssertion(name, configure); return workflow; diff --git a/src/FluxFlow.Components.Assertions.Composition/AssertionsComponentDefinition.cs b/src/Components/Assertions/FluxFlow.Components.Assertions.Composition/AssertionsComponentDefinition.cs similarity index 100% rename from src/FluxFlow.Components.Assertions.Composition/AssertionsComponentDefinition.cs rename to src/Components/Assertions/FluxFlow.Components.Assertions.Composition/AssertionsComponentDefinition.cs diff --git a/src/FluxFlow.Components.Assertions.Composition/AssertionsServiceCollectionExtensions.cs b/src/Components/Assertions/FluxFlow.Components.Assertions.Composition/AssertionsServiceCollectionExtensions.cs similarity index 98% rename from src/FluxFlow.Components.Assertions.Composition/AssertionsServiceCollectionExtensions.cs rename to src/Components/Assertions/FluxFlow.Components.Assertions.Composition/AssertionsServiceCollectionExtensions.cs index e1d45cd4..8d4018c8 100644 --- a/src/FluxFlow.Components.Assertions.Composition/AssertionsServiceCollectionExtensions.cs +++ b/src/Components/Assertions/FluxFlow.Components.Assertions.Composition/AssertionsServiceCollectionExtensions.cs @@ -5,6 +5,7 @@ using FluxFlow.Components.Assertions.Nodes; using FluxFlow.Components.Assertions.Options; using FluxFlow.Composition; +using FluxFlow.Data; using FluxFlow.Mapping; namespace FluxFlow.Components.Assertions.Composition; @@ -29,15 +30,16 @@ internal static void ConfigureAssertion(ComponentRegistrationBuilder component) suggestedEditorWidth: 420); component .UseFactory(CreateJsonAssertionNode) - .HasInput( + .HasFlowValueInput( AssertionsComponentDefinition.Ports.Input, static node => node.Input, + FlowValueMaterializers.JsonElement.InputShape, displayName: "Input", group: "Messages", order: 0, summary: "Immutable value to evaluate.", isPrimary: true) - .HasOutput( + .HasFlowValueOutput( AssertionsComponentDefinition.Ports.Output, static node => node.Output, displayName: "Output", diff --git a/src/Components/Assertions/FluxFlow.Components.Assertions.Composition/CompatibilitySuppressions.xml b/src/Components/Assertions/FluxFlow.Components.Assertions.Composition/CompatibilitySuppressions.xml new file mode 100644 index 00000000..05c01c84 --- /dev/null +++ b/src/Components/Assertions/FluxFlow.Components.Assertions.Composition/CompatibilitySuppressions.xml @@ -0,0 +1,48 @@ + + + + + CP0002 + M:FluxFlow.Components.Assertions.Composition.AssertionsAuthoringExtensions.AddAssertion(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Assertions.Composition.AssertionComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,FluxFlow.Components.Assertions.Contracts.AssertionResult{System.Text.Json.JsonElement}}@) + lib/net10.0/FluxFlow.Components.Assertions.Composition.dll + lib/net10.0/FluxFlow.Components.Assertions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Assertions.Composition.AssertionsAuthoringExtensions.AddAssertion(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Assertions.Composition.AssertionComponentBuilder}) + lib/net10.0/FluxFlow.Components.Assertions.Composition.dll + lib/net10.0/FluxFlow.Components.Assertions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Assertions.Composition.AssertionsComponents.get_Assertion + lib/net10.0/FluxFlow.Components.Assertions.Composition.dll + lib/net10.0/FluxFlow.Components.Assertions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Assertions.Composition.AssertionsAuthoringExtensions.AddAssertion(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Assertions.Composition.AssertionComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,FluxFlow.Components.Assertions.Contracts.AssertionResult{System.Text.Json.JsonElement}}@) + lib/net8.0/FluxFlow.Components.Assertions.Composition.dll + lib/net8.0/FluxFlow.Components.Assertions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Assertions.Composition.AssertionsAuthoringExtensions.AddAssertion(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Assertions.Composition.AssertionComponentBuilder}) + lib/net8.0/FluxFlow.Components.Assertions.Composition.dll + lib/net8.0/FluxFlow.Components.Assertions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Assertions.Composition.AssertionsComponents.get_Assertion + lib/net8.0/FluxFlow.Components.Assertions.Composition.dll + lib/net8.0/FluxFlow.Components.Assertions.Composition.dll + true + + diff --git a/src/FluxFlow.Components.Assertions.Composition/FluxFlow.Components.Assertions.Composition.csproj b/src/Components/Assertions/FluxFlow.Components.Assertions.Composition/FluxFlow.Components.Assertions.Composition.csproj similarity index 59% rename from src/FluxFlow.Components.Assertions.Composition/FluxFlow.Components.Assertions.Composition.csproj rename to src/Components/Assertions/FluxFlow.Components.Assertions.Composition/FluxFlow.Components.Assertions.Composition.csproj index 7272bb06..b7368783 100644 --- a/src/FluxFlow.Components.Assertions.Composition/FluxFlow.Components.Assertions.Composition.csproj +++ b/src/Components/Assertions/FluxFlow.Components.Assertions.Composition/FluxFlow.Components.Assertions.Composition.csproj @@ -5,18 +5,18 @@ FluxFlow.Components.Assertions.Composition FluxFlow.Components.Assertions.Composition FluxFlow.Components.Assertions.Composition - 7.0.0-rc.1 + 8.0.0-rc.1 Optional typed assertion registration and Designer metadata over host-owned keyed expression resources. workflow;dataflow;components;assertions;composition README.md - Requires data.assert; registers exact descriptors and Designer metadata through the flat designed-component API; keeps constants under AssertionsComponentDefinition and removes its metadata-only factory. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. - - - + + + diff --git a/src/FluxFlow.Components.Assertions.Composition/README.md b/src/Components/Assertions/FluxFlow.Components.Assertions.Composition/README.md similarity index 100% rename from src/FluxFlow.Components.Assertions.Composition/README.md rename to src/Components/Assertions/FluxFlow.Components.Assertions.Composition/README.md diff --git a/src/FluxFlow.Components.Assertions/AssertionErrorCodeNames.cs b/src/Components/Assertions/FluxFlow.Components.Assertions/AssertionErrorCodeNames.cs similarity index 100% rename from src/FluxFlow.Components.Assertions/AssertionErrorCodeNames.cs rename to src/Components/Assertions/FluxFlow.Components.Assertions/AssertionErrorCodeNames.cs diff --git a/src/FluxFlow.Components.Assertions/AssertionResultKinds.cs b/src/Components/Assertions/FluxFlow.Components.Assertions/AssertionResultKinds.cs similarity index 100% rename from src/FluxFlow.Components.Assertions/AssertionResultKinds.cs rename to src/Components/Assertions/FluxFlow.Components.Assertions/AssertionResultKinds.cs diff --git a/src/Components/Assertions/FluxFlow.Components.Assertions/CompatibilitySuppressions.xml b/src/Components/Assertions/FluxFlow.Components.Assertions/CompatibilitySuppressions.xml new file mode 100644 index 00000000..4e3ea82d --- /dev/null +++ b/src/Components/Assertions/FluxFlow.Components.Assertions/CompatibilitySuppressions.xml @@ -0,0 +1,20 @@ + + + + + CP0007 + T:FluxFlow.Components.Assertions.Nodes.JsonAssertionNode + lib/net10.0/FluxFlow.Components.Assertions.dll + lib/net10.0/FluxFlow.Components.Assertions.dll + true + + + CP0007 + T:FluxFlow.Components.Assertions.Nodes.JsonAssertionNode + lib/net8.0/FluxFlow.Components.Assertions.dll + lib/net8.0/FluxFlow.Components.Assertions.dll + true + + diff --git a/src/FluxFlow.Components.Assertions/Contracts/AssertionResult.cs b/src/Components/Assertions/FluxFlow.Components.Assertions/Contracts/AssertionResult.cs similarity index 100% rename from src/FluxFlow.Components.Assertions/Contracts/AssertionResult.cs rename to src/Components/Assertions/FluxFlow.Components.Assertions/Contracts/AssertionResult.cs diff --git a/src/FluxFlow.Components.Assertions/Diagnostics/AssertionDiagnosticNames.cs b/src/Components/Assertions/FluxFlow.Components.Assertions/Diagnostics/AssertionDiagnosticNames.cs similarity index 100% rename from src/FluxFlow.Components.Assertions/Diagnostics/AssertionDiagnosticNames.cs rename to src/Components/Assertions/FluxFlow.Components.Assertions/Diagnostics/AssertionDiagnosticNames.cs diff --git a/src/FluxFlow.Components.Assertions/FluxFlow.Components.Assertions.csproj b/src/Components/Assertions/FluxFlow.Components.Assertions/FluxFlow.Components.Assertions.csproj similarity index 63% rename from src/FluxFlow.Components.Assertions/FluxFlow.Components.Assertions.csproj rename to src/Components/Assertions/FluxFlow.Components.Assertions/FluxFlow.Components.Assertions.csproj index 45e342b3..a2069b75 100644 --- a/src/FluxFlow.Components.Assertions/FluxFlow.Components.Assertions.csproj +++ b/src/Components/Assertions/FluxFlow.Components.Assertions/FluxFlow.Components.Assertions.csproj @@ -4,15 +4,15 @@ FluxFlow.Components.Assertions FluxFlow.Components.Assertions FluxFlow.Components.Assertions - 6.0.0 + 7.0.0-rc.1 Standalone expression-driven assertions for immutable FluxFlow values with one normal result stream. workflow;dataflow;components;assertions - Migrates component inputs and outputs to typed FlowMessage<T> value-or-error contracts, removes universal FlowValue or FlowResult coupling, and keeps errors on the normal output. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md - - + + diff --git a/src/FluxFlow.Components.Assertions/Nodes/AssertionNode.cs b/src/Components/Assertions/FluxFlow.Components.Assertions/Nodes/AssertionNode.cs similarity index 52% rename from src/FluxFlow.Components.Assertions/Nodes/AssertionNode.cs rename to src/Components/Assertions/FluxFlow.Components.Assertions/Nodes/AssertionNode.cs index 9003b029..baf75c42 100644 --- a/src/FluxFlow.Components.Assertions/Nodes/AssertionNode.cs +++ b/src/Components/Assertions/FluxFlow.Components.Assertions/Nodes/AssertionNode.cs @@ -166,16 +166,159 @@ private static FlowNodeOptions CreateNodeOptions(AssertionOptions? options) } /// -/// JSON-oriented assertion node used by configuration composition. +/// Canonical runtime assertion node. JSON materialization is owned by this +/// component and is not represented as a separate workflow node. /// -public sealed class JsonAssertionNode : AssertionNode +public sealed class JsonAssertionNode : FlowNode { + private readonly AssertionOptions _options; + private readonly IFlowPredicate _predicate; + private readonly string _engineName; + private readonly TimeProvider _clock; + public JsonAssertionNode( AssertionOptions options, IFlowExpressionEngine expressionEngine, IFlowMapContextFactory? contextFactory = null, TimeProvider? clock = null) - : base(options, expressionEngine, contextFactory, clock) + : base(CreateRuntimeNodeOptions(options)) + { + _options = ValidateRuntimeOptions(options); + ArgumentNullException.ThrowIfNull(expressionEngine); + + _engineName = expressionEngine.Name; + _clock = clock ?? TimeProvider.System; + _predicate = contextFactory is null + ? new ExpressionFlowPredicate(_options.Expression!, expressionEngine) + : new ExpressionFlowPredicate(_options.Expression!, expressionEngine, contextFactory); + } + + protected override bool HandlesErrors => true; + + protected override async Task ProcessAsync(FlowMessage message) + => await EmitAsync(ProcessRuntime(message), Stopping).ConfigureAwait(false); + + private FlowMessage ProcessRuntime(FlowMessage message) + { + ArgumentNullException.ThrowIfNull(message); + if (message.IsError) + return message.WithError(message.Error!); + + var input = FlowValueMaterializers.JsonElement.Materialize(message.Value).Value; + var timestamp = _clock.GetUtcNow(); + bool passed; + try + { + passed = _predicate.IsMatch(input); + } + catch (Exception exception) + { + var error = new FlowError( + AssertionErrorCodeNames.EvaluationFailed, + $"flow.assert failed to evaluate input: {exception.Message}", + category: "Assertions", + isTransient: false, + details: CreateRuntimeErrorDetails(exception)); + PublishRuntimeEvent( + message, + timestamp, + AssertionDiagnosticNames.ExpressionFailed, + FlowEventLevel.Warning, + error.Message, + AssertionResultKinds.EvaluationFailed, + passed: null, + isError: true); + return message.WithError(error); + } + + var resultKind = passed ? AssertionResultKinds.Passed : AssertionResultKinds.Failed; + var result = new AssertionResult + { + EvaluatedAt = timestamp, + Input = input, + Passed = passed, + Description = _options.EffectiveDescription, + Message = passed ? "Assertion passed." : _options.EffectiveFailureMessage, + Expression = _options.Expression!, + ExpressionId = _options.ExpressionId, + ExpressionName = _options.ExpressionName, + EngineName = _engineName, + InputType = typeof(JsonElement).FullName ?? typeof(JsonElement).Name + }; + PublishRuntimeEvent( + message, + timestamp, + AssertionDiagnosticNames.Evaluated, + FlowEventLevel.Information, + passed ? "flow.assert passed input." : "flow.assert failed input.", + resultKind, + passed, + isError: false); + return message.With(FlowValue.From(result)); + } + + private void PublishRuntimeEvent( + FlowMessage message, + DateTimeOffset timestamp, + string name, + FlowEventLevel level, + string text, + string resultKind, + bool? passed, + bool isError) + { + var attributes = new Dictionary(StringComparer.Ordinal) + { + ["engine"] = _engineName, + ["inputType"] = typeof(JsonElement).FullName ?? typeof(JsonElement).Name, + ["isError"] = isError, + ["resultKind"] = resultKind + }; + if (passed.HasValue) + attributes["passed"] = passed.Value; + if (!string.IsNullOrWhiteSpace(_options.ExpressionId)) + attributes["expressionId"] = _options.ExpressionId; + if (!string.IsNullOrWhiteSpace(_options.ExpressionName)) + attributes["expressionName"] = _options.ExpressionName; + + EmitEvent(new FlowEvent + { + Timestamp = timestamp, + CorrelationId = message.CorrelationId, + Name = name, + Level = level, + Message = text, + Attributes = attributes + }); + } + + private JsonElement CreateRuntimeErrorDetails(Exception exception) + => JsonSerializer.SerializeToElement(new Dictionary(StringComparer.Ordinal) + { + ["engine"] = _engineName, + ["exceptionType"] = exception.GetType().FullName ?? exception.GetType().Name, + ["expressionId"] = _options.ExpressionId, + ["expressionName"] = _options.ExpressionName, + ["inputType"] = typeof(JsonElement).FullName ?? typeof(JsonElement).Name + }); + + private static AssertionOptions ValidateRuntimeOptions(AssertionOptions? options) { + ArgumentNullException.ThrowIfNull(options); + if (string.IsNullOrWhiteSpace(options.Expression)) + throw new ArgumentException("flow.assert requires 'expression'.", nameof(options)); + if (options.BoundedCapacity <= 0) + throw new ArgumentOutOfRangeException(nameof(options), "Capacity must be positive."); + return options; + } + + private static FlowNodeOptions CreateRuntimeNodeOptions(AssertionOptions? options) + { + var validated = ValidateRuntimeOptions(options); + return new FlowNodeOptions + { + InputCapacity = validated.BoundedCapacity, + OutputCapacity = validated.BoundedCapacity + }; } } diff --git a/src/FluxFlow.Components.Assertions/Options/AssertionOptions.cs b/src/Components/Assertions/FluxFlow.Components.Assertions/Options/AssertionOptions.cs similarity index 100% rename from src/FluxFlow.Components.Assertions/Options/AssertionOptions.cs rename to src/Components/Assertions/FluxFlow.Components.Assertions/Options/AssertionOptions.cs diff --git a/src/FluxFlow.Components.Assertions/README.md b/src/Components/Assertions/FluxFlow.Components.Assertions/README.md similarity index 100% rename from src/FluxFlow.Components.Assertions/README.md rename to src/Components/Assertions/FluxFlow.Components.Assertions/README.md diff --git a/src/Components/Designer/FluxFlow.Components.Designer/CompatibilitySuppressions.xml b/src/Components/Designer/FluxFlow.Components.Designer/CompatibilitySuppressions.xml new file mode 100644 index 00000000..58cb4b0f --- /dev/null +++ b/src/Components/Designer/FluxFlow.Components.Designer/CompatibilitySuppressions.xml @@ -0,0 +1,34 @@ + + + + + CP0002 + M:FluxFlow.Components.Designer.DesignedComponentBindingBuilder`1.HasEvents(System.String,System.Func{`0,System.Threading.Tasks.Dataflow.ISourceBlock{FluxFlow.Nodes.FlowEvent}},System.String,System.String,System.Nullable{System.Int32},System.String,System.Boolean,FluxFlow.Composition.ComponentPortLinkCardinality) + lib/net10.0/FluxFlow.Components.Designer.dll + lib/net10.0/FluxFlow.Components.Designer.dll + true + + + CP0002 + M:FluxFlow.Components.Designer.DesignedComponentInstanceBindingBuilder.HasEvents(System.String,System.String,System.String,System.Nullable{System.Int32},System.String,System.Boolean,FluxFlow.Composition.ComponentPortLinkCardinality) + lib/net10.0/FluxFlow.Components.Designer.dll + lib/net10.0/FluxFlow.Components.Designer.dll + true + + + CP0002 + M:FluxFlow.Components.Designer.DesignedComponentBindingBuilder`1.HasEvents(System.String,System.Func{`0,System.Threading.Tasks.Dataflow.ISourceBlock{FluxFlow.Nodes.FlowEvent}},System.String,System.String,System.Nullable{System.Int32},System.String,System.Boolean,FluxFlow.Composition.ComponentPortLinkCardinality) + lib/net8.0/FluxFlow.Components.Designer.dll + lib/net8.0/FluxFlow.Components.Designer.dll + true + + + CP0002 + M:FluxFlow.Components.Designer.DesignedComponentInstanceBindingBuilder.HasEvents(System.String,System.String,System.String,System.Nullable{System.Int32},System.String,System.Boolean,FluxFlow.Composition.ComponentPortLinkCardinality) + lib/net8.0/FluxFlow.Components.Designer.dll + lib/net8.0/FluxFlow.Components.Designer.dll + true + + diff --git a/src/FluxFlow.Components.Designer/ComponentDesignDeclaration.cs b/src/Components/Designer/FluxFlow.Components.Designer/ComponentDesignDeclaration.cs similarity index 100% rename from src/FluxFlow.Components.Designer/ComponentDesignDeclaration.cs rename to src/Components/Designer/FluxFlow.Components.Designer/ComponentDesignDeclaration.cs diff --git a/src/FluxFlow.Components.Designer/ComponentDesignMetadataCatalog.cs b/src/Components/Designer/FluxFlow.Components.Designer/ComponentDesignMetadataCatalog.cs similarity index 100% rename from src/FluxFlow.Components.Designer/ComponentDesignMetadataCatalog.cs rename to src/Components/Designer/FluxFlow.Components.Designer/ComponentDesignMetadataCatalog.cs diff --git a/src/FluxFlow.Components.Designer/ComponentDesignMetadataFinalizer.cs b/src/Components/Designer/FluxFlow.Components.Designer/ComponentDesignMetadataFinalizer.cs similarity index 100% rename from src/FluxFlow.Components.Designer/ComponentDesignMetadataFinalizer.cs rename to src/Components/Designer/FluxFlow.Components.Designer/ComponentDesignMetadataFinalizer.cs diff --git a/src/FluxFlow.Components.Designer/ComponentDesignMetadataSnapshot.cs b/src/Components/Designer/FluxFlow.Components.Designer/ComponentDesignMetadataSnapshot.cs similarity index 91% rename from src/FluxFlow.Components.Designer/ComponentDesignMetadataSnapshot.cs rename to src/Components/Designer/FluxFlow.Components.Designer/ComponentDesignMetadataSnapshot.cs index 357ad39f..dc719a0c 100644 --- a/src/FluxFlow.Components.Designer/ComponentDesignMetadataSnapshot.cs +++ b/src/Components/Designer/FluxFlow.Components.Designer/ComponentDesignMetadataSnapshot.cs @@ -36,6 +36,10 @@ private static ResourceDesignMetadata Create(ResourceDesignMetadata resource) private static PortDesignMetadata Create(PortDesignMetadata port) => port with { + EventShapes = port.EventShapes.Select(static shape => shape with + { + Fields = shape.Fields.ToArray() + }).ToArray(), Attributes = Copy(port.Attributes) }; diff --git a/src/FluxFlow.Components.Designer/ComponentDesignMetadataValidator.cs b/src/Components/Designer/FluxFlow.Components.Designer/ComponentDesignMetadataValidator.cs similarity index 89% rename from src/FluxFlow.Components.Designer/ComponentDesignMetadataValidator.cs rename to src/Components/Designer/FluxFlow.Components.Designer/ComponentDesignMetadataValidator.cs index b802d0e6..a7e4d65d 100644 --- a/src/FluxFlow.Components.Designer/ComponentDesignMetadataValidator.cs +++ b/src/Components/Designer/FluxFlow.Components.Designer/ComponentDesignMetadataValidator.cs @@ -536,10 +536,62 @@ private static void ValidatePorts( $"{path}.{nameof(PortDesignMetadata.ValueType)}", "Port value type hint cannot be empty when it is provided.")); } + if (port.InputShape is not null && + (port.Direction != PortDirection.Input || + port.Kind != FluxFlow.Composition.ComponentPortKind.Message || + port.MessageType is not null && port.MessageType != typeof(FluxFlow.Data.FlowValue))) + { + errors.Add(new DesignerMetadataValidationError( + $"{path}.{nameof(PortDesignMetadata.InputShape)}", + "Input shapes can only describe canonical value input ports.")); + } + ValidateEventShapes(port.EventShapes, $"{path}.{nameof(PortDesignMetadata.EventShapes)}", errors); ValidateAttributes(port.Attributes, $"{path}.{nameof(PortDesignMetadata.Attributes)}", errors); } } + private static void ValidateEventShapes( + IReadOnlyList? shapes, + string path, + ICollection errors) + { + if (shapes is null) + { + errors.Add(new DesignerMetadataValidationError(path, "Event shapes collection is required.")); + return; + } + + var types = new HashSet(StringComparer.Ordinal); + for (var index = 0; index < shapes.Count; index++) + { + var shape = shapes[index]; + var shapePath = $"{path}[{index}]"; + if (shape is null || string.IsNullOrWhiteSpace(shape.Type)) + { + errors.Add(new DesignerMetadataValidationError(shapePath, "Event type is required.")); + continue; + } + if (!types.Add(shape.Type)) + errors.Add(new DesignerMetadataValidationError(shapePath, $"Event type '{shape.Type}' is duplicated.")); + if (shape.Version < 1) + errors.Add(new DesignerMetadataValidationError($"{shapePath}.{nameof(EventDesignMetadata.Version)}", "Event version must be positive.")); + if (shape.Fields is null) + { + errors.Add(new DesignerMetadataValidationError($"{shapePath}.{nameof(EventDesignMetadata.Fields)}", "Event fields collection is required.")); + continue; + } + + var fieldPaths = new HashSet(StringComparer.Ordinal); + foreach (var field in shape.Fields) + { + if (field is null || string.IsNullOrWhiteSpace(field.Path)) + errors.Add(new DesignerMetadataValidationError(shapePath, "Event field path is required.")); + else if (!fieldPaths.Add(field.Path)) + errors.Add(new DesignerMetadataValidationError(shapePath, $"Event field path '{field.Path}' is duplicated.")); + } + } + } + private static void ValidateAttributes( IReadOnlyDictionary? attributes, string path, diff --git a/src/FluxFlow.Components.Designer/ComponentRegistrationBuilder.cs b/src/Components/Designer/FluxFlow.Components.Designer/ComponentRegistrationBuilder.cs similarity index 98% rename from src/FluxFlow.Components.Designer/ComponentRegistrationBuilder.cs rename to src/Components/Designer/FluxFlow.Components.Designer/ComponentRegistrationBuilder.cs index 0c9a3629..e3f0a2fd 100644 --- a/src/FluxFlow.Components.Designer/ComponentRegistrationBuilder.cs +++ b/src/Components/Designer/FluxFlow.Components.Designer/ComponentRegistrationBuilder.cs @@ -308,6 +308,7 @@ private PortDesignMetadata CreatePort(ComponentPortMetadata port, PortDirection MessageType = port.MessageType, Kind = port.Kind, LinkCardinality = port.LinkCardinality, + InputShape = port.InputShape, Attributes = port.Kind == ComponentPortKind.Signal ? PortDesignMetadataAttributes.CreateSignalMap() : new Dictionary() @@ -330,6 +331,14 @@ internal void DescribePort( IsPrimary = isPrimary ?? port.IsPrimary }); + internal void DescribeEventShapes( + string name, + IEnumerable? eventShapes) + => ReplacePort(name, PortDirection.Output, port => port with + { + EventShapes = eventShapes?.ToArray() ?? [] + }); + private void ReplaceOption(string name, Func update) { ArgumentException.ThrowIfNullOrWhiteSpace(name); diff --git a/src/FluxFlow.Components.Designer/ComponentRegistrationExtensions.cs b/src/Components/Designer/FluxFlow.Components.Designer/ComponentRegistrationExtensions.cs similarity index 94% rename from src/FluxFlow.Components.Designer/ComponentRegistrationExtensions.cs rename to src/Components/Designer/FluxFlow.Components.Designer/ComponentRegistrationExtensions.cs index cb56d952..cb0f3084 100644 --- a/src/FluxFlow.Components.Designer/ComponentRegistrationExtensions.cs +++ b/src/Components/Designer/FluxFlow.Components.Designer/ComponentRegistrationExtensions.cs @@ -250,9 +250,20 @@ left is not null && right is not null && left.Kind == right.Kind && left.LinkCardinality == right.LinkCardinality && left.IsPrimary == right.IsPrimary && + Equals(left.InputShape, right.InputShape) && + EventShapesEqual(left.EventShapes, right.EventShapes) && DictionariesEqual(left.Attributes, right.Attributes); public int GetHashCode(PortDesignMetadata obj) => HashCode.Combine(obj.Name, obj.Direction); + + private static bool EventShapesEqual( + IReadOnlyList left, + IReadOnlyList right) + => left.Count == right.Count && left.Zip(right).All(static pair => + pair.First.Type == pair.Second.Type && + pair.First.Kind == pair.Second.Kind && + pair.First.Version == pair.Second.Version && + pair.First.Fields.SequenceEqual(pair.Second.Fields)); } } } diff --git a/src/FluxFlow.Components.Designer/ComponentResourcePickerHint.cs b/src/Components/Designer/FluxFlow.Components.Designer/ComponentResourcePickerHint.cs similarity index 100% rename from src/FluxFlow.Components.Designer/ComponentResourcePickerHint.cs rename to src/Components/Designer/FluxFlow.Components.Designer/ComponentResourcePickerHint.cs diff --git a/src/FluxFlow.Components.Designer/ComponentResourcePickerHints.cs b/src/Components/Designer/FluxFlow.Components.Designer/ComponentResourcePickerHints.cs similarity index 100% rename from src/FluxFlow.Components.Designer/ComponentResourcePickerHints.cs rename to src/Components/Designer/FluxFlow.Components.Designer/ComponentResourcePickerHints.cs diff --git a/src/FluxFlow.Components.Designer/Contracts/ComponentAttributeName.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentAttributeName.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/ComponentAttributeName.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentAttributeName.cs diff --git a/src/FluxFlow.Components.Designer/Contracts/ComponentAttributeValue.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentAttributeValue.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/ComponentAttributeValue.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentAttributeValue.cs diff --git a/src/FluxFlow.Components.Designer/Contracts/ComponentCategory.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentCategory.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/ComponentCategory.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentCategory.cs diff --git a/src/FluxFlow.Components.Designer/Contracts/ComponentDesignMetadata.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentDesignMetadata.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/ComponentDesignMetadata.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentDesignMetadata.cs diff --git a/src/FluxFlow.Components.Designer/Contracts/ComponentIconKey.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentIconKey.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/ComponentIconKey.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentIconKey.cs diff --git a/src/FluxFlow.Components.Designer/Contracts/ComponentMetadataText.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentMetadataText.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/ComponentMetadataText.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentMetadataText.cs diff --git a/src/FluxFlow.Components.Designer/Contracts/ComponentOptionChoiceValue.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentOptionChoiceValue.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/ComponentOptionChoiceValue.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentOptionChoiceValue.cs diff --git a/src/FluxFlow.Components.Designer/Contracts/ComponentOptionName.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentOptionName.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/ComponentOptionName.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentOptionName.cs diff --git a/src/FluxFlow.Components.Designer/Contracts/ComponentPortGroup.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentPortGroup.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/ComponentPortGroup.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentPortGroup.cs diff --git a/src/FluxFlow.Components.Designer/Contracts/ComponentPortName.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentPortName.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/ComponentPortName.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentPortName.cs diff --git a/src/FluxFlow.Components.Designer/Contracts/ComponentPreferredNodeName.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentPreferredNodeName.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/ComponentPreferredNodeName.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentPreferredNodeName.cs diff --git a/src/FluxFlow.Components.Designer/Contracts/ComponentResourceName.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentResourceName.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/ComponentResourceName.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentResourceName.cs diff --git a/src/FluxFlow.Components.Designer/Contracts/ComponentType.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentType.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/ComponentType.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentType.cs diff --git a/src/FluxFlow.Components.Designer/Contracts/ComponentValueTypeHint.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentValueTypeHint.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/ComponentValueTypeHint.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/ComponentValueTypeHint.cs diff --git a/src/Components/Designer/FluxFlow.Components.Designer/Contracts/EventDesignMetadata.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/EventDesignMetadata.cs new file mode 100644 index 00000000..0e252008 --- /dev/null +++ b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/EventDesignMetadata.cs @@ -0,0 +1,37 @@ +using FluxFlow.Nodes; + +namespace FluxFlow.Components.Designer.Contracts; + +public enum EventFieldRole +{ + Dimension = 1, + Measurement = 2, + Detail = 3 +} + +public enum EventFieldValueKind +{ + Any = 0, + String = 1, + Number = 2, + Boolean = 3, + Object = 4, + Array = 5 +} + +public sealed record EventFieldDesignMetadata +{ + public required string Path { get; init; } + public required EventFieldRole Role { get; init; } + public EventFieldValueKind ValueKind { get; init; } = EventFieldValueKind.Any; + public string? Unit { get; init; } + public bool IsSensitive { get; init; } +} + +public sealed record EventDesignMetadata +{ + public required string Type { get; init; } + public FlowEventKind Kind { get; init; } = FlowEventKind.Diagnostic; + public int Version { get; init; } = 1; + public IReadOnlyList Fields { get; init; } = []; +} diff --git a/src/FluxFlow.Components.Designer/Contracts/OptionChoiceMetadata.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/OptionChoiceMetadata.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/OptionChoiceMetadata.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/OptionChoiceMetadata.cs diff --git a/src/FluxFlow.Components.Designer/Contracts/OptionDesignMetadata.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/OptionDesignMetadata.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/OptionDesignMetadata.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/OptionDesignMetadata.cs diff --git a/src/FluxFlow.Components.Designer/Contracts/OptionDesignMetadataAttributes.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/OptionDesignMetadataAttributes.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/OptionDesignMetadataAttributes.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/OptionDesignMetadataAttributes.cs diff --git a/src/FluxFlow.Components.Designer/Contracts/OptionValueKind.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/OptionValueKind.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/OptionValueKind.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/OptionValueKind.cs diff --git a/src/FluxFlow.Components.Designer/Contracts/PortDesignMetadata.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/PortDesignMetadata.cs similarity index 86% rename from src/FluxFlow.Components.Designer/Contracts/PortDesignMetadata.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/PortDesignMetadata.cs index f64db878..17633889 100644 --- a/src/FluxFlow.Components.Designer/Contracts/PortDesignMetadata.cs +++ b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/PortDesignMetadata.cs @@ -1,4 +1,5 @@ using FluxFlow.Composition; +using FluxFlow.Data; namespace FluxFlow.Components.Designer.Contracts; @@ -16,5 +17,7 @@ public sealed record PortDesignMetadata public ComponentPortLinkCardinality LinkCardinality { get; init; } = ComponentPortLinkCardinality.Multiple; public bool IsPrimary { get; init; } + public FlowValueShape? InputShape { get; init; } + public IReadOnlyList EventShapes { get; init; } = []; public IReadOnlyDictionary Attributes { get; init; } = new Dictionary(); } diff --git a/src/FluxFlow.Components.Designer/Contracts/PortDesignMetadataAttributes.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/PortDesignMetadataAttributes.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/PortDesignMetadataAttributes.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/PortDesignMetadataAttributes.cs diff --git a/src/FluxFlow.Components.Designer/Contracts/PortDirection.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/PortDirection.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/PortDirection.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/PortDirection.cs diff --git a/src/FluxFlow.Components.Designer/Contracts/ResourceDesignMetadata.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/ResourceDesignMetadata.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/ResourceDesignMetadata.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/ResourceDesignMetadata.cs diff --git a/src/FluxFlow.Components.Designer/Contracts/ResourceDesignMetadataAttributes.cs b/src/Components/Designer/FluxFlow.Components.Designer/Contracts/ResourceDesignMetadataAttributes.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Contracts/ResourceDesignMetadataAttributes.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Contracts/ResourceDesignMetadataAttributes.cs diff --git a/src/FluxFlow.Components.Designer/DesignedComponentBindingBuilder.cs b/src/Components/Designer/FluxFlow.Components.Designer/DesignedComponentBindingBuilder.cs similarity index 71% rename from src/FluxFlow.Components.Designer/DesignedComponentBindingBuilder.cs rename to src/Components/Designer/FluxFlow.Components.Designer/DesignedComponentBindingBuilder.cs index e79ac2da..4cb50d0c 100644 --- a/src/FluxFlow.Components.Designer/DesignedComponentBindingBuilder.cs +++ b/src/Components/Designer/FluxFlow.Components.Designer/DesignedComponentBindingBuilder.cs @@ -1,6 +1,7 @@ using System.Threading.Tasks.Dataflow; using FluxFlow.Components.Designer.Contracts; using FluxFlow.Composition; +using FluxFlow.Data; using FluxFlow.Nodes; namespace FluxFlow.Components.Designer; @@ -34,6 +35,24 @@ public DesignedComponentBindingBuilder HasInput( return this; } + public DesignedComponentBindingBuilder HasFlowValueInput( + string name, + Func> selector, + FlowValueShape inputShape, + string? displayName = null, + string? group = null, + int? order = null, + string? summary = null, + bool isPrimary = false, + ComponentPortLinkCardinality linkCardinality = ComponentPortLinkCardinality.Multiple) + { + ArgumentNullException.ThrowIfNull(selector); + ArgumentNullException.ThrowIfNull(inputShape); + _runtime.HasFlowValueInput(name, selector, inputShape, linkCardinality); + _component.DescribePort(name, PortDirection.Input, displayName, group, order, summary, isPrimary); + return this; + } + public DesignedComponentBindingBuilder HasSignalInput( string name, Func selector, @@ -64,22 +83,41 @@ public DesignedComponentBindingBuilder HasOutput( return this; } - public DesignedComponentBindingBuilder HasEvents( + public DesignedComponentBindingBuilder HasFlowValueOutput( string name, - Func> selector, + Func> selector, string? displayName = null, string? group = null, int? order = null, string? summary = null, bool isPrimary = false, ComponentPortLinkCardinality linkCardinality = ComponentPortLinkCardinality.Multiple) + { + ArgumentNullException.ThrowIfNull(selector); + _runtime.HasFlowValueOutput(name, selector, linkCardinality); + _component.DescribePort(name, PortDirection.Output, displayName, group, order, summary, isPrimary); + return this; + } + + public DesignedComponentBindingBuilder HasEvents( + string name, + Func> selector, + string? displayName = null, + string? group = null, + int? order = null, + string? summary = null, + bool isPrimary = false, + ComponentPortLinkCardinality linkCardinality = ComponentPortLinkCardinality.Multiple, + IEnumerable? eventShapes = null) { _runtime.HasEvents(name, selector, linkCardinality); _component.DescribePort(name, PortDirection.Output, displayName, group, order, summary, isPrimary); + _component.DescribeEventShapes(name, eventShapes); return this; } } + public sealed class DesignedComponentInstanceBindingBuilder { private readonly ComponentRegistrationBuilder _component; @@ -93,6 +131,21 @@ internal DesignedComponentInstanceBindingBuilder( _runtime = runtime ?? throw new ArgumentNullException(nameof(runtime)); } + public DesignedComponentInstanceBindingBuilder HasFlowValueInput( + string name, + FlowValueShape inputShape, + string? displayName = null, + string? group = null, + int? order = null, + string? summary = null, + bool isPrimary = false, + ComponentPortLinkCardinality linkCardinality = ComponentPortLinkCardinality.Multiple) + { + _runtime.HasFlowValueInput(name, inputShape, linkCardinality); + _component.DescribePort(name, PortDirection.Input, displayName, group, order, summary, isPrimary); + return this; + } + public DesignedComponentInstanceBindingBuilder HasInput( string name, string? displayName = null, @@ -142,10 +195,12 @@ public DesignedComponentInstanceBindingBuilder HasEvents( int? order = null, string? summary = null, bool isPrimary = false, - ComponentPortLinkCardinality linkCardinality = ComponentPortLinkCardinality.Multiple) + ComponentPortLinkCardinality linkCardinality = ComponentPortLinkCardinality.Multiple, + IEnumerable? eventShapes = null) { _runtime.HasEvents(name, linkCardinality); _component.DescribePort(name, PortDirection.Output, displayName, group, order, summary, isPrimary); + _component.DescribeEventShapes(name, eventShapes); return this; } } diff --git a/src/FluxFlow.Components.Designer/DesignedComponentContract.cs b/src/Components/Designer/FluxFlow.Components.Designer/DesignedComponentContract.cs similarity index 100% rename from src/FluxFlow.Components.Designer/DesignedComponentContract.cs rename to src/Components/Designer/FluxFlow.Components.Designer/DesignedComponentContract.cs diff --git a/src/FluxFlow.Components.Designer/DesignerMetadataValidationError.cs b/src/Components/Designer/FluxFlow.Components.Designer/DesignerMetadataValidationError.cs similarity index 100% rename from src/FluxFlow.Components.Designer/DesignerMetadataValidationError.cs rename to src/Components/Designer/FluxFlow.Components.Designer/DesignerMetadataValidationError.cs diff --git a/src/FluxFlow.Components.Designer/FluxFlow.Components.Designer.csproj b/src/Components/Designer/FluxFlow.Components.Designer/FluxFlow.Components.Designer.csproj similarity index 65% rename from src/FluxFlow.Components.Designer/FluxFlow.Components.Designer.csproj rename to src/Components/Designer/FluxFlow.Components.Designer/FluxFlow.Components.Designer.csproj index 6d44fbd8..acbc91f0 100644 --- a/src/FluxFlow.Components.Designer/FluxFlow.Components.Designer.csproj +++ b/src/Components/Designer/FluxFlow.Components.Designer/FluxFlow.Components.Designer.csproj @@ -4,17 +4,17 @@ FluxFlow.Components.Designer FluxFlow.Components.Designer FluxFlow.Components.Designer - 6.0.0-rc.1 + 7.0.0-rc.1 Reusable component metadata and canonical application editing contracts for FluxFlow. workflow;dataflow;components;metadata;designer - Uses one flat designed-component registration path with automatic immutable catalogs and registration-time metadata finalization; removes competing metadata builders, factories, public declaration, mutable catalog, terminal registration, provider, fallback-resolution, and production friend surfaces. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md - + diff --git a/src/FluxFlow.Components.Designer/Persistence/DesignerApplicationDocument.cs b/src/Components/Designer/FluxFlow.Components.Designer/Persistence/DesignerApplicationDocument.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Persistence/DesignerApplicationDocument.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Persistence/DesignerApplicationDocument.cs diff --git a/src/FluxFlow.Components.Designer/Persistence/DesignerApplicationLink.cs b/src/Components/Designer/FluxFlow.Components.Designer/Persistence/DesignerApplicationLink.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Persistence/DesignerApplicationLink.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Persistence/DesignerApplicationLink.cs diff --git a/src/FluxFlow.Components.Designer/Persistence/DesignerApplicationLoadResult.cs b/src/Components/Designer/FluxFlow.Components.Designer/Persistence/DesignerApplicationLoadResult.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Persistence/DesignerApplicationLoadResult.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Persistence/DesignerApplicationLoadResult.cs diff --git a/src/FluxFlow.Components.Designer/Persistence/DesignerApplicationPersistence.cs b/src/Components/Designer/FluxFlow.Components.Designer/Persistence/DesignerApplicationPersistence.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Persistence/DesignerApplicationPersistence.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Persistence/DesignerApplicationPersistence.cs diff --git a/src/FluxFlow.Components.Designer/Persistence/DesignerComponent.cs b/src/Components/Designer/FluxFlow.Components.Designer/Persistence/DesignerComponent.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Persistence/DesignerComponent.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Persistence/DesignerComponent.cs diff --git a/src/FluxFlow.Components.Designer/Persistence/DesignerResource.cs b/src/Components/Designer/FluxFlow.Components.Designer/Persistence/DesignerResource.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Persistence/DesignerResource.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Persistence/DesignerResource.cs diff --git a/src/FluxFlow.Components.Designer/Persistence/DesignerResourceNamespace.cs b/src/Components/Designer/FluxFlow.Components.Designer/Persistence/DesignerResourceNamespace.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Persistence/DesignerResourceNamespace.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Persistence/DesignerResourceNamespace.cs diff --git a/src/FluxFlow.Components.Designer/Persistence/DesignerResourceNode.cs b/src/Components/Designer/FluxFlow.Components.Designer/Persistence/DesignerResourceNode.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Persistence/DesignerResourceNode.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Persistence/DesignerResourceNode.cs diff --git a/src/FluxFlow.Components.Designer/Persistence/DesignerResourceReference.cs b/src/Components/Designer/FluxFlow.Components.Designer/Persistence/DesignerResourceReference.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Persistence/DesignerResourceReference.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Persistence/DesignerResourceReference.cs diff --git a/src/FluxFlow.Components.Designer/Persistence/DesignerWorkflow.cs b/src/Components/Designer/FluxFlow.Components.Designer/Persistence/DesignerWorkflow.cs similarity index 100% rename from src/FluxFlow.Components.Designer/Persistence/DesignerWorkflow.cs rename to src/Components/Designer/FluxFlow.Components.Designer/Persistence/DesignerWorkflow.cs diff --git a/src/FluxFlow.Components.Designer/README.md b/src/Components/Designer/FluxFlow.Components.Designer/README.md similarity index 94% rename from src/FluxFlow.Components.Designer/README.md rename to src/Components/Designer/FluxFlow.Components.Designer/README.md index 0791cf93..c185cdca 100644 --- a/src/FluxFlow.Components.Designer/README.md +++ b/src/Components/Designer/FluxFlow.Components.Designer/README.md @@ -1,5 +1,13 @@ # FluxFlow.Components.Designer +Canonical `HasFlowValueInput` declarations share their `FlowValueShape` with +runtime descriptors and designer metadata, including instance factory bindings. +The host sample projects the description, accepted kinds, and required property +names into `PortModel.InputShape` for serialization and display. A missing shape +means unknown input structure. Sample checks use +`ComponentDescriptor.ValidateInputShape` without running the component; passing +a sample does not guarantee that later values satisfy domain rules. + Reusable component presentation metadata and canonical application-editing contracts for FluxFlow. The package depends on `FluxFlow.Composition`, but not on `FluxFlow.Engine` or a rendering framework. @@ -141,7 +149,7 @@ choices, and attributes. References to unknown options, ports, or resources fail during registration. Duplicate names, invalid ranges, missing factories, duplicate output/event names, and invalid metadata also fail immediately. Event ports are explicit and may use any valid output name. They select a -`FlowEvent` source and publish `ComponentEvent` values; no event metadata is +`FlowEvent` source and publish canonical `FlowMessage` values; no event metadata is injected implicitly and `Events` is not reserved. Equivalent repeated built-in family registration is idempotent. A semantically diff --git a/src/Components/Expectations/FluxFlow.Components.Expectations.Composition/CompatibilitySuppressions.xml b/src/Components/Expectations/FluxFlow.Components.Expectations.Composition/CompatibilitySuppressions.xml new file mode 100644 index 00000000..a2eea36e --- /dev/null +++ b/src/Components/Expectations/FluxFlow.Components.Expectations.Composition/CompatibilitySuppressions.xml @@ -0,0 +1,62 @@ + + + + + CP0002 + M:FluxFlow.Components.Expectations.Composition.ExpectationsAuthoringExtensions.AddEventExpectation(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Projections.Contracts.ProjectionEvent,FluxFlow.Components.Expectations.Contracts.EventExpectationResult}@) + lib/net10.0/FluxFlow.Components.Expectations.Composition.dll + lib/net10.0/FluxFlow.Components.Expectations.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Expectations.Composition.ExpectationsAuthoringExtensions.AddEventExpectation(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Expectations.Composition.EventExpectationComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Projections.Contracts.ProjectionEvent,FluxFlow.Components.Expectations.Contracts.EventExpectationResult}@) + lib/net10.0/FluxFlow.Components.Expectations.Composition.dll + lib/net10.0/FluxFlow.Components.Expectations.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Expectations.Composition.ExpectationsAuthoringExtensions.AddEventExpectation(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Expectations.Composition.EventExpectationComponentBuilder}) + lib/net10.0/FluxFlow.Components.Expectations.Composition.dll + lib/net10.0/FluxFlow.Components.Expectations.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Expectations.Composition.ExpectationsComponents.get_EventExpectation + lib/net10.0/FluxFlow.Components.Expectations.Composition.dll + lib/net10.0/FluxFlow.Components.Expectations.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Expectations.Composition.ExpectationsAuthoringExtensions.AddEventExpectation(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Projections.Contracts.ProjectionEvent,FluxFlow.Components.Expectations.Contracts.EventExpectationResult}@) + lib/net8.0/FluxFlow.Components.Expectations.Composition.dll + lib/net8.0/FluxFlow.Components.Expectations.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Expectations.Composition.ExpectationsAuthoringExtensions.AddEventExpectation(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Expectations.Composition.EventExpectationComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Projections.Contracts.ProjectionEvent,FluxFlow.Components.Expectations.Contracts.EventExpectationResult}@) + lib/net8.0/FluxFlow.Components.Expectations.Composition.dll + lib/net8.0/FluxFlow.Components.Expectations.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Expectations.Composition.ExpectationsAuthoringExtensions.AddEventExpectation(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Expectations.Composition.EventExpectationComponentBuilder}) + lib/net8.0/FluxFlow.Components.Expectations.Composition.dll + lib/net8.0/FluxFlow.Components.Expectations.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Expectations.Composition.ExpectationsComponents.get_EventExpectation + lib/net8.0/FluxFlow.Components.Expectations.Composition.dll + lib/net8.0/FluxFlow.Components.Expectations.Composition.dll + true + + diff --git a/src/FluxFlow.Components.Expectations.Composition/ExpectationsAuthoringExtensions.cs b/src/Components/Expectations/FluxFlow.Components.Expectations.Composition/ExpectationsAuthoringExtensions.cs similarity index 82% rename from src/FluxFlow.Components.Expectations.Composition/ExpectationsAuthoringExtensions.cs rename to src/Components/Expectations/FluxFlow.Components.Expectations.Composition/ExpectationsAuthoringExtensions.cs index 0cc941a5..c92afb91 100644 --- a/src/FluxFlow.Components.Expectations.Composition/ExpectationsAuthoringExtensions.cs +++ b/src/Components/Expectations/FluxFlow.Components.Expectations.Composition/ExpectationsAuthoringExtensions.cs @@ -4,22 +4,24 @@ using FluxFlow.Components.Projections.Contracts; using FluxFlow.Composition.Authoring; +using FluxFlow.Data; + namespace FluxFlow.Components.Expectations.Composition; public static class ExpectationsComponents { - public static ComponentContract> EventExpectation { get; } = + public static ComponentContract> EventExpectation { get; } = DesignedComponentContract.Create( ExpectationsComponentDefinition.Types.EventExpectation, ExpectationsServiceCollectionExtensions.ConfigureEventExpectation, static () => new EventExpectationComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new InputOutputComponentHandle(component, ExpectationsComponentDefinition.Ports.Input, ExpectationsComponentDefinition.Ports.Output, ExpectationsComponentDefinition.Ports.Events)); + static component => new InputOutputComponentHandle(component, ExpectationsComponentDefinition.Ports.Input, ExpectationsComponentDefinition.Ports.Output, ExpectationsComponentDefinition.Ports.Events)); } public static class ExpectationsAuthoringExtensions { - public static InputOutputComponentHandle AddEventExpectation( + public static InputOutputComponentHandle AddEventExpectation( this WorkflowDefinitionBuilder workflow, string name, Action? configure = null) @@ -31,7 +33,7 @@ public static InputOutputComponentHandle expectation) + out InputOutputComponentHandle expectation) { expectation = workflow.AddEventExpectation(name); return workflow; @@ -41,7 +43,7 @@ public static WorkflowDefinitionBuilder AddEventExpectation( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle expectation) + out InputOutputComponentHandle expectation) { ArgumentNullException.ThrowIfNull(configure); expectation = workflow.AddEventExpectation(name, configure); diff --git a/src/FluxFlow.Components.Expectations.Composition/ExpectationsComponentDefinition.cs b/src/Components/Expectations/FluxFlow.Components.Expectations.Composition/ExpectationsComponentDefinition.cs similarity index 100% rename from src/FluxFlow.Components.Expectations.Composition/ExpectationsComponentDefinition.cs rename to src/Components/Expectations/FluxFlow.Components.Expectations.Composition/ExpectationsComponentDefinition.cs diff --git a/src/FluxFlow.Components.Expectations.Composition/ExpectationsServiceCollectionExtensions.cs b/src/Components/Expectations/FluxFlow.Components.Expectations.Composition/ExpectationsServiceCollectionExtensions.cs similarity index 90% rename from src/FluxFlow.Components.Expectations.Composition/ExpectationsServiceCollectionExtensions.cs rename to src/Components/Expectations/FluxFlow.Components.Expectations.Composition/ExpectationsServiceCollectionExtensions.cs index 03177ac9..5b40f86c 100644 --- a/src/FluxFlow.Components.Expectations.Composition/ExpectationsServiceCollectionExtensions.cs +++ b/src/Components/Expectations/FluxFlow.Components.Expectations.Composition/ExpectationsServiceCollectionExtensions.cs @@ -23,8 +23,8 @@ internal static void ConfigureEventExpectation(ComponentRegistrationBuilder comp component.WithDisplay("Event Expectation", "Expectations", "Resolves projection-event rules, timeout, completion, and evaluation failures through one result output.", "badge-check", "expectEvent", 460); component .UseFactory(CreateEventExpectationNode) - .HasInput(ExpectationsComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Projection event observed by the expectation.", true) - .HasOutput(ExpectationsComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Normal matched, unmet, timeout, completion, or evaluation-failure result.", true) + .HasFlowValueInput(ExpectationsComponentDefinition.Ports.Input, static node => node.Input, new FluxFlow.Components.Projections.Materialization.ProjectionEventMaterializer().InputShape, "Input", "Messages", 0, "Projection event observed by the expectation.", true) + .HasFlowValueOutput(ExpectationsComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Normal matched, unmet, timeout, completion, or evaluation-failure result.", true) .HasEvents(ExpectationsComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort expectation diagnostics."); component.AddOption(ExpectationsComponentDefinition.Options.Kind, OptionValueKind.Enum, "Kind", "Expectation behavior: expect a match or guard against one.", defaultValue: defaults.Kind.ToString(), section: "Expectation", importance: OptionDesignMetadataAttributeValues.Primary); component.AddOptionChoice(ExpectationsComponentDefinition.Options.Kind, EventExpectationNodeKind.Expect.ToString(), "Expect", "Satisfied when a matching event arrives."); diff --git a/src/FluxFlow.Components.Expectations.Composition/FluxFlow.Components.Expectations.Composition.csproj b/src/Components/Expectations/FluxFlow.Components.Expectations.Composition/FluxFlow.Components.Expectations.Composition.csproj similarity index 55% rename from src/FluxFlow.Components.Expectations.Composition/FluxFlow.Components.Expectations.Composition.csproj rename to src/Components/Expectations/FluxFlow.Components.Expectations.Composition/FluxFlow.Components.Expectations.Composition.csproj index d32ad894..0a50d3da 100644 --- a/src/FluxFlow.Components.Expectations.Composition/FluxFlow.Components.Expectations.Composition.csproj +++ b/src/Components/Expectations/FluxFlow.Components.Expectations.Composition/FluxFlow.Components.Expectations.Composition.csproj @@ -5,19 +5,19 @@ FluxFlow.Components.Expectations.Composition FluxFlow.Components.Expectations.Composition FluxFlow.Components.Expectations.Composition - 7.0.0-rc.1 + 8.0.0-rc.1 Canonical projection-event expectation registration and Designer metadata over exact host-owned clock addresses. workflow;dataflow;components;events;expectations;composition README.md - Requires event.expect; registers exact descriptors and Designer metadata through the flat designed-component API; keeps constants under ExpectationsComponentDefinition and removes its metadata-only factory. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. - - - - + + + + diff --git a/src/FluxFlow.Components.Expectations.Composition/README.md b/src/Components/Expectations/FluxFlow.Components.Expectations.Composition/README.md similarity index 100% rename from src/FluxFlow.Components.Expectations.Composition/README.md rename to src/Components/Expectations/FluxFlow.Components.Expectations.Composition/README.md diff --git a/src/Components/Expectations/FluxFlow.Components.Expectations/CompatibilitySuppressions.xml b/src/Components/Expectations/FluxFlow.Components.Expectations/CompatibilitySuppressions.xml new file mode 100644 index 00000000..d2b39578 --- /dev/null +++ b/src/Components/Expectations/FluxFlow.Components.Expectations/CompatibilitySuppressions.xml @@ -0,0 +1,20 @@ + + + + + CP0007 + T:FluxFlow.Components.Expectations.Nodes.EventExpectationNode + lib/net10.0/FluxFlow.Components.Expectations.dll + lib/net10.0/FluxFlow.Components.Expectations.dll + true + + + CP0007 + T:FluxFlow.Components.Expectations.Nodes.EventExpectationNode + lib/net8.0/FluxFlow.Components.Expectations.dll + lib/net8.0/FluxFlow.Components.Expectations.dll + true + + diff --git a/src/FluxFlow.Components.Expectations/Contracts/EventExpectationResult.cs b/src/Components/Expectations/FluxFlow.Components.Expectations/Contracts/EventExpectationResult.cs similarity index 100% rename from src/FluxFlow.Components.Expectations/Contracts/EventExpectationResult.cs rename to src/Components/Expectations/FluxFlow.Components.Expectations/Contracts/EventExpectationResult.cs diff --git a/src/FluxFlow.Components.Expectations/Contracts/EventExpectationResultKind.cs b/src/Components/Expectations/FluxFlow.Components.Expectations/Contracts/EventExpectationResultKind.cs similarity index 100% rename from src/FluxFlow.Components.Expectations/Contracts/EventExpectationResultKind.cs rename to src/Components/Expectations/FluxFlow.Components.Expectations/Contracts/EventExpectationResultKind.cs diff --git a/src/FluxFlow.Components.Expectations/Diagnostics/ExpectationDiagnosticNames.cs b/src/Components/Expectations/FluxFlow.Components.Expectations/Diagnostics/ExpectationDiagnosticNames.cs similarity index 100% rename from src/FluxFlow.Components.Expectations/Diagnostics/ExpectationDiagnosticNames.cs rename to src/Components/Expectations/FluxFlow.Components.Expectations/Diagnostics/ExpectationDiagnosticNames.cs diff --git a/src/FluxFlow.Components.Expectations/ExpectationErrorCodeNames.cs b/src/Components/Expectations/FluxFlow.Components.Expectations/ExpectationErrorCodeNames.cs similarity index 100% rename from src/FluxFlow.Components.Expectations/ExpectationErrorCodeNames.cs rename to src/Components/Expectations/FluxFlow.Components.Expectations/ExpectationErrorCodeNames.cs diff --git a/src/FluxFlow.Components.Expectations/ExpectationResultKinds.cs b/src/Components/Expectations/FluxFlow.Components.Expectations/ExpectationResultKinds.cs similarity index 100% rename from src/FluxFlow.Components.Expectations/ExpectationResultKinds.cs rename to src/Components/Expectations/FluxFlow.Components.Expectations/ExpectationResultKinds.cs diff --git a/src/FluxFlow.Components.Expectations/FluxFlow.Components.Expectations.csproj b/src/Components/Expectations/FluxFlow.Components.Expectations/FluxFlow.Components.Expectations.csproj similarity index 58% rename from src/FluxFlow.Components.Expectations/FluxFlow.Components.Expectations.csproj rename to src/Components/Expectations/FluxFlow.Components.Expectations/FluxFlow.Components.Expectations.csproj index 16559fef..a0ee7557 100644 --- a/src/FluxFlow.Components.Expectations/FluxFlow.Components.Expectations.csproj +++ b/src/Components/Expectations/FluxFlow.Components.Expectations/FluxFlow.Components.Expectations.csproj @@ -4,15 +4,15 @@ FluxFlow.Components.Expectations FluxFlow.Components.Expectations FluxFlow.Components.Expectations - 6.0.0 + 7.0.0-rc.1 Standalone projection-event expectations with typed outcomes and diagnostics. workflow;dataflow;components;events;expectations;monitoring - Migrates component inputs and outputs to typed FlowMessage<T> value-or-error contracts, removes universal FlowValue or FlowResult coupling, and keeps errors on the normal output. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md - - + + diff --git a/src/FluxFlow.Components.Expectations/Nodes/EventExpectationNode.cs b/src/Components/Expectations/FluxFlow.Components.Expectations/Nodes/EventExpectationNode.cs similarity index 89% rename from src/FluxFlow.Components.Expectations/Nodes/EventExpectationNode.cs rename to src/Components/Expectations/FluxFlow.Components.Expectations/Nodes/EventExpectationNode.cs index e73ac63a..b3f98eb8 100644 --- a/src/FluxFlow.Components.Expectations/Nodes/EventExpectationNode.cs +++ b/src/Components/Expectations/FluxFlow.Components.Expectations/Nodes/EventExpectationNode.cs @@ -17,13 +17,14 @@ namespace FluxFlow.Components.Expectations.Nodes; /// variants on the same output. /// public sealed class EventExpectationNode - : FlowNode + : FlowNode { private readonly object _gate = new(); private readonly EventExpectationOptions _options; private readonly EventFilter _filter; private readonly TimeProvider _clock; private readonly EventExpectationNodeKind _kind; + private readonly IFlowValueMaterializer _materializer; private readonly List _observedEvents = []; private readonly ActionBlock _timerResolutions; private ITimer? _timeoutTimer; @@ -47,6 +48,7 @@ private EventExpectationNode( _filter = _options.Filter!; _clock = clock ?? TimeProvider.System; _kind = _options.Kind; + _materializer = new FluxFlow.Components.Projections.Materialization.ProjectionEventMaterializer(); _timerResolutions = new ActionBlock( PublishAsync, new ExecutionDataflowBlockOptions @@ -85,23 +87,22 @@ public async Task CompleteWithResultAsync() await Completion.ConfigureAwait(false); } - protected override async Task ProcessAsync(FlowMessage message) + protected override async Task ProcessAsync(FlowMessage inputMessage) { - ArgumentNullException.ThrowIfNull(message); + ArgumentNullException.ThrowIfNull(inputMessage); Resolution? resolution = null; - if (message.IsError) + if (inputMessage.IsError) { lock (_gate) { if (_resolved) return; _resolved = true; - _lastMessage = message; resolution = new Resolution( - message.WithError(message.Error!), + inputMessage, ExpectationDiagnosticNames.EvaluationFailed, FlowEventLevel.Warning, - message.Error!.Message, + inputMessage.Error!.Message, ExpectationResultKinds.EvaluationFailed, Satisfied: null, Matched: null, @@ -114,6 +115,34 @@ protected override async Task ProcessAsync(FlowMessage message) return; } + var materialized = _materializer.Materialize(inputMessage.Value); + if (!materialized.IsSuccess) + { + var error = materialized.Error!; + lock (_gate) + { + if (_resolved) + return; + _resolved = true; + resolution = new Resolution( + inputMessage.WithError(error), + "event.expect.rejected", + FlowEventLevel.Warning, + error.Message, + ExpectationResultKinds.EvaluationFailed, + Satisfied: null, + Matched: null, + TimedOut: null, + IsError: true, + ReleaseTimer()); + } + + await PublishAsync(resolution).ConfigureAwait(false); + return; + } + + var message = inputMessage.ConvertValue(materialized.Value); + lock (_gate) { if (_resolved) @@ -258,7 +287,7 @@ protected override async ValueTask OnDisposeAsync() isTransient: false, details: CreateErrorDetails(message.Value, exception)); return new Resolution( - message.WithError(error), + message.WithError(error).ConvertError(), ExpectationDiagnosticNames.EvaluationFailed, FlowEventLevel.Warning, error.Message, @@ -300,7 +329,10 @@ protected override async ValueTask OnDisposeAsync() Filter = _filter, Reason = reason }; - var output = origin is null ? FlowMessage.Create(result) : origin.With(result); + var outputValue = FlowValue.From(result); + var output = origin is null + ? FlowMessage.Create(outputValue) + : origin.With(outputValue).ConvertValue(outputValue); var diagnosticName = matched ? ExpectationDiagnosticNames.Matched : timedOut @@ -440,7 +472,7 @@ private static JsonElement CreateErrorDetails( } private sealed record Resolution( - FlowMessage Output, + FlowMessage Output, string DiagnosticName, FlowEventLevel Level, string Message, diff --git a/src/FluxFlow.Components.Expectations/Nodes/EventExpectationNodeKind.cs b/src/Components/Expectations/FluxFlow.Components.Expectations/Nodes/EventExpectationNodeKind.cs similarity index 100% rename from src/FluxFlow.Components.Expectations/Nodes/EventExpectationNodeKind.cs rename to src/Components/Expectations/FluxFlow.Components.Expectations/Nodes/EventExpectationNodeKind.cs diff --git a/src/FluxFlow.Components.Expectations/Options/EventExpectationOptions.cs b/src/Components/Expectations/FluxFlow.Components.Expectations/Options/EventExpectationOptions.cs similarity index 100% rename from src/FluxFlow.Components.Expectations/Options/EventExpectationOptions.cs rename to src/Components/Expectations/FluxFlow.Components.Expectations/Options/EventExpectationOptions.cs diff --git a/src/FluxFlow.Components.Expectations/README.md b/src/Components/Expectations/FluxFlow.Components.Expectations/README.md similarity index 100% rename from src/FluxFlow.Components.Expectations/README.md rename to src/Components/Expectations/FluxFlow.Components.Expectations/README.md diff --git a/src/Components/FileSystem/FluxFlow.Components.FileSystem.Composition/CompatibilitySuppressions.xml b/src/Components/FileSystem/FluxFlow.Components.FileSystem.Composition/CompatibilitySuppressions.xml new file mode 100644 index 00000000..ac0ccd17 --- /dev/null +++ b/src/Components/FileSystem/FluxFlow.Components.FileSystem.Composition/CompatibilitySuppressions.xml @@ -0,0 +1,174 @@ + + + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemAuthoringExtensions.AddDirectoryEnumerate(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.FileSystem.Composition.DirectoryEnumerateComponentBuilder},FluxFlow.Composition.Authoring.OutputComponentHandle{FluxFlow.Components.FileSystem.Contracts.DirectoryEntry}@) + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemAuthoringExtensions.AddDirectoryEnumerate(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.FileSystem.Composition.DirectoryEnumerateComponentBuilder}) + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemAuthoringExtensions.AddFileRead(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.FileSystem.Composition.FileReadComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.FileSystem.Contracts.FileReadRequest,FluxFlow.Components.FileSystem.Contracts.FileReadContent}@) + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemAuthoringExtensions.AddFileRead(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.FileSystem.Composition.FileReadComponentBuilder}) + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemAuthoringExtensions.AddFileWatch(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.FileSystem.Composition.FileWatchComponentBuilder},FluxFlow.Composition.Authoring.OutputComponentHandle{FluxFlow.Components.FileSystem.Contracts.FileChange}@) + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemAuthoringExtensions.AddFileWatch(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.FileSystem.Composition.FileWatchComponentBuilder}) + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemAuthoringExtensions.AddFileWrite(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.FileSystem.Composition.FileWriteComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.FileSystem.Contracts.FileContentWriteRequest,FluxFlow.Components.FileSystem.Contracts.FileWriteResult}@) + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemAuthoringExtensions.AddFileWrite(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.FileSystem.Composition.FileWriteComponentBuilder}) + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemComponents.get_DirectoryEnumerate + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemComponents.get_FileRead + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemComponents.get_FileWatch + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemComponents.get_FileWrite + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net10.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemAuthoringExtensions.AddDirectoryEnumerate(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.FileSystem.Composition.DirectoryEnumerateComponentBuilder},FluxFlow.Composition.Authoring.OutputComponentHandle{FluxFlow.Components.FileSystem.Contracts.DirectoryEntry}@) + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemAuthoringExtensions.AddDirectoryEnumerate(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.FileSystem.Composition.DirectoryEnumerateComponentBuilder}) + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemAuthoringExtensions.AddFileRead(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.FileSystem.Composition.FileReadComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.FileSystem.Contracts.FileReadRequest,FluxFlow.Components.FileSystem.Contracts.FileReadContent}@) + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemAuthoringExtensions.AddFileRead(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.FileSystem.Composition.FileReadComponentBuilder}) + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemAuthoringExtensions.AddFileWatch(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.FileSystem.Composition.FileWatchComponentBuilder},FluxFlow.Composition.Authoring.OutputComponentHandle{FluxFlow.Components.FileSystem.Contracts.FileChange}@) + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemAuthoringExtensions.AddFileWatch(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.FileSystem.Composition.FileWatchComponentBuilder}) + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemAuthoringExtensions.AddFileWrite(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.FileSystem.Composition.FileWriteComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.FileSystem.Contracts.FileContentWriteRequest,FluxFlow.Components.FileSystem.Contracts.FileWriteResult}@) + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemAuthoringExtensions.AddFileWrite(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.FileSystem.Composition.FileWriteComponentBuilder}) + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemComponents.get_DirectoryEnumerate + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemComponents.get_FileRead + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemComponents.get_FileWatch + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Composition.FileSystemComponents.get_FileWrite + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + lib/net8.0/FluxFlow.Components.FileSystem.Composition.dll + true + + diff --git a/src/FluxFlow.Components.FileSystem.Composition/FileSystemAuthoringExtensions.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem.Composition/FileSystemAuthoringExtensions.cs similarity index 81% rename from src/FluxFlow.Components.FileSystem.Composition/FileSystemAuthoringExtensions.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem.Composition/FileSystemAuthoringExtensions.cs index 8240dd2b..f423bf97 100644 --- a/src/FluxFlow.Components.FileSystem.Composition/FileSystemAuthoringExtensions.cs +++ b/src/Components/FileSystem/FluxFlow.Components.FileSystem.Composition/FileSystemAuthoringExtensions.cs @@ -2,46 +2,48 @@ using FluxFlow.Components.Designer; using FluxFlow.Composition.Authoring; +using FluxFlow.Data; + namespace FluxFlow.Components.FileSystem.Composition; public static class FileSystemComponents { - public static ComponentContract> FileRead { get; } = + public static ComponentContract> FileRead { get; } = DesignedComponentContract.Create( FileSystemComponentDefinition.Types.Read, FileSystemServiceCollectionExtensions.ConfigureRead, static () => new FileReadComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new InputOutputComponentHandle(component, FileSystemComponentDefinition.Ports.Input, FileSystemComponentDefinition.Ports.Output, FileSystemComponentDefinition.Ports.Events)); + static component => new InputOutputComponentHandle(component, FileSystemComponentDefinition.Ports.Input, FileSystemComponentDefinition.Ports.Output, FileSystemComponentDefinition.Ports.Events)); - public static ComponentContract> FileWrite { get; } = + public static ComponentContract> FileWrite { get; } = DesignedComponentContract.Create( FileSystemComponentDefinition.Types.Write, FileSystemServiceCollectionExtensions.ConfigureWrite, static () => new FileWriteComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new InputOutputComponentHandle(component, FileSystemComponentDefinition.Ports.Input, FileSystemComponentDefinition.Ports.Output, FileSystemComponentDefinition.Ports.Events)); + static component => new InputOutputComponentHandle(component, FileSystemComponentDefinition.Ports.Input, FileSystemComponentDefinition.Ports.Output, FileSystemComponentDefinition.Ports.Events)); - public static ComponentContract> DirectoryEnumerate { get; } = + public static ComponentContract> DirectoryEnumerate { get; } = DesignedComponentContract.Create( FileSystemComponentDefinition.Types.DirectoryEnumerate, FileSystemServiceCollectionExtensions.ConfigureDirectoryEnumerate, static () => new DirectoryEnumerateComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new OutputComponentHandle(component, FileSystemComponentDefinition.Ports.Output, FileSystemComponentDefinition.Ports.Events)); + static component => new OutputComponentHandle(component, FileSystemComponentDefinition.Ports.Output, FileSystemComponentDefinition.Ports.Events)); - public static ComponentContract> FileWatch { get; } = + public static ComponentContract> FileWatch { get; } = DesignedComponentContract.Create( FileSystemComponentDefinition.Types.Watch, FileSystemServiceCollectionExtensions.ConfigureWatch, static () => new FileWatchComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new OutputComponentHandle(component, FileSystemComponentDefinition.Ports.Output, FileSystemComponentDefinition.Ports.Events)); + static component => new OutputComponentHandle(component, FileSystemComponentDefinition.Ports.Output, FileSystemComponentDefinition.Ports.Events)); } public static class FileSystemAuthoringExtensions { - public static InputOutputComponentHandle AddFileRead( + public static InputOutputComponentHandle AddFileRead( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -51,13 +53,13 @@ public static WorkflowDefinitionBuilder AddFileRead( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle read) + out InputOutputComponentHandle read) { read = workflow.AddFileRead(name, configure); return workflow; } - public static InputOutputComponentHandle AddFileWrite( + public static InputOutputComponentHandle AddFileWrite( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -67,13 +69,13 @@ public static WorkflowDefinitionBuilder AddFileWrite( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle write) + out InputOutputComponentHandle write) { write = workflow.AddFileWrite(name, configure); return workflow; } - public static OutputComponentHandle AddDirectoryEnumerate( + public static OutputComponentHandle AddDirectoryEnumerate( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -83,13 +85,13 @@ public static WorkflowDefinitionBuilder AddDirectoryEnumerate( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out OutputComponentHandle directory) + out OutputComponentHandle directory) { directory = workflow.AddDirectoryEnumerate(name, configure); return workflow; } - public static OutputComponentHandle AddFileWatch( + public static OutputComponentHandle AddFileWatch( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -99,7 +101,7 @@ public static WorkflowDefinitionBuilder AddFileWatch( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out OutputComponentHandle watch) + out OutputComponentHandle watch) { watch = workflow.AddFileWatch(name, configure); return workflow; diff --git a/src/FluxFlow.Components.FileSystem.Composition/FileSystemComponentDefinition.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem.Composition/FileSystemComponentDefinition.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem.Composition/FileSystemComponentDefinition.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem.Composition/FileSystemComponentDefinition.cs diff --git a/src/FluxFlow.Components.FileSystem.Composition/FileSystemServiceCollectionExtensions.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem.Composition/FileSystemServiceCollectionExtensions.cs similarity index 90% rename from src/FluxFlow.Components.FileSystem.Composition/FileSystemServiceCollectionExtensions.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem.Composition/FileSystemServiceCollectionExtensions.cs index 18aab487..42d9f546 100644 --- a/src/FluxFlow.Components.FileSystem.Composition/FileSystemServiceCollectionExtensions.cs +++ b/src/Components/FileSystem/FluxFlow.Components.FileSystem.Composition/FileSystemServiceCollectionExtensions.cs @@ -30,8 +30,8 @@ internal static void ConfigureRead(ComponentRegistrationBuilder component) component.AddOption(FileSystemComponentDefinition.Options.MaxBytes, OptionValueKind.Number, "Max Bytes", "Optional maximum file size to read. Leave empty for unlimited reads.", defaultValue: defaults.MaxBytes, min: 1, section: "Limits", importance: OptionDesignMetadataAttributeValues.Primary, editor: OptionDesignMetadataAttributeValues.Number); component .UseFactory(CreateFileReadNode) - .HasInput(FileSystemComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "File read request.", true) - .HasOutput(FileSystemComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "File content; read failures use the message error case.", true) + .HasFlowValueInput(FileSystemComponentDefinition.Ports.Input, static node => node.Input, new FluxFlow.Components.FileSystem.Materialization.FileReadRequestMaterializer().InputShape, "Input", "Messages", 0, "File read request.", true) + .HasFlowValueOutput(FileSystemComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "File content; read failures use the message error case.", true) .HasEvents(FileSystemComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort file-read diagnostics."); } @@ -46,8 +46,8 @@ internal static void ConfigureWrite(ComponentRegistrationBuilder component) component.AddAttribute("omittedOptionsReason", "Canonical file.write writes exact FlowContent bytes and does not encode text."); component .UseFactory(CreateFileWriteNode) - .HasInput(FileSystemComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "File content write request.", true) - .HasOutput(FileSystemComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "File write receipt; write failures use the message error case.", true) + .HasFlowValueInput(FileSystemComponentDefinition.Ports.Input, static node => node.Input, new FluxFlow.Components.FileSystem.Materialization.FileContentWriteRequestMaterializer().InputShape, "Input", "Messages", 0, "File content write request.", true) + .HasFlowValueOutput(FileSystemComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "File write receipt; write failures use the message error case.", true) .HasEvents(FileSystemComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort file-write diagnostics."); } @@ -66,7 +66,7 @@ internal static void ConfigureDirectoryEnumerate(ComponentRegistrationBuilder co component.AddOption(FileSystemComponentDefinition.Options.MaxEntries, OptionValueKind.Number, "Max Entries", "Optional maximum number of entries to emit.", min: 1, section: "Limits", importance: OptionDesignMetadataAttributeValues.Advanced, editor: OptionDesignMetadataAttributeValues.Number); component .UseFactory(CreateDirectoryEnumerateNode) - .HasOutput(FileSystemComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 0, "Directory entry.", true) + .HasFlowValueOutput(FileSystemComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 0, "Directory entry.", true) .HasEvents(FileSystemComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 1, "Best-effort directory-enumeration diagnostics."); } @@ -84,7 +84,7 @@ internal static void ConfigureWatch(ComponentRegistrationBuilder component) component.AddOption(FileSystemComponentDefinition.Options.InternalBufferSize, OptionValueKind.Number, "Internal Buffer Size", "Optional watcher buffer size in bytes.", min: 4096, max: 65536, section: "Watching", importance: OptionDesignMetadataAttributeValues.Advanced, editor: OptionDesignMetadataAttributeValues.Number); component .UseFactory(CreateFileWatchNode) - .HasOutput(FileSystemComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 0, "File change event.", true) + .HasFlowValueOutput(FileSystemComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 0, "File change event.", true) .HasEvents(FileSystemComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 1, "Best-effort file-watch diagnostics."); } diff --git a/src/FluxFlow.Components.FileSystem.Composition/FluxFlow.Components.FileSystem.Composition.csproj b/src/Components/FileSystem/FluxFlow.Components.FileSystem.Composition/FluxFlow.Components.FileSystem.Composition.csproj similarity index 64% rename from src/FluxFlow.Components.FileSystem.Composition/FluxFlow.Components.FileSystem.Composition.csproj rename to src/Components/FileSystem/FluxFlow.Components.FileSystem.Composition/FluxFlow.Components.FileSystem.Composition.csproj index 702387f1..ca051e42 100644 --- a/src/FluxFlow.Components.FileSystem.Composition/FluxFlow.Components.FileSystem.Composition.csproj +++ b/src/Components/FileSystem/FluxFlow.Components.FileSystem.Composition/FluxFlow.Components.FileSystem.Composition.csproj @@ -5,17 +5,17 @@ FluxFlow.Components.FileSystem.Composition FluxFlow.Components.FileSystem.Composition FluxFlow.Components.FileSystem.Composition - 7.0.0-rc.1 + 8.0.0-rc.1 FluxFlow.Composition registration and Designer metadata for typed file-system transforms and sources over host-owned keyed clocks. workflow;dataflow;components;files;composition README.md - Requires directory.list; registers exact descriptors and Designer metadata through the flat designed-component API; keeps constants under FileSystemComponentDefinition and removes its metadata-only factory. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. - - + + diff --git a/src/FluxFlow.Components.FileSystem.Composition/README.md b/src/Components/FileSystem/FluxFlow.Components.FileSystem.Composition/README.md similarity index 100% rename from src/FluxFlow.Components.FileSystem.Composition/README.md rename to src/Components/FileSystem/FluxFlow.Components.FileSystem.Composition/README.md diff --git a/src/Components/FileSystem/FluxFlow.Components.FileSystem/CompatibilitySuppressions.xml b/src/Components/FileSystem/FluxFlow.Components.FileSystem/CompatibilitySuppressions.xml new file mode 100644 index 00000000..b28eec54 --- /dev/null +++ b/src/Components/FileSystem/FluxFlow.Components.FileSystem/CompatibilitySuppressions.xml @@ -0,0 +1,146 @@ + + + + + CP0002 + M:FluxFlow.Components.FileSystem.Nodes.DirectoryEnumerateNode.get_Events + lib/net10.0/FluxFlow.Components.FileSystem.dll + lib/net10.0/FluxFlow.Components.FileSystem.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Nodes.DirectoryEnumerateNode.get_Output + lib/net10.0/FluxFlow.Components.FileSystem.dll + lib/net10.0/FluxFlow.Components.FileSystem.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Nodes.FileReadNode.get_Events + lib/net10.0/FluxFlow.Components.FileSystem.dll + lib/net10.0/FluxFlow.Components.FileSystem.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Nodes.FileReadNode.get_Input + lib/net10.0/FluxFlow.Components.FileSystem.dll + lib/net10.0/FluxFlow.Components.FileSystem.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Nodes.FileReadNode.get_Output + lib/net10.0/FluxFlow.Components.FileSystem.dll + lib/net10.0/FluxFlow.Components.FileSystem.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Nodes.FileWatchNode.get_Events + lib/net10.0/FluxFlow.Components.FileSystem.dll + lib/net10.0/FluxFlow.Components.FileSystem.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Nodes.FileWatchNode.get_Output + lib/net10.0/FluxFlow.Components.FileSystem.dll + lib/net10.0/FluxFlow.Components.FileSystem.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Nodes.FileWriteNode.get_Events + lib/net10.0/FluxFlow.Components.FileSystem.dll + lib/net10.0/FluxFlow.Components.FileSystem.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Nodes.FileWriteNode.get_Input + lib/net10.0/FluxFlow.Components.FileSystem.dll + lib/net10.0/FluxFlow.Components.FileSystem.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Nodes.FileWriteNode.get_Output + lib/net10.0/FluxFlow.Components.FileSystem.dll + lib/net10.0/FluxFlow.Components.FileSystem.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Nodes.DirectoryEnumerateNode.get_Events + lib/net8.0/FluxFlow.Components.FileSystem.dll + lib/net8.0/FluxFlow.Components.FileSystem.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Nodes.DirectoryEnumerateNode.get_Output + lib/net8.0/FluxFlow.Components.FileSystem.dll + lib/net8.0/FluxFlow.Components.FileSystem.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Nodes.FileReadNode.get_Events + lib/net8.0/FluxFlow.Components.FileSystem.dll + lib/net8.0/FluxFlow.Components.FileSystem.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Nodes.FileReadNode.get_Input + lib/net8.0/FluxFlow.Components.FileSystem.dll + lib/net8.0/FluxFlow.Components.FileSystem.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Nodes.FileReadNode.get_Output + lib/net8.0/FluxFlow.Components.FileSystem.dll + lib/net8.0/FluxFlow.Components.FileSystem.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Nodes.FileWatchNode.get_Events + lib/net8.0/FluxFlow.Components.FileSystem.dll + lib/net8.0/FluxFlow.Components.FileSystem.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Nodes.FileWatchNode.get_Output + lib/net8.0/FluxFlow.Components.FileSystem.dll + lib/net8.0/FluxFlow.Components.FileSystem.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Nodes.FileWriteNode.get_Events + lib/net8.0/FluxFlow.Components.FileSystem.dll + lib/net8.0/FluxFlow.Components.FileSystem.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Nodes.FileWriteNode.get_Input + lib/net8.0/FluxFlow.Components.FileSystem.dll + lib/net8.0/FluxFlow.Components.FileSystem.dll + true + + + CP0002 + M:FluxFlow.Components.FileSystem.Nodes.FileWriteNode.get_Output + lib/net8.0/FluxFlow.Components.FileSystem.dll + lib/net8.0/FluxFlow.Components.FileSystem.dll + true + + diff --git a/src/FluxFlow.Components.FileSystem/Contracts/DirectoryEntry.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Contracts/DirectoryEntry.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/Contracts/DirectoryEntry.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Contracts/DirectoryEntry.cs diff --git a/src/FluxFlow.Components.FileSystem/Contracts/FileChange.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Contracts/FileChange.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/Contracts/FileChange.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Contracts/FileChange.cs diff --git a/src/FluxFlow.Components.FileSystem/Contracts/FileContentWriteRequest.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Contracts/FileContentWriteRequest.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/Contracts/FileContentWriteRequest.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Contracts/FileContentWriteRequest.cs diff --git a/src/FluxFlow.Components.FileSystem/Contracts/FileReadContent.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Contracts/FileReadContent.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/Contracts/FileReadContent.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Contracts/FileReadContent.cs diff --git a/src/FluxFlow.Components.FileSystem/Contracts/FileReadMode.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Contracts/FileReadMode.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/Contracts/FileReadMode.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Contracts/FileReadMode.cs diff --git a/src/FluxFlow.Components.FileSystem/Contracts/FileReadRequest.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Contracts/FileReadRequest.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/Contracts/FileReadRequest.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Contracts/FileReadRequest.cs diff --git a/src/FluxFlow.Components.FileSystem/Contracts/FileWriteMode.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Contracts/FileWriteMode.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/Contracts/FileWriteMode.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Contracts/FileWriteMode.cs diff --git a/src/FluxFlow.Components.FileSystem/Contracts/FileWriteResult.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Contracts/FileWriteResult.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/Contracts/FileWriteResult.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Contracts/FileWriteResult.cs diff --git a/src/FluxFlow.Components.FileSystem/Diagnostics/FileSystemDiagnosticNames.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Diagnostics/FileSystemDiagnosticNames.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/Diagnostics/FileSystemDiagnosticNames.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Diagnostics/FileSystemDiagnosticNames.cs diff --git a/src/FluxFlow.Components.FileSystem/Diagnostics/FileSystemEventNames.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Diagnostics/FileSystemEventNames.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/Diagnostics/FileSystemEventNames.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Diagnostics/FileSystemEventNames.cs diff --git a/src/FluxFlow.Components.FileSystem/FileSystemErrorCodeNames.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/FileSystemErrorCodeNames.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/FileSystemErrorCodeNames.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/FileSystemErrorCodeNames.cs diff --git a/src/FluxFlow.Components.FileSystem/FileSystemErrorCodes.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/FileSystemErrorCodes.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/FileSystemErrorCodes.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/FileSystemErrorCodes.cs diff --git a/src/FluxFlow.Components.FileSystem/FileSystemResultKinds.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/FileSystemResultKinds.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/FileSystemResultKinds.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/FileSystemResultKinds.cs diff --git a/src/FluxFlow.Components.FileSystem/FluxFlow.Components.FileSystem.csproj b/src/Components/FileSystem/FluxFlow.Components.FileSystem/FluxFlow.Components.FileSystem.csproj similarity index 69% rename from src/FluxFlow.Components.FileSystem/FluxFlow.Components.FileSystem.csproj rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/FluxFlow.Components.FileSystem.csproj index f55d207b..323bd594 100644 --- a/src/FluxFlow.Components.FileSystem/FluxFlow.Components.FileSystem.csproj +++ b/src/Components/FileSystem/FluxFlow.Components.FileSystem/FluxFlow.Components.FileSystem.csproj @@ -4,14 +4,14 @@ FluxFlow.Components.FileSystem FluxFlow.Components.FileSystem FluxFlow.Components.FileSystem - 6.0.1 + 7.0.0-rc.1 Standalone typed FluxFlow file-system nodes with exact FlowContent read/write transforms and directory/watch source contracts. No engine required. workflow;dataflow;components;files - Uses the shared bounded node execution lifecycle while preserving file operations, errors, backpressure, and completion behavior. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md - + diff --git a/src/Components/FileSystem/FluxFlow.Components.FileSystem/Materialization/FileSystemRequestMaterializers.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Materialization/FileSystemRequestMaterializers.cs new file mode 100644 index 00000000..af316598 --- /dev/null +++ b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Materialization/FileSystemRequestMaterializers.cs @@ -0,0 +1,16 @@ +using FluxFlow.Components.FileSystem.Contracts; +using FluxFlow.Data; + +namespace FluxFlow.Components.FileSystem.Materialization; + +public sealed class FileReadRequestMaterializer() + : JsonFlowValueMaterializer( + "filesystem.read.invalid_shape", + "FileSystem", + FlowValueShape.Object("A file read request object with a path and optional content settings.", "path")); + +public sealed class FileContentWriteRequestMaterializer() + : JsonFlowValueMaterializer( + "filesystem.write.invalid_shape", + "FileSystem", + FlowValueShape.Object("A file write request object with path, content, mode, and directory settings.", "path", "content")); diff --git a/src/FluxFlow.Components.FileSystem/Nodes/BoundedFileReader.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/BoundedFileReader.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/Nodes/BoundedFileReader.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/BoundedFileReader.cs diff --git a/src/FluxFlow.Components.FileSystem/Nodes/DirectoryEnumerateNode.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/DirectoryEnumerateNode.cs similarity index 97% rename from src/FluxFlow.Components.FileSystem/Nodes/DirectoryEnumerateNode.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/DirectoryEnumerateNode.cs index 2633a383..641035e2 100644 --- a/src/FluxFlow.Components.FileSystem/Nodes/DirectoryEnumerateNode.cs +++ b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/DirectoryEnumerateNode.cs @@ -1,4 +1,5 @@ using System.Threading.Tasks.Dataflow; +using FluxFlow.Data; using FluxFlow.Components.FileSystem.Contracts; using FluxFlow.Components.FileSystem.Diagnostics; using FluxFlow.Components.FileSystem.Options; @@ -20,7 +21,7 @@ public sealed class DirectoryEnumerateNode : IFlowSource private readonly DirectoryEnumerateOptions _options; private readonly TimeProvider _clock; - private readonly FileSystemSourcePipeline _pipeline; + private readonly FileSystemSourcePipeline _pipeline; public DirectoryEnumerateNode( DirectoryEnumerateOptions options, @@ -28,14 +29,14 @@ public DirectoryEnumerateNode( { _options = ValidateOptions(options); _clock = clock ?? TimeProvider.System; - _pipeline = new FileSystemSourcePipeline( + _pipeline = new FileSystemSourcePipeline( _options.BoundedCapacity, RunAsync); } - public ISourceBlock> Output => _pipeline.Output; + public ISourceBlock Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; @@ -76,7 +77,7 @@ private async Task RunAsync(CancellationToken cancellationToken) break; await _pipeline.EmitAsync( - FlowMessage.Create(entry), + FlowMessage.Create(FlowValue.From(entry)), cancellationToken) .ConfigureAwait(false); diff --git a/src/FluxFlow.Components.FileSystem/Nodes/FileReadNode.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/FileReadNode.cs similarity index 97% rename from src/FluxFlow.Components.FileSystem/Nodes/FileReadNode.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/FileReadNode.cs index 26181fb1..85412db2 100644 --- a/src/FluxFlow.Components.FileSystem/Nodes/FileReadNode.cs +++ b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/FileReadNode.cs @@ -34,14 +34,17 @@ public FileReadNode( _clock = clock ?? TimeProvider.System; _pipeline = new FileSystemOperationPipeline( _options.BoundedCapacity, + _clock, + new Materialization.FileReadRequestMaterializer(), + "file.read.rejected", ProcessAsync); } - public ITargetBlock> Input => _pipeline.Input; + public ITargetBlock Input => _pipeline.Input; - public ISourceBlock> Output => _pipeline.Output; + public ISourceBlock Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; diff --git a/src/FluxFlow.Components.FileSystem/Nodes/FileSystemOperationException.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/FileSystemOperationException.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/Nodes/FileSystemOperationException.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/FileSystemOperationException.cs diff --git a/src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/FileSystemOperationPipeline.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/FileSystemOperationPipeline.cs new file mode 100644 index 00000000..1d1c60fb --- /dev/null +++ b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/FileSystemOperationPipeline.cs @@ -0,0 +1,84 @@ +using FluxFlow.Data; +using FluxFlow.Nodes; + +namespace FluxFlow.Components.FileSystem.Nodes; + +internal sealed class FileSystemOperationPipeline : FlowNode +{ + private readonly TimeProvider _clock; + private readonly IFlowValueMaterializer _materializer; + private readonly string _rejectionEventName; + private readonly Func, CancellationToken, Task>> _process; + + public FileSystemOperationPipeline( + int boundedCapacity, + TimeProvider clock, + IFlowValueMaterializer materializer, + string rejectionEventName, + Func, CancellationToken, Task>> process) + : base(CreateOptions(boundedCapacity)) + { + ArgumentNullException.ThrowIfNull(clock); + ArgumentNullException.ThrowIfNull(materializer); + ArgumentException.ThrowIfNullOrWhiteSpace(rejectionEventName); + ArgumentNullException.ThrowIfNull(process); + _clock = clock; + _materializer = materializer; + _rejectionEventName = rejectionEventName; + _process = process; + } + + public void PublishEvent(FlowEvent @event) + { + ArgumentNullException.ThrowIfNull(@event); + EmitEvent(@event); + } + + protected override bool HandlesErrors => true; + + protected override async Task ProcessAsync(FlowMessage message) + { + if (message.IsError) + { + await EmitAsync(message, Stopping).ConfigureAwait(false); + return; + } + + var materialized = _materializer.Materialize(message.Value); + if (!materialized.IsSuccess) + { + var error = materialized.Error!; + EmitEvent(new FlowEvent + { + Timestamp = _clock.GetUtcNow(), + CorrelationId = message.CorrelationId, + Name = _rejectionEventName, + Level = FlowEventLevel.Warning, + Message = error.Message, + Attributes = new Dictionary(StringComparer.Ordinal) + { + ["errorCode"] = error.Code + } + }); + await EmitAsync(message.WithError(error), Stopping).ConfigureAwait(false); + return; + } + + var typedMessage = message.ConvertValue(materialized.Value); + var typedResult = await _process(typedMessage, Stopping).ConfigureAwait(false); + var result = typedResult.IsError + ? typedResult.ConvertError() + : typedResult.ConvertValue(FlowValue.From(typedResult.Value)); + await EmitAsync(result, Stopping).ConfigureAwait(false); + } + + private static FlowNodeOptions CreateOptions(int boundedCapacity) + { + ArgumentOutOfRangeException.ThrowIfLessThan(boundedCapacity, 1); + return new FlowNodeOptions + { + InputCapacity = boundedCapacity, + OutputCapacity = boundedCapacity + }; + } +} diff --git a/src/FluxFlow.Components.FileSystem/Nodes/FileSystemSourceException.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/FileSystemSourceException.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/Nodes/FileSystemSourceException.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/FileSystemSourceException.cs diff --git a/src/FluxFlow.Components.FileSystem/Nodes/FileSystemSourcePipeline.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/FileSystemSourcePipeline.cs similarity index 90% rename from src/FluxFlow.Components.FileSystem/Nodes/FileSystemSourcePipeline.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/FileSystemSourcePipeline.cs index cd0fb3a3..53f50b0b 100644 --- a/src/FluxFlow.Components.FileSystem/Nodes/FileSystemSourcePipeline.cs +++ b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/FileSystemSourcePipeline.cs @@ -1,12 +1,13 @@ using System.Threading.Tasks.Dataflow; +using FluxFlow.Data; using FluxFlow.Nodes; namespace FluxFlow.Components.FileSystem.Nodes; -internal sealed class FileSystemSourcePipeline : IAsyncDisposable +internal sealed class FileSystemSourcePipeline : IAsyncDisposable { - private readonly FlowOutput> _output; - private readonly BroadcastBlock _events = new(static value => value); + private readonly FlowOutput _output; + private readonly BroadcastBlock _events = new(static value => value); private readonly Func _run; private readonly CancellationTokenSource _stopping = new(); private readonly TaskCompletionSource _completion = @@ -22,14 +23,14 @@ public FileSystemSourcePipeline( ArgumentNullException.ThrowIfNull(run); _run = run; - _output = new FlowOutput>( + _output = new FlowOutput( new FlowOutputOptions { Capacity = boundedCapacity }); _ = ObserveOutputFailureAsync(); } - public ISourceBlock> Output => _output; + public ISourceBlock Output => _output; - public ISourceBlock Events => _events; + public ISourceBlock Events => _events; public Task Completion => _completion.Task; @@ -47,7 +48,7 @@ public Task StartAsync(CancellationToken cancellationToken = default) } public async ValueTask EmitAsync( - FlowMessage message, + FlowMessage message, CancellationToken cancellationToken) { if (await _output.SendAsync(message, cancellationToken).ConfigureAwait(false)) diff --git a/src/FluxFlow.Components.FileSystem/Nodes/FileWatchNode.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/FileWatchNode.cs similarity index 97% rename from src/FluxFlow.Components.FileSystem/Nodes/FileWatchNode.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/FileWatchNode.cs index eadef6a5..17e0b8c8 100644 --- a/src/FluxFlow.Components.FileSystem/Nodes/FileWatchNode.cs +++ b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/FileWatchNode.cs @@ -1,5 +1,6 @@ using System.Threading.Tasks.Dataflow; using System.Threading.Channels; +using FluxFlow.Data; using FluxFlow.Components.FileSystem.Contracts; using FluxFlow.Components.FileSystem.Diagnostics; using FluxFlow.Components.FileSystem.Options; @@ -23,7 +24,7 @@ public sealed class FileWatchNode : IFlowSource private readonly FileWatchOptions _options; private readonly TimeProvider _clock; private readonly NotifyFilters _notifyFilters; - private readonly FileSystemSourcePipeline _pipeline; + private readonly FileSystemSourcePipeline _pipeline; private readonly Channel _changes; private FileSystemWatcher? _watcher; private string? _resolvedDirectory; @@ -43,14 +44,14 @@ public FileWatchNode( SingleReader = true, SingleWriter = false }); - _pipeline = new FileSystemSourcePipeline( + _pipeline = new FileSystemSourcePipeline( _options.BoundedCapacity, RunAsync); } - public ISourceBlock> Output => _pipeline.Output; + public ISourceBlock Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; @@ -93,7 +94,7 @@ private async Task RunAsync(CancellationToken cancellationToken) .ConfigureAwait(false)) { await _pipeline.EmitAsync( - FlowMessage.Create(value), + FlowMessage.Create(FlowValue.From(value)), cancellationToken).ConfigureAwait(false); PublishEvent( diff --git a/src/FluxFlow.Components.FileSystem/Nodes/FileWriteNode.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/FileWriteNode.cs similarity index 97% rename from src/FluxFlow.Components.FileSystem/Nodes/FileWriteNode.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/FileWriteNode.cs index 6d96887e..9b3db133 100644 --- a/src/FluxFlow.Components.FileSystem/Nodes/FileWriteNode.cs +++ b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Nodes/FileWriteNode.cs @@ -30,14 +30,17 @@ public FileWriteNode( _clock = clock ?? TimeProvider.System; _pipeline = new FileSystemOperationPipeline( _options.BoundedCapacity, + _clock, + new Materialization.FileContentWriteRequestMaterializer(), + "file.write.rejected", ProcessAsync); } - public ITargetBlock> Input => _pipeline.Input; + public ITargetBlock Input => _pipeline.Input; - public ISourceBlock> Output => _pipeline.Output; + public ISourceBlock Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; diff --git a/src/FluxFlow.Components.FileSystem/Options/DirectoryEnumerateOptions.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Options/DirectoryEnumerateOptions.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/Options/DirectoryEnumerateOptions.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Options/DirectoryEnumerateOptions.cs diff --git a/src/FluxFlow.Components.FileSystem/Options/FileReadOptions.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Options/FileReadOptions.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/Options/FileReadOptions.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Options/FileReadOptions.cs diff --git a/src/FluxFlow.Components.FileSystem/Options/FileSystemPathPolicy.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Options/FileSystemPathPolicy.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/Options/FileSystemPathPolicy.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Options/FileSystemPathPolicy.cs diff --git a/src/FluxFlow.Components.FileSystem/Options/FileSystemPathResolutionException.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Options/FileSystemPathResolutionException.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/Options/FileSystemPathResolutionException.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Options/FileSystemPathResolutionException.cs diff --git a/src/FluxFlow.Components.FileSystem/Options/FileSystemPathResolver.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Options/FileSystemPathResolver.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/Options/FileSystemPathResolver.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Options/FileSystemPathResolver.cs diff --git a/src/FluxFlow.Components.FileSystem/Options/FileWatchNotifyFilters.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Options/FileWatchNotifyFilters.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/Options/FileWatchNotifyFilters.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Options/FileWatchNotifyFilters.cs diff --git a/src/FluxFlow.Components.FileSystem/Options/FileWatchOptions.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Options/FileWatchOptions.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/Options/FileWatchOptions.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Options/FileWatchOptions.cs diff --git a/src/FluxFlow.Components.FileSystem/Options/FileWriteOptions.cs b/src/Components/FileSystem/FluxFlow.Components.FileSystem/Options/FileWriteOptions.cs similarity index 100% rename from src/FluxFlow.Components.FileSystem/Options/FileWriteOptions.cs rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/Options/FileWriteOptions.cs diff --git a/src/FluxFlow.Components.FileSystem/README.md b/src/Components/FileSystem/FluxFlow.Components.FileSystem/README.md similarity index 100% rename from src/FluxFlow.Components.FileSystem/README.md rename to src/Components/FileSystem/FluxFlow.Components.FileSystem/README.md diff --git a/src/Components/Http/FluxFlow.Components.Http.AspNetCore/CompatibilitySuppressions.xml b/src/Components/Http/FluxFlow.Components.Http.AspNetCore/CompatibilitySuppressions.xml new file mode 100644 index 00000000..a00a02e3 --- /dev/null +++ b/src/Components/Http/FluxFlow.Components.Http.AspNetCore/CompatibilitySuppressions.xml @@ -0,0 +1,48 @@ + + + + + CP0002 + M:FluxFlow.Components.Http.AspNetCore.HttpTriggerNode.get_Events + lib/net10.0/FluxFlow.Components.Http.AspNetCore.dll + lib/net10.0/FluxFlow.Components.Http.AspNetCore.dll + true + + + CP0002 + M:FluxFlow.Components.Http.AspNetCore.HttpTriggerNode.get_Output + lib/net10.0/FluxFlow.Components.Http.AspNetCore.dll + lib/net10.0/FluxFlow.Components.Http.AspNetCore.dll + true + + + CP0002 + M:FluxFlow.Components.Http.AspNetCore.HttpTriggerNode.get_Responses + lib/net10.0/FluxFlow.Components.Http.AspNetCore.dll + lib/net10.0/FluxFlow.Components.Http.AspNetCore.dll + true + + + CP0002 + M:FluxFlow.Components.Http.AspNetCore.HttpTriggerNode.get_Events + lib/net8.0/FluxFlow.Components.Http.AspNetCore.dll + lib/net8.0/FluxFlow.Components.Http.AspNetCore.dll + true + + + CP0002 + M:FluxFlow.Components.Http.AspNetCore.HttpTriggerNode.get_Output + lib/net8.0/FluxFlow.Components.Http.AspNetCore.dll + lib/net8.0/FluxFlow.Components.Http.AspNetCore.dll + true + + + CP0002 + M:FluxFlow.Components.Http.AspNetCore.HttpTriggerNode.get_Responses + lib/net8.0/FluxFlow.Components.Http.AspNetCore.dll + lib/net8.0/FluxFlow.Components.Http.AspNetCore.dll + true + + diff --git a/src/FluxFlow.Components.Http.AspNetCore/FluxFlow.Components.Http.AspNetCore.csproj b/src/Components/Http/FluxFlow.Components.Http.AspNetCore/FluxFlow.Components.Http.AspNetCore.csproj similarity index 74% rename from src/FluxFlow.Components.Http.AspNetCore/FluxFlow.Components.Http.AspNetCore.csproj rename to src/Components/Http/FluxFlow.Components.Http.AspNetCore/FluxFlow.Components.Http.AspNetCore.csproj index f9a5223a..eda8a6cf 100644 --- a/src/FluxFlow.Components.Http.AspNetCore/FluxFlow.Components.Http.AspNetCore.csproj +++ b/src/Components/Http/FluxFlow.Components.Http.AspNetCore/FluxFlow.Components.Http.AspNetCore.csproj @@ -5,11 +5,11 @@ FluxFlow.Components.Http.AspNetCore FluxFlow.Components.Http.AspNetCore FluxFlow.Components.Http.AspNetCore - 2.0.0 + 3.0.0-rc.1 ASP.NET Core HTTP trigger adapter for FluxFlow: maps an endpoint's HttpContext onto the request/reply bridge so an inbound request flows into a graph and the correlated response is written back. The only FluxFlow package that references ASP.NET Core. workflow;dataflow;components;http;trigger;aspnetcore README.md - Updates HTTP trigger integration for typed workflow responses and normal in-band errors while preserving endpoint and request/reply behavior. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. true @@ -19,7 +19,7 @@ - + diff --git a/src/FluxFlow.Components.Http.AspNetCore/FluxFlowHttpTriggerServiceCollectionExtensions.cs b/src/Components/Http/FluxFlow.Components.Http.AspNetCore/FluxFlowHttpTriggerServiceCollectionExtensions.cs similarity index 100% rename from src/FluxFlow.Components.Http.AspNetCore/FluxFlowHttpTriggerServiceCollectionExtensions.cs rename to src/Components/Http/FluxFlow.Components.Http.AspNetCore/FluxFlowHttpTriggerServiceCollectionExtensions.cs diff --git a/src/FluxFlow.Components.Http.AspNetCore/FluxFlowTriggerEndpointExtensions.cs b/src/Components/Http/FluxFlow.Components.Http.AspNetCore/FluxFlowTriggerEndpointExtensions.cs similarity index 100% rename from src/FluxFlow.Components.Http.AspNetCore/FluxFlowTriggerEndpointExtensions.cs rename to src/Components/Http/FluxFlow.Components.Http.AspNetCore/FluxFlowTriggerEndpointExtensions.cs diff --git a/src/FluxFlow.Components.Http.AspNetCore/HttpRequestContext.cs b/src/Components/Http/FluxFlow.Components.Http.AspNetCore/HttpRequestContext.cs similarity index 100% rename from src/FluxFlow.Components.Http.AspNetCore/HttpRequestContext.cs rename to src/Components/Http/FluxFlow.Components.Http.AspNetCore/HttpRequestContext.cs diff --git a/src/Components/Http/FluxFlow.Components.Http.AspNetCore/HttpTriggerNode.cs b/src/Components/Http/FluxFlow.Components.Http.AspNetCore/HttpTriggerNode.cs new file mode 100644 index 00000000..e2601534 --- /dev/null +++ b/src/Components/Http/FluxFlow.Components.Http.AspNetCore/HttpTriggerNode.cs @@ -0,0 +1,192 @@ +using FluxFlow.Components.Http.Contracts; +using FluxFlow.Components.RequestReply; +using FluxFlow.Data; +using FluxFlow.Nodes; +using System.Threading.Tasks.Dataflow; + +namespace FluxFlow.Components.Http.AspNetCore; + +/// +/// The HTTP trigger as a component. It is given its inbound request source (injected, +/// keyed) and uses a to +/// correlate replies back to callers. It exposes the graph-facing ports: requests on +/// , responses back on . The endpoint and the +/// transport never appear here — only the request source and the coordinator. +/// +public sealed class HttpTriggerNode : IFlowNode +{ + private readonly RequestReplyCoordinator _coordinator; + private readonly FlowOutput _output; + private readonly TimeProvider _clock; + private readonly TransformBlock> _responses; + private readonly ActionBlock> _outputPump; + private readonly BroadcastBlock _events = new(static @event => @event); + private readonly ActionBlock _eventRelay; + private readonly IDisposable _requestLink; + private readonly IDisposable _responseLink; + private readonly IDisposable _outputLink; + private readonly IDisposable _eventLink; + private readonly Task _completion; + private readonly HttpTriggerReplyMaterializer _replyMaterializer = new(); + private int _disposed; + + public HttpTriggerNode( + ISourceBlock> requests, + RequestReplyOptions? options = null, + TimeProvider? clock = null) + { + ArgumentNullException.ThrowIfNull(requests); + var capacity = options?.Capacity ?? 128; + _clock = clock ?? TimeProvider.System; + _coordinator = new RequestReplyCoordinator(options, _clock); + _output = new FlowOutput( + new FlowOutputOptions { Capacity = capacity }); + _responses = new TransformBlock>( + MaterializeReply, + new ExecutionDataflowBlockOptions + { + BoundedCapacity = capacity, + EnsureOrdered = true, + MaxDegreeOfParallelism = 1 + }); + _outputPump = new ActionBlock>( + CanonicalizeRequestAsync, + new ExecutionDataflowBlockOptions + { + BoundedCapacity = capacity, + EnsureOrdered = true, + MaxDegreeOfParallelism = 1 + }); + _eventRelay = new ActionBlock(@event => _events.Post(@event)); + + _requestLink = requests.LinkTo( + _coordinator.Incoming, + new DataflowLinkOptions { PropagateCompletion = true }); + _responseLink = _responses.LinkTo( + _coordinator.Responses, + new DataflowLinkOptions { PropagateCompletion = true }); + _outputLink = _coordinator.Output.LinkTo( + _outputPump, + new DataflowLinkOptions { PropagateCompletion = true }); + _eventLink = _coordinator.Events.LinkTo( + _eventRelay, + new DataflowLinkOptions { PropagateCompletion = true }); + _completion = CompleteAsync(); + } + + /// Inbound requests for the graph to handle. + public ISourceBlock Output => _output; + + /// Where the graph posts the correlated reply. + public ITargetBlock Responses => _responses; + + public ISourceBlock Events => _events; + + public Task Completion => _completion; + + public void Complete() + { + _responses.Complete(); + _coordinator.Complete(); + } + + public void Fault(Exception exception) + { + ArgumentNullException.ThrowIfNull(exception); + ((IDataflowBlock)_responses).Fault(exception); + _coordinator.Fault(exception); + } + + public async ValueTask DisposeAsync() + { + if (Interlocked.Exchange(ref _disposed, 1) != 0) + return; + + Complete(); + try + { + await _completion.ConfigureAwait(false); + } + catch + { + // Completion remains the authoritative fault surface. + } + finally + { + _requestLink.Dispose(); + _responseLink.Dispose(); + _outputLink.Dispose(); + _eventLink.Dispose(); + await _coordinator.DisposeAsync().ConfigureAwait(false); + await _output.DisposeAsync().ConfigureAwait(false); + } + } + + private FlowMessage MaterializeReply(FlowMessage message) + { + if (message.IsError) + return message.ConvertError(); + + var materialization = _replyMaterializer.Materialize(message.Value); + if (materialization.IsSuccess) + return message.ConvertValue(materialization.Value); + + var error = materialization.Error!; + _events.Post(new FlowEvent + { + Timestamp = _clock.GetUtcNow(), + CorrelationId = message.CorrelationId, + Name = "http.trigger.reply.rejected", + Level = FlowEventLevel.Warning, + Message = error.Message, + Attributes = new Dictionary(StringComparer.Ordinal) + { + ["errorCode"] = error.Code, + ["isError"] = true, + ["nodeType"] = "http.trigger" + } + }); + return message.WithError(error).ConvertError(); + } + + private async Task CanonicalizeRequestAsync(FlowMessage message) + { + var canonical = message.IsError + ? message.ConvertError() + : message.ConvertValue(FlowValue.From(message.Value)); + if (!await _output.SendAsync(canonical).ConfigureAwait(false)) + throw new InvalidOperationException("HTTP trigger output is unavailable."); + } + + private async Task CompleteAsync() + { + try + { + await _coordinator.Completion.ConfigureAwait(false); + await _outputPump.Completion.ConfigureAwait(false); + await _eventRelay.Completion.ConfigureAwait(false); + _output.Complete(); + _events.Complete(); + await Task.WhenAll(_output.Completion, _events.Completion).ConfigureAwait(false); + } + catch (Exception exception) + { + _output.Fault(exception); + _events.Complete(); + throw; + } + } + + private sealed class HttpTriggerReplyMaterializer + : JsonFlowValueMaterializer + { + internal HttpTriggerReplyMaterializer() + : base( + "http.trigger.reply.invalid_shape", + "HTTP", + FlowValueShape.Object( + "An HTTP reply object with statusCode, headers, body, and contentType fields.")) + { + } + } +} diff --git a/src/FluxFlow.Components.Http.AspNetCore/HttpTriggerSource.cs b/src/Components/Http/FluxFlow.Components.Http.AspNetCore/HttpTriggerSource.cs similarity index 100% rename from src/FluxFlow.Components.Http.AspNetCore/HttpTriggerSource.cs rename to src/Components/Http/FluxFlow.Components.Http.AspNetCore/HttpTriggerSource.cs diff --git a/src/FluxFlow.Components.Http.AspNetCore/README.md b/src/Components/Http/FluxFlow.Components.Http.AspNetCore/README.md similarity index 100% rename from src/FluxFlow.Components.Http.AspNetCore/README.md rename to src/Components/Http/FluxFlow.Components.Http.AspNetCore/README.md diff --git a/src/Components/Http/FluxFlow.Components.Http.Composition/CompatibilitySuppressions.xml b/src/Components/Http/FluxFlow.Components.Http.Composition/CompatibilitySuppressions.xml new file mode 100644 index 00000000..f6b33df1 --- /dev/null +++ b/src/Components/Http/FluxFlow.Components.Http.Composition/CompatibilitySuppressions.xml @@ -0,0 +1,48 @@ + + + + + CP0002 + M:FluxFlow.Components.Http.Composition.HttpAuthoringExtensions.AddHttpRequest(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Http.Composition.HttpRequestComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Http.Contracts.HttpClientRequest,FluxFlow.Components.Http.Contracts.HttpResponseResult}@) + lib/net10.0/FluxFlow.Components.Http.Composition.dll + lib/net10.0/FluxFlow.Components.Http.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Http.Composition.HttpAuthoringExtensions.AddHttpRequest(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Http.Composition.HttpRequestComponentBuilder}) + lib/net10.0/FluxFlow.Components.Http.Composition.dll + lib/net10.0/FluxFlow.Components.Http.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Http.Composition.HttpComponents.get_HttpRequest + lib/net10.0/FluxFlow.Components.Http.Composition.dll + lib/net10.0/FluxFlow.Components.Http.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Http.Composition.HttpAuthoringExtensions.AddHttpRequest(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Http.Composition.HttpRequestComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Http.Contracts.HttpClientRequest,FluxFlow.Components.Http.Contracts.HttpResponseResult}@) + lib/net8.0/FluxFlow.Components.Http.Composition.dll + lib/net8.0/FluxFlow.Components.Http.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Http.Composition.HttpAuthoringExtensions.AddHttpRequest(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Http.Composition.HttpRequestComponentBuilder}) + lib/net8.0/FluxFlow.Components.Http.Composition.dll + lib/net8.0/FluxFlow.Components.Http.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Http.Composition.HttpComponents.get_HttpRequest + lib/net8.0/FluxFlow.Components.Http.Composition.dll + lib/net8.0/FluxFlow.Components.Http.Composition.dll + true + + diff --git a/src/FluxFlow.Components.Http.Composition/FluxFlow.Components.Http.Composition.csproj b/src/Components/Http/FluxFlow.Components.Http.Composition/FluxFlow.Components.Http.Composition.csproj similarity index 65% rename from src/FluxFlow.Components.Http.Composition/FluxFlow.Components.Http.Composition.csproj rename to src/Components/Http/FluxFlow.Components.Http.Composition/FluxFlow.Components.Http.Composition.csproj index be96f9b9..3f54bfb0 100644 --- a/src/FluxFlow.Components.Http.Composition/FluxFlow.Components.Http.Composition.csproj +++ b/src/Components/Http/FluxFlow.Components.Http.Composition/FluxFlow.Components.Http.Composition.csproj @@ -5,18 +5,18 @@ FluxFlow.Components.Http.Composition FluxFlow.Components.Http.Composition FluxFlow.Components.Http.Composition - 7.0.0-rc.1 + 8.0.0-rc.1 Canonical HTTP FlowContent/result registration and Designer metadata over host-owned keyed HttpClient resources. workflow;dataflow;components;http;composition README.md - Requires http.request; registers exact descriptors and Designer metadata through the flat designed-component API; keeps constants under HttpComponentDefinition and removes its metadata-only factory. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. true - - + + diff --git a/src/FluxFlow.Components.Http.Composition/HttpAuthoringExtensions.cs b/src/Components/Http/FluxFlow.Components.Http.Composition/HttpAuthoringExtensions.cs similarity index 82% rename from src/FluxFlow.Components.Http.Composition/HttpAuthoringExtensions.cs rename to src/Components/Http/FluxFlow.Components.Http.Composition/HttpAuthoringExtensions.cs index 32ad6dac..73c66e4a 100644 --- a/src/FluxFlow.Components.Http.Composition/HttpAuthoringExtensions.cs +++ b/src/Components/Http/FluxFlow.Components.Http.Composition/HttpAuthoringExtensions.cs @@ -1,23 +1,23 @@ -using FluxFlow.Components.Http.Contracts; using FluxFlow.Components.Designer; using FluxFlow.Composition.Authoring; +using FluxFlow.Data; namespace FluxFlow.Components.Http.Composition; public static class HttpComponents { - public static ComponentContract> HttpRequest { get; } = + public static ComponentContract> HttpRequest { get; } = DesignedComponentContract.Create( HttpComponentDefinition.Types.Client, HttpServiceCollectionExtensions.ConfigureClient, static () => new HttpRequestComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new InputOutputComponentHandle(component, HttpComponentDefinition.Ports.Input, HttpComponentDefinition.Ports.Output, HttpComponentDefinition.Ports.Events)); + static component => new InputOutputComponentHandle(component, HttpComponentDefinition.Ports.Input, HttpComponentDefinition.Ports.Output, HttpComponentDefinition.Ports.Events)); } public static class HttpAuthoringExtensions { - public static InputOutputComponentHandle AddHttpRequest( + public static InputOutputComponentHandle AddHttpRequest( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -27,7 +27,7 @@ public static WorkflowDefinitionBuilder AddHttpRequest( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle request) + out InputOutputComponentHandle request) { request = workflow.AddHttpRequest(name, configure); return workflow; diff --git a/src/FluxFlow.Components.Http.Composition/HttpComponentDefinition.cs b/src/Components/Http/FluxFlow.Components.Http.Composition/HttpComponentDefinition.cs similarity index 100% rename from src/FluxFlow.Components.Http.Composition/HttpComponentDefinition.cs rename to src/Components/Http/FluxFlow.Components.Http.Composition/HttpComponentDefinition.cs diff --git a/src/FluxFlow.Components.Http.Composition/HttpServiceCollectionExtensions.cs b/src/Components/Http/FluxFlow.Components.Http.Composition/HttpServiceCollectionExtensions.cs similarity index 90% rename from src/FluxFlow.Components.Http.Composition/HttpServiceCollectionExtensions.cs rename to src/Components/Http/FluxFlow.Components.Http.Composition/HttpServiceCollectionExtensions.cs index 4e9c0ce9..1c7488af 100644 --- a/src/FluxFlow.Components.Http.Composition/HttpServiceCollectionExtensions.cs +++ b/src/Components/Http/FluxFlow.Components.Http.Composition/HttpServiceCollectionExtensions.cs @@ -1,6 +1,7 @@ using FluxFlow.Components.Designer; using FluxFlow.Components.Designer.Contracts; using FluxFlow.Components.Http.Contracts; +using FluxFlow.Components.Http.Materialization; using FluxFlow.Components.Http.Nodes; using FluxFlow.Components.Http.Options; using FluxFlow.Composition; @@ -23,14 +24,14 @@ internal static void ConfigureClient(ComponentRegistrationBuilder component) component.WithDisplay( displayName: "HTTP Client", category: "HTTP", - summary: "Sends FlowContent HTTP requests through a host-owned HttpClient and emits response or error results.", + summary: "Materializes workflow values into HTTP requests and emits canonical response values.", iconKey: "send", preferredNodeName: "httpClient", suggestedEditorWidth: 420); component .UseFactory(CreateClientNode) - .HasInput(HttpComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "HTTP request message.", true) - .HasOutput(HttpComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "HTTP response or error result.", true) + .HasFlowValueInput(HttpComponentDefinition.Ports.Input, static node => node.Input, new HttpClientRequestMaterializer().InputShape, "Input", "Messages", 0, "HTTP request message.", true) + .HasFlowValueOutput(HttpComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "HTTP response or error result.", true) .HasEvents(HttpComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort HTTP diagnostics."); AddNumberOption(component, HttpComponentDefinition.Options.BoundedCapacity, "Bounded Capacity", "Capacity used for bounded processing and reliable normal-data output.", defaults.BoundedCapacity, 1, "Runtime", OptionDesignMetadataAttributeValues.Advanced); AddNumberOption(component, HttpComponentDefinition.Options.MaxResponseBodyBytes, "Max Response Body Bytes", "Maximum response body bytes read before truncating.", defaults.MaxResponseBodyBytes, 1, "Limits", OptionDesignMetadataAttributeValues.Primary); diff --git a/src/FluxFlow.Components.Http.Composition/README.md b/src/Components/Http/FluxFlow.Components.Http.Composition/README.md similarity index 93% rename from src/FluxFlow.Components.Http.Composition/README.md rename to src/Components/Http/FluxFlow.Components.Http.Composition/README.md index 1e652fb9..f79a7c75 100644 --- a/src/FluxFlow.Components.Http.Composition/README.md +++ b/src/Components/Http/FluxFlow.Components.Http.Composition/README.md @@ -20,11 +20,12 @@ services.AddFluxFlowComponents().AddHttp(); | Type | Node | Input | Output | Resources | |------|------|-------|--------|-----------| -| `http.request` | `HttpClientNode` | `HttpClientRequest` | `HttpResponseResult` or `FlowError` | required `client`, optional `clock` | +| `http.request` | `HttpClientNode` | `FlowValue` | `FlowValue` or `FlowError` | required `client`, optional `clock` | The descriptor exposes Events and no universal Errors surface. Expected -request and transport failures are `HttpClientFailureResult` values on Output. -The runtime does not add an implicit mapper or serializer. +request, materialization, and transport failures are `FlowError` messages on +Output. The node owns request materialization; composition does not insert a +hidden mapper or serializer block. ## Flat Definition diff --git a/src/Components/Http/FluxFlow.Components.Http/CompatibilitySuppressions.xml b/src/Components/Http/FluxFlow.Components.Http/CompatibilitySuppressions.xml new file mode 100644 index 00000000..d655c470 --- /dev/null +++ b/src/Components/Http/FluxFlow.Components.Http/CompatibilitySuppressions.xml @@ -0,0 +1,34 @@ + + + + + CP0002 + M:FluxFlow.Components.Http.Nodes.HttpClientNode.#ctor(System.Net.Http.HttpClient,FluxFlow.Components.Http.Options.HttpClientNodeOptions,System.TimeProvider) + lib/net10.0/FluxFlow.Components.Http.dll + lib/net10.0/FluxFlow.Components.Http.dll + true + + + CP0002 + M:FluxFlow.Components.Http.Nodes.HttpClientNode.#ctor(System.Net.Http.HttpClient,FluxFlow.Components.Http.Options.HttpClientNodeOptions,System.TimeProvider) + lib/net8.0/FluxFlow.Components.Http.dll + lib/net8.0/FluxFlow.Components.Http.dll + true + + + CP0007 + T:FluxFlow.Components.Http.Nodes.HttpClientNode + lib/net10.0/FluxFlow.Components.Http.dll + lib/net10.0/FluxFlow.Components.Http.dll + true + + + CP0007 + T:FluxFlow.Components.Http.Nodes.HttpClientNode + lib/net8.0/FluxFlow.Components.Http.dll + lib/net8.0/FluxFlow.Components.Http.dll + true + + diff --git a/src/FluxFlow.Components.Http/Contracts/HttpClientRequest.cs b/src/Components/Http/FluxFlow.Components.Http/Contracts/HttpClientRequest.cs similarity index 100% rename from src/FluxFlow.Components.Http/Contracts/HttpClientRequest.cs rename to src/Components/Http/FluxFlow.Components.Http/Contracts/HttpClientRequest.cs diff --git a/src/FluxFlow.Components.Http/Contracts/HttpResponseResult.cs b/src/Components/Http/FluxFlow.Components.Http/Contracts/HttpResponseResult.cs similarity index 100% rename from src/FluxFlow.Components.Http/Contracts/HttpResponseResult.cs rename to src/Components/Http/FluxFlow.Components.Http/Contracts/HttpResponseResult.cs diff --git a/src/FluxFlow.Components.Http/Contracts/HttpTriggerReply.cs b/src/Components/Http/FluxFlow.Components.Http/Contracts/HttpTriggerReply.cs similarity index 100% rename from src/FluxFlow.Components.Http/Contracts/HttpTriggerReply.cs rename to src/Components/Http/FluxFlow.Components.Http/Contracts/HttpTriggerReply.cs diff --git a/src/FluxFlow.Components.Http/Contracts/HttpTriggerRequest.cs b/src/Components/Http/FluxFlow.Components.Http/Contracts/HttpTriggerRequest.cs similarity index 100% rename from src/FluxFlow.Components.Http/Contracts/HttpTriggerRequest.cs rename to src/Components/Http/FluxFlow.Components.Http/Contracts/HttpTriggerRequest.cs diff --git a/src/FluxFlow.Components.Http/FluxFlow.Components.Http.csproj b/src/Components/Http/FluxFlow.Components.Http/FluxFlow.Components.Http.csproj similarity index 65% rename from src/FluxFlow.Components.Http/FluxFlow.Components.Http.csproj rename to src/Components/Http/FluxFlow.Components.Http/FluxFlow.Components.Http.csproj index 72c8317c..af60e14a 100644 --- a/src/FluxFlow.Components.Http/FluxFlow.Components.Http.csproj +++ b/src/Components/Http/FluxFlow.Components.Http/FluxFlow.Components.Http.csproj @@ -4,14 +4,14 @@ FluxFlow.Components.Http FluxFlow.Components.Http FluxFlow.Components.Http - 6.0.0 + 7.0.0-rc.1 Standalone FluxFlow HTTP node with canonical FlowContent request bodies and polymorphic response/error results. workflow;dataflow;components;http - Migrates component inputs and outputs to typed FlowMessage<T> value-or-error contracts, removes universal FlowValue or FlowResult coupling, and keeps errors on the normal output. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md - + diff --git a/src/FluxFlow.Components.Http/HttpErrorCodeNames.cs b/src/Components/Http/FluxFlow.Components.Http/HttpErrorCodeNames.cs similarity index 100% rename from src/FluxFlow.Components.Http/HttpErrorCodeNames.cs rename to src/Components/Http/FluxFlow.Components.Http/HttpErrorCodeNames.cs diff --git a/src/FluxFlow.Components.Http/HttpResultKinds.cs b/src/Components/Http/FluxFlow.Components.Http/HttpResultKinds.cs similarity index 100% rename from src/FluxFlow.Components.Http/HttpResultKinds.cs rename to src/Components/Http/FluxFlow.Components.Http/HttpResultKinds.cs diff --git a/src/Components/Http/FluxFlow.Components.Http/Materialization/HttpClientRequestMaterializer.cs b/src/Components/Http/FluxFlow.Components.Http/Materialization/HttpClientRequestMaterializer.cs new file mode 100644 index 00000000..05377d41 --- /dev/null +++ b/src/Components/Http/FluxFlow.Components.Http/Materialization/HttpClientRequestMaterializer.cs @@ -0,0 +1,89 @@ +using System.Text; +using System.Text.Json; +using System.Text.Json.Nodes; +using FluxFlow.Components.Http.Contracts; +using FluxFlow.Data; + +namespace FluxFlow.Components.Http.Materialization; + +/// Owns the structural contract accepted by the HTTP client component. +public sealed class HttpClientRequestMaterializer : IFlowValueMaterializer +{ + private static readonly JsonSerializerOptions SerializerOptions = + new(JsonSerializerDefaults.Web); + + public FlowValueShape InputShape { get; } = FlowValueShape.Object( + "An HTTP request object with method, url, headers, body, and optional timeout fields."); + + public FlowValueMaterializationResult Materialize(FlowValue value) + { + ArgumentNullException.ThrowIfNull(value); + try + { + var request = JsonNode.Parse(value.ToString()) as JsonObject + ?? throw new JsonException("HTTP request input must be an object."); + NormalizeBody(request); + var materialized = request.Deserialize(SerializerOptions) + ?? throw new JsonException("HTTP request input cannot be null."); + return FlowValueMaterializationResult.Success(materialized); + } + catch (Exception exception) when ( + exception is JsonException or InvalidOperationException or NotSupportedException) + { + return FlowValueMaterializationResult.Failure( + new FlowError( + "http.request.invalid_shape", + "The workflow value cannot be materialized as an HTTP request.", + "HTTP", + details: JsonSerializer.SerializeToElement(new + { + target = nameof(HttpClientRequest), + reason = exception.Message + }))); + } + } + + private static void NormalizeBody(JsonObject request) + { + var bodyProperty = FindProperty(request, "body"); + if (bodyProperty is null || request[bodyProperty] is not { } body) + return; + + request[bodyProperty] = JsonSerializer.SerializeToNode( + ToContent(body), + SerializerOptions); + } + + private static FlowContent ToContent(JsonNode body) + { + if (body is JsonValue scalar && scalar.TryGetValue(out var text)) + { + return FlowContent.FromBytes( + Encoding.UTF8.GetBytes(text), + "text/plain", + "utf-8"); + } + + if (body is JsonObject content && FindProperty(content, "bytes") is not null) + { + return content.Deserialize(SerializerOptions) + ?? throw new JsonException("HTTP request body content cannot be null."); + } + + return FlowContent.FromBytes( + Encoding.UTF8.GetBytes(body.ToJsonString()), + "application/json", + "utf-8"); + } + + private static string? FindProperty(JsonObject value, string name) + { + foreach (var property in value) + { + if (string.Equals(property.Key, name, StringComparison.OrdinalIgnoreCase)) + return property.Key; + } + + return null; + } +} diff --git a/src/FluxFlow.Components.Http/Nodes/HttpClientNode.cs b/src/Components/Http/FluxFlow.Components.Http/Nodes/HttpClientNode.cs similarity index 93% rename from src/FluxFlow.Components.Http/Nodes/HttpClientNode.cs rename to src/Components/Http/FluxFlow.Components.Http/Nodes/HttpClientNode.cs index d4aad73d..6414db1c 100644 --- a/src/FluxFlow.Components.Http/Nodes/HttpClientNode.cs +++ b/src/Components/Http/FluxFlow.Components.Http/Nodes/HttpClientNode.cs @@ -2,6 +2,7 @@ using System.Text.Json; using System.Threading.Tasks.Dataflow; using FluxFlow.Components.Http.Contracts; +using FluxFlow.Components.Http.Materialization; using FluxFlow.Components.Http.Options; using FluxFlow.Data; using FluxFlow.Nodes; @@ -13,56 +14,66 @@ namespace FluxFlow.Components.Http.Nodes; /// Sends canonical HTTP requests through a host-owned /// and emits response or failure results on one output stream. /// -public sealed class HttpClientNode : FlowNode +public sealed class HttpClientNode : FlowNode { public const string RequestCompleted = "http.request.completed"; public const string RequestFailed = "http.request.failed"; + public const string RequestRejected = "http.request.rejected"; private readonly HttpClient _httpClient; private readonly HttpClientNodeOptions _options; private readonly TimeProvider _clock; + private readonly IFlowValueMaterializer _materializer; + public HttpClientNode( HttpClient httpClient, HttpClientNodeOptions? options = null, - TimeProvider? clock = null) + TimeProvider? clock = null, + IFlowValueMaterializer? materializer = null) : base(CreateNodeOptions(options ?? HttpClientNodeOptions.Default)) { _httpClient = httpClient ?? throw new ArgumentNullException(nameof(httpClient)); _options = ValidateOptions(options ?? HttpClientNodeOptions.Default); _clock = clock ?? TimeProvider.System; + _materializer = materializer ?? new HttpClientRequestMaterializer(); } protected override bool HandlesErrors => true; - protected override async Task ProcessAsync(FlowMessage message) + protected override async Task ProcessAsync(FlowMessage message) { var result = await ProcessCoreAsync(message).ConfigureAwait(false); await EmitAsync(result, Stopping).ConfigureAwait(false); } - private async Task> ProcessCoreAsync( - FlowMessage message) + private async Task ProcessCoreAsync( + FlowMessage message) { ArgumentNullException.ThrowIfNull(message); if (message.IsError) - return message.WithError(message.Error!); + return message; - var input = message.Value; var startedAt = _clock.GetUtcNow(); - var method = NormalizeMethod(input?.Method); - var url = input?.Url?.Trim() ?? string.Empty; - - if (input is null) + var materialized = _materializer.Materialize(message.Value); + if (!materialized.IsSuccess) { - return CompleteFailure( + var error = materialized.Error!; + PublishFailureEvent( message, startedAt, - method, - url, - HttpErrorCodeNames.InvalidUrl, - "http.client requires an input request."); + string.Empty, + string.Empty, + 0, + null, + error, + RequestRejected); + return message.WithError(error); } + var input = materialized.Value; + var method = NormalizeMethod(input.Method); + var url = input.Url?.Trim() ?? string.Empty; + if (input.Timeout is { } requestTimeout && requestTimeout <= TimeSpan.Zero) { return CompleteFailure( @@ -239,7 +250,7 @@ private async Task> ProcessCoreAsync( RequestCompleted, FlowEventLevel.Information, $"{result.Method} {result.Url} -> {result.StatusCode}"); - return message.With(result); + return message.With(FlowValue.From(result)); } } } @@ -410,8 +421,8 @@ private HttpResponseResult BuildResponse( truncated); } - private FlowMessage CompleteFailure( - FlowMessage source, + private FlowMessage CompleteFailure( + FlowMessage source, DateTimeOffset startedAt, string method, string url, @@ -450,11 +461,11 @@ private FlowMessage CompleteFailure( elapsed, response?.StatusCode, error); - return source.WithError(error); + return source.WithError(error); } private void PublishEvent( - FlowMessage source, + FlowMessage source, HttpResponseResult result, string name, FlowEventLevel level, @@ -481,18 +492,19 @@ private void PublishEvent( } private void PublishFailureEvent( - FlowMessage source, + FlowMessage source, DateTimeOffset timestamp, string method, string url, long elapsedMilliseconds, int? statusCode, - FlowError error) + FlowError error, + string name = RequestFailed) => EmitEvent(new FlowEvent { Timestamp = timestamp, CorrelationId = source.CorrelationId, - Name = RequestFailed, + Name = name, Level = FlowEventLevel.Warning, Message = error.Message, Attributes = new Dictionary(StringComparer.Ordinal) diff --git a/src/FluxFlow.Components.Http/Options/HttpClientNodeOptions.cs b/src/Components/Http/FluxFlow.Components.Http/Options/HttpClientNodeOptions.cs similarity index 100% rename from src/FluxFlow.Components.Http/Options/HttpClientNodeOptions.cs rename to src/Components/Http/FluxFlow.Components.Http/Options/HttpClientNodeOptions.cs diff --git a/src/FluxFlow.Components.Http/README.md b/src/Components/Http/FluxFlow.Components.Http/README.md similarity index 55% rename from src/FluxFlow.Components.Http/README.md rename to src/Components/Http/FluxFlow.Components.Http/README.md index e8eb41dc..436ef306 100644 --- a/src/FluxFlow.Components.Http/README.md +++ b/src/Components/Http/FluxFlow.Components.Http/README.md @@ -1,28 +1,30 @@ # FluxFlow.Components.Http -Standalone typed HTTP client node. It depends on Nodes, not Composition or +Standalone workflow-value HTTP client node. It depends on Nodes, not Composition or Engine. -`HttpClientNode` accepts `HttpClientRequest` and emits `HttpResponseResult`. -Requests contain method, URL, headers, optional exact `FlowContent` body, and -optional timeout. Responses preserve status, headers, exact bounded body, -content metadata, truncation state, and status classification. +`HttpClientNode` physically accepts and emits `FlowMessage`. It owns +materialization from the public workflow shape to its private `HttpClientRequest` +and serializes `HttpResponseResult` back to `FlowValue`. Requests contain method, +URL, headers, optional exact `FlowContent` body, and optional timeout. Responses +preserve status, headers, exact bounded body, content metadata, truncation state, +and status classification. ```csharp await using var node = new HttpClientNode(httpClient); -var results = new BufferBlock>(); +var results = new BufferBlock>(); node.Output.LinkTo(results); -await node.Input.SendAsync(FlowMessage.Create(new HttpClientRequest +await node.Input.SendAsync(FlowMessage.Create(FlowValue.From(new { - Method = "POST", - Url = "v1/items", - Body = FlowContent.FromBytes(bytes, "application/json", "utf-8") -})); + method = "POST", + url = "v1/items", + body = new { orderId = 42 } +}))); var response = await results.ReceiveAsync(); if (!response.IsError) - Console.WriteLine(response.Value.StatusCode); + Console.WriteLine(response.Value.ToJsonElement().GetProperty("statusCode")); ``` Invalid requests, timeout, network/send/read failure, and configured non-success diff --git a/src/Components/Mapping/FluxFlow.Components.Mapping.Composition/CompatibilitySuppressions.xml b/src/Components/Mapping/FluxFlow.Components.Mapping.Composition/CompatibilitySuppressions.xml new file mode 100644 index 00000000..c17cce2d --- /dev/null +++ b/src/Components/Mapping/FluxFlow.Components.Mapping.Composition/CompatibilitySuppressions.xml @@ -0,0 +1,48 @@ + + + + + CP0002 + M:FluxFlow.Components.Mapping.Composition.MappingAuthoringExtensions.AddMapper(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Mapping.Composition.MapperComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,System.Text.Json.JsonElement}@) + lib/net10.0/FluxFlow.Components.Mapping.Composition.dll + lib/net10.0/FluxFlow.Components.Mapping.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mapping.Composition.MappingAuthoringExtensions.AddMapper(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Mapping.Composition.MapperComponentBuilder}) + lib/net10.0/FluxFlow.Components.Mapping.Composition.dll + lib/net10.0/FluxFlow.Components.Mapping.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mapping.Composition.MappingComponents.get_Mapper + lib/net10.0/FluxFlow.Components.Mapping.Composition.dll + lib/net10.0/FluxFlow.Components.Mapping.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mapping.Composition.MappingAuthoringExtensions.AddMapper(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Mapping.Composition.MapperComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,System.Text.Json.JsonElement}@) + lib/net8.0/FluxFlow.Components.Mapping.Composition.dll + lib/net8.0/FluxFlow.Components.Mapping.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mapping.Composition.MappingAuthoringExtensions.AddMapper(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Mapping.Composition.MapperComponentBuilder}) + lib/net8.0/FluxFlow.Components.Mapping.Composition.dll + lib/net8.0/FluxFlow.Components.Mapping.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mapping.Composition.MappingComponents.get_Mapper + lib/net8.0/FluxFlow.Components.Mapping.Composition.dll + lib/net8.0/FluxFlow.Components.Mapping.Composition.dll + true + + diff --git a/src/FluxFlow.Components.Mapping.Composition/FluxFlow.Components.Mapping.Composition.csproj b/src/Components/Mapping/FluxFlow.Components.Mapping.Composition/FluxFlow.Components.Mapping.Composition.csproj similarity index 61% rename from src/FluxFlow.Components.Mapping.Composition/FluxFlow.Components.Mapping.Composition.csproj rename to src/Components/Mapping/FluxFlow.Components.Mapping.Composition/FluxFlow.Components.Mapping.Composition.csproj index 6f8a01c6..0286cedb 100644 --- a/src/FluxFlow.Components.Mapping.Composition/FluxFlow.Components.Mapping.Composition.csproj +++ b/src/Components/Mapping/FluxFlow.Components.Mapping.Composition/FluxFlow.Components.Mapping.Composition.csproj @@ -5,19 +5,19 @@ FluxFlow.Components.Mapping.Composition FluxFlow.Components.Mapping.Composition FluxFlow.Components.Mapping.Composition - 7.0.0-rc.1 + 8.0.0-rc.1 Optional FluxFlow.Composition adapter for typed and schema-less JSON mapping with value-or-error outputs. workflow;dataflow;components;mapping;composition README.md - Requires data.map; registers exact descriptors and Designer metadata through the flat designed-component API; keeps constants under MappingComponentDefinition and removes its metadata-only factory. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. true - - - + + + diff --git a/src/FluxFlow.Components.Mapping.Composition/MappingAuthoringExtensions.cs b/src/Components/Mapping/FluxFlow.Components.Mapping.Composition/MappingAuthoringExtensions.cs similarity index 87% rename from src/FluxFlow.Components.Mapping.Composition/MappingAuthoringExtensions.cs rename to src/Components/Mapping/FluxFlow.Components.Mapping.Composition/MappingAuthoringExtensions.cs index 7a808e0c..5fb2aac5 100644 --- a/src/FluxFlow.Components.Mapping.Composition/MappingAuthoringExtensions.cs +++ b/src/Components/Mapping/FluxFlow.Components.Mapping.Composition/MappingAuthoringExtensions.cs @@ -1,4 +1,5 @@ using System.Text.Json; +using FluxFlow.Data; using FluxFlow.Components.Mapping.Contracts; using FluxFlow.Components.Designer; using FluxFlow.Composition.Authoring; @@ -8,18 +9,18 @@ namespace FluxFlow.Components.Mapping.Composition; public static class MappingComponents { - public static ComponentContract> Mapper { get; } = + public static ComponentContract> Mapper { get; } = DesignedComponentContract.Create( MappingComponentDefinition.Types.Mapper, MappingServiceCollectionExtensions.ConfigureMapper, static () => new MapperComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new InputOutputComponentHandle(component, MappingComponentDefinition.Ports.Input, MappingComponentDefinition.Ports.Output, MappingComponentDefinition.Ports.Events)); + static component => new InputOutputComponentHandle(component, MappingComponentDefinition.Ports.Input, MappingComponentDefinition.Ports.Output, MappingComponentDefinition.Ports.Events)); } public static class MappingAuthoringExtensions { - public static InputOutputComponentHandle AddMapper( + public static InputOutputComponentHandle AddMapper( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -29,7 +30,7 @@ public static WorkflowDefinitionBuilder AddMapper( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle mapper) + out InputOutputComponentHandle mapper) { mapper = workflow.AddMapper(name, configure); return workflow; diff --git a/src/FluxFlow.Components.Mapping.Composition/MappingComponentDefinition.cs b/src/Components/Mapping/FluxFlow.Components.Mapping.Composition/MappingComponentDefinition.cs similarity index 100% rename from src/FluxFlow.Components.Mapping.Composition/MappingComponentDefinition.cs rename to src/Components/Mapping/FluxFlow.Components.Mapping.Composition/MappingComponentDefinition.cs diff --git a/src/FluxFlow.Components.Mapping.Composition/MappingServiceCollectionExtensions.cs b/src/Components/Mapping/FluxFlow.Components.Mapping.Composition/MappingServiceCollectionExtensions.cs similarity index 98% rename from src/FluxFlow.Components.Mapping.Composition/MappingServiceCollectionExtensions.cs rename to src/Components/Mapping/FluxFlow.Components.Mapping.Composition/MappingServiceCollectionExtensions.cs index fc39208e..99ed98cb 100644 --- a/src/FluxFlow.Components.Mapping.Composition/MappingServiceCollectionExtensions.cs +++ b/src/Components/Mapping/FluxFlow.Components.Mapping.Composition/MappingServiceCollectionExtensions.cs @@ -3,6 +3,7 @@ using FluxFlow.Components.Designer.Contracts; using FluxFlow.Components.Mapping.Contracts; using FluxFlow.Components.Mapping.Nodes; +using FluxFlow.Data; using FluxFlow.Components.Mapping.Options; using FluxFlow.Composition; using FluxFlow.Mapping; @@ -31,15 +32,16 @@ internal static void ConfigureMapper(ComponentRegistrationBuilder component) component .UseFactory(CreateJsonMapperNode) - .HasInput( + .HasFlowValueInput( MappingComponentDefinition.Ports.Input, static node => node.Input, + FlowValueMaterializers.JsonElement.InputShape, displayName: MappingComponentDefinition.Ports.Input, group: "Values", order: 0, summary: "Immutable value to map.", isPrimary: true) - .HasOutput( + .HasFlowValueOutput( MappingComponentDefinition.Ports.Output, static node => node.Output, displayName: MappingComponentDefinition.Ports.Output, diff --git a/src/FluxFlow.Components.Mapping.Composition/README.md b/src/Components/Mapping/FluxFlow.Components.Mapping.Composition/README.md similarity index 100% rename from src/FluxFlow.Components.Mapping.Composition/README.md rename to src/Components/Mapping/FluxFlow.Components.Mapping.Composition/README.md diff --git a/src/Components/Mapping/FluxFlow.Components.Mapping/CompatibilitySuppressions.xml b/src/Components/Mapping/FluxFlow.Components.Mapping/CompatibilitySuppressions.xml new file mode 100644 index 00000000..0fcc7561 --- /dev/null +++ b/src/Components/Mapping/FluxFlow.Components.Mapping/CompatibilitySuppressions.xml @@ -0,0 +1,20 @@ + + + + + CP0007 + T:FluxFlow.Components.Mapping.Nodes.JsonMapperNode + lib/net10.0/FluxFlow.Components.Mapping.dll + lib/net10.0/FluxFlow.Components.Mapping.dll + true + + + CP0007 + T:FluxFlow.Components.Mapping.Nodes.JsonMapperNode + lib/net8.0/FluxFlow.Components.Mapping.dll + lib/net8.0/FluxFlow.Components.Mapping.dll + true + + diff --git a/src/FluxFlow.Components.Mapping/Contracts/DefaultMappingContextFactory.cs b/src/Components/Mapping/FluxFlow.Components.Mapping/Contracts/DefaultMappingContextFactory.cs similarity index 100% rename from src/FluxFlow.Components.Mapping/Contracts/DefaultMappingContextFactory.cs rename to src/Components/Mapping/FluxFlow.Components.Mapping/Contracts/DefaultMappingContextFactory.cs diff --git a/src/FluxFlow.Components.Mapping/Contracts/IMappingContextFactory.cs b/src/Components/Mapping/FluxFlow.Components.Mapping/Contracts/IMappingContextFactory.cs similarity index 100% rename from src/FluxFlow.Components.Mapping/Contracts/IMappingContextFactory.cs rename to src/Components/Mapping/FluxFlow.Components.Mapping/Contracts/IMappingContextFactory.cs diff --git a/src/FluxFlow.Components.Mapping/Contracts/MappingNodeContext.cs b/src/Components/Mapping/FluxFlow.Components.Mapping/Contracts/MappingNodeContext.cs similarity index 100% rename from src/FluxFlow.Components.Mapping/Contracts/MappingNodeContext.cs rename to src/Components/Mapping/FluxFlow.Components.Mapping/Contracts/MappingNodeContext.cs diff --git a/src/FluxFlow.Components.Mapping/Diagnostics/MappingDiagnosticNames.cs b/src/Components/Mapping/FluxFlow.Components.Mapping/Diagnostics/MappingDiagnosticNames.cs similarity index 100% rename from src/FluxFlow.Components.Mapping/Diagnostics/MappingDiagnosticNames.cs rename to src/Components/Mapping/FluxFlow.Components.Mapping/Diagnostics/MappingDiagnosticNames.cs diff --git a/src/FluxFlow.Components.Mapping/FluxFlow.Components.Mapping.csproj b/src/Components/Mapping/FluxFlow.Components.Mapping/FluxFlow.Components.Mapping.csproj similarity index 63% rename from src/FluxFlow.Components.Mapping/FluxFlow.Components.Mapping.csproj rename to src/Components/Mapping/FluxFlow.Components.Mapping/FluxFlow.Components.Mapping.csproj index 4dffd500..7460788c 100644 --- a/src/FluxFlow.Components.Mapping/FluxFlow.Components.Mapping.csproj +++ b/src/Components/Mapping/FluxFlow.Components.Mapping/FluxFlow.Components.Mapping.csproj @@ -4,15 +4,15 @@ FluxFlow.Components.Mapping FluxFlow.Components.Mapping FluxFlow.Components.Mapping - 6.0.0 + 7.0.0-rc.1 Standalone transport-neutral typed mapping for FluxFlow with value-or-error outputs. No engine runtime required. workflow;dataflow;components;mapping - Migrates component inputs and outputs to typed FlowMessage<T> value-or-error contracts, removes universal FlowValue or FlowResult coupling, and keeps errors on the normal output. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md - - + + diff --git a/src/FluxFlow.Components.Mapping/MappingErrorCodeNames.cs b/src/Components/Mapping/FluxFlow.Components.Mapping/MappingErrorCodeNames.cs similarity index 100% rename from src/FluxFlow.Components.Mapping/MappingErrorCodeNames.cs rename to src/Components/Mapping/FluxFlow.Components.Mapping/MappingErrorCodeNames.cs diff --git a/src/FluxFlow.Components.Mapping/MappingResultKinds.cs b/src/Components/Mapping/FluxFlow.Components.Mapping/MappingResultKinds.cs similarity index 100% rename from src/FluxFlow.Components.Mapping/MappingResultKinds.cs rename to src/Components/Mapping/FluxFlow.Components.Mapping/MappingResultKinds.cs diff --git a/src/FluxFlow.Components.Mapping/Nodes/FlowMapperNode.cs b/src/Components/Mapping/FluxFlow.Components.Mapping/Nodes/FlowMapperNode.cs similarity index 52% rename from src/FluxFlow.Components.Mapping/Nodes/FlowMapperNode.cs rename to src/Components/Mapping/FluxFlow.Components.Mapping/Nodes/FlowMapperNode.cs index 44733bb6..d18c6ab7 100644 --- a/src/FluxFlow.Components.Mapping/Nodes/FlowMapperNode.cs +++ b/src/Components/Mapping/FluxFlow.Components.Mapping/Nodes/FlowMapperNode.cs @@ -148,16 +148,143 @@ private static FlowNodeOptions CreateNodeOptions(MapperOptions? options) } /// -/// JSON-oriented mapper used by configuration composition. +/// Canonical runtime mapper. JSON materialization is owned by this component +/// and is not represented as a separate workflow node. /// -public sealed class JsonMapperNode : FlowMapperNode +public sealed class JsonMapperNode : FlowNode { + public const string MapperSucceeded = MappingDiagnosticNames.MapperSucceeded; + public const string MapperFailed = MappingDiagnosticNames.MapperFailed; + + private readonly IFlowMapper _mapper; + private readonly IMappingContextFactory _contextFactory; + private readonly MappingNodeContext _nodeContext; + private readonly MapperOptions _options; + private readonly string _engineName; + private readonly TimeProvider _clock; + public JsonMapperNode( MapperOptions options, IFlowExpressionEngine expressionEngine, IMappingContextFactory? contextFactory = null, TimeProvider? clock = null) - : base(options, expressionEngine, contextFactory, clock) + : base(CreateRuntimeNodeOptions(options)) + { + _options = ValidateRuntimeOptions(options); + ArgumentNullException.ThrowIfNull(expressionEngine); + + _engineName = expressionEngine.Name; + _contextFactory = contextFactory ?? DefaultMappingContextFactory.Instance; + _clock = clock ?? TimeProvider.System; + _nodeContext = new MappingNodeContext + { + Options = _options, + InputType = typeof(JsonElement), + OutputType = typeof(JsonElement) + }; + _mapper = new ExpressionFlowMapper( + _options.Expression!, + expressionEngine); + } + + protected override bool HandlesErrors => true; + + protected override async Task ProcessAsync(FlowMessage message) + => await EmitAsync(ProcessRuntime(message), Stopping).ConfigureAwait(false); + + private FlowMessage ProcessRuntime(FlowMessage message) + { + ArgumentNullException.ThrowIfNull(message); + if (message.IsError) + return message.WithError(message.Error!); + + var input = FlowValueMaterializers.JsonElement.Materialize(message.Value).Value; + var timestamp = _clock.GetUtcNow(); + try + { + var context = _contextFactory.Create(input, _nodeContext); + var value = _mapper.Map(input, context); + PublishRuntimeEvent( + message, + timestamp, + MapperSucceeded, + FlowEventLevel.Information, + "Mapped workflow value."); + return message.With(FlowValue.From(value)); + } + catch (Exception exception) + { + var error = new FlowError( + MappingErrorCodeNames.MapperFailed, + $"flow.mapper failed to map input: {exception.Message}", + category: "Mapping", + isTransient: false, + details: CreateRuntimeErrorDetails(exception)); + PublishRuntimeEvent( + message, + timestamp, + MapperFailed, + FlowEventLevel.Warning, + error.Message); + return message.WithError(error); + } + } + + private void PublishRuntimeEvent( + FlowMessage message, + DateTimeOffset timestamp, + string name, + FlowEventLevel level, + string text) + => EmitEvent(new FlowEvent + { + Timestamp = timestamp, + CorrelationId = message.CorrelationId, + Name = name, + Level = level, + Message = text, + Attributes = CreateRuntimeAttributes() + }); + + private Dictionary CreateRuntimeAttributes() + { + var attributes = new Dictionary(StringComparer.Ordinal) + { + ["inputType"] = typeof(JsonElement).FullName ?? typeof(JsonElement).Name, + ["outputType"] = typeof(JsonElement).FullName ?? typeof(JsonElement).Name, + ["engine"] = _engineName + }; + if (!string.IsNullOrWhiteSpace(_options.ExpressionId)) + attributes["expressionId"] = _options.ExpressionId; + if (!string.IsNullOrWhiteSpace(_options.ExpressionName)) + attributes["expressionName"] = _options.ExpressionName; + return attributes; + } + + private JsonElement CreateRuntimeErrorDetails(Exception exception) + { + var details = CreateRuntimeAttributes(); + details["exceptionType"] = exception.GetType().FullName ?? exception.GetType().Name; + return JsonSerializer.SerializeToElement(details); + } + + private static MapperOptions ValidateRuntimeOptions(MapperOptions? options) + { + ArgumentNullException.ThrowIfNull(options); + if (options.BoundedCapacity <= 0) + throw new ArgumentOutOfRangeException(nameof(options), "Mapper capacity must be positive."); + if (string.IsNullOrWhiteSpace(options.Expression)) + throw new ArgumentException("flow.mapper requires an expression.", nameof(options)); + return options; + } + + private static FlowNodeOptions CreateRuntimeNodeOptions(MapperOptions? options) { + var validated = ValidateRuntimeOptions(options); + return new FlowNodeOptions + { + InputCapacity = validated.BoundedCapacity, + OutputCapacity = validated.BoundedCapacity + }; } } diff --git a/src/FluxFlow.Components.Mapping/Options/MapperOptions.cs b/src/Components/Mapping/FluxFlow.Components.Mapping/Options/MapperOptions.cs similarity index 100% rename from src/FluxFlow.Components.Mapping/Options/MapperOptions.cs rename to src/Components/Mapping/FluxFlow.Components.Mapping/Options/MapperOptions.cs diff --git a/src/FluxFlow.Components.Mapping/README.md b/src/Components/Mapping/FluxFlow.Components.Mapping/README.md similarity index 100% rename from src/FluxFlow.Components.Mapping/README.md rename to src/Components/Mapping/FluxFlow.Components.Mapping/README.md diff --git a/src/Components/Metrics/FluxFlow.Components.Metrics.Composition/CompatibilitySuppressions.xml b/src/Components/Metrics/FluxFlow.Components.Metrics.Composition/CompatibilitySuppressions.xml new file mode 100644 index 00000000..e1d4d208 --- /dev/null +++ b/src/Components/Metrics/FluxFlow.Components.Metrics.Composition/CompatibilitySuppressions.xml @@ -0,0 +1,62 @@ + + + + + CP0002 + M:FluxFlow.Components.Metrics.Composition.MetricsAuthoringExtensions.AddMetricAggregation(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Metrics.Contracts.MetricSampleInput,FluxFlow.Components.Metrics.Contracts.MetricSnapshotOutput}@) + lib/net10.0/FluxFlow.Components.Metrics.Composition.dll + lib/net10.0/FluxFlow.Components.Metrics.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Metrics.Composition.MetricsAuthoringExtensions.AddMetricAggregation(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Metrics.Composition.MetricAggregationComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Metrics.Contracts.MetricSampleInput,FluxFlow.Components.Metrics.Contracts.MetricSnapshotOutput}@) + lib/net10.0/FluxFlow.Components.Metrics.Composition.dll + lib/net10.0/FluxFlow.Components.Metrics.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Metrics.Composition.MetricsAuthoringExtensions.AddMetricAggregation(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Metrics.Composition.MetricAggregationComponentBuilder}) + lib/net10.0/FluxFlow.Components.Metrics.Composition.dll + lib/net10.0/FluxFlow.Components.Metrics.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Metrics.Composition.MetricsComponents.get_MetricAggregation + lib/net10.0/FluxFlow.Components.Metrics.Composition.dll + lib/net10.0/FluxFlow.Components.Metrics.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Metrics.Composition.MetricsAuthoringExtensions.AddMetricAggregation(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Metrics.Contracts.MetricSampleInput,FluxFlow.Components.Metrics.Contracts.MetricSnapshotOutput}@) + lib/net8.0/FluxFlow.Components.Metrics.Composition.dll + lib/net8.0/FluxFlow.Components.Metrics.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Metrics.Composition.MetricsAuthoringExtensions.AddMetricAggregation(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Metrics.Composition.MetricAggregationComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Metrics.Contracts.MetricSampleInput,FluxFlow.Components.Metrics.Contracts.MetricSnapshotOutput}@) + lib/net8.0/FluxFlow.Components.Metrics.Composition.dll + lib/net8.0/FluxFlow.Components.Metrics.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Metrics.Composition.MetricsAuthoringExtensions.AddMetricAggregation(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Metrics.Composition.MetricAggregationComponentBuilder}) + lib/net8.0/FluxFlow.Components.Metrics.Composition.dll + lib/net8.0/FluxFlow.Components.Metrics.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Metrics.Composition.MetricsComponents.get_MetricAggregation + lib/net8.0/FluxFlow.Components.Metrics.Composition.dll + lib/net8.0/FluxFlow.Components.Metrics.Composition.dll + true + + diff --git a/src/FluxFlow.Components.Metrics.Composition/FluxFlow.Components.Metrics.Composition.csproj b/src/Components/Metrics/FluxFlow.Components.Metrics.Composition/FluxFlow.Components.Metrics.Composition.csproj similarity index 58% rename from src/FluxFlow.Components.Metrics.Composition/FluxFlow.Components.Metrics.Composition.csproj rename to src/Components/Metrics/FluxFlow.Components.Metrics.Composition/FluxFlow.Components.Metrics.Composition.csproj index 12daefa2..4db94e10 100644 --- a/src/FluxFlow.Components.Metrics.Composition/FluxFlow.Components.Metrics.Composition.csproj +++ b/src/Components/Metrics/FluxFlow.Components.Metrics.Composition/FluxFlow.Components.Metrics.Composition.csproj @@ -5,18 +5,18 @@ FluxFlow.Components.Metrics.Composition FluxFlow.Components.Metrics.Composition FluxFlow.Components.Metrics.Composition - 6.0.0-rc.1 + 7.0.0-rc.1 Canonical metrics result registration and Designer metadata over a host-owned clock. workflow;dataflow;components;metrics;composition README.md - Requires metric.aggregate; registers exact descriptors and Designer metadata through the flat designed-component API; keeps constants under MetricsComponentDefinition and removes its metadata-only factory. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. - - - + + + diff --git a/src/FluxFlow.Components.Metrics.Composition/MetricsAuthoringExtensions.cs b/src/Components/Metrics/FluxFlow.Components.Metrics.Composition/MetricsAuthoringExtensions.cs similarity index 83% rename from src/FluxFlow.Components.Metrics.Composition/MetricsAuthoringExtensions.cs rename to src/Components/Metrics/FluxFlow.Components.Metrics.Composition/MetricsAuthoringExtensions.cs index 0fa34ae1..862b23f4 100644 --- a/src/FluxFlow.Components.Metrics.Composition/MetricsAuthoringExtensions.cs +++ b/src/Components/Metrics/FluxFlow.Components.Metrics.Composition/MetricsAuthoringExtensions.cs @@ -2,22 +2,24 @@ using FluxFlow.Components.Designer; using FluxFlow.Composition.Authoring; +using FluxFlow.Data; + namespace FluxFlow.Components.Metrics.Composition; public static class MetricsComponents { - public static ComponentContract> MetricAggregation { get; } = + public static ComponentContract> MetricAggregation { get; } = DesignedComponentContract.Create( MetricsComponentDefinition.Types.Aggregate, MetricsServiceCollectionExtensions.ConfigureAggregate, static () => new MetricAggregationComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new InputOutputComponentHandle(component, MetricsComponentDefinition.Ports.Input, MetricsComponentDefinition.Ports.Output, MetricsComponentDefinition.Ports.Events)); + static component => new InputOutputComponentHandle(component, MetricsComponentDefinition.Ports.Input, MetricsComponentDefinition.Ports.Output, MetricsComponentDefinition.Ports.Events)); } public static class MetricsAuthoringExtensions { - public static InputOutputComponentHandle AddMetricAggregation( + public static InputOutputComponentHandle AddMetricAggregation( this WorkflowDefinitionBuilder workflow, string name, Action? configure = null) @@ -29,7 +31,7 @@ public static InputOutputComponentHandle aggregation) + out InputOutputComponentHandle aggregation) { aggregation = workflow.AddMetricAggregation(name); return workflow; @@ -39,7 +41,7 @@ public static WorkflowDefinitionBuilder AddMetricAggregation( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle aggregation) + out InputOutputComponentHandle aggregation) { ArgumentNullException.ThrowIfNull(configure); aggregation = workflow.AddMetricAggregation(name, configure); diff --git a/src/FluxFlow.Components.Metrics.Composition/MetricsComponentDefinition.cs b/src/Components/Metrics/FluxFlow.Components.Metrics.Composition/MetricsComponentDefinition.cs similarity index 100% rename from src/FluxFlow.Components.Metrics.Composition/MetricsComponentDefinition.cs rename to src/Components/Metrics/FluxFlow.Components.Metrics.Composition/MetricsComponentDefinition.cs diff --git a/src/FluxFlow.Components.Metrics.Composition/MetricsServiceCollectionExtensions.cs b/src/Components/Metrics/FluxFlow.Components.Metrics.Composition/MetricsServiceCollectionExtensions.cs similarity index 91% rename from src/FluxFlow.Components.Metrics.Composition/MetricsServiceCollectionExtensions.cs rename to src/Components/Metrics/FluxFlow.Components.Metrics.Composition/MetricsServiceCollectionExtensions.cs index 137ee96b..db511230 100644 --- a/src/FluxFlow.Components.Metrics.Composition/MetricsServiceCollectionExtensions.cs +++ b/src/Components/Metrics/FluxFlow.Components.Metrics.Composition/MetricsServiceCollectionExtensions.cs @@ -22,8 +22,8 @@ internal static void ConfigureAggregate(ComponentRegistrationBuilder component) component.WithDisplay("Metrics Aggregate", "Metrics", "Folds metric samples into rolling count, value, rate, size, and group snapshots.", "chart-no-axes-combined", "aggregateMetrics", 460); component .UseFactory(CreateMetricsAggregateNode) - .HasInput(MetricsComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Metric sample to aggregate.", true) - .HasOutput(MetricsComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Metric aggregate snapshot or expected aggregation failure.", true) + .HasFlowValueInput(MetricsComponentDefinition.Ports.Input, static node => node.Input, new FluxFlow.Components.Metrics.Materialization.MetricSampleInputMaterializer().InputShape, "Input", "Messages", 0, "Metric sample to aggregate.", true) + .HasFlowValueOutput(MetricsComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Metric aggregate snapshot or expected aggregation failure.", true) .HasEvents(MetricsComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort metrics diagnostics."); component.AddOption(MetricsComponentDefinition.Options.RateWindowSeconds, OptionValueKind.Number, "Rate Window Seconds", "Rolling window in seconds for current-rate calculations.", defaultValue: defaults.RateWindowSeconds, min: 0.000001, section: "Rate", importance: OptionDesignMetadataAttributeValues.Primary, editor: OptionDesignMetadataAttributeValues.Number); AddNumber(component, MetricsComponentDefinition.Options.BoundedCapacity, "Bounded Capacity", "Capacity used for bounded processing and reliable normal-data output.", defaults.BoundedCapacity, 1, "Runtime"); diff --git a/src/FluxFlow.Components.Metrics.Composition/README.md b/src/Components/Metrics/FluxFlow.Components.Metrics.Composition/README.md similarity index 100% rename from src/FluxFlow.Components.Metrics.Composition/README.md rename to src/Components/Metrics/FluxFlow.Components.Metrics.Composition/README.md diff --git a/src/Components/Metrics/FluxFlow.Components.Metrics/CompatibilitySuppressions.xml b/src/Components/Metrics/FluxFlow.Components.Metrics/CompatibilitySuppressions.xml new file mode 100644 index 00000000..86dea74a --- /dev/null +++ b/src/Components/Metrics/FluxFlow.Components.Metrics/CompatibilitySuppressions.xml @@ -0,0 +1,20 @@ + + + + + CP0007 + T:FluxFlow.Components.Metrics.Nodes.MetricsAggregateNode + lib/net10.0/FluxFlow.Components.Metrics.dll + lib/net10.0/FluxFlow.Components.Metrics.dll + true + + + CP0007 + T:FluxFlow.Components.Metrics.Nodes.MetricsAggregateNode + lib/net8.0/FluxFlow.Components.Metrics.dll + lib/net8.0/FluxFlow.Components.Metrics.dll + true + + diff --git a/src/FluxFlow.Components.Metrics/Contracts/MetricGroupSnapshot.cs b/src/Components/Metrics/FluxFlow.Components.Metrics/Contracts/MetricGroupSnapshot.cs similarity index 100% rename from src/FluxFlow.Components.Metrics/Contracts/MetricGroupSnapshot.cs rename to src/Components/Metrics/FluxFlow.Components.Metrics/Contracts/MetricGroupSnapshot.cs diff --git a/src/FluxFlow.Components.Metrics/Contracts/MetricSampleInput.cs b/src/Components/Metrics/FluxFlow.Components.Metrics/Contracts/MetricSampleInput.cs similarity index 100% rename from src/FluxFlow.Components.Metrics/Contracts/MetricSampleInput.cs rename to src/Components/Metrics/FluxFlow.Components.Metrics/Contracts/MetricSampleInput.cs diff --git a/src/FluxFlow.Components.Metrics/Contracts/MetricSnapshotOutput.cs b/src/Components/Metrics/FluxFlow.Components.Metrics/Contracts/MetricSnapshotOutput.cs similarity index 100% rename from src/FluxFlow.Components.Metrics/Contracts/MetricSnapshotOutput.cs rename to src/Components/Metrics/FluxFlow.Components.Metrics/Contracts/MetricSnapshotOutput.cs diff --git a/src/FluxFlow.Components.Metrics/Contracts/MetricsContractNormalization.cs b/src/Components/Metrics/FluxFlow.Components.Metrics/Contracts/MetricsContractNormalization.cs similarity index 100% rename from src/FluxFlow.Components.Metrics/Contracts/MetricsContractNormalization.cs rename to src/Components/Metrics/FluxFlow.Components.Metrics/Contracts/MetricsContractNormalization.cs diff --git a/src/FluxFlow.Components.Metrics/Diagnostics/MetricsDiagnosticNames.cs b/src/Components/Metrics/FluxFlow.Components.Metrics/Diagnostics/MetricsDiagnosticNames.cs similarity index 100% rename from src/FluxFlow.Components.Metrics/Diagnostics/MetricsDiagnosticNames.cs rename to src/Components/Metrics/FluxFlow.Components.Metrics/Diagnostics/MetricsDiagnosticNames.cs diff --git a/src/FluxFlow.Components.Metrics/FluxFlow.Components.Metrics.csproj b/src/Components/Metrics/FluxFlow.Components.Metrics/FluxFlow.Components.Metrics.csproj similarity index 64% rename from src/FluxFlow.Components.Metrics/FluxFlow.Components.Metrics.csproj rename to src/Components/Metrics/FluxFlow.Components.Metrics/FluxFlow.Components.Metrics.csproj index 64aad86f..b34d9317 100644 --- a/src/FluxFlow.Components.Metrics/FluxFlow.Components.Metrics.csproj +++ b/src/Components/Metrics/FluxFlow.Components.Metrics/FluxFlow.Components.Metrics.csproj @@ -4,14 +4,14 @@ FluxFlow.Components.Metrics FluxFlow.Components.Metrics FluxFlow.Components.Metrics - 6.0.0 + 7.0.0-rc.1 Standalone metric aggregation nodes with canonical normal-result snapshots. workflow;dataflow;components;metrics;rate;dashboard - Migrates component inputs and outputs to typed FlowMessage<T> value-or-error contracts, removes universal FlowValue or FlowResult coupling, and keeps errors on the normal output. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md - + diff --git a/src/Components/Metrics/FluxFlow.Components.Metrics/Materialization/MetricSampleInputMaterializer.cs b/src/Components/Metrics/FluxFlow.Components.Metrics/Materialization/MetricSampleInputMaterializer.cs new file mode 100644 index 00000000..9a204f09 --- /dev/null +++ b/src/Components/Metrics/FluxFlow.Components.Metrics/Materialization/MetricSampleInputMaterializer.cs @@ -0,0 +1,10 @@ +using FluxFlow.Components.Metrics.Contracts; +using FluxFlow.Data; + +namespace FluxFlow.Components.Metrics.Materialization; + +public sealed class MetricSampleInputMaterializer() + : JsonFlowValueMaterializer( + "metrics.sample.invalid_shape", + "Metrics", + FlowValueShape.Object("A metric sample object with optional name, group, timestamp, value, size, unit, and tags.")); diff --git a/src/FluxFlow.Components.Metrics/MetricsErrorCodeNames.cs b/src/Components/Metrics/FluxFlow.Components.Metrics/MetricsErrorCodeNames.cs similarity index 100% rename from src/FluxFlow.Components.Metrics/MetricsErrorCodeNames.cs rename to src/Components/Metrics/FluxFlow.Components.Metrics/MetricsErrorCodeNames.cs diff --git a/src/FluxFlow.Components.Metrics/MetricsErrorCodes.cs b/src/Components/Metrics/FluxFlow.Components.Metrics/MetricsErrorCodes.cs similarity index 100% rename from src/FluxFlow.Components.Metrics/MetricsErrorCodes.cs rename to src/Components/Metrics/FluxFlow.Components.Metrics/MetricsErrorCodes.cs diff --git a/src/FluxFlow.Components.Metrics/MetricsResultKinds.cs b/src/Components/Metrics/FluxFlow.Components.Metrics/MetricsResultKinds.cs similarity index 100% rename from src/FluxFlow.Components.Metrics/MetricsResultKinds.cs rename to src/Components/Metrics/FluxFlow.Components.Metrics/MetricsResultKinds.cs diff --git a/src/FluxFlow.Components.Metrics/Nodes/MetricsAggregateNode.cs b/src/Components/Metrics/FluxFlow.Components.Metrics/Nodes/MetricsAggregateNode.cs similarity index 89% rename from src/FluxFlow.Components.Metrics/Nodes/MetricsAggregateNode.cs rename to src/Components/Metrics/FluxFlow.Components.Metrics/Nodes/MetricsAggregateNode.cs index d2438be4..64668b27 100644 --- a/src/FluxFlow.Components.Metrics/Nodes/MetricsAggregateNode.cs +++ b/src/Components/Metrics/FluxFlow.Components.Metrics/Nodes/MetricsAggregateNode.cs @@ -14,7 +14,7 @@ namespace FluxFlow.Components.Metrics.Nodes; /// Folds ordered metric samples into snapshots and emits successes, partial /// group-limit outcomes, and expected failures through one normal output. /// -public sealed class MetricsAggregateNode : FlowNode +public sealed class MetricsAggregateNode : FlowNode { private const string DefaultGroup = "default"; private const int MaxTrackedRejectedGroups = 1024; @@ -22,6 +22,7 @@ public sealed class MetricsAggregateNode : FlowNode _materializer; private readonly Queue _rateSamples = new(); private readonly Dictionary _groups = new(StringComparer.Ordinal); private readonly HashSet _rejectedGroups = new(StringComparer.Ordinal); @@ -45,22 +46,44 @@ public MetricsAggregateNode( { _options = options ?? new MetricsAggregateOptions(); _clock = clock ?? TimeProvider.System; + _materializer = new Materialization.MetricSampleInputMaterializer(); _rateWindow = TimeSpan.FromSeconds(_options.RateWindowSeconds); } protected override bool HandlesErrors => true; - protected override async Task ProcessAsync(FlowMessage message) + protected override async Task ProcessAsync(FlowMessage inputMessage) { - ArgumentNullException.ThrowIfNull(message); - if (message.IsError) + ArgumentNullException.ThrowIfNull(inputMessage); + if (inputMessage.IsError) { - await EmitAsync( - message.WithError(message.Error!), - Stopping).ConfigureAwait(false); + await EmitAsync(inputMessage, Stopping).ConfigureAwait(false); return; } + var materialized = _materializer.Materialize(inputMessage.Value); + if (!materialized.IsSuccess) + { + var error = materialized.Error!; + EmitEvent(new FlowEvent + { + Timestamp = _clock.GetUtcNow(), + CorrelationId = inputMessage.CorrelationId, + Name = "metrics.aggregate.rejected", + Level = FlowEventLevel.Warning, + Message = error.Message, + Attributes = new Dictionary(StringComparer.Ordinal) + { + ["errorCode"] = error.Code + } + }); + await EmitAsync(inputMessage.WithError(error), Stopping) + .ConfigureAwait(false); + return; + } + + var message = inputMessage.ConvertValue(materialized.Value); + var sample = message.Value; try { @@ -113,7 +136,7 @@ await EmitAsync( } else if (_options.EmitEverySample) { - await EmitAsync(message.With(snapshot), Stopping).ConfigureAwait(false); + await EmitResultAsync(message.With(snapshot)).ConfigureAwait(false); } PublishEvent( @@ -164,9 +187,8 @@ private async Task PublishGroupLimitAsync( category: "Metrics", isTransient: false, details); - await EmitAsync( - message.WithError(error), - Stopping).ConfigureAwait(false); + await EmitResultAsync(message.WithError(error)) + .ConfigureAwait(false); PublishEvent( message.CorrelationId, timestamp, @@ -190,9 +212,8 @@ private async Task PublishFailureAsync( category: "Metrics", isTransient: false, details: CreateErrorDetails(sample, exception)); - await EmitAsync( - message.WithError(error), - Stopping).ConfigureAwait(false); + await EmitResultAsync(message.WithError(error)) + .ConfigureAwait(false); PublishEvent( message.CorrelationId, timestamp, @@ -333,9 +354,7 @@ private async ValueTask PublishFinalSnapshotAsync() return; var snapshot = CreateSnapshot(_latestTimestamp.Value); - await EmitAsync( - _lastAcceptedMessage.With(snapshot), - Stopping).ConfigureAwait(false); + await EmitResultAsync(_lastAcceptedMessage.With(snapshot)).ConfigureAwait(false); PublishEvent( _lastAcceptedMessage.CorrelationId, _clock.GetUtcNow(), @@ -432,6 +451,13 @@ private static JsonElement CreateErrorDetails( protected override ValueTask OnInputCompletedAsync() => PublishFinalSnapshotAsync(); + private async Task EmitResultAsync(FlowMessage message) + => await EmitAsync( + message.IsError + ? message.ConvertError() + : message.ConvertValue(FlowValue.From(message.Value)), + Stopping).ConfigureAwait(false); + private static FlowNodeOptions CreateNodeOptions(MetricsAggregateOptions options) => new() { diff --git a/src/FluxFlow.Components.Metrics/Options/MetricsAggregateOptions.cs b/src/Components/Metrics/FluxFlow.Components.Metrics/Options/MetricsAggregateOptions.cs similarity index 100% rename from src/FluxFlow.Components.Metrics/Options/MetricsAggregateOptions.cs rename to src/Components/Metrics/FluxFlow.Components.Metrics/Options/MetricsAggregateOptions.cs diff --git a/src/FluxFlow.Components.Metrics/Options/MetricsOptionValidation.cs b/src/Components/Metrics/FluxFlow.Components.Metrics/Options/MetricsOptionValidation.cs similarity index 100% rename from src/FluxFlow.Components.Metrics/Options/MetricsOptionValidation.cs rename to src/Components/Metrics/FluxFlow.Components.Metrics/Options/MetricsOptionValidation.cs diff --git a/src/FluxFlow.Components.Metrics/README.md b/src/Components/Metrics/FluxFlow.Components.Metrics/README.md similarity index 100% rename from src/FluxFlow.Components.Metrics/README.md rename to src/Components/Metrics/FluxFlow.Components.Metrics/README.md diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.Composition/Authoring/MqttApplicationAuthoringExtensions.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/Authoring/MqttApplicationAuthoringExtensions.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt.Composition/Authoring/MqttApplicationAuthoringExtensions.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/Authoring/MqttApplicationAuthoringExtensions.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.Composition/Authoring/MqttComponentAuthoring.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/Authoring/MqttComponentAuthoring.cs similarity index 79% rename from src/Mqtt/FluxFlow.Components.Mqtt.Composition/Authoring/MqttComponentAuthoring.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/Authoring/MqttComponentAuthoring.cs index 170da14c..aef76af8 100644 --- a/src/Mqtt/FluxFlow.Components.Mqtt.Composition/Authoring/MqttComponentAuthoring.cs +++ b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/Authoring/MqttComponentAuthoring.cs @@ -6,6 +6,7 @@ using FluxFlow.Components.Mqtt.Subscriptions; using FluxFlow.Composition; using FluxFlow.Composition.Authoring; +using FluxFlow.Data; namespace FluxFlow.Components.Mqtt.Composition; @@ -141,28 +142,28 @@ public sealed class MqttCommandHandle : MqttComponentHandle { internal MqttCommandHandle(ComponentHandle definition) : base(definition) { - Input = definition.Input(MqttComponentDefinition.Ports.Input); - Output = definition.Output(MqttComponentDefinition.Ports.Output); - Events = definition.Output(MqttComponentDefinition.Ports.Events); + Input = definition.Input(MqttComponentDefinition.Ports.Input); + Output = definition.Output(MqttComponentDefinition.Ports.Output); + Events = definition.Output(MqttComponentDefinition.Ports.Events); } - public InputPortHandle Input { get; } - public OutputPortHandle Output { get; } - public OutputPortHandle Events { get; } + public InputPortHandle Input { get; } + public OutputPortHandle Output { get; } + public OutputPortHandle Events { get; } } public sealed class MqttPublishHandle : MqttComponentHandle { internal MqttPublishHandle(ComponentHandle definition) : base(definition) { - Input = definition.Input(MqttComponentDefinition.Ports.Input); - Output = definition.Output(MqttComponentDefinition.Ports.Output); - Events = definition.Output(MqttComponentDefinition.Ports.Events); + Input = definition.Input(MqttComponentDefinition.Ports.Input); + Output = definition.Output(MqttComponentDefinition.Ports.Output); + Events = definition.Output(MqttComponentDefinition.Ports.Events); } - public InputPortHandle Input { get; } - public OutputPortHandle Output { get; } - public OutputPortHandle Events { get; } + public InputPortHandle Input { get; } + public OutputPortHandle Output { get; } + public OutputPortHandle Events { get; } } public sealed class MqttReceiveHandle : MqttComponentHandle @@ -171,24 +172,24 @@ internal MqttReceiveHandle(ComponentHandle definition) : base(definition) { Ack = definition.SignalInput(MqttComponentDefinition.Ports.Ack); Nak = definition.SignalInput(MqttComponentDefinition.Ports.Nak); - Output = definition.Output(MqttComponentDefinition.Ports.Output); - Events = definition.Output(MqttComponentDefinition.Ports.Events); + Output = definition.Output(MqttComponentDefinition.Ports.Output); + Events = definition.Output(MqttComponentDefinition.Ports.Events); } public SignalInputPortHandle Ack { get; } public SignalInputPortHandle Nak { get; } - public OutputPortHandle Output { get; } - public OutputPortHandle Events { get; } + public OutputPortHandle Output { get; } + public OutputPortHandle Events { get; } } public sealed class MqttEventsHandle : MqttComponentHandle { internal MqttEventsHandle(ComponentHandle definition) : base(definition) { - Output = definition.Output(MqttComponentDefinition.Ports.Output); - Events = definition.Output(MqttComponentDefinition.Ports.Events); + Output = definition.Output(MqttComponentDefinition.Ports.Output); + Events = definition.Output(MqttComponentDefinition.Ports.Events); } - public OutputPortHandle Output { get; } - public OutputPortHandle Events { get; } + public OutputPortHandle Output { get; } + public OutputPortHandle Events { get; } } diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.Composition/Authoring/MqttResourceAuthoring.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/Authoring/MqttResourceAuthoring.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt.Composition/Authoring/MqttResourceAuthoring.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/Authoring/MqttResourceAuthoring.cs diff --git a/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/CompatibilitySuppressions.xml b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/CompatibilitySuppressions.xml new file mode 100644 index 00000000..596b8789 --- /dev/null +++ b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/CompatibilitySuppressions.xml @@ -0,0 +1,146 @@ + + + + + CP0002 + M:FluxFlow.Components.Mqtt.Composition.MqttCommandHandle.get_Events + lib/net10.0/FluxFlow.Components.Mqtt.Composition.dll + lib/net10.0/FluxFlow.Components.Mqtt.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Composition.MqttCommandHandle.get_Input + lib/net10.0/FluxFlow.Components.Mqtt.Composition.dll + lib/net10.0/FluxFlow.Components.Mqtt.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Composition.MqttCommandHandle.get_Output + lib/net10.0/FluxFlow.Components.Mqtt.Composition.dll + lib/net10.0/FluxFlow.Components.Mqtt.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Composition.MqttEventsHandle.get_Events + lib/net10.0/FluxFlow.Components.Mqtt.Composition.dll + lib/net10.0/FluxFlow.Components.Mqtt.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Composition.MqttEventsHandle.get_Output + lib/net10.0/FluxFlow.Components.Mqtt.Composition.dll + lib/net10.0/FluxFlow.Components.Mqtt.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Composition.MqttPublishHandle.get_Events + lib/net10.0/FluxFlow.Components.Mqtt.Composition.dll + lib/net10.0/FluxFlow.Components.Mqtt.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Composition.MqttPublishHandle.get_Input + lib/net10.0/FluxFlow.Components.Mqtt.Composition.dll + lib/net10.0/FluxFlow.Components.Mqtt.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Composition.MqttPublishHandle.get_Output + lib/net10.0/FluxFlow.Components.Mqtt.Composition.dll + lib/net10.0/FluxFlow.Components.Mqtt.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Composition.MqttReceiveHandle.get_Events + lib/net10.0/FluxFlow.Components.Mqtt.Composition.dll + lib/net10.0/FluxFlow.Components.Mqtt.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Composition.MqttReceiveHandle.get_Output + lib/net10.0/FluxFlow.Components.Mqtt.Composition.dll + lib/net10.0/FluxFlow.Components.Mqtt.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Composition.MqttCommandHandle.get_Events + lib/net8.0/FluxFlow.Components.Mqtt.Composition.dll + lib/net8.0/FluxFlow.Components.Mqtt.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Composition.MqttCommandHandle.get_Input + lib/net8.0/FluxFlow.Components.Mqtt.Composition.dll + lib/net8.0/FluxFlow.Components.Mqtt.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Composition.MqttCommandHandle.get_Output + lib/net8.0/FluxFlow.Components.Mqtt.Composition.dll + lib/net8.0/FluxFlow.Components.Mqtt.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Composition.MqttEventsHandle.get_Events + lib/net8.0/FluxFlow.Components.Mqtt.Composition.dll + lib/net8.0/FluxFlow.Components.Mqtt.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Composition.MqttEventsHandle.get_Output + lib/net8.0/FluxFlow.Components.Mqtt.Composition.dll + lib/net8.0/FluxFlow.Components.Mqtt.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Composition.MqttPublishHandle.get_Events + lib/net8.0/FluxFlow.Components.Mqtt.Composition.dll + lib/net8.0/FluxFlow.Components.Mqtt.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Composition.MqttPublishHandle.get_Input + lib/net8.0/FluxFlow.Components.Mqtt.Composition.dll + lib/net8.0/FluxFlow.Components.Mqtt.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Composition.MqttPublishHandle.get_Output + lib/net8.0/FluxFlow.Components.Mqtt.Composition.dll + lib/net8.0/FluxFlow.Components.Mqtt.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Composition.MqttReceiveHandle.get_Events + lib/net8.0/FluxFlow.Components.Mqtt.Composition.dll + lib/net8.0/FluxFlow.Components.Mqtt.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Composition.MqttReceiveHandle.get_Output + lib/net8.0/FluxFlow.Components.Mqtt.Composition.dll + lib/net8.0/FluxFlow.Components.Mqtt.Composition.dll + true + + diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.Composition/FluxFlow.Components.Mqtt.Composition.csproj b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/FluxFlow.Components.Mqtt.Composition.csproj similarity index 70% rename from src/Mqtt/FluxFlow.Components.Mqtt.Composition/FluxFlow.Components.Mqtt.Composition.csproj rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/FluxFlow.Components.Mqtt.Composition.csproj index b822fa37..4c64ced3 100644 --- a/src/Mqtt/FluxFlow.Components.Mqtt.Composition/FluxFlow.Components.Mqtt.Composition.csproj +++ b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/FluxFlow.Components.Mqtt.Composition.csproj @@ -5,18 +5,18 @@ FluxFlow.Components.Mqtt.Composition FluxFlow.Components.Mqtt.Composition FluxFlow.Components.Mqtt.Composition - 7.1.0-rc.1 + 8.0.0-rc.1 Canonical FluxFlow Composition resources and nodes for provider-neutral MQTT client control, publication, subscriptions, and client events. workflow;dataflow;components;mqtt;composition README.md - Adds portable TCP, TLS, WebSocket, and secure WebSocket broker resource authoring while preserving strict JSON validation and controller lifecycle semantics. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. true - - + + diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.Composition/IMqttInlineSecretPolicy.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/IMqttInlineSecretPolicy.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt.Composition/IMqttInlineSecretPolicy.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/IMqttInlineSecretPolicy.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttClientResourceBinding.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttClientResourceBinding.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttClientResourceBinding.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttClientResourceBinding.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttComponentDefinition.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttComponentDefinition.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttComponentDefinition.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttComponentDefinition.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionConfigurationConverter.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionConfigurationConverter.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionConfigurationConverter.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionConfigurationConverter.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionNodeFactories.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionNodeFactories.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionNodeFactories.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionNodeFactories.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionResourceIndex.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionResourceIndex.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionResourceIndex.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionResourceIndex.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionResourceRegistrar.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionResourceRegistrar.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionResourceRegistrar.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionResourceRegistrar.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionResourceValidator.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionResourceValidator.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionResourceValidator.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttCompositionResourceValidator.cs diff --git a/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttEventDesignMetadata.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttEventDesignMetadata.cs new file mode 100644 index 00000000..cbca7611 --- /dev/null +++ b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttEventDesignMetadata.cs @@ -0,0 +1,41 @@ +using FluxFlow.Components.Designer.Contracts; + +namespace FluxFlow.Components.Mqtt.Composition; + +internal static class MqttEventDesignMetadata +{ + internal static IReadOnlyList Command { get; } = + [ + Event("mqtt.command.rejected", "attributes.client", "attributes.errorCode"), + Event("mqtt.command.completed", "attributes.client", "attributes.operation", "attributes.kind"), + Event("mqtt.command.failed", "attributes.client", "attributes.operation", "attributes.errorCode") + ]; + + internal static IReadOnlyList Publish { get; } = + [ + Event("mqtt.publish.rejected", "attributes.client", "attributes.errorCode"), + Event("mqtt.publish.completed", "attributes.client", "attributes.topic", "attributes.qos", "attributes.retain"), + Event("mqtt.publish.failed", "attributes.client", "attributes.topic", "attributes.qos", "attributes.retain", "attributes.errorCode") + ]; + + internal static IReadOnlyList Receive { get; } = + [ + Event("mqtt.receive.received", "attributes.client", "attributes.trigger", "attributes.topic", "attributes.traceId"), + Event("mqtt.receive.outcome", "attributes.client", "attributes.trigger", "attributes.traceId", "attributes.outcome"), + Event("mqtt.receive.outcome-ignored", "attributes.client", "attributes.trigger", "attributes.traceId", "attributes.outcome") + ]; + + private static EventDesignMetadata Event(string type, params string[] dimensions) + => new() + { + Type = type, + Fields = dimensions.Select(static path => new EventFieldDesignMetadata + { + Path = path, + Role = EventFieldRole.Dimension, + ValueKind = path.EndsWith("retain", StringComparison.Ordinal) + ? EventFieldValueKind.Boolean + : EventFieldValueKind.String + }).ToArray() + }; +} diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttEventsCompositionOptions.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttEventsCompositionOptions.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttEventsCompositionOptions.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttEventsCompositionOptions.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttPublishCompositionOptions.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttPublishCompositionOptions.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttPublishCompositionOptions.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttPublishCompositionOptions.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttServiceCollectionExtensions.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttServiceCollectionExtensions.cs similarity index 84% rename from src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttServiceCollectionExtensions.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttServiceCollectionExtensions.cs index b5035e26..c4615e30 100644 --- a/src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttServiceCollectionExtensions.cs +++ b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttServiceCollectionExtensions.cs @@ -5,8 +5,10 @@ using FluxFlow.Components.Mqtt.Client; using FluxFlow.Components.Mqtt.Contracts; using FluxFlow.Components.Mqtt.Events; +using FluxFlow.Components.Mqtt.Materialization; using FluxFlow.Components.Mqtt.Options; using FluxFlow.Composition; +using FluxFlow.Data; namespace FluxFlow.Components.Mqtt.Composition; @@ -34,22 +36,22 @@ internal static void ConfigureControl(ComponentRegistrationBuilder component) AddClient(component); component .UseFactory(MqttCompositionNodeFactories.CreateControlNodeAsync) - .HasInput(MqttComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Input message.", true) - .HasOutput(MqttComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Operation result.", true) - .HasEvents(MqttComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort MQTT command diagnostics."); + .HasFlowValueInput(MqttComponentDefinition.Ports.Input, static node => node.Input, new MqttClientRequestMaterializer().InputShape, "Input", "Messages", 0, "Input message.", true) + .HasFlowValueOutput(MqttComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Operation result.", true) + .HasEvents(MqttComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort MQTT command diagnostics.", eventShapes: MqttEventDesignMetadata.Command); } internal static void ConfigurePublish(ComponentRegistrationBuilder component) { var defaults = new MqttPublishCompositionOptions(); - ConfigureCommon(component, "MQTT Publish", "Publishes one exact-content MQTT message through a logical client.", "send", "publishMqtt", 420); + ConfigureCommon(component, "MQTT Publish", "Materializes a workflow value and publishes it through a logical client.", "send", "publishMqtt", 420); AddNumber(component, MqttComponentDefinition.Options.MaximumPendingRequests, "Maximum Pending Requests", "Capacity used for queued publish requests and reliable normal-data result output.", defaults.MaximumPendingRequests); AddClient(component); component .UseFactory(MqttCompositionNodeFactories.CreatePublishNodeAsync) - .HasInput(MqttComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Input message.", true) - .HasOutput(MqttComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Operation result.", true) - .HasEvents(MqttComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort MQTT publish diagnostics."); + .HasFlowValueInput(MqttComponentDefinition.Ports.Input, static node => node.Input, new MqttPublishMessageMaterializer().InputShape, "Input", "Messages", 0, "Input message.", true) + .HasFlowValueOutput(MqttComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Operation result.", true) + .HasEvents(MqttComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort MQTT publish diagnostics.", eventShapes: MqttEventDesignMetadata.Publish); } internal static void ConfigureTrigger(ComponentRegistrationBuilder component) @@ -67,8 +69,8 @@ internal static void ConfigureTrigger(ComponentRegistrationBuilder component) .UseFactory(MqttCompositionNodeFactories.CreateTriggerNodeAsync) .HasSignalInput(MqttComponentDefinition.Ports.Ack, static node => node.Ack, "Ack", "Signals", 0, "Acknowledges the pending delivery with the same trace identity.", true) .HasSignalInput(MqttComponentDefinition.Ports.Nak, static node => node.Nak, "Nak", "Signals", 1, "Rejects the pending delivery with the same trace identity.") - .HasOutput(MqttComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 2, "Received MQTT application message.", true) - .HasEvents(MqttComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 3, "Best-effort MQTT receive diagnostics."); + .HasFlowValueOutput(MqttComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 2, "Received MQTT application message.", true) + .HasEvents(MqttComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 3, "Best-effort MQTT receive diagnostics.", eventShapes: MqttEventDesignMetadata.Receive); } internal static void ConfigureEvents(ComponentRegistrationBuilder component) @@ -79,7 +81,7 @@ internal static void ConfigureEvents(ComponentRegistrationBuilder component) AddClient(component); component .UseFactory(MqttCompositionNodeFactories.CreateEventsNodeAsync) - .HasOutput(MqttComponentDefinition.Ports.Output, static node => node.Output, "Output", "Events", 0, "Logical MQTT client lifecycle event.", true) + .HasFlowValueOutput(MqttComponentDefinition.Ports.Output, static node => node.Output, "Output", "Events", 0, "Logical MQTT client lifecycle event.", true) .HasEvents(MqttComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 1, "Best-effort MQTT component diagnostics."); } diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttTriggerCompositionOptions.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttTriggerCompositionOptions.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttTriggerCompositionOptions.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttTriggerCompositionOptions.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.Composition/README.md b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/README.md similarity index 99% rename from src/Mqtt/FluxFlow.Components.Mqtt.Composition/README.md rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/README.md index 57dc7e46..9903963d 100644 --- a/src/Mqtt/FluxFlow.Components.Mqtt.Composition/README.md +++ b/src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/README.md @@ -231,7 +231,7 @@ services.AddExternalFluxFlowResource(client, controller); | `mqtt.command` | `FlowMessage` | `FlowMessage` | | `mqtt.publish` | `FlowMessage` | `FlowMessage` | | `mqtt.receive` | `Ack`, `Nak` signals | `FlowMessage` | -| `mqtt.events` | none | `FlowMessage` | +| `mqtt.events` | none | canonical `FlowMessage` with a non-null `FlowValue` | Command and publish failures are normal `MqttClientResult` values with `Kind = "Error"`, `IsError = true`, and a structured `Error`; there is no diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.MqttNet/FluxFlow.Components.Mqtt.MqttNet.csproj b/src/Components/Mqtt/FluxFlow.Components.Mqtt.MqttNet/FluxFlow.Components.Mqtt.MqttNet.csproj similarity index 81% rename from src/Mqtt/FluxFlow.Components.Mqtt.MqttNet/FluxFlow.Components.Mqtt.MqttNet.csproj rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.MqttNet/FluxFlow.Components.Mqtt.MqttNet.csproj index bb0a4f74..c577491d 100644 --- a/src/Mqtt/FluxFlow.Components.Mqtt.MqttNet/FluxFlow.Components.Mqtt.MqttNet.csproj +++ b/src/Components/Mqtt/FluxFlow.Components.Mqtt.MqttNet/FluxFlow.Components.Mqtt.MqttNet.csproj @@ -4,10 +4,10 @@ FluxFlow.Components.Mqtt.MqttNet FluxFlow.Components.Mqtt.MqttNet FluxFlow.Components.Mqtt.MqttNet - 3.1.0 + 4.0.0-rc.1 Concrete MQTT transport adapter for FluxFlow. Maps resolved client configuration, exact message bytes, subscriptions, and broker acknowledgements while the provider-neutral MQTT core owns client policy and workflow behavior. workflow;dataflow;components;mqtt;mqttnet - Maps the neutral FluxFlow broker configuration to TCP, TLS, WebSocket, and secure WebSocket MQTTnet channels. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.MqttNet/MqttNetMessageMapper.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.MqttNet/MqttNetMessageMapper.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt.MqttNet/MqttNetMessageMapper.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.MqttNet/MqttNetMessageMapper.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.MqttNet/MqttNetTransportFactory.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.MqttNet/MqttNetTransportFactory.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt.MqttNet/MqttNetTransportFactory.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.MqttNet/MqttNetTransportFactory.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.MqttNet/MqttNetTransportSession.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.MqttNet/MqttNetTransportSession.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt.MqttNet/MqttNetTransportSession.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.MqttNet/MqttNetTransportSession.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.MqttNet/README.md b/src/Components/Mqtt/FluxFlow.Components.Mqtt.MqttNet/README.md similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt.MqttNet/README.md rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.MqttNet/README.md diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/FluxFlow.Components.Mqtt.PulseMqtt.csproj b/src/Components/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/FluxFlow.Components.Mqtt.PulseMqtt.csproj similarity index 81% rename from src/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/FluxFlow.Components.Mqtt.PulseMqtt.csproj rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/FluxFlow.Components.Mqtt.PulseMqtt.csproj index 8286882a..8ba0e0cf 100644 --- a/src/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/FluxFlow.Components.Mqtt.PulseMqtt.csproj +++ b/src/Components/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/FluxFlow.Components.Mqtt.PulseMqtt.csproj @@ -4,10 +4,10 @@ FluxFlow.Components.Mqtt.PulseMqtt FluxFlow.Components.Mqtt.PulseMqtt FluxFlow.Components.Mqtt.PulseMqtt - 4.1.0 + 5.0.0-rc.1 Concrete MQTT transport adapter for FluxFlow. Maps resolved client configuration, exact message bytes, subscriptions, and broker acknowledgements while the provider-neutral MQTT core owns client policy and workflow behavior. workflow;dataflow;components;mqtt;pulsemqtt - Uses Pulse MQTT 2.29.0 and maps the neutral FluxFlow broker configuration to TCP, TLS, WebSocket, and secure WebSocket raw transports. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/PulseMqttMessageMapper.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/PulseMqttMessageMapper.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/PulseMqttMessageMapper.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/PulseMqttMessageMapper.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/PulseMqttTransportFactory.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/PulseMqttTransportFactory.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/PulseMqttTransportFactory.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/PulseMqttTransportFactory.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/PulseMqttTransportSession.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/PulseMqttTransportSession.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/PulseMqttTransportSession.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/PulseMqttTransportSession.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/README.md b/src/Components/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/README.md similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/README.md rename to src/Components/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt/README.md diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Acknowledgements/MqttAcknowledgementPolicies.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Acknowledgements/MqttAcknowledgementPolicies.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Acknowledgements/MqttAcknowledgementPolicies.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Acknowledgements/MqttAcknowledgementPolicies.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Client/IMqttClientController.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/IMqttClientController.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Client/IMqttClientController.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/IMqttClientController.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientCommandDispatcher.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientCommandDispatcher.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientCommandDispatcher.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientCommandDispatcher.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientConfigurationValidator.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientConfigurationValidator.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientConfigurationValidator.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientConfigurationValidator.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientConnectionLifecycle.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientConnectionLifecycle.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientConnectionLifecycle.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientConnectionLifecycle.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientController.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientController.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientController.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientController.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientErrors.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientErrors.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientErrors.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientErrors.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientEventHub.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientEventHub.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientEventHub.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientEventHub.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientOperation.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientOperation.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientOperation.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientOperation.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientOperationException.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientOperationException.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientOperationException.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientOperationException.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientRequest.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientRequest.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientRequest.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientRequest.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientResult.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientResult.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientResult.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientResult.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientResultFactory.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientResultFactory.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientResultFactory.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientResultFactory.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientRuntime.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientRuntime.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientRuntime.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientRuntime.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientStatus.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientStatus.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientStatus.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientStatus.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientSubscriptionState.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientSubscriptionState.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientSubscriptionState.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttClientSubscriptionState.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttReceivedMessageDispatcher.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttReceivedMessageDispatcher.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Client/MqttReceivedMessageDispatcher.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Client/MqttReceivedMessageDispatcher.cs diff --git a/src/Components/Mqtt/FluxFlow.Components.Mqtt/CompatibilitySuppressions.xml b/src/Components/Mqtt/FluxFlow.Components.Mqtt/CompatibilitySuppressions.xml new file mode 100644 index 00000000..5896ab53 --- /dev/null +++ b/src/Components/Mqtt/FluxFlow.Components.Mqtt/CompatibilitySuppressions.xml @@ -0,0 +1,146 @@ + + + + + CP0002 + M:FluxFlow.Components.Mqtt.Nodes.MqttClientEventsNode.get_Events + lib/net10.0/FluxFlow.Components.Mqtt.dll + lib/net10.0/FluxFlow.Components.Mqtt.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Nodes.MqttClientEventsNode.get_Output + lib/net10.0/FluxFlow.Components.Mqtt.dll + lib/net10.0/FluxFlow.Components.Mqtt.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Nodes.MqttControlNode.#ctor(FluxFlow.Components.Mqtt.Client.IMqttClientController,FluxFlow.Components.Mqtt.Options.MqttControlOptions) + lib/net10.0/FluxFlow.Components.Mqtt.dll + lib/net10.0/FluxFlow.Components.Mqtt.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Nodes.MqttControlNode.get_Events + lib/net10.0/FluxFlow.Components.Mqtt.dll + lib/net10.0/FluxFlow.Components.Mqtt.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Nodes.MqttControlNode.get_Input + lib/net10.0/FluxFlow.Components.Mqtt.dll + lib/net10.0/FluxFlow.Components.Mqtt.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Nodes.MqttControlNode.get_Output + lib/net10.0/FluxFlow.Components.Mqtt.dll + lib/net10.0/FluxFlow.Components.Mqtt.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Nodes.MqttPublishOperationNode.#ctor(FluxFlow.Components.Mqtt.Client.IMqttClientController,System.Int32) + lib/net10.0/FluxFlow.Components.Mqtt.dll + lib/net10.0/FluxFlow.Components.Mqtt.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Nodes.MqttSubscriptionTriggerNode.get_Events + lib/net10.0/FluxFlow.Components.Mqtt.dll + lib/net10.0/FluxFlow.Components.Mqtt.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Nodes.MqttSubscriptionTriggerNode.get_Output + lib/net10.0/FluxFlow.Components.Mqtt.dll + lib/net10.0/FluxFlow.Components.Mqtt.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Nodes.MqttClientEventsNode.get_Events + lib/net8.0/FluxFlow.Components.Mqtt.dll + lib/net8.0/FluxFlow.Components.Mqtt.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Nodes.MqttClientEventsNode.get_Output + lib/net8.0/FluxFlow.Components.Mqtt.dll + lib/net8.0/FluxFlow.Components.Mqtt.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Nodes.MqttControlNode.#ctor(FluxFlow.Components.Mqtt.Client.IMqttClientController,FluxFlow.Components.Mqtt.Options.MqttControlOptions) + lib/net8.0/FluxFlow.Components.Mqtt.dll + lib/net8.0/FluxFlow.Components.Mqtt.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Nodes.MqttControlNode.get_Events + lib/net8.0/FluxFlow.Components.Mqtt.dll + lib/net8.0/FluxFlow.Components.Mqtt.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Nodes.MqttControlNode.get_Input + lib/net8.0/FluxFlow.Components.Mqtt.dll + lib/net8.0/FluxFlow.Components.Mqtt.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Nodes.MqttControlNode.get_Output + lib/net8.0/FluxFlow.Components.Mqtt.dll + lib/net8.0/FluxFlow.Components.Mqtt.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Nodes.MqttPublishOperationNode.#ctor(FluxFlow.Components.Mqtt.Client.IMqttClientController,System.Int32) + lib/net8.0/FluxFlow.Components.Mqtt.dll + lib/net8.0/FluxFlow.Components.Mqtt.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Nodes.MqttSubscriptionTriggerNode.get_Events + lib/net8.0/FluxFlow.Components.Mqtt.dll + lib/net8.0/FluxFlow.Components.Mqtt.dll + true + + + CP0002 + M:FluxFlow.Components.Mqtt.Nodes.MqttSubscriptionTriggerNode.get_Output + lib/net8.0/FluxFlow.Components.Mqtt.dll + lib/net8.0/FluxFlow.Components.Mqtt.dll + true + + + CP0007 + T:FluxFlow.Components.Mqtt.Nodes.MqttPublishOperationNode + lib/net10.0/FluxFlow.Components.Mqtt.dll + lib/net10.0/FluxFlow.Components.Mqtt.dll + true + + + CP0007 + T:FluxFlow.Components.Mqtt.Nodes.MqttPublishOperationNode + lib/net8.0/FluxFlow.Components.Mqtt.dll + lib/net8.0/FluxFlow.Components.Mqtt.dll + true + + diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttBrokerConfiguration.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttBrokerConfiguration.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttBrokerConfiguration.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttBrokerConfiguration.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttBrokerTransport.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttBrokerTransport.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttBrokerTransport.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttBrokerTransport.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttClientCertificate.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttClientCertificate.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttClientCertificate.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttClientCertificate.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttClientConfiguration.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttClientConfiguration.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttClientConfiguration.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttClientConfiguration.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttCredentialConfiguration.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttCredentialConfiguration.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttCredentialConfiguration.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttCredentialConfiguration.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttReconnectConfiguration.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttReconnectConfiguration.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttReconnectConfiguration.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttReconnectConfiguration.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttRetryPolicy.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttRetryPolicy.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttRetryPolicy.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Configuration/MqttRetryPolicy.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Contracts/MqttPublishMessage.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Contracts/MqttPublishMessage.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Contracts/MqttPublishMessage.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Contracts/MqttPublishMessage.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Contracts/MqttQos.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Contracts/MqttQos.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Contracts/MqttQos.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Contracts/MqttQos.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Contracts/MqttReceivedApplicationMessage.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Contracts/MqttReceivedApplicationMessage.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Contracts/MqttReceivedApplicationMessage.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Contracts/MqttReceivedApplicationMessage.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Events/MqttClientEvent.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Events/MqttClientEvent.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Events/MqttClientEvent.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Events/MqttClientEvent.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Events/MqttClientEventSubscription.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Events/MqttClientEventSubscription.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Events/MqttClientEventSubscription.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Events/MqttClientEventSubscription.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/FluxFlow.Components.Mqtt.csproj b/src/Components/Mqtt/FluxFlow.Components.Mqtt/FluxFlow.Components.Mqtt.csproj similarity index 60% rename from src/Mqtt/FluxFlow.Components.Mqtt/FluxFlow.Components.Mqtt.csproj rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/FluxFlow.Components.Mqtt.csproj index 0f7116c4..47b76bba 100644 --- a/src/Mqtt/FluxFlow.Components.Mqtt/FluxFlow.Components.Mqtt.csproj +++ b/src/Components/Mqtt/FluxFlow.Components.Mqtt/FluxFlow.Components.Mqtt.csproj @@ -4,16 +4,16 @@ FluxFlow.Components.Mqtt FluxFlow.Components.Mqtt FluxFlow.Components.Mqtt - 7.1.0 + 8.0.0-rc.1 Transport-neutral MQTT client orchestration and standalone FluxFlow components for commands, publish, receive, workflow acknowledgement, and client events. No engine or concrete MQTT client required. workflow;dataflow;components;mqtt - Adds provider-neutral TCP, TLS, WebSocket, and secure WebSocket broker selection while preserving existing TCP defaults and lifecycle ownership. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md - - - + + + diff --git a/src/Components/Mqtt/FluxFlow.Components.Mqtt/Materialization/MqttPublishMessageMaterializer.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Materialization/MqttPublishMessageMaterializer.cs new file mode 100644 index 00000000..04a5cfc0 --- /dev/null +++ b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Materialization/MqttPublishMessageMaterializer.cs @@ -0,0 +1,99 @@ +using System.Text; +using System.Text.Json; +using System.Text.Json.Nodes; +using FluxFlow.Components.Mqtt.Contracts; +using FluxFlow.Data; + +namespace FluxFlow.Components.Mqtt.Materialization; + +public sealed class MqttClientRequestMaterializer() + : JsonFlowValueMaterializer( + "mqtt.command.invalid_shape", + "MQTT", + FlowValueShape.Object( + "An MQTT client command object whose operation selects connect, disconnect, status, publish, subscribe, or unsubscribe.", + "operation")); + +/// Owns the structural contract accepted by the MQTT publish component. +public sealed class MqttPublishMessageMaterializer : IFlowValueMaterializer +{ + private static readonly JsonSerializerOptions SerializerOptions = + new(JsonSerializerDefaults.Web); + + public FlowValueShape InputShape { get; } = FlowValueShape.Object( + "An MQTT publish object with topic, content, and optional QoS, retain, response-topic, correlation, and user-property fields.", + "topic", + "content"); + + public FlowValueMaterializationResult Materialize(FlowValue value) + { + ArgumentNullException.ThrowIfNull(value); + try + { + var request = JsonNode.Parse(value.ToString()) as JsonObject + ?? throw new JsonException("MQTT publish input must be an object."); + NormalizeContent(request); + var materialized = request.Deserialize(SerializerOptions) + ?? throw new JsonException("MQTT publish input cannot be null."); + return FlowValueMaterializationResult.Success(materialized); + } + catch (Exception exception) when ( + exception is JsonException or InvalidOperationException or NotSupportedException) + { + return FlowValueMaterializationResult.Failure( + new FlowError( + "mqtt.publish.invalid_shape", + "The workflow value cannot be materialized as an MQTT publish request.", + "MQTT", + details: JsonSerializer.SerializeToElement(new + { + target = nameof(MqttPublishMessage), + reason = exception.Message + }))); + } + } + + private static void NormalizeContent(JsonObject request) + { + var contentProperty = FindProperty(request, "content"); + if (contentProperty is null || request[contentProperty] is not { } content) + return; + + request[contentProperty] = JsonSerializer.SerializeToNode( + ToContent(content), + SerializerOptions); + } + + private static FlowContent ToContent(JsonNode content) + { + if (content is JsonValue scalar && scalar.TryGetValue(out var text)) + { + return FlowContent.FromBytes( + Encoding.UTF8.GetBytes(text), + "text/plain", + "utf-8"); + } + + if (content is JsonObject objectContent && FindProperty(objectContent, "bytes") is not null) + { + return objectContent.Deserialize(SerializerOptions) + ?? throw new JsonException("MQTT publish content cannot be null."); + } + + return FlowContent.FromBytes( + Encoding.UTF8.GetBytes(content.ToJsonString()), + "application/json", + "utf-8"); + } + + private static string? FindProperty(JsonObject value, string name) + { + foreach (var property in value) + { + if (string.Equals(property.Key, name, StringComparison.OrdinalIgnoreCase)) + return property.Key; + } + + return null; + } +} diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttClientEventsNode.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttClientEventsNode.cs similarity index 81% rename from src/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttClientEventsNode.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttClientEventsNode.cs index a093023d..faa2f531 100644 --- a/src/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttClientEventsNode.cs +++ b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttClientEventsNode.cs @@ -1,5 +1,6 @@ using FluxFlow.Components.Mqtt.Client; using FluxFlow.Components.Mqtt.Events; +using FluxFlow.Data; using FluxFlow.Nodes; using System.Threading.Tasks.Dataflow; @@ -9,7 +10,7 @@ public sealed class MqttClientEventsNode : IFlowSource { private readonly IMqttClientController _controller; private readonly int _capacity; - private readonly MqttSourcePump _pump; + private readonly MqttSourcePump _pump; private IMqttClientEventSubscription? _subscription; public MqttClientEventsNode( @@ -20,15 +21,15 @@ public MqttClientEventsNode( throw new ArgumentOutOfRangeException(nameof(maximumPendingEvents)); _controller = controller ?? throw new ArgumentNullException(nameof(controller)); _capacity = maximumPendingEvents; - _pump = new MqttSourcePump( + _pump = new MqttSourcePump( maximumPendingEvents, RunCoreAsync, DisposeCoreAsync); } - public ISourceBlock> Output => _pump.Output; + public ISourceBlock Output => _pump.Output; - public ISourceBlock Events => _pump.Events; + public ISourceBlock Events => _pump.Events; public Task Completion => _pump.Completion; @@ -49,7 +50,9 @@ private async Task RunCoreAsync(CancellationToken cancellationToken) .WithCancellation(cancellationToken) .ConfigureAwait(false)) { - await _pump.EmitAsync(FlowMessage.Create(@event), cancellationToken).ConfigureAwait(false); + await _pump.EmitAsync( + FlowMessage.Create(FlowValue.From(@event)), + cancellationToken).ConfigureAwait(false); } } diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttControlNode.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttControlNode.cs similarity index 74% rename from src/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttControlNode.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttControlNode.cs index 9a830406..8a0c6ab6 100644 --- a/src/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttControlNode.cs +++ b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttControlNode.cs @@ -1,6 +1,8 @@ using System.Threading.Tasks.Dataflow; using FluxFlow.Components.Mqtt.Client; +using FluxFlow.Components.Mqtt.Materialization; using FluxFlow.Components.Mqtt.Options; +using FluxFlow.Data; using FluxFlow.Nodes; namespace FluxFlow.Components.Mqtt.Nodes; @@ -8,10 +10,11 @@ namespace FluxFlow.Components.Mqtt.Nodes; public sealed class MqttControlNode : IFlowNode { private readonly IMqttClientController _controller; - private readonly TransformBlock, FlowMessage> _processor; - private readonly ActionBlock> _forwarder; - private readonly FlowOutput> _output; - private readonly BroadcastBlock _events = new(static @event => @event); + private readonly IFlowValueMaterializer _materializer; + private readonly TransformBlock _processor; + private readonly ActionBlock _forwarder; + private readonly FlowOutput _output; + private readonly BroadcastBlock _events = new(static @event => @event); private readonly CancellationTokenSource _stopping = new(); private readonly TaskCompletionSource _completion = new(TaskCreationOptions.RunContinuationsAsynchronously); @@ -19,18 +22,20 @@ public sealed class MqttControlNode : IFlowNode public MqttControlNode( IMqttClientController controller, - MqttControlOptions? options = null) + MqttControlOptions? options = null, + IFlowValueMaterializer? materializer = null) { _controller = controller ?? throw new ArgumentNullException(nameof(controller)); + _materializer = materializer ?? new MqttClientRequestMaterializer(); options ??= new MqttControlOptions(); ValidateOptions(options); var maximumConcurrency = options.RequestProcessing == MqttRequestProcessing.Sequential ? 1 : options.MaximumConcurrentRequests; - _output = new FlowOutput>( + _output = new FlowOutput( new FlowOutputOptions { Capacity = options.MaximumPendingRequests }); - _processor = new TransformBlock, FlowMessage>( + _processor = new TransformBlock( ProcessAsync, new ExecutionDataflowBlockOptions { @@ -38,7 +43,7 @@ public MqttControlNode( MaxDegreeOfParallelism = maximumConcurrency, EnsureOrdered = options.ResultOrder == MqttResultOrder.PreserveInput }); - _forwarder = new ActionBlock>( + _forwarder = new ActionBlock( ForwardAsync, new ExecutionDataflowBlockOptions { @@ -50,11 +55,11 @@ public MqttControlNode( _ = MonitorCompletionAsync(); } - public ITargetBlock> Input => _processor; + public ITargetBlock Input => _processor; - public ISourceBlock> Output => _output; + public ISourceBlock Output => _output; - public ISourceBlock Events => _events; + public ISourceBlock Events => _events; public Task Completion => _completion.Task; @@ -88,16 +93,36 @@ public async ValueTask DisposeAsync() } } - private async Task> ProcessAsync( - FlowMessage message) + private async Task ProcessAsync( + FlowMessage message) { ArgumentNullException.ThrowIfNull(message); if (message.IsError) - return message.WithError(message.Error!); + return message; + + var materialized = _materializer.Materialize(message.Value); + if (!materialized.IsSuccess) + { + var error = materialized.Error!; + _events.Post(new FlowEvent + { + Timestamp = DateTimeOffset.UtcNow, + CorrelationId = message.CorrelationId, + Name = "mqtt.command.rejected", + Level = FlowEventLevel.Warning, + Message = error.Message, + Attributes = new Dictionary(StringComparer.Ordinal) + { + ["client"] = _controller.Name, + ["errorCode"] = error.Code + } + }); + return message.WithError(error); + } try { - var result = await _controller.ExecuteAsync(message.Value).ConfigureAwait(false); + var result = await _controller.ExecuteAsync(materialized.Value).ConfigureAwait(false); _events.Post(new FlowEvent { Timestamp = result.Timestamp, @@ -111,7 +136,7 @@ private async Task> ProcessAsync( ["kind"] = result.Kind } }); - return message.With(result); + return message.With(FlowValue.From(result)); } catch (MqttClientOperationException exception) { @@ -129,11 +154,11 @@ private async Task> ProcessAsync( ["errorCode"] = exception.Error.Code } }); - return message.WithError(exception.Error); + return message.WithError(exception.Error); } } - private async Task ForwardAsync(FlowMessage message) + private async Task ForwardAsync(FlowMessage message) { if (await _output.SendAsync(message, _stopping.Token).ConfigureAwait(false)) return; diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttPublishOperationNode.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttPublishOperationNode.cs similarity index 58% rename from src/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttPublishOperationNode.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttPublishOperationNode.cs index 8237a731..e4400bec 100644 --- a/src/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttPublishOperationNode.cs +++ b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttPublishOperationNode.cs @@ -1,43 +1,71 @@ using FluxFlow.Components.Mqtt.Client; using FluxFlow.Components.Mqtt.Contracts; +using FluxFlow.Components.Mqtt.Materialization; +using FluxFlow.Data; using FluxFlow.Nodes; using System.Threading.Tasks.Dataflow; namespace FluxFlow.Components.Mqtt.Nodes; -public sealed class MqttPublishOperationNode : FlowNode +public sealed class MqttPublishOperationNode : FlowNode { private readonly IMqttClientController _controller; + private readonly IFlowValueMaterializer _materializer; + public MqttPublishOperationNode( IMqttClientController controller, - int maximumPendingRequests = 128) + int maximumPendingRequests = 128, + IFlowValueMaterializer? materializer = null) : base(CreateNodeOptions(maximumPendingRequests)) { if (maximumPendingRequests <= 0) throw new ArgumentOutOfRangeException(nameof(maximumPendingRequests)); _controller = controller ?? throw new ArgumentNullException(nameof(controller)); + _materializer = materializer ?? new MqttPublishMessageMaterializer(); } protected override bool HandlesErrors => true; - protected override async Task ProcessAsync(FlowMessage message) + protected override async Task ProcessAsync(FlowMessage message) { var result = await ProcessCoreAsync(message).ConfigureAwait(false); await EmitAsync(result, Stopping).ConfigureAwait(false); } - private async Task> ProcessCoreAsync( - FlowMessage message) + private async Task ProcessCoreAsync( + FlowMessage message) { ArgumentNullException.ThrowIfNull(message); if (message.IsError) - return message.WithError(message.Error!); + return message; + + var materialized = _materializer.Materialize(message.Value); + if (!materialized.IsSuccess) + { + var error = materialized.Error!; + EmitEvent(new FlowEvent + { + Timestamp = DateTimeOffset.UtcNow, + CorrelationId = message.CorrelationId, + Name = "mqtt.publish.rejected", + Level = FlowEventLevel.Warning, + Message = error.Message, + Attributes = new Dictionary(StringComparer.Ordinal) + { + ["client"] = _controller.Name, + ["errorCode"] = error.Code + } + }); + return message.WithError(error); + } + + var request = materialized.Value; try { var result = await _controller.ExecuteAsync(new MqttPublishClientRequest { - Message = message.Value + Message = request }).ConfigureAwait(false); EmitEvent(new FlowEvent { @@ -48,12 +76,12 @@ private async Task> ProcessCoreAsync( Attributes = new Dictionary(StringComparer.Ordinal) { ["client"] = _controller.Name, - ["topic"] = message.Value.Topic, - ["qos"] = message.Value.Qos.ToString(), - ["retain"] = message.Value.Retain + ["topic"] = request.Topic, + ["qos"] = request.Qos.ToString(), + ["retain"] = request.Retain } }); - return message.With(result); + return message.With(FlowValue.From(result)); } catch (MqttClientOperationException exception) { @@ -67,13 +95,13 @@ private async Task> ProcessCoreAsync( Attributes = new Dictionary(StringComparer.Ordinal) { ["client"] = _controller.Name, - ["topic"] = message.Value.Topic, - ["qos"] = message.Value.Qos.ToString(), - ["retain"] = message.Value.Retain, + ["topic"] = request.Topic, + ["qos"] = request.Qos.ToString(), + ["retain"] = request.Retain, ["errorCode"] = exception.Error.Code } }); - return message.WithError(exception.Error); + return message.WithError(exception.Error); } } diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttSignalTarget.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttSignalTarget.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttSignalTarget.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttSignalTarget.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttSourcePump.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttSourcePump.cs similarity index 90% rename from src/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttSourcePump.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttSourcePump.cs index 29ff3e04..d71c3ee3 100644 --- a/src/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttSourcePump.cs +++ b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttSourcePump.cs @@ -1,12 +1,13 @@ +using FluxFlow.Data; using FluxFlow.Nodes; using System.Threading.Tasks.Dataflow; namespace FluxFlow.Components.Mqtt.Nodes; -internal sealed class MqttSourcePump : IAsyncDisposable +internal sealed class MqttSourcePump : IAsyncDisposable { - private readonly FlowOutput> _output; - private readonly BroadcastBlock _events = new(static @event => @event); + private readonly FlowOutput _output; + private readonly BroadcastBlock _events = new(static @event => @event); private readonly Func _run; private readonly Func _dispose; private readonly CancellationTokenSource _stopping = new(); @@ -24,14 +25,14 @@ public MqttSourcePump( throw new ArgumentOutOfRangeException(nameof(outputCapacity)); _run = run ?? throw new ArgumentNullException(nameof(run)); _dispose = dispose ?? throw new ArgumentNullException(nameof(dispose)); - _output = new FlowOutput>( + _output = new FlowOutput( new FlowOutputOptions { Capacity = outputCapacity }); _ = ObserveOutputFailureAsync(); } - public ISourceBlock> Output => _output; + public ISourceBlock Output => _output; - public ISourceBlock Events => _events; + public ISourceBlock Events => _events; public Task Completion => _completion.Task; @@ -47,7 +48,7 @@ public Task StartAsync(CancellationToken cancellationToken = default) } public async ValueTask EmitAsync( - FlowMessage message, + FlowMessage message, CancellationToken cancellationToken) { if (await _output.SendAsync(message, cancellationToken).ConfigureAwait(false)) diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttSubscriptionTriggerNode.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttSubscriptionTriggerNode.cs similarity index 96% rename from src/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttSubscriptionTriggerNode.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttSubscriptionTriggerNode.cs index 6c9eb0b5..f24b74cf 100644 --- a/src/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttSubscriptionTriggerNode.cs +++ b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Nodes/MqttSubscriptionTriggerNode.cs @@ -4,6 +4,7 @@ using FluxFlow.Components.Mqtt.Options; using FluxFlow.Components.Mqtt.Subscriptions; using FluxFlow.Coordination; +using FluxFlow.Data; using FluxFlow.Nodes; using System.Threading.Tasks.Dataflow; @@ -17,7 +18,7 @@ public sealed class MqttSubscriptionTriggerNode : IFlowSource private readonly PendingExchangeCoordinator _pending; private readonly object _observationGate = new(); private readonly HashSet _observations = []; - private readonly MqttSourcePump _pump; + private readonly MqttSourcePump _pump; private IMqttTriggerRegistration? _registration; public MqttSubscriptionTriggerNode( @@ -37,7 +38,7 @@ public MqttSubscriptionTriggerNode( SettledKeyCapacity = Math.Max(options.MaximumPendingMessages, 4096) }, _clock); - _pump = new MqttSourcePump( + _pump = new MqttSourcePump( options.MaximumPendingMessages, RunCoreAsync, DisposeCoreAsync); @@ -45,9 +46,9 @@ public MqttSubscriptionTriggerNode( Nak = new MqttSignalTarget(HandleSignalAsync, _pump.Completion, MqttWorkflowOutcome.Nak); } - public ISourceBlock> Output => _pump.Output; + public ISourceBlock Output => _pump.Output; - public ISourceBlock Events => _pump.Events; + public ISourceBlock Events => _pump.Events; public IFlowSignalTarget Ack { get; } @@ -79,7 +80,7 @@ private async Task RunCoreAsync(CancellationToken cancellationToken) .WithCancellation(cancellationToken) .ConfigureAwait(false)) { - var envelope = FlowMessage.Create(delivery.Message); + var envelope = FlowMessage.Create(FlowValue.From(delivery.Message)); var tracked = false; if (_options.WorkflowAcknowledgement == MqttWorkflowAcknowledgement.Required) { diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Options/MqttControlOptions.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Options/MqttControlOptions.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Options/MqttControlOptions.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Options/MqttControlOptions.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Options/MqttSubscriptionTriggerOptions.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Options/MqttSubscriptionTriggerOptions.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Options/MqttSubscriptionTriggerOptions.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Options/MqttSubscriptionTriggerOptions.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/README.md b/src/Components/Mqtt/FluxFlow.Components.Mqtt/README.md similarity index 98% rename from src/Mqtt/FluxFlow.Components.Mqtt/README.md rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/README.md index 41cec0a9..05ed14b8 100644 --- a/src/Mqtt/FluxFlow.Components.Mqtt/README.md +++ b/src/Components/Mqtt/FluxFlow.Components.Mqtt/README.md @@ -121,12 +121,12 @@ var controller = new MqttClientController( await controller.StartAsync(); await using var publish = new MqttPublishOperationNode(controller); -await publish.Input.SendAsync(FlowMessage.Create(new MqttPublishMessage +await publish.Input.SendAsync(FlowMessage.Create(FlowValue.From(new { - Topic = "orders/accepted", - Content = FlowContent.FromBytes(payload, "application/json"), - Qos = MqttQos.AtLeastOnce -})); + topic = "orders/accepted", + content = JsonSerializer.Deserialize(payload), + qos = 1 +}))); ``` The controller is a facade. Internal collaborators separately own connection diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttSubscriptionDefinition.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttSubscriptionDefinition.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttSubscriptionDefinition.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttSubscriptionDefinition.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttSubscriptionJsonConverters.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttSubscriptionJsonConverters.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttSubscriptionJsonConverters.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttSubscriptionJsonConverters.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttSubscriptionTarget.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttSubscriptionTarget.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttSubscriptionTarget.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttSubscriptionTarget.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttTopicFilterMatcher.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttTopicFilterMatcher.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttTopicFilterMatcher.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttTopicFilterMatcher.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttTriggerRegistration.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttTriggerRegistration.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttTriggerRegistration.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Subscriptions/MqttTriggerRegistration.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Transport/MqttTransportCapabilities.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Transport/MqttTransportCapabilities.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Transport/MqttTransportCapabilities.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Transport/MqttTransportCapabilities.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Transport/MqttTransportContracts.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Transport/MqttTransportContracts.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Transport/MqttTransportContracts.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Transport/MqttTransportContracts.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Transport/MqttTransportException.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Transport/MqttTransportException.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Transport/MqttTransportException.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Transport/MqttTransportException.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Validation/MqttTopicValidationResult.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Validation/MqttTopicValidationResult.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Validation/MqttTopicValidationResult.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Validation/MqttTopicValidationResult.cs diff --git a/src/Mqtt/FluxFlow.Components.Mqtt/Validation/MqttTopicValidator.cs b/src/Components/Mqtt/FluxFlow.Components.Mqtt/Validation/MqttTopicValidator.cs similarity index 100% rename from src/Mqtt/FluxFlow.Components.Mqtt/Validation/MqttTopicValidator.cs rename to src/Components/Mqtt/FluxFlow.Components.Mqtt/Validation/MqttTopicValidator.cs diff --git a/src/Components/Observability/FluxFlow.Components.Observability.Composition/CompatibilitySuppressions.xml b/src/Components/Observability/FluxFlow.Components.Observability.Composition/CompatibilitySuppressions.xml new file mode 100644 index 00000000..8e116bf9 --- /dev/null +++ b/src/Components/Observability/FluxFlow.Components.Observability.Composition/CompatibilitySuppressions.xml @@ -0,0 +1,132 @@ + + + + + CP0002 + M:FluxFlow.Components.Observability.Composition.ObservabilityAuthoringExtensions.AddCounter(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Observability.Composition.CounterComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,FluxFlow.Components.Observability.Contracts.FlowCounterSnapshot}@) + lib/net10.0/FluxFlow.Components.Observability.Composition.dll + lib/net10.0/FluxFlow.Components.Observability.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Composition.ObservabilityAuthoringExtensions.AddCounter(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Observability.Composition.CounterComponentBuilder}) + lib/net10.0/FluxFlow.Components.Observability.Composition.dll + lib/net10.0/FluxFlow.Components.Observability.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Composition.ObservabilityAuthoringExtensions.AddLogger(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Observability.Composition.LoggerComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,FluxFlow.Components.Observability.Contracts.FlowLogEntry{System.Text.Json.JsonElement}}@) + lib/net10.0/FluxFlow.Components.Observability.Composition.dll + lib/net10.0/FluxFlow.Components.Observability.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Composition.ObservabilityAuthoringExtensions.AddLogger(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Observability.Composition.LoggerComponentBuilder}) + lib/net10.0/FluxFlow.Components.Observability.Composition.dll + lib/net10.0/FluxFlow.Components.Observability.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Composition.ObservabilityAuthoringExtensions.AddMetrics(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Observability.Composition.MetricsComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,FluxFlow.Components.Observability.Contracts.FlowMetricSnapshot}@) + lib/net10.0/FluxFlow.Components.Observability.Composition.dll + lib/net10.0/FluxFlow.Components.Observability.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Composition.ObservabilityAuthoringExtensions.AddMetrics(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Observability.Composition.MetricsComponentBuilder}) + lib/net10.0/FluxFlow.Components.Observability.Composition.dll + lib/net10.0/FluxFlow.Components.Observability.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Composition.ObservabilityComponents.get_Counter + lib/net10.0/FluxFlow.Components.Observability.Composition.dll + lib/net10.0/FluxFlow.Components.Observability.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Composition.ObservabilityComponents.get_Logger + lib/net10.0/FluxFlow.Components.Observability.Composition.dll + lib/net10.0/FluxFlow.Components.Observability.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Composition.ObservabilityComponents.get_Metrics + lib/net10.0/FluxFlow.Components.Observability.Composition.dll + lib/net10.0/FluxFlow.Components.Observability.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Composition.ObservabilityAuthoringExtensions.AddCounter(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Observability.Composition.CounterComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,FluxFlow.Components.Observability.Contracts.FlowCounterSnapshot}@) + lib/net8.0/FluxFlow.Components.Observability.Composition.dll + lib/net8.0/FluxFlow.Components.Observability.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Composition.ObservabilityAuthoringExtensions.AddCounter(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Observability.Composition.CounterComponentBuilder}) + lib/net8.0/FluxFlow.Components.Observability.Composition.dll + lib/net8.0/FluxFlow.Components.Observability.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Composition.ObservabilityAuthoringExtensions.AddLogger(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Observability.Composition.LoggerComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,FluxFlow.Components.Observability.Contracts.FlowLogEntry{System.Text.Json.JsonElement}}@) + lib/net8.0/FluxFlow.Components.Observability.Composition.dll + lib/net8.0/FluxFlow.Components.Observability.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Composition.ObservabilityAuthoringExtensions.AddLogger(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Observability.Composition.LoggerComponentBuilder}) + lib/net8.0/FluxFlow.Components.Observability.Composition.dll + lib/net8.0/FluxFlow.Components.Observability.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Composition.ObservabilityAuthoringExtensions.AddMetrics(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Observability.Composition.MetricsComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,FluxFlow.Components.Observability.Contracts.FlowMetricSnapshot}@) + lib/net8.0/FluxFlow.Components.Observability.Composition.dll + lib/net8.0/FluxFlow.Components.Observability.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Composition.ObservabilityAuthoringExtensions.AddMetrics(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Observability.Composition.MetricsComponentBuilder}) + lib/net8.0/FluxFlow.Components.Observability.Composition.dll + lib/net8.0/FluxFlow.Components.Observability.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Composition.ObservabilityComponents.get_Counter + lib/net8.0/FluxFlow.Components.Observability.Composition.dll + lib/net8.0/FluxFlow.Components.Observability.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Composition.ObservabilityComponents.get_Logger + lib/net8.0/FluxFlow.Components.Observability.Composition.dll + lib/net8.0/FluxFlow.Components.Observability.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Composition.ObservabilityComponents.get_Metrics + lib/net8.0/FluxFlow.Components.Observability.Composition.dll + lib/net8.0/FluxFlow.Components.Observability.Composition.dll + true + + diff --git a/src/FluxFlow.Components.Observability.Composition/FluxFlow.Components.Observability.Composition.csproj b/src/Components/Observability/FluxFlow.Components.Observability.Composition/FluxFlow.Components.Observability.Composition.csproj similarity index 56% rename from src/FluxFlow.Components.Observability.Composition/FluxFlow.Components.Observability.Composition.csproj rename to src/Components/Observability/FluxFlow.Components.Observability.Composition/FluxFlow.Components.Observability.Composition.csproj index 3dded908..0094aac5 100644 --- a/src/FluxFlow.Components.Observability.Composition/FluxFlow.Components.Observability.Composition.csproj +++ b/src/Components/Observability/FluxFlow.Components.Observability.Composition/FluxFlow.Components.Observability.Composition.csproj @@ -5,19 +5,19 @@ FluxFlow.Components.Observability.Composition FluxFlow.Components.Observability.Composition FluxFlow.Components.Observability.Composition - 7.0.0-rc.1 + 8.0.0-rc.1 Typed observability registration and Designer metadata over host-owned expression, selector, context, and clock resources. workflow;dataflow;components;observability;composition README.md - Requires canonical observability types and predicate; registers exact descriptors and Designer metadata through the flat designed-component API; keeps constants under ObservabilityComponentDefinition and removes its metadata-only factory. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. - - - - + + + + diff --git a/src/FluxFlow.Components.Observability.Composition/ObservabilityAuthoringExtensions.cs b/src/Components/Observability/FluxFlow.Components.Observability.Composition/ObservabilityAuthoringExtensions.cs similarity index 82% rename from src/FluxFlow.Components.Observability.Composition/ObservabilityAuthoringExtensions.cs rename to src/Components/Observability/FluxFlow.Components.Observability.Composition/ObservabilityAuthoringExtensions.cs index cd437ecd..b8ca7720 100644 --- a/src/FluxFlow.Components.Observability.Composition/ObservabilityAuthoringExtensions.cs +++ b/src/Components/Observability/FluxFlow.Components.Observability.Composition/ObservabilityAuthoringExtensions.cs @@ -4,38 +4,40 @@ using FluxFlow.Composition.Authoring; using FluxFlow.Mapping; +using FluxFlow.Data; + namespace FluxFlow.Components.Observability.Composition; public static class ObservabilityComponents { - public static ComponentContract> Counter { get; } = + public static ComponentContract> Counter { get; } = DesignedComponentContract.Create( ObservabilityComponentDefinition.Types.Counter, ObservabilityServiceCollectionExtensions.ConfigureCounter, static () => new CounterComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new InputOutputComponentHandle(component, ObservabilityComponentDefinition.Ports.Input, ObservabilityComponentDefinition.Ports.Output, ObservabilityComponentDefinition.Ports.Events)); + static component => new InputOutputComponentHandle(component, ObservabilityComponentDefinition.Ports.Input, ObservabilityComponentDefinition.Ports.Output, ObservabilityComponentDefinition.Ports.Events)); - public static ComponentContract>> Logger { get; } = + public static ComponentContract> Logger { get; } = DesignedComponentContract.Create( ObservabilityComponentDefinition.Types.Logger, ObservabilityServiceCollectionExtensions.ConfigureLogger, static () => new LoggerComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new InputOutputComponentHandle>(component, ObservabilityComponentDefinition.Ports.Input, ObservabilityComponentDefinition.Ports.Output, ObservabilityComponentDefinition.Ports.Events)); + static component => new InputOutputComponentHandle(component, ObservabilityComponentDefinition.Ports.Input, ObservabilityComponentDefinition.Ports.Output, ObservabilityComponentDefinition.Ports.Events)); - public static ComponentContract> Metrics { get; } = + public static ComponentContract> Metrics { get; } = DesignedComponentContract.Create( ObservabilityComponentDefinition.Types.Metrics, ObservabilityServiceCollectionExtensions.ConfigureMetrics, static () => new MetricsComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new InputOutputComponentHandle(component, ObservabilityComponentDefinition.Ports.Input, ObservabilityComponentDefinition.Ports.Output, ObservabilityComponentDefinition.Ports.Events)); + static component => new InputOutputComponentHandle(component, ObservabilityComponentDefinition.Ports.Input, ObservabilityComponentDefinition.Ports.Output, ObservabilityComponentDefinition.Ports.Events)); } public static class ObservabilityAuthoringExtensions { - public static InputOutputComponentHandle AddCounter( + public static InputOutputComponentHandle AddCounter( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -45,13 +47,13 @@ public static WorkflowDefinitionBuilder AddCounter( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle counter) + out InputOutputComponentHandle counter) { counter = workflow.AddCounter(name, configure); return workflow; } - public static InputOutputComponentHandle> AddLogger( + public static InputOutputComponentHandle AddLogger( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -61,13 +63,13 @@ public static WorkflowDefinitionBuilder AddLogger( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle> logger) + out InputOutputComponentHandle logger) { logger = workflow.AddLogger(name, configure); return workflow; } - public static InputOutputComponentHandle AddMetrics( + public static InputOutputComponentHandle AddMetrics( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -77,7 +79,7 @@ public static WorkflowDefinitionBuilder AddMetrics( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle metrics) + out InputOutputComponentHandle metrics) { metrics = workflow.AddMetrics(name, configure); return workflow; diff --git a/src/FluxFlow.Components.Observability.Composition/ObservabilityComponentDefinition.cs b/src/Components/Observability/FluxFlow.Components.Observability.Composition/ObservabilityComponentDefinition.cs similarity index 100% rename from src/FluxFlow.Components.Observability.Composition/ObservabilityComponentDefinition.cs rename to src/Components/Observability/FluxFlow.Components.Observability.Composition/ObservabilityComponentDefinition.cs diff --git a/src/FluxFlow.Components.Observability.Composition/ObservabilityServiceCollectionExtensions.cs b/src/Components/Observability/FluxFlow.Components.Observability.Composition/ObservabilityServiceCollectionExtensions.cs similarity index 91% rename from src/FluxFlow.Components.Observability.Composition/ObservabilityServiceCollectionExtensions.cs rename to src/Components/Observability/FluxFlow.Components.Observability.Composition/ObservabilityServiceCollectionExtensions.cs index 21b67a27..69fdfd85 100644 --- a/src/FluxFlow.Components.Observability.Composition/ObservabilityServiceCollectionExtensions.cs +++ b/src/Components/Observability/FluxFlow.Components.Observability.Composition/ObservabilityServiceCollectionExtensions.cs @@ -5,6 +5,7 @@ using FluxFlow.Components.Observability.Nodes; using FluxFlow.Components.Observability.Options; using FluxFlow.Composition; +using FluxFlow.Data; using FluxFlow.Mapping; namespace FluxFlow.Components.Observability.Composition; @@ -26,8 +27,8 @@ internal static void ConfigureCounter(ComponentRegistrationBuilder component) ConfigureCommon(component, "Counter", "Counts accepted input messages and emits counter snapshots.", "hash", "count"); component .UseFactory(CreateCounterNode) - .HasInput(ObservabilityComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "JSON value to count.", true) - .HasOutput(ObservabilityComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Current counter snapshot or workflow error.", true) + .HasFlowValueInput(ObservabilityComponentDefinition.Ports.Input, static node => node.Input, FlowValueMaterializers.JsonElement.InputShape, "Input", "Messages", 0, "JSON value to count.", true) + .HasFlowValueOutput(ObservabilityComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Current counter snapshot or workflow error.", true) .HasEvents(ObservabilityComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort counter diagnostics."); component.AddOption(ObservabilityComponentDefinition.Options.Name, OptionValueKind.Text, "Name", "Optional counter name included in snapshots and diagnostics.", section: "Counter", importance: OptionDesignMetadataAttributeValues.Advanced, editor: OptionDesignMetadataAttributeValues.Text); component.AddOption(ObservabilityComponentDefinition.Options.Predicate, OptionValueKind.Expression, "Predicate", "Optional boolean expression used to accept or reject inputs.", section: "Filtering", importance: OptionDesignMetadataAttributeValues.Primary, editor: OptionDesignMetadataAttributeValues.Expression, syntax: OptionDesignMetadataAttributeValues.Expression, relatedResource: ObservabilityComponentDefinition.Resources.Engine); @@ -45,8 +46,8 @@ internal static void ConfigureLogger(ComponentRegistrationBuilder component) ConfigureCommon(component, "Logger", "Renders structured log entries from input messages.", "list", "log"); component .UseFactory(CreateLoggerNode) - .HasInput(ObservabilityComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "JSON value to log.", true) - .HasOutput(ObservabilityComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Structured log entry or workflow error.", true) + .HasFlowValueInput(ObservabilityComponentDefinition.Ports.Input, static node => node.Input, FlowValueMaterializers.JsonElement.InputShape, "Input", "Messages", 0, "JSON value to log.", true) + .HasFlowValueOutput(ObservabilityComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Structured log entry or workflow error.", true) .HasEvents(ObservabilityComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort logger diagnostics."); component.AddOption(ObservabilityComponentDefinition.Options.Level, OptionValueKind.Enum, "Level", "Log level applied to emitted entries.", defaultValue: defaults.Level, section: "Logging", importance: OptionDesignMetadataAttributeValues.Advanced); foreach (var level in Enum.GetValues()) @@ -65,8 +66,8 @@ internal static void ConfigureMetrics(ComponentRegistrationBuilder component) ConfigureCommon(component, "Metrics", "Tracks count, rate, timestamp, and optional size snapshots for inputs.", "activity", "observeMetrics"); component .UseFactory(CreateMetricsNode) - .HasInput(ObservabilityComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "JSON value to observe.", true) - .HasOutput(ObservabilityComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Metric snapshot or workflow error.", true) + .HasFlowValueInput(ObservabilityComponentDefinition.Ports.Input, static node => node.Input, FlowValueMaterializers.JsonElement.InputShape, "Input", "Messages", 0, "JSON value to observe.", true) + .HasFlowValueOutput(ObservabilityComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Metric snapshot or workflow error.", true) .HasEvents(ObservabilityComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort metrics diagnostics."); component.AddOption(ObservabilityComponentDefinition.Options.Name, OptionValueKind.Text, "Name", "Optional metric name included in snapshots and diagnostics.", section: "Metrics", importance: OptionDesignMetadataAttributeValues.Advanced, editor: OptionDesignMetadataAttributeValues.Text); AddCapacity(component, defaults.BoundedCapacity); diff --git a/src/FluxFlow.Components.Observability.Composition/README.md b/src/Components/Observability/FluxFlow.Components.Observability.Composition/README.md similarity index 100% rename from src/FluxFlow.Components.Observability.Composition/README.md rename to src/Components/Observability/FluxFlow.Components.Observability.Composition/README.md diff --git a/src/Components/Observability/FluxFlow.Components.Observability/CompatibilitySuppressions.xml b/src/Components/Observability/FluxFlow.Components.Observability/CompatibilitySuppressions.xml new file mode 100644 index 00000000..ec8b6e34 --- /dev/null +++ b/src/Components/Observability/FluxFlow.Components.Observability/CompatibilitySuppressions.xml @@ -0,0 +1,90 @@ + + + + + CP0002 + M:FluxFlow.Components.Observability.Nodes.FlowCounterNode`1.get_Events + lib/net10.0/FluxFlow.Components.Observability.dll + lib/net10.0/FluxFlow.Components.Observability.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Nodes.FlowLoggerNode`1.get_Events + lib/net10.0/FluxFlow.Components.Observability.dll + lib/net10.0/FluxFlow.Components.Observability.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Nodes.FlowMetricsNode`1.get_Events + lib/net10.0/FluxFlow.Components.Observability.dll + lib/net10.0/FluxFlow.Components.Observability.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Nodes.FlowCounterNode`1.get_Events + lib/net8.0/FluxFlow.Components.Observability.dll + lib/net8.0/FluxFlow.Components.Observability.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Nodes.FlowLoggerNode`1.get_Events + lib/net8.0/FluxFlow.Components.Observability.dll + lib/net8.0/FluxFlow.Components.Observability.dll + true + + + CP0002 + M:FluxFlow.Components.Observability.Nodes.FlowMetricsNode`1.get_Events + lib/net8.0/FluxFlow.Components.Observability.dll + lib/net8.0/FluxFlow.Components.Observability.dll + true + + + CP0007 + T:FluxFlow.Components.Observability.Nodes.FlowCounterNode + lib/net10.0/FluxFlow.Components.Observability.dll + lib/net10.0/FluxFlow.Components.Observability.dll + true + + + CP0007 + T:FluxFlow.Components.Observability.Nodes.FlowLoggerNode + lib/net10.0/FluxFlow.Components.Observability.dll + lib/net10.0/FluxFlow.Components.Observability.dll + true + + + CP0007 + T:FluxFlow.Components.Observability.Nodes.FlowMetricsNode + lib/net10.0/FluxFlow.Components.Observability.dll + lib/net10.0/FluxFlow.Components.Observability.dll + true + + + CP0007 + T:FluxFlow.Components.Observability.Nodes.FlowCounterNode + lib/net8.0/FluxFlow.Components.Observability.dll + lib/net8.0/FluxFlow.Components.Observability.dll + true + + + CP0007 + T:FluxFlow.Components.Observability.Nodes.FlowLoggerNode + lib/net8.0/FluxFlow.Components.Observability.dll + lib/net8.0/FluxFlow.Components.Observability.dll + true + + + CP0007 + T:FluxFlow.Components.Observability.Nodes.FlowMetricsNode + lib/net8.0/FluxFlow.Components.Observability.dll + lib/net8.0/FluxFlow.Components.Observability.dll + true + + diff --git a/src/FluxFlow.Components.Observability/Contracts/FlowCounterSnapshot.cs b/src/Components/Observability/FluxFlow.Components.Observability/Contracts/FlowCounterSnapshot.cs similarity index 100% rename from src/FluxFlow.Components.Observability/Contracts/FlowCounterSnapshot.cs rename to src/Components/Observability/FluxFlow.Components.Observability/Contracts/FlowCounterSnapshot.cs diff --git a/src/FluxFlow.Components.Observability/Contracts/FlowLogEntry.cs b/src/Components/Observability/FluxFlow.Components.Observability/Contracts/FlowLogEntry.cs similarity index 100% rename from src/FluxFlow.Components.Observability/Contracts/FlowLogEntry.cs rename to src/Components/Observability/FluxFlow.Components.Observability/Contracts/FlowLogEntry.cs diff --git a/src/FluxFlow.Components.Observability/Contracts/FlowLogLevel.cs b/src/Components/Observability/FluxFlow.Components.Observability/Contracts/FlowLogLevel.cs similarity index 100% rename from src/FluxFlow.Components.Observability/Contracts/FlowLogLevel.cs rename to src/Components/Observability/FluxFlow.Components.Observability/Contracts/FlowLogLevel.cs diff --git a/src/FluxFlow.Components.Observability/Contracts/FlowMetricSnapshot.cs b/src/Components/Observability/FluxFlow.Components.Observability/Contracts/FlowMetricSnapshot.cs similarity index 100% rename from src/FluxFlow.Components.Observability/Contracts/FlowMetricSnapshot.cs rename to src/Components/Observability/FluxFlow.Components.Observability/Contracts/FlowMetricSnapshot.cs diff --git a/src/FluxFlow.Components.Observability/Contracts/IObservabilityValueSelector.cs b/src/Components/Observability/FluxFlow.Components.Observability/Contracts/IObservabilityValueSelector.cs similarity index 100% rename from src/FluxFlow.Components.Observability/Contracts/IObservabilityValueSelector.cs rename to src/Components/Observability/FluxFlow.Components.Observability/Contracts/IObservabilityValueSelector.cs diff --git a/src/FluxFlow.Components.Observability/Contracts/ObservabilityNodeContext.cs b/src/Components/Observability/FluxFlow.Components.Observability/Contracts/ObservabilityNodeContext.cs similarity index 100% rename from src/FluxFlow.Components.Observability/Contracts/ObservabilityNodeContext.cs rename to src/Components/Observability/FluxFlow.Components.Observability/Contracts/ObservabilityNodeContext.cs diff --git a/src/FluxFlow.Components.Observability/Diagnostics/ObservabilityDiagnosticNames.cs b/src/Components/Observability/FluxFlow.Components.Observability/Diagnostics/ObservabilityDiagnosticNames.cs similarity index 100% rename from src/FluxFlow.Components.Observability/Diagnostics/ObservabilityDiagnosticNames.cs rename to src/Components/Observability/FluxFlow.Components.Observability/Diagnostics/ObservabilityDiagnosticNames.cs diff --git a/src/FluxFlow.Components.Observability/FluxFlow.Components.Observability.csproj b/src/Components/Observability/FluxFlow.Components.Observability/FluxFlow.Components.Observability.csproj similarity index 60% rename from src/FluxFlow.Components.Observability/FluxFlow.Components.Observability.csproj rename to src/Components/Observability/FluxFlow.Components.Observability/FluxFlow.Components.Observability.csproj index 918d25ea..345ef43e 100644 --- a/src/FluxFlow.Components.Observability/FluxFlow.Components.Observability.csproj +++ b/src/Components/Observability/FluxFlow.Components.Observability/FluxFlow.Components.Observability.csproj @@ -4,15 +4,15 @@ FluxFlow.Components.Observability FluxFlow.Components.Observability FluxFlow.Components.Observability - 7.0.0 + 8.0.0-rc.1 Standalone typed observability nodes with normal value-or-error outputs and component events. workflow;dataflow;components;observability - Removes retired component type aliases and precompiles logger templates while preserving canonical observability identities and output behavior. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md - - + + diff --git a/src/Components/Observability/FluxFlow.Components.Observability/Nodes/CanonicalObservabilityNode.cs b/src/Components/Observability/FluxFlow.Components.Observability/Nodes/CanonicalObservabilityNode.cs new file mode 100644 index 00000000..709ba4a9 --- /dev/null +++ b/src/Components/Observability/FluxFlow.Components.Observability/Nodes/CanonicalObservabilityNode.cs @@ -0,0 +1,110 @@ +using System.Text.Json; +using System.Threading.Tasks.Dataflow; +using FluxFlow.Data; +using FluxFlow.Mapping; +using FluxFlow.Nodes; + +namespace FluxFlow.Components.Observability.Nodes; + +/// +/// Owns the canonical workflow boundary for a typed observability operation. +/// Materialization, output conversion, events, and lifecycle remain inside the +/// user-visible component rather than in a composition-time wrapper. +/// +internal sealed class CanonicalObservabilityNode : FlowNode +{ + private readonly IFlowNode _operation; + private readonly ITargetBlock> _operationInput; + private readonly BufferBlock> _responses; + private readonly string _nodeType; + private readonly TimeProvider _clock; + private readonly ActionBlock _eventRelay; + private readonly IDisposable _outputLink; + private readonly IDisposable _eventLink; + + internal CanonicalObservabilityNode( + IFlowNode operation, + ITargetBlock> input, + ISourceBlock> output, + ISourceBlock events, + string nodeType, + int boundedCapacity, + TimeProvider? clock) + : base(new FlowNodeOptions + { + InputCapacity = boundedCapacity, + OutputCapacity = boundedCapacity + }) + { + _operation = operation; + _operationInput = input; + _nodeType = nodeType; + _clock = clock ?? TimeProvider.System; + _responses = new BufferBlock>(new DataflowBlockOptions + { + BoundedCapacity = 1 + }); + _eventRelay = new ActionBlock(@event => EmitEvent(@event)); + _outputLink = output.LinkTo( + _responses, + new DataflowLinkOptions { PropagateCompletion = true }); + _eventLink = events.LinkTo( + _eventRelay, + new DataflowLinkOptions { PropagateCompletion = true }); + } + + protected override async Task ProcessAsync(FlowMessage message) + { + var materialization = FlowValueMaterializers.JsonElement.Materialize(message.Value!); + if (!materialization.IsSuccess) + { + var error = materialization.Error!; + EmitEvent(new FlowEvent + { + Timestamp = _clock.GetUtcNow(), + CorrelationId = message.CorrelationId, + Name = $"{_nodeType}.rejected", + Level = FlowEventLevel.Warning, + Message = error.Message, + Attributes = new Dictionary(StringComparer.Ordinal) + { + ["errorCode"] = error.Code, + ["isError"] = true, + ["nodeType"] = _nodeType + } + }); + await EmitAsync(message.WithError(error), Stopping).ConfigureAwait(false); + return; + } + + if (!await _operationInput.SendAsync( + message.ConvertValue(materialization.Value), + Stopping).ConfigureAwait(false)) + { + throw new InvalidOperationException($"{_nodeType} input is unavailable."); + } + + var response = await _responses.ReceiveAsync(Stopping).ConfigureAwait(false); + await EmitAsync( + response.IsError + ? response.ConvertError() + : response.ConvertValue(FlowValue.From(response.Value)), + Stopping) + .ConfigureAwait(false); + } + + protected override async ValueTask OnInputCompletedAsync() + { + _operation.Complete(); + await _operation.Completion.ConfigureAwait(false); + await _responses.Completion.ConfigureAwait(false); + await _eventRelay.Completion.ConfigureAwait(false); + } + + protected override async ValueTask OnDisposeAsync() + { + _outputLink.Dispose(); + _eventLink.Dispose(); + await _operation.DisposeAsync().ConfigureAwait(false); + } +} diff --git a/src/FluxFlow.Components.Observability/Nodes/FlowCounterNode.cs b/src/Components/Observability/FluxFlow.Components.Observability/Nodes/FlowCounterNode.cs similarity index 87% rename from src/FluxFlow.Components.Observability/Nodes/FlowCounterNode.cs rename to src/Components/Observability/FluxFlow.Components.Observability/Nodes/FlowCounterNode.cs index e0bee150..b6adb647 100644 --- a/src/FluxFlow.Components.Observability/Nodes/FlowCounterNode.cs +++ b/src/Components/Observability/FluxFlow.Components.Observability/Nodes/FlowCounterNode.cs @@ -14,16 +14,44 @@ namespace FluxFlow.Components.Observability.Nodes; /// Counts immutable workflow values and emits counted, rejected, and expected /// evaluation outcomes through one normal result output. /// -public sealed class FlowCounterNode : FlowCounterNode +public sealed class FlowCounterNode : IFlowNode { + private readonly CanonicalObservabilityNode _inner; + public FlowCounterNode( FlowCounterOptions options, IFlowExpressionEngine? expressionEngine = null, IFlowMapContextFactory? contextFactory = null, TimeProvider? clock = null) - : base(options, expressionEngine, contextFactory, clock) { + var operation = new FlowCounterNode( + options, + expressionEngine, + contextFactory, + clock); + _inner = new CanonicalObservabilityNode( + operation, + operation.Input, + operation.Output, + operation.Events, + "metric.count", + options.BoundedCapacity, + clock); } + + public ITargetBlock Input => _inner.Input; + + public ISourceBlock Output => _inner.Output; + + public ISourceBlock Events => _inner.Events; + + public Task Completion => _inner.Completion; + + public void Complete() => _inner.Complete(); + + public void Fault(Exception exception) => _inner.Fault(exception); + + public ValueTask DisposeAsync() => _inner.DisposeAsync(); } public class FlowCounterNode : IFlowNode @@ -77,7 +105,7 @@ public FlowCounterNode( public ISourceBlock> Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; diff --git a/src/FluxFlow.Components.Observability/Nodes/FlowLoggerNode.cs b/src/Components/Observability/FluxFlow.Components.Observability/Nodes/FlowLoggerNode.cs similarity index 93% rename from src/FluxFlow.Components.Observability/Nodes/FlowLoggerNode.cs rename to src/Components/Observability/FluxFlow.Components.Observability/Nodes/FlowLoggerNode.cs index 8685fb69..9b7edcb7 100644 --- a/src/FluxFlow.Components.Observability/Nodes/FlowLoggerNode.cs +++ b/src/Components/Observability/FluxFlow.Components.Observability/Nodes/FlowLoggerNode.cs @@ -14,15 +14,39 @@ namespace FluxFlow.Components.Observability.Nodes; /// Renders structured log data from immutable workflow values and emits /// complete, partial, and expected failure outcomes through one normal output. /// -public sealed class FlowLoggerNode : FlowLoggerNode +public sealed class FlowLoggerNode : IFlowNode { + private readonly CanonicalObservabilityNode> _inner; + public FlowLoggerNode( FlowLoggerOptions options, IReadOnlyDictionary>? attributeSelectors = null, TimeProvider? clock = null) - : base(options, attributeSelectors, clock) { + var operation = new FlowLoggerNode(options, attributeSelectors, clock); + _inner = new CanonicalObservabilityNode>( + operation, + operation.Input, + operation.Output, + operation.Events, + "log.write", + options.BoundedCapacity, + clock); } + + public ITargetBlock Input => _inner.Input; + + public ISourceBlock Output => _inner.Output; + + public ISourceBlock Events => _inner.Events; + + public Task Completion => _inner.Completion; + + public void Complete() => _inner.Complete(); + + public void Fault(Exception exception) => _inner.Fault(exception); + + public ValueTask DisposeAsync() => _inner.DisposeAsync(); } public class FlowLoggerNode : IFlowNode @@ -68,7 +92,7 @@ public FlowLoggerNode( public ISourceBlock>> Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; diff --git a/src/FluxFlow.Components.Observability/Nodes/FlowMetricsNode.cs b/src/Components/Observability/FluxFlow.Components.Observability/Nodes/FlowMetricsNode.cs similarity index 91% rename from src/FluxFlow.Components.Observability/Nodes/FlowMetricsNode.cs rename to src/Components/Observability/FluxFlow.Components.Observability/Nodes/FlowMetricsNode.cs index bd749aac..8e8952dc 100644 --- a/src/FluxFlow.Components.Observability/Nodes/FlowMetricsNode.cs +++ b/src/Components/Observability/FluxFlow.Components.Observability/Nodes/FlowMetricsNode.cs @@ -14,15 +14,39 @@ namespace FluxFlow.Components.Observability.Nodes; /// Observes immutable workflow values and emits complete, partial, and expected /// failure metric outcomes through one normal result output. /// -public sealed class FlowMetricsNode : FlowMetricsNode +public sealed class FlowMetricsNode : IFlowNode { + private readonly CanonicalObservabilityNode _inner; + public FlowMetricsNode( FlowMetricsOptions options, IObservabilityValueSelector? sizeSelector = null, TimeProvider? clock = null) - : base(options, sizeSelector, clock) { + var operation = new FlowMetricsNode(options, sizeSelector, clock); + _inner = new CanonicalObservabilityNode( + operation, + operation.Input, + operation.Output, + operation.Events, + "metric.measure", + options.BoundedCapacity, + clock); } + + public ITargetBlock Input => _inner.Input; + + public ISourceBlock Output => _inner.Output; + + public ISourceBlock Events => _inner.Events; + + public Task Completion => _inner.Completion; + + public void Complete() => _inner.Complete(); + + public void Fault(Exception exception) => _inner.Fault(exception); + + public ValueTask DisposeAsync() => _inner.DisposeAsync(); } public class FlowMetricsNode : IFlowNode @@ -64,7 +88,7 @@ public FlowMetricsNode( public ISourceBlock> Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; diff --git a/src/FluxFlow.Components.Observability/Nodes/ObservabilityPipeline.cs b/src/Components/Observability/FluxFlow.Components.Observability/Nodes/ObservabilityPipeline.cs similarity index 100% rename from src/FluxFlow.Components.Observability/Nodes/ObservabilityPipeline.cs rename to src/Components/Observability/FluxFlow.Components.Observability/Nodes/ObservabilityPipeline.cs diff --git a/src/FluxFlow.Components.Observability/ObservabilityErrorCodeNames.cs b/src/Components/Observability/FluxFlow.Components.Observability/ObservabilityErrorCodeNames.cs similarity index 100% rename from src/FluxFlow.Components.Observability/ObservabilityErrorCodeNames.cs rename to src/Components/Observability/FluxFlow.Components.Observability/ObservabilityErrorCodeNames.cs diff --git a/src/FluxFlow.Components.Observability/ObservabilityResultKinds.cs b/src/Components/Observability/FluxFlow.Components.Observability/ObservabilityResultKinds.cs similarity index 100% rename from src/FluxFlow.Components.Observability/ObservabilityResultKinds.cs rename to src/Components/Observability/FluxFlow.Components.Observability/ObservabilityResultKinds.cs diff --git a/src/FluxFlow.Components.Observability/Options/FlowCounterOptions.cs b/src/Components/Observability/FluxFlow.Components.Observability/Options/FlowCounterOptions.cs similarity index 100% rename from src/FluxFlow.Components.Observability/Options/FlowCounterOptions.cs rename to src/Components/Observability/FluxFlow.Components.Observability/Options/FlowCounterOptions.cs diff --git a/src/FluxFlow.Components.Observability/Options/FlowLoggerOptions.cs b/src/Components/Observability/FluxFlow.Components.Observability/Options/FlowLoggerOptions.cs similarity index 100% rename from src/FluxFlow.Components.Observability/Options/FlowLoggerOptions.cs rename to src/Components/Observability/FluxFlow.Components.Observability/Options/FlowLoggerOptions.cs diff --git a/src/FluxFlow.Components.Observability/Options/FlowMetricsOptions.cs b/src/Components/Observability/FluxFlow.Components.Observability/Options/FlowMetricsOptions.cs similarity index 100% rename from src/FluxFlow.Components.Observability/Options/FlowMetricsOptions.cs rename to src/Components/Observability/FluxFlow.Components.Observability/Options/FlowMetricsOptions.cs diff --git a/src/FluxFlow.Components.Observability/Options/OneOrManyStringJsonConverter.cs b/src/Components/Observability/FluxFlow.Components.Observability/Options/OneOrManyStringJsonConverter.cs similarity index 100% rename from src/FluxFlow.Components.Observability/Options/OneOrManyStringJsonConverter.cs rename to src/Components/Observability/FluxFlow.Components.Observability/Options/OneOrManyStringJsonConverter.cs diff --git a/src/FluxFlow.Components.Observability/README.md b/src/Components/Observability/FluxFlow.Components.Observability/README.md similarity index 100% rename from src/FluxFlow.Components.Observability/README.md rename to src/Components/Observability/FluxFlow.Components.Observability/README.md diff --git a/src/Components/Payloads/FluxFlow.Components.Payloads.Composition/CompatibilitySuppressions.xml b/src/Components/Payloads/FluxFlow.Components.Payloads.Composition/CompatibilitySuppressions.xml new file mode 100644 index 00000000..07287c7d --- /dev/null +++ b/src/Components/Payloads/FluxFlow.Components.Payloads.Composition/CompatibilitySuppressions.xml @@ -0,0 +1,62 @@ + + + + + CP0002 + M:FluxFlow.Components.Payloads.Composition.PayloadsAuthoringExtensions.AddPayloadInspection(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Data.FlowContent,FluxFlow.Components.Payloads.Contracts.PayloadInspectionResult}@) + lib/net10.0/FluxFlow.Components.Payloads.Composition.dll + lib/net10.0/FluxFlow.Components.Payloads.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Payloads.Composition.PayloadsAuthoringExtensions.AddPayloadInspection(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Payloads.Composition.PayloadInspectionComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Data.FlowContent,FluxFlow.Components.Payloads.Contracts.PayloadInspectionResult}@) + lib/net10.0/FluxFlow.Components.Payloads.Composition.dll + lib/net10.0/FluxFlow.Components.Payloads.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Payloads.Composition.PayloadsAuthoringExtensions.AddPayloadInspection(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Payloads.Composition.PayloadInspectionComponentBuilder}) + lib/net10.0/FluxFlow.Components.Payloads.Composition.dll + lib/net10.0/FluxFlow.Components.Payloads.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Payloads.Composition.PayloadsComponents.get_PayloadInspection + lib/net10.0/FluxFlow.Components.Payloads.Composition.dll + lib/net10.0/FluxFlow.Components.Payloads.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Payloads.Composition.PayloadsAuthoringExtensions.AddPayloadInspection(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Data.FlowContent,FluxFlow.Components.Payloads.Contracts.PayloadInspectionResult}@) + lib/net8.0/FluxFlow.Components.Payloads.Composition.dll + lib/net8.0/FluxFlow.Components.Payloads.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Payloads.Composition.PayloadsAuthoringExtensions.AddPayloadInspection(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Payloads.Composition.PayloadInspectionComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Data.FlowContent,FluxFlow.Components.Payloads.Contracts.PayloadInspectionResult}@) + lib/net8.0/FluxFlow.Components.Payloads.Composition.dll + lib/net8.0/FluxFlow.Components.Payloads.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Payloads.Composition.PayloadsAuthoringExtensions.AddPayloadInspection(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Payloads.Composition.PayloadInspectionComponentBuilder}) + lib/net8.0/FluxFlow.Components.Payloads.Composition.dll + lib/net8.0/FluxFlow.Components.Payloads.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Payloads.Composition.PayloadsComponents.get_PayloadInspection + lib/net8.0/FluxFlow.Components.Payloads.Composition.dll + lib/net8.0/FluxFlow.Components.Payloads.Composition.dll + true + + diff --git a/src/FluxFlow.Components.Payloads.Composition/FluxFlow.Components.Payloads.Composition.csproj b/src/Components/Payloads/FluxFlow.Components.Payloads.Composition/FluxFlow.Components.Payloads.Composition.csproj similarity index 64% rename from src/FluxFlow.Components.Payloads.Composition/FluxFlow.Components.Payloads.Composition.csproj rename to src/Components/Payloads/FluxFlow.Components.Payloads.Composition/FluxFlow.Components.Payloads.Composition.csproj index 8b563a33..b0e0558f 100644 --- a/src/FluxFlow.Components.Payloads.Composition/FluxFlow.Components.Payloads.Composition.csproj +++ b/src/Components/Payloads/FluxFlow.Components.Payloads.Composition/FluxFlow.Components.Payloads.Composition.csproj @@ -5,17 +5,17 @@ FluxFlow.Components.Payloads.Composition FluxFlow.Components.Payloads.Composition FluxFlow.Components.Payloads.Composition - 6.0.0-rc.1 + 7.0.0-rc.1 FluxFlow.Composition registration and Designer metadata for canonical FlowContent inspection over host-owned codec catalogs and clocks. workflow;dataflow;components;payloads;composition README.md - Registers exact payload descriptors and Designer metadata through the flat designed-component API; keeps constants under PayloadsComponentDefinition and removes its metadata-only factory without changing runtime behavior. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. - - + + diff --git a/src/FluxFlow.Components.Payloads.Composition/PayloadsAuthoringExtensions.cs b/src/Components/Payloads/FluxFlow.Components.Payloads.Composition/PayloadsAuthoringExtensions.cs similarity index 84% rename from src/FluxFlow.Components.Payloads.Composition/PayloadsAuthoringExtensions.cs rename to src/Components/Payloads/FluxFlow.Components.Payloads.Composition/PayloadsAuthoringExtensions.cs index d2947407..20236e0c 100644 --- a/src/FluxFlow.Components.Payloads.Composition/PayloadsAuthoringExtensions.cs +++ b/src/Components/Payloads/FluxFlow.Components.Payloads.Composition/PayloadsAuthoringExtensions.cs @@ -7,18 +7,18 @@ namespace FluxFlow.Components.Payloads.Composition; public static class PayloadsComponents { - public static ComponentContract> PayloadInspection { get; } = + public static ComponentContract> PayloadInspection { get; } = DesignedComponentContract.Create( PayloadsComponentDefinition.Types.Inspect, PayloadsServiceCollectionExtensions.ConfigureInspect, static () => new PayloadInspectionComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new InputOutputComponentHandle(component, PayloadsComponentDefinition.Ports.Input, PayloadsComponentDefinition.Ports.Output, PayloadsComponentDefinition.Ports.Events)); + static component => new InputOutputComponentHandle(component, PayloadsComponentDefinition.Ports.Input, PayloadsComponentDefinition.Ports.Output, PayloadsComponentDefinition.Ports.Events)); } public static class PayloadsAuthoringExtensions { - public static InputOutputComponentHandle AddPayloadInspection( + public static InputOutputComponentHandle AddPayloadInspection( this WorkflowDefinitionBuilder workflow, string name, Action? configure = null) @@ -30,7 +30,7 @@ public static InputOutputComponentHandle A public static WorkflowDefinitionBuilder AddPayloadInspection( this WorkflowDefinitionBuilder workflow, string name, - out InputOutputComponentHandle inspection) + out InputOutputComponentHandle inspection) { inspection = workflow.AddPayloadInspection(name); return workflow; @@ -40,7 +40,7 @@ public static WorkflowDefinitionBuilder AddPayloadInspection( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle inspection) + out InputOutputComponentHandle inspection) { ArgumentNullException.ThrowIfNull(configure); inspection = workflow.AddPayloadInspection(name, configure); diff --git a/src/FluxFlow.Components.Payloads.Composition/PayloadsComponentDefinition.cs b/src/Components/Payloads/FluxFlow.Components.Payloads.Composition/PayloadsComponentDefinition.cs similarity index 100% rename from src/FluxFlow.Components.Payloads.Composition/PayloadsComponentDefinition.cs rename to src/Components/Payloads/FluxFlow.Components.Payloads.Composition/PayloadsComponentDefinition.cs diff --git a/src/FluxFlow.Components.Payloads.Composition/PayloadsServiceCollectionExtensions.cs b/src/Components/Payloads/FluxFlow.Components.Payloads.Composition/PayloadsServiceCollectionExtensions.cs similarity index 91% rename from src/FluxFlow.Components.Payloads.Composition/PayloadsServiceCollectionExtensions.cs rename to src/Components/Payloads/FluxFlow.Components.Payloads.Composition/PayloadsServiceCollectionExtensions.cs index 9a3a7fe9..60eb42b6 100644 --- a/src/FluxFlow.Components.Payloads.Composition/PayloadsServiceCollectionExtensions.cs +++ b/src/Components/Payloads/FluxFlow.Components.Payloads.Composition/PayloadsServiceCollectionExtensions.cs @@ -29,8 +29,8 @@ internal static void ConfigureInspect(ComponentRegistrationBuilder component) 420); component .UseFactory(CreatePayloadInspectNode) - .HasInput(PayloadsComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Canonical content to inspect.", true) - .HasOutput(PayloadsComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Inspection result; content failures use the message error case.", true) + .HasFlowValueInput(PayloadsComponentDefinition.Ports.Input, static node => node.Input, FlowValueMaterializers.Content.InputShape, "Input", "Messages", 0, "Canonical content to inspect.", true) + .HasFlowValueOutput(PayloadsComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Inspection result; content failures use the message error case.", true) .HasEvents(PayloadsComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort payload diagnostics."); AddNumber(component, PayloadsComponentDefinition.Options.MaxInputBytes, "Max Input Bytes", "Maximum input payload size to inspect.", defaults.MaxInputBytes, "Limits", OptionDesignMetadataAttributeValues.Primary); AddNumber(component, PayloadsComponentDefinition.Options.MaxPreviewBytes, "Max Preview Bytes", "Maximum text preview size in bytes.", defaults.MaxPreviewBytes, "Preview", OptionDesignMetadataAttributeValues.Primary); diff --git a/src/FluxFlow.Components.Payloads.Composition/README.md b/src/Components/Payloads/FluxFlow.Components.Payloads.Composition/README.md similarity index 100% rename from src/FluxFlow.Components.Payloads.Composition/README.md rename to src/Components/Payloads/FluxFlow.Components.Payloads.Composition/README.md diff --git a/src/Components/Payloads/FluxFlow.Components.Payloads/CompatibilitySuppressions.xml b/src/Components/Payloads/FluxFlow.Components.Payloads/CompatibilitySuppressions.xml new file mode 100644 index 00000000..e0fd617b --- /dev/null +++ b/src/Components/Payloads/FluxFlow.Components.Payloads/CompatibilitySuppressions.xml @@ -0,0 +1,20 @@ + + + + + CP0007 + T:FluxFlow.Components.Payloads.Nodes.PayloadInspectNode + lib/net10.0/FluxFlow.Components.Payloads.dll + lib/net10.0/FluxFlow.Components.Payloads.dll + true + + + CP0007 + T:FluxFlow.Components.Payloads.Nodes.PayloadInspectNode + lib/net8.0/FluxFlow.Components.Payloads.dll + lib/net8.0/FluxFlow.Components.Payloads.dll + true + + diff --git a/src/FluxFlow.Components.Payloads/Contracts/PayloadInspectionResult.cs b/src/Components/Payloads/FluxFlow.Components.Payloads/Contracts/PayloadInspectionResult.cs similarity index 100% rename from src/FluxFlow.Components.Payloads/Contracts/PayloadInspectionResult.cs rename to src/Components/Payloads/FluxFlow.Components.Payloads/Contracts/PayloadInspectionResult.cs diff --git a/src/FluxFlow.Components.Payloads/Contracts/PayloadKind.cs b/src/Components/Payloads/FluxFlow.Components.Payloads/Contracts/PayloadKind.cs similarity index 100% rename from src/FluxFlow.Components.Payloads/Contracts/PayloadKind.cs rename to src/Components/Payloads/FluxFlow.Components.Payloads/Contracts/PayloadKind.cs diff --git a/src/FluxFlow.Components.Payloads/Diagnostics/PayloadDiagnosticNames.cs b/src/Components/Payloads/FluxFlow.Components.Payloads/Diagnostics/PayloadDiagnosticNames.cs similarity index 100% rename from src/FluxFlow.Components.Payloads/Diagnostics/PayloadDiagnosticNames.cs rename to src/Components/Payloads/FluxFlow.Components.Payloads/Diagnostics/PayloadDiagnosticNames.cs diff --git a/src/FluxFlow.Components.Payloads/FluxFlow.Components.Payloads.csproj b/src/Components/Payloads/FluxFlow.Components.Payloads/FluxFlow.Components.Payloads.csproj similarity index 66% rename from src/FluxFlow.Components.Payloads/FluxFlow.Components.Payloads.csproj rename to src/Components/Payloads/FluxFlow.Components.Payloads/FluxFlow.Components.Payloads.csproj index 6379a159..c203128f 100644 --- a/src/FluxFlow.Components.Payloads/FluxFlow.Components.Payloads.csproj +++ b/src/Components/Payloads/FluxFlow.Components.Payloads/FluxFlow.Components.Payloads.csproj @@ -4,14 +4,14 @@ FluxFlow.Components.Payloads FluxFlow.Components.Payloads FluxFlow.Components.Payloads - 6.0.0 + 7.0.0-rc.1 Standalone FluxFlow payload inspection over exact FlowContent with bounded previews and value-or-error outcomes. No engine required. workflow;dataflow;components;payloads;inspection - Migrates component inputs and outputs to typed FlowMessage<T> value-or-error contracts, removes universal FlowValue or FlowResult coupling, and keeps errors on the normal output. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md - + diff --git a/src/FluxFlow.Components.Payloads/Nodes/PayloadInspectNode.cs b/src/Components/Payloads/FluxFlow.Components.Payloads/Nodes/PayloadInspectNode.cs similarity index 88% rename from src/FluxFlow.Components.Payloads/Nodes/PayloadInspectNode.cs rename to src/Components/Payloads/FluxFlow.Components.Payloads/Nodes/PayloadInspectNode.cs index 1ebf8b19..c008c732 100644 --- a/src/FluxFlow.Components.Payloads/Nodes/PayloadInspectNode.cs +++ b/src/Components/Payloads/FluxFlow.Components.Payloads/Nodes/PayloadInspectNode.cs @@ -14,7 +14,7 @@ namespace FluxFlow.Components.Payloads.Nodes; /// Inspects exact payload bytes and decodes them only when the declared media /// type requires JSON, XML, or text processing. /// -public sealed class PayloadInspectNode : FlowNode +public sealed class PayloadInspectNode : FlowNode { private static readonly JsonSerializerOptions FormattedJsonOptions = new() { @@ -34,37 +34,59 @@ public PayloadInspectNode( protected override bool HandlesErrors => true; - protected override async Task ProcessAsync(FlowMessage message) + protected override async Task ProcessAsync(FlowMessage message) => await EmitAsync(Process(message), Stopping).ConfigureAwait(false); - private FlowMessage Process(FlowMessage message) + private FlowMessage Process(FlowMessage message) { ArgumentNullException.ThrowIfNull(message); if (message.IsError) - return message.WithError(message.Error!); + return message.WithError(message.Error!); var timestamp = _clock.GetUtcNow(); + var materialization = FlowValueMaterializers.Content.Materialize(message.Value); + if (!materialization.IsSuccess) + { + var rejection = materialization.Error!; + EmitEvent(new FlowEvent + { + Timestamp = timestamp, + CorrelationId = message.CorrelationId, + Name = "payload.inspect.rejected", + Level = FlowEventLevel.Warning, + Message = rejection.Message, + Attributes = new Dictionary(StringComparer.Ordinal) + { + ["kind"] = null, + ["isError"] = true, + ["errorCode"] = rejection.Code + } + }); + return message.WithError(rejection); + } + + var content = materialization.Value; try { - var inspection = Inspect(message.Value, timestamp); - PublishEvent(message, inspection, error: null, timestamp); - return message.With(inspection); + var inspection = Inspect(content, timestamp); + PublishEvent(message, content, inspection, error: null, timestamp); + return message.With(FlowValue.From(inspection)); } catch (PayloadInspectionException exception) { - var error = CreateError(exception.Code, exception.Message, message.Value, exception); - PublishEvent(message, inspection: null, error, timestamp); - return message.WithError(error); + var error = CreateError(exception.Code, exception.Message, content, exception); + PublishEvent(message, content, inspection: null, error, timestamp); + return message.WithError(error); } catch (Exception exception) { var error = CreateError( PayloadErrorCodeNames.InspectFailed, $"payload.inspect failed: {exception.Message}", - message.Value, + content, exception); - PublishEvent(message, inspection: null, error, timestamp); - return message.WithError(error); + PublishEvent(message, content, inspection: null, error, timestamp); + return message.WithError(error); } } @@ -254,7 +276,8 @@ private static bool TryDecodeBase64(string value, out byte[] bytes) } private void PublishEvent( - FlowMessage message, + FlowMessage message, + FlowContent content, PayloadInspectionResult? inspection, FlowError? error, DateTimeOffset timestamp) @@ -269,8 +292,8 @@ private void PublishEvent( { ["kind"] = inspection?.Kind.ToString(), ["isError"] = error is not null, - ["byteCount"] = inspection?.ByteCount ?? message.Value.Bytes.Length, - ["contentType"] = inspection?.ContentType ?? message.Value.ContentType + ["byteCount"] = inspection?.ByteCount ?? content.Bytes.Length, + ["contentType"] = inspection?.ContentType ?? content.ContentType } }); diff --git a/src/FluxFlow.Components.Payloads/Options/PayloadInspectOptions.cs b/src/Components/Payloads/FluxFlow.Components.Payloads/Options/PayloadInspectOptions.cs similarity index 100% rename from src/FluxFlow.Components.Payloads/Options/PayloadInspectOptions.cs rename to src/Components/Payloads/FluxFlow.Components.Payloads/Options/PayloadInspectOptions.cs diff --git a/src/FluxFlow.Components.Payloads/PayloadErrorCodeNames.cs b/src/Components/Payloads/FluxFlow.Components.Payloads/PayloadErrorCodeNames.cs similarity index 100% rename from src/FluxFlow.Components.Payloads/PayloadErrorCodeNames.cs rename to src/Components/Payloads/FluxFlow.Components.Payloads/PayloadErrorCodeNames.cs diff --git a/src/FluxFlow.Components.Payloads/PayloadInspectionResultKinds.cs b/src/Components/Payloads/FluxFlow.Components.Payloads/PayloadInspectionResultKinds.cs similarity index 100% rename from src/FluxFlow.Components.Payloads/PayloadInspectionResultKinds.cs rename to src/Components/Payloads/FluxFlow.Components.Payloads/PayloadInspectionResultKinds.cs diff --git a/src/FluxFlow.Components.Payloads/README.md b/src/Components/Payloads/FluxFlow.Components.Payloads/README.md similarity index 100% rename from src/FluxFlow.Components.Payloads/README.md rename to src/Components/Payloads/FluxFlow.Components.Payloads/README.md diff --git a/src/Components/Projections/FluxFlow.Components.Projections.Composition/CompatibilitySuppressions.xml b/src/Components/Projections/FluxFlow.Components.Projections.Composition/CompatibilitySuppressions.xml new file mode 100644 index 00000000..9cc0bd4e --- /dev/null +++ b/src/Components/Projections/FluxFlow.Components.Projections.Composition/CompatibilitySuppressions.xml @@ -0,0 +1,62 @@ + + + + + CP0002 + M:FluxFlow.Components.Projections.Composition.ProjectionsAuthoringExtensions.AddEventProjection(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Projections.Contracts.ProjectionEvent,FluxFlow.Components.Projections.Contracts.EventProjectionSnapshot}@) + lib/net10.0/FluxFlow.Components.Projections.Composition.dll + lib/net10.0/FluxFlow.Components.Projections.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Projections.Composition.ProjectionsAuthoringExtensions.AddEventProjection(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Projections.Composition.EventProjectionComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Projections.Contracts.ProjectionEvent,FluxFlow.Components.Projections.Contracts.EventProjectionSnapshot}@) + lib/net10.0/FluxFlow.Components.Projections.Composition.dll + lib/net10.0/FluxFlow.Components.Projections.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Projections.Composition.ProjectionsAuthoringExtensions.AddEventProjection(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Projections.Composition.EventProjectionComponentBuilder}) + lib/net10.0/FluxFlow.Components.Projections.Composition.dll + lib/net10.0/FluxFlow.Components.Projections.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Projections.Composition.ProjectionsComponents.get_EventProjection + lib/net10.0/FluxFlow.Components.Projections.Composition.dll + lib/net10.0/FluxFlow.Components.Projections.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Projections.Composition.ProjectionsAuthoringExtensions.AddEventProjection(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Projections.Contracts.ProjectionEvent,FluxFlow.Components.Projections.Contracts.EventProjectionSnapshot}@) + lib/net8.0/FluxFlow.Components.Projections.Composition.dll + lib/net8.0/FluxFlow.Components.Projections.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Projections.Composition.ProjectionsAuthoringExtensions.AddEventProjection(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Projections.Composition.EventProjectionComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Projections.Contracts.ProjectionEvent,FluxFlow.Components.Projections.Contracts.EventProjectionSnapshot}@) + lib/net8.0/FluxFlow.Components.Projections.Composition.dll + lib/net8.0/FluxFlow.Components.Projections.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Projections.Composition.ProjectionsAuthoringExtensions.AddEventProjection(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Projections.Composition.EventProjectionComponentBuilder}) + lib/net8.0/FluxFlow.Components.Projections.Composition.dll + lib/net8.0/FluxFlow.Components.Projections.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Projections.Composition.ProjectionsComponents.get_EventProjection + lib/net8.0/FluxFlow.Components.Projections.Composition.dll + lib/net8.0/FluxFlow.Components.Projections.Composition.dll + true + + diff --git a/src/FluxFlow.Components.Projections.Composition/FluxFlow.Components.Projections.Composition.csproj b/src/Components/Projections/FluxFlow.Components.Projections.Composition/FluxFlow.Components.Projections.Composition.csproj similarity index 59% rename from src/FluxFlow.Components.Projections.Composition/FluxFlow.Components.Projections.Composition.csproj rename to src/Components/Projections/FluxFlow.Components.Projections.Composition/FluxFlow.Components.Projections.Composition.csproj index c430f14d..d0103a4a 100644 --- a/src/FluxFlow.Components.Projections.Composition/FluxFlow.Components.Projections.Composition.csproj +++ b/src/Components/Projections/FluxFlow.Components.Projections.Composition/FluxFlow.Components.Projections.Composition.csproj @@ -5,18 +5,18 @@ FluxFlow.Components.Projections.Composition FluxFlow.Components.Projections.Composition FluxFlow.Components.Projections.Composition - 6.0.0-rc.1 + 7.0.0-rc.1 Canonical event-projection result registration and Designer metadata over host-owned clocks. workflow;dataflow;components;events;projections;composition README.md - Requires event.project; registers exact descriptors and Designer metadata through the flat designed-component API; keeps constants under ProjectionsComponentDefinition and removes its metadata-only factory. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. - - - + + + diff --git a/src/FluxFlow.Components.Projections.Composition/ProjectionsAuthoringExtensions.cs b/src/Components/Projections/FluxFlow.Components.Projections.Composition/ProjectionsAuthoringExtensions.cs similarity index 82% rename from src/FluxFlow.Components.Projections.Composition/ProjectionsAuthoringExtensions.cs rename to src/Components/Projections/FluxFlow.Components.Projections.Composition/ProjectionsAuthoringExtensions.cs index d850f9f6..177d2dcd 100644 --- a/src/FluxFlow.Components.Projections.Composition/ProjectionsAuthoringExtensions.cs +++ b/src/Components/Projections/FluxFlow.Components.Projections.Composition/ProjectionsAuthoringExtensions.cs @@ -2,22 +2,24 @@ using FluxFlow.Components.Designer; using FluxFlow.Composition.Authoring; +using FluxFlow.Data; + namespace FluxFlow.Components.Projections.Composition; public static class ProjectionsComponents { - public static ComponentContract> EventProjection { get; } = + public static ComponentContract> EventProjection { get; } = DesignedComponentContract.Create( ProjectionsComponentDefinition.Types.EventProjection, ProjectionsServiceCollectionExtensions.ConfigureProjection, static () => new EventProjectionComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new InputOutputComponentHandle(component, ProjectionsComponentDefinition.Ports.Input, ProjectionsComponentDefinition.Ports.Output, ProjectionsComponentDefinition.Ports.Events)); + static component => new InputOutputComponentHandle(component, ProjectionsComponentDefinition.Ports.Input, ProjectionsComponentDefinition.Ports.Output, ProjectionsComponentDefinition.Ports.Events)); } public static class ProjectionsAuthoringExtensions { - public static InputOutputComponentHandle AddEventProjection( + public static InputOutputComponentHandle AddEventProjection( this WorkflowDefinitionBuilder workflow, string name, Action? configure = null) @@ -29,7 +31,7 @@ public static InputOutputComponentHandle projection) + out InputOutputComponentHandle projection) { projection = workflow.AddEventProjection(name); return workflow; @@ -39,7 +41,7 @@ public static WorkflowDefinitionBuilder AddEventProjection( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle projection) + out InputOutputComponentHandle projection) { ArgumentNullException.ThrowIfNull(configure); projection = workflow.AddEventProjection(name, configure); diff --git a/src/FluxFlow.Components.Projections.Composition/ProjectionsComponentDefinition.cs b/src/Components/Projections/FluxFlow.Components.Projections.Composition/ProjectionsComponentDefinition.cs similarity index 100% rename from src/FluxFlow.Components.Projections.Composition/ProjectionsComponentDefinition.cs rename to src/Components/Projections/FluxFlow.Components.Projections.Composition/ProjectionsComponentDefinition.cs diff --git a/src/FluxFlow.Components.Projections.Composition/ProjectionsServiceCollectionExtensions.cs b/src/Components/Projections/FluxFlow.Components.Projections.Composition/ProjectionsServiceCollectionExtensions.cs similarity index 90% rename from src/FluxFlow.Components.Projections.Composition/ProjectionsServiceCollectionExtensions.cs rename to src/Components/Projections/FluxFlow.Components.Projections.Composition/ProjectionsServiceCollectionExtensions.cs index efd35e7b..558ce8ff 100644 --- a/src/FluxFlow.Components.Projections.Composition/ProjectionsServiceCollectionExtensions.cs +++ b/src/Components/Projections/FluxFlow.Components.Projections.Composition/ProjectionsServiceCollectionExtensions.cs @@ -22,8 +22,8 @@ internal static void ConfigureProjection(ComponentRegistrationBuilder component) component.WithDisplay("Event Projection", "Projections", "Folds matching projection events into count, latest-event, and rolling-rate snapshots.", "activity", "projectEvents", 460); component .UseFactory(CreateEventProjectionNode) - .HasInput(ProjectionsComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Projection event to fold into the running snapshot.", true) - .HasOutput(ProjectionsComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Event projection snapshot.", true) + .HasFlowValueInput(ProjectionsComponentDefinition.Ports.Input, static node => node.Input, new FluxFlow.Components.Projections.Materialization.ProjectionEventMaterializer().InputShape, "Input", "Messages", 0, "Projection event to fold into the running snapshot.", true) + .HasFlowValueOutput(ProjectionsComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Event projection snapshot.", true) .HasEvents(ProjectionsComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort projection diagnostics."); component.AddOption(ProjectionsComponentDefinition.Options.Name, OptionValueKind.Text, "Name", "Optional snapshot name included in emitted projection snapshots.", section: "Diagnostics", importance: OptionDesignMetadataAttributeValues.Advanced, editor: OptionDesignMetadataAttributeValues.Text); component.AddOption(ProjectionsComponentDefinition.Options.Filter, OptionValueKind.Json, "Filter", "Event filter object for matching projection events.", defaultValue: defaults.Filter, section: "Filtering", importance: OptionDesignMetadataAttributeValues.Primary, editor: OptionDesignMetadataAttributeValues.Json); diff --git a/src/FluxFlow.Components.Projections.Composition/README.md b/src/Components/Projections/FluxFlow.Components.Projections.Composition/README.md similarity index 100% rename from src/FluxFlow.Components.Projections.Composition/README.md rename to src/Components/Projections/FluxFlow.Components.Projections.Composition/README.md diff --git a/src/Components/Projections/FluxFlow.Components.Projections/CompatibilitySuppressions.xml b/src/Components/Projections/FluxFlow.Components.Projections/CompatibilitySuppressions.xml new file mode 100644 index 00000000..066edb01 --- /dev/null +++ b/src/Components/Projections/FluxFlow.Components.Projections/CompatibilitySuppressions.xml @@ -0,0 +1,20 @@ + + + + + CP0007 + T:FluxFlow.Components.Projections.Nodes.EventProjectionNode + lib/net10.0/FluxFlow.Components.Projections.dll + lib/net10.0/FluxFlow.Components.Projections.dll + true + + + CP0007 + T:FluxFlow.Components.Projections.Nodes.EventProjectionNode + lib/net8.0/FluxFlow.Components.Projections.dll + lib/net8.0/FluxFlow.Components.Projections.dll + true + + diff --git a/src/FluxFlow.Components.Projections/Contracts/EventFilter.cs b/src/Components/Projections/FluxFlow.Components.Projections/Contracts/EventFilter.cs similarity index 100% rename from src/FluxFlow.Components.Projections/Contracts/EventFilter.cs rename to src/Components/Projections/FluxFlow.Components.Projections/Contracts/EventFilter.cs diff --git a/src/FluxFlow.Components.Projections/Contracts/EventFilterMatcher.cs b/src/Components/Projections/FluxFlow.Components.Projections/Contracts/EventFilterMatcher.cs similarity index 100% rename from src/FluxFlow.Components.Projections/Contracts/EventFilterMatcher.cs rename to src/Components/Projections/FluxFlow.Components.Projections/Contracts/EventFilterMatcher.cs diff --git a/src/FluxFlow.Components.Projections/Contracts/EventProjectionSnapshot.cs b/src/Components/Projections/FluxFlow.Components.Projections/Contracts/EventProjectionSnapshot.cs similarity index 100% rename from src/FluxFlow.Components.Projections/Contracts/EventProjectionSnapshot.cs rename to src/Components/Projections/FluxFlow.Components.Projections/Contracts/EventProjectionSnapshot.cs diff --git a/src/FluxFlow.Components.Projections/Contracts/EventSummary.cs b/src/Components/Projections/FluxFlow.Components.Projections/Contracts/EventSummary.cs similarity index 100% rename from src/FluxFlow.Components.Projections/Contracts/EventSummary.cs rename to src/Components/Projections/FluxFlow.Components.Projections/Contracts/EventSummary.cs diff --git a/src/FluxFlow.Components.Projections/Contracts/ProjectionContractNormalization.cs b/src/Components/Projections/FluxFlow.Components.Projections/Contracts/ProjectionContractNormalization.cs similarity index 100% rename from src/FluxFlow.Components.Projections/Contracts/ProjectionContractNormalization.cs rename to src/Components/Projections/FluxFlow.Components.Projections/Contracts/ProjectionContractNormalization.cs diff --git a/src/FluxFlow.Components.Projections/Contracts/ProjectionEvent.cs b/src/Components/Projections/FluxFlow.Components.Projections/Contracts/ProjectionEvent.cs similarity index 100% rename from src/FluxFlow.Components.Projections/Contracts/ProjectionEvent.cs rename to src/Components/Projections/FluxFlow.Components.Projections/Contracts/ProjectionEvent.cs diff --git a/src/FluxFlow.Components.Projections/Diagnostics/ProjectionDiagnosticNames.cs b/src/Components/Projections/FluxFlow.Components.Projections/Diagnostics/ProjectionDiagnosticNames.cs similarity index 100% rename from src/FluxFlow.Components.Projections/Diagnostics/ProjectionDiagnosticNames.cs rename to src/Components/Projections/FluxFlow.Components.Projections/Diagnostics/ProjectionDiagnosticNames.cs diff --git a/src/FluxFlow.Components.Projections/FluxFlow.Components.Projections.csproj b/src/Components/Projections/FluxFlow.Components.Projections/FluxFlow.Components.Projections.csproj similarity index 65% rename from src/FluxFlow.Components.Projections/FluxFlow.Components.Projections.csproj rename to src/Components/Projections/FluxFlow.Components.Projections/FluxFlow.Components.Projections.csproj index 8570b47e..8d309282 100644 --- a/src/FluxFlow.Components.Projections/FluxFlow.Components.Projections.csproj +++ b/src/Components/Projections/FluxFlow.Components.Projections/FluxFlow.Components.Projections.csproj @@ -4,14 +4,14 @@ FluxFlow.Components.Projections FluxFlow.Components.Projections FluxFlow.Components.Projections - 7.0.0 + 8.0.0-rc.1 Standalone event projection nodes with canonical normal-result snapshots. workflow;dataflow;components;events;projections;monitoring - Makes projection event, filter, summary, and snapshot attribute maps immutable ordinal snapshots while preserving filtering, rolling rates, lineage, diagnostics, JSON compatibility, and normal value-or-error output. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md - + diff --git a/src/Components/Projections/FluxFlow.Components.Projections/Materialization/ProjectionEventMaterializer.cs b/src/Components/Projections/FluxFlow.Components.Projections/Materialization/ProjectionEventMaterializer.cs new file mode 100644 index 00000000..e9e7a92f --- /dev/null +++ b/src/Components/Projections/FluxFlow.Components.Projections/Materialization/ProjectionEventMaterializer.cs @@ -0,0 +1,14 @@ +using FluxFlow.Components.Projections.Contracts; +using FluxFlow.Data; + +namespace FluxFlow.Components.Projections.Materialization; + +public sealed class ProjectionEventMaterializer() + : JsonFlowValueMaterializer( + "projection.event.invalid_shape", + "Projections", + FlowValueShape.Object( + "A projection event object with timestamp, type, source, and optional event details.", + "timestamp", + "type", + "source")); diff --git a/src/FluxFlow.Components.Projections/Nodes/EventProjectionNode.cs b/src/Components/Projections/FluxFlow.Components.Projections/Nodes/EventProjectionNode.cs similarity index 83% rename from src/FluxFlow.Components.Projections/Nodes/EventProjectionNode.cs rename to src/Components/Projections/FluxFlow.Components.Projections/Nodes/EventProjectionNode.cs index b615ac2a..0d26414d 100644 --- a/src/FluxFlow.Components.Projections/Nodes/EventProjectionNode.cs +++ b/src/Components/Projections/FluxFlow.Components.Projections/Nodes/EventProjectionNode.cs @@ -13,12 +13,13 @@ namespace FluxFlow.Components.Projections.Nodes; /// Folds ordered projection events into snapshots and emits successes and /// expected failures through one normal result output. /// -public sealed class EventProjectionNode : FlowNode +public sealed class EventProjectionNode : FlowNode { private readonly EventProjectionOptions _options; private readonly EventFilter _filter; private readonly TimeProvider _clock; private readonly TimeSpan _rateWindow; + private readonly IFlowValueMaterializer _materializer; private readonly Queue _rateSamples = new(); private long _observedCount; private long _matchedCount; @@ -34,6 +35,7 @@ public EventProjectionNode( _options = ResolveOptions(options); _filter = _options.Filter; _clock = clock ?? TimeProvider.System; + _materializer = new Materialization.ProjectionEventMaterializer(); _rateWindow = TimeSpan.FromSeconds(_options.RateWindowSeconds); } @@ -45,17 +47,38 @@ public async Task CompleteWithFinalSnapshotAsync() protected override bool HandlesErrors => true; - protected override async Task ProcessAsync(FlowMessage message) + protected override async Task ProcessAsync(FlowMessage inputMessage) { - ArgumentNullException.ThrowIfNull(message); - if (message.IsError) + ArgumentNullException.ThrowIfNull(inputMessage); + if (inputMessage.IsError) { - await EmitAsync( - message.WithError(message.Error!), - Stopping).ConfigureAwait(false); + await EmitAsync(inputMessage, Stopping).ConfigureAwait(false); return; } + var materialized = _materializer.Materialize(inputMessage.Value); + if (!materialized.IsSuccess) + { + var error = materialized.Error!; + EmitEvent(new FlowEvent + { + Timestamp = _clock.GetUtcNow(), + CorrelationId = inputMessage.CorrelationId, + Name = "event.projection.rejected", + Level = FlowEventLevel.Warning, + Message = error.Message, + Attributes = new Dictionary(StringComparer.Ordinal) + { + ["errorCode"] = error.Code + } + }); + await EmitAsync(inputMessage.WithError(error), Stopping) + .ConfigureAwait(false); + return; + } + + var message = inputMessage.ConvertValue(materialized.Value); + var timestamp = _clock.GetUtcNow(); _observedCount++; @@ -76,7 +99,7 @@ await EmitAsync( var snapshot = CreateSnapshot(timestamp, projectionEvent.Timestamp); if (_options.EmitEveryMatch) { - await EmitAsync(message.With(snapshot), Stopping).ConfigureAwait(false); + await EmitResultAsync(message.With(snapshot)).ConfigureAwait(false); } PublishEvent( @@ -106,9 +129,8 @@ private async Task PublishFailureAsync( category: "Projections", isTransient: false, details: CreateErrorDetails(message.Value, exception)); - await EmitAsync( - message.WithError(error), - Stopping).ConfigureAwait(false); + await EmitResultAsync(message.WithError(error)) + .ConfigureAwait(false); PublishEvent( message.CorrelationId, timestamp, @@ -130,7 +152,7 @@ private async ValueTask PublishFinalSnapshotAsync() var output = _lastMatchedMessage is null ? FlowMessage.Create(snapshot) : _lastMatchedMessage.With(snapshot); - await EmitAsync(output, Stopping).ConfigureAwait(false); + await EmitResultAsync(output).ConfigureAwait(false); PublishEvent( output.CorrelationId, timestamp, @@ -248,6 +270,13 @@ private static JsonElement CreateErrorDetails( protected override ValueTask OnInputCompletedAsync() => PublishFinalSnapshotAsync(); + private async Task EmitResultAsync(FlowMessage message) + => await EmitAsync( + message.IsError + ? message.ConvertError() + : message.ConvertValue(FlowValue.From(message.Value)), + Stopping).ConfigureAwait(false); + private static EventProjectionOptions ResolveOptions(EventProjectionOptions? options) { var resolved = options ?? new EventProjectionOptions(); diff --git a/src/FluxFlow.Components.Projections/Options/EventProjectionOptions.cs b/src/Components/Projections/FluxFlow.Components.Projections/Options/EventProjectionOptions.cs similarity index 100% rename from src/FluxFlow.Components.Projections/Options/EventProjectionOptions.cs rename to src/Components/Projections/FluxFlow.Components.Projections/Options/EventProjectionOptions.cs diff --git a/src/FluxFlow.Components.Projections/ProjectionErrorCodeNames.cs b/src/Components/Projections/FluxFlow.Components.Projections/ProjectionErrorCodeNames.cs similarity index 100% rename from src/FluxFlow.Components.Projections/ProjectionErrorCodeNames.cs rename to src/Components/Projections/FluxFlow.Components.Projections/ProjectionErrorCodeNames.cs diff --git a/src/FluxFlow.Components.Projections/ProjectionResultKinds.cs b/src/Components/Projections/FluxFlow.Components.Projections/ProjectionResultKinds.cs similarity index 100% rename from src/FluxFlow.Components.Projections/ProjectionResultKinds.cs rename to src/Components/Projections/FluxFlow.Components.Projections/ProjectionResultKinds.cs diff --git a/src/FluxFlow.Components.Projections/ProjectionsErrorCodes.cs b/src/Components/Projections/FluxFlow.Components.Projections/ProjectionsErrorCodes.cs similarity index 100% rename from src/FluxFlow.Components.Projections/ProjectionsErrorCodes.cs rename to src/Components/Projections/FluxFlow.Components.Projections/ProjectionsErrorCodes.cs diff --git a/src/FluxFlow.Components.Projections/README.md b/src/Components/Projections/FluxFlow.Components.Projections/README.md similarity index 100% rename from src/FluxFlow.Components.Projections/README.md rename to src/Components/Projections/FluxFlow.Components.Projections/README.md diff --git a/src/Components/RequestReply/FluxFlow.Components.RequestReply/CompatibilitySuppressions.xml b/src/Components/RequestReply/FluxFlow.Components.RequestReply/CompatibilitySuppressions.xml new file mode 100644 index 00000000..ae379ec7 --- /dev/null +++ b/src/Components/RequestReply/FluxFlow.Components.RequestReply/CompatibilitySuppressions.xml @@ -0,0 +1,20 @@ + + + + + CP0002 + M:FluxFlow.Components.RequestReply.RequestReplyCoordinator`2.get_Events + lib/net10.0/FluxFlow.Components.RequestReply.dll + lib/net10.0/FluxFlow.Components.RequestReply.dll + true + + + CP0002 + M:FluxFlow.Components.RequestReply.RequestReplyCoordinator`2.get_Events + lib/net8.0/FluxFlow.Components.RequestReply.dll + lib/net8.0/FluxFlow.Components.RequestReply.dll + true + + diff --git a/src/FluxFlow.Components.RequestReply/CorrelatedRequestTracker.cs b/src/Components/RequestReply/FluxFlow.Components.RequestReply/CorrelatedRequestTracker.cs similarity index 100% rename from src/FluxFlow.Components.RequestReply/CorrelatedRequestTracker.cs rename to src/Components/RequestReply/FluxFlow.Components.RequestReply/CorrelatedRequestTracker.cs diff --git a/src/FluxFlow.Components.RequestReply/CorrelatedRequestTrackerOptions.cs b/src/Components/RequestReply/FluxFlow.Components.RequestReply/CorrelatedRequestTrackerOptions.cs similarity index 100% rename from src/FluxFlow.Components.RequestReply/CorrelatedRequestTrackerOptions.cs rename to src/Components/RequestReply/FluxFlow.Components.RequestReply/CorrelatedRequestTrackerOptions.cs diff --git a/src/FluxFlow.Components.RequestReply/FluxFlow.Components.RequestReply.csproj b/src/Components/RequestReply/FluxFlow.Components.RequestReply/FluxFlow.Components.RequestReply.csproj similarity index 64% rename from src/FluxFlow.Components.RequestReply/FluxFlow.Components.RequestReply.csproj rename to src/Components/RequestReply/FluxFlow.Components.RequestReply/FluxFlow.Components.RequestReply.csproj index 1c00ca7e..fb7dfeab 100644 --- a/src/FluxFlow.Components.RequestReply/FluxFlow.Components.RequestReply.csproj +++ b/src/Components/RequestReply/FluxFlow.Components.RequestReply/FluxFlow.Components.RequestReply.csproj @@ -5,17 +5,17 @@ FluxFlow.Components.RequestReply FluxFlow.Components.RequestReply FluxFlow.Components.RequestReply - 2.0.0 + 3.0.0-rc.1 A transport-agnostic request/reply bridge for FluxFlow with compatibility correlation tracking over the shared coordination foundation. workflow;dataflow;components;request-reply;trigger README.md - Migrates request/reply coordination to typed FlowMessage<T> outcomes while preserving correlation, timeout, capacity, and completion semantics. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. true - - + + diff --git a/src/FluxFlow.Components.RequestReply/IRequestContext.cs b/src/Components/RequestReply/FluxFlow.Components.RequestReply/IRequestContext.cs similarity index 100% rename from src/FluxFlow.Components.RequestReply/IRequestContext.cs rename to src/Components/RequestReply/FluxFlow.Components.RequestReply/IRequestContext.cs diff --git a/src/FluxFlow.Components.RequestReply/README.md b/src/Components/RequestReply/FluxFlow.Components.RequestReply/README.md similarity index 100% rename from src/FluxFlow.Components.RequestReply/README.md rename to src/Components/RequestReply/FluxFlow.Components.RequestReply/README.md diff --git a/src/FluxFlow.Components.RequestReply/RequestReplyCoordinator.cs b/src/Components/RequestReply/FluxFlow.Components.RequestReply/RequestReplyCoordinator.cs similarity index 98% rename from src/FluxFlow.Components.RequestReply/RequestReplyCoordinator.cs rename to src/Components/RequestReply/FluxFlow.Components.RequestReply/RequestReplyCoordinator.cs index 39058d21..427a4a8e 100644 --- a/src/FluxFlow.Components.RequestReply/RequestReplyCoordinator.cs +++ b/src/Components/RequestReply/FluxFlow.Components.RequestReply/RequestReplyCoordinator.cs @@ -22,7 +22,7 @@ public sealed class RequestReplyCoordinator : IFlowNode private readonly ActionBlock> _incoming; private readonly ActionBlock> _responses; private readonly FlowOutput> _output; - private readonly BroadcastBlock _events; + private readonly BroadcastBlock _events; private readonly CorrelatedRequestTracker, TResponse>? _tracker; private readonly CancellationTokenSource _stopping = new(); private int _disposed; @@ -48,7 +48,7 @@ public RequestReplyCoordinator(RequestReplyOptions? options = null, TimeProvider _output = new FlowOutput>( new FlowOutputOptions { Capacity = _options.Capacity }); - _events = new BroadcastBlock(static value => value); + _events = new BroadcastBlock(static value => value); _incoming = new ActionBlock>( OnIncomingAsync, @@ -85,7 +85,7 @@ public RequestReplyCoordinator(RequestReplyOptions? options = null, TimeProvider /// Correlated responses from the graph — link the graph's output here. public ITargetBlock> Responses => _responses; - public ISourceBlock Events => _events; + public ISourceBlock Events => _events; /// In-flight request count (requests awaiting a response). public int InFlightCount => _tracker?.PendingCount ?? 0; diff --git a/src/FluxFlow.Components.RequestReply/RequestReplyOptions.cs b/src/Components/RequestReply/FluxFlow.Components.RequestReply/RequestReplyOptions.cs similarity index 100% rename from src/FluxFlow.Components.RequestReply/RequestReplyOptions.cs rename to src/Components/RequestReply/FluxFlow.Components.RequestReply/RequestReplyOptions.cs diff --git a/src/Components/Resilience/FluxFlow.Components.Resilience.Composition/CompatibilitySuppressions.xml b/src/Components/Resilience/FluxFlow.Components.Resilience.Composition/CompatibilitySuppressions.xml new file mode 100644 index 00000000..decd4b93 --- /dev/null +++ b/src/Components/Resilience/FluxFlow.Components.Resilience.Composition/CompatibilitySuppressions.xml @@ -0,0 +1,48 @@ + + + + + CP0002 + M:FluxFlow.Components.Resilience.Composition.FlowRetryComponentHandle.get_Events + lib/net10.0/FluxFlow.Components.Resilience.Composition.dll + lib/net10.0/FluxFlow.Components.Resilience.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Resilience.Composition.FlowRetryComponentHandle.get_Input + lib/net10.0/FluxFlow.Components.Resilience.Composition.dll + lib/net10.0/FluxFlow.Components.Resilience.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Resilience.Composition.FlowRetryComponentHandle.get_Output + lib/net10.0/FluxFlow.Components.Resilience.Composition.dll + lib/net10.0/FluxFlow.Components.Resilience.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Resilience.Composition.FlowRetryComponentHandle.get_Events + lib/net8.0/FluxFlow.Components.Resilience.Composition.dll + lib/net8.0/FluxFlow.Components.Resilience.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Resilience.Composition.FlowRetryComponentHandle.get_Input + lib/net8.0/FluxFlow.Components.Resilience.Composition.dll + lib/net8.0/FluxFlow.Components.Resilience.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Resilience.Composition.FlowRetryComponentHandle.get_Output + lib/net8.0/FluxFlow.Components.Resilience.Composition.dll + lib/net8.0/FluxFlow.Components.Resilience.Composition.dll + true + + diff --git a/src/FluxFlow.Components.Resilience.Composition/FluxFlow.Components.Resilience.Composition.csproj b/src/Components/Resilience/FluxFlow.Components.Resilience.Composition/FluxFlow.Components.Resilience.Composition.csproj similarity index 58% rename from src/FluxFlow.Components.Resilience.Composition/FluxFlow.Components.Resilience.Composition.csproj rename to src/Components/Resilience/FluxFlow.Components.Resilience.Composition/FluxFlow.Components.Resilience.Composition.csproj index f7dc389d..ee0d2bc8 100644 --- a/src/FluxFlow.Components.Resilience.Composition/FluxFlow.Components.Resilience.Composition.csproj +++ b/src/Components/Resilience/FluxFlow.Components.Resilience.Composition/FluxFlow.Components.Resilience.Composition.csproj @@ -4,17 +4,17 @@ FluxFlow.Components.Resilience.Composition FluxFlow.Components.Resilience.Composition FluxFlow.Components.Resilience.Composition - 5.0.0-rc.1 + 6.0.0-rc.1 Composition registration and Designer metadata for the flow retry component. workflow;dataflow;components;resilience;retry;composition README.md - Requires retry.policy; registers exact descriptors and Designer metadata through the flat designed-component API; keeps constants under ResilienceComponentDefinition and removes its metadata-only factory. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. - + - - + + diff --git a/src/FluxFlow.Components.Resilience.Composition/README.md b/src/Components/Resilience/FluxFlow.Components.Resilience.Composition/README.md similarity index 100% rename from src/FluxFlow.Components.Resilience.Composition/README.md rename to src/Components/Resilience/FluxFlow.Components.Resilience.Composition/README.md diff --git a/src/FluxFlow.Components.Resilience.Composition/ResilienceAuthoringExtensions.cs b/src/Components/Resilience/FluxFlow.Components.Resilience.Composition/ResilienceAuthoringExtensions.cs similarity index 89% rename from src/FluxFlow.Components.Resilience.Composition/ResilienceAuthoringExtensions.cs rename to src/Components/Resilience/FluxFlow.Components.Resilience.Composition/ResilienceAuthoringExtensions.cs index 888e6004..1c74788a 100644 --- a/src/FluxFlow.Components.Resilience.Composition/ResilienceAuthoringExtensions.cs +++ b/src/Components/Resilience/FluxFlow.Components.Resilience.Composition/ResilienceAuthoringExtensions.cs @@ -5,6 +5,8 @@ using FluxFlow.Composition.Authoring; using FluxFlow.Resilience; +using FluxFlow.Data; + namespace FluxFlow.Components.Resilience.Composition; public static class ResilienceComponents @@ -82,18 +84,18 @@ public sealed class FlowRetryComponentHandle : AuthoredComponentHandle { internal FlowRetryComponentHandle(ComponentHandle definition) : base(definition) { - Input = definition.Input(ResilienceComponentDefinition.Ports.Input); + Input = definition.Input(ResilienceComponentDefinition.Ports.Input); Ack = definition.SignalInput(ResilienceComponentDefinition.Ports.Ack); Nak = definition.SignalInput(ResilienceComponentDefinition.Ports.Nak); Cancel = definition.SignalInput(ResilienceComponentDefinition.Ports.Cancel); - Output = definition.Output>(ResilienceComponentDefinition.Ports.Output); - Events = definition.Output(ResilienceComponentDefinition.Ports.Events); + Output = definition.Output(ResilienceComponentDefinition.Ports.Output); + Events = definition.Output(ResilienceComponentDefinition.Ports.Events); } - public InputPortHandle Input { get; } + public InputPortHandle Input { get; } public SignalInputPortHandle Ack { get; } public SignalInputPortHandle Nak { get; } public SignalInputPortHandle Cancel { get; } - public OutputPortHandle> Output { get; } - public OutputPortHandle Events { get; } + public OutputPortHandle Output { get; } + public OutputPortHandle Events { get; } } diff --git a/src/FluxFlow.Components.Resilience.Composition/ResilienceComponentDefinition.cs b/src/Components/Resilience/FluxFlow.Components.Resilience.Composition/ResilienceComponentDefinition.cs similarity index 100% rename from src/FluxFlow.Components.Resilience.Composition/ResilienceComponentDefinition.cs rename to src/Components/Resilience/FluxFlow.Components.Resilience.Composition/ResilienceComponentDefinition.cs diff --git a/src/FluxFlow.Components.Resilience.Composition/ResilienceServiceCollectionExtensions.cs b/src/Components/Resilience/FluxFlow.Components.Resilience.Composition/ResilienceServiceCollectionExtensions.cs similarity index 90% rename from src/FluxFlow.Components.Resilience.Composition/ResilienceServiceCollectionExtensions.cs rename to src/Components/Resilience/FluxFlow.Components.Resilience.Composition/ResilienceServiceCollectionExtensions.cs index 4ef5b717..f85f04fe 100644 --- a/src/FluxFlow.Components.Resilience.Composition/ResilienceServiceCollectionExtensions.cs +++ b/src/Components/Resilience/FluxFlow.Components.Resilience.Composition/ResilienceServiceCollectionExtensions.cs @@ -1,10 +1,13 @@ using System.Text.Json; +using System.Threading.Tasks.Dataflow; using FluxFlow.Components.Designer; using FluxFlow.Components.Designer.Contracts; using FluxFlow.Components.Resilience.Contracts; using FluxFlow.Components.Resilience.Nodes; using FluxFlow.Components.Resilience.Options; using FluxFlow.Composition; +using FluxFlow.Data; +using FluxFlow.Nodes; using FluxFlow.Resilience; namespace FluxFlow.Components.Resilience.Composition; @@ -23,11 +26,11 @@ internal static void ConfigureRetry(ComponentRegistrationBuilder component) component.WithDisplay("Flow Retry", "Resilience", "Coordinates acknowledged workflow attempts with retry, timeout, cancellation, and exhaustion results.", "refresh-cw", "retry", 460); component .UseFactory(CreateFlowRetryNode) - .HasInput(ResilienceComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Value that begins a retry-controlled logical operation.", true) + .HasFlowValueInput(ResilienceComponentDefinition.Ports.Input, static node => node.Input, FlowValueShape.Any("Any workflow value that begins a retry-controlled logical operation."), "Input", "Messages", 0, "Value that begins a retry-controlled logical operation.", true) .HasSignalInput(ResilienceComponentDefinition.Ports.Ack, static node => node.Ack, "Ack", "Signals", 1, "Completes the matching attempt successfully.") .HasSignalInput(ResilienceComponentDefinition.Ports.Nak, static node => node.Nak, "Nak", "Signals", 2, "Fails the matching attempt and applies retry policy.") .HasSignalInput(ResilienceComponentDefinition.Ports.Cancel, static node => node.Cancel, "Cancel", "Signals", 3, "Cancels the matching logical operation.") - .HasOutput(ResilienceComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 4, "Attempt, scheduled retry, completion, exhaustion, cancellation, or rejection result.", true) + .HasFlowValueOutput(ResilienceComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 4, "Attempt, scheduled retry, completion, exhaustion, cancellation, or rejection result.", true) .HasEvents(ResilienceComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 5, "Best-effort retry diagnostics."); component.AddOption(ResilienceComponentDefinition.Options.Name, OptionValueKind.Text, "Name", "Optional diagnostic name; composition defaults to the component address.", section: "Diagnostics", importance: OptionDesignMetadataAttributeValues.Advanced, editor: OptionDesignMetadataAttributeValues.Text); component.AddOption(ResilienceComponentDefinition.Options.Strategy, OptionValueKind.Enum, "Strategy", "Delay strategy applied after NAK or timeout.", defaultValue: defaults.Strategy.ToString(), section: "Retry", importance: OptionDesignMetadataAttributeValues.Primary); @@ -48,7 +51,7 @@ internal static void ConfigureRetry(ComponentRegistrationBuilder component) private static void AddNumber(ComponentRegistrationBuilder component, string name, string displayName, string helperText, object? defaultValue, string section, string importance, double min) => component.AddOption(name, OptionValueKind.Number, displayName, helperText, defaultValue: defaultValue, min: min, section: section, importance: importance, editor: OptionDesignMetadataAttributeValues.Number); - private static FlowRetryNode CreateFlowRetryNode( + private static FlowValueRetryNode CreateFlowRetryNode( ComponentActivationContext context) { var options = context.BindConfiguration(); @@ -60,7 +63,7 @@ private static FlowRetryNode CreateFlowRetryNode( }; } - return new FlowRetryNode( + return new FlowValueRetryNode( options, context.GetResource(ResilienceComponentDefinition.Resources.Clock), context.GetResource(ResilienceComponentDefinition.Resources.Jitter)); diff --git a/src/Components/Resilience/FluxFlow.Components.Resilience/CompatibilitySuppressions.xml b/src/Components/Resilience/FluxFlow.Components.Resilience/CompatibilitySuppressions.xml new file mode 100644 index 00000000..e8b42107 --- /dev/null +++ b/src/Components/Resilience/FluxFlow.Components.Resilience/CompatibilitySuppressions.xml @@ -0,0 +1,20 @@ + + + + + CP0002 + M:FluxFlow.Components.Resilience.Nodes.FlowRetryNode`1.get_Events + lib/net10.0/FluxFlow.Components.Resilience.dll + lib/net10.0/FluxFlow.Components.Resilience.dll + true + + + CP0002 + M:FluxFlow.Components.Resilience.Nodes.FlowRetryNode`1.get_Events + lib/net8.0/FluxFlow.Components.Resilience.dll + lib/net8.0/FluxFlow.Components.Resilience.dll + true + + diff --git a/src/FluxFlow.Components.Resilience/Contracts/RetrySignal.cs b/src/Components/Resilience/FluxFlow.Components.Resilience/Contracts/RetrySignal.cs similarity index 100% rename from src/FluxFlow.Components.Resilience/Contracts/RetrySignal.cs rename to src/Components/Resilience/FluxFlow.Components.Resilience/Contracts/RetrySignal.cs diff --git a/src/FluxFlow.Components.Resilience/Diagnostics/RetryDiagnosticNames.cs b/src/Components/Resilience/FluxFlow.Components.Resilience/Diagnostics/RetryDiagnosticNames.cs similarity index 100% rename from src/FluxFlow.Components.Resilience/Diagnostics/RetryDiagnosticNames.cs rename to src/Components/Resilience/FluxFlow.Components.Resilience/Diagnostics/RetryDiagnosticNames.cs diff --git a/src/FluxFlow.Components.Resilience/FluxFlow.Components.Resilience.csproj b/src/Components/Resilience/FluxFlow.Components.Resilience/FluxFlow.Components.Resilience.csproj similarity index 54% rename from src/FluxFlow.Components.Resilience/FluxFlow.Components.Resilience.csproj rename to src/Components/Resilience/FluxFlow.Components.Resilience/FluxFlow.Components.Resilience.csproj index 320ea614..821e36af 100644 --- a/src/FluxFlow.Components.Resilience/FluxFlow.Components.Resilience.csproj +++ b/src/Components/Resilience/FluxFlow.Components.Resilience/FluxFlow.Components.Resilience.csproj @@ -4,16 +4,16 @@ FluxFlow.Components.Resilience FluxFlow.Components.Resilience FluxFlow.Components.Resilience - 2.0.0 + 3.0.0-rc.1 Workflow retry coordination with normal result output and explicit acknowledgement signals. workflow;dataflow;components;resilience;retry README.md - Migrates retry data paths to typed FlowMessage<T> value-or-error contracts while preserving retry and signal semantics. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. - - - + + + diff --git a/src/Components/Resilience/FluxFlow.Components.Resilience/Nodes/FlowRetryNode.cs b/src/Components/Resilience/FluxFlow.Components.Resilience/Nodes/FlowRetryNode.cs new file mode 100644 index 00000000..1ade4b40 --- /dev/null +++ b/src/Components/Resilience/FluxFlow.Components.Resilience/Nodes/FlowRetryNode.cs @@ -0,0 +1,127 @@ +using System.Text.Json; +using System.Threading.Tasks.Dataflow; +using FluxFlow.Components.Resilience.Contracts; +using FluxFlow.Components.Resilience.Options; +using FluxFlow.Nodes; +using FluxFlow.Resilience; + +namespace FluxFlow.Components.Resilience.Nodes; + +public sealed class FlowRetryNode : FlowRetryNode +{ + public FlowRetryNode(FlowRetryOptions? options = null, TimeProvider? clock = null, + IRetryJitterSource? jitterSource = null) : base(options, clock, jitterSource) { } +} + +/// Retries exact typed values through the shared retry operation coordinator. +public class FlowRetryNode : IFlowNode +{ + private readonly RetryOperationCoordinator> _coordinator; + private readonly TransformBlock, RetryInput>> _input; + private readonly FlowOutput>> _output; + private readonly IDisposable _inputLink; + private readonly Task _completion; + private int _outputShutdownStarted; + private int _disposed; + + public FlowRetryNode(FlowRetryOptions? options = null, TimeProvider? clock = null, + IRetryJitterSource? jitterSource = null) + { + var settings = FlowRetryOptionValidation.Validate(options); + _output = new FlowOutput>>( + new FlowOutputOptions { Capacity = settings.Capacity }); + _coordinator = new RetryOperationCoordinator>( + settings, EmitAsync, clock, jitterSource); + _input = new TransformBlock, RetryInput>>( + static message => new RetryInput>( + message, message.IsError ? default! : message.Value, message.Error, + message.CorrelationId, message.TraceId, message.MessageId, + message.Timestamp, message.Headers), + InputOptions(settings.Capacity)); + _inputLink = _input.LinkTo(_coordinator.Input, + new DataflowLinkOptions { PropagateCompletion = true }); + _completion = CompleteOutputAsync(); + Ack = Target(RetryFeedbackKind.Ack); + Nak = Target(RetryFeedbackKind.Nak); + Cancel = Target(RetryFeedbackKind.Cancel); + _ = ObserveOutputTerminationAsync(); + } + + public ITargetBlock> Input => _input; + public IFlowSignalTarget Ack { get; } + public IFlowSignalTarget Nak { get; } + public IFlowSignalTarget Cancel { get; } + public ISourceBlock>> Output => _output; + public ISourceBlock Events => _coordinator.Events; + public Task Completion => _completion; + public void Complete() => _input.Complete(); + + public void Fault(Exception exception) + { + ArgumentNullException.ThrowIfNull(exception); + ((IDataflowBlock)_input).Fault(exception); + } + + public async ValueTask DisposeAsync() + { + if (Interlocked.Exchange(ref _disposed, 1) != 0) return; + Complete(); + try { await Completion.ConfigureAwait(false); } + catch { } + finally + { + _inputLink.Dispose(); + await _coordinator.DisposeAsync().ConfigureAwait(false); + await _output.DisposeAsync().ConfigureAwait(false); + } + } + + private RetrySignalTarget Target(RetryFeedbackKind kind) + => new(_coordinator.HandleFeedbackAsync, _completion, kind); + + private async ValueTask EmitAsync( + RetryEmission> emission, + CancellationToken cancellationToken) + { + var output = emission.Error is null + ? emission.Input.Context.With(emission.Signal!, emission.Headers, emission.CausationId) + : emission.Input.Context.WithError>( + emission.Error, emission.Headers, emission.CausationId); + if (!await _output.SendAsync(output, cancellationToken).ConfigureAwait(false)) + { + await _output.Completion.ConfigureAwait(false); + throw new InvalidOperationException("Retry output declined an accepted result."); + } + return output.MessageId; + } + + private async Task CompleteOutputAsync() + { + try + { + await _coordinator.Completion.ConfigureAwait(false); + Interlocked.Exchange(ref _outputShutdownStarted, 1); + _output.Complete(); + await _output.Completion.ConfigureAwait(false); + } + catch (Exception exception) { _output.Fault(exception); throw; } + } + + private async Task ObserveOutputTerminationAsync() + { + try + { + await _output.Completion.ConfigureAwait(false); + if (Volatile.Read(ref _outputShutdownStarted) == 0 && !_coordinator.Completion.IsCompleted) + _coordinator.Fault(new InvalidOperationException( + "Retry output completed before input processing stopped.")); + } + catch (Exception exception) + { + if (!_completion.IsCompleted) _coordinator.Fault(exception); + } + } + + private static ExecutionDataflowBlockOptions InputOptions(int capacity) + => new() { BoundedCapacity = capacity, EnsureOrdered = true, MaxDegreeOfParallelism = 1 }; +} diff --git a/src/Components/Resilience/FluxFlow.Components.Resilience/Nodes/FlowValueRetryNode.cs b/src/Components/Resilience/FluxFlow.Components.Resilience/Nodes/FlowValueRetryNode.cs new file mode 100644 index 00000000..56596160 --- /dev/null +++ b/src/Components/Resilience/FluxFlow.Components.Resilience/Nodes/FlowValueRetryNode.cs @@ -0,0 +1,120 @@ +using System.Threading.Tasks.Dataflow; +using FluxFlow.Components.Resilience.Contracts; +using FluxFlow.Components.Resilience.Options; +using FluxFlow.Data; +using FluxFlow.Nodes; +using FluxFlow.Resilience; + +namespace FluxFlow.Components.Resilience.Nodes; + +internal sealed class FlowValueRetryNode : IFlowNode +{ + private readonly RetryOperationCoordinator _coordinator; + private readonly TransformBlock> _input; + private readonly FlowOutput _output; + private readonly IDisposable _inputLink; + private readonly Task _completion; + private int _outputShutdownStarted; + private int _disposed; + + public FlowValueRetryNode(FlowRetryOptions? options = null, TimeProvider? clock = null, + IRetryJitterSource? jitterSource = null) + { + var settings = FlowRetryOptionValidation.Validate(options); + _output = new FlowOutput(new FlowOutputOptions { Capacity = settings.Capacity }); + _coordinator = new RetryOperationCoordinator( + settings, EmitAsync, clock, jitterSource); + _input = new TransformBlock>( + static message => new RetryInput( + message, message.IsError ? null! : message.Value!, message.Error, + message.CorrelationId, message.TraceId, message.MessageId, + message.Timestamp, message.Headers), + InputOptions(settings.Capacity)); + _inputLink = _input.LinkTo(_coordinator.Input, + new DataflowLinkOptions { PropagateCompletion = true }); + _completion = CompleteOutputAsync(); + Ack = Target(RetryFeedbackKind.Ack); + Nak = Target(RetryFeedbackKind.Nak); + Cancel = Target(RetryFeedbackKind.Cancel); + _ = ObserveOutputTerminationAsync(); + } + + public ITargetBlock Input => _input; + public IFlowSignalTarget Ack { get; } + public IFlowSignalTarget Nak { get; } + public IFlowSignalTarget Cancel { get; } + public ISourceBlock Output => _output; + public ISourceBlock Events => _coordinator.Events; + public Task Completion => _completion; + public void Complete() => _input.Complete(); + + public void Fault(Exception exception) + { + ArgumentNullException.ThrowIfNull(exception); + ((IDataflowBlock)_input).Fault(exception); + } + + public async ValueTask DisposeAsync() + { + if (Interlocked.Exchange(ref _disposed, 1) != 0) return; + Complete(); + try { await Completion.ConfigureAwait(false); } + catch { } + finally + { + _inputLink.Dispose(); + await _coordinator.DisposeAsync().ConfigureAwait(false); + await _output.DisposeAsync().ConfigureAwait(false); + } + } + + private RetrySignalTarget Target(RetryFeedbackKind kind) + => new(_coordinator.HandleFeedbackAsync, _completion, kind); + + private async ValueTask EmitAsync( + RetryEmission emission, + CancellationToken cancellationToken) + { + var output = emission.Error is null + ? emission.Input.Context.With(FlowValue.From(emission.Signal!), + emission.Headers, emission.CausationId) + : emission.Input.Context.WithError(emission.Error, + emission.Headers, emission.CausationId); + if (!await _output.SendAsync(output, cancellationToken).ConfigureAwait(false)) + { + await _output.Completion.ConfigureAwait(false); + throw new InvalidOperationException("Retry output declined an accepted result."); + } + return output.MessageId; + } + + private async Task CompleteOutputAsync() + { + try + { + await _coordinator.Completion.ConfigureAwait(false); + Interlocked.Exchange(ref _outputShutdownStarted, 1); + _output.Complete(); + await _output.Completion.ConfigureAwait(false); + } + catch (Exception exception) { _output.Fault(exception); throw; } + } + + private async Task ObserveOutputTerminationAsync() + { + try + { + await _output.Completion.ConfigureAwait(false); + if (Volatile.Read(ref _outputShutdownStarted) == 0 && !_coordinator.Completion.IsCompleted) + _coordinator.Fault(new InvalidOperationException( + "Retry output completed before input processing stopped.")); + } + catch (Exception exception) + { + if (!_completion.IsCompleted) _coordinator.Fault(exception); + } + } + + private static ExecutionDataflowBlockOptions InputOptions(int capacity) + => new() { BoundedCapacity = capacity, EnsureOrdered = true, MaxDegreeOfParallelism = 1 }; +} diff --git a/src/FluxFlow.Components.Resilience/Nodes/RetryAttemptKey.cs b/src/Components/Resilience/FluxFlow.Components.Resilience/Nodes/RetryAttemptKey.cs similarity index 100% rename from src/FluxFlow.Components.Resilience/Nodes/RetryAttemptKey.cs rename to src/Components/Resilience/FluxFlow.Components.Resilience/Nodes/RetryAttemptKey.cs diff --git a/src/FluxFlow.Components.Resilience/Nodes/RetryFeedback.cs b/src/Components/Resilience/FluxFlow.Components.Resilience/Nodes/RetryFeedback.cs similarity index 100% rename from src/FluxFlow.Components.Resilience/Nodes/RetryFeedback.cs rename to src/Components/Resilience/FluxFlow.Components.Resilience/Nodes/RetryFeedback.cs diff --git a/src/Components/Resilience/FluxFlow.Components.Resilience/Nodes/RetryOperationCoordinator.cs b/src/Components/Resilience/FluxFlow.Components.Resilience/Nodes/RetryOperationCoordinator.cs new file mode 100644 index 00000000..79dbb861 --- /dev/null +++ b/src/Components/Resilience/FluxFlow.Components.Resilience/Nodes/RetryOperationCoordinator.cs @@ -0,0 +1,507 @@ +using System.Text.Json; +using System.Threading.Tasks.Dataflow; +using FluxFlow.Components.Resilience.Contracts; +using FluxFlow.Components.Resilience.Diagnostics; +using FluxFlow.Components.Resilience.Options; +using FluxFlow.Coordination; +using FluxFlow.Data; +using FluxFlow.Nodes; +using FluxFlow.Resilience; + +using DataFlowError = FluxFlow.Data.FlowError; + +namespace FluxFlow.Components.Resilience.Nodes; + +internal sealed record RetryInput( + TContext Context, + TValue Value, + DataFlowError? Error, + CorrelationId? CorrelationId, + TraceId TraceId, + MessageId MessageId, + DateTimeOffset Timestamp, + IReadOnlyDictionary Headers) +{ + public bool IsError => Error is not null; +} + +internal sealed record RetryEmission( + RetryInput Input, + RetrySignal? Signal, + DataFlowError? Error, + IReadOnlyDictionary Headers, + MessageId CausationId); + +internal sealed class RetryOperationCoordinator : IAsyncDisposable +{ + private readonly object _gate = new(); + private readonly FlowRetryOptions _options; + private readonly TimeProvider _clock; + private readonly IRetryJitterSource _jitterSource; + private readonly Func, CancellationToken, ValueTask> _emit; + private readonly PendingExchangeCoordinator _attempts; + private readonly Dictionary _operations = []; + private readonly HashSet _observations = []; + private readonly CancellationTokenSource _stopping = new(); + private readonly ActionBlock> _input; + private readonly BroadcastBlock _events = new(static value => value); + private readonly TaskCompletionSource _completion = new(TaskCreationOptions.RunContinuationsAsynchronously); + private readonly string _attemptHeaderName; + private Exception? _fatalError; + private int _disposed; + + public RetryOperationCoordinator( + FlowRetryOptions options, + Func, CancellationToken, ValueTask> emit, + TimeProvider? clock = null, + IRetryJitterSource? jitterSource = null) + { + _options = FlowRetryOptionValidation.Validate(options); + _emit = emit ?? throw new ArgumentNullException(nameof(emit)); + _clock = clock ?? TimeProvider.System; + _jitterSource = jitterSource ?? RandomRetryJitterSource.Shared; + _attemptHeaderName = $"flow.retry.attempt.{Guid.NewGuid():N}"; + _attempts = new PendingExchangeCoordinator( + new PendingExchangeCoordinatorOptions + { + DefaultTimeout = TimeSpan.FromMilliseconds(_options.AttemptTimeoutMilliseconds), + MaxPending = _options.Capacity, + SettledKeyCapacity = Math.Max(_options.Capacity, 4096) + }, + _clock); + _input = new ActionBlock>( + ProcessInputAsync, + new ExecutionDataflowBlockOptions + { + BoundedCapacity = _options.Capacity, + EnsureOrdered = true, + MaxDegreeOfParallelism = 1 + }); + _ = MonitorAsync(); + } + + public ITargetBlock> Input => _input; + public ISourceBlock Events => _events; + public Task Completion => _completion.Task; + public void Complete() => _input.Complete(); + + public void Fault(Exception exception) + { + ArgumentNullException.ThrowIfNull(exception); + RecordFatalError(exception); + } + + public async ValueTask HandleFeedbackAsync( + TraceId traceId, + IReadOnlyDictionary headers, + RetryFeedback feedback, + CancellationToken cancellationToken) + { + cancellationToken.ThrowIfCancellationRequested(); + if (!TryReadAttempt(headers, out var attempt)) + { + EmitIgnoredFeedback(traceId, feedback.Kind, "missing-attempt"); + return false; + } + + var result = _attempts.TryResolve(new RetryAttemptKey(traceId, attempt), feedback); + if (result.Status == PendingExchangeFeedbackStatus.Resolved) + return true; + if (feedback.Kind == RetryFeedbackKind.Cancel && + TryClaimWaitingCancellation(traceId, attempt, out var operation)) + { + await CancelOperationAsync(operation, RetryFailureReason.Cancelled, feedback.MessageId).ConfigureAwait(false); + return true; + } + + EmitIgnoredFeedback(traceId, feedback.Kind, result.Status.ToString()); + return false; + } + + public async ValueTask DisposeAsync() + { + if (Interlocked.Exchange(ref _disposed, 1) != 0) + return; + Complete(); + try { await Completion.ConfigureAwait(false); } + catch { } + finally + { + await _attempts.DisposeAsync().ConfigureAwait(false); + _stopping.Dispose(); + } + } + + private async Task ProcessInputAsync(RetryInput input) + { + ArgumentNullException.ThrowIfNull(input); + if (input.IsError) + { + await EmitEnvelopeAsync(new(input, null, input.Error, input.Headers, input.MessageId)).ConfigureAwait(false); + return; + } + + RetryOperation? operation; + RetryFailureReason rejection; + lock (_gate) + { + if (_operations.ContainsKey(input.TraceId)) + { + operation = null; + rejection = RetryFailureReason.Duplicate; + } + else if (_operations.Count >= _options.Capacity) + { + operation = null; + rejection = RetryFailureReason.CapacityReached; + } + else + { + operation = new RetryOperation( + input, + new RetryStateMachine(FlowRetryOptionValidation.CreatePolicy(_options)), + CancellationTokenSource.CreateLinkedTokenSource(_stopping.Token)); + _operations.Add(input.TraceId, operation); + rejection = RetryFailureReason.None; + } + } + + if (operation is null) + { + await EmitTerminalAsync(input, 0, _clock.GetUtcNow(), RetrySignalStatus.Rejected, + rejection, null, input.MessageId).ConfigureAwait(false); + return; + } + + await BeginAttemptAsync(operation, operation.StateMachine.Begin(_clock.GetUtcNow())).ConfigureAwait(false); + } + + private async Task BeginAttemptAsync(RetryOperation operation, RetryDirective directive) + { + var key = new RetryAttemptKey(operation.Input.TraceId, directive.Attempt); + lock (_gate) + { + if (operation.Terminal) return; + operation.State = directive.State; + operation.CurrentAttempt = directive.Attempt; + } + + var start = _attempts.TryStart(key, operation, + TimeSpan.FromMilliseconds(_options.AttemptTimeoutMilliseconds)); + if (start.Status != PendingExchangeStartStatus.Accepted || start.Completion is null) + { + var reason = start.Status switch + { + PendingExchangeStartStatus.Duplicate => RetryFailureReason.Duplicate, + PendingExchangeStartStatus.CapacityReached => RetryFailureReason.CapacityReached, + _ => RetryFailureReason.Stopped + }; + if (TryClaimTerminal(operation)) + await EmitTerminalAsync(operation.Input, directive.Attempt, directive.State.StartedAt, + RetrySignalStatus.Rejected, reason, null, operation.LastMessageId).ConfigureAwait(false); + return; + } + + TrackObservation(ObserveAttemptAsync(operation, key, start.Completion)); + var messageId = await EmitAsync(operation.Input, RetrySignalStatus.Attempt, directive.Attempt, + directive.State.StartedAt, RetryFailureReason.None, null, null, + operation.LastMessageId).ConfigureAwait(false); + lock (_gate) operation.LastMessageId = messageId; + EmitEvent(operation.Input, RetryDiagnosticNames.Attempted, FlowEventLevel.Information, + directive.Attempt, RetryFailureReason.None, null); + } + + private async Task ObserveAttemptAsync( + RetryOperation operation, + RetryAttemptKey key, + Task> completionTask) + { + try + { + var completion = await completionTask.ConfigureAwait(false); + if (!IsCurrent(operation, key.Attempt)) return; + switch (completion.Kind) + { + case PendingExchangeCompletionKind.Resolved when completion.Outcome?.Kind == RetryFeedbackKind.Ack: + await CompleteOperationAsync(operation, completion.Outcome.MessageId).ConfigureAwait(false); + break; + case PendingExchangeCompletionKind.Resolved when completion.Outcome?.Kind == RetryFeedbackKind.Cancel: + await CancelOperationAsync(operation, RetryFailureReason.Cancelled, completion.Outcome.MessageId).ConfigureAwait(false); + break; + case PendingExchangeCompletionKind.Resolved when completion.Outcome?.Kind == RetryFeedbackKind.Nak: + await RetryOperationAsync(operation, RetryFailureReason.Nak, completion.Outcome.MessageId).ConfigureAwait(false); + break; + case PendingExchangeCompletionKind.TimedOut: + await RetryOperationAsync(operation, RetryFailureReason.Timeout, operation.LastMessageId).ConfigureAwait(false); + break; + case PendingExchangeCompletionKind.Stopped: + case PendingExchangeCompletionKind.Cancelled: + await CancelOperationAsync(operation, RetryFailureReason.Stopped, operation.LastMessageId).ConfigureAwait(false); + break; + } + } + catch (Exception exception) { RecordFatalError(exception); } + } + + private async Task CompleteOperationAsync(RetryOperation operation, MessageId causationId) + { + if (!TryClaimTerminal(operation)) return; + await EmitTerminalAsync(operation.Input, operation.CurrentAttempt, operation.State.StartedAt, + RetrySignalStatus.Completed, RetryFailureReason.None, null, causationId).ConfigureAwait(false); + EmitEvent(operation.Input, RetryDiagnosticNames.Completed, FlowEventLevel.Information, + operation.CurrentAttempt, RetryFailureReason.None, null); + } + + private async Task RetryOperationAsync(RetryOperation operation, RetryFailureReason reason, MessageId? causationId) + { + RetryDirective directive; + lock (_gate) + { + if (operation.Terminal) return; + directive = operation.StateMachine.AfterFailure(operation.State, _clock.GetUtcNow(), _jitterSource.NextSample()); + operation.State = directive.State; + } + if (directive.Kind == RetryDirectiveKind.Exhausted) + { + await ExhaustOperationAsync(operation, reason, causationId).ConfigureAwait(false); + return; + } + + var delay = directive.Delay > TimeSpan.Zero + ? Task.Delay(directive.Delay, _clock, operation.Token) + : Task.CompletedTask; + var messageId = await EmitAsync(operation.Input, RetrySignalStatus.RetryScheduled, + operation.CurrentAttempt, operation.State.StartedAt, reason, directive.Delay, + CreateError(reason, operation.CurrentAttempt, RetrySignalStatus.RetryScheduled, directive.Delay), + causationId).ConfigureAwait(false); + lock (_gate) operation.LastMessageId = messageId; + EmitEvent(operation.Input, RetryDiagnosticNames.Scheduled, FlowEventLevel.Warning, + operation.CurrentAttempt, reason, directive.Delay); + + try + { + await delay.ConfigureAwait(false); + } + catch (OperationCanceledException) when (operation.Token.IsCancellationRequested) + { + await CancelOperationAsync(operation, RetryFailureReason.Stopped, operation.LastMessageId).ConfigureAwait(false); + return; + } + + lock (_gate) + { + if (operation.Terminal) return; + directive = operation.StateMachine.AfterDelay(operation.State, _clock.GetUtcNow()); + operation.State = directive.State; + } + if (directive.Kind == RetryDirectiveKind.Exhausted) + await ExhaustOperationAsync(operation, reason, operation.LastMessageId).ConfigureAwait(false); + else + await BeginAttemptAsync(operation, directive).ConfigureAwait(false); + } + + private async Task ExhaustOperationAsync(RetryOperation operation, RetryFailureReason reason, MessageId? causationId) + { + if (!TryClaimTerminal(operation)) return; + await EmitTerminalAsync(operation.Input, operation.CurrentAttempt, operation.State.StartedAt, + RetrySignalStatus.Exhausted, reason, null, causationId).ConfigureAwait(false); + EmitEvent(operation.Input, RetryDiagnosticNames.Exhausted, FlowEventLevel.Warning, + operation.CurrentAttempt, reason, null); + } + + private async Task CancelOperationAsync(RetryOperation operation, RetryFailureReason reason, MessageId? causationId) + { + if (!TryClaimTerminal(operation)) return; + await EmitTerminalAsync(operation.Input, operation.CurrentAttempt, operation.State.StartedAt, + RetrySignalStatus.Cancelled, reason, null, causationId).ConfigureAwait(false); + EmitEvent(operation.Input, RetryDiagnosticNames.Cancelled, FlowEventLevel.Information, + operation.CurrentAttempt, reason, null); + } + + private bool TryClaimWaitingCancellation(TraceId traceId, int attempt, out RetryOperation operation) + { + lock (_gate) + { + if (_operations.TryGetValue(traceId, out operation!) && !operation.Terminal && + operation.CurrentAttempt == attempt && operation.State.Status == RetryStateStatus.Waiting) + return true; + } + operation = null!; + return false; + } + + private bool TryClaimTerminal(RetryOperation operation) + { + lock (_gate) + { + if (operation.Terminal) return false; + operation.Terminal = true; + _operations.Remove(operation.Input.TraceId); + } + operation.Cancellation.Cancel(); + operation.Cancellation.Dispose(); + return true; + } + + private bool IsCurrent(RetryOperation operation, int attempt) + { + lock (_gate) return !operation.Terminal && operation.CurrentAttempt == attempt; + } + + private bool TryReadAttempt(IReadOnlyDictionary headers, out int attempt) + { + attempt = 0; + return headers.TryGetValue(_attemptHeaderName, out var value) && + int.TryParse(value, System.Globalization.NumberStyles.None, + System.Globalization.CultureInfo.InvariantCulture, out attempt) && attempt > 0; + } + + private Task EmitTerminalAsync(RetryInput input, int attempt, + DateTimeOffset startedAt, RetrySignalStatus status, RetryFailureReason reason, + TimeSpan? nextDelay, MessageId? causationId) + => EmitAsync(input, status, attempt, startedAt, reason, nextDelay, + status is RetrySignalStatus.Completed ? null : CreateError(reason, attempt, status, nextDelay), + causationId); + + private async Task EmitAsync(RetryInput input, + RetrySignalStatus status, int attempt, DateTimeOffset startedAt, + RetryFailureReason reason, TimeSpan? nextDelay, DataFlowError? error, + MessageId? causationId) + { + var signal = new RetrySignal + { + Value = input.Value, + Status = status, + Attempt = attempt, + StartedAt = startedAt, + OccurredAt = _clock.GetUtcNow(), + Reason = reason, + NextDelay = nextDelay + }; + var headers = new Dictionary(input.Headers, StringComparer.Ordinal) + { + [_attemptHeaderName] = attempt.ToString(System.Globalization.CultureInfo.InvariantCulture) + }; + return await EmitEnvelopeAsync(new(input, signal, error, headers, + causationId ?? input.MessageId)).ConfigureAwait(false); + } + + private async Task EmitEnvelopeAsync(RetryEmission emission) + { + try { return await _emit(emission, _stopping.Token).ConfigureAwait(false); } + catch (OperationCanceledException) when (_stopping.IsCancellationRequested) { throw; } + catch (Exception exception) { RecordFatalError(exception); throw; } + } + + private void EmitEvent(RetryInput input, string name, + FlowEventLevel level, int attempt, RetryFailureReason reason, TimeSpan? nextDelay) + => _events.Post(new FlowEvent + { + Timestamp = _clock.GetUtcNow(), + CorrelationId = input.CorrelationId, + Name = name, + Level = level, + Message = $"Retry operation '{_options.Name}' produced {name}.", + Attributes = new Dictionary(StringComparer.Ordinal) + { + ["traceId"] = input.TraceId.ToString(), ["attempt"] = attempt, + ["reason"] = reason.ToString(), ["nextDelayMilliseconds"] = nextDelay?.TotalMilliseconds + } + }); + + private void EmitIgnoredFeedback(TraceId traceId, RetryFeedbackKind feedback, string reason) + => _events.Post(new FlowEvent + { + Timestamp = _clock.GetUtcNow(), Name = RetryDiagnosticNames.FeedbackIgnored, + Level = FlowEventLevel.Warning, + Message = $"Retry operation '{_options.Name}' ignored {feedback} feedback.", + Attributes = new Dictionary(StringComparer.Ordinal) + { + ["traceId"] = traceId.ToString(), ["feedback"] = feedback.ToString(), ["reason"] = reason + } + }); + + private static DataFlowError CreateError(RetryFailureReason reason, int attempt, + RetrySignalStatus status, TimeSpan? nextDelay) + { + var code = status == RetrySignalStatus.Exhausted ? RetryErrorCodeNames.Exhausted : reason switch + { + RetryFailureReason.Nak => RetryErrorCodeNames.Nak, + RetryFailureReason.Timeout => RetryErrorCodeNames.Timeout, + RetryFailureReason.Cancelled => RetryErrorCodeNames.Cancelled, + RetryFailureReason.Duplicate => RetryErrorCodeNames.Duplicate, + RetryFailureReason.CapacityReached => RetryErrorCodeNames.CapacityReached, + RetryFailureReason.Stopped => RetryErrorCodeNames.Stopped, + _ => RetryErrorCodeNames.Nak + }; + var terminal = status is not RetrySignalStatus.RetryScheduled; + return new DataFlowError(code, + terminal ? $"Retry operation ended after attempt {attempt}: {reason}." : + $"Retry attempt {attempt} did not complete successfully: {reason}.", + category: "Resilience", isTransient: !terminal, + details: JsonSerializer.SerializeToElement(new Dictionary(StringComparer.Ordinal) + { + ["attempt"] = attempt, ["nextDelayMilliseconds"] = nextDelay?.TotalMilliseconds, + ["reason"] = reason.ToString() + })); + } + + private void TrackObservation(Task task) + { + lock (_gate) _observations.Add(task); + _ = task.ContinueWith(completed => { lock (_gate) _observations.Remove(completed); }, + CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default); + } + + private async Task DrainObservationsAsync() + { + while (true) + { + Task[] pending; + lock (_gate) pending = [.. _observations]; + if (pending.Length == 0) return; + await Task.WhenAll(pending).ConfigureAwait(false); + } + } + + private void RecordFatalError(Exception exception) + { + lock (_gate) _fatalError ??= exception; + _stopping.Cancel(); + _attempts.Stop(exception); + ((IDataflowBlock)_input).Fault(exception); + } + + private async Task MonitorAsync() + { + Exception? inputError = null; + try { await _input.Completion.ConfigureAwait(false); } + catch (Exception exception) { inputError = exception; } + if (inputError is null) _attempts.Stop(); + else { _stopping.Cancel(); _attempts.Stop(inputError); } + await DrainObservationsAsync().ConfigureAwait(false); + _stopping.Cancel(); + Exception? fatal; + lock (_gate) fatal = _fatalError ?? inputError; + _events.Complete(); + if (fatal is null) + { + await _events.Completion.ConfigureAwait(false); + _completion.TrySetResult(); + } + else _completion.TrySetException(fatal); + } + + private sealed class RetryOperation(RetryInput input, + RetryStateMachine stateMachine, CancellationTokenSource cancellation) + { + public RetryInput Input { get; } = input; + public RetryStateMachine StateMachine { get; } = stateMachine; + public CancellationTokenSource Cancellation { get; } = cancellation; + public CancellationToken Token { get; } = cancellation.Token; + public RetryState State { get; set; } + public int CurrentAttempt { get; set; } + public MessageId? LastMessageId { get; set; } = input.MessageId; + public bool Terminal { get; set; } + } +} diff --git a/src/FluxFlow.Components.Resilience/Nodes/RetrySignalTarget.cs b/src/Components/Resilience/FluxFlow.Components.Resilience/Nodes/RetrySignalTarget.cs similarity index 100% rename from src/FluxFlow.Components.Resilience/Nodes/RetrySignalTarget.cs rename to src/Components/Resilience/FluxFlow.Components.Resilience/Nodes/RetrySignalTarget.cs diff --git a/src/FluxFlow.Components.Resilience/Options/FlowRetryOptionValidation.cs b/src/Components/Resilience/FluxFlow.Components.Resilience/Options/FlowRetryOptionValidation.cs similarity index 100% rename from src/FluxFlow.Components.Resilience/Options/FlowRetryOptionValidation.cs rename to src/Components/Resilience/FluxFlow.Components.Resilience/Options/FlowRetryOptionValidation.cs diff --git a/src/FluxFlow.Components.Resilience/Options/FlowRetryOptions.cs b/src/Components/Resilience/FluxFlow.Components.Resilience/Options/FlowRetryOptions.cs similarity index 100% rename from src/FluxFlow.Components.Resilience/Options/FlowRetryOptions.cs rename to src/Components/Resilience/FluxFlow.Components.Resilience/Options/FlowRetryOptions.cs diff --git a/src/Components/Resilience/FluxFlow.Components.Resilience/Properties/AssemblyInfo.cs b/src/Components/Resilience/FluxFlow.Components.Resilience/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..98ab4550 --- /dev/null +++ b/src/Components/Resilience/FluxFlow.Components.Resilience/Properties/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("FluxFlow.Components.Resilience.Composition")] diff --git a/src/FluxFlow.Components.Resilience/README.md b/src/Components/Resilience/FluxFlow.Components.Resilience/README.md similarity index 100% rename from src/FluxFlow.Components.Resilience/README.md rename to src/Components/Resilience/FluxFlow.Components.Resilience/README.md diff --git a/src/FluxFlow.Components.Resilience/RetryErrorCodeNames.cs b/src/Components/Resilience/FluxFlow.Components.Resilience/RetryErrorCodeNames.cs similarity index 100% rename from src/FluxFlow.Components.Resilience/RetryErrorCodeNames.cs rename to src/Components/Resilience/FluxFlow.Components.Resilience/RetryErrorCodeNames.cs diff --git a/src/FluxFlow.Components.Resilience/RetryResultKinds.cs b/src/Components/Resilience/FluxFlow.Components.Resilience/RetryResultKinds.cs similarity index 100% rename from src/FluxFlow.Components.Resilience/RetryResultKinds.cs rename to src/Components/Resilience/FluxFlow.Components.Resilience/RetryResultKinds.cs diff --git a/src/Components/Routing/FluxFlow.Components.Routing.Composition/CompatibilitySuppressions.xml b/src/Components/Routing/FluxFlow.Components.Routing.Composition/CompatibilitySuppressions.xml new file mode 100644 index 00000000..f10f4484 --- /dev/null +++ b/src/Components/Routing/FluxFlow.Components.Routing.Composition/CompatibilitySuppressions.xml @@ -0,0 +1,132 @@ + + + + + CP0002 + M:FluxFlow.Components.Routing.Composition.RoutingAuthoringExtensions.AddCorrelation(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Routing.Composition.CorrelationComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,FluxFlow.Components.Routing.Contracts.FlowCorrelationOutcome{System.Text.Json.JsonElement}}@) + lib/net10.0/FluxFlow.Components.Routing.Composition.dll + lib/net10.0/FluxFlow.Components.Routing.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Composition.RoutingAuthoringExtensions.AddCorrelation(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Routing.Composition.CorrelationComponentBuilder}) + lib/net10.0/FluxFlow.Components.Routing.Composition.dll + lib/net10.0/FluxFlow.Components.Routing.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Composition.RoutingAuthoringExtensions.AddJoin(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Routing.Composition.JoinComponentBuilder},FluxFlow.Composition.Authoring.DualInputOutputComponentHandle{System.Text.Json.JsonElement,System.Text.Json.JsonElement,FluxFlow.Components.Routing.Contracts.FlowJoinOutcome{System.Text.Json.JsonElement,System.Text.Json.JsonElement}}@) + lib/net10.0/FluxFlow.Components.Routing.Composition.dll + lib/net10.0/FluxFlow.Components.Routing.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Composition.RoutingAuthoringExtensions.AddJoin(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Routing.Composition.JoinComponentBuilder}) + lib/net10.0/FluxFlow.Components.Routing.Composition.dll + lib/net10.0/FluxFlow.Components.Routing.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Composition.RoutingAuthoringExtensions.AddWindow(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Routing.Composition.WindowComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,FluxFlow.Components.Routing.Contracts.FlowWindow{System.Text.Json.JsonElement}}@) + lib/net10.0/FluxFlow.Components.Routing.Composition.dll + lib/net10.0/FluxFlow.Components.Routing.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Composition.RoutingAuthoringExtensions.AddWindow(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Routing.Composition.WindowComponentBuilder}) + lib/net10.0/FluxFlow.Components.Routing.Composition.dll + lib/net10.0/FluxFlow.Components.Routing.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Composition.RoutingComponents.get_Correlation + lib/net10.0/FluxFlow.Components.Routing.Composition.dll + lib/net10.0/FluxFlow.Components.Routing.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Composition.RoutingComponents.get_Join + lib/net10.0/FluxFlow.Components.Routing.Composition.dll + lib/net10.0/FluxFlow.Components.Routing.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Composition.RoutingComponents.get_Window + lib/net10.0/FluxFlow.Components.Routing.Composition.dll + lib/net10.0/FluxFlow.Components.Routing.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Composition.RoutingAuthoringExtensions.AddCorrelation(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Routing.Composition.CorrelationComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,FluxFlow.Components.Routing.Contracts.FlowCorrelationOutcome{System.Text.Json.JsonElement}}@) + lib/net8.0/FluxFlow.Components.Routing.Composition.dll + lib/net8.0/FluxFlow.Components.Routing.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Composition.RoutingAuthoringExtensions.AddCorrelation(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Routing.Composition.CorrelationComponentBuilder}) + lib/net8.0/FluxFlow.Components.Routing.Composition.dll + lib/net8.0/FluxFlow.Components.Routing.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Composition.RoutingAuthoringExtensions.AddJoin(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Routing.Composition.JoinComponentBuilder},FluxFlow.Composition.Authoring.DualInputOutputComponentHandle{System.Text.Json.JsonElement,System.Text.Json.JsonElement,FluxFlow.Components.Routing.Contracts.FlowJoinOutcome{System.Text.Json.JsonElement,System.Text.Json.JsonElement}}@) + lib/net8.0/FluxFlow.Components.Routing.Composition.dll + lib/net8.0/FluxFlow.Components.Routing.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Composition.RoutingAuthoringExtensions.AddJoin(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Routing.Composition.JoinComponentBuilder}) + lib/net8.0/FluxFlow.Components.Routing.Composition.dll + lib/net8.0/FluxFlow.Components.Routing.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Composition.RoutingAuthoringExtensions.AddWindow(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Routing.Composition.WindowComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,FluxFlow.Components.Routing.Contracts.FlowWindow{System.Text.Json.JsonElement}}@) + lib/net8.0/FluxFlow.Components.Routing.Composition.dll + lib/net8.0/FluxFlow.Components.Routing.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Composition.RoutingAuthoringExtensions.AddWindow(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Routing.Composition.WindowComponentBuilder}) + lib/net8.0/FluxFlow.Components.Routing.Composition.dll + lib/net8.0/FluxFlow.Components.Routing.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Composition.RoutingComponents.get_Correlation + lib/net8.0/FluxFlow.Components.Routing.Composition.dll + lib/net8.0/FluxFlow.Components.Routing.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Composition.RoutingComponents.get_Join + lib/net8.0/FluxFlow.Components.Routing.Composition.dll + lib/net8.0/FluxFlow.Components.Routing.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Composition.RoutingComponents.get_Window + lib/net8.0/FluxFlow.Components.Routing.Composition.dll + lib/net8.0/FluxFlow.Components.Routing.Composition.dll + true + + diff --git a/src/FluxFlow.Components.Routing.Composition/FluxFlow.Components.Routing.Composition.csproj b/src/Components/Routing/FluxFlow.Components.Routing.Composition/FluxFlow.Components.Routing.Composition.csproj similarity index 62% rename from src/FluxFlow.Components.Routing.Composition/FluxFlow.Components.Routing.Composition.csproj rename to src/Components/Routing/FluxFlow.Components.Routing.Composition/FluxFlow.Components.Routing.Composition.csproj index 60cf2761..8d4164d3 100644 --- a/src/FluxFlow.Components.Routing.Composition/FluxFlow.Components.Routing.Composition.csproj +++ b/src/Components/Routing/FluxFlow.Components.Routing.Composition/FluxFlow.Components.Routing.Composition.csproj @@ -5,17 +5,17 @@ FluxFlow.Components.Routing.Composition FluxFlow.Components.Routing.Composition FluxFlow.Components.Routing.Composition - 7.0.0-rc.1 + 8.0.0-rc.1 Typed JSON routing registration and Designer metadata over host-owned selectors and clocks. workflow;dataflow;components;routing;composition README.md - Requires flow.correlate; registers exact descriptors and Designer metadata through the flat designed-component API; keeps constants under RoutingComponentDefinition and removes its metadata-only factory. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. - - + + diff --git a/src/FluxFlow.Components.Routing.Composition/README.md b/src/Components/Routing/FluxFlow.Components.Routing.Composition/README.md similarity index 100% rename from src/FluxFlow.Components.Routing.Composition/README.md rename to src/Components/Routing/FluxFlow.Components.Routing.Composition/README.md diff --git a/src/FluxFlow.Components.Routing.Composition/RoutingAuthoringExtensions.cs b/src/Components/Routing/FluxFlow.Components.Routing.Composition/RoutingAuthoringExtensions.cs similarity index 82% rename from src/FluxFlow.Components.Routing.Composition/RoutingAuthoringExtensions.cs rename to src/Components/Routing/FluxFlow.Components.Routing.Composition/RoutingAuthoringExtensions.cs index b99f8de1..f21e6f39 100644 --- a/src/FluxFlow.Components.Routing.Composition/RoutingAuthoringExtensions.cs +++ b/src/Components/Routing/FluxFlow.Components.Routing.Composition/RoutingAuthoringExtensions.cs @@ -3,38 +3,40 @@ using FluxFlow.Components.Designer; using FluxFlow.Composition.Authoring; +using FluxFlow.Data; + namespace FluxFlow.Components.Routing.Composition; public static class RoutingComponents { - public static ComponentContract>> Window { get; } = + public static ComponentContract> Window { get; } = DesignedComponentContract.Create( RoutingComponentDefinition.Types.Window, RoutingServiceCollectionExtensions.ConfigureWindow, static () => new WindowComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new InputOutputComponentHandle>(component, RoutingComponentDefinition.Ports.Input, RoutingComponentDefinition.Ports.Output, RoutingComponentDefinition.Ports.Events)); + static component => new InputOutputComponentHandle(component, RoutingComponentDefinition.Ports.Input, RoutingComponentDefinition.Ports.Output, RoutingComponentDefinition.Ports.Events)); - public static ComponentContract>> Correlation { get; } = + public static ComponentContract> Correlation { get; } = DesignedComponentContract.Create( RoutingComponentDefinition.Types.Correlation, RoutingServiceCollectionExtensions.ConfigureCorrelation, static () => new CorrelationComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new InputOutputComponentHandle>(component, RoutingComponentDefinition.Ports.Input, RoutingComponentDefinition.Ports.Output, RoutingComponentDefinition.Ports.Events)); + static component => new InputOutputComponentHandle(component, RoutingComponentDefinition.Ports.Input, RoutingComponentDefinition.Ports.Output, RoutingComponentDefinition.Ports.Events)); - public static ComponentContract>> Join { get; } = + public static ComponentContract> Join { get; } = DesignedComponentContract.Create( RoutingComponentDefinition.Types.Join, RoutingServiceCollectionExtensions.ConfigureJoin, static () => new JoinComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new DualInputOutputComponentHandle>(component, RoutingComponentDefinition.Ports.Left, RoutingComponentDefinition.Ports.Right, RoutingComponentDefinition.Ports.Output, RoutingComponentDefinition.Ports.Events)); + static component => new DualInputOutputComponentHandle(component, RoutingComponentDefinition.Ports.Left, RoutingComponentDefinition.Ports.Right, RoutingComponentDefinition.Ports.Output, RoutingComponentDefinition.Ports.Events)); } public static class RoutingAuthoringExtensions { - public static InputOutputComponentHandle> AddWindow( + public static InputOutputComponentHandle AddWindow( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -44,13 +46,13 @@ public static WorkflowDefinitionBuilder AddWindow( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle> window) + out InputOutputComponentHandle window) { window = workflow.AddWindow(name, configure); return workflow; } - public static InputOutputComponentHandle> AddCorrelation( + public static InputOutputComponentHandle AddCorrelation( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -60,13 +62,13 @@ public static WorkflowDefinitionBuilder AddCorrelation( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle> correlation) + out InputOutputComponentHandle correlation) { correlation = workflow.AddCorrelation(name, configure); return workflow; } - public static DualInputOutputComponentHandle> AddJoin( + public static DualInputOutputComponentHandle AddJoin( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -76,7 +78,7 @@ public static WorkflowDefinitionBuilder AddJoin( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out DualInputOutputComponentHandle> join) + out DualInputOutputComponentHandle join) { join = workflow.AddJoin(name, configure); return workflow; diff --git a/src/FluxFlow.Components.Routing.Composition/RoutingComponentDefinition.cs b/src/Components/Routing/FluxFlow.Components.Routing.Composition/RoutingComponentDefinition.cs similarity index 100% rename from src/FluxFlow.Components.Routing.Composition/RoutingComponentDefinition.cs rename to src/Components/Routing/FluxFlow.Components.Routing.Composition/RoutingComponentDefinition.cs diff --git a/src/FluxFlow.Components.Routing.Composition/RoutingServiceCollectionExtensions.cs b/src/Components/Routing/FluxFlow.Components.Routing.Composition/RoutingServiceCollectionExtensions.cs similarity index 90% rename from src/FluxFlow.Components.Routing.Composition/RoutingServiceCollectionExtensions.cs rename to src/Components/Routing/FluxFlow.Components.Routing.Composition/RoutingServiceCollectionExtensions.cs index 4e291a76..200f12d3 100644 --- a/src/FluxFlow.Components.Routing.Composition/RoutingServiceCollectionExtensions.cs +++ b/src/Components/Routing/FluxFlow.Components.Routing.Composition/RoutingServiceCollectionExtensions.cs @@ -5,6 +5,7 @@ using FluxFlow.Components.Routing.Nodes; using FluxFlow.Components.Routing.Options; using FluxFlow.Composition; +using FluxFlow.Data; namespace FluxFlow.Components.Routing.Composition; @@ -30,8 +31,8 @@ internal static void ConfigureWindow(ComponentRegistrationBuilder component) component.AddResource(RoutingComponentDefinition.Resources.Clock, "Clock", 0, "Optional keyed clock for deterministic routing timing, timeouts, and diagnostics.", designValueType: nameof(TimeProvider), ownership: ResourceDesignMetadataAttributeValues.HostOwned, pickerKind: ResourceDesignMetadataAttributeValues.Clock, keyPattern: "clock:{name}"); component .UseFactory(CreateJsonWindowNode) - .HasInput(RoutingComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Schema-less JSON value.", true) - .HasOutput(RoutingComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 1, "Count-, time-, or completion-based window; failures use the message error case.", true) + .HasFlowValueInput(RoutingComponentDefinition.Ports.Input, static node => node.Input, FlowValueMaterializers.JsonElement.InputShape, "Input", "Messages", 0, "Schema-less JSON value.", true) + .HasFlowValueOutput(RoutingComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 1, "Count-, time-, or completion-based window; failures use the message error case.", true) .HasEvents(RoutingComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort window diagnostics."); } @@ -52,8 +53,8 @@ internal static void ConfigureCorrelation(ComponentRegistrationBuilder component component.AddAttribute("requiredResources", $"{RoutingComponentDefinition.Resources.KeySelector},{RoutingComponentDefinition.Resources.SideSelector}"); component .UseFactory(CreateJsonCorrelationNode) - .HasInput(RoutingComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Schema-less JSON request or response value.", true) - .HasOutput(RoutingComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 1, "Match or timeout outcome; failures use the message error case.", true) + .HasFlowValueInput(RoutingComponentDefinition.Ports.Input, static node => node.Input, FlowValueMaterializers.JsonElement.InputShape, "Input", "Messages", 0, "Schema-less JSON request or response value.", true) + .HasFlowValueOutput(RoutingComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 1, "Match or timeout outcome; failures use the message error case.", true) .HasEvents(RoutingComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort correlation diagnostics."); } @@ -73,9 +74,9 @@ internal static void ConfigureJoin(ComponentRegistrationBuilder component) component.AddAttribute("requiredResources", $"{RoutingComponentDefinition.Resources.LeftKeySelector},{RoutingComponentDefinition.Resources.RightKeySelector}"); component .UseFactory(CreateJsonJoinNode) - .HasInput(RoutingComponentDefinition.Ports.Left, static node => node.Left, "Left", "Messages", 0, "Schema-less JSON left value.", true) - .HasInput(RoutingComponentDefinition.Ports.Right, static node => node.Right, "Right", "Messages", 1, "Schema-less JSON right value.") - .HasOutput(RoutingComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 2, "Match or timeout outcome; failures use the message error case.", true) + .HasFlowValueInput(RoutingComponentDefinition.Ports.Left, static node => node.Left, FlowValueMaterializers.JsonElement.InputShape, "Left", "Messages", 0, "Schema-less JSON left value.", true) + .HasFlowValueInput(RoutingComponentDefinition.Ports.Right, static node => node.Right, FlowValueMaterializers.JsonElement.InputShape, "Right", "Messages", 1, "Schema-less JSON right value.") + .HasFlowValueOutput(RoutingComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 2, "Match or timeout outcome; failures use the message error case.", true) .HasEvents(RoutingComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 3, "Best-effort join diagnostics."); } diff --git a/src/Components/Routing/FluxFlow.Components.Routing/CompatibilitySuppressions.xml b/src/Components/Routing/FluxFlow.Components.Routing/CompatibilitySuppressions.xml new file mode 100644 index 00000000..d24c6208 --- /dev/null +++ b/src/Components/Routing/FluxFlow.Components.Routing/CompatibilitySuppressions.xml @@ -0,0 +1,90 @@ + + + + + CP0002 + M:FluxFlow.Components.Routing.Nodes.CorrelationNode`1.get_Events + lib/net10.0/FluxFlow.Components.Routing.dll + lib/net10.0/FluxFlow.Components.Routing.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Nodes.JoinNode`2.get_Events + lib/net10.0/FluxFlow.Components.Routing.dll + lib/net10.0/FluxFlow.Components.Routing.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Nodes.WindowNode`1.get_Events + lib/net10.0/FluxFlow.Components.Routing.dll + lib/net10.0/FluxFlow.Components.Routing.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Nodes.CorrelationNode`1.get_Events + lib/net8.0/FluxFlow.Components.Routing.dll + lib/net8.0/FluxFlow.Components.Routing.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Nodes.JoinNode`2.get_Events + lib/net8.0/FluxFlow.Components.Routing.dll + lib/net8.0/FluxFlow.Components.Routing.dll + true + + + CP0002 + M:FluxFlow.Components.Routing.Nodes.WindowNode`1.get_Events + lib/net8.0/FluxFlow.Components.Routing.dll + lib/net8.0/FluxFlow.Components.Routing.dll + true + + + CP0007 + T:FluxFlow.Components.Routing.Nodes.JsonCorrelationNode + lib/net10.0/FluxFlow.Components.Routing.dll + lib/net10.0/FluxFlow.Components.Routing.dll + true + + + CP0007 + T:FluxFlow.Components.Routing.Nodes.JsonJoinNode + lib/net10.0/FluxFlow.Components.Routing.dll + lib/net10.0/FluxFlow.Components.Routing.dll + true + + + CP0007 + T:FluxFlow.Components.Routing.Nodes.JsonWindowNode + lib/net10.0/FluxFlow.Components.Routing.dll + lib/net10.0/FluxFlow.Components.Routing.dll + true + + + CP0007 + T:FluxFlow.Components.Routing.Nodes.JsonCorrelationNode + lib/net8.0/FluxFlow.Components.Routing.dll + lib/net8.0/FluxFlow.Components.Routing.dll + true + + + CP0007 + T:FluxFlow.Components.Routing.Nodes.JsonJoinNode + lib/net8.0/FluxFlow.Components.Routing.dll + lib/net8.0/FluxFlow.Components.Routing.dll + true + + + CP0007 + T:FluxFlow.Components.Routing.Nodes.JsonWindowNode + lib/net8.0/FluxFlow.Components.Routing.dll + lib/net8.0/FluxFlow.Components.Routing.dll + true + + diff --git a/src/FluxFlow.Components.Routing/Contracts/FlowCorrelationMatch.cs b/src/Components/Routing/FluxFlow.Components.Routing/Contracts/FlowCorrelationMatch.cs similarity index 100% rename from src/FluxFlow.Components.Routing/Contracts/FlowCorrelationMatch.cs rename to src/Components/Routing/FluxFlow.Components.Routing/Contracts/FlowCorrelationMatch.cs diff --git a/src/FluxFlow.Components.Routing/Contracts/FlowCorrelationOutcome.cs b/src/Components/Routing/FluxFlow.Components.Routing/Contracts/FlowCorrelationOutcome.cs similarity index 100% rename from src/FluxFlow.Components.Routing/Contracts/FlowCorrelationOutcome.cs rename to src/Components/Routing/FluxFlow.Components.Routing/Contracts/FlowCorrelationOutcome.cs diff --git a/src/FluxFlow.Components.Routing/Contracts/FlowCorrelationTimeout.cs b/src/Components/Routing/FluxFlow.Components.Routing/Contracts/FlowCorrelationTimeout.cs similarity index 100% rename from src/FluxFlow.Components.Routing/Contracts/FlowCorrelationTimeout.cs rename to src/Components/Routing/FluxFlow.Components.Routing/Contracts/FlowCorrelationTimeout.cs diff --git a/src/FluxFlow.Components.Routing/Contracts/FlowJoinOutcome.cs b/src/Components/Routing/FluxFlow.Components.Routing/Contracts/FlowJoinOutcome.cs similarity index 100% rename from src/FluxFlow.Components.Routing/Contracts/FlowJoinOutcome.cs rename to src/Components/Routing/FluxFlow.Components.Routing/Contracts/FlowJoinOutcome.cs diff --git a/src/FluxFlow.Components.Routing/Contracts/FlowJoinResult.cs b/src/Components/Routing/FluxFlow.Components.Routing/Contracts/FlowJoinResult.cs similarity index 100% rename from src/FluxFlow.Components.Routing/Contracts/FlowJoinResult.cs rename to src/Components/Routing/FluxFlow.Components.Routing/Contracts/FlowJoinResult.cs diff --git a/src/FluxFlow.Components.Routing/Contracts/FlowJoinSide.cs b/src/Components/Routing/FluxFlow.Components.Routing/Contracts/FlowJoinSide.cs similarity index 100% rename from src/FluxFlow.Components.Routing/Contracts/FlowJoinSide.cs rename to src/Components/Routing/FluxFlow.Components.Routing/Contracts/FlowJoinSide.cs diff --git a/src/FluxFlow.Components.Routing/Contracts/FlowJoinTimeout.cs b/src/Components/Routing/FluxFlow.Components.Routing/Contracts/FlowJoinTimeout.cs similarity index 100% rename from src/FluxFlow.Components.Routing/Contracts/FlowJoinTimeout.cs rename to src/Components/Routing/FluxFlow.Components.Routing/Contracts/FlowJoinTimeout.cs diff --git a/src/FluxFlow.Components.Routing/Contracts/FlowWindow.cs b/src/Components/Routing/FluxFlow.Components.Routing/Contracts/FlowWindow.cs similarity index 100% rename from src/FluxFlow.Components.Routing/Contracts/FlowWindow.cs rename to src/Components/Routing/FluxFlow.Components.Routing/Contracts/FlowWindow.cs diff --git a/src/FluxFlow.Components.Routing/Contracts/FlowWindowEmitReason.cs b/src/Components/Routing/FluxFlow.Components.Routing/Contracts/FlowWindowEmitReason.cs similarity index 100% rename from src/FluxFlow.Components.Routing/Contracts/FlowWindowEmitReason.cs rename to src/Components/Routing/FluxFlow.Components.Routing/Contracts/FlowWindowEmitReason.cs diff --git a/src/FluxFlow.Components.Routing/Diagnostics/RoutingDiagnosticNames.cs b/src/Components/Routing/FluxFlow.Components.Routing/Diagnostics/RoutingDiagnosticNames.cs similarity index 100% rename from src/FluxFlow.Components.Routing/Diagnostics/RoutingDiagnosticNames.cs rename to src/Components/Routing/FluxFlow.Components.Routing/Diagnostics/RoutingDiagnosticNames.cs diff --git a/src/FluxFlow.Components.Routing/FluxFlow.Components.Routing.csproj b/src/Components/Routing/FluxFlow.Components.Routing/FluxFlow.Components.Routing.csproj similarity index 71% rename from src/FluxFlow.Components.Routing/FluxFlow.Components.Routing.csproj rename to src/Components/Routing/FluxFlow.Components.Routing/FluxFlow.Components.Routing.csproj index f293ca0f..98dd4482 100644 --- a/src/FluxFlow.Components.Routing/FluxFlow.Components.Routing.csproj +++ b/src/Components/Routing/FluxFlow.Components.Routing/FluxFlow.Components.Routing.csproj @@ -4,14 +4,14 @@ FluxFlow.Components.Routing FluxFlow.Components.Routing FluxFlow.Components.Routing - 6.0.1 + 7.0.0-rc.1 Standalone typed Window, Correlation, and Join nodes for FluxFlow, including explicit JSON specializations. workflow;dataflow;components;routing - Extracts correlation and join pending-state stores while preserving FIFO matching, timeouts, capacity, and completion behavior. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md - + diff --git a/src/Components/Routing/FluxFlow.Components.Routing/Nodes/CanonicalRoutingNode.cs b/src/Components/Routing/FluxFlow.Components.Routing/Nodes/CanonicalRoutingNode.cs new file mode 100644 index 00000000..3d1b09b0 --- /dev/null +++ b/src/Components/Routing/FluxFlow.Components.Routing/Nodes/CanonicalRoutingNode.cs @@ -0,0 +1,247 @@ +using System.Text.Json; +using System.Threading.Tasks.Dataflow; +using FluxFlow.Data; +using FluxFlow.Nodes; + +namespace FluxFlow.Components.Routing.Nodes; + +internal sealed class CanonicalRoutingNode : IFlowNode +{ + private readonly IFlowNode _operation; + private readonly TransformBlock> _input; + private readonly IDisposable _inputLink; + private readonly CanonicalRoutingOutput _output; + private readonly Task _completion; + private int _disposed; + + internal CanonicalRoutingNode( + IFlowNode operation, + ITargetBlock> input, + ISourceBlock> output, + ISourceBlock events, + int capacity) + { + _operation = operation; + Events = events; + _input = CanonicalRoutingInput.Create(capacity); + _inputLink = _input.LinkTo( + input, + new DataflowLinkOptions { PropagateCompletion = true }); + _output = new CanonicalRoutingOutput(output, capacity); + _completion = CompleteAsync(); + } + + public ITargetBlock Input => _input; + + public ISourceBlock Output => _output.Source; + + public ISourceBlock Events { get; } + + public Task Completion => _completion; + + public void Complete() => _input.Complete(); + + public void Fault(Exception exception) + { + ArgumentNullException.ThrowIfNull(exception); + ((IDataflowBlock)_input).Fault(exception); + } + + public async ValueTask DisposeAsync() + { + if (Interlocked.Exchange(ref _disposed, 1) != 0) + return; + + Complete(); + try + { + await _completion.ConfigureAwait(false); + } + catch + { + // Completion remains the authoritative fault surface. + } + finally + { + _inputLink.Dispose(); + await _operation.DisposeAsync().ConfigureAwait(false); + await _output.DisposeAsync().ConfigureAwait(false); + } + } + + private async Task CompleteAsync() + { + await _operation.Completion.ConfigureAwait(false); + await _output.Completion.ConfigureAwait(false); + } +} + +internal sealed class CanonicalJoinRoutingNode : IFlowNode +{ + private readonly IFlowNode _operation; + private readonly TransformBlock> _left; + private readonly TransformBlock> _right; + private readonly IDisposable _leftLink; + private readonly IDisposable _rightLink; + private readonly CanonicalRoutingOutput _output; + private readonly Task _completion; + private int _disposed; + + internal CanonicalJoinRoutingNode( + IFlowNode operation, + ITargetBlock> left, + ITargetBlock> right, + ISourceBlock> output, + int capacity) + { + _operation = operation; + _left = CanonicalRoutingInput.Create(capacity); + _right = CanonicalRoutingInput.Create(capacity); + _leftLink = _left.LinkTo( + left, + new DataflowLinkOptions { PropagateCompletion = true }); + _rightLink = _right.LinkTo( + right, + new DataflowLinkOptions { PropagateCompletion = true }); + _output = new CanonicalRoutingOutput(output, capacity); + _completion = CompleteAsync(); + } + + public ITargetBlock Left => _left; + + public ITargetBlock Right => _right; + + public ISourceBlock Output => _output.Source; + + public Task Completion => _completion; + + public void Complete() + { + _left.Complete(); + _right.Complete(); + } + + public void Fault(Exception exception) + { + ArgumentNullException.ThrowIfNull(exception); + ((IDataflowBlock)_left).Fault(exception); + ((IDataflowBlock)_right).Fault(exception); + } + + public async ValueTask DisposeAsync() + { + if (Interlocked.Exchange(ref _disposed, 1) != 0) + return; + + Complete(); + try + { + await _completion.ConfigureAwait(false); + } + catch + { + // Completion remains the authoritative fault surface. + } + finally + { + _leftLink.Dispose(); + _rightLink.Dispose(); + await _operation.DisposeAsync().ConfigureAwait(false); + await _output.DisposeAsync().ConfigureAwait(false); + } + } + + private async Task CompleteAsync() + { + await _operation.Completion.ConfigureAwait(false); + await _output.Completion.ConfigureAwait(false); + } +} + +internal static class CanonicalRoutingInput +{ + internal static TransformBlock> Create(int capacity) + => new( + Materialize, + new ExecutionDataflowBlockOptions + { + BoundedCapacity = capacity, + EnsureOrdered = true, + MaxDegreeOfParallelism = 1 + }); + + private static FlowMessage Materialize(FlowMessage message) + { + if (message.IsError) + return message.ConvertError(); + + var materialization = FlowValueMaterializers.JsonElement.Materialize(message.Value); + return materialization.IsSuccess + ? message.ConvertValue(materialization.Value) + : message.WithError(materialization.Error!).ConvertError(); + } +} + +internal sealed class CanonicalRoutingOutput : IAsyncDisposable +{ + private readonly FlowOutput _output; + private readonly ActionBlock> _pump; + private readonly IDisposable _link; + private int _disposed; + + internal CanonicalRoutingOutput( + ISourceBlock> source, + int capacity) + { + _output = new FlowOutput( + new FlowOutputOptions { Capacity = capacity }); + _pump = new ActionBlock>( + CanonicalizeAsync, + new ExecutionDataflowBlockOptions + { + BoundedCapacity = capacity, + EnsureOrdered = true, + MaxDegreeOfParallelism = 1 + }); + _link = source.LinkTo( + _pump, + new DataflowLinkOptions { PropagateCompletion = true }); + Completion = CompleteAsync(); + } + + internal ISourceBlock Source => _output; + + internal Task Completion { get; } + + public async ValueTask DisposeAsync() + { + if (Interlocked.Exchange(ref _disposed, 1) != 0) + return; + _link.Dispose(); + await _output.DisposeAsync().ConfigureAwait(false); + } + + private async Task CanonicalizeAsync(FlowMessage message) + { + var canonical = message.IsError + ? message.ConvertError() + : message.ConvertValue(FlowValue.From(message.Value)); + if (!await _output.SendAsync(canonical).ConfigureAwait(false)) + throw new InvalidOperationException("Routing output is unavailable."); + } + + private async Task CompleteAsync() + { + try + { + await _pump.Completion.ConfigureAwait(false); + _output.Complete(); + await _output.Completion.ConfigureAwait(false); + } + catch (Exception exception) + { + _output.Fault(exception); + throw; + } + } +} diff --git a/src/FluxFlow.Components.Routing/Nodes/CorrelationNode.cs b/src/Components/Routing/FluxFlow.Components.Routing/Nodes/CorrelationNode.cs similarity index 60% rename from src/FluxFlow.Components.Routing/Nodes/CorrelationNode.cs rename to src/Components/Routing/FluxFlow.Components.Routing/Nodes/CorrelationNode.cs index 02acb88a..f76f8c92 100644 --- a/src/FluxFlow.Components.Routing/Nodes/CorrelationNode.cs +++ b/src/Components/Routing/FluxFlow.Components.Routing/Nodes/CorrelationNode.cs @@ -30,7 +30,7 @@ public CorrelationNode( public ISourceBlock>> Output => _inner.Output; - public ISourceBlock Events => _inner.Events; + public ISourceBlock Events => _inner.Events; public Task Completion => _inner.Completion; @@ -42,15 +42,42 @@ public CorrelationNode( } /// Schema-less JSON correlation node for configuration-driven workflows. -public sealed class JsonCorrelationNode : CorrelationNode +public sealed class JsonCorrelationNode : IFlowNode { + private readonly CanonicalRoutingNode> _inner; + public JsonCorrelationNode( CorrelationRoutingOptions options, Func keySelector, Func sideSelector, string? engineName = null, TimeProvider? clock = null) - : base(options, keySelector, sideSelector, engineName, clock) { + var operation = new CorrelationNode( + options, + keySelector, + sideSelector, + engineName, + clock); + _inner = new CanonicalRoutingNode>( + operation, + operation.Input, + operation.Output, + operation.Events, + options.BoundedCapacity); } + + public ITargetBlock Input => _inner.Input; + + public ISourceBlock Output => _inner.Output; + + public ISourceBlock Events => _inner.Events; + + public Task Completion => _inner.Completion; + + public void Complete() => _inner.Complete(); + + public void Fault(Exception exception) => _inner.Fault(exception); + + public ValueTask DisposeAsync() => _inner.DisposeAsync(); } diff --git a/src/FluxFlow.Components.Routing/Nodes/CorrelationNodeRuntime.cs b/src/Components/Routing/FluxFlow.Components.Routing/Nodes/CorrelationNodeRuntime.cs similarity index 100% rename from src/FluxFlow.Components.Routing/Nodes/CorrelationNodeRuntime.cs rename to src/Components/Routing/FluxFlow.Components.Routing/Nodes/CorrelationNodeRuntime.cs diff --git a/src/FluxFlow.Components.Routing/Nodes/CorrelationPendingStore.cs b/src/Components/Routing/FluxFlow.Components.Routing/Nodes/CorrelationPendingStore.cs similarity index 100% rename from src/FluxFlow.Components.Routing/Nodes/CorrelationPendingStore.cs rename to src/Components/Routing/FluxFlow.Components.Routing/Nodes/CorrelationPendingStore.cs diff --git a/src/FluxFlow.Components.Routing/Nodes/JoinNode.cs b/src/Components/Routing/FluxFlow.Components.Routing/Nodes/JoinNode.cs similarity index 58% rename from src/FluxFlow.Components.Routing/Nodes/JoinNode.cs rename to src/Components/Routing/FluxFlow.Components.Routing/Nodes/JoinNode.cs index 620d51a3..cadb1986 100644 --- a/src/FluxFlow.Components.Routing/Nodes/JoinNode.cs +++ b/src/Components/Routing/FluxFlow.Components.Routing/Nodes/JoinNode.cs @@ -32,7 +32,7 @@ public JoinNode( public ISourceBlock>> Output => _inner.Output; - public ISourceBlock Events => _inner.Events; + public ISourceBlock Events => _inner.Events; public Task Completion => _inner.Completion; @@ -44,15 +44,45 @@ public JoinNode( } /// Schema-less JSON join node for configuration-driven workflows. -public sealed class JsonJoinNode : JoinNode +public sealed class JsonJoinNode : IFlowNode { + private readonly JoinNode _operation; + private readonly CanonicalJoinRoutingNode> _inner; + public JsonJoinNode( JoinRoutingOptions options, Func leftKeySelector, Func rightKeySelector, string? engineName = null, TimeProvider? clock = null) - : base(options, leftKeySelector, rightKeySelector, engineName, clock) { + _operation = new JoinNode( + options, + leftKeySelector, + rightKeySelector, + engineName, + clock); + _inner = new CanonicalJoinRoutingNode>( + _operation, + _operation.Left, + _operation.Right, + _operation.Output, + options.BoundedCapacity); } + + public ITargetBlock Left => _inner.Left; + + public ITargetBlock Right => _inner.Right; + + public ISourceBlock Output => _inner.Output; + + public ISourceBlock Events => _operation.Events; + + public Task Completion => _inner.Completion; + + public void Complete() => _inner.Complete(); + + public void Fault(Exception exception) => _inner.Fault(exception); + + public ValueTask DisposeAsync() => _inner.DisposeAsync(); } diff --git a/src/FluxFlow.Components.Routing/Nodes/JoinNodeRuntime.cs b/src/Components/Routing/FluxFlow.Components.Routing/Nodes/JoinNodeRuntime.cs similarity index 99% rename from src/FluxFlow.Components.Routing/Nodes/JoinNodeRuntime.cs rename to src/Components/Routing/FluxFlow.Components.Routing/Nodes/JoinNodeRuntime.cs index 5b91bd9b..cefb9bf3 100644 --- a/src/FluxFlow.Components.Routing/Nodes/JoinNodeRuntime.cs +++ b/src/Components/Routing/FluxFlow.Components.Routing/Nodes/JoinNodeRuntime.cs @@ -37,7 +37,7 @@ internal sealed class JoinNodeRuntime : IFlowNode private readonly ActionBlock> _rightFeeder; private readonly ActionBlock _commands; private readonly FlowOutput>> _output; - private readonly BroadcastBlock _events; + private readonly BroadcastBlock _events; private readonly TaskCompletionSource _completion = new(TaskCreationOptions.RunContinuationsAsynchronously); @@ -89,7 +89,7 @@ public JoinNodeRuntime( _output = new FlowOutput>>( new FlowOutputOptions { Capacity = options.BoundedCapacity }); - _events = new BroadcastBlock(static value => value); + _events = new BroadcastBlock(static value => value); var executionOptions = new ExecutionDataflowBlockOptions { @@ -147,7 +147,7 @@ public JoinNodeRuntime( public ISourceBlock>> Output => _output; /// Event port — broadcast. - public ISourceBlock Events => _events; + public ISourceBlock Events => _events; public Task Completion => _completion.Task; diff --git a/src/FluxFlow.Components.Routing/Nodes/JoinPendingStore.cs b/src/Components/Routing/FluxFlow.Components.Routing/Nodes/JoinPendingStore.cs similarity index 100% rename from src/FluxFlow.Components.Routing/Nodes/JoinPendingStore.cs rename to src/Components/Routing/FluxFlow.Components.Routing/Nodes/JoinPendingStore.cs diff --git a/src/FluxFlow.Components.Routing/Nodes/WindowNode.cs b/src/Components/Routing/FluxFlow.Components.Routing/Nodes/WindowNode.cs similarity index 56% rename from src/FluxFlow.Components.Routing/Nodes/WindowNode.cs rename to src/Components/Routing/FluxFlow.Components.Routing/Nodes/WindowNode.cs index d3f4fd25..d24f4b03 100644 --- a/src/FluxFlow.Components.Routing/Nodes/WindowNode.cs +++ b/src/Components/Routing/FluxFlow.Components.Routing/Nodes/WindowNode.cs @@ -20,7 +20,7 @@ public WindowNode(WindowRoutingOptions options, TimeProvider? clock = null) public ISourceBlock>> Output => _inner.Output; - public ISourceBlock Events => _inner.Events; + public ISourceBlock Events => _inner.Events; public Task Completion => _inner.Completion; @@ -32,10 +32,32 @@ public WindowNode(WindowRoutingOptions options, TimeProvider? clock = null) } /// Schema-less JSON window node for configuration-driven workflows. -public sealed class JsonWindowNode : WindowNode +public sealed class JsonWindowNode : IFlowNode { + private readonly CanonicalRoutingNode> _inner; + public JsonWindowNode(WindowRoutingOptions options, TimeProvider? clock = null) - : base(options, clock) { + var operation = new WindowNode(options, clock); + _inner = new CanonicalRoutingNode>( + operation, + operation.Input, + operation.Output, + operation.Events, + options.BoundedCapacity); } + + public ITargetBlock Input => _inner.Input; + + public ISourceBlock Output => _inner.Output; + + public ISourceBlock Events => _inner.Events; + + public Task Completion => _inner.Completion; + + public void Complete() => _inner.Complete(); + + public void Fault(Exception exception) => _inner.Fault(exception); + + public ValueTask DisposeAsync() => _inner.DisposeAsync(); } diff --git a/src/FluxFlow.Components.Routing/Nodes/WindowNodeRuntime.cs b/src/Components/Routing/FluxFlow.Components.Routing/Nodes/WindowNodeRuntime.cs similarity index 100% rename from src/FluxFlow.Components.Routing/Nodes/WindowNodeRuntime.cs rename to src/Components/Routing/FluxFlow.Components.Routing/Nodes/WindowNodeRuntime.cs diff --git a/src/FluxFlow.Components.Routing/Options/CorrelationRoutingOptions.cs b/src/Components/Routing/FluxFlow.Components.Routing/Options/CorrelationRoutingOptions.cs similarity index 100% rename from src/FluxFlow.Components.Routing/Options/CorrelationRoutingOptions.cs rename to src/Components/Routing/FluxFlow.Components.Routing/Options/CorrelationRoutingOptions.cs diff --git a/src/FluxFlow.Components.Routing/Options/JoinRoutingOptions.cs b/src/Components/Routing/FluxFlow.Components.Routing/Options/JoinRoutingOptions.cs similarity index 100% rename from src/FluxFlow.Components.Routing/Options/JoinRoutingOptions.cs rename to src/Components/Routing/FluxFlow.Components.Routing/Options/JoinRoutingOptions.cs diff --git a/src/FluxFlow.Components.Routing/Options/WindowRoutingOptions.cs b/src/Components/Routing/FluxFlow.Components.Routing/Options/WindowRoutingOptions.cs similarity index 100% rename from src/FluxFlow.Components.Routing/Options/WindowRoutingOptions.cs rename to src/Components/Routing/FluxFlow.Components.Routing/Options/WindowRoutingOptions.cs diff --git a/src/FluxFlow.Components.Routing/README.md b/src/Components/Routing/FluxFlow.Components.Routing/README.md similarity index 100% rename from src/FluxFlow.Components.Routing/README.md rename to src/Components/Routing/FluxFlow.Components.Routing/README.md diff --git a/src/FluxFlow.Components.Routing/RoutingErrorCodeNames.cs b/src/Components/Routing/FluxFlow.Components.Routing/RoutingErrorCodeNames.cs similarity index 100% rename from src/FluxFlow.Components.Routing/RoutingErrorCodeNames.cs rename to src/Components/Routing/FluxFlow.Components.Routing/RoutingErrorCodeNames.cs diff --git a/src/FluxFlow.Components.Routing/RoutingErrorCodes.cs b/src/Components/Routing/FluxFlow.Components.Routing/RoutingErrorCodes.cs similarity index 100% rename from src/FluxFlow.Components.Routing/RoutingErrorCodes.cs rename to src/Components/Routing/FluxFlow.Components.Routing/RoutingErrorCodes.cs diff --git a/src/FluxFlow.Components.Routing/RoutingResultKinds.cs b/src/Components/Routing/FluxFlow.Components.Routing/RoutingResultKinds.cs similarity index 100% rename from src/FluxFlow.Components.Routing/RoutingResultKinds.cs rename to src/Components/Routing/FluxFlow.Components.Routing/RoutingResultKinds.cs diff --git a/src/Components/Serialization/FluxFlow.Components.Serialization.Composition/CompatibilitySuppressions.xml b/src/Components/Serialization/FluxFlow.Components.Serialization.Composition/CompatibilitySuppressions.xml new file mode 100644 index 00000000..c229a85b --- /dev/null +++ b/src/Components/Serialization/FluxFlow.Components.Serialization.Composition/CompatibilitySuppressions.xml @@ -0,0 +1,342 @@ + + + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddBase64Decode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.String,FluxFlow.Data.FlowContent}@) + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddBase64Decode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.String,FluxFlow.Data.FlowContent}@) + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddBase64Decode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder}) + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddBase64Encode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Data.FlowContent,System.String}@) + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddBase64Encode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Data.FlowContent,System.String}@) + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddBase64Encode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder}) + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddJsonParse(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Data.FlowContent,System.Text.Json.JsonElement}@) + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddJsonParse(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Data.FlowContent,System.Text.Json.JsonElement}@) + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddJsonParse(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder}) + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddJsonStringify(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,FluxFlow.Data.FlowContent}@) + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddJsonStringify(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,FluxFlow.Data.FlowContent}@) + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddJsonStringify(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder}) + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddTextDecode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Data.FlowContent,System.String}@) + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddTextDecode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Data.FlowContent,System.String}@) + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddTextDecode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder}) + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddTextEncode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.String,FluxFlow.Data.FlowContent}@) + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddTextEncode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.String,FluxFlow.Data.FlowContent}@) + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddTextEncode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder}) + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationComponents.get_Base64Decode + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationComponents.get_Base64Encode + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationComponents.get_JsonParse + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationComponents.get_JsonStringify + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationComponents.get_TextDecode + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationComponents.get_TextEncode + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + lib/net10.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddBase64Decode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.String,FluxFlow.Data.FlowContent}@) + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddBase64Decode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.String,FluxFlow.Data.FlowContent}@) + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddBase64Decode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder}) + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddBase64Encode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Data.FlowContent,System.String}@) + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddBase64Encode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Data.FlowContent,System.String}@) + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddBase64Encode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder}) + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddJsonParse(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Data.FlowContent,System.Text.Json.JsonElement}@) + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddJsonParse(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Data.FlowContent,System.Text.Json.JsonElement}@) + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddJsonParse(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder}) + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddJsonStringify(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,FluxFlow.Data.FlowContent}@) + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddJsonStringify(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,FluxFlow.Data.FlowContent}@) + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddJsonStringify(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder}) + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddTextDecode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Data.FlowContent,System.String}@) + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddTextDecode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Data.FlowContent,System.String}@) + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddTextDecode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder}) + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddTextEncode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.String,FluxFlow.Data.FlowContent}@) + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddTextEncode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.String,FluxFlow.Data.FlowContent}@) + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationAuthoringExtensions.AddTextEncode(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Serialization.Composition.SerializationComponentBuilder}) + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationComponents.get_Base64Decode + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationComponents.get_Base64Encode + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationComponents.get_JsonParse + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationComponents.get_JsonStringify + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationComponents.get_TextDecode + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Composition.SerializationComponents.get_TextEncode + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + lib/net8.0/FluxFlow.Components.Serialization.Composition.dll + true + + diff --git a/src/FluxFlow.Components.Serialization.Composition/FluxFlow.Components.Serialization.Composition.csproj b/src/Components/Serialization/FluxFlow.Components.Serialization.Composition/FluxFlow.Components.Serialization.Composition.csproj similarity index 63% rename from src/FluxFlow.Components.Serialization.Composition/FluxFlow.Components.Serialization.Composition.csproj rename to src/Components/Serialization/FluxFlow.Components.Serialization.Composition/FluxFlow.Components.Serialization.Composition.csproj index 7433f489..711aa6c4 100644 --- a/src/FluxFlow.Components.Serialization.Composition/FluxFlow.Components.Serialization.Composition.csproj +++ b/src/Components/Serialization/FluxFlow.Components.Serialization.Composition/FluxFlow.Components.Serialization.Composition.csproj @@ -5,17 +5,17 @@ FluxFlow.Components.Serialization.Composition FluxFlow.Components.Serialization.Composition FluxFlow.Components.Serialization.Composition - 6.0.0-rc.1 + 7.0.0-rc.1 FluxFlow.Composition registration and Designer metadata for explicit FlowContent, JSON, text, and Base64 conversions. workflow;dataflow;components;serialization;composition README.md - Registers exact serialization descriptors and Designer metadata through the flat designed-component API; keeps constants under SerializationComponentDefinition and removes its metadata-only factory without changing runtime behavior. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. - - + + diff --git a/src/FluxFlow.Components.Serialization.Composition/README.md b/src/Components/Serialization/FluxFlow.Components.Serialization.Composition/README.md similarity index 100% rename from src/FluxFlow.Components.Serialization.Composition/README.md rename to src/Components/Serialization/FluxFlow.Components.Serialization.Composition/README.md diff --git a/src/FluxFlow.Components.Serialization.Composition/SerializationAuthoringExtensions.cs b/src/Components/Serialization/FluxFlow.Components.Serialization.Composition/SerializationAuthoringExtensions.cs similarity index 79% rename from src/FluxFlow.Components.Serialization.Composition/SerializationAuthoringExtensions.cs rename to src/Components/Serialization/FluxFlow.Components.Serialization.Composition/SerializationAuthoringExtensions.cs index afadab06..cc9f6792 100644 --- a/src/FluxFlow.Components.Serialization.Composition/SerializationAuthoringExtensions.cs +++ b/src/Components/Serialization/FluxFlow.Components.Serialization.Composition/SerializationAuthoringExtensions.cs @@ -7,25 +7,25 @@ namespace FluxFlow.Components.Serialization.Composition; public static class SerializationComponents { - public static ComponentContract> JsonParse { get; } = + public static ComponentContract> JsonParse { get; } = Create(SerializationComponentDefinition.Types.JsonParse, SerializationServiceCollectionExtensions.ConfigureJsonParse); - public static ComponentContract> JsonStringify { get; } = + public static ComponentContract> JsonStringify { get; } = Create(SerializationComponentDefinition.Types.JsonStringify, SerializationServiceCollectionExtensions.ConfigureJsonStringify); - public static ComponentContract> TextEncode { get; } = + public static ComponentContract> TextEncode { get; } = Create(SerializationComponentDefinition.Types.TextEncode, SerializationServiceCollectionExtensions.ConfigureTextEncode); - public static ComponentContract> TextDecode { get; } = + public static ComponentContract> TextDecode { get; } = Create(SerializationComponentDefinition.Types.TextDecode, SerializationServiceCollectionExtensions.ConfigureTextDecode); - public static ComponentContract> Base64Encode { get; } = + public static ComponentContract> Base64Encode { get; } = Create(SerializationComponentDefinition.Types.Base64Encode, SerializationServiceCollectionExtensions.ConfigureBase64Encode); - public static ComponentContract> Base64Decode { get; } = + public static ComponentContract> Base64Decode { get; } = Create(SerializationComponentDefinition.Types.Base64Decode, SerializationServiceCollectionExtensions.ConfigureBase64Decode); - private static ComponentContract> Create( + private static ComponentContract> Create( string type, Action configure) => DesignedComponentContract.Create( @@ -33,12 +33,12 @@ private static ComponentContract new SerializationComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new InputOutputComponentHandle(component, SerializationComponentDefinition.Ports.Input, SerializationComponentDefinition.Ports.Output, SerializationComponentDefinition.Ports.Events)); + static component => new InputOutputComponentHandle(component, SerializationComponentDefinition.Ports.Input, SerializationComponentDefinition.Ports.Output, SerializationComponentDefinition.Ports.Events)); } public static class SerializationAuthoringExtensions { - public static InputOutputComponentHandle AddJsonParse( + public static InputOutputComponentHandle AddJsonParse( this WorkflowDefinitionBuilder workflow, string name, Action? configure = null) @@ -47,7 +47,7 @@ public static InputOutputComponentHandle AddJsonParse( public static WorkflowDefinitionBuilder AddJsonParse( this WorkflowDefinitionBuilder workflow, string name, - out InputOutputComponentHandle parser) + out InputOutputComponentHandle parser) { parser = workflow.AddJsonParse(name); return workflow; @@ -57,14 +57,14 @@ public static WorkflowDefinitionBuilder AddJsonParse( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle parser) + out InputOutputComponentHandle parser) { ArgumentNullException.ThrowIfNull(configure); parser = workflow.AddJsonParse(name, configure); return workflow; } - public static InputOutputComponentHandle AddJsonStringify( + public static InputOutputComponentHandle AddJsonStringify( this WorkflowDefinitionBuilder workflow, string name, Action? configure = null) @@ -73,7 +73,7 @@ public static InputOutputComponentHandle AddJsonString public static WorkflowDefinitionBuilder AddJsonStringify( this WorkflowDefinitionBuilder workflow, string name, - out InputOutputComponentHandle stringify) + out InputOutputComponentHandle stringify) { stringify = workflow.AddJsonStringify(name); return workflow; @@ -83,14 +83,14 @@ public static WorkflowDefinitionBuilder AddJsonStringify( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle stringify) + out InputOutputComponentHandle stringify) { ArgumentNullException.ThrowIfNull(configure); stringify = workflow.AddJsonStringify(name, configure); return workflow; } - public static InputOutputComponentHandle AddTextEncode( + public static InputOutputComponentHandle AddTextEncode( this WorkflowDefinitionBuilder workflow, string name, Action? configure = null) @@ -99,7 +99,7 @@ public static InputOutputComponentHandle AddTextEncode( public static WorkflowDefinitionBuilder AddTextEncode( this WorkflowDefinitionBuilder workflow, string name, - out InputOutputComponentHandle encoder) + out InputOutputComponentHandle encoder) { encoder = workflow.AddTextEncode(name); return workflow; @@ -109,14 +109,14 @@ public static WorkflowDefinitionBuilder AddTextEncode( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle encoder) + out InputOutputComponentHandle encoder) { ArgumentNullException.ThrowIfNull(configure); encoder = workflow.AddTextEncode(name, configure); return workflow; } - public static InputOutputComponentHandle AddTextDecode( + public static InputOutputComponentHandle AddTextDecode( this WorkflowDefinitionBuilder workflow, string name, Action? configure = null) @@ -125,7 +125,7 @@ public static InputOutputComponentHandle AddTextDecode( public static WorkflowDefinitionBuilder AddTextDecode( this WorkflowDefinitionBuilder workflow, string name, - out InputOutputComponentHandle decoder) + out InputOutputComponentHandle decoder) { decoder = workflow.AddTextDecode(name); return workflow; @@ -135,14 +135,14 @@ public static WorkflowDefinitionBuilder AddTextDecode( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle decoder) + out InputOutputComponentHandle decoder) { ArgumentNullException.ThrowIfNull(configure); decoder = workflow.AddTextDecode(name, configure); return workflow; } - public static InputOutputComponentHandle AddBase64Encode( + public static InputOutputComponentHandle AddBase64Encode( this WorkflowDefinitionBuilder workflow, string name, Action? configure = null) @@ -151,7 +151,7 @@ public static InputOutputComponentHandle AddBase64Encode( public static WorkflowDefinitionBuilder AddBase64Encode( this WorkflowDefinitionBuilder workflow, string name, - out InputOutputComponentHandle encoder) + out InputOutputComponentHandle encoder) { encoder = workflow.AddBase64Encode(name); return workflow; @@ -161,14 +161,14 @@ public static WorkflowDefinitionBuilder AddBase64Encode( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle encoder) + out InputOutputComponentHandle encoder) { ArgumentNullException.ThrowIfNull(configure); encoder = workflow.AddBase64Encode(name, configure); return workflow; } - public static InputOutputComponentHandle AddBase64Decode( + public static InputOutputComponentHandle AddBase64Decode( this WorkflowDefinitionBuilder workflow, string name, Action? configure = null) @@ -177,7 +177,7 @@ public static InputOutputComponentHandle AddBase64Decode( public static WorkflowDefinitionBuilder AddBase64Decode( this WorkflowDefinitionBuilder workflow, string name, - out InputOutputComponentHandle decoder) + out InputOutputComponentHandle decoder) { decoder = workflow.AddBase64Decode(name); return workflow; @@ -187,7 +187,7 @@ public static WorkflowDefinitionBuilder AddBase64Decode( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle decoder) + out InputOutputComponentHandle decoder) { ArgumentNullException.ThrowIfNull(configure); decoder = workflow.AddBase64Decode(name, configure); diff --git a/src/FluxFlow.Components.Serialization.Composition/SerializationComponentDefinition.cs b/src/Components/Serialization/FluxFlow.Components.Serialization.Composition/SerializationComponentDefinition.cs similarity index 100% rename from src/FluxFlow.Components.Serialization.Composition/SerializationComponentDefinition.cs rename to src/Components/Serialization/FluxFlow.Components.Serialization.Composition/SerializationComponentDefinition.cs diff --git a/src/FluxFlow.Components.Serialization.Composition/SerializationServiceCollectionExtensions.cs b/src/Components/Serialization/FluxFlow.Components.Serialization.Composition/SerializationServiceCollectionExtensions.cs similarity index 77% rename from src/FluxFlow.Components.Serialization.Composition/SerializationServiceCollectionExtensions.cs rename to src/Components/Serialization/FluxFlow.Components.Serialization.Composition/SerializationServiceCollectionExtensions.cs index a14c801d..ebbd590d 100644 --- a/src/FluxFlow.Components.Serialization.Composition/SerializationServiceCollectionExtensions.cs +++ b/src/Components/Serialization/FluxFlow.Components.Serialization.Composition/SerializationServiceCollectionExtensions.cs @@ -5,6 +5,7 @@ using FluxFlow.Components.Serialization.Options; using FluxFlow.Composition; using FluxFlow.Data; +using FluxFlow.Nodes; namespace FluxFlow.Components.Serialization.Composition; @@ -26,8 +27,8 @@ internal static void ConfigureJsonParse(ComponentRegistrationBuilder component) { ConfigureCommon(component, "JSON Parse", "Parses JSON content into an independently owned JSON value.", "braces", "parse"); component.UseFactory(CreateJsonParseNode) - .HasInput(SerializationComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Canonical conversion input.", true) - .HasOutput(SerializationComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Converted value; conversion failures use the message error case.", true) + .HasFlowValueInput(SerializationComponentDefinition.Ports.Input, static node => node.Input, FlowValueMaterializers.Content.InputShape, "Input", "Messages", 0, "Canonical conversion input.", true) + .HasFlowValueOutput(SerializationComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Converted value; conversion failures use the message error case.", true) .HasEvents(SerializationComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort serialization diagnostics."); } @@ -35,8 +36,8 @@ internal static void ConfigureJsonStringify(ComponentRegistrationBuilder compone { ConfigureCommon(component, "JSON Stringify", "Serializes a JSON value into exact JSON content.", "file-json", "stringify"); component.UseFactory(CreateJsonStringifyNode) - .HasInput(SerializationComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Canonical conversion input.", true) - .HasOutput(SerializationComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Converted value; conversion failures use the message error case.", true) + .HasFlowValueInput(SerializationComponentDefinition.Ports.Input, static node => node.Input, FlowValueMaterializers.JsonElement.InputShape, "Input", "Messages", 0, "Canonical conversion input.", true) + .HasFlowValueOutput(SerializationComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Converted value; conversion failures use the message error case.", true) .HasEvents(SerializationComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort serialization diagnostics."); } @@ -44,8 +45,8 @@ internal static void ConfigureTextEncode(ComponentRegistrationBuilder component) { ConfigureCommon(component, "Text Encode", "Encodes a string into exact text content.", "binary", "encode"); component.UseFactory(CreateTextEncodeNode) - .HasInput(SerializationComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Canonical conversion input.", true) - .HasOutput(SerializationComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Converted value; conversion failures use the message error case.", true) + .HasFlowValueInput(SerializationComponentDefinition.Ports.Input, static node => node.Input, FlowValueMaterializers.String.InputShape, "Input", "Messages", 0, "Canonical conversion input.", true) + .HasFlowValueOutput(SerializationComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Converted value; conversion failures use the message error case.", true) .HasEvents(SerializationComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort serialization diagnostics."); } @@ -53,8 +54,8 @@ internal static void ConfigureTextDecode(ComponentRegistrationBuilder component) { ConfigureCommon(component, "Text Decode", "Decodes text content into a string.", "letter-text", "decode"); component.UseFactory(CreateTextDecodeNode) - .HasInput(SerializationComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Canonical conversion input.", true) - .HasOutput(SerializationComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Converted value; conversion failures use the message error case.", true) + .HasFlowValueInput(SerializationComponentDefinition.Ports.Input, static node => node.Input, FlowValueMaterializers.Content.InputShape, "Input", "Messages", 0, "Canonical conversion input.", true) + .HasFlowValueOutput(SerializationComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Converted value; conversion failures use the message error case.", true) .HasEvents(SerializationComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort serialization diagnostics."); } @@ -62,8 +63,8 @@ internal static void ConfigureBase64Encode(ComponentRegistrationBuilder componen { ConfigureCommon(component, "Base64 Encode", "Encodes exact content bytes into a Base64 string value.", "file-up", "base64Encode"); component.UseFactory(CreateBase64EncodeNode) - .HasInput(SerializationComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Canonical conversion input.", true) - .HasOutput(SerializationComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Converted value; conversion failures use the message error case.", true) + .HasFlowValueInput(SerializationComponentDefinition.Ports.Input, static node => node.Input, FlowValueMaterializers.Content.InputShape, "Input", "Messages", 0, "Canonical conversion input.", true) + .HasFlowValueOutput(SerializationComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Converted value; conversion failures use the message error case.", true) .HasEvents(SerializationComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort serialization diagnostics."); } @@ -71,8 +72,8 @@ internal static void ConfigureBase64Decode(ComponentRegistrationBuilder componen { ConfigureCommon(component, "Base64 Decode", "Decodes a Base64 string value into binary content.", "file-down", "base64Decode"); component.UseFactory(CreateBase64DecodeNode) - .HasInput(SerializationComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Canonical conversion input.", true) - .HasOutput(SerializationComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Converted value; conversion failures use the message error case.", true) + .HasFlowValueInput(SerializationComponentDefinition.Ports.Input, static node => node.Input, FlowValueMaterializers.String.InputShape, "Input", "Messages", 0, "Canonical conversion input.", true) + .HasFlowValueOutput(SerializationComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Converted value; conversion failures use the message error case.", true) .HasEvents(SerializationComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort serialization diagnostics."); } diff --git a/src/Components/Serialization/FluxFlow.Components.Serialization/CompatibilitySuppressions.xml b/src/Components/Serialization/FluxFlow.Components.Serialization/CompatibilitySuppressions.xml new file mode 100644 index 00000000..46b48aed --- /dev/null +++ b/src/Components/Serialization/FluxFlow.Components.Serialization/CompatibilitySuppressions.xml @@ -0,0 +1,258 @@ + + + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.Base64DecodeNode.get_Events + lib/net10.0/FluxFlow.Components.Serialization.dll + lib/net10.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.Base64DecodeNode.get_Input + lib/net10.0/FluxFlow.Components.Serialization.dll + lib/net10.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.Base64DecodeNode.get_Output + lib/net10.0/FluxFlow.Components.Serialization.dll + lib/net10.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.Base64EncodeNode.get_Events + lib/net10.0/FluxFlow.Components.Serialization.dll + lib/net10.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.Base64EncodeNode.get_Input + lib/net10.0/FluxFlow.Components.Serialization.dll + lib/net10.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.Base64EncodeNode.get_Output + lib/net10.0/FluxFlow.Components.Serialization.dll + lib/net10.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.JsonParseNode.get_Events + lib/net10.0/FluxFlow.Components.Serialization.dll + lib/net10.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.JsonParseNode.get_Input + lib/net10.0/FluxFlow.Components.Serialization.dll + lib/net10.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.JsonParseNode.get_Output + lib/net10.0/FluxFlow.Components.Serialization.dll + lib/net10.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.JsonStringifyNode.get_Events + lib/net10.0/FluxFlow.Components.Serialization.dll + lib/net10.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.JsonStringifyNode.get_Input + lib/net10.0/FluxFlow.Components.Serialization.dll + lib/net10.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.JsonStringifyNode.get_Output + lib/net10.0/FluxFlow.Components.Serialization.dll + lib/net10.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.TextDecodeNode.get_Events + lib/net10.0/FluxFlow.Components.Serialization.dll + lib/net10.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.TextDecodeNode.get_Input + lib/net10.0/FluxFlow.Components.Serialization.dll + lib/net10.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.TextDecodeNode.get_Output + lib/net10.0/FluxFlow.Components.Serialization.dll + lib/net10.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.TextEncodeNode.get_Events + lib/net10.0/FluxFlow.Components.Serialization.dll + lib/net10.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.TextEncodeNode.get_Input + lib/net10.0/FluxFlow.Components.Serialization.dll + lib/net10.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.TextEncodeNode.get_Output + lib/net10.0/FluxFlow.Components.Serialization.dll + lib/net10.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.Base64DecodeNode.get_Events + lib/net8.0/FluxFlow.Components.Serialization.dll + lib/net8.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.Base64DecodeNode.get_Input + lib/net8.0/FluxFlow.Components.Serialization.dll + lib/net8.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.Base64DecodeNode.get_Output + lib/net8.0/FluxFlow.Components.Serialization.dll + lib/net8.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.Base64EncodeNode.get_Events + lib/net8.0/FluxFlow.Components.Serialization.dll + lib/net8.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.Base64EncodeNode.get_Input + lib/net8.0/FluxFlow.Components.Serialization.dll + lib/net8.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.Base64EncodeNode.get_Output + lib/net8.0/FluxFlow.Components.Serialization.dll + lib/net8.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.JsonParseNode.get_Events + lib/net8.0/FluxFlow.Components.Serialization.dll + lib/net8.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.JsonParseNode.get_Input + lib/net8.0/FluxFlow.Components.Serialization.dll + lib/net8.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.JsonParseNode.get_Output + lib/net8.0/FluxFlow.Components.Serialization.dll + lib/net8.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.JsonStringifyNode.get_Events + lib/net8.0/FluxFlow.Components.Serialization.dll + lib/net8.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.JsonStringifyNode.get_Input + lib/net8.0/FluxFlow.Components.Serialization.dll + lib/net8.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.JsonStringifyNode.get_Output + lib/net8.0/FluxFlow.Components.Serialization.dll + lib/net8.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.TextDecodeNode.get_Events + lib/net8.0/FluxFlow.Components.Serialization.dll + lib/net8.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.TextDecodeNode.get_Input + lib/net8.0/FluxFlow.Components.Serialization.dll + lib/net8.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.TextDecodeNode.get_Output + lib/net8.0/FluxFlow.Components.Serialization.dll + lib/net8.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.TextEncodeNode.get_Events + lib/net8.0/FluxFlow.Components.Serialization.dll + lib/net8.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.TextEncodeNode.get_Input + lib/net8.0/FluxFlow.Components.Serialization.dll + lib/net8.0/FluxFlow.Components.Serialization.dll + true + + + CP0002 + M:FluxFlow.Components.Serialization.Nodes.TextEncodeNode.get_Output + lib/net8.0/FluxFlow.Components.Serialization.dll + lib/net8.0/FluxFlow.Components.Serialization.dll + true + + diff --git a/src/FluxFlow.Components.Serialization/Diagnostics/SerializationDiagnosticNames.cs b/src/Components/Serialization/FluxFlow.Components.Serialization/Diagnostics/SerializationDiagnosticNames.cs similarity index 100% rename from src/FluxFlow.Components.Serialization/Diagnostics/SerializationDiagnosticNames.cs rename to src/Components/Serialization/FluxFlow.Components.Serialization/Diagnostics/SerializationDiagnosticNames.cs diff --git a/src/FluxFlow.Components.Serialization/FluxFlow.Components.Serialization.csproj b/src/Components/Serialization/FluxFlow.Components.Serialization/FluxFlow.Components.Serialization.csproj similarity index 68% rename from src/FluxFlow.Components.Serialization/FluxFlow.Components.Serialization.csproj rename to src/Components/Serialization/FluxFlow.Components.Serialization/FluxFlow.Components.Serialization.csproj index 7e715c14..3650ca43 100644 --- a/src/FluxFlow.Components.Serialization/FluxFlow.Components.Serialization.csproj +++ b/src/Components/Serialization/FluxFlow.Components.Serialization/FluxFlow.Components.Serialization.csproj @@ -4,14 +4,14 @@ FluxFlow.Components.Serialization FluxFlow.Components.Serialization FluxFlow.Components.Serialization - 6.0.0 + 7.0.0-rc.1 Standalone explicit conversions among FlowContent, JSON, text, Base64, and typed workflow values, with value-or-error outputs and component events. No engine required. workflow;dataflow;components;serialization;json;base64;text - Migrates component inputs and outputs to typed FlowMessage<T> value-or-error contracts, removes universal FlowValue or FlowResult coupling, and keeps errors on the normal output. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md - + diff --git a/src/FluxFlow.Components.Serialization/Nodes/Base64DecodeNode.cs b/src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/Base64DecodeNode.cs similarity index 84% rename from src/FluxFlow.Components.Serialization/Nodes/Base64DecodeNode.cs rename to src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/Base64DecodeNode.cs index c0e3e1a2..b330ceb0 100644 --- a/src/FluxFlow.Components.Serialization/Nodes/Base64DecodeNode.cs +++ b/src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/Base64DecodeNode.cs @@ -23,15 +23,16 @@ public Base64DecodeNode( SerializationResultKinds.Base64DecodeFailed, SerializationDiagnosticNames.Base64Decoded, SerializationDiagnosticNames.Base64DecodeFailed, + FlowValueMaterializers.String, static settings => value => SerializationConverters.DecodeBase64(value, settings), clock); - public ITargetBlock> Input => _pipeline.Input; + public ITargetBlock Input => _pipeline.Input; - public ISourceBlock> Output => _pipeline.Output; + public ISourceBlock Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; diff --git a/src/FluxFlow.Components.Serialization/Nodes/Base64EncodeNode.cs b/src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/Base64EncodeNode.cs similarity index 84% rename from src/FluxFlow.Components.Serialization/Nodes/Base64EncodeNode.cs rename to src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/Base64EncodeNode.cs index afefba5a..2845d4fa 100644 --- a/src/FluxFlow.Components.Serialization/Nodes/Base64EncodeNode.cs +++ b/src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/Base64EncodeNode.cs @@ -23,15 +23,16 @@ public Base64EncodeNode( SerializationResultKinds.Base64EncodeFailed, SerializationDiagnosticNames.Base64Encoded, SerializationDiagnosticNames.Base64EncodeFailed, + FlowValueMaterializers.Content, static settings => content => SerializationConverters.EncodeBase64(content, settings), clock); - public ITargetBlock> Input => _pipeline.Input; + public ITargetBlock Input => _pipeline.Input; - public ISourceBlock> Output => _pipeline.Output; + public ISourceBlock Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; diff --git a/src/FluxFlow.Components.Serialization/Nodes/JsonParseNode.cs b/src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/JsonParseNode.cs similarity index 84% rename from src/FluxFlow.Components.Serialization/Nodes/JsonParseNode.cs rename to src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/JsonParseNode.cs index 06702de3..3fe2b7af 100644 --- a/src/FluxFlow.Components.Serialization/Nodes/JsonParseNode.cs +++ b/src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/JsonParseNode.cs @@ -24,14 +24,15 @@ public JsonParseNode( SerializationResultKinds.JsonParseFailed, SerializationDiagnosticNames.JsonParsed, SerializationDiagnosticNames.JsonParseFailed, + FlowValueMaterializers.Content, static settings => content => SerializationConverters.ParseJson(content, settings), clock); - public ITargetBlock> Input => _pipeline.Input; + public ITargetBlock Input => _pipeline.Input; - public ISourceBlock> Output => _pipeline.Output; + public ISourceBlock Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; diff --git a/src/FluxFlow.Components.Serialization/Nodes/JsonStringifyNode.cs b/src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/JsonStringifyNode.cs similarity index 84% rename from src/FluxFlow.Components.Serialization/Nodes/JsonStringifyNode.cs rename to src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/JsonStringifyNode.cs index a714291b..aea93cbb 100644 --- a/src/FluxFlow.Components.Serialization/Nodes/JsonStringifyNode.cs +++ b/src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/JsonStringifyNode.cs @@ -24,15 +24,16 @@ public JsonStringifyNode( SerializationResultKinds.JsonStringifyFailed, SerializationDiagnosticNames.JsonStringified, SerializationDiagnosticNames.JsonStringifyFailed, + FlowValueMaterializers.JsonElement, static settings => value => SerializationConverters.StringifyJson(value, settings), clock); - public ITargetBlock> Input => _pipeline.Input; + public ITargetBlock Input => _pipeline.Input; - public ISourceBlock> Output => _pipeline.Output; + public ISourceBlock Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; diff --git a/src/FluxFlow.Components.Serialization/Nodes/SerializationConverters.cs b/src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/SerializationConverters.cs similarity index 100% rename from src/FluxFlow.Components.Serialization/Nodes/SerializationConverters.cs rename to src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/SerializationConverters.cs diff --git a/src/FluxFlow.Components.Serialization/Nodes/SerializationFailureException.cs b/src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/SerializationFailureException.cs similarity index 100% rename from src/FluxFlow.Components.Serialization/Nodes/SerializationFailureException.cs rename to src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/SerializationFailureException.cs diff --git a/src/FluxFlow.Components.Serialization/Nodes/SerializationPipeline.cs b/src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/SerializationPipeline.cs similarity index 81% rename from src/FluxFlow.Components.Serialization/Nodes/SerializationPipeline.cs rename to src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/SerializationPipeline.cs index 3555b257..bb374d72 100644 --- a/src/FluxFlow.Components.Serialization/Nodes/SerializationPipeline.cs +++ b/src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/SerializationPipeline.cs @@ -7,7 +7,7 @@ namespace FluxFlow.Components.Serialization.Nodes; -internal sealed class SerializationPipeline : FlowNode +internal sealed class SerializationPipeline : FlowNode { private readonly string _nodeType; private readonly string _successKind; @@ -15,6 +15,7 @@ internal sealed class SerializationPipeline : FlowNode _materializer; private readonly Func _convert; internal SerializationPipeline( string nodeType, @@ -23,6 +24,7 @@ internal SerializationPipeline( string failureKind, string successEventName, string failureEventName, + IFlowValueMaterializer materializer, Func> converterFactory, TimeProvider? clock) : base(CreateNodeOptions(options ?? new SerializationNodeOptions(), nodeType)) @@ -32,6 +34,7 @@ internal SerializationPipeline( ArgumentException.ThrowIfNullOrWhiteSpace(failureKind); ArgumentException.ThrowIfNullOrWhiteSpace(successEventName); ArgumentException.ThrowIfNullOrWhiteSpace(failureEventName); + ArgumentNullException.ThrowIfNull(materializer); ArgumentNullException.ThrowIfNull(converterFactory); _nodeType = nodeType; @@ -40,6 +43,7 @@ internal SerializationPipeline( _failureKind = failureKind; _successEventName = successEventName; _failureEventName = failureEventName; + _materializer = materializer; _convert = converterFactory(Options); _clock = clock ?? TimeProvider.System; } @@ -48,27 +52,36 @@ internal SerializationPipeline( protected override bool HandlesErrors => true; - protected override async Task ProcessAsync(FlowMessage message) + protected override async Task ProcessAsync(FlowMessage message) => await EmitAsync(Process(message), Stopping).ConfigureAwait(false); - private FlowMessage Process(FlowMessage message) + private FlowMessage Process(FlowMessage message) { ArgumentNullException.ThrowIfNull(message); if (message.IsError) - return message.WithError(message.Error!); + return message.WithError(message.Error!); var timestamp = _clock.GetUtcNow(); + var materialization = _materializer.Materialize(message.Value); + if (!materialization.IsSuccess) + { + var error = materialization.Error!; + PublishEvent( + message, + timestamp, + $"{_nodeType}.rejected", + FlowEventLevel.Warning, + error.Message, + _failureKind, + isError: true, + errorCode: error.Code, + message.Value.ToJsonElement().ValueKind.ToString()); + return message.WithError(error); + } try { - if (message.Value is null) - { - throw new SerializationFailureException( - SerializationErrorCodeNames.MissingInput, - $"{_nodeType} requires input."); - } - - var value = _convert(message.Value); + var value = _convert(materialization.Value); PublishEvent( message, timestamp, @@ -77,8 +90,9 @@ private FlowMessage Process(FlowMessage message) $"{_nodeType} converted input.", _successKind, isError: false, - errorCode: null); - return message.With(value); + errorCode: null, + DescribeInputKind(materialization.Value)); + return message.With(FlowValue.From(value)); } catch (SerializationFailureException exception) { @@ -87,7 +101,7 @@ private FlowMessage Process(FlowMessage message) $"{_nodeType} failed: {exception.Message}", category: "Serialization", isTransient: false, - details: CreateErrorDetails(message.Value, exception)); + details: CreateErrorDetails(materialization.Value, exception)); PublishEvent( message, timestamp, @@ -96,27 +110,29 @@ private FlowMessage Process(FlowMessage message) error.Message, _failureKind, isError: true, - errorCode: exception.Code); - return message.WithError(error); + errorCode: exception.Code, + DescribeInputKind(materialization.Value)); + return message.WithError(error); } } private void PublishEvent( - FlowMessage message, + FlowMessage message, DateTimeOffset timestamp, string name, FlowEventLevel level, string text, string resultKind, bool isError, - string? errorCode) + string? errorCode, + string inputKind) { var attributes = new Dictionary(StringComparer.Ordinal) { ["nodeType"] = _nodeType, ["resultKind"] = resultKind, ["isError"] = isError, - ["inputKind"] = DescribeInputKind(message.Value) + ["inputKind"] = inputKind }; if (errorCode is not null) attributes["errorCode"] = errorCode; diff --git a/src/FluxFlow.Components.Serialization/Nodes/TextDecodeNode.cs b/src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/TextDecodeNode.cs similarity index 83% rename from src/FluxFlow.Components.Serialization/Nodes/TextDecodeNode.cs rename to src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/TextDecodeNode.cs index 609b6cf1..c9d612c7 100644 --- a/src/FluxFlow.Components.Serialization/Nodes/TextDecodeNode.cs +++ b/src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/TextDecodeNode.cs @@ -23,14 +23,15 @@ public TextDecodeNode( SerializationResultKinds.TextDecodeFailed, SerializationDiagnosticNames.TextDecoded, SerializationDiagnosticNames.TextDecodeFailed, + FlowValueMaterializers.Content, static settings => content => SerializationConverters.DecodeText(content, settings), clock); - public ITargetBlock> Input => _pipeline.Input; + public ITargetBlock Input => _pipeline.Input; - public ISourceBlock> Output => _pipeline.Output; + public ISourceBlock Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; diff --git a/src/FluxFlow.Components.Serialization/Nodes/TextEncodeNode.cs b/src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/TextEncodeNode.cs similarity index 84% rename from src/FluxFlow.Components.Serialization/Nodes/TextEncodeNode.cs rename to src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/TextEncodeNode.cs index cabd5243..4dc45efd 100644 --- a/src/FluxFlow.Components.Serialization/Nodes/TextEncodeNode.cs +++ b/src/Components/Serialization/FluxFlow.Components.Serialization/Nodes/TextEncodeNode.cs @@ -23,15 +23,16 @@ public TextEncodeNode( SerializationResultKinds.TextEncodeFailed, SerializationDiagnosticNames.TextEncoded, SerializationDiagnosticNames.TextEncodeFailed, + FlowValueMaterializers.String, static settings => value => SerializationConverters.EncodeText(value, settings), clock); - public ITargetBlock> Input => _pipeline.Input; + public ITargetBlock Input => _pipeline.Input; - public ISourceBlock> Output => _pipeline.Output; + public ISourceBlock Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; diff --git a/src/FluxFlow.Components.Serialization/Options/SerializationNodeOptions.cs b/src/Components/Serialization/FluxFlow.Components.Serialization/Options/SerializationNodeOptions.cs similarity index 100% rename from src/FluxFlow.Components.Serialization/Options/SerializationNodeOptions.cs rename to src/Components/Serialization/FluxFlow.Components.Serialization/Options/SerializationNodeOptions.cs diff --git a/src/FluxFlow.Components.Serialization/README.md b/src/Components/Serialization/FluxFlow.Components.Serialization/README.md similarity index 100% rename from src/FluxFlow.Components.Serialization/README.md rename to src/Components/Serialization/FluxFlow.Components.Serialization/README.md diff --git a/src/FluxFlow.Components.Serialization/SerializationErrorCodeNames.cs b/src/Components/Serialization/FluxFlow.Components.Serialization/SerializationErrorCodeNames.cs similarity index 100% rename from src/FluxFlow.Components.Serialization/SerializationErrorCodeNames.cs rename to src/Components/Serialization/FluxFlow.Components.Serialization/SerializationErrorCodeNames.cs diff --git a/src/FluxFlow.Components.Serialization/SerializationResultKinds.cs b/src/Components/Serialization/FluxFlow.Components.Serialization/SerializationResultKinds.cs similarity index 100% rename from src/FluxFlow.Components.Serialization/SerializationResultKinds.cs rename to src/Components/Serialization/FluxFlow.Components.Serialization/SerializationResultKinds.cs diff --git a/src/Components/Sessions/FluxFlow.Components.Sessions.Composition/CompatibilitySuppressions.xml b/src/Components/Sessions/FluxFlow.Components.Sessions.Composition/CompatibilitySuppressions.xml new file mode 100644 index 00000000..e204bedd --- /dev/null +++ b/src/Components/Sessions/FluxFlow.Components.Sessions.Composition/CompatibilitySuppressions.xml @@ -0,0 +1,132 @@ + + + + + CP0002 + M:FluxFlow.Components.Sessions.Composition.SessionsAuthoringExtensions.AddSessionQuery(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Sessions.Composition.SessionQueryComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Sessions.Contracts.SessionQueryRequest,FluxFlow.Components.Sessions.Contracts.SessionQueryOutcome}@) + lib/net10.0/FluxFlow.Components.Sessions.Composition.dll + lib/net10.0/FluxFlow.Components.Sessions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Composition.SessionsAuthoringExtensions.AddSessionQuery(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Sessions.Composition.SessionQueryComponentBuilder}) + lib/net10.0/FluxFlow.Components.Sessions.Composition.dll + lib/net10.0/FluxFlow.Components.Sessions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Composition.SessionsAuthoringExtensions.AddSessionRecorder(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Sessions.Composition.SessionRecorderComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Sessions.Contracts.SessionContentRecordInput,FluxFlow.Components.Sessions.Contracts.SessionContentRecord}@) + lib/net10.0/FluxFlow.Components.Sessions.Composition.dll + lib/net10.0/FluxFlow.Components.Sessions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Composition.SessionsAuthoringExtensions.AddSessionRecorder(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Sessions.Composition.SessionRecorderComponentBuilder}) + lib/net10.0/FluxFlow.Components.Sessions.Composition.dll + lib/net10.0/FluxFlow.Components.Sessions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Composition.SessionsAuthoringExtensions.AddSessionReplay(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Sessions.Composition.SessionReplayComponentBuilder},FluxFlow.Composition.Authoring.OutputComponentHandle{FluxFlow.Components.Sessions.Contracts.SessionContentRecord}@) + lib/net10.0/FluxFlow.Components.Sessions.Composition.dll + lib/net10.0/FluxFlow.Components.Sessions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Composition.SessionsAuthoringExtensions.AddSessionReplay(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Sessions.Composition.SessionReplayComponentBuilder}) + lib/net10.0/FluxFlow.Components.Sessions.Composition.dll + lib/net10.0/FluxFlow.Components.Sessions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Composition.SessionsComponents.get_SessionQuery + lib/net10.0/FluxFlow.Components.Sessions.Composition.dll + lib/net10.0/FluxFlow.Components.Sessions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Composition.SessionsComponents.get_SessionRecorder + lib/net10.0/FluxFlow.Components.Sessions.Composition.dll + lib/net10.0/FluxFlow.Components.Sessions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Composition.SessionsComponents.get_SessionReplay + lib/net10.0/FluxFlow.Components.Sessions.Composition.dll + lib/net10.0/FluxFlow.Components.Sessions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Composition.SessionsAuthoringExtensions.AddSessionQuery(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Sessions.Composition.SessionQueryComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Sessions.Contracts.SessionQueryRequest,FluxFlow.Components.Sessions.Contracts.SessionQueryOutcome}@) + lib/net8.0/FluxFlow.Components.Sessions.Composition.dll + lib/net8.0/FluxFlow.Components.Sessions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Composition.SessionsAuthoringExtensions.AddSessionQuery(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Sessions.Composition.SessionQueryComponentBuilder}) + lib/net8.0/FluxFlow.Components.Sessions.Composition.dll + lib/net8.0/FluxFlow.Components.Sessions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Composition.SessionsAuthoringExtensions.AddSessionRecorder(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Sessions.Composition.SessionRecorderComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Sessions.Contracts.SessionContentRecordInput,FluxFlow.Components.Sessions.Contracts.SessionContentRecord}@) + lib/net8.0/FluxFlow.Components.Sessions.Composition.dll + lib/net8.0/FluxFlow.Components.Sessions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Composition.SessionsAuthoringExtensions.AddSessionRecorder(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Sessions.Composition.SessionRecorderComponentBuilder}) + lib/net8.0/FluxFlow.Components.Sessions.Composition.dll + lib/net8.0/FluxFlow.Components.Sessions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Composition.SessionsAuthoringExtensions.AddSessionReplay(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Sessions.Composition.SessionReplayComponentBuilder},FluxFlow.Composition.Authoring.OutputComponentHandle{FluxFlow.Components.Sessions.Contracts.SessionContentRecord}@) + lib/net8.0/FluxFlow.Components.Sessions.Composition.dll + lib/net8.0/FluxFlow.Components.Sessions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Composition.SessionsAuthoringExtensions.AddSessionReplay(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Sessions.Composition.SessionReplayComponentBuilder}) + lib/net8.0/FluxFlow.Components.Sessions.Composition.dll + lib/net8.0/FluxFlow.Components.Sessions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Composition.SessionsComponents.get_SessionQuery + lib/net8.0/FluxFlow.Components.Sessions.Composition.dll + lib/net8.0/FluxFlow.Components.Sessions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Composition.SessionsComponents.get_SessionRecorder + lib/net8.0/FluxFlow.Components.Sessions.Composition.dll + lib/net8.0/FluxFlow.Components.Sessions.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Composition.SessionsComponents.get_SessionReplay + lib/net8.0/FluxFlow.Components.Sessions.Composition.dll + lib/net8.0/FluxFlow.Components.Sessions.Composition.dll + true + + diff --git a/src/FluxFlow.Components.Sessions.Composition/FluxFlow.Components.Sessions.Composition.csproj b/src/Components/Sessions/FluxFlow.Components.Sessions.Composition/FluxFlow.Components.Sessions.Composition.csproj similarity index 66% rename from src/FluxFlow.Components.Sessions.Composition/FluxFlow.Components.Sessions.Composition.csproj rename to src/Components/Sessions/FluxFlow.Components.Sessions.Composition/FluxFlow.Components.Sessions.Composition.csproj index 0d5096ba..43831ae8 100644 --- a/src/FluxFlow.Components.Sessions.Composition/FluxFlow.Components.Sessions.Composition.csproj +++ b/src/Components/Sessions/FluxFlow.Components.Sessions.Composition/FluxFlow.Components.Sessions.Composition.csproj @@ -5,17 +5,17 @@ FluxFlow.Components.Sessions.Composition FluxFlow.Components.Sessions.Composition FluxFlow.Components.Sessions.Composition - 7.0.0-rc.1 + 8.0.0-rc.1 Canonical session Composition registrations with exact FlowContent results, fixed ports, Designer metadata, and host-owned store resources. workflow;dataflow;components;sessions;composition README.md - Requires session.record; registers exact descriptors and Designer metadata through the flat designed-component API; keeps constants under SessionsComponentDefinition and removes its metadata-only factory. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. - - + + diff --git a/src/FluxFlow.Components.Sessions.Composition/README.md b/src/Components/Sessions/FluxFlow.Components.Sessions.Composition/README.md similarity index 100% rename from src/FluxFlow.Components.Sessions.Composition/README.md rename to src/Components/Sessions/FluxFlow.Components.Sessions.Composition/README.md diff --git a/src/FluxFlow.Components.Sessions.Composition/SessionsAuthoringExtensions.cs b/src/Components/Sessions/FluxFlow.Components.Sessions.Composition/SessionsAuthoringExtensions.cs similarity index 81% rename from src/FluxFlow.Components.Sessions.Composition/SessionsAuthoringExtensions.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions.Composition/SessionsAuthoringExtensions.cs index e6ef4346..8570d5e8 100644 --- a/src/FluxFlow.Components.Sessions.Composition/SessionsAuthoringExtensions.cs +++ b/src/Components/Sessions/FluxFlow.Components.Sessions.Composition/SessionsAuthoringExtensions.cs @@ -2,38 +2,40 @@ using FluxFlow.Components.Designer; using FluxFlow.Composition.Authoring; +using FluxFlow.Data; + namespace FluxFlow.Components.Sessions.Composition; public static class SessionsComponents { - public static ComponentContract> SessionRecorder { get; } = + public static ComponentContract> SessionRecorder { get; } = DesignedComponentContract.Create( SessionsComponentDefinition.Types.Recorder, SessionsServiceCollectionExtensions.ConfigureRecorder, static () => new SessionRecorderComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new InputOutputComponentHandle(component, SessionsComponentDefinition.Ports.Input, SessionsComponentDefinition.Ports.Output, SessionsComponentDefinition.Ports.Events)); + static component => new InputOutputComponentHandle(component, SessionsComponentDefinition.Ports.Input, SessionsComponentDefinition.Ports.Output, SessionsComponentDefinition.Ports.Events)); - public static ComponentContract> SessionReplay { get; } = + public static ComponentContract> SessionReplay { get; } = DesignedComponentContract.Create( SessionsComponentDefinition.Types.Replay, SessionsServiceCollectionExtensions.ConfigureReplay, static () => new SessionReplayComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new OutputComponentHandle(component, SessionsComponentDefinition.Ports.Output, SessionsComponentDefinition.Ports.Events)); + static component => new OutputComponentHandle(component, SessionsComponentDefinition.Ports.Output, SessionsComponentDefinition.Ports.Events)); - public static ComponentContract> SessionQuery { get; } = + public static ComponentContract> SessionQuery { get; } = DesignedComponentContract.Create( SessionsComponentDefinition.Types.Query, SessionsServiceCollectionExtensions.ConfigureQuery, static () => new SessionQueryComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new InputOutputComponentHandle(component, SessionsComponentDefinition.Ports.Input, SessionsComponentDefinition.Ports.Output, SessionsComponentDefinition.Ports.Events)); + static component => new InputOutputComponentHandle(component, SessionsComponentDefinition.Ports.Input, SessionsComponentDefinition.Ports.Output, SessionsComponentDefinition.Ports.Events)); } public static class SessionsAuthoringExtensions { - public static InputOutputComponentHandle AddSessionRecorder( + public static InputOutputComponentHandle AddSessionRecorder( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -43,13 +45,13 @@ public static WorkflowDefinitionBuilder AddSessionRecorder( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle recorder) + out InputOutputComponentHandle recorder) { recorder = workflow.AddSessionRecorder(name, configure); return workflow; } - public static OutputComponentHandle AddSessionReplay( + public static OutputComponentHandle AddSessionReplay( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -59,13 +61,13 @@ public static WorkflowDefinitionBuilder AddSessionReplay( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out OutputComponentHandle replay) + out OutputComponentHandle replay) { replay = workflow.AddSessionReplay(name, configure); return workflow; } - public static InputOutputComponentHandle AddSessionQuery( + public static InputOutputComponentHandle AddSessionQuery( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -75,7 +77,7 @@ public static WorkflowDefinitionBuilder AddSessionQuery( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle query) + out InputOutputComponentHandle query) { query = workflow.AddSessionQuery(name, configure); return workflow; diff --git a/src/FluxFlow.Components.Sessions.Composition/SessionsComponentDefinition.cs b/src/Components/Sessions/FluxFlow.Components.Sessions.Composition/SessionsComponentDefinition.cs similarity index 100% rename from src/FluxFlow.Components.Sessions.Composition/SessionsComponentDefinition.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions.Composition/SessionsComponentDefinition.cs diff --git a/src/FluxFlow.Components.Sessions.Composition/SessionsCompositionStoreResolver.cs b/src/Components/Sessions/FluxFlow.Components.Sessions.Composition/SessionsCompositionStoreResolver.cs similarity index 100% rename from src/FluxFlow.Components.Sessions.Composition/SessionsCompositionStoreResolver.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions.Composition/SessionsCompositionStoreResolver.cs diff --git a/src/FluxFlow.Components.Sessions.Composition/SessionsServiceCollectionExtensions.cs b/src/Components/Sessions/FluxFlow.Components.Sessions.Composition/SessionsServiceCollectionExtensions.cs similarity index 92% rename from src/FluxFlow.Components.Sessions.Composition/SessionsServiceCollectionExtensions.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions.Composition/SessionsServiceCollectionExtensions.cs index 6e8abb2c..95e4b0f7 100644 --- a/src/FluxFlow.Components.Sessions.Composition/SessionsServiceCollectionExtensions.cs +++ b/src/Components/Sessions/FluxFlow.Components.Sessions.Composition/SessionsServiceCollectionExtensions.cs @@ -30,8 +30,8 @@ internal static void ConfigureRecorder(ComponentRegistrationBuilder component) AddCapacity(component, defaults.BoundedCapacity); component .UseFactory(CreateSessionRecorderNode) - .HasInput(SessionsComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Exact-content session record input.", true) - .HasOutput(SessionsComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Stored or failed session record result.", true) + .HasFlowValueInput(SessionsComponentDefinition.Ports.Input, static node => node.Input, new FluxFlow.Components.Sessions.Materialization.SessionContentRecordInputMaterializer().InputShape, "Input", "Messages", 0, "Exact-content session record input.", true) + .HasFlowValueOutput(SessionsComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Stored or failed session record result.", true) .HasEvents(SessionsComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort session-recorder diagnostics."); } @@ -52,7 +52,7 @@ internal static void ConfigureReplay(ComponentRegistrationBuilder component) component.AddOption(SessionsComponentDefinition.Options.SpeedMultiplier, OptionValueKind.Number, "Speed Multiplier", "Multiplier used by Multiplier replay mode; must be greater than zero.", defaultValue: defaults.SpeedMultiplier, min: 0.000001, section: "Timing", importance: OptionDesignMetadataAttributeValues.Advanced, editor: OptionDesignMetadataAttributeValues.Number); component .UseFactory(CreateSessionReplayNode) - .HasOutput(SessionsComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 0, "Replayed record or normal replay failure result.", true) + .HasFlowValueOutput(SessionsComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 0, "Replayed record or normal replay failure result.", true) .HasEvents(SessionsComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 1, "Best-effort session-replay diagnostics."); } @@ -70,8 +70,8 @@ internal static void ConfigureQuery(ComponentRegistrationBuilder component) AddCapacity(component, defaults.BoundedCapacity); component .UseFactory(CreateSessionQueryNode) - .HasInput(SessionsComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Session query request.", true) - .HasOutput(SessionsComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Completed or failed session query result.", true) + .HasFlowValueInput(SessionsComponentDefinition.Ports.Input, static node => node.Input, new FluxFlow.Components.Sessions.Materialization.SessionQueryRequestMaterializer().InputShape, "Input", "Messages", 0, "Session query request.", true) + .HasFlowValueOutput(SessionsComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Completed or failed session query result.", true) .HasEvents(SessionsComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort session-query diagnostics."); } diff --git a/src/Components/Sessions/FluxFlow.Components.Sessions/CompatibilitySuppressions.xml b/src/Components/Sessions/FluxFlow.Components.Sessions/CompatibilitySuppressions.xml new file mode 100644 index 00000000..876b95b5 --- /dev/null +++ b/src/Components/Sessions/FluxFlow.Components.Sessions/CompatibilitySuppressions.xml @@ -0,0 +1,104 @@ + + + + + CP0002 + M:FluxFlow.Components.Sessions.Nodes.SessionQueryNode.get_Events + lib/net10.0/FluxFlow.Components.Sessions.dll + lib/net10.0/FluxFlow.Components.Sessions.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Nodes.SessionQueryNode.get_Input + lib/net10.0/FluxFlow.Components.Sessions.dll + lib/net10.0/FluxFlow.Components.Sessions.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Nodes.SessionQueryNode.get_Output + lib/net10.0/FluxFlow.Components.Sessions.dll + lib/net10.0/FluxFlow.Components.Sessions.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Nodes.SessionRecorderNode.get_Events + lib/net10.0/FluxFlow.Components.Sessions.dll + lib/net10.0/FluxFlow.Components.Sessions.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Nodes.SessionRecorderNode.get_Input + lib/net10.0/FluxFlow.Components.Sessions.dll + lib/net10.0/FluxFlow.Components.Sessions.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Nodes.SessionRecorderNode.get_Output + lib/net10.0/FluxFlow.Components.Sessions.dll + lib/net10.0/FluxFlow.Components.Sessions.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Nodes.SessionQueryNode.get_Events + lib/net8.0/FluxFlow.Components.Sessions.dll + lib/net8.0/FluxFlow.Components.Sessions.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Nodes.SessionQueryNode.get_Input + lib/net8.0/FluxFlow.Components.Sessions.dll + lib/net8.0/FluxFlow.Components.Sessions.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Nodes.SessionQueryNode.get_Output + lib/net8.0/FluxFlow.Components.Sessions.dll + lib/net8.0/FluxFlow.Components.Sessions.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Nodes.SessionRecorderNode.get_Events + lib/net8.0/FluxFlow.Components.Sessions.dll + lib/net8.0/FluxFlow.Components.Sessions.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Nodes.SessionRecorderNode.get_Input + lib/net8.0/FluxFlow.Components.Sessions.dll + lib/net8.0/FluxFlow.Components.Sessions.dll + true + + + CP0002 + M:FluxFlow.Components.Sessions.Nodes.SessionRecorderNode.get_Output + lib/net8.0/FluxFlow.Components.Sessions.dll + lib/net8.0/FluxFlow.Components.Sessions.dll + true + + + CP0007 + T:FluxFlow.Components.Sessions.Nodes.SessionReplayNode + lib/net10.0/FluxFlow.Components.Sessions.dll + lib/net10.0/FluxFlow.Components.Sessions.dll + true + + + CP0007 + T:FluxFlow.Components.Sessions.Nodes.SessionReplayNode + lib/net8.0/FluxFlow.Components.Sessions.dll + lib/net8.0/FluxFlow.Components.Sessions.dll + true + + diff --git a/src/FluxFlow.Components.Sessions/Contracts/ISessionStore.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/ISessionStore.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Contracts/ISessionStore.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/ISessionStore.cs diff --git a/src/FluxFlow.Components.Sessions/Contracts/ISessionStoreFactory.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/ISessionStoreFactory.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Contracts/ISessionStoreFactory.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/ISessionStoreFactory.cs diff --git a/src/FluxFlow.Components.Sessions/Contracts/SessionAppendRequest.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionAppendRequest.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Contracts/SessionAppendRequest.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionAppendRequest.cs diff --git a/src/FluxFlow.Components.Sessions/Contracts/SessionCompleteRequest.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionCompleteRequest.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Contracts/SessionCompleteRequest.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionCompleteRequest.cs diff --git a/src/FluxFlow.Components.Sessions/Contracts/SessionContentContractMap.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionContentContractMap.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Contracts/SessionContentContractMap.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionContentContractMap.cs diff --git a/src/FluxFlow.Components.Sessions/Contracts/SessionContentRecord.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionContentRecord.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Contracts/SessionContentRecord.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionContentRecord.cs diff --git a/src/FluxFlow.Components.Sessions/Contracts/SessionContentRecordInput.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionContentRecordInput.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Contracts/SessionContentRecordInput.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionContentRecordInput.cs diff --git a/src/FluxFlow.Components.Sessions/Contracts/SessionContractNormalization.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionContractNormalization.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Contracts/SessionContractNormalization.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionContractNormalization.cs diff --git a/src/FluxFlow.Components.Sessions/Contracts/SessionMetadata.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionMetadata.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Contracts/SessionMetadata.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionMetadata.cs diff --git a/src/FluxFlow.Components.Sessions/Contracts/SessionQueryOutcome.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionQueryOutcome.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Contracts/SessionQueryOutcome.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionQueryOutcome.cs diff --git a/src/FluxFlow.Components.Sessions/Contracts/SessionQueryRequest.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionQueryRequest.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Contracts/SessionQueryRequest.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionQueryRequest.cs diff --git a/src/FluxFlow.Components.Sessions/Contracts/SessionReadRequest.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionReadRequest.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Contracts/SessionReadRequest.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionReadRequest.cs diff --git a/src/FluxFlow.Components.Sessions/Contracts/SessionRecord.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionRecord.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Contracts/SessionRecord.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionRecord.cs diff --git a/src/FluxFlow.Components.Sessions/Contracts/SessionRecordInput.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionRecordInput.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Contracts/SessionRecordInput.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionRecordInput.cs diff --git a/src/FluxFlow.Components.Sessions/Contracts/SessionReplayMode.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionReplayMode.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Contracts/SessionReplayMode.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionReplayMode.cs diff --git a/src/FluxFlow.Components.Sessions/Contracts/SessionStartRequest.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionStartRequest.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Contracts/SessionStartRequest.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionStartRequest.cs diff --git a/src/FluxFlow.Components.Sessions/Contracts/SessionStoreContext.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionStoreContext.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Contracts/SessionStoreContext.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionStoreContext.cs diff --git a/src/FluxFlow.Components.Sessions/Contracts/SessionStoreLease.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionStoreLease.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Contracts/SessionStoreLease.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Contracts/SessionStoreLease.cs diff --git a/src/FluxFlow.Components.Sessions/Diagnostics/SessionsDiagnosticNames.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Diagnostics/SessionsDiagnosticNames.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Diagnostics/SessionsDiagnosticNames.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Diagnostics/SessionsDiagnosticNames.cs diff --git a/src/FluxFlow.Components.Sessions/FluxFlow.Components.Sessions.csproj b/src/Components/Sessions/FluxFlow.Components.Sessions/FluxFlow.Components.Sessions.csproj similarity index 71% rename from src/FluxFlow.Components.Sessions/FluxFlow.Components.Sessions.csproj rename to src/Components/Sessions/FluxFlow.Components.Sessions/FluxFlow.Components.Sessions.csproj index ccb40223..7ab62d50 100644 --- a/src/FluxFlow.Components.Sessions/FluxFlow.Components.Sessions.csproj +++ b/src/Components/Sessions/FluxFlow.Components.Sessions/FluxFlow.Components.Sessions.csproj @@ -4,14 +4,14 @@ FluxFlow.Components.Sessions FluxFlow.Components.Sessions FluxFlow.Components.Sessions - 6.0.1 + 7.0.0-rc.1 Standalone session recording, replay, and query nodes with exact FlowContent and typed value-or-error outcomes over host-owned stores. workflow;dataflow;components;sessions;recording;replay - Uses shared node execution and deterministic FlowContent persistence while retaining compatibility with existing stored envelopes. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md - + diff --git a/src/Components/Sessions/FluxFlow.Components.Sessions/Materialization/SessionRequestMaterializers.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Materialization/SessionRequestMaterializers.cs new file mode 100644 index 00000000..41ba2e44 --- /dev/null +++ b/src/Components/Sessions/FluxFlow.Components.Sessions/Materialization/SessionRequestMaterializers.cs @@ -0,0 +1,16 @@ +using FluxFlow.Components.Sessions.Contracts; +using FluxFlow.Data; + +namespace FluxFlow.Components.Sessions.Materialization; + +public sealed class SessionContentRecordInputMaterializer() + : JsonFlowValueMaterializer( + "sessions.record.invalid_shape", + "Sessions", + FlowValueShape.Object("A session record object with content and optional timestamp, type, name, and attributes.", "content")); + +public sealed class SessionQueryRequestMaterializer() + : JsonFlowValueMaterializer( + "sessions.query.invalid_shape", + "Sessions", + FlowValueShape.Object("A session query object with optional names, tags, time ranges, state filters, correlation, and limit.")); diff --git a/src/FluxFlow.Components.Sessions/Nodes/SessionContentNodeSupport.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Nodes/SessionContentNodeSupport.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Nodes/SessionContentNodeSupport.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Nodes/SessionContentNodeSupport.cs diff --git a/src/FluxFlow.Components.Sessions/Nodes/SessionContentOperationException.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Nodes/SessionContentOperationException.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Nodes/SessionContentOperationException.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Nodes/SessionContentOperationException.cs diff --git a/src/FluxFlow.Components.Sessions/Nodes/SessionContentRecordMapper.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Nodes/SessionContentRecordMapper.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Nodes/SessionContentRecordMapper.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Nodes/SessionContentRecordMapper.cs diff --git a/src/Components/Sessions/FluxFlow.Components.Sessions/Nodes/SessionOperationPipeline.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Nodes/SessionOperationPipeline.cs new file mode 100644 index 00000000..41ace0b6 --- /dev/null +++ b/src/Components/Sessions/FluxFlow.Components.Sessions/Nodes/SessionOperationPipeline.cs @@ -0,0 +1,93 @@ +using FluxFlow.Data; +using FluxFlow.Nodes; + +namespace FluxFlow.Components.Sessions.Nodes; + +internal sealed class SessionOperationPipeline : FlowNode +{ + private readonly TimeProvider _clock; + private readonly IFlowValueMaterializer _materializer; + private readonly string _rejectionEventName; + private readonly Func, CancellationToken, Task>> _process; + private readonly Func? _finalize; + + public SessionOperationPipeline( + int boundedCapacity, + TimeProvider clock, + IFlowValueMaterializer materializer, + string rejectionEventName, + Func, CancellationToken, Task>> process, + Func? finalize = null) + : base(CreateOptions(boundedCapacity)) + { + ArgumentNullException.ThrowIfNull(clock); + ArgumentNullException.ThrowIfNull(materializer); + ArgumentException.ThrowIfNullOrWhiteSpace(rejectionEventName); + ArgumentNullException.ThrowIfNull(process); + + _clock = clock; + _materializer = materializer; + _rejectionEventName = rejectionEventName; + _process = process; + _finalize = finalize; + } + + public void PublishEvent(FlowEvent value) + { + ArgumentNullException.ThrowIfNull(value); + EmitEvent(value); + } + + protected override bool HandlesErrors => true; + + protected override async Task ProcessAsync(FlowMessage message) + { + if (message.IsError) + { + await EmitAsync(message, Stopping).ConfigureAwait(false); + return; + } + + var materialized = _materializer.Materialize(message.Value); + if (!materialized.IsSuccess) + { + var error = materialized.Error!; + EmitEvent(new FlowEvent + { + Timestamp = _clock.GetUtcNow(), + CorrelationId = message.CorrelationId, + Name = _rejectionEventName, + Level = FlowEventLevel.Warning, + Message = error.Message, + Attributes = new Dictionary(StringComparer.Ordinal) + { + ["errorCode"] = error.Code + } + }); + await EmitAsync(message.WithError(error), Stopping).ConfigureAwait(false); + return; + } + + var typedMessage = message.ConvertValue(materialized.Value); + var typedResult = await _process(typedMessage, Stopping).ConfigureAwait(false); + var result = typedResult.IsError + ? typedResult.ConvertError() + : typedResult.ConvertValue(FlowValue.From(typedResult.Value)); + await EmitAsync(result, Stopping).ConfigureAwait(false); + } + + protected override ValueTask OnInputCompletedAsync() + => _finalize is null + ? ValueTask.CompletedTask + : new ValueTask(_finalize()); + + private static FlowNodeOptions CreateOptions(int boundedCapacity) + { + ArgumentOutOfRangeException.ThrowIfLessThan(boundedCapacity, 1); + return new FlowNodeOptions + { + InputCapacity = boundedCapacity, + OutputCapacity = boundedCapacity + }; + } +} diff --git a/src/FluxFlow.Components.Sessions/Nodes/SessionQueryNode.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Nodes/SessionQueryNode.cs similarity index 92% rename from src/FluxFlow.Components.Sessions/Nodes/SessionQueryNode.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Nodes/SessionQueryNode.cs index 85fe64ce..eed7d598 100644 --- a/src/FluxFlow.Components.Sessions/Nodes/SessionQueryNode.cs +++ b/src/Components/Sessions/FluxFlow.Components.Sessions/Nodes/SessionQueryNode.cs @@ -36,7 +36,12 @@ public SessionQueryNode( _options = options; _store = store; _clock = clock ?? TimeProvider.System; - _pipeline = new(options.BoundedCapacity, ProcessAsync); + _pipeline = new( + options.BoundedCapacity, + _clock, + new Materialization.SessionQueryRequestMaterializer(), + "session.query.rejected", + ProcessAsync); _pipeline.PublishEvent(SessionContentNodeSupport.CreateEvent( _clock.GetUtcNow(), SessionsDiagnosticNames.QueryStarted, @@ -48,11 +53,11 @@ public SessionQueryNode( sessionId: null)); } - public ITargetBlock> Input => _pipeline.Input; + public ITargetBlock Input => _pipeline.Input; - public ISourceBlock> Output => _pipeline.Output; + public ISourceBlock Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; diff --git a/src/FluxFlow.Components.Sessions/Nodes/SessionRecorderNode.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Nodes/SessionRecorderNode.cs similarity index 96% rename from src/FluxFlow.Components.Sessions/Nodes/SessionRecorderNode.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Nodes/SessionRecorderNode.cs index b1dc0ca1..c1d2ee8d 100644 --- a/src/FluxFlow.Components.Sessions/Nodes/SessionRecorderNode.cs +++ b/src/Components/Sessions/FluxFlow.Components.Sessions/Nodes/SessionRecorderNode.cs @@ -35,15 +35,18 @@ public SessionRecorderNode( _clock = clock ?? TimeProvider.System; _pipeline = new( options.BoundedCapacity, + _clock, + new Materialization.SessionContentRecordInputMaterializer(), + "session.recorder.rejected", ProcessAsync, CompleteSessionAsync); } - public ITargetBlock> Input => _pipeline.Input; + public ITargetBlock Input => _pipeline.Input; - public ISourceBlock> Output => _pipeline.Output; + public ISourceBlock Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; diff --git a/src/FluxFlow.Components.Sessions/Nodes/SessionReplayNode.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Nodes/SessionReplayNode.cs similarity index 97% rename from src/FluxFlow.Components.Sessions/Nodes/SessionReplayNode.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Nodes/SessionReplayNode.cs index 7e675f49..ea3dcb72 100644 --- a/src/FluxFlow.Components.Sessions/Nodes/SessionReplayNode.cs +++ b/src/Components/Sessions/FluxFlow.Components.Sessions/Nodes/SessionReplayNode.cs @@ -10,7 +10,7 @@ namespace FluxFlow.Components.Sessions.Nodes; /// /// Replays exact content records as normal operation results. /// -public sealed class SessionReplayNode : FlowSource +public sealed class SessionReplayNode : FlowSource { private readonly SessionReplayOptions _options; private readonly ISessionStore _store; @@ -125,7 +125,7 @@ await EmitFailureAsync( await DelayForRecordAsync(previous, contentRecord, cancellationToken) .ConfigureAwait(false); var timestamp = _clock.GetUtcNow(); - var message = FlowMessage.Create(contentRecord); + var message = FlowMessage.Create(FlowValue.From(contentRecord)); await EmitAsync(message, cancellationToken).ConfigureAwait(false); emitted++; @@ -185,7 +185,7 @@ private async Task EmitFailureAsync( _sessionId, exception, sequence); - var message = FlowMessage.CreateError(error); + var message = FlowMessage.CreateError(error); await EmitAsync(message, cancellationToken).ConfigureAwait(false); EmitEvent(SessionContentNodeSupport.CreateEvent( timestamp, diff --git a/src/FluxFlow.Components.Sessions/Options/SessionOptionValidation.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Options/SessionOptionValidation.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Options/SessionOptionValidation.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Options/SessionOptionValidation.cs diff --git a/src/FluxFlow.Components.Sessions/Options/SessionQueryOptions.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Options/SessionQueryOptions.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Options/SessionQueryOptions.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Options/SessionQueryOptions.cs diff --git a/src/FluxFlow.Components.Sessions/Options/SessionRecorderOptions.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Options/SessionRecorderOptions.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Options/SessionRecorderOptions.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Options/SessionRecorderOptions.cs diff --git a/src/FluxFlow.Components.Sessions/Options/SessionReplayOptions.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/Options/SessionReplayOptions.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/Options/SessionReplayOptions.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/Options/SessionReplayOptions.cs diff --git a/src/FluxFlow.Components.Sessions/README.md b/src/Components/Sessions/FluxFlow.Components.Sessions/README.md similarity index 100% rename from src/FluxFlow.Components.Sessions/README.md rename to src/Components/Sessions/FluxFlow.Components.Sessions/README.md diff --git a/src/FluxFlow.Components.Sessions/SessionErrorCodeNames.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/SessionErrorCodeNames.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/SessionErrorCodeNames.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/SessionErrorCodeNames.cs diff --git a/src/FluxFlow.Components.Sessions/SessionResultKinds.cs b/src/Components/Sessions/FluxFlow.Components.Sessions/SessionResultKinds.cs similarity index 100% rename from src/FluxFlow.Components.Sessions/SessionResultKinds.cs rename to src/Components/Sessions/FluxFlow.Components.Sessions/SessionResultKinds.cs diff --git a/src/Components/Sources/FluxFlow.Components.Sources.Composition/CompatibilitySuppressions.xml b/src/Components/Sources/FluxFlow.Components.Sources.Composition/CompatibilitySuppressions.xml new file mode 100644 index 00000000..6dff2553 --- /dev/null +++ b/src/Components/Sources/FluxFlow.Components.Sources.Composition/CompatibilitySuppressions.xml @@ -0,0 +1,90 @@ + + + + + CP0002 + M:FluxFlow.Components.Sources.Composition.SourcesAuthoringExtensions.AddGeneratedSource(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Sources.Composition.GeneratedSourceComponentBuilder},FluxFlow.Composition.Authoring.OutputComponentHandle{System.Text.Json.JsonElement}@) + lib/net10.0/FluxFlow.Components.Sources.Composition.dll + lib/net10.0/FluxFlow.Components.Sources.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sources.Composition.SourcesAuthoringExtensions.AddGeneratedSource(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Sources.Composition.GeneratedSourceComponentBuilder}) + lib/net10.0/FluxFlow.Components.Sources.Composition.dll + lib/net10.0/FluxFlow.Components.Sources.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sources.Composition.SourcesAuthoringExtensions.AddSequenceSource(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Sources.Composition.SequenceSourceComponentBuilder},FluxFlow.Composition.Authoring.OutputComponentHandle{FluxFlow.Components.Sources.Contracts.SequenceItem}@) + lib/net10.0/FluxFlow.Components.Sources.Composition.dll + lib/net10.0/FluxFlow.Components.Sources.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sources.Composition.SourcesAuthoringExtensions.AddSequenceSource(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Sources.Composition.SequenceSourceComponentBuilder}) + lib/net10.0/FluxFlow.Components.Sources.Composition.dll + lib/net10.0/FluxFlow.Components.Sources.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sources.Composition.SourcesComponents.get_GeneratedSource + lib/net10.0/FluxFlow.Components.Sources.Composition.dll + lib/net10.0/FluxFlow.Components.Sources.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sources.Composition.SourcesComponents.get_SequenceSource + lib/net10.0/FluxFlow.Components.Sources.Composition.dll + lib/net10.0/FluxFlow.Components.Sources.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sources.Composition.SourcesAuthoringExtensions.AddGeneratedSource(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Sources.Composition.GeneratedSourceComponentBuilder},FluxFlow.Composition.Authoring.OutputComponentHandle{System.Text.Json.JsonElement}@) + lib/net8.0/FluxFlow.Components.Sources.Composition.dll + lib/net8.0/FluxFlow.Components.Sources.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sources.Composition.SourcesAuthoringExtensions.AddGeneratedSource(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Sources.Composition.GeneratedSourceComponentBuilder}) + lib/net8.0/FluxFlow.Components.Sources.Composition.dll + lib/net8.0/FluxFlow.Components.Sources.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sources.Composition.SourcesAuthoringExtensions.AddSequenceSource(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Sources.Composition.SequenceSourceComponentBuilder},FluxFlow.Composition.Authoring.OutputComponentHandle{FluxFlow.Components.Sources.Contracts.SequenceItem}@) + lib/net8.0/FluxFlow.Components.Sources.Composition.dll + lib/net8.0/FluxFlow.Components.Sources.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sources.Composition.SourcesAuthoringExtensions.AddSequenceSource(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Sources.Composition.SequenceSourceComponentBuilder}) + lib/net8.0/FluxFlow.Components.Sources.Composition.dll + lib/net8.0/FluxFlow.Components.Sources.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sources.Composition.SourcesComponents.get_GeneratedSource + lib/net8.0/FluxFlow.Components.Sources.Composition.dll + lib/net8.0/FluxFlow.Components.Sources.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Sources.Composition.SourcesComponents.get_SequenceSource + lib/net8.0/FluxFlow.Components.Sources.Composition.dll + lib/net8.0/FluxFlow.Components.Sources.Composition.dll + true + + diff --git a/src/FluxFlow.Components.Sources.Composition/FluxFlow.Components.Sources.Composition.csproj b/src/Components/Sources/FluxFlow.Components.Sources.Composition/FluxFlow.Components.Sources.Composition.csproj similarity index 62% rename from src/FluxFlow.Components.Sources.Composition/FluxFlow.Components.Sources.Composition.csproj rename to src/Components/Sources/FluxFlow.Components.Sources.Composition/FluxFlow.Components.Sources.Composition.csproj index 5fafbc48..fa315526 100644 --- a/src/FluxFlow.Components.Sources.Composition/FluxFlow.Components.Sources.Composition.csproj +++ b/src/Components/Sources/FluxFlow.Components.Sources.Composition/FluxFlow.Components.Sources.Composition.csproj @@ -5,17 +5,17 @@ FluxFlow.Components.Sources.Composition FluxFlow.Components.Sources.Composition FluxFlow.Components.Sources.Composition - 7.0.0-rc.1 + 8.0.0-rc.1 Typed generated and sequence source registration and Designer metadata over host-owned clocks. workflow;dataflow;components;sources;composition README.md - Requires source.items; registers exact descriptors and Designer metadata through the flat designed-component API; keeps constants under SourcesComponentDefinition and removes its metadata-only factory. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. - - + + diff --git a/src/FluxFlow.Components.Sources.Composition/README.md b/src/Components/Sources/FluxFlow.Components.Sources.Composition/README.md similarity index 100% rename from src/FluxFlow.Components.Sources.Composition/README.md rename to src/Components/Sources/FluxFlow.Components.Sources.Composition/README.md diff --git a/src/FluxFlow.Components.Sources.Composition/SourcesAuthoringExtensions.cs b/src/Components/Sources/FluxFlow.Components.Sources.Composition/SourcesAuthoringExtensions.cs similarity index 85% rename from src/FluxFlow.Components.Sources.Composition/SourcesAuthoringExtensions.cs rename to src/Components/Sources/FluxFlow.Components.Sources.Composition/SourcesAuthoringExtensions.cs index 176d470b..c9a64aa7 100644 --- a/src/FluxFlow.Components.Sources.Composition/SourcesAuthoringExtensions.cs +++ b/src/Components/Sources/FluxFlow.Components.Sources.Composition/SourcesAuthoringExtensions.cs @@ -3,30 +3,32 @@ using FluxFlow.Components.Designer; using FluxFlow.Composition.Authoring; +using FluxFlow.Data; + namespace FluxFlow.Components.Sources.Composition; public static class SourcesComponents { - public static ComponentContract> GeneratedSource { get; } = + public static ComponentContract> GeneratedSource { get; } = DesignedComponentContract.Create( SourcesComponentDefinition.Types.Generated, SourcesServiceCollectionExtensions.ConfigureGenerated, static () => new GeneratedSourceComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new OutputComponentHandle(component, SourcesComponentDefinition.Ports.Output, SourcesComponentDefinition.Ports.Events)); + static component => new OutputComponentHandle(component, SourcesComponentDefinition.Ports.Output, SourcesComponentDefinition.Ports.Events)); - public static ComponentContract> SequenceSource { get; } = + public static ComponentContract> SequenceSource { get; } = DesignedComponentContract.Create( SourcesComponentDefinition.Types.Sequence, SourcesServiceCollectionExtensions.ConfigureSequence, static () => new SequenceSourceComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new OutputComponentHandle(component, SourcesComponentDefinition.Ports.Output, SourcesComponentDefinition.Ports.Events)); + static component => new OutputComponentHandle(component, SourcesComponentDefinition.Ports.Output, SourcesComponentDefinition.Ports.Events)); } public static class SourcesAuthoringExtensions { - public static OutputComponentHandle AddGeneratedSource( + public static OutputComponentHandle AddGeneratedSource( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -36,13 +38,13 @@ public static WorkflowDefinitionBuilder AddGeneratedSource( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out OutputComponentHandle source) + out OutputComponentHandle source) { source = workflow.AddGeneratedSource(name, configure); return workflow; } - public static OutputComponentHandle AddSequenceSource( + public static OutputComponentHandle AddSequenceSource( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -52,7 +54,7 @@ public static WorkflowDefinitionBuilder AddSequenceSource( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out OutputComponentHandle source) + out OutputComponentHandle source) { source = workflow.AddSequenceSource(name, configure); return workflow; diff --git a/src/FluxFlow.Components.Sources.Composition/SourcesComponentDefinition.cs b/src/Components/Sources/FluxFlow.Components.Sources.Composition/SourcesComponentDefinition.cs similarity index 100% rename from src/FluxFlow.Components.Sources.Composition/SourcesComponentDefinition.cs rename to src/Components/Sources/FluxFlow.Components.Sources.Composition/SourcesComponentDefinition.cs diff --git a/src/FluxFlow.Components.Sources.Composition/SourcesServiceCollectionExtensions.cs b/src/Components/Sources/FluxFlow.Components.Sources.Composition/SourcesServiceCollectionExtensions.cs similarity index 95% rename from src/FluxFlow.Components.Sources.Composition/SourcesServiceCollectionExtensions.cs rename to src/Components/Sources/FluxFlow.Components.Sources.Composition/SourcesServiceCollectionExtensions.cs index bc50562d..608c0151 100644 --- a/src/FluxFlow.Components.Sources.Composition/SourcesServiceCollectionExtensions.cs +++ b/src/Components/Sources/FluxFlow.Components.Sources.Composition/SourcesServiceCollectionExtensions.cs @@ -32,7 +32,7 @@ internal static void ConfigureGenerated(ComponentRegistrationBuilder component) AddCapacity(component); component .UseFactory(CreateGeneratedSourceNode) - .HasOutput(SourcesComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 0, "Generated JSON value.", true) + .HasFlowValueOutput(SourcesComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 0, "Generated JSON value.", true) .HasEvents(SourcesComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 1, "Best-effort generated-source diagnostics."); } @@ -48,7 +48,7 @@ internal static void ConfigureSequence(ComponentRegistrationBuilder component) AddCapacity(component); component .UseFactory(CreateSequenceSourceNode) - .HasOutput(SourcesComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 0, "Numeric sequence item.", true) + .HasFlowValueOutput(SourcesComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 0, "Numeric sequence item.", true) .HasEvents(SourcesComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 1, "Best-effort sequence-source diagnostics."); } diff --git a/src/Components/Sources/FluxFlow.Components.Sources/CompatibilitySuppressions.xml b/src/Components/Sources/FluxFlow.Components.Sources/CompatibilitySuppressions.xml new file mode 100644 index 00000000..0bbba88f --- /dev/null +++ b/src/Components/Sources/FluxFlow.Components.Sources/CompatibilitySuppressions.xml @@ -0,0 +1,62 @@ + + + + + CP0002 + M:FluxFlow.Components.Sources.Nodes.GeneratedSourceNode`1.get_Events + lib/net10.0/FluxFlow.Components.Sources.dll + lib/net10.0/FluxFlow.Components.Sources.dll + true + + + CP0002 + M:FluxFlow.Components.Sources.Nodes.GeneratedSourceNode`1.get_Output + lib/net10.0/FluxFlow.Components.Sources.dll + lib/net10.0/FluxFlow.Components.Sources.dll + true + + + CP0002 + M:FluxFlow.Components.Sources.Nodes.SequenceSourceNode.get_Events + lib/net10.0/FluxFlow.Components.Sources.dll + lib/net10.0/FluxFlow.Components.Sources.dll + true + + + CP0002 + M:FluxFlow.Components.Sources.Nodes.SequenceSourceNode.get_Output + lib/net10.0/FluxFlow.Components.Sources.dll + lib/net10.0/FluxFlow.Components.Sources.dll + true + + + CP0002 + M:FluxFlow.Components.Sources.Nodes.GeneratedSourceNode`1.get_Events + lib/net8.0/FluxFlow.Components.Sources.dll + lib/net8.0/FluxFlow.Components.Sources.dll + true + + + CP0002 + M:FluxFlow.Components.Sources.Nodes.GeneratedSourceNode`1.get_Output + lib/net8.0/FluxFlow.Components.Sources.dll + lib/net8.0/FluxFlow.Components.Sources.dll + true + + + CP0002 + M:FluxFlow.Components.Sources.Nodes.SequenceSourceNode.get_Events + lib/net8.0/FluxFlow.Components.Sources.dll + lib/net8.0/FluxFlow.Components.Sources.dll + true + + + CP0002 + M:FluxFlow.Components.Sources.Nodes.SequenceSourceNode.get_Output + lib/net8.0/FluxFlow.Components.Sources.dll + lib/net8.0/FluxFlow.Components.Sources.dll + true + + diff --git a/src/FluxFlow.Components.Sources/Contracts/SequenceItem.cs b/src/Components/Sources/FluxFlow.Components.Sources/Contracts/SequenceItem.cs similarity index 100% rename from src/FluxFlow.Components.Sources/Contracts/SequenceItem.cs rename to src/Components/Sources/FluxFlow.Components.Sources/Contracts/SequenceItem.cs diff --git a/src/FluxFlow.Components.Sources/Diagnostics/SourceDiagnosticNames.cs b/src/Components/Sources/FluxFlow.Components.Sources/Diagnostics/SourceDiagnosticNames.cs similarity index 100% rename from src/FluxFlow.Components.Sources/Diagnostics/SourceDiagnosticNames.cs rename to src/Components/Sources/FluxFlow.Components.Sources/Diagnostics/SourceDiagnosticNames.cs diff --git a/src/FluxFlow.Components.Sources/FluxFlow.Components.Sources.csproj b/src/Components/Sources/FluxFlow.Components.Sources/FluxFlow.Components.Sources.csproj similarity index 65% rename from src/FluxFlow.Components.Sources/FluxFlow.Components.Sources.csproj rename to src/Components/Sources/FluxFlow.Components.Sources/FluxFlow.Components.Sources.csproj index e2748aa5..5ac67c82 100644 --- a/src/FluxFlow.Components.Sources/FluxFlow.Components.Sources.csproj +++ b/src/Components/Sources/FluxFlow.Components.Sources/FluxFlow.Components.Sources.csproj @@ -4,14 +4,14 @@ FluxFlow.Components.Sources FluxFlow.Components.Sources FluxFlow.Components.Sources - 6.0.0 + 7.0.0-rc.1 Standalone typed generated and sequence sources with deterministic timing and lifecycle events. workflow;dataflow;components;sources - Migrates component inputs and outputs to typed FlowMessage<T> value-or-error contracts, removes universal FlowValue or FlowResult coupling, and keeps errors on the normal output. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md - + diff --git a/src/FluxFlow.Components.Sources/Nodes/GeneratedSourceNode.cs b/src/Components/Sources/FluxFlow.Components.Sources/Nodes/GeneratedSourceNode.cs similarity index 96% rename from src/FluxFlow.Components.Sources/Nodes/GeneratedSourceNode.cs rename to src/Components/Sources/FluxFlow.Components.Sources/Nodes/GeneratedSourceNode.cs index 24c91764..8add928a 100644 --- a/src/FluxFlow.Components.Sources/Nodes/GeneratedSourceNode.cs +++ b/src/Components/Sources/FluxFlow.Components.Sources/Nodes/GeneratedSourceNode.cs @@ -2,6 +2,7 @@ using System.Threading.Tasks.Dataflow; using FluxFlow.Components.Sources.Diagnostics; using FluxFlow.Components.Sources.Options; +using FluxFlow.Data; using FluxFlow.Nodes; namespace FluxFlow.Components.Sources.Nodes; @@ -38,9 +39,9 @@ public GeneratedSourceNode( TimeProvider? clock = null) => _source = new GeneratedSource(options, items, clock); - public ISourceBlock> Output => _source.Output; + public ISourceBlock Output => _source.Output; - public ISourceBlock Events => _source.Events; + public ISourceBlock Events => _source.Events; public Task Completion => _source.Completion; @@ -54,7 +55,7 @@ public Task StartAsync(CancellationToken cancellationToken = default) public ValueTask DisposeAsync() => _source.DisposeAsync(); } -internal sealed class GeneratedSource : FlowSource +internal sealed class GeneratedSource : FlowSource { private readonly GeneratedSourceOptions _options; private readonly IReadOnlyList _items; @@ -92,7 +93,7 @@ await SourceNodeTiming.DelayInitialAsync( cancellationToken.ThrowIfCancellationRequested(); var item = _items[index % _items.Count]; await EmitAsync( - FlowMessage.Create(item), + FlowMessage.Create(FlowValue.From(item)), cancellationToken).ConfigureAwait(false); emitted++; diff --git a/src/FluxFlow.Components.Sources/Nodes/SequenceSourceNode.cs b/src/Components/Sources/FluxFlow.Components.Sources/Nodes/SequenceSourceNode.cs similarity index 96% rename from src/FluxFlow.Components.Sources/Nodes/SequenceSourceNode.cs rename to src/Components/Sources/FluxFlow.Components.Sources/Nodes/SequenceSourceNode.cs index 7061cd1a..f694a224 100644 --- a/src/FluxFlow.Components.Sources/Nodes/SequenceSourceNode.cs +++ b/src/Components/Sources/FluxFlow.Components.Sources/Nodes/SequenceSourceNode.cs @@ -2,6 +2,7 @@ using FluxFlow.Components.Sources.Contracts; using FluxFlow.Components.Sources.Diagnostics; using FluxFlow.Components.Sources.Options; +using FluxFlow.Data; using FluxFlow.Nodes; namespace FluxFlow.Components.Sources.Nodes; @@ -23,9 +24,9 @@ public SequenceSourceNode( TimeProvider? clock = null) => _source = new SequenceSource(options, clock); - public ISourceBlock> Output => _source.Output; + public ISourceBlock Output => _source.Output; - public ISourceBlock Events => _source.Events; + public ISourceBlock Events => _source.Events; public Task Completion => _source.Completion; @@ -39,7 +40,7 @@ public Task StartAsync(CancellationToken cancellationToken = default) public ValueTask DisposeAsync() => _source.DisposeAsync(); } -internal sealed class SequenceSource : FlowSource +internal sealed class SequenceSource : FlowSource { private readonly SequenceSourceOptions _options; private readonly TimeProvider _clock; @@ -81,7 +82,7 @@ await SourceNodeTiming.DelayInitialAsync( timestamp, value); await EmitAsync( - FlowMessage.Create(item), + FlowMessage.Create(FlowValue.From(item)), cancellationToken).ConfigureAwait(false); emitted++; diff --git a/src/FluxFlow.Components.Sources/Nodes/SourceNodeTiming.cs b/src/Components/Sources/FluxFlow.Components.Sources/Nodes/SourceNodeTiming.cs similarity index 100% rename from src/FluxFlow.Components.Sources/Nodes/SourceNodeTiming.cs rename to src/Components/Sources/FluxFlow.Components.Sources/Nodes/SourceNodeTiming.cs diff --git a/src/FluxFlow.Components.Sources/Options/GeneratedSourceOptions.cs b/src/Components/Sources/FluxFlow.Components.Sources/Options/GeneratedSourceOptions.cs similarity index 100% rename from src/FluxFlow.Components.Sources/Options/GeneratedSourceOptions.cs rename to src/Components/Sources/FluxFlow.Components.Sources/Options/GeneratedSourceOptions.cs diff --git a/src/FluxFlow.Components.Sources/Options/SequenceSourceOptions.cs b/src/Components/Sources/FluxFlow.Components.Sources/Options/SequenceSourceOptions.cs similarity index 100% rename from src/FluxFlow.Components.Sources/Options/SequenceSourceOptions.cs rename to src/Components/Sources/FluxFlow.Components.Sources/Options/SequenceSourceOptions.cs diff --git a/src/FluxFlow.Components.Sources/README.md b/src/Components/Sources/FluxFlow.Components.Sources/README.md similarity index 100% rename from src/FluxFlow.Components.Sources/README.md rename to src/Components/Sources/FluxFlow.Components.Sources/README.md diff --git a/src/Components/State/FluxFlow.Components.State.Composition/CompatibilitySuppressions.xml b/src/Components/State/FluxFlow.Components.State.Composition/CompatibilitySuppressions.xml new file mode 100644 index 00000000..abe0c7bf --- /dev/null +++ b/src/Components/State/FluxFlow.Components.State.Composition/CompatibilitySuppressions.xml @@ -0,0 +1,48 @@ + + + + + CP0002 + M:FluxFlow.Components.State.Composition.StateAuthoringExtensions.AddStateReducer(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.State.Composition.StateReducerComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.State.Contracts.StateReducerInput{System.Text.Json.JsonElement},FluxFlow.Components.State.Contracts.StateReducerResult{System.Text.Json.JsonElement}}@) + lib/net10.0/FluxFlow.Components.State.Composition.dll + lib/net10.0/FluxFlow.Components.State.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.State.Composition.StateAuthoringExtensions.AddStateReducer(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.State.Composition.StateReducerComponentBuilder}) + lib/net10.0/FluxFlow.Components.State.Composition.dll + lib/net10.0/FluxFlow.Components.State.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.State.Composition.StateComponents.get_StateReducer + lib/net10.0/FluxFlow.Components.State.Composition.dll + lib/net10.0/FluxFlow.Components.State.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.State.Composition.StateAuthoringExtensions.AddStateReducer(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.State.Composition.StateReducerComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.State.Contracts.StateReducerInput{System.Text.Json.JsonElement},FluxFlow.Components.State.Contracts.StateReducerResult{System.Text.Json.JsonElement}}@) + lib/net8.0/FluxFlow.Components.State.Composition.dll + lib/net8.0/FluxFlow.Components.State.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.State.Composition.StateAuthoringExtensions.AddStateReducer(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.State.Composition.StateReducerComponentBuilder}) + lib/net8.0/FluxFlow.Components.State.Composition.dll + lib/net8.0/FluxFlow.Components.State.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.State.Composition.StateComponents.get_StateReducer + lib/net8.0/FluxFlow.Components.State.Composition.dll + lib/net8.0/FluxFlow.Components.State.Composition.dll + true + + diff --git a/src/FluxFlow.Components.State.Composition/FluxFlow.Components.State.Composition.csproj b/src/Components/State/FluxFlow.Components.State.Composition/FluxFlow.Components.State.Composition.csproj similarity index 58% rename from src/FluxFlow.Components.State.Composition/FluxFlow.Components.State.Composition.csproj rename to src/Components/State/FluxFlow.Components.State.Composition/FluxFlow.Components.State.Composition.csproj index e0687a9b..49310fa6 100644 --- a/src/FluxFlow.Components.State.Composition/FluxFlow.Components.State.Composition.csproj +++ b/src/Components/State/FluxFlow.Components.State.Composition/FluxFlow.Components.State.Composition.csproj @@ -5,18 +5,18 @@ FluxFlow.Components.State.Composition FluxFlow.Components.State.Composition FluxFlow.Components.State.Composition - 7.0.0-rc.1 + 8.0.0-rc.1 Typed JSON state-reducer registration and Designer metadata over host-owned expression and clock resources. workflow;dataflow;components;state;composition README.md - Requires state.reduce; registers exact descriptors and Designer metadata through the flat designed-component API; keeps constants under StateComponentDefinition and removes its metadata-only factory. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. - - - + + + diff --git a/src/FluxFlow.Components.State.Composition/README.md b/src/Components/State/FluxFlow.Components.State.Composition/README.md similarity index 100% rename from src/FluxFlow.Components.State.Composition/README.md rename to src/Components/State/FluxFlow.Components.State.Composition/README.md diff --git a/src/FluxFlow.Components.State.Composition/StateAuthoringExtensions.cs b/src/Components/State/FluxFlow.Components.State.Composition/StateAuthoringExtensions.cs similarity index 82% rename from src/FluxFlow.Components.State.Composition/StateAuthoringExtensions.cs rename to src/Components/State/FluxFlow.Components.State.Composition/StateAuthoringExtensions.cs index 34b53d56..61e2f1ec 100644 --- a/src/FluxFlow.Components.State.Composition/StateAuthoringExtensions.cs +++ b/src/Components/State/FluxFlow.Components.State.Composition/StateAuthoringExtensions.cs @@ -4,22 +4,24 @@ using FluxFlow.Composition.Authoring; using FluxFlow.Mapping; +using FluxFlow.Data; + namespace FluxFlow.Components.State.Composition; public static class StateComponents { - public static ComponentContract, StateReducerResult>> StateReducer { get; } = + public static ComponentContract> StateReducer { get; } = DesignedComponentContract.Create( StateComponentDefinition.Types.Reducer, StateServiceCollectionExtensions.ConfigureReducer, static () => new StateReducerComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new InputOutputComponentHandle, StateReducerResult>(component, StateComponentDefinition.Ports.Input, StateComponentDefinition.Ports.Output, StateComponentDefinition.Ports.Events)); + static component => new InputOutputComponentHandle(component, StateComponentDefinition.Ports.Input, StateComponentDefinition.Ports.Output, StateComponentDefinition.Ports.Events)); } public static class StateAuthoringExtensions { - public static InputOutputComponentHandle, StateReducerResult> AddStateReducer( + public static InputOutputComponentHandle AddStateReducer( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -29,7 +31,7 @@ public static WorkflowDefinitionBuilder AddStateReducer( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle, StateReducerResult> reducer) + out InputOutputComponentHandle reducer) { reducer = workflow.AddStateReducer(name, configure); return workflow; diff --git a/src/FluxFlow.Components.State.Composition/StateComponentDefinition.cs b/src/Components/State/FluxFlow.Components.State.Composition/StateComponentDefinition.cs similarity index 100% rename from src/FluxFlow.Components.State.Composition/StateComponentDefinition.cs rename to src/Components/State/FluxFlow.Components.State.Composition/StateComponentDefinition.cs diff --git a/src/FluxFlow.Components.State.Composition/StateReducerConfiguration.cs b/src/Components/State/FluxFlow.Components.State.Composition/StateReducerConfiguration.cs similarity index 100% rename from src/FluxFlow.Components.State.Composition/StateReducerConfiguration.cs rename to src/Components/State/FluxFlow.Components.State.Composition/StateReducerConfiguration.cs diff --git a/src/FluxFlow.Components.State.Composition/StateServiceCollectionExtensions.cs b/src/Components/State/FluxFlow.Components.State.Composition/StateServiceCollectionExtensions.cs similarity index 93% rename from src/FluxFlow.Components.State.Composition/StateServiceCollectionExtensions.cs rename to src/Components/State/FluxFlow.Components.State.Composition/StateServiceCollectionExtensions.cs index 08b54baa..b8e5949b 100644 --- a/src/FluxFlow.Components.State.Composition/StateServiceCollectionExtensions.cs +++ b/src/Components/State/FluxFlow.Components.State.Composition/StateServiceCollectionExtensions.cs @@ -22,8 +22,8 @@ internal static void ConfigureReducer(ComponentRegistrationBuilder component) component.WithDisplay("State Reducer", "State", "Maintains keyed state by applying a reducer expression to each input message.", "database-zap", "stateReducer", 460); component .UseFactory(CreateStateReducerNode) - .HasInput(StateComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "State reducer request.", true) - .HasOutput(StateComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "State reducer result.", true) + .HasFlowValueInput(StateComponentDefinition.Ports.Input, static node => node.Input, new FluxFlow.Components.State.Materialization.StateReducerInputMaterializer().InputShape, "Input", "Messages", 0, "State reducer request.", true) + .HasFlowValueOutput(StateComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "State reducer result.", true) .HasEvents(StateComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort state diagnostics."); component.AddOption(StateComponentDefinition.Options.KeyExpression, OptionValueKind.Text, "Key Expression", "Optional expression used to resolve the state key from each input.", section: "State", importance: OptionDesignMetadataAttributeValues.Advanced, editor: OptionDesignMetadataAttributeValues.Expression, syntax: OptionDesignMetadataAttributeValues.Expression, relatedResource: StateComponentDefinition.Resources.Engine); component.AddOption(StateComponentDefinition.Options.Reducer, OptionValueKind.Text, "Reducer", "Expression evaluated once per reduce operation to produce the next state.", true, section: "State", importance: OptionDesignMetadataAttributeValues.Primary, editor: OptionDesignMetadataAttributeValues.Expression, syntax: OptionDesignMetadataAttributeValues.Expression, relatedResource: StateComponentDefinition.Resources.Engine); diff --git a/src/Components/State/FluxFlow.Components.State/CompatibilitySuppressions.xml b/src/Components/State/FluxFlow.Components.State/CompatibilitySuppressions.xml new file mode 100644 index 00000000..1573f83f --- /dev/null +++ b/src/Components/State/FluxFlow.Components.State/CompatibilitySuppressions.xml @@ -0,0 +1,34 @@ + + + + + CP0002 + M:FluxFlow.Components.State.Nodes.StateReducerNode`1.#ctor(FluxFlow.Components.State.Options.StateReducerOptions{`0},FluxFlow.Mapping.IFlowExpressionEngine,System.TimeProvider) + lib/net10.0/FluxFlow.Components.State.dll + lib/net10.0/FluxFlow.Components.State.dll + true + + + CP0002 + M:FluxFlow.Components.State.Nodes.StateReducerNode`1.#ctor(FluxFlow.Components.State.Options.StateReducerOptions{`0},FluxFlow.Mapping.IFlowExpressionEngine,System.TimeProvider) + lib/net8.0/FluxFlow.Components.State.dll + lib/net8.0/FluxFlow.Components.State.dll + true + + + CP0007 + T:FluxFlow.Components.State.Nodes.StateReducerNode`1 + lib/net10.0/FluxFlow.Components.State.dll + lib/net10.0/FluxFlow.Components.State.dll + true + + + CP0007 + T:FluxFlow.Components.State.Nodes.StateReducerNode`1 + lib/net8.0/FluxFlow.Components.State.dll + lib/net8.0/FluxFlow.Components.State.dll + true + + diff --git a/src/FluxFlow.Components.State/Contracts/StateContractNormalization.cs b/src/Components/State/FluxFlow.Components.State/Contracts/StateContractNormalization.cs similarity index 100% rename from src/FluxFlow.Components.State/Contracts/StateContractNormalization.cs rename to src/Components/State/FluxFlow.Components.State/Contracts/StateContractNormalization.cs diff --git a/src/FluxFlow.Components.State/Contracts/StateReducerInput.cs b/src/Components/State/FluxFlow.Components.State/Contracts/StateReducerInput.cs similarity index 100% rename from src/FluxFlow.Components.State/Contracts/StateReducerInput.cs rename to src/Components/State/FluxFlow.Components.State/Contracts/StateReducerInput.cs diff --git a/src/FluxFlow.Components.State/Contracts/StateReducerOperation.cs b/src/Components/State/FluxFlow.Components.State/Contracts/StateReducerOperation.cs similarity index 100% rename from src/FluxFlow.Components.State/Contracts/StateReducerOperation.cs rename to src/Components/State/FluxFlow.Components.State/Contracts/StateReducerOperation.cs diff --git a/src/FluxFlow.Components.State/Contracts/StateReducerResult.cs b/src/Components/State/FluxFlow.Components.State/Contracts/StateReducerResult.cs similarity index 100% rename from src/FluxFlow.Components.State/Contracts/StateReducerResult.cs rename to src/Components/State/FluxFlow.Components.State/Contracts/StateReducerResult.cs diff --git a/src/FluxFlow.Components.State/Diagnostics/StateDiagnosticNames.cs b/src/Components/State/FluxFlow.Components.State/Diagnostics/StateDiagnosticNames.cs similarity index 100% rename from src/FluxFlow.Components.State/Diagnostics/StateDiagnosticNames.cs rename to src/Components/State/FluxFlow.Components.State/Diagnostics/StateDiagnosticNames.cs diff --git a/src/FluxFlow.Components.State/FluxFlow.Components.State.csproj b/src/Components/State/FluxFlow.Components.State/FluxFlow.Components.State.csproj similarity index 59% rename from src/FluxFlow.Components.State/FluxFlow.Components.State.csproj rename to src/Components/State/FluxFlow.Components.State/FluxFlow.Components.State.csproj index 60020e5a..561ee8ff 100644 --- a/src/FluxFlow.Components.State/FluxFlow.Components.State.csproj +++ b/src/Components/State/FluxFlow.Components.State/FluxFlow.Components.State.csproj @@ -4,15 +4,15 @@ FluxFlow.Components.State FluxFlow.Components.State FluxFlow.Components.State - 6.0.0 + 7.0.0-rc.1 Standalone keyed typed state reduction with immutable state transitions and value-or-error outputs. workflow;dataflow;components;state;reducer - Migrates component inputs and outputs to typed FlowMessage<T> value-or-error contracts, removes universal FlowValue or FlowResult coupling, and keeps errors on the normal output. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md - - + + diff --git a/src/Components/State/FluxFlow.Components.State/Materialization/StateReducerInputMaterializer.cs b/src/Components/State/FluxFlow.Components.State/Materialization/StateReducerInputMaterializer.cs new file mode 100644 index 00000000..bf7dd03c --- /dev/null +++ b/src/Components/State/FluxFlow.Components.State/Materialization/StateReducerInputMaterializer.cs @@ -0,0 +1,13 @@ +using System.Text.Json; +using FluxFlow.Components.State.Contracts; +using FluxFlow.Data; + +namespace FluxFlow.Components.State.Materialization; + +public sealed class StateReducerInputMaterializer() + : JsonFlowValueMaterializer>( + "state.reducer.invalid_shape", + "State", + FlowValueShape.Object( + "A state reducer request object with key, input, initial state, variables, and operation.", + "key")); diff --git a/src/FluxFlow.Components.State/Nodes/StateReducerNode.cs b/src/Components/State/FluxFlow.Components.State/Nodes/StateReducerNode.cs similarity index 85% rename from src/FluxFlow.Components.State/Nodes/StateReducerNode.cs rename to src/Components/State/FluxFlow.Components.State/Nodes/StateReducerNode.cs index 5ed8580e..c41a7f78 100644 --- a/src/FluxFlow.Components.State/Nodes/StateReducerNode.cs +++ b/src/Components/State/FluxFlow.Components.State/Nodes/StateReducerNode.cs @@ -14,7 +14,7 @@ namespace FluxFlow.Components.State.Nodes; /// Maintains ordered keyed typed state and emits operation outcomes through /// one normal result output. /// -public class StateReducerNode : FlowNode, StateReducerResult> +public class StateReducerNode : FlowNode { private const int MaxTrackedRejectedKeys = 1024; @@ -23,6 +23,7 @@ public class StateReducerNode : FlowNode, StateReducerRe private readonly IFlowCompiledExpression? _keySelector; private readonly string _engineName; private readonly TimeProvider _clock; + private readonly IFlowValueMaterializer> _materializer; private readonly Dictionary _states = new(StringComparer.Ordinal); private readonly HashSet _rejectedKeys = new(StringComparer.Ordinal); private bool _rejectedKeyTrackingCapReached; @@ -30,7 +31,8 @@ public class StateReducerNode : FlowNode, StateReducerRe public StateReducerNode( StateReducerOptions options, IFlowExpressionEngine expressionEngine, - TimeProvider? clock = null) + TimeProvider? clock = null, + IFlowValueMaterializer>? materializer = null) : base(CreateNodeOptions(options)) { _options = options ?? throw new ArgumentNullException(nameof(options)); @@ -38,6 +40,7 @@ public StateReducerNode( _engineName = expressionEngine.Name; _clock = clock ?? TimeProvider.System; + _materializer = materializer ?? new DefaultStateReducerInputMaterializer(); _reducer = expressionEngine.Compile(_options.Reducer); _keySelector = string.IsNullOrWhiteSpace(_options.KeyExpression) ? null @@ -46,8 +49,41 @@ public StateReducerNode( protected override bool HandlesErrors => true; - protected override async Task ProcessAsync(FlowMessage> message) - => await EmitAsync(Process(message), Stopping).ConfigureAwait(false); + protected override async Task ProcessAsync(FlowMessage message) + { + if (message.IsError) + { + await EmitAsync(message, Stopping).ConfigureAwait(false); + return; + } + + var materialized = _materializer.Materialize(message.Value); + if (!materialized.IsSuccess) + { + var error = materialized.Error!; + EmitEvent(new FlowEvent + { + Timestamp = _clock.GetUtcNow(), + CorrelationId = message.CorrelationId, + Name = "state.reducer.rejected", + Level = FlowEventLevel.Warning, + Message = error.Message, + Attributes = new Dictionary(StringComparer.Ordinal) + { + ["errorCode"] = error.Code + } + }); + await EmitAsync(message.WithError(error), Stopping).ConfigureAwait(false); + return; + } + + var result = Process(message.ConvertValue(materialized.Value)); + await EmitAsync( + result.IsError + ? result.ConvertError() + : result.ConvertValue(FlowValue.From(result.Value)), + Stopping).ConfigureAwait(false); + } private FlowMessage> Process( FlowMessage> message) @@ -303,12 +339,26 @@ private FlowMapContext CreateContext( foreach (var (name, value) in input.Variables) { if (!string.IsNullOrWhiteSpace(name)) - variables[name] = value; + variables[name] = NormalizeVariableValue(value); } return new FlowMapContext { Variables = variables }; } + private static object? NormalizeVariableValue(object? value) + => typeof(T) == typeof(JsonElement) || value is not JsonElement element + ? value + : element.ValueKind switch + { + JsonValueKind.Null or JsonValueKind.Undefined => null, + JsonValueKind.True => true, + JsonValueKind.False => false, + JsonValueKind.String => element.GetString(), + JsonValueKind.Number when element.TryGetInt64(out var integer) => integer, + JsonValueKind.Number => element.GetDouble(), + _ => element.Clone() + }; + private T? InitialState(StateReducerInput input) { if (input.HasInitialState) @@ -437,6 +487,14 @@ private static string DiagnosticMessage(StateReducerOperation operation) private sealed record StoredState(T? State, long Version); + private sealed class DefaultStateReducerInputMaterializer() + : JsonFlowValueMaterializer>( + "state.reducer.invalid_shape", + "State", + FlowValueShape.Object( + "A state reducer request object with key, input, initial state, variables, and operation.", + "key")); + private sealed class StateOperationException( string code, string message, diff --git a/src/FluxFlow.Components.State/Options/StateOptionValidation.cs b/src/Components/State/FluxFlow.Components.State/Options/StateOptionValidation.cs similarity index 100% rename from src/FluxFlow.Components.State/Options/StateOptionValidation.cs rename to src/Components/State/FluxFlow.Components.State/Options/StateOptionValidation.cs diff --git a/src/FluxFlow.Components.State/Options/StateReducerOptions.cs b/src/Components/State/FluxFlow.Components.State/Options/StateReducerOptions.cs similarity index 100% rename from src/FluxFlow.Components.State/Options/StateReducerOptions.cs rename to src/Components/State/FluxFlow.Components.State/Options/StateReducerOptions.cs diff --git a/src/FluxFlow.Components.State/README.md b/src/Components/State/FluxFlow.Components.State/README.md similarity index 100% rename from src/FluxFlow.Components.State/README.md rename to src/Components/State/FluxFlow.Components.State/README.md diff --git a/src/FluxFlow.Components.State/StateErrorCodeNames.cs b/src/Components/State/FluxFlow.Components.State/StateErrorCodeNames.cs similarity index 100% rename from src/FluxFlow.Components.State/StateErrorCodeNames.cs rename to src/Components/State/FluxFlow.Components.State/StateErrorCodeNames.cs diff --git a/src/FluxFlow.Components.State/StateResultKinds.cs b/src/Components/State/FluxFlow.Components.State/StateResultKinds.cs similarity index 100% rename from src/FluxFlow.Components.State/StateResultKinds.cs rename to src/Components/State/FluxFlow.Components.State/StateResultKinds.cs diff --git a/src/Components/Storage/FluxFlow.Components.Storage.Composition/CompatibilitySuppressions.xml b/src/Components/Storage/FluxFlow.Components.Storage.Composition/CompatibilitySuppressions.xml new file mode 100644 index 00000000..80f0c9fb --- /dev/null +++ b/src/Components/Storage/FluxFlow.Components.Storage.Composition/CompatibilitySuppressions.xml @@ -0,0 +1,174 @@ + + + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageAuthoringExtensions.AddStorageDelete(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Storage.Composition.StorageDeleteComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Storage.Contracts.StorageDeleteRequest,FluxFlow.Components.Storage.Contracts.StorageDeleteOutcome}@) + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageAuthoringExtensions.AddStorageDelete(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Storage.Composition.StorageDeleteComponentBuilder}) + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageAuthoringExtensions.AddStorageGet(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Storage.Composition.StorageGetComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Storage.Contracts.StorageGetRequest,FluxFlow.Components.Storage.Contracts.StorageGetOutcome}@) + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageAuthoringExtensions.AddStorageGet(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Storage.Composition.StorageGetComponentBuilder}) + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageAuthoringExtensions.AddStoragePut(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Storage.Composition.StoragePutComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Storage.Contracts.StorageContentPutRequest,FluxFlow.Components.Storage.Contracts.StoragePutOutcome}@) + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageAuthoringExtensions.AddStoragePut(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Storage.Composition.StoragePutComponentBuilder}) + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageAuthoringExtensions.AddStorageQuery(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Storage.Composition.StorageQueryComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Storage.Contracts.StorageQueryRequest,FluxFlow.Components.Storage.Contracts.StorageQueryOutcome}@) + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageAuthoringExtensions.AddStorageQuery(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Storage.Composition.StorageQueryComponentBuilder}) + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageComponents.get_StorageDelete + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageComponents.get_StorageGet + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageComponents.get_StoragePut + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageComponents.get_StorageQuery + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + lib/net10.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageAuthoringExtensions.AddStorageDelete(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Storage.Composition.StorageDeleteComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Storage.Contracts.StorageDeleteRequest,FluxFlow.Components.Storage.Contracts.StorageDeleteOutcome}@) + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageAuthoringExtensions.AddStorageDelete(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Storage.Composition.StorageDeleteComponentBuilder}) + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageAuthoringExtensions.AddStorageGet(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Storage.Composition.StorageGetComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Storage.Contracts.StorageGetRequest,FluxFlow.Components.Storage.Contracts.StorageGetOutcome}@) + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageAuthoringExtensions.AddStorageGet(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Storage.Composition.StorageGetComponentBuilder}) + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageAuthoringExtensions.AddStoragePut(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Storage.Composition.StoragePutComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Storage.Contracts.StorageContentPutRequest,FluxFlow.Components.Storage.Contracts.StoragePutOutcome}@) + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageAuthoringExtensions.AddStoragePut(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Storage.Composition.StoragePutComponentBuilder}) + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageAuthoringExtensions.AddStorageQuery(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Storage.Composition.StorageQueryComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{FluxFlow.Components.Storage.Contracts.StorageQueryRequest,FluxFlow.Components.Storage.Contracts.StorageQueryOutcome}@) + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageAuthoringExtensions.AddStorageQuery(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Storage.Composition.StorageQueryComponentBuilder}) + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageComponents.get_StorageDelete + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageComponents.get_StorageGet + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageComponents.get_StoragePut + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Composition.StorageComponents.get_StorageQuery + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + lib/net8.0/FluxFlow.Components.Storage.Composition.dll + true + + diff --git a/src/FluxFlow.Components.Storage.Composition/FluxFlow.Components.Storage.Composition.csproj b/src/Components/Storage/FluxFlow.Components.Storage.Composition/FluxFlow.Components.Storage.Composition.csproj similarity index 68% rename from src/FluxFlow.Components.Storage.Composition/FluxFlow.Components.Storage.Composition.csproj rename to src/Components/Storage/FluxFlow.Components.Storage.Composition/FluxFlow.Components.Storage.Composition.csproj index eeed0b9b..4233bfc1 100644 --- a/src/FluxFlow.Components.Storage.Composition/FluxFlow.Components.Storage.Composition.csproj +++ b/src/Components/Storage/FluxFlow.Components.Storage.Composition/FluxFlow.Components.Storage.Composition.csproj @@ -5,17 +5,17 @@ FluxFlow.Components.Storage.Composition FluxFlow.Components.Storage.Composition FluxFlow.Components.Storage.Composition - 7.0.0-rc.1 + 8.0.0-rc.1 Optional canonical exact-content storage registrations over host-owned keyed stores or factories. workflow;dataflow;components;storage;composition README.md - Registers exact storage descriptors and Designer metadata through the flat designed-component API; keeps constants under StorageComponentDefinition and removes its metadata-only factory without changing runtime behavior. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. - - + + diff --git a/src/FluxFlow.Components.Storage.Composition/README.md b/src/Components/Storage/FluxFlow.Components.Storage.Composition/README.md similarity index 100% rename from src/FluxFlow.Components.Storage.Composition/README.md rename to src/Components/Storage/FluxFlow.Components.Storage.Composition/README.md diff --git a/src/FluxFlow.Components.Storage.Composition/StorageAuthoringExtensions.cs b/src/Components/Storage/FluxFlow.Components.Storage.Composition/StorageAuthoringExtensions.cs similarity index 82% rename from src/FluxFlow.Components.Storage.Composition/StorageAuthoringExtensions.cs rename to src/Components/Storage/FluxFlow.Components.Storage.Composition/StorageAuthoringExtensions.cs index d12e136a..ed3c4dc4 100644 --- a/src/FluxFlow.Components.Storage.Composition/StorageAuthoringExtensions.cs +++ b/src/Components/Storage/FluxFlow.Components.Storage.Composition/StorageAuthoringExtensions.cs @@ -2,23 +2,25 @@ using FluxFlow.Components.Designer; using FluxFlow.Composition.Authoring; +using FluxFlow.Data; + namespace FluxFlow.Components.Storage.Composition; public static class StorageComponents { - public static ComponentContract> StoragePut { get; } = + public static ComponentContract> StoragePut { get; } = Create(StorageComponentDefinition.Types.Put, StorageServiceCollectionExtensions.ConfigurePut, static (options, definition) => options.Apply(definition)); - public static ComponentContract> StorageGet { get; } = + public static ComponentContract> StorageGet { get; } = Create(StorageComponentDefinition.Types.Get, StorageServiceCollectionExtensions.ConfigureGet, static (options, definition) => options.Apply(definition)); - public static ComponentContract> StorageQuery { get; } = + public static ComponentContract> StorageQuery { get; } = Create(StorageComponentDefinition.Types.Query, StorageServiceCollectionExtensions.ConfigureQuery, static (options, definition) => options.Apply(definition)); - public static ComponentContract> StorageDelete { get; } = + public static ComponentContract> StorageDelete { get; } = Create(StorageComponentDefinition.Types.Delete, StorageServiceCollectionExtensions.ConfigureDelete, static (options, definition) => options.Apply(definition)); - private static ComponentContract> Create( + private static ComponentContract> Create( string type, Action configure, Action apply) @@ -28,12 +30,12 @@ private static ComponentContract new TOptions(), apply, - static component => new InputOutputComponentHandle(component, StorageComponentDefinition.Ports.Input, StorageComponentDefinition.Ports.Output, StorageComponentDefinition.Ports.Events)); + static component => new InputOutputComponentHandle(component, StorageComponentDefinition.Ports.Input, StorageComponentDefinition.Ports.Output, StorageComponentDefinition.Ports.Events)); } public static class StorageAuthoringExtensions { - public static InputOutputComponentHandle AddStoragePut( + public static InputOutputComponentHandle AddStoragePut( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -43,13 +45,13 @@ public static WorkflowDefinitionBuilder AddStoragePut( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle put) + out InputOutputComponentHandle put) { put = workflow.AddStoragePut(name, configure); return workflow; } - public static InputOutputComponentHandle AddStorageGet( + public static InputOutputComponentHandle AddStorageGet( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -59,13 +61,13 @@ public static WorkflowDefinitionBuilder AddStorageGet( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle get) + out InputOutputComponentHandle get) { get = workflow.AddStorageGet(name, configure); return workflow; } - public static InputOutputComponentHandle AddStorageQuery( + public static InputOutputComponentHandle AddStorageQuery( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -75,13 +77,13 @@ public static WorkflowDefinitionBuilder AddStorageQuery( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle query) + out InputOutputComponentHandle query) { query = workflow.AddStorageQuery(name, configure); return workflow; } - public static InputOutputComponentHandle AddStorageDelete( + public static InputOutputComponentHandle AddStorageDelete( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -91,7 +93,7 @@ public static WorkflowDefinitionBuilder AddStorageDelete( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle delete) + out InputOutputComponentHandle delete) { delete = workflow.AddStorageDelete(name, configure); return workflow; diff --git a/src/FluxFlow.Components.Storage.Composition/StorageComponentDefinition.cs b/src/Components/Storage/FluxFlow.Components.Storage.Composition/StorageComponentDefinition.cs similarity index 100% rename from src/FluxFlow.Components.Storage.Composition/StorageComponentDefinition.cs rename to src/Components/Storage/FluxFlow.Components.Storage.Composition/StorageComponentDefinition.cs diff --git a/src/FluxFlow.Components.Storage.Composition/StorageCompositionStoreResolver.cs b/src/Components/Storage/FluxFlow.Components.Storage.Composition/StorageCompositionStoreResolver.cs similarity index 100% rename from src/FluxFlow.Components.Storage.Composition/StorageCompositionStoreResolver.cs rename to src/Components/Storage/FluxFlow.Components.Storage.Composition/StorageCompositionStoreResolver.cs diff --git a/src/FluxFlow.Components.Storage.Composition/StorageServiceCollectionExtensions.cs b/src/Components/Storage/FluxFlow.Components.Storage.Composition/StorageServiceCollectionExtensions.cs similarity index 85% rename from src/FluxFlow.Components.Storage.Composition/StorageServiceCollectionExtensions.cs rename to src/Components/Storage/FluxFlow.Components.Storage.Composition/StorageServiceCollectionExtensions.cs index 86b72e92..118d1d93 100644 --- a/src/FluxFlow.Components.Storage.Composition/StorageServiceCollectionExtensions.cs +++ b/src/Components/Storage/FluxFlow.Components.Storage.Composition/StorageServiceCollectionExtensions.cs @@ -33,8 +33,8 @@ internal static void ConfigurePut(ComponentRegistrationBuilder component) AddCapacity(component, defaults.BoundedCapacity); component .UseFactory(CreateStoragePutNode) - .HasInput(StorageComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Exact-content storage put request.", true) - .HasOutput(StorageComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Stored or failed operation result.", true) + .HasFlowValueInput(StorageComponentDefinition.Ports.Input, static node => node.Input, new FluxFlow.Components.Storage.Materialization.StorageContentPutRequestMaterializer().InputShape, "Input", "Messages", 0, "Exact-content storage put request.", true) + .HasFlowValueOutput(StorageComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Stored or failed operation result.", true) .HasEvents(StorageComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort storage-put diagnostics."); } @@ -47,8 +47,8 @@ internal static void ConfigureGet(ComponentRegistrationBuilder component) AddCapacity(component, defaults.BoundedCapacity); component .UseFactory(CreateStorageGetNode) - .HasInput(StorageComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Storage get request.", true) - .HasOutput(StorageComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Found, missing, or failed operation result.", true) + .HasFlowValueInput(StorageComponentDefinition.Ports.Input, static node => node.Input, new FluxFlow.Components.Storage.Materialization.StorageGetRequestMaterializer().InputShape, "Input", "Messages", 0, "Storage get request.", true) + .HasFlowValueOutput(StorageComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Found, missing, or failed operation result.", true) .HasEvents(StorageComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort storage-get diagnostics."); } @@ -64,8 +64,8 @@ internal static void ConfigureQuery(ComponentRegistrationBuilder component) AddCapacity(component, defaults.BoundedCapacity); component .UseFactory(CreateStorageQueryNode) - .HasInput(StorageComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Storage query request.", true) - .HasOutput(StorageComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Completed or failed storage query result.", true) + .HasFlowValueInput(StorageComponentDefinition.Ports.Input, static node => node.Input, new FluxFlow.Components.Storage.Materialization.StorageQueryRequestMaterializer().InputShape, "Input", "Messages", 0, "Storage query request.", true) + .HasFlowValueOutput(StorageComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Completed or failed storage query result.", true) .HasEvents(StorageComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort storage-query diagnostics."); } @@ -77,8 +77,8 @@ internal static void ConfigureDelete(ComponentRegistrationBuilder component) AddCapacity(component, defaults.BoundedCapacity); component .UseFactory(CreateStorageDeleteNode) - .HasInput(StorageComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Storage delete request.", true) - .HasOutput(StorageComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Deleted, missing, or failed operation result.", true) + .HasFlowValueInput(StorageComponentDefinition.Ports.Input, static node => node.Input, new FluxFlow.Components.Storage.Materialization.StorageDeleteRequestMaterializer().InputShape, "Input", "Messages", 0, "Storage delete request.", true) + .HasFlowValueOutput(StorageComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Deleted, missing, or failed operation result.", true) .HasEvents(StorageComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort storage-delete diagnostics."); } diff --git a/src/FluxFlow.Components.Storage.FileSystem/FileSystemStorageRegistrationBuilder.cs b/src/Components/Storage/FluxFlow.Components.Storage.FileSystem/FileSystemStorageRegistrationBuilder.cs similarity index 100% rename from src/FluxFlow.Components.Storage.FileSystem/FileSystemStorageRegistrationBuilder.cs rename to src/Components/Storage/FluxFlow.Components.Storage.FileSystem/FileSystemStorageRegistrationBuilder.cs diff --git a/src/FluxFlow.Components.Storage.FileSystem/FileSystemStorageRegistrationExtensions.cs b/src/Components/Storage/FluxFlow.Components.Storage.FileSystem/FileSystemStorageRegistrationExtensions.cs similarity index 100% rename from src/FluxFlow.Components.Storage.FileSystem/FileSystemStorageRegistrationExtensions.cs rename to src/Components/Storage/FluxFlow.Components.Storage.FileSystem/FileSystemStorageRegistrationExtensions.cs diff --git a/src/FluxFlow.Components.Storage.FileSystem/FileSystemStorageServiceCollectionExtensions.cs b/src/Components/Storage/FluxFlow.Components.Storage.FileSystem/FileSystemStorageServiceCollectionExtensions.cs similarity index 100% rename from src/FluxFlow.Components.Storage.FileSystem/FileSystemStorageServiceCollectionExtensions.cs rename to src/Components/Storage/FluxFlow.Components.Storage.FileSystem/FileSystemStorageServiceCollectionExtensions.cs diff --git a/src/FluxFlow.Components.Storage.FileSystem/FileSystemStorageStore.cs b/src/Components/Storage/FluxFlow.Components.Storage.FileSystem/FileSystemStorageStore.cs similarity index 100% rename from src/FluxFlow.Components.Storage.FileSystem/FileSystemStorageStore.cs rename to src/Components/Storage/FluxFlow.Components.Storage.FileSystem/FileSystemStorageStore.cs diff --git a/src/FluxFlow.Components.Storage.FileSystem/FileSystemStorageStoreFactory.cs b/src/Components/Storage/FluxFlow.Components.Storage.FileSystem/FileSystemStorageStoreFactory.cs similarity index 100% rename from src/FluxFlow.Components.Storage.FileSystem/FileSystemStorageStoreFactory.cs rename to src/Components/Storage/FluxFlow.Components.Storage.FileSystem/FileSystemStorageStoreFactory.cs diff --git a/src/FluxFlow.Components.Storage.FileSystem/FileSystemStorageStoreOptions.cs b/src/Components/Storage/FluxFlow.Components.Storage.FileSystem/FileSystemStorageStoreOptions.cs similarity index 100% rename from src/FluxFlow.Components.Storage.FileSystem/FileSystemStorageStoreOptions.cs rename to src/Components/Storage/FluxFlow.Components.Storage.FileSystem/FileSystemStorageStoreOptions.cs diff --git a/src/FluxFlow.Components.Storage.FileSystem/FileSystemStorageStoreSettings.cs b/src/Components/Storage/FluxFlow.Components.Storage.FileSystem/FileSystemStorageStoreSettings.cs similarity index 100% rename from src/FluxFlow.Components.Storage.FileSystem/FileSystemStorageStoreSettings.cs rename to src/Components/Storage/FluxFlow.Components.Storage.FileSystem/FileSystemStorageStoreSettings.cs diff --git a/src/FluxFlow.Components.Storage.FileSystem/FluxFlow.Components.Storage.FileSystem.csproj b/src/Components/Storage/FluxFlow.Components.Storage.FileSystem/FluxFlow.Components.Storage.FileSystem.csproj similarity index 77% rename from src/FluxFlow.Components.Storage.FileSystem/FluxFlow.Components.Storage.FileSystem.csproj rename to src/Components/Storage/FluxFlow.Components.Storage.FileSystem/FluxFlow.Components.Storage.FileSystem.csproj index c57f49db..2910fd38 100644 --- a/src/FluxFlow.Components.Storage.FileSystem/FluxFlow.Components.Storage.FileSystem.csproj +++ b/src/Components/Storage/FluxFlow.Components.Storage.FileSystem/FluxFlow.Components.Storage.FileSystem.csproj @@ -4,10 +4,10 @@ FluxFlow.Components.Storage.FileSystem FluxFlow.Components.Storage.FileSystem FluxFlow.Components.Storage.FileSystem - 5.0.0 + 6.0.0-rc.1 File-system-backed storage adapter for FluxFlow storage components. workflow;dataflow;components;storage;filesystem;files - Updates to immutable Storage 7.0.0 attribute contracts and removes redundant provider copies while preserving file-system persistence behavior. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md diff --git a/src/FluxFlow.Components.Storage.FileSystem/README.md b/src/Components/Storage/FluxFlow.Components.Storage.FileSystem/README.md similarity index 100% rename from src/FluxFlow.Components.Storage.FileSystem/README.md rename to src/Components/Storage/FluxFlow.Components.Storage.FileSystem/README.md diff --git a/src/FluxFlow.Components.Storage.SqlFile/FluxFlow.Components.Storage.SqlFile.csproj b/src/Components/Storage/FluxFlow.Components.Storage.SqlFile/FluxFlow.Components.Storage.SqlFile.csproj similarity index 87% rename from src/FluxFlow.Components.Storage.SqlFile/FluxFlow.Components.Storage.SqlFile.csproj rename to src/Components/Storage/FluxFlow.Components.Storage.SqlFile/FluxFlow.Components.Storage.SqlFile.csproj index d66876d3..3a4caf02 100644 --- a/src/FluxFlow.Components.Storage.SqlFile/FluxFlow.Components.Storage.SqlFile.csproj +++ b/src/Components/Storage/FluxFlow.Components.Storage.SqlFile/FluxFlow.Components.Storage.SqlFile.csproj @@ -4,10 +4,10 @@ FluxFlow.Components.Storage.SqlFile FluxFlow.Components.Storage.SqlFile FluxFlow.Components.Storage.SqlFile - 5.0.0 + 6.0.0-rc.1 Single-file SQL storage adapter for FluxFlow storage components. workflow;dataflow;components;storage;sql;file - Updates to immutable Storage 7.0.0 attribute contracts and removes redundant provider copies while preserving SQL-file persistence behavior. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md diff --git a/src/FluxFlow.Components.Storage.SqlFile/README.md b/src/Components/Storage/FluxFlow.Components.Storage.SqlFile/README.md similarity index 100% rename from src/FluxFlow.Components.Storage.SqlFile/README.md rename to src/Components/Storage/FluxFlow.Components.Storage.SqlFile/README.md diff --git a/src/FluxFlow.Components.Storage.SqlFile/SqlFileStorageRegistrationBuilder.cs b/src/Components/Storage/FluxFlow.Components.Storage.SqlFile/SqlFileStorageRegistrationBuilder.cs similarity index 100% rename from src/FluxFlow.Components.Storage.SqlFile/SqlFileStorageRegistrationBuilder.cs rename to src/Components/Storage/FluxFlow.Components.Storage.SqlFile/SqlFileStorageRegistrationBuilder.cs diff --git a/src/FluxFlow.Components.Storage.SqlFile/SqlFileStorageRegistrationExtensions.cs b/src/Components/Storage/FluxFlow.Components.Storage.SqlFile/SqlFileStorageRegistrationExtensions.cs similarity index 100% rename from src/FluxFlow.Components.Storage.SqlFile/SqlFileStorageRegistrationExtensions.cs rename to src/Components/Storage/FluxFlow.Components.Storage.SqlFile/SqlFileStorageRegistrationExtensions.cs diff --git a/src/FluxFlow.Components.Storage.SqlFile/SqlFileStorageServiceCollectionExtensions.cs b/src/Components/Storage/FluxFlow.Components.Storage.SqlFile/SqlFileStorageServiceCollectionExtensions.cs similarity index 100% rename from src/FluxFlow.Components.Storage.SqlFile/SqlFileStorageServiceCollectionExtensions.cs rename to src/Components/Storage/FluxFlow.Components.Storage.SqlFile/SqlFileStorageServiceCollectionExtensions.cs diff --git a/src/FluxFlow.Components.Storage.SqlFile/SqlFileStorageStore.cs b/src/Components/Storage/FluxFlow.Components.Storage.SqlFile/SqlFileStorageStore.cs similarity index 100% rename from src/FluxFlow.Components.Storage.SqlFile/SqlFileStorageStore.cs rename to src/Components/Storage/FluxFlow.Components.Storage.SqlFile/SqlFileStorageStore.cs diff --git a/src/FluxFlow.Components.Storage.SqlFile/SqlFileStorageStoreFactory.cs b/src/Components/Storage/FluxFlow.Components.Storage.SqlFile/SqlFileStorageStoreFactory.cs similarity index 100% rename from src/FluxFlow.Components.Storage.SqlFile/SqlFileStorageStoreFactory.cs rename to src/Components/Storage/FluxFlow.Components.Storage.SqlFile/SqlFileStorageStoreFactory.cs diff --git a/src/FluxFlow.Components.Storage.SqlFile/SqlFileStorageStoreOptions.cs b/src/Components/Storage/FluxFlow.Components.Storage.SqlFile/SqlFileStorageStoreOptions.cs similarity index 100% rename from src/FluxFlow.Components.Storage.SqlFile/SqlFileStorageStoreOptions.cs rename to src/Components/Storage/FluxFlow.Components.Storage.SqlFile/SqlFileStorageStoreOptions.cs diff --git a/src/FluxFlow.Components.Storage.SqlFile/SqlFileStorageStoreSettings.cs b/src/Components/Storage/FluxFlow.Components.Storage.SqlFile/SqlFileStorageStoreSettings.cs similarity index 100% rename from src/FluxFlow.Components.Storage.SqlFile/SqlFileStorageStoreSettings.cs rename to src/Components/Storage/FluxFlow.Components.Storage.SqlFile/SqlFileStorageStoreSettings.cs diff --git a/src/Components/Storage/FluxFlow.Components.Storage/CompatibilitySuppressions.xml b/src/Components/Storage/FluxFlow.Components.Storage/CompatibilitySuppressions.xml new file mode 100644 index 00000000..72c4a3ea --- /dev/null +++ b/src/Components/Storage/FluxFlow.Components.Storage/CompatibilitySuppressions.xml @@ -0,0 +1,174 @@ + + + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StorageDeleteNode.get_Events + lib/net10.0/FluxFlow.Components.Storage.dll + lib/net10.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StorageDeleteNode.get_Input + lib/net10.0/FluxFlow.Components.Storage.dll + lib/net10.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StorageDeleteNode.get_Output + lib/net10.0/FluxFlow.Components.Storage.dll + lib/net10.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StorageGetNode.get_Events + lib/net10.0/FluxFlow.Components.Storage.dll + lib/net10.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StorageGetNode.get_Input + lib/net10.0/FluxFlow.Components.Storage.dll + lib/net10.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StorageGetNode.get_Output + lib/net10.0/FluxFlow.Components.Storage.dll + lib/net10.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StoragePutNode.get_Events + lib/net10.0/FluxFlow.Components.Storage.dll + lib/net10.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StoragePutNode.get_Input + lib/net10.0/FluxFlow.Components.Storage.dll + lib/net10.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StoragePutNode.get_Output + lib/net10.0/FluxFlow.Components.Storage.dll + lib/net10.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StorageQueryNode.get_Events + lib/net10.0/FluxFlow.Components.Storage.dll + lib/net10.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StorageQueryNode.get_Input + lib/net10.0/FluxFlow.Components.Storage.dll + lib/net10.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StorageQueryNode.get_Output + lib/net10.0/FluxFlow.Components.Storage.dll + lib/net10.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StorageDeleteNode.get_Events + lib/net8.0/FluxFlow.Components.Storage.dll + lib/net8.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StorageDeleteNode.get_Input + lib/net8.0/FluxFlow.Components.Storage.dll + lib/net8.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StorageDeleteNode.get_Output + lib/net8.0/FluxFlow.Components.Storage.dll + lib/net8.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StorageGetNode.get_Events + lib/net8.0/FluxFlow.Components.Storage.dll + lib/net8.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StorageGetNode.get_Input + lib/net8.0/FluxFlow.Components.Storage.dll + lib/net8.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StorageGetNode.get_Output + lib/net8.0/FluxFlow.Components.Storage.dll + lib/net8.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StoragePutNode.get_Events + lib/net8.0/FluxFlow.Components.Storage.dll + lib/net8.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StoragePutNode.get_Input + lib/net8.0/FluxFlow.Components.Storage.dll + lib/net8.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StoragePutNode.get_Output + lib/net8.0/FluxFlow.Components.Storage.dll + lib/net8.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StorageQueryNode.get_Events + lib/net8.0/FluxFlow.Components.Storage.dll + lib/net8.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StorageQueryNode.get_Input + lib/net8.0/FluxFlow.Components.Storage.dll + lib/net8.0/FluxFlow.Components.Storage.dll + true + + + CP0002 + M:FluxFlow.Components.Storage.Nodes.StorageQueryNode.get_Output + lib/net8.0/FluxFlow.Components.Storage.dll + lib/net8.0/FluxFlow.Components.Storage.dll + true + + diff --git a/src/FluxFlow.Components.Storage/Contracts/IStorageStore.cs b/src/Components/Storage/FluxFlow.Components.Storage/Contracts/IStorageStore.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Contracts/IStorageStore.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Contracts/IStorageStore.cs diff --git a/src/FluxFlow.Components.Storage/Contracts/IStorageStoreFactory.cs b/src/Components/Storage/FluxFlow.Components.Storage/Contracts/IStorageStoreFactory.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Contracts/IStorageStoreFactory.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Contracts/IStorageStoreFactory.cs diff --git a/src/FluxFlow.Components.Storage/Contracts/StorageContentContractMap.cs b/src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageContentContractMap.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Contracts/StorageContentContractMap.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageContentContractMap.cs diff --git a/src/FluxFlow.Components.Storage/Contracts/StorageContentPutRequest.cs b/src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageContentPutRequest.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Contracts/StorageContentPutRequest.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageContentPutRequest.cs diff --git a/src/FluxFlow.Components.Storage/Contracts/StorageContentRecord.cs b/src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageContentRecord.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Contracts/StorageContentRecord.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageContentRecord.cs diff --git a/src/FluxFlow.Components.Storage/Contracts/StorageContractNormalization.cs b/src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageContractNormalization.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Contracts/StorageContractNormalization.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageContractNormalization.cs diff --git a/src/FluxFlow.Components.Storage/Contracts/StorageDeleteOutcome.cs b/src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageDeleteOutcome.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Contracts/StorageDeleteOutcome.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageDeleteOutcome.cs diff --git a/src/FluxFlow.Components.Storage/Contracts/StorageDeleteRequest.cs b/src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageDeleteRequest.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Contracts/StorageDeleteRequest.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageDeleteRequest.cs diff --git a/src/FluxFlow.Components.Storage/Contracts/StorageGetOutcome.cs b/src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageGetOutcome.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Contracts/StorageGetOutcome.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageGetOutcome.cs diff --git a/src/FluxFlow.Components.Storage/Contracts/StorageGetRequest.cs b/src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageGetRequest.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Contracts/StorageGetRequest.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageGetRequest.cs diff --git a/src/FluxFlow.Components.Storage/Contracts/StoragePutOutcome.cs b/src/Components/Storage/FluxFlow.Components.Storage/Contracts/StoragePutOutcome.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Contracts/StoragePutOutcome.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Contracts/StoragePutOutcome.cs diff --git a/src/FluxFlow.Components.Storage/Contracts/StoragePutRequest.cs b/src/Components/Storage/FluxFlow.Components.Storage/Contracts/StoragePutRequest.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Contracts/StoragePutRequest.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Contracts/StoragePutRequest.cs diff --git a/src/FluxFlow.Components.Storage/Contracts/StorageQueryMatcher.cs b/src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageQueryMatcher.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Contracts/StorageQueryMatcher.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageQueryMatcher.cs diff --git a/src/FluxFlow.Components.Storage/Contracts/StorageQueryOutcome.cs b/src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageQueryOutcome.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Contracts/StorageQueryOutcome.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageQueryOutcome.cs diff --git a/src/FluxFlow.Components.Storage/Contracts/StorageQueryRequest.cs b/src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageQueryRequest.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Contracts/StorageQueryRequest.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageQueryRequest.cs diff --git a/src/FluxFlow.Components.Storage/Contracts/StorageRecord.cs b/src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageRecord.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Contracts/StorageRecord.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageRecord.cs diff --git a/src/FluxFlow.Components.Storage/Contracts/StorageResult.cs b/src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageResult.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Contracts/StorageResult.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageResult.cs diff --git a/src/FluxFlow.Components.Storage/Contracts/StorageStoreContext.cs b/src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageStoreContext.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Contracts/StorageStoreContext.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageStoreContext.cs diff --git a/src/FluxFlow.Components.Storage/Contracts/StorageStoreLease.cs b/src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageStoreLease.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Contracts/StorageStoreLease.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageStoreLease.cs diff --git a/src/FluxFlow.Components.Storage/Contracts/StorageWriteMode.cs b/src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageWriteMode.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Contracts/StorageWriteMode.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Contracts/StorageWriteMode.cs diff --git a/src/FluxFlow.Components.Storage/Diagnostics/StorageDiagnosticNames.cs b/src/Components/Storage/FluxFlow.Components.Storage/Diagnostics/StorageDiagnosticNames.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Diagnostics/StorageDiagnosticNames.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Diagnostics/StorageDiagnosticNames.cs diff --git a/src/FluxFlow.Components.Storage/FluxFlow.Components.Storage.csproj b/src/Components/Storage/FluxFlow.Components.Storage/FluxFlow.Components.Storage.csproj similarity index 69% rename from src/FluxFlow.Components.Storage/FluxFlow.Components.Storage.csproj rename to src/Components/Storage/FluxFlow.Components.Storage/FluxFlow.Components.Storage.csproj index 2386075d..15c9fd10 100644 --- a/src/FluxFlow.Components.Storage/FluxFlow.Components.Storage.csproj +++ b/src/Components/Storage/FluxFlow.Components.Storage/FluxFlow.Components.Storage.csproj @@ -4,14 +4,14 @@ FluxFlow.Components.Storage FluxFlow.Components.Storage FluxFlow.Components.Storage - 7.0.0 + 8.0.0-rc.1 Standalone logical-storage nodes with exact FlowContent operations and normal typed results over host-owned stores. workflow;dataflow;components;storage;records - Makes storage attribute maps immutable ordinal snapshots across requests, records, queries, and results while preserving store and content behavior. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md - + diff --git a/src/Components/Storage/FluxFlow.Components.Storage/Materialization/StorageRequestMaterializers.cs b/src/Components/Storage/FluxFlow.Components.Storage/Materialization/StorageRequestMaterializers.cs new file mode 100644 index 00000000..155f3b69 --- /dev/null +++ b/src/Components/Storage/FluxFlow.Components.Storage/Materialization/StorageRequestMaterializers.cs @@ -0,0 +1,28 @@ +using FluxFlow.Components.Storage.Contracts; +using FluxFlow.Data; + +namespace FluxFlow.Components.Storage.Materialization; + +public sealed class StorageContentPutRequestMaterializer() + : JsonFlowValueMaterializer( + "storage.put.invalid_shape", + "Storage", + FlowValueShape.Object("A storage put request object with key, content, and optional collection, attributes, version, expiry, and mode.", "key", "content")); + +public sealed class StorageGetRequestMaterializer() + : JsonFlowValueMaterializer( + "storage.get.invalid_shape", + "Storage", + FlowValueShape.Object("A storage get request object with key and optional collection, expiry, and correlation settings.", "key")); + +public sealed class StorageQueryRequestMaterializer() + : JsonFlowValueMaterializer( + "storage.query.invalid_shape", + "Storage", + FlowValueShape.Object("A storage query object with optional collection, key prefix, attributes, time range, paging, and correlation settings.")); + +public sealed class StorageDeleteRequestMaterializer() + : JsonFlowValueMaterializer( + "storage.delete.invalid_shape", + "Storage", + FlowValueShape.Object("A storage delete request object with key and optional collection and correlation settings.", "key")); diff --git a/src/FluxFlow.Components.Storage/Nodes/StorageContentOperationException.cs b/src/Components/Storage/FluxFlow.Components.Storage/Nodes/StorageContentOperationException.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Nodes/StorageContentOperationException.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Nodes/StorageContentOperationException.cs diff --git a/src/FluxFlow.Components.Storage/Nodes/StorageContentRecordMapper.cs b/src/Components/Storage/FluxFlow.Components.Storage/Nodes/StorageContentRecordMapper.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Nodes/StorageContentRecordMapper.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Nodes/StorageContentRecordMapper.cs diff --git a/src/FluxFlow.Components.Storage/Nodes/StorageDeleteNode.cs b/src/Components/Storage/FluxFlow.Components.Storage/Nodes/StorageDeleteNode.cs similarity index 92% rename from src/FluxFlow.Components.Storage/Nodes/StorageDeleteNode.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Nodes/StorageDeleteNode.cs index bd063e13..0b99d0ef 100644 --- a/src/FluxFlow.Components.Storage/Nodes/StorageDeleteNode.cs +++ b/src/Components/Storage/FluxFlow.Components.Storage/Nodes/StorageDeleteNode.cs @@ -26,14 +26,19 @@ public StorageDeleteNode( _store = store ?? throw new ArgumentNullException(nameof(store)); _options = options ?? StorageDeleteOptions.Default; _clock = clock ?? TimeProvider.System; - _pipeline = new(_options.BoundedCapacity, ProcessAsync); + _pipeline = new( + _options.BoundedCapacity, + _clock, + new Materialization.StorageDeleteRequestMaterializer(), + "storage.delete.rejected", + ProcessAsync); } - public ITargetBlock> Input => _pipeline.Input; + public ITargetBlock Input => _pipeline.Input; - public ISourceBlock> Output => _pipeline.Output; + public ISourceBlock Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; diff --git a/src/FluxFlow.Components.Storage/Nodes/StorageGetNode.cs b/src/Components/Storage/FluxFlow.Components.Storage/Nodes/StorageGetNode.cs similarity index 92% rename from src/FluxFlow.Components.Storage/Nodes/StorageGetNode.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Nodes/StorageGetNode.cs index cce1ac38..56bebc09 100644 --- a/src/FluxFlow.Components.Storage/Nodes/StorageGetNode.cs +++ b/src/Components/Storage/FluxFlow.Components.Storage/Nodes/StorageGetNode.cs @@ -26,14 +26,19 @@ public StorageGetNode( _store = store ?? throw new ArgumentNullException(nameof(store)); _options = options ?? StorageGetOptions.Default; _clock = clock ?? TimeProvider.System; - _pipeline = new(_options.BoundedCapacity, ProcessAsync); + _pipeline = new( + _options.BoundedCapacity, + _clock, + new Materialization.StorageGetRequestMaterializer(), + "storage.get.rejected", + ProcessAsync); } - public ITargetBlock> Input => _pipeline.Input; + public ITargetBlock Input => _pipeline.Input; - public ISourceBlock> Output => _pipeline.Output; + public ISourceBlock Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; diff --git a/src/FluxFlow.Components.Storage/Nodes/StorageNodeSupport.cs b/src/Components/Storage/FluxFlow.Components.Storage/Nodes/StorageNodeSupport.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Nodes/StorageNodeSupport.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Nodes/StorageNodeSupport.cs diff --git a/src/Components/Storage/FluxFlow.Components.Storage/Nodes/StorageOperationPipeline.cs b/src/Components/Storage/FluxFlow.Components.Storage/Nodes/StorageOperationPipeline.cs new file mode 100644 index 00000000..32993896 --- /dev/null +++ b/src/Components/Storage/FluxFlow.Components.Storage/Nodes/StorageOperationPipeline.cs @@ -0,0 +1,84 @@ +using FluxFlow.Data; +using FluxFlow.Nodes; + +namespace FluxFlow.Components.Storage.Nodes; + +internal sealed class StorageOperationPipeline : FlowNode +{ + private readonly TimeProvider _clock; + private readonly IFlowValueMaterializer _materializer; + private readonly string _rejectionEventName; + private readonly Func, CancellationToken, Task>> _process; + + public StorageOperationPipeline( + int boundedCapacity, + TimeProvider clock, + IFlowValueMaterializer materializer, + string rejectionEventName, + Func, CancellationToken, Task>> process) + : base(CreateOptions(boundedCapacity)) + { + ArgumentNullException.ThrowIfNull(clock); + ArgumentNullException.ThrowIfNull(materializer); + ArgumentException.ThrowIfNullOrWhiteSpace(rejectionEventName); + ArgumentNullException.ThrowIfNull(process); + _clock = clock; + _materializer = materializer; + _rejectionEventName = rejectionEventName; + _process = process; + } + + public void PublishEvent(FlowEvent value) + { + ArgumentNullException.ThrowIfNull(value); + EmitEvent(value); + } + + protected override bool HandlesErrors => true; + + protected override async Task ProcessAsync(FlowMessage message) + { + if (message.IsError) + { + await EmitAsync(message, Stopping).ConfigureAwait(false); + return; + } + + var materialized = _materializer.Materialize(message.Value); + if (!materialized.IsSuccess) + { + var error = materialized.Error!; + EmitEvent(new FlowEvent + { + Timestamp = _clock.GetUtcNow(), + CorrelationId = message.CorrelationId, + Name = _rejectionEventName, + Level = FlowEventLevel.Warning, + Message = error.Message, + Attributes = new Dictionary(StringComparer.Ordinal) + { + ["errorCode"] = error.Code + } + }); + await EmitAsync(message.WithError(error), Stopping).ConfigureAwait(false); + return; + } + + var typedMessage = message.ConvertValue(materialized.Value); + var typedResult = await _process(typedMessage, Stopping).ConfigureAwait(false); + var result = typedResult.IsError + ? typedResult.ConvertError() + : typedResult.ConvertValue(FlowValue.From(typedResult.Value)); + await EmitAsync(result, Stopping).ConfigureAwait(false); + } + + private static FlowNodeOptions CreateOptions(int boundedCapacity) + { + ArgumentOutOfRangeException.ThrowIfLessThan(boundedCapacity, 1); + return new FlowNodeOptions + { + InputCapacity = boundedCapacity, + OutputCapacity = boundedCapacity + }; + } +} diff --git a/src/FluxFlow.Components.Storage/Nodes/StoragePutNode.cs b/src/Components/Storage/FluxFlow.Components.Storage/Nodes/StoragePutNode.cs similarity index 94% rename from src/FluxFlow.Components.Storage/Nodes/StoragePutNode.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Nodes/StoragePutNode.cs index 11427eb8..3ee7e3cc 100644 --- a/src/FluxFlow.Components.Storage/Nodes/StoragePutNode.cs +++ b/src/Components/Storage/FluxFlow.Components.Storage/Nodes/StoragePutNode.cs @@ -28,14 +28,17 @@ public StoragePutNode( _clock = clock ?? TimeProvider.System; _pipeline = new( _options.BoundedCapacity, + _clock, + new Materialization.StorageContentPutRequestMaterializer(), + "storage.put.rejected", ProcessAsync); } - public ITargetBlock> Input => _pipeline.Input; + public ITargetBlock Input => _pipeline.Input; - public ISourceBlock> Output => _pipeline.Output; + public ISourceBlock Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; diff --git a/src/FluxFlow.Components.Storage/Nodes/StorageQueryNode.cs b/src/Components/Storage/FluxFlow.Components.Storage/Nodes/StorageQueryNode.cs similarity index 93% rename from src/FluxFlow.Components.Storage/Nodes/StorageQueryNode.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Nodes/StorageQueryNode.cs index 93baaff8..79622ea9 100644 --- a/src/FluxFlow.Components.Storage/Nodes/StorageQueryNode.cs +++ b/src/Components/Storage/FluxFlow.Components.Storage/Nodes/StorageQueryNode.cs @@ -26,14 +26,19 @@ public StorageQueryNode( _store = store ?? throw new ArgumentNullException(nameof(store)); _options = options ?? StorageQueryOptions.Default; _clock = clock ?? TimeProvider.System; - _pipeline = new(_options.BoundedCapacity, ProcessAsync); + _pipeline = new( + _options.BoundedCapacity, + _clock, + new Materialization.StorageQueryRequestMaterializer(), + "storage.query.rejected", + ProcessAsync); } - public ITargetBlock> Input => _pipeline.Input; + public ITargetBlock Input => _pipeline.Input; - public ISourceBlock> Output => _pipeline.Output; + public ISourceBlock Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; diff --git a/src/FluxFlow.Components.Storage/Options/StorageComponentOptions.cs b/src/Components/Storage/FluxFlow.Components.Storage/Options/StorageComponentOptions.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Options/StorageComponentOptions.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Options/StorageComponentOptions.cs diff --git a/src/FluxFlow.Components.Storage/Options/StorageDeleteOptions.cs b/src/Components/Storage/FluxFlow.Components.Storage/Options/StorageDeleteOptions.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Options/StorageDeleteOptions.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Options/StorageDeleteOptions.cs diff --git a/src/FluxFlow.Components.Storage/Options/StorageGetOptions.cs b/src/Components/Storage/FluxFlow.Components.Storage/Options/StorageGetOptions.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Options/StorageGetOptions.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Options/StorageGetOptions.cs diff --git a/src/FluxFlow.Components.Storage/Options/StorageOptionValidation.cs b/src/Components/Storage/FluxFlow.Components.Storage/Options/StorageOptionValidation.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Options/StorageOptionValidation.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Options/StorageOptionValidation.cs diff --git a/src/FluxFlow.Components.Storage/Options/StoragePutOptions.cs b/src/Components/Storage/FluxFlow.Components.Storage/Options/StoragePutOptions.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Options/StoragePutOptions.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Options/StoragePutOptions.cs diff --git a/src/FluxFlow.Components.Storage/Options/StorageQueryOptions.cs b/src/Components/Storage/FluxFlow.Components.Storage/Options/StorageQueryOptions.cs similarity index 100% rename from src/FluxFlow.Components.Storage/Options/StorageQueryOptions.cs rename to src/Components/Storage/FluxFlow.Components.Storage/Options/StorageQueryOptions.cs diff --git a/src/FluxFlow.Components.Storage/README.md b/src/Components/Storage/FluxFlow.Components.Storage/README.md similarity index 100% rename from src/FluxFlow.Components.Storage/README.md rename to src/Components/Storage/FluxFlow.Components.Storage/README.md diff --git a/src/FluxFlow.Components.Storage/StorageErrorCodeNames.cs b/src/Components/Storage/FluxFlow.Components.Storage/StorageErrorCodeNames.cs similarity index 100% rename from src/FluxFlow.Components.Storage/StorageErrorCodeNames.cs rename to src/Components/Storage/FluxFlow.Components.Storage/StorageErrorCodeNames.cs diff --git a/src/FluxFlow.Components.Storage/StorageResultKinds.cs b/src/Components/Storage/FluxFlow.Components.Storage/StorageResultKinds.cs similarity index 100% rename from src/FluxFlow.Components.Storage/StorageResultKinds.cs rename to src/Components/Storage/FluxFlow.Components.Storage/StorageResultKinds.cs diff --git a/src/Components/Timers/FluxFlow.Components.Timers.Composition/CompatibilitySuppressions.xml b/src/Components/Timers/FluxFlow.Components.Timers.Composition/CompatibilitySuppressions.xml new file mode 100644 index 00000000..be0956c6 --- /dev/null +++ b/src/Components/Timers/FluxFlow.Components.Timers.Composition/CompatibilitySuppressions.xml @@ -0,0 +1,216 @@ + + + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersAuthoringExtensions.AddDebounce(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Timers.Composition.DebounceComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,System.Text.Json.JsonElement}@) + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersAuthoringExtensions.AddDebounce(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Timers.Composition.DebounceComponentBuilder}) + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersAuthoringExtensions.AddDelay(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Timers.Composition.DelayComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,System.Text.Json.JsonElement}@) + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersAuthoringExtensions.AddDelay(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Timers.Composition.DelayComponentBuilder}) + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersAuthoringExtensions.AddIntervalTimer(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Timers.Composition.IntervalTimerComponentBuilder},FluxFlow.Composition.Authoring.OutputComponentHandle{FluxFlow.Components.Timers.Contracts.TimerIntervalTick}@) + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersAuthoringExtensions.AddIntervalTimer(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Timers.Composition.IntervalTimerComponentBuilder}) + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersAuthoringExtensions.AddScheduleTimer(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Timers.Composition.ScheduleTimerComponentBuilder},FluxFlow.Composition.Authoring.OutputComponentHandle{FluxFlow.Components.Timers.Contracts.TimerScheduleTick}@) + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersAuthoringExtensions.AddScheduleTimer(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Timers.Composition.ScheduleTimerComponentBuilder}) + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersAuthoringExtensions.AddThrottle(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Timers.Composition.ThrottleComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,System.Text.Json.JsonElement}@) + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersAuthoringExtensions.AddThrottle(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Timers.Composition.ThrottleComponentBuilder}) + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersComponents.get_Debounce + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersComponents.get_Delay + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersComponents.get_IntervalTimer + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersComponents.get_ScheduleTimer + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersComponents.get_Throttle + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + lib/net10.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersAuthoringExtensions.AddDebounce(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Timers.Composition.DebounceComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,System.Text.Json.JsonElement}@) + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersAuthoringExtensions.AddDebounce(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Timers.Composition.DebounceComponentBuilder}) + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersAuthoringExtensions.AddDelay(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Timers.Composition.DelayComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,System.Text.Json.JsonElement}@) + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersAuthoringExtensions.AddDelay(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Timers.Composition.DelayComponentBuilder}) + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersAuthoringExtensions.AddIntervalTimer(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Timers.Composition.IntervalTimerComponentBuilder},FluxFlow.Composition.Authoring.OutputComponentHandle{FluxFlow.Components.Timers.Contracts.TimerIntervalTick}@) + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersAuthoringExtensions.AddIntervalTimer(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Timers.Composition.IntervalTimerComponentBuilder}) + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersAuthoringExtensions.AddScheduleTimer(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Timers.Composition.ScheduleTimerComponentBuilder},FluxFlow.Composition.Authoring.OutputComponentHandle{FluxFlow.Components.Timers.Contracts.TimerScheduleTick}@) + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersAuthoringExtensions.AddScheduleTimer(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Timers.Composition.ScheduleTimerComponentBuilder}) + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersAuthoringExtensions.AddThrottle(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Timers.Composition.ThrottleComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,System.Text.Json.JsonElement}@) + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersAuthoringExtensions.AddThrottle(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Timers.Composition.ThrottleComponentBuilder}) + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersComponents.get_Debounce + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersComponents.get_Delay + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersComponents.get_IntervalTimer + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersComponents.get_ScheduleTimer + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Composition.TimersComponents.get_Throttle + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + lib/net8.0/FluxFlow.Components.Timers.Composition.dll + true + + diff --git a/src/FluxFlow.Components.Timers.Composition/FluxFlow.Components.Timers.Composition.csproj b/src/Components/Timers/FluxFlow.Components.Timers.Composition/FluxFlow.Components.Timers.Composition.csproj similarity index 63% rename from src/FluxFlow.Components.Timers.Composition/FluxFlow.Components.Timers.Composition.csproj rename to src/Components/Timers/FluxFlow.Components.Timers.Composition/FluxFlow.Components.Timers.Composition.csproj index 6a90cd9d..4888c1a7 100644 --- a/src/FluxFlow.Components.Timers.Composition/FluxFlow.Components.Timers.Composition.csproj +++ b/src/Components/Timers/FluxFlow.Components.Timers.Composition/FluxFlow.Components.Timers.Composition.csproj @@ -5,17 +5,17 @@ FluxFlow.Components.Timers.Composition FluxFlow.Components.Timers.Composition FluxFlow.Components.Timers.Composition - 7.0.0-rc.1 + 8.0.0-rc.1 Optional FluxFlow.Composition registrations and Designer metadata for typed timer sources and transforms over host-owned keyed clocks. workflow;dataflow;components;timers;composition README.md - Registers exact timer descriptors and Designer metadata through the flat designed-component API; keeps constants under TimersComponentDefinition and removes its metadata-only factory without changing runtime behavior. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. - - + + diff --git a/src/FluxFlow.Components.Timers.Composition/README.md b/src/Components/Timers/FluxFlow.Components.Timers.Composition/README.md similarity index 100% rename from src/FluxFlow.Components.Timers.Composition/README.md rename to src/Components/Timers/FluxFlow.Components.Timers.Composition/README.md diff --git a/src/FluxFlow.Components.Timers.Composition/TimersAuthoringExtensions.cs b/src/Components/Timers/FluxFlow.Components.Timers.Composition/TimersAuthoringExtensions.cs similarity index 84% rename from src/FluxFlow.Components.Timers.Composition/TimersAuthoringExtensions.cs rename to src/Components/Timers/FluxFlow.Components.Timers.Composition/TimersAuthoringExtensions.cs index 746757c7..2ba5d751 100644 --- a/src/FluxFlow.Components.Timers.Composition/TimersAuthoringExtensions.cs +++ b/src/Components/Timers/FluxFlow.Components.Timers.Composition/TimersAuthoringExtensions.cs @@ -3,26 +3,28 @@ using FluxFlow.Components.Designer; using FluxFlow.Composition.Authoring; +using FluxFlow.Data; + namespace FluxFlow.Components.Timers.Composition; public static class TimersComponents { - public static ComponentContract> IntervalTimer { get; } = + public static ComponentContract> IntervalTimer { get; } = CreateSource(TimersComponentDefinition.Types.Interval, TimersServiceCollectionExtensions.ConfigureInterval, static (options, definition) => options.Apply(definition)); - public static ComponentContract> ScheduleTimer { get; } = + public static ComponentContract> ScheduleTimer { get; } = CreateSource(TimersComponentDefinition.Types.Schedule, TimersServiceCollectionExtensions.ConfigureSchedule, static (options, definition) => options.Apply(definition)); - public static ComponentContract> Delay { get; } = + public static ComponentContract> Delay { get; } = CreateTransform(TimersComponentDefinition.Types.Delay, TimersServiceCollectionExtensions.ConfigureDelay, static (options, definition) => options.Apply(definition)); - public static ComponentContract> Throttle { get; } = + public static ComponentContract> Throttle { get; } = CreateTransform(TimersComponentDefinition.Types.Throttle, TimersServiceCollectionExtensions.ConfigureThrottle, static (options, definition) => options.Apply(definition)); - public static ComponentContract> Debounce { get; } = + public static ComponentContract> Debounce { get; } = CreateTransform(TimersComponentDefinition.Types.Debounce, TimersServiceCollectionExtensions.ConfigureDebounce, static (options, definition) => options.Apply(definition)); - private static ComponentContract> CreateSource( + private static ComponentContract> CreateSource( string type, Action configure, Action apply) @@ -32,9 +34,9 @@ private static ComponentContract> Creat configure, static () => new TOptions(), apply, - static component => new OutputComponentHandle(component, TimersComponentDefinition.Ports.Output, TimersComponentDefinition.Ports.Events)); + static component => new OutputComponentHandle(component, TimersComponentDefinition.Ports.Output, TimersComponentDefinition.Ports.Events)); - private static ComponentContract> CreateTransform( + private static ComponentContract> CreateTransform( string type, Action configure, Action apply) @@ -44,12 +46,12 @@ private static ComponentContract new TOptions(), apply, - static component => new InputOutputComponentHandle(component, TimersComponentDefinition.Ports.Input, TimersComponentDefinition.Ports.Output, TimersComponentDefinition.Ports.Events)); + static component => new InputOutputComponentHandle(component, TimersComponentDefinition.Ports.Input, TimersComponentDefinition.Ports.Output, TimersComponentDefinition.Ports.Events)); } public static class TimersAuthoringExtensions { - public static OutputComponentHandle AddIntervalTimer( + public static OutputComponentHandle AddIntervalTimer( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -59,13 +61,13 @@ public static WorkflowDefinitionBuilder AddIntervalTimer( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out OutputComponentHandle timer) + out OutputComponentHandle timer) { timer = workflow.AddIntervalTimer(name, configure); return workflow; } - public static OutputComponentHandle AddScheduleTimer( + public static OutputComponentHandle AddScheduleTimer( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -75,13 +77,13 @@ public static WorkflowDefinitionBuilder AddScheduleTimer( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out OutputComponentHandle timer) + out OutputComponentHandle timer) { timer = workflow.AddScheduleTimer(name, configure); return workflow; } - public static InputOutputComponentHandle AddDelay( + public static InputOutputComponentHandle AddDelay( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -91,13 +93,13 @@ public static WorkflowDefinitionBuilder AddDelay( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle delay) + out InputOutputComponentHandle delay) { delay = workflow.AddDelay(name, configure); return workflow; } - public static InputOutputComponentHandle AddThrottle( + public static InputOutputComponentHandle AddThrottle( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -107,13 +109,13 @@ public static WorkflowDefinitionBuilder AddThrottle( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle throttle) + out InputOutputComponentHandle throttle) { throttle = workflow.AddThrottle(name, configure); return workflow; } - public static InputOutputComponentHandle AddDebounce( + public static InputOutputComponentHandle AddDebounce( this WorkflowDefinitionBuilder workflow, string name, Action configure) @@ -123,7 +125,7 @@ public static WorkflowDefinitionBuilder AddDebounce( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle debounce) + out InputOutputComponentHandle debounce) { debounce = workflow.AddDebounce(name, configure); return workflow; diff --git a/src/FluxFlow.Components.Timers.Composition/TimersComponentDefinition.cs b/src/Components/Timers/FluxFlow.Components.Timers.Composition/TimersComponentDefinition.cs similarity index 100% rename from src/FluxFlow.Components.Timers.Composition/TimersComponentDefinition.cs rename to src/Components/Timers/FluxFlow.Components.Timers.Composition/TimersComponentDefinition.cs diff --git a/src/FluxFlow.Components.Timers.Composition/TimersServiceCollectionExtensions.cs b/src/Components/Timers/FluxFlow.Components.Timers.Composition/TimersServiceCollectionExtensions.cs similarity index 82% rename from src/FluxFlow.Components.Timers.Composition/TimersServiceCollectionExtensions.cs rename to src/Components/Timers/FluxFlow.Components.Timers.Composition/TimersServiceCollectionExtensions.cs index 3a715c58..094cbdc8 100644 --- a/src/FluxFlow.Components.Timers.Composition/TimersServiceCollectionExtensions.cs +++ b/src/Components/Timers/FluxFlow.Components.Timers.Composition/TimersServiceCollectionExtensions.cs @@ -1,10 +1,13 @@ using System.Text.Json; +using System.Threading.Tasks.Dataflow; using FluxFlow.Components.Designer; using FluxFlow.Components.Designer.Contracts; using FluxFlow.Components.Timers.Contracts; using FluxFlow.Components.Timers.Nodes; using FluxFlow.Components.Timers.Options; using FluxFlow.Composition; +using FluxFlow.Data; +using FluxFlow.Nodes; namespace FluxFlow.Components.Timers.Composition; @@ -32,7 +35,7 @@ internal static void ConfigureInterval(ComponentRegistrationBuilder component) AddCapacity(component); component .UseFactory(CreateTimerIntervalNode) - .HasOutput(TimersComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 1, "Interval timer tick.", true) + .HasFlowValueOutput(TimersComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 1, "Interval timer tick.", true) .HasEvents(TimersComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort interval-timer diagnostics."); } @@ -47,7 +50,7 @@ internal static void ConfigureSchedule(ComponentRegistrationBuilder component) AddCapacity(component); component .UseFactory(CreateTimerScheduleNode) - .HasOutput(TimersComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 1, "Scheduled timer tick.", true) + .HasFlowValueOutput(TimersComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 1, "Scheduled timer tick.", true) .HasEvents(TimersComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort schedule-timer diagnostics."); } @@ -59,8 +62,8 @@ internal static void ConfigureDelay(ComponentRegistrationBuilder component) AddCapacity(component); component .UseFactory(CreateTimerDelayNode) - .HasInput(TimersComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Schema-less JSON value.", true) - .HasOutput(TimersComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 1, "Delayed JSON value; failures use the message error case.", true) + .HasFlowValueInput(TimersComponentDefinition.Ports.Input, static node => node.Input, FlowValueShape.Any("Any canonical workflow value."), "Input", "Messages", 0, "Schema-less JSON value.", true) + .HasFlowValueOutput(TimersComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 1, "Delayed JSON value; failures use the message error case.", true) .HasEvents(TimersComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort delay diagnostics."); } @@ -73,8 +76,8 @@ internal static void ConfigureThrottle(ComponentRegistrationBuilder component) AddCapacity(component); component .UseFactory(CreateTimerThrottleNode) - .HasInput(TimersComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Schema-less JSON value.", true) - .HasOutput(TimersComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 1, "Rate-limited JSON value; failures use the message error case.", true) + .HasFlowValueInput(TimersComponentDefinition.Ports.Input, static node => node.Input, FlowValueShape.Any("Any canonical workflow value."), "Input", "Messages", 0, "Schema-less JSON value.", true) + .HasFlowValueOutput(TimersComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 1, "Rate-limited JSON value; failures use the message error case.", true) .HasEvents(TimersComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort throttle diagnostics."); } @@ -86,8 +89,8 @@ internal static void ConfigureDebounce(ComponentRegistrationBuilder component) AddCapacity(component); component .UseFactory(CreateTimerDebounceNode) - .HasInput(TimersComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Schema-less JSON value.", true) - .HasOutput(TimersComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 1, "Debounced JSON value; failures use the message error case.", true) + .HasFlowValueInput(TimersComponentDefinition.Ports.Input, static node => node.Input, FlowValueShape.Any("Any canonical workflow value."), "Input", "Messages", 0, "Schema-less JSON value.", true) + .HasFlowValueOutput(TimersComponentDefinition.Ports.Output, static node => node.Output, "Output", "Messages", 1, "Debounced JSON value; failures use the message error case.", true) .HasEvents(TimersComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort debounce diagnostics."); } @@ -124,31 +127,30 @@ private static TimerScheduleNode CreateTimerScheduleNode( return new TimerScheduleNode(settings, clock); } - private static TimerDelayNode CreateTimerDelayNode( + private static FlowValueTimerDelayNode CreateTimerDelayNode( ComponentActivationContext context) { var settings = context.BindConfiguration(); var clock = context.GetResource( TimersComponentDefinition.Resources.Clock); - return new TimerDelayNode(settings, clock); + return new FlowValueTimerDelayNode(settings, clock); } - private static TimerThrottleNode CreateTimerThrottleNode( + private static FlowValueTimerThrottleNode CreateTimerThrottleNode( ComponentActivationContext context) { var settings = context.BindConfiguration(); var clock = context.GetResource( TimersComponentDefinition.Resources.Clock); - return new TimerThrottleNode(settings, clock); + return new FlowValueTimerThrottleNode(settings, clock); } - private static TimerDebounceNode CreateTimerDebounceNode( + private static FlowValueTimerDebounceNode CreateTimerDebounceNode( ComponentActivationContext context) { var settings = context.BindConfiguration(); var clock = context.GetResource( TimersComponentDefinition.Resources.Clock); - return new TimerDebounceNode(settings, clock); + return new FlowValueTimerDebounceNode(settings, clock); } - } diff --git a/src/Components/Timers/FluxFlow.Components.Timers/CompatibilitySuppressions.xml b/src/Components/Timers/FluxFlow.Components.Timers/CompatibilitySuppressions.xml new file mode 100644 index 00000000..b4eb735c --- /dev/null +++ b/src/Components/Timers/FluxFlow.Components.Timers/CompatibilitySuppressions.xml @@ -0,0 +1,104 @@ + + + + + CP0002 + M:FluxFlow.Components.Timers.Nodes.TimerDebounceNode`1.get_Events + lib/net10.0/FluxFlow.Components.Timers.dll + lib/net10.0/FluxFlow.Components.Timers.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Nodes.TimerDelayNode`1.get_Events + lib/net10.0/FluxFlow.Components.Timers.dll + lib/net10.0/FluxFlow.Components.Timers.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Nodes.TimerIntervalNode.get_Events + lib/net10.0/FluxFlow.Components.Timers.dll + lib/net10.0/FluxFlow.Components.Timers.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Nodes.TimerIntervalNode.get_Output + lib/net10.0/FluxFlow.Components.Timers.dll + lib/net10.0/FluxFlow.Components.Timers.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Nodes.TimerScheduleNode.get_Events + lib/net10.0/FluxFlow.Components.Timers.dll + lib/net10.0/FluxFlow.Components.Timers.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Nodes.TimerScheduleNode.get_Output + lib/net10.0/FluxFlow.Components.Timers.dll + lib/net10.0/FluxFlow.Components.Timers.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Nodes.TimerThrottleNode`1.get_Events + lib/net10.0/FluxFlow.Components.Timers.dll + lib/net10.0/FluxFlow.Components.Timers.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Nodes.TimerDebounceNode`1.get_Events + lib/net8.0/FluxFlow.Components.Timers.dll + lib/net8.0/FluxFlow.Components.Timers.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Nodes.TimerDelayNode`1.get_Events + lib/net8.0/FluxFlow.Components.Timers.dll + lib/net8.0/FluxFlow.Components.Timers.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Nodes.TimerIntervalNode.get_Events + lib/net8.0/FluxFlow.Components.Timers.dll + lib/net8.0/FluxFlow.Components.Timers.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Nodes.TimerIntervalNode.get_Output + lib/net8.0/FluxFlow.Components.Timers.dll + lib/net8.0/FluxFlow.Components.Timers.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Nodes.TimerScheduleNode.get_Events + lib/net8.0/FluxFlow.Components.Timers.dll + lib/net8.0/FluxFlow.Components.Timers.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Nodes.TimerScheduleNode.get_Output + lib/net8.0/FluxFlow.Components.Timers.dll + lib/net8.0/FluxFlow.Components.Timers.dll + true + + + CP0002 + M:FluxFlow.Components.Timers.Nodes.TimerThrottleNode`1.get_Events + lib/net8.0/FluxFlow.Components.Timers.dll + lib/net8.0/FluxFlow.Components.Timers.dll + true + + diff --git a/src/FluxFlow.Components.Timers/Contracts/TimerIntervalTick.cs b/src/Components/Timers/FluxFlow.Components.Timers/Contracts/TimerIntervalTick.cs similarity index 100% rename from src/FluxFlow.Components.Timers/Contracts/TimerIntervalTick.cs rename to src/Components/Timers/FluxFlow.Components.Timers/Contracts/TimerIntervalTick.cs diff --git a/src/FluxFlow.Components.Timers/Contracts/TimerScheduleTick.cs b/src/Components/Timers/FluxFlow.Components.Timers/Contracts/TimerScheduleTick.cs similarity index 100% rename from src/FluxFlow.Components.Timers/Contracts/TimerScheduleTick.cs rename to src/Components/Timers/FluxFlow.Components.Timers/Contracts/TimerScheduleTick.cs diff --git a/src/FluxFlow.Components.Timers/Diagnostics/TimerDiagnosticNames.cs b/src/Components/Timers/FluxFlow.Components.Timers/Diagnostics/TimerDiagnosticNames.cs similarity index 100% rename from src/FluxFlow.Components.Timers/Diagnostics/TimerDiagnosticNames.cs rename to src/Components/Timers/FluxFlow.Components.Timers/Diagnostics/TimerDiagnosticNames.cs diff --git a/src/FluxFlow.Components.Timers/FluxFlow.Components.Timers.csproj b/src/Components/Timers/FluxFlow.Components.Timers/FluxFlow.Components.Timers.csproj similarity index 66% rename from src/FluxFlow.Components.Timers/FluxFlow.Components.Timers.csproj rename to src/Components/Timers/FluxFlow.Components.Timers/FluxFlow.Components.Timers.csproj index 5b78d1f3..5fc17626 100644 --- a/src/FluxFlow.Components.Timers/FluxFlow.Components.Timers.csproj +++ b/src/Components/Timers/FluxFlow.Components.Timers/FluxFlow.Components.Timers.csproj @@ -4,14 +4,14 @@ FluxFlow.Components.Timers FluxFlow.Components.Timers FluxFlow.Components.Timers - 6.0.0 + 7.0.0-rc.1 Standalone typed timer sources and transforms with deterministic clocks, value-or-error outputs, and component events. No engine required. workflow;dataflow;components;timers - Migrates component inputs and outputs to typed FlowMessage<T> value-or-error contracts, removes universal FlowValue or FlowResult coupling, and keeps errors on the normal output. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md - + diff --git a/src/Components/Timers/FluxFlow.Components.Timers/Nodes/FlowValueTimerDebounceNode.cs b/src/Components/Timers/FluxFlow.Components.Timers/Nodes/FlowValueTimerDebounceNode.cs new file mode 100644 index 00000000..3833c15e --- /dev/null +++ b/src/Components/Timers/FluxFlow.Components.Timers/Nodes/FlowValueTimerDebounceNode.cs @@ -0,0 +1,266 @@ +using System.Text.Json; +using System.Threading.Tasks.Dataflow; +using FluxFlow.Components.Timers.Diagnostics; +using FluxFlow.Components.Timers.Options; +using FluxFlow.Nodes; + +namespace FluxFlow.Components.Timers.Nodes; + +/// +/// Debounces canonical workflow values without changing their data contract. +/// +internal sealed class FlowValueTimerDebounceNode : IFlowNode +{ + private const string NodeType = "timer.debounce"; + private readonly TimerDebounceSettings _settings; + private readonly TimeProvider _clock; + private readonly TimerResultPipeline _pipeline; + private readonly ActionBlock _emissions; + private readonly object _gate = new(); + private long _latestSequence; + private FlowMessage? _pending; + private ITimer? _timer; + private bool _acceptEmissions = true; + + public FlowValueTimerDebounceNode( + TimerDebounceSettings settings, + TimeProvider? clock = null) + { + _settings = ValidateSettings(settings); + _clock = clock ?? TimeProvider.System; + _emissions = new ActionBlock( + EmitLatestAsync, + new ExecutionDataflowBlockOptions + { + BoundedCapacity = _settings.BoundedCapacity, + MaxDegreeOfParallelism = 1, + EnsureOrdered = true + }); + _pipeline = new TimerResultPipeline( + _settings.BoundedCapacity, + static message => message.IsError, + ProcessAsync, + FlushPendingAsync, + DisposeTimerAsync); + } + + public ITargetBlock Input => _pipeline.Input; + + public ISourceBlock Output => _pipeline.Output; + + public ISourceBlock Events => _pipeline.Events; + + public Task Completion => _pipeline.Completion; + + public void Complete() => _pipeline.Complete(); + + public void Fault(Exception exception) => _pipeline.Fault(exception); + + public ValueTask DisposeAsync() => _pipeline.DisposeAsync(); + + private async Task ProcessAsync(FlowMessage message) + { + ArgumentNullException.ThrowIfNull(message); + Exception? failure = null; + lock (_gate) + { + var sequence = ++_latestSequence; + _pending = message; + try + { + _timer?.Dispose(); + _timer = null; + _timer = _clock.CreateTimer( + OnQuietElapsed, + sequence, + _settings.QuietPeriod, + Timeout.InfiniteTimeSpan); + } + catch (Exception exception) + { + _timer = null; + _pending = null; + failure = exception; + } + } + + if (failure is not null) + { + await PublishFailureAsync( + message, + TimerErrorCodeNames.DebounceFailed, + $"timer.debounce failed: {failure.Message}", + failure).ConfigureAwait(false); + } + } + + private void OnQuietElapsed(object? state) + { + var sequence = (long)state!; + var accepted = false; + lock (_gate) + { + if (!_acceptEmissions || sequence != _latestSequence || _pending is not { } current) + return; + + _pending = null; + _timer?.Dispose(); + _timer = null; + accepted = _emissions.Post(current); + } + + if (!accepted) + { + _pipeline.Fault(new InvalidOperationException( + "timer.debounce emission capacity was exhausted.")); + } + } + + private async ValueTask FlushPendingAsync() + { + FlowMessage? pending = null; + lock (_gate) + { + _acceptEmissions = false; + _timer?.Dispose(); + _timer = null; + if (_pending is { } current) + { + _pending = null; + pending = current; + } + } + + if (pending is not null && !await _emissions.SendAsync( + pending, + _pipeline.Stopping).ConfigureAwait(false)) + { + throw new InvalidOperationException( + "timer.debounce emission line declined the final input."); + } + + _emissions.Complete(); + await _emissions.Completion.ConfigureAwait(false); + } + + private async ValueTask DisposeTimerAsync() + { + lock (_gate) + { + _acceptEmissions = false; + _timer?.Dispose(); + _timer = null; + } + + _emissions.Complete(); + try + { + await _emissions.Completion.ConfigureAwait(false); + } + catch + { + // Pipeline completion remains the authoritative fault surface. + } + } + + private async Task EmitLatestAsync(FlowMessage message) + { + try + { + var timestamp = _clock.GetUtcNow(); + await _pipeline.EmitAsync( + FlowValueTimerNodeSupport.Success(message), + _pipeline.Stopping) + .ConfigureAwait(false); + _pipeline.PublishEvent(FlowValueTimerNodeSupport.Event( + message, + timestamp, + TimerDiagnosticNames.DebounceEmitted, + FlowEventLevel.Information, + "timer.debounce emitted input.", + TimerResultKinds.Debounced, + NodeType, + _settings.Name, + errorCode: null, + CreateEventTiming())); + } + catch (Exception exception) + { + await PublishFailureAsync( + message, + TimerErrorCodeNames.DebounceFailed, + $"timer.debounce failed: {exception.Message}", + exception).ConfigureAwait(false); + } + } + + private async Task PublishFailureAsync( + FlowMessage message, + string errorCode, + string text, + Exception? exception = null) + { + var timestamp = GetTimestamp(message); + await _pipeline.EmitAsync( + FlowValueTimerNodeSupport.Failure( + message, + errorCode, + text, + NodeType, + _settings.Name, + timestamp, + exception, + new Dictionary(StringComparer.Ordinal) + { + ["quietPeriodMilliseconds"] = _settings.QuietPeriod.TotalMilliseconds + }), + _pipeline.Stopping) + .ConfigureAwait(false); + _pipeline.PublishEvent(FlowValueTimerNodeSupport.Event( + message, + timestamp, + TimerDiagnosticNames.DebounceFailed, + FlowEventLevel.Warning, + text, + TimerResultKinds.DebounceFailed, + NodeType, + _settings.Name, + errorCode, + CreateEventTiming())); + } + + private Dictionary CreateEventTiming() + => new(StringComparer.Ordinal) + { + ["quietPeriodMilliseconds"] = _settings.QuietPeriod.TotalMilliseconds + }; + + private DateTimeOffset GetTimestamp(FlowMessage message) + { + try + { + return _clock.GetUtcNow(); + } + catch + { + return message.Timestamp; + } + } + + private static TimerDebounceSettings ValidateSettings(TimerDebounceSettings? settings) + { + ArgumentNullException.ThrowIfNull(settings); + if (settings.QuietPeriod <= TimeSpan.Zero) + { + throw new ArgumentOutOfRangeException( + nameof(settings), "timer.debounce 'QuietPeriod' must be greater than zero."); + } + if (settings.BoundedCapacity <= 0) + { + throw new ArgumentOutOfRangeException( + nameof(settings), "timer.debounce 'BoundedCapacity' must be greater than zero."); + } + + return settings; + } +} diff --git a/src/Components/Timers/FluxFlow.Components.Timers/Nodes/FlowValueTimerDelayNode.cs b/src/Components/Timers/FluxFlow.Components.Timers/Nodes/FlowValueTimerDelayNode.cs new file mode 100644 index 00000000..daa03395 --- /dev/null +++ b/src/Components/Timers/FluxFlow.Components.Timers/Nodes/FlowValueTimerDelayNode.cs @@ -0,0 +1,212 @@ +using System.Text.Json; +using System.Threading.Tasks.Dataflow; +using FluxFlow.Components.Timers.Diagnostics; +using FluxFlow.Components.Timers.Options; +using FluxFlow.Nodes; + +namespace FluxFlow.Components.Timers.Nodes; + +/// +/// Delays canonical workflow values without changing their data contract. +/// +internal sealed class FlowValueTimerDelayNode : IFlowNode +{ + private const string NodeType = "timer.delay"; + private readonly TimerDelaySettings _settings; + private readonly TimeProvider _clock; + private readonly ActionBlock _delayLine; + private readonly TimerResultPipeline _pipeline; + + public FlowValueTimerDelayNode( + TimerDelaySettings settings, + TimeProvider? clock = null) + { + _settings = ValidateSettings(settings); + _clock = clock ?? TimeProvider.System; + _delayLine = new ActionBlock( + EmitWhenDueAsync, + new ExecutionDataflowBlockOptions + { + BoundedCapacity = _settings.BoundedCapacity, + MaxDegreeOfParallelism = 1, + EnsureOrdered = true + }); + _pipeline = new TimerResultPipeline( + _settings.BoundedCapacity, + static message => message.IsError, + ProcessAsync, + CompleteDelayLineAsync, + DisposeDelayLineAsync); + } + + public ITargetBlock Input => _pipeline.Input; + + public ISourceBlock Output => _pipeline.Output; + + public ISourceBlock Events => _pipeline.Events; + + public Task Completion => _pipeline.Completion; + + public void Complete() => _pipeline.Complete(); + + public void Fault(Exception exception) => _pipeline.Fault(exception); + + public ValueTask DisposeAsync() => _pipeline.DisposeAsync(); + + private async Task ProcessAsync(FlowMessage message) + { + ArgumentNullException.ThrowIfNull(message); + try + { + var dueAt = _clock.GetUtcNow() + _settings.Delay; + if (!await _delayLine.SendAsync( + new PendingItem(message, dueAt), + _pipeline.Stopping).ConfigureAwait(false)) + { + throw new InvalidOperationException("timer.delay delay line declined input."); + } + } + catch (OperationCanceledException) when (_pipeline.Stopping.IsCancellationRequested) + { + throw; + } + catch (Exception exception) + { + await PublishFailureAsync( + message, + TimerErrorCodeNames.DelayFailed, + $"timer.delay failed: {exception.Message}", + exception).ConfigureAwait(false); + } + } + + private async Task EmitWhenDueAsync(PendingItem pending) + { + try + { + var remaining = pending.DueAt - _clock.GetUtcNow(); + if (remaining > TimeSpan.Zero) + { + await Task.Delay( + remaining, + _clock, + _pipeline.Stopping).ConfigureAwait(false); + } + + var timestamp = _clock.GetUtcNow(); + await _pipeline.EmitAsync( + FlowValueTimerNodeSupport.Success(pending.Message), + _pipeline.Stopping) + .ConfigureAwait(false); + _pipeline.PublishEvent(FlowValueTimerNodeSupport.Event( + pending.Message, + timestamp, + TimerDiagnosticNames.DelayEmitted, + FlowEventLevel.Information, + "timer.delay emitted input.", + TimerResultKinds.Delayed, + NodeType, + _settings.Name, + errorCode: null, + CreateEventTiming())); + } + catch (OperationCanceledException) when (_pipeline.Stopping.IsCancellationRequested) + { + // Unexpected-fault teardown drops work that cannot be emitted safely. + } + catch (Exception exception) + { + await PublishFailureAsync( + pending.Message, + TimerErrorCodeNames.DelayFailed, + $"timer.delay failed: {exception.Message}", + exception).ConfigureAwait(false); + } + } + + private async Task PublishFailureAsync( + FlowMessage message, + string errorCode, + string text, + Exception? exception = null) + { + var timestamp = GetTimestamp(message); + await _pipeline.EmitAsync( + FlowValueTimerNodeSupport.Failure( + message, + errorCode, + text, + NodeType, + _settings.Name, + timestamp, + exception, + new Dictionary(StringComparer.Ordinal) + { + ["delayMilliseconds"] = _settings.Delay.TotalMilliseconds + }), + _pipeline.Stopping) + .ConfigureAwait(false); + _pipeline.PublishEvent(FlowValueTimerNodeSupport.Event( + message, + timestamp, + TimerDiagnosticNames.DelayFailed, + FlowEventLevel.Warning, + text, + TimerResultKinds.DelayFailed, + NodeType, + _settings.Name, + errorCode, + CreateEventTiming())); + } + + private Dictionary CreateEventTiming() + => new(StringComparer.Ordinal) + { + ["delayMilliseconds"] = _settings.Delay.TotalMilliseconds + }; + + private async ValueTask CompleteDelayLineAsync() + { + _delayLine.Complete(); + await _delayLine.Completion.ConfigureAwait(false); + } + + private ValueTask DisposeDelayLineAsync() + { + _delayLine.Complete(); + return ValueTask.CompletedTask; + } + + private DateTimeOffset GetTimestamp(FlowMessage message) + { + try + { + return _clock.GetUtcNow(); + } + catch + { + return message.Timestamp; + } + } + + private static TimerDelaySettings ValidateSettings(TimerDelaySettings? settings) + { + ArgumentNullException.ThrowIfNull(settings); + if (settings.Delay < TimeSpan.Zero) + { + throw new ArgumentOutOfRangeException( + nameof(settings), "timer.delay 'Delay' cannot be negative."); + } + if (settings.BoundedCapacity <= 0) + { + throw new ArgumentOutOfRangeException( + nameof(settings), "timer.delay 'BoundedCapacity' must be greater than zero."); + } + + return settings; + } + + private readonly record struct PendingItem( + FlowMessage Message, + DateTimeOffset DueAt); +} diff --git a/src/Components/Timers/FluxFlow.Components.Timers/Nodes/FlowValueTimerNodeSupport.cs b/src/Components/Timers/FluxFlow.Components.Timers/Nodes/FlowValueTimerNodeSupport.cs new file mode 100644 index 00000000..b69f44b9 --- /dev/null +++ b/src/Components/Timers/FluxFlow.Components.Timers/Nodes/FlowValueTimerNodeSupport.cs @@ -0,0 +1,84 @@ +using System.Text.Json; +using FluxFlow.Data; +using FluxFlow.Nodes; +using DataFlowError = FluxFlow.Data.FlowError; + +namespace FluxFlow.Components.Timers.Nodes; + +internal static class FlowValueTimerNodeSupport +{ + public static FlowMessage Success(FlowMessage message) + => message.With(message.Value!); + + public static FlowMessage Failure( + FlowMessage message, + string code, + string text, + string nodeType, + string? name, + DateTimeOffset timestamp, + Exception? exception = null, + IReadOnlyDictionary? timing = null) + { + var details = new Dictionary(StringComparer.Ordinal) + { + ["name"] = Optional(name), + ["nodeType"] = nodeType + }; + if (exception is not null) + { + details["exceptionType"] = exception.GetType().FullName ?? exception.GetType().Name; + } + if (timing is not null) + { + foreach (var item in timing) + details[item.Key] = item.Value; + } + + var error = new DataFlowError( + code, + text, + category: "Timers", + isTransient: exception is not null, + details: JsonSerializer.SerializeToElement(details)); + return message.WithError(error); + } + + public static FlowEvent Event( + FlowMessage message, + DateTimeOffset timestamp, + string name, + FlowEventLevel level, + string text, + string resultKind, + string nodeType, + string? configuredName, + string? errorCode, + IReadOnlyDictionary timing) + { + var attributes = new Dictionary(StringComparer.Ordinal) + { + ["isError"] = errorCode is not null, + ["name"] = configuredName, + ["nodeType"] = nodeType, + ["resultKind"] = resultKind + }; + if (errorCode is not null) + attributes["errorCode"] = errorCode; + foreach (var item in timing) + attributes[item.Key] = item.Value; + + return new FlowEvent + { + Timestamp = timestamp, + CorrelationId = message.CorrelationId, + Name = name, + Level = level, + Message = text, + Attributes = attributes + }; + } + + private static string? Optional(string? value) + => string.IsNullOrWhiteSpace(value) ? null : value.Trim(); +} diff --git a/src/Components/Timers/FluxFlow.Components.Timers/Nodes/FlowValueTimerThrottleNode.cs b/src/Components/Timers/FluxFlow.Components.Timers/Nodes/FlowValueTimerThrottleNode.cs new file mode 100644 index 00000000..8f56562c --- /dev/null +++ b/src/Components/Timers/FluxFlow.Components.Timers/Nodes/FlowValueTimerThrottleNode.cs @@ -0,0 +1,174 @@ +using System.Text.Json; +using System.Threading.Tasks.Dataflow; +using FluxFlow.Components.Timers.Diagnostics; +using FluxFlow.Components.Timers.Options; +using FluxFlow.Nodes; + +namespace FluxFlow.Components.Timers.Nodes; + +/// +/// Throttles canonical workflow values without changing their data contract. +/// +internal sealed class FlowValueTimerThrottleNode : IFlowNode +{ + private const string NodeType = "timer.throttle"; + private readonly TimerThrottleSettings _settings; + private readonly TimeProvider _clock; + private readonly TimerResultPipeline _pipeline; + private DateTimeOffset? _lastEmittedAt; + + public FlowValueTimerThrottleNode( + TimerThrottleSettings settings, + TimeProvider? clock = null) + { + _settings = ValidateSettings(settings); + _clock = clock ?? TimeProvider.System; + _pipeline = new TimerResultPipeline( + _settings.BoundedCapacity, + static message => message.IsError, + ProcessAsync); + } + + public ITargetBlock Input => _pipeline.Input; + + public ISourceBlock Output => _pipeline.Output; + + public ISourceBlock Events => _pipeline.Events; + + public Task Completion => _pipeline.Completion; + + public void Complete() => _pipeline.Complete(); + + public void Fault(Exception exception) => _pipeline.Fault(exception); + + public ValueTask DisposeAsync() => _pipeline.DisposeAsync(); + + private async Task ProcessAsync(FlowMessage message) + { + ArgumentNullException.ThrowIfNull(message); + try + { + await WaitForSlotAsync().ConfigureAwait(false); + var timestamp = _clock.GetUtcNow(); + _lastEmittedAt = timestamp; + await _pipeline.EmitAsync( + FlowValueTimerNodeSupport.Success(message), + _pipeline.Stopping) + .ConfigureAwait(false); + _pipeline.PublishEvent(FlowValueTimerNodeSupport.Event( + message, + timestamp, + TimerDiagnosticNames.ThrottleEmitted, + FlowEventLevel.Information, + "timer.throttle emitted input.", + TimerResultKinds.Throttled, + NodeType, + _settings.Name, + errorCode: null, + CreateEventTiming())); + } + catch (OperationCanceledException) when (_pipeline.Stopping.IsCancellationRequested) + { + throw; + } + catch (Exception exception) + { + await PublishFailureAsync( + message, + TimerErrorCodeNames.ThrottleFailed, + $"timer.throttle failed: {exception.Message}", + exception).ConfigureAwait(false); + } + } + + private async Task WaitForSlotAsync() + { + TimeSpan delay; + if (_lastEmittedAt is null) + { + delay = _settings.EmitFirstImmediately ? TimeSpan.Zero : _settings.Interval; + } + else + { + var nextAllowedAt = _lastEmittedAt.Value + _settings.Interval; + delay = nextAllowedAt - _clock.GetUtcNow(); + } + + if (delay > TimeSpan.Zero) + { + await Task.Delay(delay, _clock, _pipeline.Stopping).ConfigureAwait(false); + } + } + + private async Task PublishFailureAsync( + FlowMessage message, + string errorCode, + string text, + Exception? exception = null) + { + var timestamp = GetTimestamp(message); + await _pipeline.EmitAsync( + FlowValueTimerNodeSupport.Failure( + message, + errorCode, + text, + NodeType, + _settings.Name, + timestamp, + exception, + new Dictionary(StringComparer.Ordinal) + { + ["emitFirstImmediately"] = _settings.EmitFirstImmediately, + ["intervalMilliseconds"] = _settings.Interval.TotalMilliseconds + }), + _pipeline.Stopping) + .ConfigureAwait(false); + _pipeline.PublishEvent(FlowValueTimerNodeSupport.Event( + message, + timestamp, + TimerDiagnosticNames.ThrottleFailed, + FlowEventLevel.Warning, + text, + TimerResultKinds.ThrottleFailed, + NodeType, + _settings.Name, + errorCode, + CreateEventTiming())); + } + + private Dictionary CreateEventTiming() + => new(StringComparer.Ordinal) + { + ["emitFirstImmediately"] = _settings.EmitFirstImmediately, + ["intervalMilliseconds"] = _settings.Interval.TotalMilliseconds + }; + + private DateTimeOffset GetTimestamp(FlowMessage message) + { + try + { + return _clock.GetUtcNow(); + } + catch + { + return message.Timestamp; + } + } + + private static TimerThrottleSettings ValidateSettings(TimerThrottleSettings? settings) + { + ArgumentNullException.ThrowIfNull(settings); + if (settings.Interval <= TimeSpan.Zero) + { + throw new ArgumentOutOfRangeException( + nameof(settings), "timer.throttle 'Interval' must be greater than zero."); + } + if (settings.BoundedCapacity <= 0) + { + throw new ArgumentOutOfRangeException( + nameof(settings), "timer.throttle 'BoundedCapacity' must be greater than zero."); + } + + return settings; + } +} diff --git a/src/FluxFlow.Components.Timers/Nodes/TimerDebounceNode.cs b/src/Components/Timers/FluxFlow.Components.Timers/Nodes/TimerDebounceNode.cs similarity index 97% rename from src/FluxFlow.Components.Timers/Nodes/TimerDebounceNode.cs rename to src/Components/Timers/FluxFlow.Components.Timers/Nodes/TimerDebounceNode.cs index e4269920..08860eee 100644 --- a/src/FluxFlow.Components.Timers/Nodes/TimerDebounceNode.cs +++ b/src/Components/Timers/FluxFlow.Components.Timers/Nodes/TimerDebounceNode.cs @@ -26,7 +26,7 @@ public class TimerDebounceNode : IFlowNode private const string NodeType = "timer.debounce"; private readonly TimerDebounceSettings _settings; private readonly TimeProvider _clock; - private readonly TimerResultPipeline _pipeline; + private readonly TimerResultPipeline> _pipeline; private readonly ActionBlock> _emissions; private readonly object _gate = new(); private long _latestSequence; @@ -48,8 +48,9 @@ public TimerDebounceNode( MaxDegreeOfParallelism = 1, EnsureOrdered = true }); - _pipeline = new TimerResultPipeline( + _pipeline = new TimerResultPipeline>( _settings.BoundedCapacity, + static message => message.IsError, ProcessAsync, FlushPendingAsync, DisposeTimerAsync); @@ -59,7 +60,7 @@ public TimerDebounceNode( public ISourceBlock> Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; diff --git a/src/FluxFlow.Components.Timers/Nodes/TimerDelayNode.cs b/src/Components/Timers/FluxFlow.Components.Timers/Nodes/TimerDelayNode.cs similarity index 96% rename from src/FluxFlow.Components.Timers/Nodes/TimerDelayNode.cs rename to src/Components/Timers/FluxFlow.Components.Timers/Nodes/TimerDelayNode.cs index f1c104e6..c616ee50 100644 --- a/src/FluxFlow.Components.Timers/Nodes/TimerDelayNode.cs +++ b/src/Components/Timers/FluxFlow.Components.Timers/Nodes/TimerDelayNode.cs @@ -26,7 +26,7 @@ public class TimerDelayNode : IFlowNode private readonly TimerDelaySettings _settings; private readonly TimeProvider _clock; private readonly ActionBlock _delayLine; - private readonly TimerResultPipeline _pipeline; + private readonly TimerResultPipeline> _pipeline; public TimerDelayNode( TimerDelaySettings settings, @@ -42,8 +42,9 @@ public TimerDelayNode( MaxDegreeOfParallelism = 1, EnsureOrdered = true }); - _pipeline = new TimerResultPipeline( + _pipeline = new TimerResultPipeline>( _settings.BoundedCapacity, + static message => message.IsError, ProcessAsync, CompleteDelayLineAsync, DisposeDelayLineAsync); @@ -53,7 +54,7 @@ public TimerDelayNode( public ISourceBlock> Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; diff --git a/src/FluxFlow.Components.Timers/Nodes/TimerIntervalNode.cs b/src/Components/Timers/FluxFlow.Components.Timers/Nodes/TimerIntervalNode.cs similarity index 95% rename from src/FluxFlow.Components.Timers/Nodes/TimerIntervalNode.cs rename to src/Components/Timers/FluxFlow.Components.Timers/Nodes/TimerIntervalNode.cs index c43e6b56..566833f9 100644 --- a/src/FluxFlow.Components.Timers/Nodes/TimerIntervalNode.cs +++ b/src/Components/Timers/FluxFlow.Components.Timers/Nodes/TimerIntervalNode.cs @@ -2,6 +2,7 @@ using FluxFlow.Components.Timers.Contracts; using FluxFlow.Components.Timers.Diagnostics; using FluxFlow.Components.Timers.Options; +using FluxFlow.Data; using FluxFlow.Nodes; using System.Globalization; @@ -24,9 +25,9 @@ public TimerIntervalNode( TimeProvider? clock = null) => _source = new TimerIntervalSource(settings, clock); - public ISourceBlock> Output => _source.Output; + public ISourceBlock Output => _source.Output; - public ISourceBlock Events => _source.Events; + public ISourceBlock Events => _source.Events; public Task Completion => _source.Completion; @@ -40,7 +41,7 @@ public Task StartAsync(CancellationToken cancellationToken = default) public ValueTask DisposeAsync() => _source.DisposeAsync(); } -internal sealed class TimerIntervalSource : FlowSource +internal sealed class TimerIntervalSource : FlowSource { private const string Started = TimerIntervalNode.Started; private const string Tick = TimerIntervalNode.Tick; @@ -168,7 +169,9 @@ private async Task EmitTickAsync( _settings.Interval, drift); - await EmitAsync(FlowMessage.Create(tick), cancellationToken).ConfigureAwait(false); + await EmitAsync( + FlowMessage.Create(FlowValue.From(tick)), + cancellationToken).ConfigureAwait(false); EmitEvent(new FlowEvent { diff --git a/src/FluxFlow.Components.Timers/Nodes/TimerNodeSupport.cs b/src/Components/Timers/FluxFlow.Components.Timers/Nodes/TimerNodeSupport.cs similarity index 100% rename from src/FluxFlow.Components.Timers/Nodes/TimerNodeSupport.cs rename to src/Components/Timers/FluxFlow.Components.Timers/Nodes/TimerNodeSupport.cs diff --git a/src/FluxFlow.Components.Timers/Nodes/TimerResultPipeline.cs b/src/Components/Timers/FluxFlow.Components.Timers/Nodes/TimerResultPipeline.cs similarity index 86% rename from src/FluxFlow.Components.Timers/Nodes/TimerResultPipeline.cs rename to src/Components/Timers/FluxFlow.Components.Timers/Nodes/TimerResultPipeline.cs index 2a8aac31..8c4735a1 100644 --- a/src/FluxFlow.Components.Timers/Nodes/TimerResultPipeline.cs +++ b/src/Components/Timers/FluxFlow.Components.Timers/Nodes/TimerResultPipeline.cs @@ -3,12 +3,12 @@ namespace FluxFlow.Components.Timers.Nodes; -internal sealed class TimerResultPipeline : IFlowNode +internal sealed class TimerResultPipeline : IFlowNode { - private readonly BufferBlock> _input; - private readonly ActionBlock> _processor; - private readonly FlowOutput> _output; - private readonly BroadcastBlock _events = new(static @event => @event); + private readonly BufferBlock _input; + private readonly ActionBlock _processor; + private readonly FlowOutput _output; + private readonly BroadcastBlock _events = new(static @event => @event); private readonly Func? _onInputCompleted; private readonly Func? _onDispose; private readonly CancellationTokenSource _stopping = new(); @@ -19,23 +19,25 @@ internal sealed class TimerResultPipeline : IFlowNode public TimerResultPipeline( int boundedCapacity, - Func, Task> process, + Func isError, + Func process, Func? onInputCompleted = null, Func? onDispose = null) { ArgumentOutOfRangeException.ThrowIfLessThan(boundedCapacity, 1); + ArgumentNullException.ThrowIfNull(isError); ArgumentNullException.ThrowIfNull(process); _onInputCompleted = onInputCompleted; _onDispose = onDispose; - _output = new FlowOutput>( + _output = new FlowOutput( new FlowOutputOptions { Capacity = boundedCapacity }); - _input = new BufferBlock>( + _input = new BufferBlock( new DataflowBlockOptions { BoundedCapacity = boundedCapacity }); - _processor = new ActionBlock>( + _processor = new ActionBlock( async message => { - if (message.IsError) + if (isError(message)) { await EmitAsync(message, _stopping.Token).ConfigureAwait(false); return; @@ -54,18 +56,18 @@ public TimerResultPipeline( _ = MonitorCompletionAsync(); } - public ITargetBlock> Input => _input; + public ITargetBlock Input => _input; - public ISourceBlock> Output => _output; + public ISourceBlock Output => _output; - public ISourceBlock Events => _events; + public ISourceBlock Events => _events; public Task Completion => _completion.Task; public CancellationToken Stopping => _stopping.Token; public async ValueTask EmitAsync( - FlowMessage message, + TMessage message, CancellationToken cancellationToken = default) { ArgumentNullException.ThrowIfNull(message); diff --git a/src/FluxFlow.Components.Timers/Nodes/TimerScheduleNode.cs b/src/Components/Timers/FluxFlow.Components.Timers/Nodes/TimerScheduleNode.cs similarity index 95% rename from src/FluxFlow.Components.Timers/Nodes/TimerScheduleNode.cs rename to src/Components/Timers/FluxFlow.Components.Timers/Nodes/TimerScheduleNode.cs index 8c3cdbda..fe93caf6 100644 --- a/src/FluxFlow.Components.Timers/Nodes/TimerScheduleNode.cs +++ b/src/Components/Timers/FluxFlow.Components.Timers/Nodes/TimerScheduleNode.cs @@ -2,6 +2,7 @@ using FluxFlow.Components.Timers.Contracts; using FluxFlow.Components.Timers.Diagnostics; using FluxFlow.Components.Timers.Options; +using FluxFlow.Data; using FluxFlow.Nodes; using System.Globalization; @@ -24,9 +25,9 @@ public TimerScheduleNode( TimeProvider? clock = null) => _source = new TimerScheduleSource(settings, clock); - public ISourceBlock> Output => _source.Output; + public ISourceBlock Output => _source.Output; - public ISourceBlock Events => _source.Events; + public ISourceBlock Events => _source.Events; public Task Completion => _source.Completion; @@ -40,7 +41,7 @@ public Task StartAsync(CancellationToken cancellationToken = default) public ValueTask DisposeAsync() => _source.DisposeAsync(); } -internal sealed class TimerScheduleSource : FlowSource +internal sealed class TimerScheduleSource : FlowSource { private const string Started = TimerScheduleNode.Started; private const string Tick = TimerScheduleNode.Tick; @@ -135,7 +136,9 @@ private async Task EmitTickAsync( _settings.TimeZone.Id, drift); - await EmitAsync(FlowMessage.Create(tick), cancellationToken).ConfigureAwait(false); + await EmitAsync( + FlowMessage.Create(FlowValue.From(tick)), + cancellationToken).ConfigureAwait(false); EmitEvent(new FlowEvent { diff --git a/src/FluxFlow.Components.Timers/Nodes/TimerThrottleNode.cs b/src/Components/Timers/FluxFlow.Components.Timers/Nodes/TimerThrottleNode.cs similarity index 95% rename from src/FluxFlow.Components.Timers/Nodes/TimerThrottleNode.cs rename to src/Components/Timers/FluxFlow.Components.Timers/Nodes/TimerThrottleNode.cs index 36897f9d..fbcbfe13 100644 --- a/src/FluxFlow.Components.Timers/Nodes/TimerThrottleNode.cs +++ b/src/Components/Timers/FluxFlow.Components.Timers/Nodes/TimerThrottleNode.cs @@ -25,7 +25,7 @@ public class TimerThrottleNode : IFlowNode private const string NodeType = "timer.throttle"; private readonly TimerThrottleSettings _settings; private readonly TimeProvider _clock; - private readonly TimerResultPipeline _pipeline; + private readonly TimerResultPipeline> _pipeline; private DateTimeOffset? _lastEmittedAt; public TimerThrottleNode( @@ -34,8 +34,9 @@ public TimerThrottleNode( { _settings = ValidateSettings(settings); _clock = clock ?? TimeProvider.System; - _pipeline = new TimerResultPipeline( + _pipeline = new TimerResultPipeline>( _settings.BoundedCapacity, + static message => message.IsError, ProcessAsync); } @@ -43,7 +44,7 @@ public TimerThrottleNode( public ISourceBlock> Output => _pipeline.Output; - public ISourceBlock Events => _pipeline.Events; + public ISourceBlock Events => _pipeline.Events; public Task Completion => _pipeline.Completion; diff --git a/src/FluxFlow.Components.Timers/Options/CronSchedule.cs b/src/Components/Timers/FluxFlow.Components.Timers/Options/CronSchedule.cs similarity index 100% rename from src/FluxFlow.Components.Timers/Options/CronSchedule.cs rename to src/Components/Timers/FluxFlow.Components.Timers/Options/CronSchedule.cs diff --git a/src/FluxFlow.Components.Timers/Options/TimerDebounceSettings.cs b/src/Components/Timers/FluxFlow.Components.Timers/Options/TimerDebounceSettings.cs similarity index 100% rename from src/FluxFlow.Components.Timers/Options/TimerDebounceSettings.cs rename to src/Components/Timers/FluxFlow.Components.Timers/Options/TimerDebounceSettings.cs diff --git a/src/FluxFlow.Components.Timers/Options/TimerDelaySettings.cs b/src/Components/Timers/FluxFlow.Components.Timers/Options/TimerDelaySettings.cs similarity index 100% rename from src/FluxFlow.Components.Timers/Options/TimerDelaySettings.cs rename to src/Components/Timers/FluxFlow.Components.Timers/Options/TimerDelaySettings.cs diff --git a/src/FluxFlow.Components.Timers/Options/TimerIntervalSettings.cs b/src/Components/Timers/FluxFlow.Components.Timers/Options/TimerIntervalSettings.cs similarity index 100% rename from src/FluxFlow.Components.Timers/Options/TimerIntervalSettings.cs rename to src/Components/Timers/FluxFlow.Components.Timers/Options/TimerIntervalSettings.cs diff --git a/src/FluxFlow.Components.Timers/Options/TimerScheduleSettings.cs b/src/Components/Timers/FluxFlow.Components.Timers/Options/TimerScheduleSettings.cs similarity index 100% rename from src/FluxFlow.Components.Timers/Options/TimerScheduleSettings.cs rename to src/Components/Timers/FluxFlow.Components.Timers/Options/TimerScheduleSettings.cs diff --git a/src/FluxFlow.Components.Timers/Options/TimerThrottleSettings.cs b/src/Components/Timers/FluxFlow.Components.Timers/Options/TimerThrottleSettings.cs similarity index 100% rename from src/FluxFlow.Components.Timers/Options/TimerThrottleSettings.cs rename to src/Components/Timers/FluxFlow.Components.Timers/Options/TimerThrottleSettings.cs diff --git a/src/FluxFlow.Components.Timers/Properties/AssemblyInfo.cs b/src/Components/Timers/FluxFlow.Components.Timers/Properties/AssemblyInfo.cs similarity index 59% rename from src/FluxFlow.Components.Timers/Properties/AssemblyInfo.cs rename to src/Components/Timers/FluxFlow.Components.Timers/Properties/AssemblyInfo.cs index aa661e1c..145c6d09 100644 --- a/src/FluxFlow.Components.Timers/Properties/AssemblyInfo.cs +++ b/src/Components/Timers/FluxFlow.Components.Timers/Properties/AssemblyInfo.cs @@ -1,3 +1,4 @@ using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("FluxFlow.Components.Timers.Tests")] +[assembly: InternalsVisibleTo("FluxFlow.Components.Timers.Composition")] diff --git a/src/FluxFlow.Components.Timers/README.md b/src/Components/Timers/FluxFlow.Components.Timers/README.md similarity index 100% rename from src/FluxFlow.Components.Timers/README.md rename to src/Components/Timers/FluxFlow.Components.Timers/README.md diff --git a/src/FluxFlow.Components.Timers/TimerErrorCodeNames.cs b/src/Components/Timers/FluxFlow.Components.Timers/TimerErrorCodeNames.cs similarity index 100% rename from src/FluxFlow.Components.Timers/TimerErrorCodeNames.cs rename to src/Components/Timers/FluxFlow.Components.Timers/TimerErrorCodeNames.cs diff --git a/src/FluxFlow.Components.Timers/TimerResultKinds.cs b/src/Components/Timers/FluxFlow.Components.Timers/TimerResultKinds.cs similarity index 100% rename from src/FluxFlow.Components.Timers/TimerResultKinds.cs rename to src/Components/Timers/FluxFlow.Components.Timers/TimerResultKinds.cs diff --git a/src/Components/Validation/FluxFlow.Components.Validation.Composition/CompatibilitySuppressions.xml b/src/Components/Validation/FluxFlow.Components.Validation.Composition/CompatibilitySuppressions.xml new file mode 100644 index 00000000..64be2fd6 --- /dev/null +++ b/src/Components/Validation/FluxFlow.Components.Validation.Composition/CompatibilitySuppressions.xml @@ -0,0 +1,62 @@ + + + + + CP0002 + M:FluxFlow.Components.Validation.Composition.ValidationAuthoringExtensions.AddJsonSchemaValidator(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,FluxFlow.Components.Validation.Contracts.JsonSchemaValidationResult}@) + lib/net10.0/FluxFlow.Components.Validation.Composition.dll + lib/net10.0/FluxFlow.Components.Validation.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Validation.Composition.ValidationAuthoringExtensions.AddJsonSchemaValidator(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Validation.Composition.JsonSchemaValidatorComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,FluxFlow.Components.Validation.Contracts.JsonSchemaValidationResult}@) + lib/net10.0/FluxFlow.Components.Validation.Composition.dll + lib/net10.0/FluxFlow.Components.Validation.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Validation.Composition.ValidationAuthoringExtensions.AddJsonSchemaValidator(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Validation.Composition.JsonSchemaValidatorComponentBuilder}) + lib/net10.0/FluxFlow.Components.Validation.Composition.dll + lib/net10.0/FluxFlow.Components.Validation.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Validation.Composition.ValidationComponents.get_JsonSchemaValidator + lib/net10.0/FluxFlow.Components.Validation.Composition.dll + lib/net10.0/FluxFlow.Components.Validation.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Validation.Composition.ValidationAuthoringExtensions.AddJsonSchemaValidator(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,FluxFlow.Components.Validation.Contracts.JsonSchemaValidationResult}@) + lib/net8.0/FluxFlow.Components.Validation.Composition.dll + lib/net8.0/FluxFlow.Components.Validation.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Validation.Composition.ValidationAuthoringExtensions.AddJsonSchemaValidator(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Validation.Composition.JsonSchemaValidatorComponentBuilder},FluxFlow.Composition.Authoring.InputOutputComponentHandle{System.Text.Json.JsonElement,FluxFlow.Components.Validation.Contracts.JsonSchemaValidationResult}@) + lib/net8.0/FluxFlow.Components.Validation.Composition.dll + lib/net8.0/FluxFlow.Components.Validation.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Validation.Composition.ValidationAuthoringExtensions.AddJsonSchemaValidator(FluxFlow.Composition.Authoring.WorkflowDefinitionBuilder,System.String,System.Action{FluxFlow.Components.Validation.Composition.JsonSchemaValidatorComponentBuilder}) + lib/net8.0/FluxFlow.Components.Validation.Composition.dll + lib/net8.0/FluxFlow.Components.Validation.Composition.dll + true + + + CP0002 + M:FluxFlow.Components.Validation.Composition.ValidationComponents.get_JsonSchemaValidator + lib/net8.0/FluxFlow.Components.Validation.Composition.dll + lib/net8.0/FluxFlow.Components.Validation.Composition.dll + true + + diff --git a/src/FluxFlow.Components.Validation.Composition/FluxFlow.Components.Validation.Composition.csproj b/src/Components/Validation/FluxFlow.Components.Validation.Composition/FluxFlow.Components.Validation.Composition.csproj similarity index 64% rename from src/FluxFlow.Components.Validation.Composition/FluxFlow.Components.Validation.Composition.csproj rename to src/Components/Validation/FluxFlow.Components.Validation.Composition/FluxFlow.Components.Validation.Composition.csproj index 9c5778f5..e5ef4bc6 100644 --- a/src/FluxFlow.Components.Validation.Composition/FluxFlow.Components.Validation.Composition.csproj +++ b/src/Components/Validation/FluxFlow.Components.Validation.Composition/FluxFlow.Components.Validation.Composition.csproj @@ -5,17 +5,17 @@ FluxFlow.Components.Validation.Composition FluxFlow.Components.Validation.Composition FluxFlow.Components.Validation.Composition - 7.0.0-rc.1 + 8.0.0-rc.1 Optional FluxFlow.Composition registration and Designer metadata for explicit JsonElement JSON Schema validation. workflow;dataflow;components;validation;json-schema;composition README.md - Requires json.validate; registers exact descriptors and Designer metadata through the flat designed-component API; keeps constants under ValidationComponentDefinition and removes its metadata-only factory. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. - - + + diff --git a/src/FluxFlow.Components.Validation.Composition/README.md b/src/Components/Validation/FluxFlow.Components.Validation.Composition/README.md similarity index 100% rename from src/FluxFlow.Components.Validation.Composition/README.md rename to src/Components/Validation/FluxFlow.Components.Validation.Composition/README.md diff --git a/src/FluxFlow.Components.Validation.Composition/ValidationAuthoringExtensions.cs b/src/Components/Validation/FluxFlow.Components.Validation.Composition/ValidationAuthoringExtensions.cs similarity index 83% rename from src/FluxFlow.Components.Validation.Composition/ValidationAuthoringExtensions.cs rename to src/Components/Validation/FluxFlow.Components.Validation.Composition/ValidationAuthoringExtensions.cs index f24d04d9..14d1c0b6 100644 --- a/src/FluxFlow.Components.Validation.Composition/ValidationAuthoringExtensions.cs +++ b/src/Components/Validation/FluxFlow.Components.Validation.Composition/ValidationAuthoringExtensions.cs @@ -3,22 +3,24 @@ using FluxFlow.Components.Designer; using FluxFlow.Composition.Authoring; +using FluxFlow.Data; + namespace FluxFlow.Components.Validation.Composition; public static class ValidationComponents { - public static ComponentContract> JsonSchemaValidator { get; } = + public static ComponentContract> JsonSchemaValidator { get; } = DesignedComponentContract.Create( ValidationComponentDefinition.Types.JsonSchemaValidator, ValidationServiceCollectionExtensions.ConfigureJsonSchemaValidator, static () => new JsonSchemaValidatorComponentBuilder(), static (options, definition) => options.Apply(definition), - static component => new InputOutputComponentHandle(component, ValidationComponentDefinition.Ports.Input, ValidationComponentDefinition.Ports.Output, ValidationComponentDefinition.Ports.Events)); + static component => new InputOutputComponentHandle(component, ValidationComponentDefinition.Ports.Input, ValidationComponentDefinition.Ports.Output, ValidationComponentDefinition.Ports.Events)); } public static class ValidationAuthoringExtensions { - public static InputOutputComponentHandle AddJsonSchemaValidator( + public static InputOutputComponentHandle AddJsonSchemaValidator( this WorkflowDefinitionBuilder workflow, string name, Action? configure = null) @@ -30,7 +32,7 @@ public static InputOutputComponentHandle validator) + out InputOutputComponentHandle validator) { validator = workflow.AddJsonSchemaValidator(name); return workflow; @@ -40,7 +42,7 @@ public static WorkflowDefinitionBuilder AddJsonSchemaValidator( this WorkflowDefinitionBuilder workflow, string name, Action configure, - out InputOutputComponentHandle validator) + out InputOutputComponentHandle validator) { ArgumentNullException.ThrowIfNull(configure); validator = workflow.AddJsonSchemaValidator(name, configure); diff --git a/src/FluxFlow.Components.Validation.Composition/ValidationComponentDefinition.cs b/src/Components/Validation/FluxFlow.Components.Validation.Composition/ValidationComponentDefinition.cs similarity index 100% rename from src/FluxFlow.Components.Validation.Composition/ValidationComponentDefinition.cs rename to src/Components/Validation/FluxFlow.Components.Validation.Composition/ValidationComponentDefinition.cs diff --git a/src/FluxFlow.Components.Validation.Composition/ValidationServiceCollectionExtensions.cs b/src/Components/Validation/FluxFlow.Components.Validation.Composition/ValidationServiceCollectionExtensions.cs similarity index 91% rename from src/FluxFlow.Components.Validation.Composition/ValidationServiceCollectionExtensions.cs rename to src/Components/Validation/FluxFlow.Components.Validation.Composition/ValidationServiceCollectionExtensions.cs index 68a0580b..1d9cf9ef 100644 --- a/src/FluxFlow.Components.Validation.Composition/ValidationServiceCollectionExtensions.cs +++ b/src/Components/Validation/FluxFlow.Components.Validation.Composition/ValidationServiceCollectionExtensions.cs @@ -5,6 +5,8 @@ using FluxFlow.Components.Validation.Nodes; using FluxFlow.Components.Validation.Options; using FluxFlow.Composition; +using FluxFlow.Data; +using FluxFlow.Nodes; namespace FluxFlow.Components.Validation.Composition; @@ -21,8 +23,8 @@ internal static void ConfigureJsonSchemaValidator(ComponentRegistrationBuilder c component.WithDisplay("JSON Schema Validator", "Validation", "Validates schema-less JSON values against an inline or path-based JSON schema.", "shield-check", "validate", 460); component .UseFactory(CreateJsonSchemaValidatorNode) - .HasInput(ValidationComponentDefinition.Ports.Input, static node => node.Input, "Input", "Messages", 0, "Immutable workflow value to validate.", true) - .HasOutput(ValidationComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Normal valid, invalid, or processing-failure result.", true) + .HasFlowValueInput(ValidationComponentDefinition.Ports.Input, static node => node.Input, FlowValueMaterializers.JsonElement.InputShape, "Input", "Messages", 0, "Immutable workflow value to validate.", true) + .HasFlowValueOutput(ValidationComponentDefinition.Ports.Output, static node => node.Output, "Output", "Results", 1, "Normal valid, invalid, or processing-failure result.", true) .HasEvents(ValidationComponentDefinition.Ports.Events, static node => node.Events, "Events", "Diagnostics", 2, "Best-effort validation diagnostics."); component.AddOption(ValidationComponentDefinition.Options.Schema, OptionValueKind.Json, "Schema", "Inline JSON schema compiled during composition build.", section: "Schema", importance: OptionDesignMetadataAttributeValues.Primary, editor: OptionDesignMetadataAttributeValues.Json); component.AddOption(ValidationComponentDefinition.Options.SchemaPath, OptionValueKind.Text, "Schema Path", "Path to a JSON schema file read during composition build.", section: "Schema", importance: OptionDesignMetadataAttributeValues.Advanced, editor: OptionDesignMetadataAttributeValues.Text); diff --git a/src/Components/Validation/FluxFlow.Components.Validation/CompatibilitySuppressions.xml b/src/Components/Validation/FluxFlow.Components.Validation/CompatibilitySuppressions.xml new file mode 100644 index 00000000..337e276c --- /dev/null +++ b/src/Components/Validation/FluxFlow.Components.Validation/CompatibilitySuppressions.xml @@ -0,0 +1,20 @@ + + + + + CP0007 + T:FluxFlow.Components.Validation.Nodes.JsonSchemaValidatorNode + lib/net10.0/FluxFlow.Components.Validation.dll + lib/net10.0/FluxFlow.Components.Validation.dll + true + + + CP0007 + T:FluxFlow.Components.Validation.Nodes.JsonSchemaValidatorNode + lib/net8.0/FluxFlow.Components.Validation.dll + lib/net8.0/FluxFlow.Components.Validation.dll + true + + diff --git a/src/FluxFlow.Components.Validation/Contracts/IJsonSchemaValueSelector.cs b/src/Components/Validation/FluxFlow.Components.Validation/Contracts/IJsonSchemaValueSelector.cs similarity index 100% rename from src/FluxFlow.Components.Validation/Contracts/IJsonSchemaValueSelector.cs rename to src/Components/Validation/FluxFlow.Components.Validation/Contracts/IJsonSchemaValueSelector.cs diff --git a/src/FluxFlow.Components.Validation/Contracts/JsonSchemaValidationIssue.cs b/src/Components/Validation/FluxFlow.Components.Validation/Contracts/JsonSchemaValidationIssue.cs similarity index 100% rename from src/FluxFlow.Components.Validation/Contracts/JsonSchemaValidationIssue.cs rename to src/Components/Validation/FluxFlow.Components.Validation/Contracts/JsonSchemaValidationIssue.cs diff --git a/src/FluxFlow.Components.Validation/Contracts/JsonSchemaValidationResult.cs b/src/Components/Validation/FluxFlow.Components.Validation/Contracts/JsonSchemaValidationResult.cs similarity index 100% rename from src/FluxFlow.Components.Validation/Contracts/JsonSchemaValidationResult.cs rename to src/Components/Validation/FluxFlow.Components.Validation/Contracts/JsonSchemaValidationResult.cs diff --git a/src/FluxFlow.Components.Validation/Contracts/JsonSchemaValidatorContext.cs b/src/Components/Validation/FluxFlow.Components.Validation/Contracts/JsonSchemaValidatorContext.cs similarity index 100% rename from src/FluxFlow.Components.Validation/Contracts/JsonSchemaValidatorContext.cs rename to src/Components/Validation/FluxFlow.Components.Validation/Contracts/JsonSchemaValidatorContext.cs diff --git a/src/FluxFlow.Components.Validation/Diagnostics/ValidationDiagnosticNames.cs b/src/Components/Validation/FluxFlow.Components.Validation/Diagnostics/ValidationDiagnosticNames.cs similarity index 100% rename from src/FluxFlow.Components.Validation/Diagnostics/ValidationDiagnosticNames.cs rename to src/Components/Validation/FluxFlow.Components.Validation/Diagnostics/ValidationDiagnosticNames.cs diff --git a/src/FluxFlow.Components.Validation/FluxFlow.Components.Validation.csproj b/src/Components/Validation/FluxFlow.Components.Validation/FluxFlow.Components.Validation.csproj similarity index 70% rename from src/FluxFlow.Components.Validation/FluxFlow.Components.Validation.csproj rename to src/Components/Validation/FluxFlow.Components.Validation/FluxFlow.Components.Validation.csproj index 9888593e..560135f4 100644 --- a/src/FluxFlow.Components.Validation/FluxFlow.Components.Validation.csproj +++ b/src/Components/Validation/FluxFlow.Components.Validation/FluxFlow.Components.Validation.csproj @@ -4,14 +4,14 @@ FluxFlow.Components.Validation FluxFlow.Components.Validation FluxFlow.Components.Validation - 6.0.0 + 7.0.0-rc.1 Standalone JSON Schema validation for immutable FluxFlow values with one normal result stream. No engine required. workflow;dataflow;components;validation;json-schema - Migrates component inputs and outputs to typed FlowMessage<T> value-or-error contracts, removes universal FlowValue or FlowResult coupling, and keeps errors on the normal output. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. README.md - + diff --git a/src/FluxFlow.Components.Validation/Nodes/JsonSchemaValidatorNode.cs b/src/Components/Validation/FluxFlow.Components.Validation/Nodes/JsonSchemaValidatorNode.cs similarity index 91% rename from src/FluxFlow.Components.Validation/Nodes/JsonSchemaValidatorNode.cs rename to src/Components/Validation/FluxFlow.Components.Validation/Nodes/JsonSchemaValidatorNode.cs index 81263742..b76a9bf7 100644 --- a/src/FluxFlow.Components.Validation/Nodes/JsonSchemaValidatorNode.cs +++ b/src/Components/Validation/FluxFlow.Components.Validation/Nodes/JsonSchemaValidatorNode.cs @@ -12,7 +12,7 @@ namespace FluxFlow.Components.Validation.Nodes; /// /// Evaluates JSON values against a precompiled JSON Schema. /// -public sealed class JsonSchemaValidatorNode : FlowNode +public sealed class JsonSchemaValidatorNode : FlowNode { private static readonly EvaluationOptions EvaluationOptions = new() { @@ -54,25 +54,27 @@ public JsonSchemaValidatorNode( protected override bool HandlesErrors => true; - protected override async Task ProcessAsync(FlowMessage message) + protected override async Task ProcessAsync(FlowMessage message) => await EmitAsync(Process(message), Stopping).ConfigureAwait(false); - private FlowMessage Process(FlowMessage message) + private FlowMessage Process(FlowMessage message) { ArgumentNullException.ThrowIfNull(message); if (message.IsError) - return message.WithError(message.Error!); + return message.WithError(message.Error!); var timestamp = _clock.GetUtcNow(); + var input = FlowValueMaterializers.JsonElement.Materialize(message.Value).Value; JsonElement selectedValue; try { - selectedValue = _selector.Select(message.Value, _nodeContext).Clone(); + selectedValue = _selector.Select(input, _nodeContext).Clone(); } catch (Exception exception) { return Failure( message, + input, timestamp, ValidationResultKinds.ValueSelectorFailed, ValidationErrorCodeNames.ValueSelectorFailed, @@ -89,6 +91,7 @@ private FlowMessage Process(FlowMessage { return Failure( message, + input, timestamp, ValidationResultKinds.EvaluationFailed, ValidationErrorCodeNames.EvaluationFailed, @@ -100,7 +103,7 @@ private FlowMessage Process(FlowMessage var result = new JsonSchemaValidationResult { Timestamp = timestamp, - Input = message.Value.Clone(), + Input = input.Clone(), Value = selectedValue, IsValid = evaluation.IsValid, SchemaId = _schemaId, @@ -119,11 +122,12 @@ private FlowMessage Process(FlowMessage resultKind, issues.Count, isError: false); - return message.With(result); + return message.With(FlowValue.From(result)); } - private FlowMessage Failure( - FlowMessage message, + private FlowMessage Failure( + FlowMessage message, + JsonElement input, DateTimeOffset timestamp, string resultKind, string errorCode, @@ -135,7 +139,7 @@ private FlowMessage Failure( errorMessage, category: "Validation", isTransient: false, - details: CreateErrorDetails(message.Value, exception)); + details: CreateErrorDetails(input, exception)); PublishEvent( message, timestamp, @@ -145,11 +149,11 @@ private FlowMessage Failure( resultKind, issueCount: 0, isError: true); - return message.WithError(error); + return message.WithError(error); } private void PublishEvent( - FlowMessage message, + FlowMessage message, DateTimeOffset timestamp, string name, FlowEventLevel level, diff --git a/src/FluxFlow.Components.Validation/Options/JsonSchemaValidatorOptions.cs b/src/Components/Validation/FluxFlow.Components.Validation/Options/JsonSchemaValidatorOptions.cs similarity index 100% rename from src/FluxFlow.Components.Validation/Options/JsonSchemaValidatorOptions.cs rename to src/Components/Validation/FluxFlow.Components.Validation/Options/JsonSchemaValidatorOptions.cs diff --git a/src/FluxFlow.Components.Validation/README.md b/src/Components/Validation/FluxFlow.Components.Validation/README.md similarity index 100% rename from src/FluxFlow.Components.Validation/README.md rename to src/Components/Validation/FluxFlow.Components.Validation/README.md diff --git a/src/FluxFlow.Components.Validation/ValidationErrorCodeNames.cs b/src/Components/Validation/FluxFlow.Components.Validation/ValidationErrorCodeNames.cs similarity index 100% rename from src/FluxFlow.Components.Validation/ValidationErrorCodeNames.cs rename to src/Components/Validation/FluxFlow.Components.Validation/ValidationErrorCodeNames.cs diff --git a/src/FluxFlow.Components.Validation/ValidationResultKinds.cs b/src/Components/Validation/FluxFlow.Components.Validation/ValidationResultKinds.cs similarity index 100% rename from src/FluxFlow.Components.Validation/ValidationResultKinds.cs rename to src/Components/Validation/FluxFlow.Components.Validation/ValidationResultKinds.cs diff --git a/src/FluxFlow.Composition/Addressing/ApplicationAddress.cs b/src/Core/Application/FluxFlow.Composition/Addressing/ApplicationAddress.cs similarity index 100% rename from src/FluxFlow.Composition/Addressing/ApplicationAddress.cs rename to src/Core/Application/FluxFlow.Composition/Addressing/ApplicationAddress.cs diff --git a/src/FluxFlow.Composition/Addressing/ApplicationAddressKind.cs b/src/Core/Application/FluxFlow.Composition/Addressing/ApplicationAddressKind.cs similarity index 100% rename from src/FluxFlow.Composition/Addressing/ApplicationAddressKind.cs rename to src/Core/Application/FluxFlow.Composition/Addressing/ApplicationAddressKind.cs diff --git a/src/FluxFlow.Composition/ApplicationLinks/ApplicationLinkCompilationResult.cs b/src/Core/Application/FluxFlow.Composition/ApplicationLinks/ApplicationLinkCompilationResult.cs similarity index 100% rename from src/FluxFlow.Composition/ApplicationLinks/ApplicationLinkCompilationResult.cs rename to src/Core/Application/FluxFlow.Composition/ApplicationLinks/ApplicationLinkCompilationResult.cs diff --git a/src/FluxFlow.Composition/ApplicationLinks/ApplicationLinkCompiler.cs b/src/Core/Application/FluxFlow.Composition/ApplicationLinks/ApplicationLinkCompiler.cs similarity index 84% rename from src/FluxFlow.Composition/ApplicationLinks/ApplicationLinkCompiler.cs rename to src/Core/Application/FluxFlow.Composition/ApplicationLinks/ApplicationLinkCompiler.cs index 9ed4f505..91f2f866 100644 --- a/src/FluxFlow.Composition/ApplicationLinks/ApplicationLinkCompiler.cs +++ b/src/Core/Application/FluxFlow.Composition/ApplicationLinks/ApplicationLinkCompiler.cs @@ -173,58 +173,14 @@ private void CollectDeclarations( canProjectProperty = false; } - var sourceValid = TryResolveMetadata( - source, - output: true, - components, - _systemOutputs, + var candidate = CompileLink( + new LinkCompilationInput(source, target, declaration.Condition, side), context, - diagnostics, - out var sourceMetadata); - var targetValid = TryResolveMetadata( - target, - output: false, components, - _systemOutputs, - context, - diagnostics, - out var targetMetadata); - IFlowCompiledExpression? compiledCondition = null; - var conditionValid = declaration.Condition is null || - TryCompileCondition( - declaration.Condition, - context, - conditionCache, - diagnostics, - out compiledCondition); - - if (!sourceValid || !targetValid || !conditionValid) - continue; - - if (sourceMetadata is not null && - targetMetadata!.Kind != ComponentPortKind.Signal && - sourceMetadata.MessageType != targetMetadata.MessageType) - { - diagnostics.Add(CreateDiagnostic( - ApplicationLinkDiagnosticCode.PortTypeMismatch, - $"Link '{source}' to '{target}' connects '{sourceMetadata.MessageType}' to incompatible '{targetMetadata.MessageType}'.", - context, - source, - target)); - continue; - } - - candidates.Add(new LinkCandidate( - new CompiledApplicationLink( - source, - target, - sourceMetadata!.MessageType, - declaration.Condition, - compiledCondition is null - ? null - : context => compiledCondition.Evaluate(context), - side), - context)); + conditionCache, + diagnostics); + if (candidate is not null) + candidates.Add(candidate); } if (canProjectProperty) @@ -244,70 +200,22 @@ private void CollectCodeLinks( foreach (var link in links) { var context = CreateContext(link.Source); - var sourceValid = TryResolveMetadata( - link.Source, - output: true, - components, - _systemOutputs, + var candidate = CompileLink( + new LinkCompilationInput( + link.Source, + link.Target, + link.ConditionExpression, + link.DeclarationSide, + link.MessageType, + link.CodeCondition), context, - diagnostics, - out var sourceMetadata); - var targetValid = TryResolveMetadata( - link.Target, - output: false, components, - _systemOutputs, - context, - diagnostics, - out var targetMetadata); - - IFlowCompiledExpression? compiledExpression = null; - var conditionValid = link.ConditionExpression is null || - TryCompileCondition( - link.ConditionExpression, - context, - conditionCache, - diagnostics, - out compiledExpression); - - if (!sourceValid || !targetValid || !conditionValid) - continue; - - if (sourceMetadata!.MessageType != link.MessageType) - { - diagnostics.Add(CreateDiagnostic( - ApplicationLinkDiagnosticCode.PortTypeMismatch, - $"Link '{link.Source}' to '{link.Target}' declares '{link.MessageType}' but source port '{link.Source}' carries '{sourceMetadata.MessageType}'.", - context, - link.Source, - link.Target)); - continue; - } - - if (targetMetadata!.Kind != ComponentPortKind.Signal && - sourceMetadata.MessageType != targetMetadata.MessageType) - { - diagnostics.Add(CreateDiagnostic( - ApplicationLinkDiagnosticCode.PortTypeMismatch, - $"Link '{link.Source}' to '{link.Target}' connects '{sourceMetadata.MessageType}' to incompatible '{targetMetadata.MessageType}'.", - context, - link.Source, - link.Target)); + conditionCache, + diagnostics); + if (candidate is null) continue; - } - Func? condition = link.CodeCondition; - if (condition is null && compiledExpression is not null) - condition = context => compiledExpression.Evaluate(context); - candidates.Add(new LinkCandidate( - new CompiledApplicationLink( - link.Source, - link.Target, - sourceMetadata.MessageType, - link.ConditionExpression, - condition, - link.DeclarationSide), - context)); + candidates.Add(candidate); if (link.CodeCondition is null && ApplicationLinkDeclarationProjection.CanProject( @@ -324,6 +232,82 @@ private void CollectCodeLinks( } } + private LinkCandidate? CompileLink( + LinkCompilationInput link, + DeclarationContext context, + IReadOnlyDictionary components, + Dictionary conditionCache, + List diagnostics) + { + // Resolve both endpoints and compile the condition even when another check fails. + var sourceValid = TryResolveMetadata( + link.Source, + output: true, + components, + _systemOutputs, + context, + diagnostics, + out var sourceMetadata); + var targetValid = TryResolveMetadata( + link.Target, + output: false, + components, + _systemOutputs, + context, + diagnostics, + out var targetMetadata); + IFlowCompiledExpression? compiledExpression = null; + var conditionValid = link.ConditionExpression is null || + TryCompileCondition( + link.ConditionExpression, + context, + conditionCache, + diagnostics, + out compiledExpression); + + if (!sourceValid || !targetValid || !conditionValid) + return null; + + var messageType = sourceMetadata!.MessageType; + if (link.DeclaredMessageType is not null && + messageType != link.DeclaredMessageType) + { + diagnostics.Add(CreateDiagnostic( + ApplicationLinkDiagnosticCode.PortTypeMismatch, + $"Link '{link.Source}' to '{link.Target}' declares '{link.DeclaredMessageType}' but source port '{link.Source}' carries '{messageType}'.", + context, + link.Source, + link.Target)); + return null; + } + + if (targetMetadata!.Kind != ComponentPortKind.Signal && + messageType != targetMetadata.MessageType) + { + diagnostics.Add(CreateDiagnostic( + ApplicationLinkDiagnosticCode.PortTypeMismatch, + $"Link '{link.Source}' to '{link.Target}' connects '{messageType}' to incompatible '{targetMetadata.MessageType}'.", + context, + link.Source, + link.Target)); + return null; + } + + var condition = link.CodeCondition; + if (condition is null && compiledExpression is not null) + condition = context => compiledExpression.Evaluate(context); + + return new LinkCandidate( + new CompiledApplicationLink( + link.Source, + link.Target, + messageType, + link.ConditionExpression, + condition, + link.DeclarationSide), + context); + } + private static DeclarationContext CreateContext(ApplicationAddress source) => source.Kind == ApplicationAddressKind.WorkflowPort ? new DeclarationContext(source.Segments[0], source.Segments[1], source.Segments[2]) @@ -722,6 +706,14 @@ private sealed record ConditionCompilation( IFlowCompiledExpression? Compiled, Exception? Exception); + private readonly record struct LinkCompilationInput( + ApplicationAddress Source, + ApplicationAddress Target, + string? ConditionExpression, + ApplicationLinkDeclarationSide DeclarationSide, + Type? DeclaredMessageType = null, + Func? CodeCondition = null); + private sealed record LinkCandidate( CompiledApplicationLink Link, DeclarationContext Context); diff --git a/src/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDeclarationParser.cs b/src/Core/Application/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDeclarationParser.cs similarity index 100% rename from src/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDeclarationParser.cs rename to src/Core/Application/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDeclarationParser.cs diff --git a/src/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDeclarationProjection.cs b/src/Core/Application/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDeclarationProjection.cs similarity index 100% rename from src/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDeclarationProjection.cs rename to src/Core/Application/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDeclarationProjection.cs diff --git a/src/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDeclarationSide.cs b/src/Core/Application/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDeclarationSide.cs similarity index 100% rename from src/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDeclarationSide.cs rename to src/Core/Application/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDeclarationSide.cs diff --git a/src/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDefinition.cs b/src/Core/Application/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDefinition.cs similarity index 87% rename from src/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDefinition.cs rename to src/Core/Application/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDefinition.cs index 828ed3df..cb32edc6 100644 --- a/src/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDefinition.cs +++ b/src/Core/Application/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDefinition.cs @@ -110,13 +110,23 @@ public override int GetHashCode() private static bool Match(FlowMapContext context, Func when) { - if (!context.Variables.TryGetValue("message", out var candidate) || - candidate is not FlowMessage message) + if (!context.Variables.TryGetValue("message", out var candidate)) { throw new InvalidOperationException( $"Link condition expected a FlowMessage<{typeof(TMessage)}> context."); } - return !message.IsError && when(message.Value); + if (candidate is FlowMessage typedMessage) + return !typedMessage.IsError && when(typedMessage.Value); + + if (typeof(TMessage) == typeof(global::FluxFlow.Data.FlowValue) && + candidate is FlowMessage canonicalMessage) + { + return !canonicalMessage.IsError && + when((TMessage)(object)canonicalMessage.Value!); + } + + throw new InvalidOperationException( + $"Link condition expected a FlowMessage<{typeof(TMessage)}> context."); } } diff --git a/src/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDiagnostic.cs b/src/Core/Application/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDiagnostic.cs similarity index 100% rename from src/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDiagnostic.cs rename to src/Core/Application/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDiagnostic.cs diff --git a/src/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDiagnosticCode.cs b/src/Core/Application/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDiagnosticCode.cs similarity index 100% rename from src/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDiagnosticCode.cs rename to src/Core/Application/FluxFlow.Composition/ApplicationLinks/ApplicationLinkDiagnosticCode.cs diff --git a/src/FluxFlow.Composition/ApplicationLinks/ApplicationSystemOutputMetadata.cs b/src/Core/Application/FluxFlow.Composition/ApplicationLinks/ApplicationSystemOutputMetadata.cs similarity index 100% rename from src/FluxFlow.Composition/ApplicationLinks/ApplicationSystemOutputMetadata.cs rename to src/Core/Application/FluxFlow.Composition/ApplicationLinks/ApplicationSystemOutputMetadata.cs diff --git a/src/FluxFlow.Composition/ApplicationLinks/CompiledApplicationLink.cs b/src/Core/Application/FluxFlow.Composition/ApplicationLinks/CompiledApplicationLink.cs similarity index 100% rename from src/FluxFlow.Composition/ApplicationLinks/CompiledApplicationLink.cs rename to src/Core/Application/FluxFlow.Composition/ApplicationLinks/CompiledApplicationLink.cs diff --git a/src/FluxFlow.Composition/ApplicationModel/ApplicationDefinition.cs b/src/Core/Application/FluxFlow.Composition/ApplicationModel/ApplicationDefinition.cs similarity index 100% rename from src/FluxFlow.Composition/ApplicationModel/ApplicationDefinition.cs rename to src/Core/Application/FluxFlow.Composition/ApplicationModel/ApplicationDefinition.cs diff --git a/src/FluxFlow.Composition/ApplicationModel/ApplicationDefinitionJson.cs b/src/Core/Application/FluxFlow.Composition/ApplicationModel/ApplicationDefinitionJson.cs similarity index 100% rename from src/FluxFlow.Composition/ApplicationModel/ApplicationDefinitionJson.cs rename to src/Core/Application/FluxFlow.Composition/ApplicationModel/ApplicationDefinitionJson.cs diff --git a/src/FluxFlow.Composition/ApplicationModel/ApplicationDefinitionJsonConverter.cs b/src/Core/Application/FluxFlow.Composition/ApplicationModel/ApplicationDefinitionJsonConverter.cs similarity index 100% rename from src/FluxFlow.Composition/ApplicationModel/ApplicationDefinitionJsonConverter.cs rename to src/Core/Application/FluxFlow.Composition/ApplicationModel/ApplicationDefinitionJsonConverter.cs diff --git a/src/FluxFlow.Composition/ApplicationModel/CanonicalApplicationProperties.cs b/src/Core/Application/FluxFlow.Composition/ApplicationModel/CanonicalApplicationProperties.cs similarity index 100% rename from src/FluxFlow.Composition/ApplicationModel/CanonicalApplicationProperties.cs rename to src/Core/Application/FluxFlow.Composition/ApplicationModel/CanonicalApplicationProperties.cs diff --git a/src/FluxFlow.Composition/ApplicationModel/ComponentDefinition.cs b/src/Core/Application/FluxFlow.Composition/ApplicationModel/ComponentDefinition.cs similarity index 100% rename from src/FluxFlow.Composition/ApplicationModel/ComponentDefinition.cs rename to src/Core/Application/FluxFlow.Composition/ApplicationModel/ComponentDefinition.cs diff --git a/src/FluxFlow.Composition/ApplicationModel/DefinitionRules.cs b/src/Core/Application/FluxFlow.Composition/ApplicationModel/DefinitionRules.cs similarity index 100% rename from src/FluxFlow.Composition/ApplicationModel/DefinitionRules.cs rename to src/Core/Application/FluxFlow.Composition/ApplicationModel/DefinitionRules.cs diff --git a/src/FluxFlow.Composition/ApplicationModel/ResourceDefinition.cs b/src/Core/Application/FluxFlow.Composition/ApplicationModel/ResourceDefinition.cs similarity index 100% rename from src/FluxFlow.Composition/ApplicationModel/ResourceDefinition.cs rename to src/Core/Application/FluxFlow.Composition/ApplicationModel/ResourceDefinition.cs diff --git a/src/FluxFlow.Composition/ApplicationModel/ResourceGroupDefinition.cs b/src/Core/Application/FluxFlow.Composition/ApplicationModel/ResourceGroupDefinition.cs similarity index 100% rename from src/FluxFlow.Composition/ApplicationModel/ResourceGroupDefinition.cs rename to src/Core/Application/FluxFlow.Composition/ApplicationModel/ResourceGroupDefinition.cs diff --git a/src/FluxFlow.Composition/ApplicationModel/ResourceInstanceDefinition.cs b/src/Core/Application/FluxFlow.Composition/ApplicationModel/ResourceInstanceDefinition.cs similarity index 100% rename from src/FluxFlow.Composition/ApplicationModel/ResourceInstanceDefinition.cs rename to src/Core/Application/FluxFlow.Composition/ApplicationModel/ResourceInstanceDefinition.cs diff --git a/src/FluxFlow.Composition/ApplicationModel/WorkflowDefinition.cs b/src/Core/Application/FluxFlow.Composition/ApplicationModel/WorkflowDefinition.cs similarity index 100% rename from src/FluxFlow.Composition/ApplicationModel/WorkflowDefinition.cs rename to src/Core/Application/FluxFlow.Composition/ApplicationModel/WorkflowDefinition.cs diff --git a/src/FluxFlow.Composition/Authoring/ApplicationDefinitionBuilder.cs b/src/Core/Application/FluxFlow.Composition/Authoring/ApplicationDefinitionBuilder.cs similarity index 100% rename from src/FluxFlow.Composition/Authoring/ApplicationDefinitionBuilder.cs rename to src/Core/Application/FluxFlow.Composition/Authoring/ApplicationDefinitionBuilder.cs diff --git a/src/FluxFlow.Composition/Authoring/ApplicationResourceAuthoringExtensions.cs b/src/Core/Application/FluxFlow.Composition/Authoring/ApplicationResourceAuthoringExtensions.cs similarity index 100% rename from src/FluxFlow.Composition/Authoring/ApplicationResourceAuthoringExtensions.cs rename to src/Core/Application/FluxFlow.Composition/Authoring/ApplicationResourceAuthoringExtensions.cs diff --git a/src/FluxFlow.Composition/Authoring/ApplicationResourceContract.cs b/src/Core/Application/FluxFlow.Composition/Authoring/ApplicationResourceContract.cs similarity index 100% rename from src/FluxFlow.Composition/Authoring/ApplicationResourceContract.cs rename to src/Core/Application/FluxFlow.Composition/Authoring/ApplicationResourceContract.cs diff --git a/src/FluxFlow.Composition/Authoring/ApplicationResourceContractCollection.cs b/src/Core/Application/FluxFlow.Composition/Authoring/ApplicationResourceContractCollection.cs similarity index 100% rename from src/FluxFlow.Composition/Authoring/ApplicationResourceContractCollection.cs rename to src/Core/Application/FluxFlow.Composition/Authoring/ApplicationResourceContractCollection.cs diff --git a/src/FluxFlow.Composition/Authoring/AuthoringHandles.cs b/src/Core/Application/FluxFlow.Composition/Authoring/AuthoringHandles.cs similarity index 93% rename from src/FluxFlow.Composition/Authoring/AuthoringHandles.cs rename to src/Core/Application/FluxFlow.Composition/Authoring/AuthoringHandles.cs index d87bbadd..4fa8962a 100644 --- a/src/FluxFlow.Composition/Authoring/AuthoringHandles.cs +++ b/src/Core/Application/FluxFlow.Composition/Authoring/AuthoringHandles.cs @@ -254,14 +254,14 @@ public InputOutputComponentHandle( { Input = definition.Input(inputName); Output = definition.Output(outputName); - Events = definition.Output(eventsName); + Events = definition.Output(eventsName); } public InputPortHandle Input { get; } public OutputPortHandle Output { get; } - public OutputPortHandle Events { get; } + public OutputPortHandle Events { get; } } public sealed class InputComponentHandle : AuthoredComponentHandle @@ -273,12 +273,12 @@ public InputComponentHandle( : base(definition) { Input = definition.Input(inputName); - Events = definition.Output(eventsName); + Events = definition.Output(eventsName); } public InputPortHandle Input { get; } - public OutputPortHandle Events { get; } + public OutputPortHandle Events { get; } } public sealed class OutputComponentHandle : AuthoredComponentHandle @@ -290,12 +290,12 @@ public OutputComponentHandle( : base(definition) { Output = definition.Output(outputName); - Events = definition.Output(eventsName); + Events = definition.Output(eventsName); } public OutputPortHandle Output { get; } - public OutputPortHandle Events { get; } + public OutputPortHandle Events { get; } } public sealed class DualInputOutputComponentHandle : AuthoredComponentHandle @@ -311,7 +311,7 @@ public DualInputOutputComponentHandle( Left = definition.Input(leftName); Right = definition.Input(rightName); Output = definition.Output(outputName); - Events = definition.Output(eventsName); + Events = definition.Output(eventsName); } public InputPortHandle Left { get; } @@ -320,5 +320,5 @@ public DualInputOutputComponentHandle( public OutputPortHandle Output { get; } - public OutputPortHandle Events { get; } + public OutputPortHandle Events { get; } } diff --git a/src/FluxFlow.Composition/Authoring/AuthoringScope.cs b/src/Core/Application/FluxFlow.Composition/Authoring/AuthoringScope.cs similarity index 100% rename from src/FluxFlow.Composition/Authoring/AuthoringScope.cs rename to src/Core/Application/FluxFlow.Composition/Authoring/AuthoringScope.cs diff --git a/src/FluxFlow.Composition/Authoring/ComponentContract.cs b/src/Core/Application/FluxFlow.Composition/Authoring/ComponentContract.cs similarity index 100% rename from src/FluxFlow.Composition/Authoring/ComponentContract.cs rename to src/Core/Application/FluxFlow.Composition/Authoring/ComponentContract.cs diff --git a/src/FluxFlow.Composition/Authoring/ComponentContractCollection.cs b/src/Core/Application/FluxFlow.Composition/Authoring/ComponentContractCollection.cs similarity index 100% rename from src/FluxFlow.Composition/Authoring/ComponentContractCollection.cs rename to src/Core/Application/FluxFlow.Composition/Authoring/ComponentContractCollection.cs diff --git a/src/FluxFlow.Composition/Authoring/DefinitionPropertyBuilder.cs b/src/Core/Application/FluxFlow.Composition/Authoring/DefinitionPropertyBuilder.cs similarity index 100% rename from src/FluxFlow.Composition/Authoring/DefinitionPropertyBuilder.cs rename to src/Core/Application/FluxFlow.Composition/Authoring/DefinitionPropertyBuilder.cs diff --git a/src/FluxFlow.Composition/Authoring/ResourceDefinitionContainerBuilder.cs b/src/Core/Application/FluxFlow.Composition/Authoring/ResourceDefinitionContainerBuilder.cs similarity index 100% rename from src/FluxFlow.Composition/Authoring/ResourceDefinitionContainerBuilder.cs rename to src/Core/Application/FluxFlow.Composition/Authoring/ResourceDefinitionContainerBuilder.cs diff --git a/src/FluxFlow.Composition/Authoring/WorkflowDefinitionBuilder.cs b/src/Core/Application/FluxFlow.Composition/Authoring/WorkflowDefinitionBuilder.cs similarity index 100% rename from src/FluxFlow.Composition/Authoring/WorkflowDefinitionBuilder.cs rename to src/Core/Application/FluxFlow.Composition/Authoring/WorkflowDefinitionBuilder.cs diff --git a/src/FluxFlow.Composition/CompatibilitySuppressions.xml b/src/Core/Application/FluxFlow.Composition/CompatibilitySuppressions.xml similarity index 66% rename from src/FluxFlow.Composition/CompatibilitySuppressions.xml rename to src/Core/Application/FluxFlow.Composition/CompatibilitySuppressions.xml index 7468c3a1..338ebde2 100644 --- a/src/FluxFlow.Composition/CompatibilitySuppressions.xml +++ b/src/Core/Application/FluxFlow.Composition/CompatibilitySuppressions.xml @@ -1,202 +1,186 @@  - + CP0001 - T:FluxFlow.Composition.ComponentEvents + T:FluxFlow.Composition.ComponentEvent lib/net10.0/FluxFlow.Composition.dll lib/net10.0/FluxFlow.Composition.dll true CP0001 - T:FluxFlow.Composition.ComponentEvents + T:FluxFlow.Composition.ComponentEvent lib/net8.0/FluxFlow.Composition.dll lib/net8.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.Authoring.DualInputOutputComponentHandle`3.#ctor(FluxFlow.Composition.Authoring.ComponentHandle,System.String,System.String,System.String) + M:FluxFlow.Composition.ApplicationRuntime.get_Events lib/net10.0/FluxFlow.Composition.dll lib/net10.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.Authoring.InputComponentHandle`1.#ctor(FluxFlow.Composition.Authoring.ComponentHandle,System.String) + M:FluxFlow.Composition.Authoring.DualInputOutputComponentHandle`3.get_Events lib/net10.0/FluxFlow.Composition.dll lib/net10.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.Authoring.InputOutputComponentHandle`2.#ctor(FluxFlow.Composition.Authoring.ComponentHandle,System.String,System.String) + M:FluxFlow.Composition.Authoring.InputComponentHandle`1.get_Events lib/net10.0/FluxFlow.Composition.dll lib/net10.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.Authoring.OutputComponentHandle`1.#ctor(FluxFlow.Composition.Authoring.ComponentHandle,System.String) + M:FluxFlow.Composition.Authoring.InputOutputComponentHandle`2.get_Events lib/net10.0/FluxFlow.Composition.dll lib/net10.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.ComponentInstance.#ctor(FluxFlow.Nodes.IFlowNode,System.Collections.Generic.IEnumerable{FluxFlow.Composition.ComponentInputPort},System.Collections.Generic.IEnumerable{FluxFlow.Composition.ComponentOutputPort},System.Threading.Tasks.Dataflow.ISourceBlock{FluxFlow.Nodes.FlowEvent},System.Threading.Tasks.Task,System.Func{System.Threading.Tasks.ValueTask}) + M:FluxFlow.Composition.Authoring.OutputComponentHandle`1.get_Events lib/net10.0/FluxFlow.Composition.dll lib/net10.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.ComponentInstance.Create(FluxFlow.Nodes.IFlowNode,System.Collections.Generic.IEnumerable{FluxFlow.Composition.ComponentInputPort},System.Collections.Generic.IEnumerable{FluxFlow.Composition.ComponentOutputPort},System.Threading.Tasks.Dataflow.ISourceBlock{FluxFlow.Nodes.FlowEvent},System.Threading.Tasks.Task,System.Func{System.Threading.Tasks.ValueTask}) + M:FluxFlow.Composition.ComponentEventSource.#ctor(System.String,System.Threading.Tasks.Dataflow.ISourceBlock{FluxFlow.Nodes.FlowEvent}) lib/net10.0/FluxFlow.Composition.dll lib/net10.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.FluxFlowRegistrationExtensions.AddRuntimeComponent(FluxFlow.Composition.FluxFlowRegistrationBuilder,System.String,System.Action{FluxFlow.Composition.RuntimeComponentRegistrationBuilder}) + M:FluxFlow.Composition.ComponentEventSource.get_Source lib/net10.0/FluxFlow.Composition.dll lib/net10.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.RuntimeComponentRegistrationBuilder.AddInput``1(System.String,FluxFlow.Composition.ComponentPortLinkCardinality) + M:FluxFlow.Composition.ComponentInstance.#ctor(FluxFlow.Nodes.IFlowNode,System.Collections.Generic.IEnumerable{FluxFlow.Composition.ComponentInputPort},System.Collections.Generic.IEnumerable{FluxFlow.Composition.ComponentOutputPort},System.Threading.Tasks.Dataflow.ISourceBlock{FluxFlow.Nodes.FlowEvent},System.Threading.Tasks.Task,System.Func{System.Threading.Tasks.ValueTask},System.Collections.Generic.IEnumerable{FluxFlow.Composition.ComponentEventSource}) lib/net10.0/FluxFlow.Composition.dll lib/net10.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.RuntimeComponentRegistrationBuilder.AddOutput``1(System.String,FluxFlow.Composition.ComponentPortLinkCardinality) + M:FluxFlow.Composition.ComponentInstance.Create(FluxFlow.Nodes.IFlowNode,System.Collections.Generic.IEnumerable{FluxFlow.Composition.ComponentInputPort},System.Collections.Generic.IEnumerable{FluxFlow.Composition.ComponentOutputPort},System.Threading.Tasks.Dataflow.ISourceBlock{FluxFlow.Nodes.FlowEvent},System.Threading.Tasks.Task,System.Func{System.Threading.Tasks.ValueTask},System.Collections.Generic.IEnumerable{FluxFlow.Composition.ComponentEventSource}) lib/net10.0/FluxFlow.Composition.dll lib/net10.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.RuntimeComponentRegistrationBuilder.AddSignalInput(System.String,FluxFlow.Composition.ComponentPortLinkCardinality) + M:FluxFlow.Composition.ComponentInstance.get_Events lib/net10.0/FluxFlow.Composition.dll lib/net10.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.RuntimeComponentRegistrationBuilder.UseFactory(FluxFlow.Composition.ComponentFactory) + M:FluxFlow.Composition.ComponentPorts.Events(System.String,System.Threading.Tasks.Dataflow.ISourceBlock{FluxFlow.Nodes.FlowEvent}) lib/net10.0/FluxFlow.Composition.dll lib/net10.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.Authoring.DualInputOutputComponentHandle`3.#ctor(FluxFlow.Composition.Authoring.ComponentHandle,System.String,System.String,System.String) - lib/net8.0/FluxFlow.Composition.dll - lib/net8.0/FluxFlow.Composition.dll + M:FluxFlow.Composition.RuntimeComponentBindingBuilder`1.HasEvents(System.String,System.Func{`0,System.Threading.Tasks.Dataflow.ISourceBlock{FluxFlow.Nodes.FlowEvent}},FluxFlow.Composition.ComponentPortLinkCardinality) + lib/net10.0/FluxFlow.Composition.dll + lib/net10.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.Authoring.InputComponentHandle`1.#ctor(FluxFlow.Composition.Authoring.ComponentHandle,System.String) + M:FluxFlow.Composition.ApplicationRuntime.get_Events lib/net8.0/FluxFlow.Composition.dll lib/net8.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.Authoring.InputOutputComponentHandle`2.#ctor(FluxFlow.Composition.Authoring.ComponentHandle,System.String,System.String) + M:FluxFlow.Composition.Authoring.DualInputOutputComponentHandle`3.get_Events lib/net8.0/FluxFlow.Composition.dll lib/net8.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.Authoring.OutputComponentHandle`1.#ctor(FluxFlow.Composition.Authoring.ComponentHandle,System.String) + M:FluxFlow.Composition.Authoring.InputComponentHandle`1.get_Events lib/net8.0/FluxFlow.Composition.dll lib/net8.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.ComponentInstance.#ctor(FluxFlow.Nodes.IFlowNode,System.Collections.Generic.IEnumerable{FluxFlow.Composition.ComponentInputPort},System.Collections.Generic.IEnumerable{FluxFlow.Composition.ComponentOutputPort},System.Threading.Tasks.Dataflow.ISourceBlock{FluxFlow.Nodes.FlowEvent},System.Threading.Tasks.Task,System.Func{System.Threading.Tasks.ValueTask}) + M:FluxFlow.Composition.Authoring.InputOutputComponentHandle`2.get_Events lib/net8.0/FluxFlow.Composition.dll lib/net8.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.ComponentInstance.Create(FluxFlow.Nodes.IFlowNode,System.Collections.Generic.IEnumerable{FluxFlow.Composition.ComponentInputPort},System.Collections.Generic.IEnumerable{FluxFlow.Composition.ComponentOutputPort},System.Threading.Tasks.Dataflow.ISourceBlock{FluxFlow.Nodes.FlowEvent},System.Threading.Tasks.Task,System.Func{System.Threading.Tasks.ValueTask}) + M:FluxFlow.Composition.Authoring.OutputComponentHandle`1.get_Events lib/net8.0/FluxFlow.Composition.dll lib/net8.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.FluxFlowRegistrationExtensions.AddRuntimeComponent(FluxFlow.Composition.FluxFlowRegistrationBuilder,System.String,System.Action{FluxFlow.Composition.RuntimeComponentRegistrationBuilder}) + M:FluxFlow.Composition.ComponentEventSource.#ctor(System.String,System.Threading.Tasks.Dataflow.ISourceBlock{FluxFlow.Nodes.FlowEvent}) lib/net8.0/FluxFlow.Composition.dll lib/net8.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.RuntimeComponentRegistrationBuilder.AddInput``1(System.String,FluxFlow.Composition.ComponentPortLinkCardinality) + M:FluxFlow.Composition.ComponentEventSource.get_Source lib/net8.0/FluxFlow.Composition.dll lib/net8.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.RuntimeComponentRegistrationBuilder.AddOutput``1(System.String,FluxFlow.Composition.ComponentPortLinkCardinality) + M:FluxFlow.Composition.ComponentInstance.#ctor(FluxFlow.Nodes.IFlowNode,System.Collections.Generic.IEnumerable{FluxFlow.Composition.ComponentInputPort},System.Collections.Generic.IEnumerable{FluxFlow.Composition.ComponentOutputPort},System.Threading.Tasks.Dataflow.ISourceBlock{FluxFlow.Nodes.FlowEvent},System.Threading.Tasks.Task,System.Func{System.Threading.Tasks.ValueTask},System.Collections.Generic.IEnumerable{FluxFlow.Composition.ComponentEventSource}) lib/net8.0/FluxFlow.Composition.dll lib/net8.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.RuntimeComponentRegistrationBuilder.AddSignalInput(System.String,FluxFlow.Composition.ComponentPortLinkCardinality) + M:FluxFlow.Composition.ComponentInstance.Create(FluxFlow.Nodes.IFlowNode,System.Collections.Generic.IEnumerable{FluxFlow.Composition.ComponentInputPort},System.Collections.Generic.IEnumerable{FluxFlow.Composition.ComponentOutputPort},System.Threading.Tasks.Dataflow.ISourceBlock{FluxFlow.Nodes.FlowEvent},System.Threading.Tasks.Task,System.Func{System.Threading.Tasks.ValueTask},System.Collections.Generic.IEnumerable{FluxFlow.Composition.ComponentEventSource}) lib/net8.0/FluxFlow.Composition.dll lib/net8.0/FluxFlow.Composition.dll true CP0002 - M:FluxFlow.Composition.RuntimeComponentRegistrationBuilder.UseFactory(FluxFlow.Composition.ComponentFactory) + M:FluxFlow.Composition.ComponentInstance.get_Events lib/net8.0/FluxFlow.Composition.dll lib/net8.0/FluxFlow.Composition.dll true - CP0006 - M:FluxFlow.Composition.Authoring.IResourceDefinitionContainerBuilder.AddResource``1(System.String,FluxFlow.Composition.Authoring.ApplicationResourceContract{``0}) - lib/net10.0/FluxFlow.Composition.dll - lib/net10.0/FluxFlow.Composition.dll - true - - - CP0006 - M:FluxFlow.Composition.Authoring.IResourceDefinitionContainerBuilder.AddResource``2(System.String,FluxFlow.Composition.Authoring.ApplicationResourceContract{``0,``1},System.Action{``0}) - lib/net10.0/FluxFlow.Composition.dll - lib/net10.0/FluxFlow.Composition.dll - true - - - CP0006 - M:FluxFlow.Composition.Authoring.IResourceDefinitionContainerBuilder.AddResource``1(System.String,FluxFlow.Composition.Authoring.ApplicationResourceContract{``0}) + CP0002 + M:FluxFlow.Composition.ComponentPorts.Events(System.String,System.Threading.Tasks.Dataflow.ISourceBlock{FluxFlow.Nodes.FlowEvent}) lib/net8.0/FluxFlow.Composition.dll lib/net8.0/FluxFlow.Composition.dll true - CP0006 - M:FluxFlow.Composition.Authoring.IResourceDefinitionContainerBuilder.AddResource``2(System.String,FluxFlow.Composition.Authoring.ApplicationResourceContract{``0,``1},System.Action{``0}) + CP0002 + M:FluxFlow.Composition.RuntimeComponentBindingBuilder`1.HasEvents(System.String,System.Func{`0,System.Threading.Tasks.Dataflow.ISourceBlock{FluxFlow.Nodes.FlowEvent}},FluxFlow.Composition.ComponentPortLinkCardinality) lib/net8.0/FluxFlow.Composition.dll lib/net8.0/FluxFlow.Composition.dll true diff --git a/src/FluxFlow.Composition/Configuration/CompositionConfigurationException.cs b/src/Core/Application/FluxFlow.Composition/Configuration/CompositionConfigurationException.cs similarity index 100% rename from src/FluxFlow.Composition/Configuration/CompositionConfigurationException.cs rename to src/Core/Application/FluxFlow.Composition/Configuration/CompositionConfigurationException.cs diff --git a/src/FluxFlow.Composition/DependencyInjection/FluxFlowServiceCollectionExtensions.cs b/src/Core/Application/FluxFlow.Composition/DependencyInjection/FluxFlowServiceCollectionExtensions.cs similarity index 89% rename from src/FluxFlow.Composition/DependencyInjection/FluxFlowServiceCollectionExtensions.cs rename to src/Core/Application/FluxFlow.Composition/DependencyInjection/FluxFlowServiceCollectionExtensions.cs index eaabf975..06bba9b0 100644 --- a/src/FluxFlow.Composition/DependencyInjection/FluxFlowServiceCollectionExtensions.cs +++ b/src/Core/Application/FluxFlow.Composition/DependencyInjection/FluxFlowServiceCollectionExtensions.cs @@ -114,6 +114,19 @@ public static IServiceCollection AddExternalFluxFlowInputPort( return services.AddFluxFlowInputPortView(address, _ => target); } + public static IServiceCollection AddExternalFluxFlowInputPort( + this IServiceCollection services, + ApplicationAddress address, + ITargetBlock target) + { + ArgumentNullException.ThrowIfNull(target); + ValidateAddress(address, ApplicationAddressKind.WorkflowPort); + services.AddKeyedSingleton>( + address.Value, + (_, _) => new TargetBlockView(target)); + return services; + } + public static IServiceCollection AddFluxFlowInputPortView( this IServiceCollection services, ApplicationAddress address, @@ -151,6 +164,19 @@ public static IServiceCollection AddExternalFluxFlowOutputPort( return services.AddFluxFlowOutputPortView(address, _ => source); } + public static IServiceCollection AddExternalFluxFlowOutputPort( + this IServiceCollection services, + ApplicationAddress address, + ISourceBlock source) + { + ArgumentNullException.ThrowIfNull(source); + ValidateOutputAddress(address); + services.AddKeyedSingleton>( + address.Value, + (_, _) => new SourceBlockView(source)); + return services; + } + public static IServiceCollection AddFluxFlowOutputPortView( this IServiceCollection services, ApplicationAddress address, diff --git a/src/FluxFlow.Composition/DependencyInjection/NonOwningDataflowViews.cs b/src/Core/Application/FluxFlow.Composition/DependencyInjection/NonOwningDataflowViews.cs similarity index 100% rename from src/FluxFlow.Composition/DependencyInjection/NonOwningDataflowViews.cs rename to src/Core/Application/FluxFlow.Composition/DependencyInjection/NonOwningDataflowViews.cs diff --git a/src/FluxFlow.Composition/Factories/ComponentActivationContext.cs b/src/Core/Application/FluxFlow.Composition/Factories/ComponentActivationContext.cs similarity index 100% rename from src/FluxFlow.Composition/Factories/ComponentActivationContext.cs rename to src/Core/Application/FluxFlow.Composition/Factories/ComponentActivationContext.cs diff --git a/src/FluxFlow.Composition/Factories/ComponentCatalog.cs b/src/Core/Application/FluxFlow.Composition/Factories/ComponentCatalog.cs similarity index 100% rename from src/FluxFlow.Composition/Factories/ComponentCatalog.cs rename to src/Core/Application/FluxFlow.Composition/Factories/ComponentCatalog.cs diff --git a/src/FluxFlow.Composition/Factories/ComponentDescriptor.cs b/src/Core/Application/FluxFlow.Composition/Factories/ComponentDescriptor.cs similarity index 84% rename from src/FluxFlow.Composition/Factories/ComponentDescriptor.cs rename to src/Core/Application/FluxFlow.Composition/Factories/ComponentDescriptor.cs index 8f349dab..a8c94294 100644 --- a/src/FluxFlow.Composition/Factories/ComponentDescriptor.cs +++ b/src/Core/Application/FluxFlow.Composition/Factories/ComponentDescriptor.cs @@ -1,4 +1,5 @@ using System.Collections.Frozen; +using FluxFlow.Data; namespace FluxFlow.Composition; @@ -53,6 +54,8 @@ internal ComponentDescriptor( Resources = ToMetadataDictionary(resources, static resource => resource.Name, nameof(resources)) .ToFrozenDictionary(StringComparer.Ordinal); Outputs = ToPortDictionary(outputs).ToFrozenDictionary(StringComparer.Ordinal); + if (Outputs.Values.Any(static port => port.InputShape is not null)) + throw new ArgumentException("Input shapes can only be declared on input ports.", nameof(outputs)); RegistrationFactory = registrationFactory; RegistrationFactoryMode = factoryMode; RegistrationBindings = registrationBindings.ToArray(); @@ -107,6 +110,20 @@ internal ComponentDescriptor( public CompositionProcessingCapabilities ProcessingCapabilities { get; } + /// + /// Checks a sample value without activating the component. Null means the input has + /// no declared shape and was not checked. Success confirms only top-level structure; + /// the destination still owns materialization and domain validation at runtime. + /// + public FlowValueShapeValidationResult? ValidateInputShape(string inputName, FlowValue value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(inputName); + ArgumentNullException.ThrowIfNull(value); + if (!Inputs.TryGetValue(inputName.Trim(), out var input)) + throw new ArgumentException($"Component type '{Type}' has no input '{inputName}'.", nameof(inputName)); + return input.InputShape?.Validate(value); + } + private static Dictionary ToPortDictionary( IEnumerable? ports) { diff --git a/src/FluxFlow.Composition/Factories/ComponentFactory.cs b/src/Core/Application/FluxFlow.Composition/Factories/ComponentFactory.cs similarity index 100% rename from src/FluxFlow.Composition/Factories/ComponentFactory.cs rename to src/Core/Application/FluxFlow.Composition/Factories/ComponentFactory.cs diff --git a/src/FluxFlow.Composition/Factories/ComponentNodeActivation.cs b/src/Core/Application/FluxFlow.Composition/Factories/ComponentNodeActivation.cs similarity index 100% rename from src/FluxFlow.Composition/Factories/ComponentNodeActivation.cs rename to src/Core/Application/FluxFlow.Composition/Factories/ComponentNodeActivation.cs diff --git a/src/FluxFlow.Composition/Factories/ComponentOptionMetadata.cs b/src/Core/Application/FluxFlow.Composition/Factories/ComponentOptionMetadata.cs similarity index 100% rename from src/FluxFlow.Composition/Factories/ComponentOptionMetadata.cs rename to src/Core/Application/FluxFlow.Composition/Factories/ComponentOptionMetadata.cs diff --git a/src/FluxFlow.Composition/Factories/ComponentOptions.cs b/src/Core/Application/FluxFlow.Composition/Factories/ComponentOptions.cs similarity index 100% rename from src/FluxFlow.Composition/Factories/ComponentOptions.cs rename to src/Core/Application/FluxFlow.Composition/Factories/ComponentOptions.cs diff --git a/src/FluxFlow.Composition/Factories/ComponentPortKind.cs b/src/Core/Application/FluxFlow.Composition/Factories/ComponentPortKind.cs similarity index 100% rename from src/FluxFlow.Composition/Factories/ComponentPortKind.cs rename to src/Core/Application/FluxFlow.Composition/Factories/ComponentPortKind.cs diff --git a/src/FluxFlow.Composition/Factories/ComponentPortLinkCardinality.cs b/src/Core/Application/FluxFlow.Composition/Factories/ComponentPortLinkCardinality.cs similarity index 100% rename from src/FluxFlow.Composition/Factories/ComponentPortLinkCardinality.cs rename to src/Core/Application/FluxFlow.Composition/Factories/ComponentPortLinkCardinality.cs diff --git a/src/FluxFlow.Composition/Factories/ComponentPortMetadata.cs b/src/Core/Application/FluxFlow.Composition/Factories/ComponentPortMetadata.cs similarity index 87% rename from src/FluxFlow.Composition/Factories/ComponentPortMetadata.cs rename to src/Core/Application/FluxFlow.Composition/Factories/ComponentPortMetadata.cs index e8db311a..117e6f1f 100644 --- a/src/FluxFlow.Composition/Factories/ComponentPortMetadata.cs +++ b/src/Core/Application/FluxFlow.Composition/Factories/ComponentPortMetadata.cs @@ -1,3 +1,5 @@ +using FluxFlow.Data; + namespace FluxFlow.Composition; public sealed record ComponentPortMetadata @@ -65,6 +67,9 @@ private ComponentPortMetadata( public ComponentPortKind Kind { get; } + /// The destination's structural contract, or null when it is not described. + public FlowValueShape? InputShape { get; private init; } + public bool SupportsTypeVisit => Kind == ComponentPortKind.Signal || _visit is not null; public void Accept(IComponentPortTypeVisitor visitor) @@ -119,4 +124,13 @@ public static ComponentPortMetadata CreateSignal( string name, ComponentPortLinkCardinality linkCardinality = ComponentPortLinkCardinality.Multiple) => new(name, typeof(object), linkCardinality, ComponentPortKind.Signal); + + public static ComponentPortMetadata CreateFlowValueInput( + string name, + FlowValueShape inputShape, + ComponentPortLinkCardinality linkCardinality = ComponentPortLinkCardinality.Multiple) + { + ArgumentNullException.ThrowIfNull(inputShape); + return Create(name, linkCardinality) with { InputShape = inputShape }; + } } diff --git a/src/FluxFlow.Composition/Factories/ComponentResourceMetadata.cs b/src/Core/Application/FluxFlow.Composition/Factories/ComponentResourceMetadata.cs similarity index 100% rename from src/FluxFlow.Composition/Factories/ComponentResourceMetadata.cs rename to src/Core/Application/FluxFlow.Composition/Factories/ComponentResourceMetadata.cs diff --git a/src/FluxFlow.Composition/Factories/ComponentResources.cs b/src/Core/Application/FluxFlow.Composition/Factories/ComponentResources.cs similarity index 100% rename from src/FluxFlow.Composition/Factories/ComponentResources.cs rename to src/Core/Application/FluxFlow.Composition/Factories/ComponentResources.cs diff --git a/src/FluxFlow.Composition/Factories/IComponentPortTypeVisitor.cs b/src/Core/Application/FluxFlow.Composition/Factories/IComponentPortTypeVisitor.cs similarity index 100% rename from src/FluxFlow.Composition/Factories/IComponentPortTypeVisitor.cs rename to src/Core/Application/FluxFlow.Composition/Factories/IComponentPortTypeVisitor.cs diff --git a/src/FluxFlow.Composition/FluxFlow.Composition.csproj b/src/Core/Application/FluxFlow.Composition/FluxFlow.Composition.csproj similarity index 70% rename from src/FluxFlow.Composition/FluxFlow.Composition.csproj rename to src/Core/Application/FluxFlow.Composition/FluxFlow.Composition.csproj index 5016d640..fb87cd44 100644 --- a/src/FluxFlow.Composition/FluxFlow.Composition.csproj +++ b/src/Core/Application/FluxFlow.Composition/FluxFlow.Composition.csproj @@ -5,17 +5,17 @@ FluxFlow.Composition FluxFlow.Composition FluxFlow.Composition - 7.0.0-rc.1 + 8.0.0-rc.1 Canonical FluxFlow application definitions, addressing, link compilation, component registration contracts, and keyed resource registration without depending on FluxFlow.Engine. workflow;dataflow;composition;nodes README.md - Requires canonical definitions and exact identities; adds canonical link declaration projections and serialization; removes production friend access. + Breaking release: event bindings carry canonical FlowMessage envelopes; ApplicationRuntime.Activity replaces the legacy Events stream. Rebuild consumers and component registrations against this major version. true - - + + diff --git a/src/FluxFlow.Composition/Processing/CompositionProcessingCapabilities.cs b/src/Core/Application/FluxFlow.Composition/Processing/CompositionProcessingCapabilities.cs similarity index 100% rename from src/FluxFlow.Composition/Processing/CompositionProcessingCapabilities.cs rename to src/Core/Application/FluxFlow.Composition/Processing/CompositionProcessingCapabilities.cs diff --git a/src/FluxFlow.Composition/Processing/CompositionProcessingConfiguration.cs b/src/Core/Application/FluxFlow.Composition/Processing/CompositionProcessingConfiguration.cs similarity index 100% rename from src/FluxFlow.Composition/Processing/CompositionProcessingConfiguration.cs rename to src/Core/Application/FluxFlow.Composition/Processing/CompositionProcessingConfiguration.cs diff --git a/src/FluxFlow.Composition/Processing/CompositionProcessingProfile.cs b/src/Core/Application/FluxFlow.Composition/Processing/CompositionProcessingProfile.cs similarity index 100% rename from src/FluxFlow.Composition/Processing/CompositionProcessingProfile.cs rename to src/Core/Application/FluxFlow.Composition/Processing/CompositionProcessingProfile.cs diff --git a/src/FluxFlow.Composition/Processing/CompositionProcessingResourceTypes.cs b/src/Core/Application/FluxFlow.Composition/Processing/CompositionProcessingResourceTypes.cs similarity index 100% rename from src/FluxFlow.Composition/Processing/CompositionProcessingResourceTypes.cs rename to src/Core/Application/FluxFlow.Composition/Processing/CompositionProcessingResourceTypes.cs diff --git a/src/FluxFlow.Composition/Processing/CompositionProcessingSettings.cs b/src/Core/Application/FluxFlow.Composition/Processing/CompositionProcessingSettings.cs similarity index 100% rename from src/FluxFlow.Composition/Processing/CompositionProcessingSettings.cs rename to src/Core/Application/FluxFlow.Composition/Processing/CompositionProcessingSettings.cs diff --git a/src/FluxFlow.Composition/Processing/DefaultCompositionProcessingProfileMapper.cs b/src/Core/Application/FluxFlow.Composition/Processing/DefaultCompositionProcessingProfileMapper.cs similarity index 100% rename from src/FluxFlow.Composition/Processing/DefaultCompositionProcessingProfileMapper.cs rename to src/Core/Application/FluxFlow.Composition/Processing/DefaultCompositionProcessingProfileMapper.cs diff --git a/src/FluxFlow.Composition/Processing/ICompositionProcessingProfileMapper.cs b/src/Core/Application/FluxFlow.Composition/Processing/ICompositionProcessingProfileMapper.cs similarity index 100% rename from src/FluxFlow.Composition/Processing/ICompositionProcessingProfileMapper.cs rename to src/Core/Application/FluxFlow.Composition/Processing/ICompositionProcessingProfileMapper.cs diff --git a/src/FluxFlow.Composition/README.md b/src/Core/Application/FluxFlow.Composition/README.md similarity index 88% rename from src/FluxFlow.Composition/README.md rename to src/Core/Application/FluxFlow.Composition/README.md index bcff0b27..78c371bf 100644 --- a/src/FluxFlow.Composition/README.md +++ b/src/Core/Application/FluxFlow.Composition/README.md @@ -4,6 +4,17 @@ Canonical application definitions, explicit component registration, addressing, validation, link compilation, and code-first runtime ownership. The package is Engine-independent. +## Input Shape Preflight + +Canonical bindings can declare the destination's existing materializer contract: +`HasFlowValueInput("Input", node => node.Input, materializer.InputShape)`. +Instance factories use `HasFlowValueInput("Input", inputShape)`. +`ComponentPortMetadata.InputShape` retains this metadata without activating the +factory. `ComponentDescriptor.ValidateInputShape("Input", sample)` returns a +structural result, or null when no shape was declared. Runtime domain validation +remains inside the destination component. C# and JSON links remain dynamic when +the source guarantees no value shape. + ## Application Shape ```json @@ -127,9 +138,10 @@ node factories. Its typed builder makes each port declaration authoritative for both descriptor metadata and the activated Dataflow binding. Selectors run only after activation. `HasInput`, `HasSignalInput`, `HasOutput`, and `HasEvents` describe existing node members; they do not create duplicate Dataflow ports. -`HasEvents(name, selector)` explicitly bridges the selected -`FlowEvent` source to a public `ComponentEvent` output; event ports are never -injected, and `Events` is not reserved. Advanced complete-instance factories +`HasEvents(name, selector)` exposes the selected canonical +`ISourceBlock` as a `FlowValue` output. `FlowEvent` is an optional +code-first builder that serializes into that contract; no adapter node is added +to the workflow. Event ports are never injected, and `Events` is not reserved. Advanced complete-instance factories use `UseInstanceFactory`, while `ComponentNodeActivation` carries the small optional completion/additional-cleanup case without duplicating ports. diff --git a/src/FluxFlow.Composition/Registration/FluxFlowRegistrationBuilder.cs b/src/Core/Application/FluxFlow.Composition/Registration/FluxFlowRegistrationBuilder.cs similarity index 100% rename from src/FluxFlow.Composition/Registration/FluxFlowRegistrationBuilder.cs rename to src/Core/Application/FluxFlow.Composition/Registration/FluxFlowRegistrationBuilder.cs diff --git a/src/FluxFlow.Composition/Registration/FluxFlowRegistrationExtensions.cs b/src/Core/Application/FluxFlow.Composition/Registration/FluxFlowRegistrationExtensions.cs similarity index 98% rename from src/FluxFlow.Composition/Registration/FluxFlowRegistrationExtensions.cs rename to src/Core/Application/FluxFlow.Composition/Registration/FluxFlowRegistrationExtensions.cs index 9d204144..2ebfd725 100644 --- a/src/FluxFlow.Composition/Registration/FluxFlowRegistrationExtensions.cs +++ b/src/Core/Application/FluxFlow.Composition/Registration/FluxFlowRegistrationExtensions.cs @@ -124,6 +124,7 @@ private static bool PortsMatch(ComponentPortMetadata left, ComponentPortMetadata => string.Equals(left.Name, right.Name, StringComparison.Ordinal) && left.MessageType == right.MessageType && left.LinkCardinality == right.LinkCardinality && + Equals(left.InputShape, right.InputShape) && left.Kind == right.Kind; private static bool OptionsMatch(ComponentOptionMetadata left, ComponentOptionMetadata right) diff --git a/src/FluxFlow.Composition/Registration/RuntimeComponentBindingBuilder.cs b/src/Core/Application/FluxFlow.Composition/Registration/RuntimeComponentBindingBuilder.cs similarity index 62% rename from src/FluxFlow.Composition/Registration/RuntimeComponentBindingBuilder.cs rename to src/Core/Application/FluxFlow.Composition/Registration/RuntimeComponentBindingBuilder.cs index 5be9aa36..0ad97714 100644 --- a/src/FluxFlow.Composition/Registration/RuntimeComponentBindingBuilder.cs +++ b/src/Core/Application/FluxFlow.Composition/Registration/RuntimeComponentBindingBuilder.cs @@ -1,4 +1,5 @@ using System.Threading.Tasks.Dataflow; +using FluxFlow.Data; using FluxFlow.Nodes; namespace FluxFlow.Composition; @@ -11,6 +12,10 @@ public sealed class RuntimeComponentBindingBuilder internal RuntimeComponentBindingBuilder(RuntimeComponentRegistrationBuilder component) => _component = component ?? throw new ArgumentNullException(nameof(component)); + /// + /// Registers a strongly typed data input for advanced code-first composition. + /// Runtime-authored component catalogs should use . + /// public RuntimeComponentBindingBuilder HasInput( string name, Func>> selector, @@ -20,6 +25,33 @@ public RuntimeComponentBindingBuilder HasInput( return this; } + /// + /// Registers a node whose physical input already uses the canonical contract. + /// No adapter block is inserted into the runtime graph. + /// + public RuntimeComponentBindingBuilder HasFlowValueInput( + string name, + Func> selector, + ComponentPortLinkCardinality linkCardinality = ComponentPortLinkCardinality.Multiple) + { + ArgumentNullException.ThrowIfNull(selector); + _component.AddFlowValueInput(name, selector, linkCardinality); + return this; + } + + /// Describes the input without activating the node or invoking its materializer. + public RuntimeComponentBindingBuilder HasFlowValueInput( + string name, + Func> selector, + FlowValueShape inputShape, + ComponentPortLinkCardinality linkCardinality = ComponentPortLinkCardinality.Multiple) + { + ArgumentNullException.ThrowIfNull(selector); + ArgumentNullException.ThrowIfNull(inputShape); + _component.AddFlowValueInput(name, selector, linkCardinality, inputShape); + return this; + } + public RuntimeComponentBindingBuilder HasSignalInput( string name, Func selector, @@ -29,6 +61,10 @@ public RuntimeComponentBindingBuilder HasSignalInput( return this; } + /// + /// Registers a strongly typed data output for advanced code-first composition. + /// Runtime-authored component catalogs should use . + /// public RuntimeComponentBindingBuilder HasOutput( string name, Func>> selector, @@ -38,9 +74,23 @@ public RuntimeComponentBindingBuilder HasOutput( return this; } + /// + /// Registers a node whose physical output already uses the canonical contract. + /// No adapter block is inserted into the runtime graph. + /// + public RuntimeComponentBindingBuilder HasFlowValueOutput( + string name, + Func> selector, + ComponentPortLinkCardinality linkCardinality = ComponentPortLinkCardinality.Multiple) + { + ArgumentNullException.ThrowIfNull(selector); + _component.AddFlowValueOutput(name, selector, linkCardinality); + return this; + } + public RuntimeComponentBindingBuilder HasEvents( string name, - Func> selector, + Func> selector, ComponentPortLinkCardinality linkCardinality = ComponentPortLinkCardinality.Multiple) { _component.AddEvents(name, selector, linkCardinality); @@ -55,6 +105,15 @@ public sealed class RuntimeComponentInstanceBindingBuilder internal RuntimeComponentInstanceBindingBuilder(RuntimeComponentRegistrationBuilder component) => _component = component ?? throw new ArgumentNullException(nameof(component)); + public RuntimeComponentInstanceBindingBuilder HasFlowValueInput( + string name, + FlowValueShape inputShape, + ComponentPortLinkCardinality linkCardinality = ComponentPortLinkCardinality.Multiple) + { + _component.AddInstanceFlowValueInput(name, inputShape, linkCardinality); + return this; + } + public RuntimeComponentInstanceBindingBuilder HasInput( string name, ComponentPortLinkCardinality linkCardinality = ComponentPortLinkCardinality.Multiple) @@ -142,6 +201,24 @@ internal override void Bind( } } +internal sealed class FlowValueComponentInputBinding( + ComponentBindingIdentity identity, + Func> selector) + : ComponentBinding(identity) + where TNode : IFlowNode +{ + internal override void Bind( + IFlowNode node, + string componentType, + ICollection inputs, + ICollection outputs, + ICollection events) + { + var target = RequireBinding(selector((TNode)node), componentType, Identity.Metadata.Name); + inputs.Add(ComponentPorts.FlowValueInput(Identity.Metadata.Name, target)); + } +} + internal sealed class ComponentSignalInputBinding( ComponentBindingIdentity identity, Func selector) @@ -178,9 +255,27 @@ internal override void Bind( } } +internal sealed class FlowValueComponentOutputBinding( + ComponentBindingIdentity identity, + Func> selector) + : ComponentBinding(identity) + where TNode : IFlowNode +{ + internal override void Bind( + IFlowNode node, + string componentType, + ICollection inputs, + ICollection outputs, + ICollection events) + { + var source = RequireBinding(selector((TNode)node), componentType, Identity.Metadata.Name); + outputs.Add(ComponentPorts.FlowValueOutput(Identity.Metadata.Name, source)); + } +} + internal sealed class ComponentEventsBinding( ComponentBindingIdentity identity, - Func> selector) + Func> selector) : ComponentBinding(identity) where TNode : IFlowNode { diff --git a/src/FluxFlow.Composition/Registration/RuntimeComponentRegistrationBuilder.cs b/src/Core/Application/FluxFlow.Composition/Registration/RuntimeComponentRegistrationBuilder.cs similarity index 87% rename from src/FluxFlow.Composition/Registration/RuntimeComponentRegistrationBuilder.cs rename to src/Core/Application/FluxFlow.Composition/Registration/RuntimeComponentRegistrationBuilder.cs index 93545acf..fce0246f 100644 --- a/src/FluxFlow.Composition/Registration/RuntimeComponentRegistrationBuilder.cs +++ b/src/Core/Application/FluxFlow.Composition/Registration/RuntimeComponentRegistrationBuilder.cs @@ -174,6 +174,23 @@ internal void AddInput( _bindings.Add(new ComponentInputBinding(identity, selector)); } + internal void AddFlowValueInput( + string name, + Func> selector, + ComponentPortLinkCardinality linkCardinality, + global::FluxFlow.Data.FlowValueShape? inputShape = null) + where TNode : IFlowNode + { + ArgumentNullException.ThrowIfNull(selector); + var metadata = inputShape is null + ? ComponentPortMetadata.Create(name, linkCardinality) + : ComponentPortMetadata.CreateFlowValueInput(name, inputShape, linkCardinality); + AddInput(metadata); + var identity = new ComponentBindingIdentity(ComponentBindingRole.Input, metadata, selector); + _bindingIdentities.Add(identity); + _bindings.Add(new FlowValueComponentInputBinding(identity, selector)); + } + internal void AddSignalInput( string name, Func selector, @@ -202,14 +219,28 @@ internal void AddOutput( _bindings.Add(new ComponentOutputBinding(identity, selector)); } + internal void AddFlowValueOutput( + string name, + Func> selector, + ComponentPortLinkCardinality linkCardinality) + where TNode : IFlowNode + { + ArgumentNullException.ThrowIfNull(selector); + var metadata = ComponentPortMetadata.Create(name, linkCardinality); + AddOutput(metadata); + var identity = new ComponentBindingIdentity(ComponentBindingRole.Output, metadata, selector); + _bindingIdentities.Add(identity); + _bindings.Add(new FlowValueComponentOutputBinding(identity, selector)); + } + internal void AddEvents( string name, - Func> selector, + Func> selector, ComponentPortLinkCardinality linkCardinality) where TNode : IFlowNode { ArgumentNullException.ThrowIfNull(selector); - var metadata = ComponentPortMetadata.Create(name, linkCardinality); + var metadata = ComponentPortMetadata.Create(name, linkCardinality); AddOutput(metadata); var identity = new ComponentBindingIdentity(ComponentBindingRole.Events, metadata, selector); _bindingIdentities.Add(identity); @@ -219,6 +250,13 @@ internal void AddEvents( internal void AddInstanceInput(string name, ComponentPortLinkCardinality linkCardinality) => AddInstancePort(ComponentBindingRole.Input, ComponentPortMetadata.Create(name, linkCardinality), input: true); + internal void AddInstanceFlowValueInput( + string name, + global::FluxFlow.Data.FlowValueShape inputShape, + ComponentPortLinkCardinality linkCardinality) + => AddInstancePort(ComponentBindingRole.Input, + ComponentPortMetadata.CreateFlowValueInput(name, inputShape, linkCardinality), input: true); + internal void AddInstanceSignalInput(string name, ComponentPortLinkCardinality linkCardinality) => AddInstancePort(ComponentBindingRole.SignalInput, ComponentPortMetadata.CreateSignal(name, linkCardinality), input: true); @@ -226,7 +264,7 @@ internal void AddInstanceOutput(string name, ComponentPortLinkCardinal => AddInstancePort(ComponentBindingRole.Output, ComponentPortMetadata.Create(name, linkCardinality), input: false); internal void AddInstanceEvents(string name, ComponentPortLinkCardinality linkCardinality) - => AddInstancePort(ComponentBindingRole.Events, ComponentPortMetadata.Create(name, linkCardinality), input: false); + => AddInstancePort(ComponentBindingRole.Events, ComponentPortMetadata.Create(name, linkCardinality), input: false); private static async ValueTask ActivateAsync( string componentType, diff --git a/src/FluxFlow.Composition/Resources/ApplicationResourceRegistrationContext.cs b/src/Core/Application/FluxFlow.Composition/Resources/ApplicationResourceRegistrationContext.cs similarity index 100% rename from src/FluxFlow.Composition/Resources/ApplicationResourceRegistrationContext.cs rename to src/Core/Application/FluxFlow.Composition/Resources/ApplicationResourceRegistrationContext.cs diff --git a/src/FluxFlow.Composition/Resources/ApplicationResourceServiceCollectionExtensions.cs b/src/Core/Application/FluxFlow.Composition/Resources/ApplicationResourceServiceCollectionExtensions.cs similarity index 100% rename from src/FluxFlow.Composition/Resources/ApplicationResourceServiceCollectionExtensions.cs rename to src/Core/Application/FluxFlow.Composition/Resources/ApplicationResourceServiceCollectionExtensions.cs diff --git a/src/FluxFlow.Composition/Resources/IApplicationResourceRegistrar.cs b/src/Core/Application/FluxFlow.Composition/Resources/IApplicationResourceRegistrar.cs similarity index 100% rename from src/FluxFlow.Composition/Resources/IApplicationResourceRegistrar.cs rename to src/Core/Application/FluxFlow.Composition/Resources/IApplicationResourceRegistrar.cs diff --git a/src/FluxFlow.Composition/Runtime/ApplicationRuntime.cs b/src/Core/Application/FluxFlow.Composition/Runtime/ApplicationRuntime.cs similarity index 84% rename from src/FluxFlow.Composition/Runtime/ApplicationRuntime.cs rename to src/Core/Application/FluxFlow.Composition/Runtime/ApplicationRuntime.cs index 571032a4..2d770721 100644 --- a/src/FluxFlow.Composition/Runtime/ApplicationRuntime.cs +++ b/src/Core/Application/FluxFlow.Composition/Runtime/ApplicationRuntime.cs @@ -8,8 +8,9 @@ public sealed class ApplicationRuntime : IAsyncDisposable { private readonly List _links; private readonly List _diagnosticLinks = []; + private readonly List> _eventTargets = []; private readonly HashSet _nodesWithIncomingLinks; - private readonly BroadcastBlock _events = new(static value => value); + private readonly BroadcastBlock _activity = new(static value => value); private int _disposed; internal ApplicationRuntime( @@ -23,8 +24,16 @@ internal ApplicationRuntime( foreach (var node in Nodes) { if (node.Descriptor.Events is not null) - _diagnosticLinks.Add(node.Descriptor.Events.LinkTo(_events)); - + { + var target = new ActionBlock(message => + { + node.Descriptor.NotifyEvent(message); + _activity.Post(message); + }, new ExecutionDataflowBlockOptions { BoundedCapacity = 256 }); + _eventTargets.Add(target); + _diagnosticLinks.Add(node.Descriptor.Events.LinkTo(target, + new DataflowLinkOptions { PropagateCompletion = false })); + } } Completion = CompleteWhenNodesCompleteAsync(); @@ -72,7 +81,7 @@ public static ApplicationRuntime Create( public IReadOnlyList Nodes { get; } - public ISourceBlock Events => _events; + public ISourceBlock Activity => _activity; public Task Completion { get; } @@ -168,12 +177,15 @@ private async Task CompleteWhenNodesCompleteAsync() try { await Task.WhenAll(Nodes.Select(node => node.Descriptor.Completion)).ConfigureAwait(false); - _events.Complete(); - await _events.Completion.ConfigureAwait(false); + foreach (var target in _eventTargets) target.Complete(); + await Task.WhenAll(_eventTargets.Select(target => target.Completion)).ConfigureAwait(false); + _activity.Complete(); + await _activity.Completion.ConfigureAwait(false); } catch (Exception exception) { - ((IDataflowBlock)_events).Fault(exception); + foreach (var target in _eventTargets) target.Complete(); + ((IDataflowBlock)_activity).Fault(exception); throw; } } diff --git a/src/FluxFlow.Composition/Runtime/ApplicationRuntimeComponent.cs b/src/Core/Application/FluxFlow.Composition/Runtime/ApplicationRuntimeComponent.cs similarity index 100% rename from src/FluxFlow.Composition/Runtime/ApplicationRuntimeComponent.cs rename to src/Core/Application/FluxFlow.Composition/Runtime/ApplicationRuntimeComponent.cs diff --git a/src/FluxFlow.Composition/Runtime/ComponentEventBridge.cs b/src/Core/Application/FluxFlow.Composition/Runtime/ComponentActivityBridge.cs similarity index 59% rename from src/FluxFlow.Composition/Runtime/ComponentEventBridge.cs rename to src/Core/Application/FluxFlow.Composition/Runtime/ComponentActivityBridge.cs index 708b4998..dc3c23e5 100644 --- a/src/FluxFlow.Composition/Runtime/ComponentEventBridge.cs +++ b/src/Core/Application/FluxFlow.Composition/Runtime/ComponentActivityBridge.cs @@ -1,34 +1,39 @@ -using System.Globalization; -using System.Text.Json; using System.Threading.Tasks.Dataflow; using FluxFlow.Nodes; namespace FluxFlow.Composition; -internal sealed class ComponentEventBridge : IAsyncDisposable +internal sealed class ComponentActivityBridge : IAsyncDisposable { private const int Capacity = 256; private readonly string _componentAddress; - private readonly FlowOutput> _output = new( + private readonly string _workflowName; + private readonly string _componentName; + private readonly Action? _observe; + private readonly FlowOutput _output = new( new FlowOutputOptions { Capacity = Capacity }); - private readonly ActionBlock _forwarder; + private readonly ActionBlock _forwarder; private readonly IDisposable? _sourceLink; private readonly Task _completion; private int _disposed; - public ComponentEventBridge( + public ComponentActivityBridge( string workflowName, string componentName, - ISourceBlock? source, - Task componentCompletion) + ISourceBlock? source, + Task componentCompletion, + Action? observe = null) { ArgumentException.ThrowIfNullOrWhiteSpace(workflowName); ArgumentException.ThrowIfNullOrWhiteSpace(componentName); ArgumentNullException.ThrowIfNull(componentCompletion); _componentAddress = $"{workflowName}.{componentName}"; - _forwarder = new ActionBlock( + _workflowName = workflowName; + _componentName = componentName; + _observe = observe; + _forwarder = new ActionBlock( ForwardAsync, new ExecutionDataflowBlockOptions { @@ -42,7 +47,7 @@ public ComponentEventBridge( _completion = CompleteAsync(componentCompletion); } - public ISourceBlock> Output => _output; + public ISourceBlock Output => _output; public async ValueTask DisposeAsync() { @@ -61,25 +66,34 @@ public async ValueTask DisposeAsync() } } - private async Task ForwardAsync(FlowEvent source) + private async Task ForwardAsync(FlowMessage source) { - var timestamp = source.Timestamp == default - ? DateTimeOffset.UtcNow - : source.Timestamp; - var payload = new ComponentEvent - { - ComponentAddress = _componentAddress, - Timestamp = timestamp, - Name = source.Name, - Level = source.Level, - Message = source.Message, - Attributes = source.Attributes.ToDictionary( - static attribute => attribute.Key, - static attribute => ToInvariantText(attribute.Value), - StringComparer.Ordinal) - }; - var message = FlowMessage.Create(payload, source.CorrelationId); + var headers = source.Headers.ToDictionary( + static item => item.Key, + static item => item.Value, + StringComparer.Ordinal); + headers[FlowEventHeaders.Source] = _componentAddress; + headers[FlowEventHeaders.Workflow] = _workflowName; + headers[FlowEventHeaders.Component] = _componentName; + var message = source.IsError + ? FlowMessage.RestoreError( + source.Error!, + source.MessageId, + source.TraceId, + source.Timestamp, + source.CorrelationId, + source.CausationId, + headers) + : FlowMessage.Restore( + source.Value!, + source.MessageId, + source.TraceId, + source.Timestamp, + source.CorrelationId, + source.CausationId, + headers); + _observe?.Invoke(message); if (await _output.SendAsync(message).ConfigureAwait(false)) return; @@ -117,27 +131,6 @@ private async Task CompleteAsync(Task componentCompletion) } } - private static string ToInvariantText(object? value) - { - try - { - return value switch - { - null => string.Empty, - string text => text, - byte[] bytes => Convert.ToBase64String(bytes), - ReadOnlyMemory bytes => Convert.ToBase64String(bytes.Span), - IFormattable formattable => formattable.ToString(null, CultureInfo.InvariantCulture) - ?? string.Empty, - _ => JsonSerializer.Serialize(value) - }; - } - catch - { - return value?.ToString() ?? string.Empty; - } - } - private static Exception Unwrap(Exception exception) => exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 ? aggregate.InnerException! diff --git a/src/FluxFlow.Composition/Runtime/ComponentEventSource.cs b/src/Core/Application/FluxFlow.Composition/Runtime/ComponentEventSource.cs similarity index 72% rename from src/FluxFlow.Composition/Runtime/ComponentEventSource.cs rename to src/Core/Application/FluxFlow.Composition/Runtime/ComponentEventSource.cs index 986ccaa1..5ce3f4e7 100644 --- a/src/FluxFlow.Composition/Runtime/ComponentEventSource.cs +++ b/src/Core/Application/FluxFlow.Composition/Runtime/ComponentEventSource.cs @@ -5,7 +5,7 @@ namespace FluxFlow.Composition; public sealed class ComponentEventSource { - public ComponentEventSource(string name, ISourceBlock source) + public ComponentEventSource(string name, ISourceBlock source) { ArgumentException.ThrowIfNullOrWhiteSpace(name); Name = name.Trim(); @@ -14,5 +14,5 @@ public ComponentEventSource(string name, ISourceBlock source) public string Name { get; } - public ISourceBlock Source { get; } + public ISourceBlock Source { get; } } diff --git a/src/FluxFlow.Composition/Runtime/ComponentInputPort.cs b/src/Core/Application/FluxFlow.Composition/Runtime/ComponentInputPort.cs similarity index 77% rename from src/FluxFlow.Composition/Runtime/ComponentInputPort.cs rename to src/Core/Application/FluxFlow.Composition/Runtime/ComponentInputPort.cs index a18527f1..de05c12e 100644 --- a/src/FluxFlow.Composition/Runtime/ComponentInputPort.cs +++ b/src/Core/Application/FluxFlow.Composition/Runtime/ComponentInputPort.cs @@ -45,6 +45,22 @@ internal override void Fault(Exception exception) => ((IDataflowBlock)Target).Fault(exception); } +public sealed class FlowValueComponentInputPort : ComponentInputPort +{ + public FlowValueComponentInputPort(string name, ITargetBlock target) + : base(name, typeof(global::FluxFlow.Data.FlowValue)) + { + Target = target ?? throw new ArgumentNullException(nameof(target)); + } + + public ITargetBlock Target { get; } + + internal override void Complete() => Target.Complete(); + + internal override void Fault(Exception exception) + => ((IDataflowBlock)Target).Fault(exception); +} + public sealed class ComponentSignalInputPort : ComponentInputPort { public ComponentSignalInputPort(string name, IFlowSignalTarget target) diff --git a/src/FluxFlow.Composition/Runtime/ComponentInstance.cs b/src/Core/Application/FluxFlow.Composition/Runtime/ComponentInstance.cs similarity index 70% rename from src/FluxFlow.Composition/Runtime/ComponentInstance.cs rename to src/Core/Application/FluxFlow.Composition/Runtime/ComponentInstance.cs index e5c1d002..0fa92e5d 100644 --- a/src/FluxFlow.Composition/Runtime/ComponentInstance.cs +++ b/src/Core/Application/FluxFlow.Composition/Runtime/ComponentInstance.cs @@ -9,14 +9,18 @@ public sealed class ComponentInstance private readonly Func? _disposeAsync; private readonly IReadOnlyList _addressableEvents; private readonly Dictionary _outputs; - private readonly List _eventBridges = []; + private readonly List _activityBridges = []; private bool _eventsAttached; + private readonly BroadcastBlock _activity = new(static message => message, + new DataflowBlockOptions { BoundedCapacity = 256 }); + private string? _workflowName; + private string? _componentName; public ComponentInstance( IFlowNode node, IEnumerable? inputs = null, IEnumerable? outputs = null, - ISourceBlock? events = null, + ISourceBlock? events = null, Task? completion = null, Func? disposeAsync = null, IEnumerable? addressableEvents = null) @@ -37,10 +41,30 @@ public ComponentInstance( public IReadOnlyDictionary Outputs { get; } - public ISourceBlock? Events { get; } + public ISourceBlock? Events { get; } public Task Completion { get; } + /// Native, best-effort observations from named and legacy component event sources. + public ISourceBlock Activity => _activity; + + internal void NotifyEvent(FlowMessage message) + { + if (_workflowName is not null && !message.Headers.ContainsKey(FlowEventHeaders.Source)) + { + var headers = message.Headers.ToDictionary(pair => pair.Key, pair => pair.Value, StringComparer.Ordinal); + headers[FlowEventHeaders.Workflow] = _workflowName; + headers[FlowEventHeaders.Component] = _componentName!; + headers[FlowEventHeaders.Source] = $"{_workflowName}.{_componentName}"; + message = message.IsError + ? FlowMessage.RestoreError(message.Error!, message.MessageId, message.TraceId, message.Timestamp, + message.CorrelationId, message.CausationId, headers) + : FlowMessage.Restore(message.Value!, message.MessageId, message.TraceId, message.Timestamp, + message.CorrelationId, message.CausationId, headers); + } + _activity.Post(message); + } + public async ValueTask DisposeAsync() { var failures = new List(); @@ -65,11 +89,11 @@ public async ValueTask DisposeAsync() } } - foreach (var eventBridge in _eventBridges) + foreach (var activityBridge in _activityBridges) { try { - await eventBridge.DisposeAsync().ConfigureAwait(false); + await activityBridge.DisposeAsync().ConfigureAwait(false); } catch (Exception exception) { @@ -77,6 +101,9 @@ public async ValueTask DisposeAsync() } } + _activity.Complete(); + await _activity.Completion.ConfigureAwait(false); + if (failures.Count == 0) return; if (failures.Count == 1) @@ -90,6 +117,8 @@ internal void AttachAddressableEvents(string workflowName, string componentName) if (_eventsAttached) throw new InvalidOperationException("Addressable component events are already attached."); _eventsAttached = true; + _workflowName = workflowName; + _componentName = componentName; foreach (var eventSource in _addressableEvents) { @@ -99,13 +128,14 @@ internal void AttachAddressableEvents(string workflowName, string componentName) $"Output port '{eventSource.Name}' is already bound and cannot also be used for component events."); } - var eventBridge = new ComponentEventBridge( + var activityBridge = new ComponentActivityBridge( workflowName, componentName, eventSource.Source, - Completion); - _eventBridges.Add(eventBridge); - _outputs.Add(eventSource.Name, ComponentPorts.Output(eventSource.Name, eventBridge.Output)); + Completion, + NotifyEvent); + _activityBridges.Add(activityBridge); + _outputs.Add(eventSource.Name, ComponentPorts.FlowValueOutput(eventSource.Name, activityBridge.Output)); } } @@ -113,7 +143,7 @@ public static ComponentInstance Create( IFlowNode node, IEnumerable? inputs = null, IEnumerable? outputs = null, - ISourceBlock? events = null, + ISourceBlock? events = null, Task? completion = null, Func? disposeAsync = null, IEnumerable? addressableEvents = null) diff --git a/src/FluxFlow.Composition/Runtime/ComponentOutputPort.cs b/src/Core/Application/FluxFlow.Composition/Runtime/ComponentOutputPort.cs similarity index 56% rename from src/FluxFlow.Composition/Runtime/ComponentOutputPort.cs rename to src/Core/Application/FluxFlow.Composition/Runtime/ComponentOutputPort.cs index 5ec84f42..122505b1 100644 --- a/src/FluxFlow.Composition/Runtime/ComponentOutputPort.cs +++ b/src/Core/Application/FluxFlow.Composition/Runtime/ComponentOutputPort.cs @@ -54,6 +54,79 @@ internal override bool TryLinkTo(ComponentInputPort input, out IDisposable? link } } +public sealed class FlowValueComponentOutputPort : ComponentOutputPort +{ + public FlowValueComponentOutputPort(string name, ISourceBlock source) + : base(name, typeof(global::FluxFlow.Data.FlowValue)) + { + Source = source ?? throw new ArgumentNullException(nameof(source)); + } + + public ISourceBlock Source { get; } + + internal override Task Completion => Source.Completion; + + internal override bool TryLinkTo(ComponentInputPort input, out IDisposable? link) + { + if (input is ComponentSignalInputPort signalInput) + { + link = new FlowValueCompositionSignalLink(Source, signalInput.Target); + return true; + } + + if (input is not FlowValueComponentInputPort flowValueInput) + { + link = null; + return false; + } + + link = Source.LinkTo( + flowValueInput.Target, + new DataflowLinkOptions { PropagateCompletion = false }); + return true; + } +} + +internal sealed class FlowValueCompositionSignalLink : IDisposable +{ + private readonly ActionBlock _forwarder; + private readonly IDisposable _sourceLink; + private int _disposed; + + public FlowValueCompositionSignalLink( + ISourceBlock source, + IFlowSignalTarget target) + { + _forwarder = new ActionBlock( + async message => await target.SendAsync(message).ConfigureAwait(false), + new ExecutionDataflowBlockOptions + { + BoundedCapacity = 1, + EnsureOrdered = true, + MaxDegreeOfParallelism = 1 + }); + _sourceLink = source.LinkTo( + _forwarder, + new DataflowLinkOptions { PropagateCompletion = true }); + + _ = target.Completion.ContinueWith( + static (_, state) => ((ActionBlock)state!).Complete(), + _forwarder, + CancellationToken.None, + TaskContinuationOptions.ExecuteSynchronously, + TaskScheduler.Default); + } + + public void Dispose() + { + if (Interlocked.Exchange(ref _disposed, 1) != 0) + return; + + _sourceLink.Dispose(); + _forwarder.Complete(); + } +} + internal sealed class CompositionSignalLink : IDisposable { private readonly ActionBlock> _forwarder; diff --git a/src/FluxFlow.Composition/Runtime/ComponentPorts.cs b/src/Core/Application/FluxFlow.Composition/Runtime/ComponentPorts.cs similarity index 78% rename from src/FluxFlow.Composition/Runtime/ComponentPorts.cs rename to src/Core/Application/FluxFlow.Composition/Runtime/ComponentPorts.cs index d8e311a1..38c0120c 100644 --- a/src/FluxFlow.Composition/Runtime/ComponentPorts.cs +++ b/src/Core/Application/FluxFlow.Composition/Runtime/ComponentPorts.cs @@ -5,6 +5,11 @@ namespace FluxFlow.Composition; public static class ComponentPorts { + public static FlowValueComponentInputPort FlowValueInput( + string name, + ITargetBlock target) + => new(name, target); + public static ComponentInputPort Input( string name, ITargetBlock> target) @@ -20,9 +25,14 @@ public static ComponentOutputPort Output( ISourceBlock> source) => new(name, source); + public static FlowValueComponentOutputPort FlowValueOutput( + string name, + ISourceBlock source) + => new(name, source); + public static ComponentEventSource Events( string name, - ISourceBlock source) + ISourceBlock source) => new(name, source); public static ComponentPortMetadata Metadata(string name) diff --git a/src/FluxFlow.Composition/Runtime/RuntimeNodeKey.cs b/src/Core/Application/FluxFlow.Composition/Runtime/RuntimeNodeKey.cs similarity index 100% rename from src/FluxFlow.Composition/Runtime/RuntimeNodeKey.cs rename to src/Core/Application/FluxFlow.Composition/Runtime/RuntimeNodeKey.cs diff --git a/src/FluxFlow.Coordination/FluxFlow.Coordination.csproj b/src/Core/Execution/FluxFlow.Coordination/FluxFlow.Coordination.csproj similarity index 69% rename from src/FluxFlow.Coordination/FluxFlow.Coordination.csproj rename to src/Core/Execution/FluxFlow.Coordination/FluxFlow.Coordination.csproj index fc46f0a9..da6d7616 100644 --- a/src/FluxFlow.Coordination/FluxFlow.Coordination.csproj +++ b/src/Core/Execution/FluxFlow.Coordination/FluxFlow.Coordination.csproj @@ -5,16 +5,16 @@ FluxFlow.Coordination FluxFlow.Coordination FluxFlow.Coordination - 2.0.0 + 3.0.0-rc.1 Transport-neutral pending exchange coordination for FluxFlow workflow and adapter packages. workflow;dataflow;coordination;request-reply;acknowledgement;timeout README.md - Updates the Nodes dependency for the typed FlowMessage<T> contract while preserving coordination behavior. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. true - + diff --git a/src/FluxFlow.Coordination/PendingExchangeCompletion.cs b/src/Core/Execution/FluxFlow.Coordination/PendingExchangeCompletion.cs similarity index 100% rename from src/FluxFlow.Coordination/PendingExchangeCompletion.cs rename to src/Core/Execution/FluxFlow.Coordination/PendingExchangeCompletion.cs diff --git a/src/FluxFlow.Coordination/PendingExchangeCoordinator.cs b/src/Core/Execution/FluxFlow.Coordination/PendingExchangeCoordinator.cs similarity index 100% rename from src/FluxFlow.Coordination/PendingExchangeCoordinator.cs rename to src/Core/Execution/FluxFlow.Coordination/PendingExchangeCoordinator.cs diff --git a/src/FluxFlow.Coordination/PendingExchangeCoordinatorOptions.cs b/src/Core/Execution/FluxFlow.Coordination/PendingExchangeCoordinatorOptions.cs similarity index 100% rename from src/FluxFlow.Coordination/PendingExchangeCoordinatorOptions.cs rename to src/Core/Execution/FluxFlow.Coordination/PendingExchangeCoordinatorOptions.cs diff --git a/src/FluxFlow.Coordination/PendingExchangeFeedback.cs b/src/Core/Execution/FluxFlow.Coordination/PendingExchangeFeedback.cs similarity index 100% rename from src/FluxFlow.Coordination/PendingExchangeFeedback.cs rename to src/Core/Execution/FluxFlow.Coordination/PendingExchangeFeedback.cs diff --git a/src/FluxFlow.Coordination/PendingExchangeStart.cs b/src/Core/Execution/FluxFlow.Coordination/PendingExchangeStart.cs similarity index 100% rename from src/FluxFlow.Coordination/PendingExchangeStart.cs rename to src/Core/Execution/FluxFlow.Coordination/PendingExchangeStart.cs diff --git a/src/FluxFlow.Coordination/PendingExchangeStatus.cs b/src/Core/Execution/FluxFlow.Coordination/PendingExchangeStatus.cs similarity index 100% rename from src/FluxFlow.Coordination/PendingExchangeStatus.cs rename to src/Core/Execution/FluxFlow.Coordination/PendingExchangeStatus.cs diff --git a/src/FluxFlow.Coordination/README.md b/src/Core/Execution/FluxFlow.Coordination/README.md similarity index 100% rename from src/FluxFlow.Coordination/README.md rename to src/Core/Execution/FluxFlow.Coordination/README.md diff --git a/src/FluxFlow.Resilience/FluxFlow.Resilience.csproj b/src/Core/Execution/FluxFlow.Resilience/FluxFlow.Resilience.csproj similarity index 100% rename from src/FluxFlow.Resilience/FluxFlow.Resilience.csproj rename to src/Core/Execution/FluxFlow.Resilience/FluxFlow.Resilience.csproj diff --git a/src/FluxFlow.Resilience/IRetryJitterSource.cs b/src/Core/Execution/FluxFlow.Resilience/IRetryJitterSource.cs similarity index 100% rename from src/FluxFlow.Resilience/IRetryJitterSource.cs rename to src/Core/Execution/FluxFlow.Resilience/IRetryJitterSource.cs diff --git a/src/FluxFlow.Resilience/README.md b/src/Core/Execution/FluxFlow.Resilience/README.md similarity index 100% rename from src/FluxFlow.Resilience/README.md rename to src/Core/Execution/FluxFlow.Resilience/README.md diff --git a/src/FluxFlow.Resilience/RetryExecutor.cs b/src/Core/Execution/FluxFlow.Resilience/RetryExecutor.cs similarity index 100% rename from src/FluxFlow.Resilience/RetryExecutor.cs rename to src/Core/Execution/FluxFlow.Resilience/RetryExecutor.cs diff --git a/src/FluxFlow.Resilience/RetryPlanner.cs b/src/Core/Execution/FluxFlow.Resilience/RetryPlanner.cs similarity index 100% rename from src/FluxFlow.Resilience/RetryPlanner.cs rename to src/Core/Execution/FluxFlow.Resilience/RetryPlanner.cs diff --git a/src/FluxFlow.Resilience/RetryPolicy.cs b/src/Core/Execution/FluxFlow.Resilience/RetryPolicy.cs similarity index 100% rename from src/FluxFlow.Resilience/RetryPolicy.cs rename to src/Core/Execution/FluxFlow.Resilience/RetryPolicy.cs diff --git a/src/FluxFlow.Resilience/RetrySchedule.cs b/src/Core/Execution/FluxFlow.Resilience/RetrySchedule.cs similarity index 100% rename from src/FluxFlow.Resilience/RetrySchedule.cs rename to src/Core/Execution/FluxFlow.Resilience/RetrySchedule.cs diff --git a/src/FluxFlow.Resilience/RetryStateMachine.cs b/src/Core/Execution/FluxFlow.Resilience/RetryStateMachine.cs similarity index 100% rename from src/FluxFlow.Resilience/RetryStateMachine.cs rename to src/Core/Execution/FluxFlow.Resilience/RetryStateMachine.cs diff --git a/src/FluxFlow.Mapping/DelegateFlowMapper.cs b/src/Core/Foundation/FluxFlow.Mapping/DelegateFlowMapper.cs similarity index 100% rename from src/FluxFlow.Mapping/DelegateFlowMapper.cs rename to src/Core/Foundation/FluxFlow.Mapping/DelegateFlowMapper.cs diff --git a/src/FluxFlow.Mapping/DelegateFlowPredicate.cs b/src/Core/Foundation/FluxFlow.Mapping/DelegateFlowPredicate.cs similarity index 100% rename from src/FluxFlow.Mapping/DelegateFlowPredicate.cs rename to src/Core/Foundation/FluxFlow.Mapping/DelegateFlowPredicate.cs diff --git a/src/FluxFlow.Mapping/EvaluatingCompiledExpression.cs b/src/Core/Foundation/FluxFlow.Mapping/EvaluatingCompiledExpression.cs similarity index 100% rename from src/FluxFlow.Mapping/EvaluatingCompiledExpression.cs rename to src/Core/Foundation/FluxFlow.Mapping/EvaluatingCompiledExpression.cs diff --git a/src/FluxFlow.Mapping/ExpressionFlowMapper.cs b/src/Core/Foundation/FluxFlow.Mapping/ExpressionFlowMapper.cs similarity index 100% rename from src/FluxFlow.Mapping/ExpressionFlowMapper.cs rename to src/Core/Foundation/FluxFlow.Mapping/ExpressionFlowMapper.cs diff --git a/src/FluxFlow.Mapping/ExpressionFlowPredicate.cs b/src/Core/Foundation/FluxFlow.Mapping/ExpressionFlowPredicate.cs similarity index 100% rename from src/FluxFlow.Mapping/ExpressionFlowPredicate.cs rename to src/Core/Foundation/FluxFlow.Mapping/ExpressionFlowPredicate.cs diff --git a/src/FluxFlow.Mapping/FlowMapContext.cs b/src/Core/Foundation/FluxFlow.Mapping/FlowMapContext.cs similarity index 100% rename from src/FluxFlow.Mapping/FlowMapContext.cs rename to src/Core/Foundation/FluxFlow.Mapping/FlowMapContext.cs diff --git a/src/FluxFlow.Mapping/FluxFlow.Mapping.csproj b/src/Core/Foundation/FluxFlow.Mapping/FluxFlow.Mapping.csproj similarity index 100% rename from src/FluxFlow.Mapping/FluxFlow.Mapping.csproj rename to src/Core/Foundation/FluxFlow.Mapping/FluxFlow.Mapping.csproj diff --git a/src/FluxFlow.Mapping/IFlowCompiledExpression.cs b/src/Core/Foundation/FluxFlow.Mapping/IFlowCompiledExpression.cs similarity index 100% rename from src/FluxFlow.Mapping/IFlowCompiledExpression.cs rename to src/Core/Foundation/FluxFlow.Mapping/IFlowCompiledExpression.cs diff --git a/src/FluxFlow.Mapping/IFlowExpressionEngine.cs b/src/Core/Foundation/FluxFlow.Mapping/IFlowExpressionEngine.cs similarity index 100% rename from src/FluxFlow.Mapping/IFlowExpressionEngine.cs rename to src/Core/Foundation/FluxFlow.Mapping/IFlowExpressionEngine.cs diff --git a/src/FluxFlow.Mapping/IFlowMapContextFactory.cs b/src/Core/Foundation/FluxFlow.Mapping/IFlowMapContextFactory.cs similarity index 100% rename from src/FluxFlow.Mapping/IFlowMapContextFactory.cs rename to src/Core/Foundation/FluxFlow.Mapping/IFlowMapContextFactory.cs diff --git a/src/FluxFlow.Mapping/IFlowMapper.cs b/src/Core/Foundation/FluxFlow.Mapping/IFlowMapper.cs similarity index 100% rename from src/FluxFlow.Mapping/IFlowMapper.cs rename to src/Core/Foundation/FluxFlow.Mapping/IFlowMapper.cs diff --git a/src/FluxFlow.Mapping/IFlowPredicate.cs b/src/Core/Foundation/FluxFlow.Mapping/IFlowPredicate.cs similarity index 100% rename from src/FluxFlow.Mapping/IFlowPredicate.cs rename to src/Core/Foundation/FluxFlow.Mapping/IFlowPredicate.cs diff --git a/src/FluxFlow.Mapping/README.md b/src/Core/Foundation/FluxFlow.Mapping/README.md similarity index 100% rename from src/FluxFlow.Mapping/README.md rename to src/Core/Foundation/FluxFlow.Mapping/README.md diff --git a/src/Core/Foundation/FluxFlow.Nodes/CompatibilitySuppressions.xml b/src/Core/Foundation/FluxFlow.Nodes/CompatibilitySuppressions.xml new file mode 100644 index 00000000..56cb6025 --- /dev/null +++ b/src/Core/Foundation/FluxFlow.Nodes/CompatibilitySuppressions.xml @@ -0,0 +1,34 @@ + + + + + CP0002 + M:FluxFlow.Nodes.FlowNode`2.get_Events + lib/net10.0/FluxFlow.Nodes.dll + lib/net10.0/FluxFlow.Nodes.dll + true + + + CP0002 + M:FluxFlow.Nodes.FlowSource`1.get_Events + lib/net10.0/FluxFlow.Nodes.dll + lib/net10.0/FluxFlow.Nodes.dll + true + + + CP0002 + M:FluxFlow.Nodes.FlowNode`2.get_Events + lib/net8.0/FluxFlow.Nodes.dll + lib/net8.0/FluxFlow.Nodes.dll + true + + + CP0002 + M:FluxFlow.Nodes.FlowSource`1.get_Events + lib/net8.0/FluxFlow.Nodes.dll + lib/net8.0/FluxFlow.Nodes.dll + true + + diff --git a/src/FluxFlow.Nodes/CorrelationId.cs b/src/Core/Foundation/FluxFlow.Nodes/CorrelationId.cs similarity index 100% rename from src/FluxFlow.Nodes/CorrelationId.cs rename to src/Core/Foundation/FluxFlow.Nodes/CorrelationId.cs diff --git a/src/FluxFlow.Nodes/Data/FlowContent.cs b/src/Core/Foundation/FluxFlow.Nodes/Data/FlowContent.cs similarity index 73% rename from src/FluxFlow.Nodes/Data/FlowContent.cs rename to src/Core/Foundation/FluxFlow.Nodes/Data/FlowContent.cs index 63e3ed16..d3c588c6 100644 --- a/src/FluxFlow.Nodes/Data/FlowContent.cs +++ b/src/Core/Foundation/FluxFlow.Nodes/Data/FlowContent.cs @@ -3,7 +3,12 @@ namespace FluxFlow.Data; -/// Exact immutable bytes with optional transport content metadata. +/// +/// Exact immutable bytes with optional transport content metadata. +/// This type represents opaque text or binary content; it is not the universal value +/// exchanged by runtime-authored workflows. Such workflows carry , +/// which may structurally contain or materialize into content when a component needs it. +/// [JsonConverter(typeof(FlowContentJsonConverter))] public sealed record FlowContent { diff --git a/src/FluxFlow.Nodes/Data/FlowContentJsonConverter.cs b/src/Core/Foundation/FluxFlow.Nodes/Data/FlowContentJsonConverter.cs similarity index 100% rename from src/FluxFlow.Nodes/Data/FlowContentJsonConverter.cs rename to src/Core/Foundation/FluxFlow.Nodes/Data/FlowContentJsonConverter.cs diff --git a/src/FluxFlow.Nodes/Data/FlowError.cs b/src/Core/Foundation/FluxFlow.Nodes/Data/FlowError.cs similarity index 100% rename from src/FluxFlow.Nodes/Data/FlowError.cs rename to src/Core/Foundation/FluxFlow.Nodes/Data/FlowError.cs diff --git a/src/Core/Foundation/FluxFlow.Nodes/Data/FlowValue.cs b/src/Core/Foundation/FluxFlow.Nodes/Data/FlowValue.cs new file mode 100644 index 00000000..be70c865 --- /dev/null +++ b/src/Core/Foundation/FluxFlow.Nodes/Data/FlowValue.cs @@ -0,0 +1,106 @@ +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; + +namespace FluxFlow.Data; + +/// +/// Canonical structured value exchanged by runtime-authored workflows. +/// Domain components materialize this value into their own internal request types. +/// This is the universal runtime payload, not the message envelope and not an +/// exact-content abstraction; use when byte identity matters. +/// +[JsonConverter(typeof(FlowValueJsonConverter))] +public sealed class FlowValue +{ + private static readonly JsonSerializerOptions DefaultSerializerOptions = + CreateDefaultSerializerOptions(); + private readonly JsonElement _value; + + private FlowValue(JsonElement value) + { + if (value.ValueKind == JsonValueKind.Undefined) + throw new ArgumentException("A flow value cannot be undefined.", nameof(value)); + + _value = value.Clone(); + } + + public JsonValueKind Kind => _value.ValueKind; + + /// An explicit JSON null value. + public static FlowValue Null { get; } = + FromJson(JsonSerializer.SerializeToElement(null)); + + public static FlowValue FromJson(JsonElement value) => new(value); + + public static FlowValue From(T value, JsonSerializerOptions? options = null) + { + if (value is FlowValue flowValue) + return flowValue; + if (value is JsonElement element) + return FromJson(element); + if (value is JsonDocument document) + return FromJson(document.RootElement); + + var serializerOptions = options ?? DefaultSerializerOptions; + return value is null + ? Null + : new FlowValue(JsonSerializer.SerializeToElement( + value, + value.GetType(), + serializerOptions)); + } + + public JsonElement ToJsonElement() => _value.Clone(); + + public T? Deserialize(JsonSerializerOptions? options = null) + => _value.Deserialize(options ?? DefaultSerializerOptions); + + internal void WriteTo(Utf8JsonWriter writer) => _value.WriteTo(writer); + + public override string ToString() => _value.GetRawText(); + + private static JsonSerializerOptions CreateDefaultSerializerOptions() + { + var options = new JsonSerializerOptions(JsonSerializerDefaults.Web); + var resolver = new DefaultJsonTypeInfoResolver(); + resolver.Modifiers.Add(static typeInfo => + { + foreach (var property in typeInfo.Properties) + { + if (property.PropertyType == typeof(JsonElement)) + { + property.ShouldSerialize = static (_, value) => + value is JsonElement element && + element.ValueKind != JsonValueKind.Undefined; + } + } + }); + options.TypeInfoResolver = resolver; + options.Converters.Add(new UndefinedJsonElementConverter()); + return options; + } + + private sealed class UndefinedJsonElementConverter : JsonConverter + { + public override JsonElement Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return document.RootElement.Clone(); + } + + public override void Write( + Utf8JsonWriter writer, + JsonElement value, + JsonSerializerOptions options) + { + if (value.ValueKind == JsonValueKind.Undefined) + writer.WriteNullValue(); + else + value.WriteTo(writer); + } + } +} diff --git a/src/Core/Foundation/FluxFlow.Nodes/Data/FlowValueJsonConverter.cs b/src/Core/Foundation/FluxFlow.Nodes/Data/FlowValueJsonConverter.cs new file mode 100644 index 00000000..dc5bc32b --- /dev/null +++ b/src/Core/Foundation/FluxFlow.Nodes/Data/FlowValueJsonConverter.cs @@ -0,0 +1,22 @@ +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace FluxFlow.Data; + +internal sealed class FlowValueJsonConverter : JsonConverter +{ + public override FlowValue Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return FlowValue.FromJson(document.RootElement); + } + + public override void Write( + Utf8JsonWriter writer, + FlowValue value, + JsonSerializerOptions options) + => value.WriteTo(writer); +} diff --git a/src/Core/Foundation/FluxFlow.Nodes/Data/FlowValueMaterializers.cs b/src/Core/Foundation/FluxFlow.Nodes/Data/FlowValueMaterializers.cs new file mode 100644 index 00000000..61b1b085 --- /dev/null +++ b/src/Core/Foundation/FluxFlow.Nodes/Data/FlowValueMaterializers.cs @@ -0,0 +1,184 @@ +using System.Text; +using System.Text.Json; + +namespace FluxFlow.Data; + +/// +/// Primitive canonical-value materializers. Domain request materializers remain +/// in the modules that own those request types. +/// +public static class FlowValueMaterializers +{ + public static IFlowValueMaterializer JsonElement { get; } = + new JsonElementMaterializer(); + + public static IFlowValueMaterializer String { get; } = + new StringMaterializer(); + + public static IFlowValueMaterializer Content { get; } = + new ContentMaterializer(); + + public static IFlowValueMaterializer Primitive() + { + if (typeof(T) == typeof(JsonElement)) + return (IFlowValueMaterializer)(object)JsonElement; + if (typeof(T) == typeof(string)) + return (IFlowValueMaterializer)(object)String; + if (typeof(T) == typeof(FlowContent)) + return (IFlowValueMaterializer)(object)Content; + + throw new InvalidOperationException( + $"Type '{typeof(T)}' is not a canonical primitive. Its owning module must provide IFlowValueMaterializer<{typeof(T).Name}>."); + } + + private sealed class JsonElementMaterializer : IFlowValueMaterializer + { + public FlowValueShape InputShape { get; } = + FlowValueShape.Any("Any JSON value."); + + public FlowValueMaterializationResult Materialize(FlowValue value) + { + ArgumentNullException.ThrowIfNull(value); + return FlowValueMaterializationResult.Success(value.ToJsonElement()); + } + } + + private sealed class StringMaterializer : IFlowValueMaterializer + { + public FlowValueShape InputShape { get; } = + FlowValueShape.String("A JSON string."); + + public FlowValueMaterializationResult Materialize(FlowValue value) + { + ArgumentNullException.ThrowIfNull(value); + var element = value.ToJsonElement(); + if (element.ValueKind == JsonValueKind.String) + { + return FlowValueMaterializationResult.Success( + element.GetString() ?? string.Empty); + } + + return FlowValueMaterializationResult.Failure( + InvalidPrimitive("flow.value.expected_string", "string", element.ValueKind)); + } + } + + private sealed class ContentMaterializer : IFlowValueMaterializer + { + private static readonly JsonSerializerOptions SerializerOptions = + new(JsonSerializerDefaults.Web); + + public FlowValueShape InputShape { get; } = FlowValueShape.Any( + "A string, a FlowContent object, or any JSON value encoded as UTF-8 content."); + + public FlowValueMaterializationResult Materialize(FlowValue value) + { + ArgumentNullException.ThrowIfNull(value); + try + { + var element = value.ToJsonElement(); + if (element.ValueKind == JsonValueKind.Object && + element.TryGetProperty("bytes", out _)) + { + var content = element.Deserialize(SerializerOptions) + ?? throw new JsonException("Flow content cannot be null."); + return FlowValueMaterializationResult.Success(content); + } + + if (element.ValueKind == JsonValueKind.String) + { + return FlowValueMaterializationResult.Success( + FlowContent.FromBytes( + Encoding.UTF8.GetBytes(element.GetString() ?? string.Empty), + "text/plain", + "utf-8")); + } + + return FlowValueMaterializationResult.Success( + FlowContent.FromBytes( + Encoding.UTF8.GetBytes(element.GetRawText()), + "application/json", + "utf-8")); + } + catch (Exception exception) when ( + exception is JsonException or InvalidOperationException or NotSupportedException) + { + return FlowValueMaterializationResult.Failure( + new FlowError( + "flow.value.invalid_content", + "The workflow value cannot be materialized as exact content.", + "Materialization", + details: JsonSerializer.SerializeToElement(new + { + target = nameof(FlowContent), + reason = exception.Message + }))); + } + } + } + + private static FlowError InvalidPrimitive( + string code, + string target, + JsonValueKind actual) + => new( + code, + $"The workflow value must be a {target}.", + "Materialization", + details: JsonSerializer.SerializeToElement(new + { + target, + actual = actual.ToString() + })); +} + +/// +/// JSON mechanics shared by closed, module-owned request materializers. +/// It has no registry and no knowledge of component contracts. +/// +public abstract class JsonFlowValueMaterializer : IFlowValueMaterializer +{ + private static readonly JsonSerializerOptions SerializerOptions = + new(JsonSerializerDefaults.Web); + private readonly string _errorCode; + private readonly string _category; + + protected JsonFlowValueMaterializer( + string errorCode, + string category, + FlowValueShape inputShape) + { + ArgumentException.ThrowIfNullOrWhiteSpace(errorCode); + ArgumentException.ThrowIfNullOrWhiteSpace(category); + _errorCode = errorCode; + _category = category; + InputShape = inputShape ?? throw new ArgumentNullException(nameof(inputShape)); + } + + public FlowValueShape InputShape { get; } + + public virtual FlowValueMaterializationResult Materialize(FlowValue value) + { + ArgumentNullException.ThrowIfNull(value); + try + { + var materialized = value.Deserialize(SerializerOptions) + ?? throw new JsonException($"{typeof(T).Name} cannot be null."); + return FlowValueMaterializationResult.Success(materialized); + } + catch (Exception exception) when ( + exception is JsonException or InvalidOperationException or NotSupportedException) + { + return FlowValueMaterializationResult.Failure( + new FlowError( + _errorCode, + $"The workflow value cannot be materialized as {typeof(T).Name}.", + _category, + details: JsonSerializer.SerializeToElement(new + { + target = typeof(T).Name, + reason = exception.Message + }))); + } + } +} diff --git a/src/Core/Foundation/FluxFlow.Nodes/Data/FlowValueShape.cs b/src/Core/Foundation/FluxFlow.Nodes/Data/FlowValueShape.cs new file mode 100644 index 00000000..576e17c4 --- /dev/null +++ b/src/Core/Foundation/FluxFlow.Nodes/Data/FlowValueShape.cs @@ -0,0 +1,143 @@ +using System.Text.Json; + +namespace FluxFlow.Data; + +/// +/// Discoverable structural input accepted by a . +/// It intentionally describes only inexpensive top-level checks; domain validation remains +/// the responsibility of the component that owns the materialized request. +/// +public sealed class FlowValueShape : IEquatable +{ + private static readonly JsonValueKind[] AllKinds = + [ + JsonValueKind.Object, + JsonValueKind.Array, + JsonValueKind.String, + JsonValueKind.Number, + JsonValueKind.True, + JsonValueKind.False, + JsonValueKind.Null + ]; + + public FlowValueShape( + string description, + IReadOnlyList acceptedKinds, + IReadOnlyList? requiredProperties = null) + { + ArgumentException.ThrowIfNullOrWhiteSpace(description); + ArgumentNullException.ThrowIfNull(acceptedKinds); + + var kinds = acceptedKinds + .Distinct() + .ToArray(); + if (kinds.Length == 0) + throw new ArgumentException("At least one accepted JSON kind is required.", nameof(acceptedKinds)); + if (kinds.Any(static kind => kind == JsonValueKind.Undefined || !Enum.IsDefined(kind))) + throw new ArgumentException("Accepted JSON kinds cannot contain undefined values.", nameof(acceptedKinds)); + + var properties = (requiredProperties ?? []) + .Select(static property => + { + ArgumentException.ThrowIfNullOrWhiteSpace(property); + return property.Trim(); + }) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToArray(); + if (properties.Length > 0 && !kinds.Contains(JsonValueKind.Object)) + { + throw new ArgumentException( + "Required properties can only be declared for an accepted object shape.", + nameof(requiredProperties)); + } + + Description = description.Trim(); + AcceptedKinds = Array.AsReadOnly(kinds); + RequiredProperties = Array.AsReadOnly(properties); + } + + public string Description { get; } + + public IReadOnlyList AcceptedKinds { get; } + + public IReadOnlyList RequiredProperties { get; } + + public bool Equals(FlowValueShape? other) + => ReferenceEquals(this, other) || other is not null && + Description == other.Description && + AcceptedKinds.Count == other.AcceptedKinds.Count && + AcceptedKinds.All(other.AcceptedKinds.Contains) && + RequiredProperties.Count == other.RequiredProperties.Count && + RequiredProperties.All(property => other.RequiredProperties.Contains( + property, StringComparer.OrdinalIgnoreCase)); + + public override bool Equals(object? obj) => obj is FlowValueShape other && Equals(other); + + public override int GetHashCode() + { + var hash = new HashCode(); + hash.Add(Description, StringComparer.Ordinal); + foreach (var kind in AcceptedKinds.Order()) + hash.Add(kind); + foreach (var property in RequiredProperties.Order(StringComparer.OrdinalIgnoreCase)) + hash.Add(property, StringComparer.OrdinalIgnoreCase); + return hash.ToHashCode(); + } + + public FlowValueShapeValidationResult Validate(FlowValue value) + { + ArgumentNullException.ThrowIfNull(value); + var element = value.ToJsonElement(); + if (!AcceptedKinds.Contains(element.ValueKind)) + { + return FlowValueShapeValidationResult.Failure( + $"Expected {string.Join(" or ", AcceptedKinds)} but received {element.ValueKind}."); + } + + if (element.ValueKind != JsonValueKind.Object || RequiredProperties.Count == 0) + return FlowValueShapeValidationResult.Success; + + var available = element.EnumerateObject() + .Select(static property => property.Name) + .ToHashSet(StringComparer.OrdinalIgnoreCase); + var missing = RequiredProperties + .Where(property => !available.Contains(property)) + .ToArray(); + return missing.Length == 0 + ? FlowValueShapeValidationResult.Success + : FlowValueShapeValidationResult.Failure( + $"Missing required properties: {string.Join(", ", missing)}."); + } + + public static FlowValueShape Any(string description) + => new(description, AllKinds); + + public static FlowValueShape String(string description) + => new(description, [JsonValueKind.String]); + + public static FlowValueShape Object( + string description, + params string[] requiredProperties) + => new(description, [JsonValueKind.Object], requiredProperties); +} + +public sealed record FlowValueShapeValidationResult +{ + private FlowValueShapeValidationResult(bool isValid, string? error) + { + IsValid = isValid; + Error = error; + } + + public bool IsValid { get; } + + public string? Error { get; } + + public static FlowValueShapeValidationResult Success { get; } = new(true, null); + + public static FlowValueShapeValidationResult Failure(string error) + { + ArgumentException.ThrowIfNullOrWhiteSpace(error); + return new FlowValueShapeValidationResult(false, error.Trim()); + } +} diff --git a/src/Core/Foundation/FluxFlow.Nodes/Data/IFlowValueMaterializer.cs b/src/Core/Foundation/FluxFlow.Nodes/Data/IFlowValueMaterializer.cs new file mode 100644 index 00000000..a4b39a92 --- /dev/null +++ b/src/Core/Foundation/FluxFlow.Nodes/Data/IFlowValueMaterializer.cs @@ -0,0 +1,46 @@ +namespace FluxFlow.Data; + +/// +/// Materializes a canonical runtime value into one module-owned input type. +/// Implementations belong to the module that owns . +/// Invalid input shapes are represented by a failed +/// with a module-owned error code; they are not exceptions. Implementations should throw only +/// for programming errors such as a null argument and must not delegate to a global domain mapper. +/// +public interface IFlowValueMaterializer +{ + FlowValueShape InputShape { get; } + + FlowValueMaterializationResult Materialize(FlowValue value); +} + +/// +/// The explicit success-or-error result returned by a component-owned value materializer. +/// +public sealed class FlowValueMaterializationResult +{ + private readonly T? _value; + + private FlowValueMaterializationResult(T value) + { + ArgumentNullException.ThrowIfNull(value); + _value = value; + } + + private FlowValueMaterializationResult(FlowError error) + { + Error = error ?? throw new ArgumentNullException(nameof(error)); + } + + public bool IsSuccess => Error is null; + + public T Value => IsSuccess + ? _value! + : throw new InvalidOperationException("A failed materialization has no value."); + + public FlowError? Error { get; } + + public static FlowValueMaterializationResult Success(T value) => new(value); + + public static FlowValueMaterializationResult Failure(FlowError error) => new(error); +} diff --git a/src/Core/Foundation/FluxFlow.Nodes/FlowEvent.cs b/src/Core/Foundation/FluxFlow.Nodes/FlowEvent.cs new file mode 100644 index 00000000..9baa429d --- /dev/null +++ b/src/Core/Foundation/FluxFlow.Nodes/FlowEvent.cs @@ -0,0 +1,315 @@ +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Threading.Tasks.Dataflow; +using FluxFlow.Data; + +namespace FluxFlow.Nodes; + +[JsonConverter(typeof(JsonStringEnumConverter))] +public enum FlowEventKind +{ + Domain, + Lifecycle, + Diagnostic, + Audit +} + +public static class FlowEventHeaders +{ + public const string Type = "flow.event.type"; + public const string Kind = "flow.event.kind"; + public const string Level = "flow.event.level"; + public const string Source = "flow.event.source"; + public const string Application = "flow.event.application"; + public const string Revision = "flow.event.revision"; + public const string Workflow = "flow.event.workflow"; + public const string Component = "flow.event.component"; +} + +[JsonConverter(typeof(JsonStringEnumConverter))] +public enum FlowEventLevel +{ + Trace, + Information, + Warning, + Error +} + +/// +/// Authoring and access model for an event payload. Runtime Events ports +/// carry canonical envelopes, not this helper type. +/// +public sealed record FlowEvent +{ + private IReadOnlyDictionary _attributes = + new Dictionary(StringComparer.Ordinal); + + public DateTimeOffset Timestamp { get; init; } + + /// The correlation id of the message this event relates to, if any. + public CorrelationId? CorrelationId { get; init; } + + [JsonPropertyName("type")] + public required string Name { get; init; } + + public FlowEventKind Kind { get; init; } = FlowEventKind.Diagnostic; + + public FlowEventLevel Level { get; init; } = FlowEventLevel.Information; + + public string? Message { get; init; } + + public IReadOnlyDictionary Attributes + { + get => _attributes; + init => _attributes = CopyAttributes(value); + } + + public IReadOnlyDictionary Dimensions { get; init; } = + new Dictionary(StringComparer.Ordinal); + + public IReadOnlyDictionary Measurements { get; init; } = + new Dictionary(StringComparer.Ordinal); + + public FlowValue Details { get; init; } = FlowValue.Null; + + public FlowMessage ToMessage() + { + ArgumentException.ThrowIfNullOrWhiteSpace(Name); + var timestamp = Timestamp == default ? DateTimeOffset.UtcNow : Timestamp; + var kind = Kind.ToString().ToLowerInvariant(); + var level = Level.ToString().ToLowerInvariant(); + var value = FlowValue.From(new Dictionary(StringComparer.Ordinal) + { + ["type"] = Name.Trim(), + ["kind"] = kind, + ["level"] = level, + ["timestamp"] = timestamp, + ["message"] = Message, + ["dimensions"] = ConvertValues(Dimensions), + ["measurements"] = CopyMeasurements(Measurements), + ["details"] = Details, + ["attributes"] = ConvertValues(Attributes) + }); + var headers = new Dictionary(StringComparer.Ordinal) + { + [FlowEventHeaders.Type] = Name.Trim(), + [FlowEventHeaders.Kind] = kind, + [FlowEventHeaders.Level] = level + }; + var created = FlowMessage.Create(value, CorrelationId, headers: headers); + return FlowMessage.Restore( + value, + created.MessageId, + created.TraceId, + timestamp, + created.CorrelationId, + created.CausationId, + created.Headers); + } + + private static IReadOnlyDictionary CopyAttributes( + IReadOnlyDictionary? attributes) + => attributes is null + ? new Dictionary(StringComparer.Ordinal) + : new Dictionary(attributes, StringComparer.Ordinal); + + private static IReadOnlyDictionary ConvertValues( + IReadOnlyDictionary values) + { + var converted = new Dictionary(StringComparer.Ordinal); + foreach (var (name, value) in values) + { + if (string.IsNullOrWhiteSpace(name)) + continue; + + try + { + converted[name] = FlowValue.From(value); + } + catch + { + converted[name] = FlowValue.From( + value is IFormattable formattable + ? formattable.ToString(null, CultureInfo.InvariantCulture) + : value?.ToString()); + } + } + + return converted; + } + + private static IReadOnlyDictionary CopyMeasurements( + IReadOnlyDictionary measurements) + { + var copy = new Dictionary(StringComparer.Ordinal); + foreach (var (name, value) in measurements) + { + ArgumentException.ThrowIfNullOrWhiteSpace(name); + if (!double.IsFinite(value)) + { + throw new ArgumentOutOfRangeException( + nameof(measurements), + $"Event measurement '{name}' must be finite."); + } + + copy.Add(name, value); + } + + return copy; + } +} + +public static class FlowEventDataflowExtensions +{ + public static bool Post(this ITargetBlock target, FlowEvent @event) + { + ArgumentNullException.ThrowIfNull(target); + ArgumentNullException.ThrowIfNull(@event); + return DataflowBlock.Post(target, @event.ToMessage()); + } +} + +public static class FlowEventMessageExtensions +{ + public static bool TryGetFlowEvent(this FlowMessage message, out FlowEvent? @event) + { + ArgumentNullException.ThrowIfNull(message); + @event = null; + if (message.IsError) + return false; + + var root = message.Value.ToJsonElement(); + if (root.ValueKind != JsonValueKind.Object || + !TryGetString(root, "type", out var name)) + { + return false; + } + + @event = new FlowEvent + { + Name = name, + Kind = ReadEnum(root, "kind", FlowEventKind.Diagnostic), + Level = ReadEnum(root, "level", FlowEventLevel.Information), + Message = TryGetString(root, "message", out var text) ? text : null, + Dimensions = ReadObject(root, "dimensions"), + Measurements = ReadMeasurements(root), + Details = ReadFlowValue(root, "details"), + Attributes = ReadObject(root, "attributes"), + Timestamp = ReadTimestamp(root, message.Timestamp), + CorrelationId = message.CorrelationId + }; + return true; + } + + public static FlowEvent ToFlowEvent(this FlowMessage message) + => message.TryGetFlowEvent(out var @event) + ? @event + : throw new InvalidOperationException("The flow message does not contain a canonical event value."); + + public static bool TryGetFlowEvent( + this FlowMessage message, + out FlowEvent? @event) + { + ArgumentNullException.ThrowIfNull(message); + if (!message.Value.TryGetFlowEvent(out @event)) + return false; + + @event = @event with + { + Timestamp = message.Timestamp, + CorrelationId = message.CorrelationId + }; + return true; + } + + public static FlowEvent ToFlowEvent(this FlowMessage message) + => message.TryGetFlowEvent(out var @event) + ? @event + : throw new InvalidOperationException("The flow message does not contain a canonical event value."); + + public static bool TryGetFlowEvent(this FlowValue value, out FlowEvent? @event) + { + ArgumentNullException.ThrowIfNull(value); + return FlowMessage.Create(value).TryGetFlowEvent(out @event); + } + + public static FlowEvent ToFlowEvent(this FlowValue value) + => value.TryGetFlowEvent(out var @event) + ? @event + : throw new InvalidOperationException("The flow value does not contain a canonical event value."); + + private static bool TryGetString(JsonElement root, string name, out string value) + { + value = string.Empty; + if (!root.TryGetProperty(name, out var property) || property.ValueKind != JsonValueKind.String) + return false; + + value = property.GetString() ?? string.Empty; + return value.Length > 0; + } + + private static TEnum ReadEnum(JsonElement root, string name, TEnum fallback) + where TEnum : struct, Enum + => TryGetString(root, name, out var value) && + Enum.TryParse(value, ignoreCase: true, out var parsed) + ? parsed + : fallback; + + private static IReadOnlyDictionary ReadObject(JsonElement root, string name) + { + if (!root.TryGetProperty(name, out var property) || property.ValueKind != JsonValueKind.Object) + return new Dictionary(StringComparer.Ordinal); + + return property.EnumerateObject().ToDictionary( + static item => item.Name, + static item => ReadValue(item.Value), + StringComparer.Ordinal); + } + + private static IReadOnlyDictionary ReadMeasurements(JsonElement root) + { + if (!root.TryGetProperty("measurements", out var property) || property.ValueKind != JsonValueKind.Object) + return new Dictionary(StringComparer.Ordinal); + + var result = new Dictionary(StringComparer.Ordinal); + foreach (var item in property.EnumerateObject()) + { + if (item.Value.TryGetDouble(out var value)) + result[item.Name] = value; + } + + return result; + } + + private static FlowValue ReadFlowValue(JsonElement root, string name) + => root.TryGetProperty(name, out var value) + ? FlowValue.FromJson(value) + : FlowValue.Null; + + private static DateTimeOffset ReadTimestamp(JsonElement root, DateTimeOffset fallback) + => root.TryGetProperty("timestamp", out var value) && + value.TryGetDateTimeOffset(out var timestamp) + ? timestamp + : fallback; + + private static object? ReadValue(JsonElement value) + => value.ValueKind switch + { + JsonValueKind.Null or JsonValueKind.Undefined => null, + JsonValueKind.True => true, + JsonValueKind.False => false, + JsonValueKind.String => value.TryGetDateTimeOffset(out var date) + ? date + : value.GetString(), + JsonValueKind.Number => value.TryGetInt64(out var integer) + ? integer + : value.GetDouble(), + JsonValueKind.Array => value.EnumerateArray().Select(ReadValue).ToArray(), + JsonValueKind.Object => value.EnumerateObject().ToDictionary( + static item => item.Name, + static item => ReadValue(item.Value), + StringComparer.Ordinal), + _ => value.GetRawText() + }; +} diff --git a/src/Core/Foundation/FluxFlow.Nodes/FlowMessage.cs b/src/Core/Foundation/FluxFlow.Nodes/FlowMessage.cs new file mode 100644 index 00000000..fa0eba79 --- /dev/null +++ b/src/Core/Foundation/FluxFlow.Nodes/FlowMessage.cs @@ -0,0 +1,599 @@ +using System.Collections.Immutable; +using System.Diagnostics.CodeAnalysis; +using System.Text.Json.Serialization; +using FluxFlow.Data; + +namespace FluxFlow.Nodes; + +/// +/// Immutable workflow envelope containing exactly one active case: a value of +/// or a . +/// The generic payload keeps component internals and code-first workflows strongly typed. +/// Runtime-authored workflow boundaries use as +/// and adapt to module-owned types at the component boundary. +/// +[JsonConverter(typeof(FlowMessageJsonConverterFactory))] +public sealed record FlowMessage +{ + private readonly T? _value; + private readonly FlowError? _error; + + private FlowMessage( + bool isError, + T? value, + FlowError? error, + CorrelationId? correlationId, + TraceId traceId, + MessageId messageId, + MessageId? causationId, + DateTimeOffset timestamp, + IReadOnlyDictionary? headers) + { + if (isError && error is null) + throw new ArgumentException("An error message requires an error.", nameof(error)); + if (!isError && error is not null) + throw new ArgumentException("A value message cannot contain an error.", nameof(error)); + if (traceId.IsEmpty) + throw new ArgumentException("Trace id cannot be empty.", nameof(traceId)); + if (messageId.IsEmpty) + throw new ArgumentException("Message id cannot be empty.", nameof(messageId)); + + IsError = isError; + _value = value; + _error = error; + CorrelationId = correlationId is { IsEmpty: false } ? correlationId : null; + TraceId = traceId; + MessageId = messageId; + CausationId = causationId is { IsEmpty: false } ? causationId : null; + Timestamp = timestamp; + Headers = FlowMessage.CopyHeaders(headers); + } + + public bool IsError { get; } + + public T Value => !IsError + ? _value! + : throw new InvalidOperationException("An error message does not contain a value."); + + public FlowError? Error => _error; + + public CorrelationId? CorrelationId { get; } + + public TraceId TraceId { get; } + + public MessageId MessageId { get; } + + public MessageId? CausationId { get; } + + public DateTimeOffset Timestamp { get; } + + public IReadOnlyDictionary Headers { get; } + + public TResult Match( + Func onValue, + Func onError) + { + ArgumentNullException.ThrowIfNull(onValue); + ArgumentNullException.ThrowIfNull(onError); + return IsError ? onError(_error!) : onValue(_value!); + } + + public FlowMessage With( + TNext value, + IReadOnlyDictionary? headers = null, + MessageId? causationId = null) + => FlowMessage.CreateDerived(this, value, error: null, headers, causationId); + + public FlowMessage ConvertValue(TNext value) + => new( + isError: false, + value, + error: null, + CorrelationId, + TraceId, + MessageId, + CausationId, + Timestamp, + Headers); + + public FlowMessage ConvertError() + { + if (!IsError) + throw new InvalidOperationException("A value message does not contain an error."); + + return new FlowMessage( + isError: true, + value: default, + _error, + CorrelationId, + TraceId, + MessageId, + CausationId, + Timestamp, + Headers); + } + + /// + /// Converts this typed helper message to the canonical runtime envelope while + /// preserving its identity, tracing, timing, and headers. + /// + public FlowMessage ConvertValue(FlowValue value) + { + ArgumentNullException.ThrowIfNull(value); + return FlowMessage.Restore( + value, + MessageId, + TraceId, + Timestamp, + CorrelationId, + CausationId, + Headers); + } + + /// + /// Converts this typed error helper message to the canonical runtime envelope + /// while preserving its identity, tracing, timing, and headers. + /// + public FlowMessage ConvertError() + { + if (!IsError) + throw new InvalidOperationException("A value message does not contain an error."); + + return FlowMessage.RestoreError( + _error!, + MessageId, + TraceId, + Timestamp, + CorrelationId, + CausationId, + Headers); + } + + public FlowMessage WithError( + FlowError error, + IReadOnlyDictionary? headers = null, + MessageId? causationId = null) + { + ArgumentNullException.ThrowIfNull(error); + return FlowMessage.CreateDerived( + this, + value: default, + error, + headers, + causationId); + } + + internal static FlowMessage CreateInitial( + T? value, + FlowError? error, + CorrelationId? correlationId, + TraceId? traceId, + IReadOnlyDictionary? headers, + MessageId? causationId) + => new( + error is not null, + value, + error, + correlationId, + traceId is { IsEmpty: false } ? traceId.Value : global::FluxFlow.Nodes.TraceId.New(), + global::FluxFlow.Nodes.MessageId.New(), + causationId is { IsEmpty: false } ? causationId : null, + DateTimeOffset.UtcNow, + headers); + + internal static FlowMessage Rehydrate( + bool isError, + T? value, + FlowError? error, + CorrelationId? correlationId, + TraceId traceId, + MessageId messageId, + MessageId? causationId, + DateTimeOffset timestamp, + IReadOnlyDictionary? headers) + => new( + isError, + value, + error, + correlationId, + traceId, + messageId, + causationId, + timestamp, + headers); + + private static FlowMessage CreateDerived( + FlowMessage previous, + T? value, + FlowError? error, + IReadOnlyDictionary? headers, + MessageId? causationId) + => new( + error is not null, + value, + error, + previous.CorrelationId, + previous.TraceId, + global::FluxFlow.Nodes.MessageId.New(), + causationId is { IsEmpty: false } ? causationId : previous.MessageId, + DateTimeOffset.UtcNow, + headers ?? previous.Headers); +} + +[JsonConverter(typeof(FlowMessageJsonConverter))] +public sealed record FlowMessage +{ + private readonly FlowValue? _value; + private readonly FlowError? _error; + + private FlowMessage( + bool isError, + FlowValue? value, + FlowError? error, + CorrelationId? correlationId, + TraceId traceId, + MessageId messageId, + MessageId? causationId, + DateTimeOffset timestamp, + IReadOnlyDictionary? headers) + { + if (isError && value is not null) + throw new ArgumentException("An error message cannot contain a value.", nameof(value)); + if (isError && error is null) + throw new ArgumentException("An error message requires an error.", nameof(error)); + if (!isError && value is null) + throw new ArgumentException("A value message requires a FlowValue.", nameof(value)); + if (!isError && error is not null) + throw new ArgumentException("A value message cannot contain an error.", nameof(error)); + if (traceId.IsEmpty) + throw new ArgumentException("Trace id cannot be empty.", nameof(traceId)); + if (messageId.IsEmpty) + throw new ArgumentException("Message id cannot be empty.", nameof(messageId)); + + IsError = isError; + _value = value; + _error = error; + CorrelationId = correlationId is { IsEmpty: false } ? correlationId : null; + TraceId = traceId; + MessageId = messageId; + CausationId = causationId is { IsEmpty: false } ? causationId : null; + Timestamp = timestamp; + Headers = CopyHeaders(headers); + } + + [MemberNotNullWhen(false, nameof(Value))] + [MemberNotNullWhen(true, nameof(Error))] + public bool IsError { get; } + + public FlowValue? Value => _value; + + public FlowError? Error => _error; + + public CorrelationId? CorrelationId { get; } + + public TraceId TraceId { get; } + + public MessageId MessageId { get; } + + public MessageId? CausationId { get; } + + public DateTimeOffset Timestamp { get; } + + public IReadOnlyDictionary Headers { get; } + + public bool TryGetValue([NotNullWhen(true)] out FlowValue? value) + { + value = _value; + return !IsError; + } + + public bool TryGetError([NotNullWhen(true)] out FlowError? error) + { + error = _error; + return IsError; + } + + public TResult Match( + Func onValue, + Func onError) + { + ArgumentNullException.ThrowIfNull(onValue); + ArgumentNullException.ThrowIfNull(onError); + return IsError ? onError(_error!) : onValue(_value!); + } + + public FlowMessage With( + FlowValue value, + IReadOnlyDictionary? headers = null, + MessageId? causationId = null) + { + ArgumentNullException.ThrowIfNull(value); + return CreateDerived(value, error: null, headers, causationId); + } + + public FlowMessage WithError( + FlowError error, + IReadOnlyDictionary? headers = null, + MessageId? causationId = null) + { + ArgumentNullException.ThrowIfNull(error); + return CreateDerived(value: null, error, headers, causationId); + } + + public FlowMessage ConvertValue(FlowValue value) + { + ArgumentNullException.ThrowIfNull(value); + return Restore( + value, + MessageId, + TraceId, + Timestamp, + CorrelationId, + CausationId, + Headers); + } + + public FlowMessage ConvertError() + { + if (!IsError) + throw new InvalidOperationException("A value message does not contain an error."); + + return this; + } + + public FlowMessage ConvertValue(TNext value) + => FlowMessage.Rehydrate( + isError: false, + value, + error: null, + CorrelationId, + TraceId, + MessageId, + CausationId, + Timestamp, + Headers); + + public FlowMessage ConvertError() + { + if (!IsError) + throw new InvalidOperationException("A value message does not contain an error."); + + return FlowMessage.Rehydrate( + isError: true, + value: default, + _error, + CorrelationId, + TraceId, + MessageId, + CausationId, + Timestamp, + Headers); + } + + internal static readonly IReadOnlyDictionary EmptyHeaders = + ImmutableDictionary.Create(StringComparer.Ordinal); + + public static FlowMessage Create( + FlowValue value, + CorrelationId? correlationId = null, + TraceId? traceId = null, + IReadOnlyDictionary? headers = null, + MessageId? causationId = null) + { + ArgumentNullException.ThrowIfNull(value); + return CreateInitial(value, error: null, correlationId, traceId, headers, causationId); + } + + public static FlowMessage CreateError( + FlowError error, + CorrelationId? correlationId = null, + TraceId? traceId = null, + IReadOnlyDictionary? headers = null, + MessageId? causationId = null) + { + ArgumentNullException.ThrowIfNull(error); + return CreateInitial(value: null, error, correlationId, traceId, headers, causationId); + } + + public static FlowMessage Create( + T value, + CorrelationId? correlationId = null, + TraceId? traceId = null, + IReadOnlyDictionary? headers = null, + MessageId? causationId = null) + => FlowMessage.CreateInitial( + value, + error: null, + correlationId, + traceId, + headers, + causationId); + + public static FlowMessage CreateError( + FlowError error, + CorrelationId? correlationId = null, + TraceId? traceId = null, + IReadOnlyDictionary? headers = null, + MessageId? causationId = null) + { + ArgumentNullException.ThrowIfNull(error); + return FlowMessage.CreateInitial( + value: default, + error, + correlationId, + traceId, + headers, + causationId); + } + + /// + /// Restores a previously created value message without generating new identity or timing metadata. + /// + public static FlowMessage Restore( + T value, + MessageId messageId, + TraceId traceId, + DateTimeOffset timestamp, + CorrelationId? correlationId = null, + MessageId? causationId = null, + IReadOnlyDictionary? headers = null) + => FlowMessage.Rehydrate( + isError: false, + value, + error: null, + correlationId, + traceId, + messageId, + causationId, + timestamp, + headers); + + public static FlowMessage Restore( + FlowValue value, + MessageId messageId, + TraceId traceId, + DateTimeOffset timestamp, + CorrelationId? correlationId = null, + MessageId? causationId = null, + IReadOnlyDictionary? headers = null) + { + ArgumentNullException.ThrowIfNull(value); + return Rehydrate( + isError: false, + value, + error: null, + correlationId, + traceId, + messageId, + causationId, + timestamp, + headers); + } + + /// + /// Restores a previously created error message without generating new identity or timing metadata. + /// + public static FlowMessage RestoreError( + FlowError error, + MessageId messageId, + TraceId traceId, + DateTimeOffset timestamp, + CorrelationId? correlationId = null, + MessageId? causationId = null, + IReadOnlyDictionary? headers = null) + { + ArgumentNullException.ThrowIfNull(error); + return FlowMessage.Rehydrate( + isError: true, + value: default, + error, + correlationId, + traceId, + messageId, + causationId, + timestamp, + headers); + } + + public static FlowMessage RestoreError( + FlowError error, + MessageId messageId, + TraceId traceId, + DateTimeOffset timestamp, + CorrelationId? correlationId = null, + MessageId? causationId = null, + IReadOnlyDictionary? headers = null) + { + ArgumentNullException.ThrowIfNull(error); + return Rehydrate( + isError: true, + value: null, + error, + correlationId, + traceId, + messageId, + causationId, + timestamp, + headers); + } + + internal static FlowMessage Rehydrate( + bool isError, + FlowValue? value, + FlowError? error, + CorrelationId? correlationId, + TraceId traceId, + MessageId messageId, + MessageId? causationId, + DateTimeOffset timestamp, + IReadOnlyDictionary? headers) + => new( + isError, + value, + error, + correlationId, + traceId, + messageId, + causationId, + timestamp, + headers); + + private static FlowMessage CreateInitial( + FlowValue? value, + FlowError? error, + CorrelationId? correlationId, + TraceId? traceId, + IReadOnlyDictionary? headers, + MessageId? causationId) + => new( + error is not null, + value, + error, + correlationId, + traceId is { IsEmpty: false } ? traceId.Value : global::FluxFlow.Nodes.TraceId.New(), + global::FluxFlow.Nodes.MessageId.New(), + causationId is { IsEmpty: false } ? causationId : null, + DateTimeOffset.UtcNow, + headers); + + private FlowMessage CreateDerived( + FlowValue? value, + FlowError? error, + IReadOnlyDictionary? headers, + MessageId? causationId) + => new( + error is not null, + value, + error, + CorrelationId, + TraceId, + global::FluxFlow.Nodes.MessageId.New(), + causationId is { IsEmpty: false } ? causationId : MessageId, + DateTimeOffset.UtcNow, + headers ?? Headers); + + internal static IReadOnlyDictionary CopyHeaders( + IReadOnlyDictionary? headers) + { + if (headers is null || headers.Count == 0) + return EmptyHeaders; + if (headers is ImmutableDictionary immutable && + immutable.KeyComparer == StringComparer.Ordinal) + { + return immutable; + } + + var builder = ImmutableDictionary.CreateBuilder(StringComparer.Ordinal); + foreach (var header in headers) + { + ArgumentException.ThrowIfNullOrWhiteSpace(header.Key); + builder.Add( + header.Key, + header.Value ?? throw new ArgumentException( + "FlowMessage headers cannot contain null values.", + nameof(headers))); + } + + return builder.ToImmutable(); + } +} diff --git a/src/FluxFlow.Nodes/FlowMessageJsonConverter.cs b/src/Core/Foundation/FluxFlow.Nodes/FlowMessageJsonConverter.cs similarity index 52% rename from src/FluxFlow.Nodes/FlowMessageJsonConverter.cs rename to src/Core/Foundation/FluxFlow.Nodes/FlowMessageJsonConverter.cs index 9e35a16a..1631690c 100644 --- a/src/FluxFlow.Nodes/FlowMessageJsonConverter.cs +++ b/src/Core/Foundation/FluxFlow.Nodes/FlowMessageJsonConverter.cs @@ -4,6 +4,149 @@ namespace FluxFlow.Nodes; +internal sealed class FlowMessageJsonConverter : JsonConverter +{ + public override FlowMessage Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + var root = document.RootElement; + if (root.ValueKind != JsonValueKind.Object) + throw new JsonException("FlowMessage JSON must be an object."); + + EnsureKnownUniqueProperties(root); + var isError = ReadRequired(root, "isError", options); + var traceId = ReadRequired(root, "traceId", options); + var messageId = ReadRequired(root, "messageId", options); + var timestamp = ReadRequired(root, "timestamp", options); + var causationId = ReadOptionalStruct(root, "causationId", options); + var correlationId = ReadOptionalStruct(root, "correlationId", options); + var headers = ReadOptionalClass>(root, "headers", options); + + if (!root.TryGetProperty("value", out var valueElement)) + throw new JsonException("FlowMessage JSON requires a 'value' property."); + if (!root.TryGetProperty("error", out var errorElement)) + throw new JsonException("FlowMessage JSON requires an 'error' property."); + + if (isError) + { + if (valueElement.ValueKind != JsonValueKind.Null) + throw new JsonException("An error FlowMessage must contain a null value."); + if (errorElement.ValueKind == JsonValueKind.Null) + throw new JsonException("An error FlowMessage requires an error."); + + var error = errorElement.Deserialize(options) + ?? throw new JsonException("An error FlowMessage requires an error."); + return FlowMessage.Rehydrate( + true, + value: null, + error, + correlationId, + traceId, + messageId, + causationId, + timestamp, + headers); + } + + if (errorElement.ValueKind != JsonValueKind.Null) + throw new JsonException("A value FlowMessage must contain a null error."); + + return FlowMessage.Rehydrate( + false, + FlowValue.FromJson(valueElement), + error: null, + correlationId, + traceId, + messageId, + causationId, + timestamp, + headers); + } + + public override void Write( + Utf8JsonWriter writer, + FlowMessage message, + JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WritePropertyName("traceId"); + JsonSerializer.Serialize(writer, message.TraceId, options); + writer.WritePropertyName("messageId"); + JsonSerializer.Serialize(writer, message.MessageId, options); + writer.WritePropertyName("causationId"); + JsonSerializer.Serialize(writer, message.CausationId, options); + writer.WritePropertyName("correlationId"); + JsonSerializer.Serialize(writer, message.CorrelationId, options); + writer.WriteString("timestamp", message.Timestamp); + writer.WritePropertyName("headers"); + JsonSerializer.Serialize(writer, message.Headers, options); + writer.WriteBoolean("isError", message.IsError); + writer.WritePropertyName("value"); + if (message.IsError) + writer.WriteNullValue(); + else + JsonSerializer.Serialize(writer, message.Value, options); + writer.WritePropertyName("error"); + if (message.IsError) + JsonSerializer.Serialize(writer, message.Error, options); + else + writer.WriteNullValue(); + writer.WriteEndObject(); + } + + private static TValue ReadRequired( + JsonElement root, + string name, + JsonSerializerOptions options) + { + if (!root.TryGetProperty(name, out var element) || element.ValueKind == JsonValueKind.Null) + throw new JsonException($"FlowMessage JSON requires a '{name}' property."); + return element.Deserialize(options) + ?? throw new JsonException($"FlowMessage JSON property '{name}' is invalid."); + } + + private static TValue? ReadOptionalStruct( + JsonElement root, + string name, + JsonSerializerOptions options) + where TValue : struct + { + if (!root.TryGetProperty(name, out var element) || element.ValueKind == JsonValueKind.Null) + return null; + return element.Deserialize(options); + } + + private static TValue? ReadOptionalClass( + JsonElement root, + string name, + JsonSerializerOptions options) + where TValue : class + { + if (!root.TryGetProperty(name, out var element) || element.ValueKind == JsonValueKind.Null) + return null; + return element.Deserialize(options); + } + + private static void EnsureKnownUniqueProperties(JsonElement root) + { + var names = new HashSet(StringComparer.Ordinal); + foreach (var property in root.EnumerateObject()) + { + if (!names.Add(property.Name)) + throw new JsonException($"FlowMessage JSON contains duplicate property '{property.Name}'."); + if (property.Name is not ( + "traceId" or "messageId" or "causationId" or "correlationId" or + "timestamp" or "headers" or "isError" or "value" or "error")) + { + throw new JsonException($"FlowMessage JSON contains unknown property '{property.Name}'."); + } + } + } +} + internal sealed class FlowMessageJsonConverterFactory : JsonConverterFactory { public override bool CanConvert(Type typeToConvert) diff --git a/src/FluxFlow.Nodes/FlowNode.cs b/src/Core/Foundation/FluxFlow.Nodes/FlowNode.cs similarity index 97% rename from src/FluxFlow.Nodes/FlowNode.cs rename to src/Core/Foundation/FluxFlow.Nodes/FlowNode.cs index ca56ff16..4d1cbd64 100644 --- a/src/FluxFlow.Nodes/FlowNode.cs +++ b/src/Core/Foundation/FluxFlow.Nodes/FlowNode.cs @@ -13,7 +13,7 @@ public abstract class FlowNode : IFlowNode { private readonly ActionBlock> _processor; private readonly FlowOutput> _output; - private readonly BroadcastBlock _events; + private readonly BroadcastBlock _events; private readonly List _extraOutputs = []; private readonly CancellationTokenSource _stopping = new(); private readonly TaskCompletionSource _completion = @@ -48,7 +48,7 @@ protected FlowNode(FlowNodeOptions? options = null) _outputCapacity = options.OutputCapacity; _output = CreateOutput>(); - _events = new BroadcastBlock(static value => value); + _events = new BroadcastBlock(static value => value); _processor = new ActionBlock>( RunAsync, new ExecutionDataflowBlockOptions @@ -69,7 +69,7 @@ protected FlowNode(FlowNodeOptions? options = null) public ISourceBlock> Output => _output; /// Best-effort event stream. Observers do not backpressure workflow data. - public ISourceBlock Events => _events; + public ISourceBlock Events => _events; /// Completes when input processing and every accepted data output have drained. public Task Completion => _completion.Task; @@ -129,6 +129,8 @@ protected FlowOutput AddOutput() protected bool EmitEvent(FlowEvent @event) => _events.Post(@event); + protected bool EmitEvent(FlowMessage @event) => _events.Post(@event); + public void Complete() => _processor.Complete(); public void Fault(Exception exception) diff --git a/src/FluxFlow.Nodes/FlowNodeOptions.cs b/src/Core/Foundation/FluxFlow.Nodes/FlowNodeOptions.cs similarity index 100% rename from src/FluxFlow.Nodes/FlowNodeOptions.cs rename to src/Core/Foundation/FluxFlow.Nodes/FlowNodeOptions.cs diff --git a/src/FluxFlow.Nodes/FlowOutput.cs b/src/Core/Foundation/FluxFlow.Nodes/FlowOutput.cs similarity index 100% rename from src/FluxFlow.Nodes/FlowOutput.cs rename to src/Core/Foundation/FluxFlow.Nodes/FlowOutput.cs diff --git a/src/FluxFlow.Nodes/FlowOutputOptions.cs b/src/Core/Foundation/FluxFlow.Nodes/FlowOutputOptions.cs similarity index 100% rename from src/FluxFlow.Nodes/FlowOutputOptions.cs rename to src/Core/Foundation/FluxFlow.Nodes/FlowOutputOptions.cs diff --git a/src/FluxFlow.Nodes/FlowSource.cs b/src/Core/Foundation/FluxFlow.Nodes/FlowSource.cs similarity index 97% rename from src/FluxFlow.Nodes/FlowSource.cs rename to src/Core/Foundation/FluxFlow.Nodes/FlowSource.cs index 62d8766a..d33614b1 100644 --- a/src/FluxFlow.Nodes/FlowSource.cs +++ b/src/Core/Foundation/FluxFlow.Nodes/FlowSource.cs @@ -10,7 +10,7 @@ namespace FluxFlow.Nodes; public abstract class FlowSource : IFlowSource { private readonly FlowOutput> _output; - private readonly BroadcastBlock _events; + private readonly BroadcastBlock _events; private readonly List _extraOutputs = []; private readonly CancellationTokenSource _stopping = new(); private readonly TaskCompletionSource _completion = @@ -33,13 +33,13 @@ protected FlowSource(FlowSourceOptions? options = null) _outputCapacity = options.OutputCapacity; _output = CreateOutput>(); - _events = new BroadcastBlock(static value => value); + _events = new BroadcastBlock(static value => value); _ = ObserveOutputTerminationAsync(_output); } public ISourceBlock> Output => _output; - public ISourceBlock Events => _events; + public ISourceBlock Events => _events; public Task Completion => _completion.Task; @@ -113,6 +113,8 @@ protected ValueTask EmitErrorAsync( protected bool EmitEvent(FlowEvent @event) => _events.Post(@event); + protected bool EmitEvent(FlowMessage @event) => _events.Post(@event); + public void Complete() => _stopping.Cancel(); public void Fault(Exception exception) diff --git a/src/FluxFlow.Nodes/FlowSourceOptions.cs b/src/Core/Foundation/FluxFlow.Nodes/FlowSourceOptions.cs similarity index 100% rename from src/FluxFlow.Nodes/FlowSourceOptions.cs rename to src/Core/Foundation/FluxFlow.Nodes/FlowSourceOptions.cs diff --git a/src/Core/Foundation/FluxFlow.Nodes/FlowValueNode.cs b/src/Core/Foundation/FluxFlow.Nodes/FlowValueNode.cs new file mode 100644 index 00000000..686cc5cf --- /dev/null +++ b/src/Core/Foundation/FluxFlow.Nodes/FlowValueNode.cs @@ -0,0 +1,339 @@ +using System.Text.Json; +using System.Threading.Tasks.Dataflow; +using FluxFlow.Data; + +namespace FluxFlow.Nodes; + +/// +/// Base for a single-input / single-output node. Inputs and normal data outputs are +/// bounded, so pressure from a slow downstream component reaches the producer instead +/// of silently replacing data. Events remain a best-effort observation stream. +/// +public abstract class FlowNode : IFlowNode +{ + private readonly ActionBlock _processor; + private readonly FlowOutput _output; + private readonly BroadcastBlock _events; + private readonly List _extraOutputs = []; + private readonly CancellationTokenSource _stopping = new(); + private readonly TaskCompletionSource _completion = + new(TaskCreationOptions.RunContinuationsAsynchronously); + private readonly int _outputCapacity; + private int _outputShutdownStarted; + private int _disposed; + + protected FlowNode(FlowNodeOptions? options = null) + { + options ??= new FlowNodeOptions(); + if (options.InputCapacity <= 0) + { + throw new ArgumentOutOfRangeException( + nameof(options), + "InputCapacity must be greater than zero."); + } + + if (options.OutputCapacity <= 0) + { + throw new ArgumentOutOfRangeException( + nameof(options), + "OutputCapacity must be greater than zero."); + } + + if (options.MaxDegreeOfParallelism <= 0) + { + throw new ArgumentOutOfRangeException( + nameof(options), + "MaxDegreeOfParallelism must be greater than zero."); + } + + _outputCapacity = options.OutputCapacity; + _output = CreateOutput(); + _events = new BroadcastBlock(static value => value); + _processor = new ActionBlock( + RunAsync, + new ExecutionDataflowBlockOptions + { + BoundedCapacity = options.InputCapacity, + MaxDegreeOfParallelism = options.MaxDegreeOfParallelism, + EnsureOrdered = options.MaxDegreeOfParallelism == 1 + }); + + _ = ObserveOutputTerminationAsync(_output); + _ = CompleteWhenDrainedAsync(); + } + + /// Bounded input port. SendAsync applies backpressure. + public ITargetBlock Input => _processor; + + /// Bounded reliable normal-data output port. + public ISourceBlock Output => _output; + + /// Best-effort event stream. Observers do not backpressure workflow data. + public ISourceBlock Events => _events; + + /// Completes when input processing and every accepted data output have drained. + public Task Completion => _completion.Task; + + /// Canceled when the node is faulted or disposed. + protected CancellationToken Stopping => _stopping.Token; + + /// Handle one value message. Throwing is caught and emitted as error data. + protected abstract Task ProcessAsync(FlowMessage message); + + /// Override for components that deliberately inspect or recover error messages. + protected virtual bool HandlesErrors => false; + + /// + /// Reliably accepts a normal output message, waiting for bounded output capacity when + /// downstream consumers are slow. + /// + protected async ValueTask EmitAsync( + FlowMessage message, + CancellationToken cancellationToken = default) + { + if (await _output.SendAsync(message, cancellationToken).ConfigureAwait(false)) + { + return; + } + + await ThrowOutputUnavailableAsync(_output).ConfigureAwait(false); + } + + /// + /// Reliably accepts a value on an additional output created by . + /// + protected static async ValueTask EmitAsync( + FlowOutput output, + T value, + CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(output); + if (await output.SendAsync(value, cancellationToken).ConfigureAwait(false)) + { + return; + } + + await ThrowOutputUnavailableAsync(output).ConfigureAwait(false); + } + + /// + /// Creates an additional bounded reliable data output owned by this node. + /// + protected FlowOutput AddOutput() + { + var output = CreateOutput(); + _extraOutputs.Add(output); + _ = ObserveOutputTerminationAsync(output); + return output; + } + + protected bool EmitEvent(FlowEvent @event) => _events.Post(@event); + + protected bool EmitEvent(FlowMessage @event) => _events.Post(@event); + + public void Complete() => _processor.Complete(); + + public void Fault(Exception exception) + { + ArgumentNullException.ThrowIfNull(exception); + Interlocked.Exchange(ref _outputShutdownStarted, 1); + _stopping.Cancel(); + ((IDataflowBlock)_processor).Fault(exception); + FaultOutputs(exception); + _events.Complete(); + _completion.TrySetException(exception); + } + + public async ValueTask DisposeAsync() + { + if (Interlocked.Exchange(ref _disposed, 1) != 0) + { + return; + } + + Complete(); + try + { + await Completion.ConfigureAwait(false); + } + catch + { + // Completion remains the authoritative fault surface. + } + + try + { + await OnDisposeAsync().ConfigureAwait(false); + } + finally + { + try + { + await DisposeOutputsAsync().ConfigureAwait(false); + } + finally + { + _stopping.Cancel(); + _stopping.Dispose(); + } + } + } + + /// Override to release node-owned resources after the pump has stopped. + protected virtual ValueTask OnDisposeAsync() => ValueTask.CompletedTask; + + /// + /// Override to flush work deliberately retained by the node after input drains and + /// before outputs complete. Await for normal data emitted here. + /// This hook is not invoked on the fault path. + /// + protected virtual ValueTask OnInputCompletedAsync() => ValueTask.CompletedTask; + + private FlowOutput CreateOutput() + => new(new FlowOutputOptions { Capacity = _outputCapacity }); + + private async Task RunAsync(FlowMessage message) + { + if (message.IsError && !HandlesErrors) + { + await EmitAsync(message.WithError(message.Error!), Stopping) + .ConfigureAwait(false); + return; + } + + try + { + await ProcessAsync(message).ConfigureAwait(false); + } + catch (OperationCanceledException) when (_stopping.IsCancellationRequested) + { + // Requested stop, not a processing failure. + } + catch (Exception exception) + { + if (_output.Completion.IsFaulted) + { + await _output.Completion.ConfigureAwait(false); + } + + var details = JsonSerializer.SerializeToElement(new + { + exceptionType = exception.GetType().FullName + }); + await EmitAsync( + message.WithError(new FlowError( + "node.processing_failed", + exception.Message, + "processing", + exception is TimeoutException, + details)), + Stopping) + .ConfigureAwait(false); + } + } + + private async Task CompleteWhenDrainedAsync() + { + try + { + await _processor.Completion.ConfigureAwait(false); + await OnInputCompletedAsync().ConfigureAwait(false); + + Interlocked.Exchange(ref _outputShutdownStarted, 1); + CompleteOutputs(); + _events.Complete(); + + var completions = new List { _output.Completion, _events.Completion }; + completions.AddRange(_extraOutputs.Select(static output => output.Completion)); + await Task.WhenAll(completions).ConfigureAwait(false); + _completion.TrySetResult(); + } + catch (Exception exception) + { + var unwrapped = Unwrap(exception); + Interlocked.Exchange(ref _outputShutdownStarted, 1); + _stopping.Cancel(); + FaultOutputs(unwrapped); + _events.Complete(); + _completion.TrySetException(unwrapped); + } + } + + private async Task ObserveOutputTerminationAsync(IDataflowBlock output) + { + try + { + await output.Completion.ConfigureAwait(false); + if (Volatile.Read(ref _outputShutdownStarted) == 0 && + !_processor.Completion.IsCompleted) + { + FaultProcessor(new InvalidOperationException( + "A node data output completed before node processing stopped.")); + } + } + catch (Exception exception) + { + FaultProcessor(Unwrap(exception)); + } + } + + private void FaultProcessor(Exception exception) + { + if (_completion.Task.IsCompleted) + { + return; + } + + _stopping.Cancel(); + try + { + ((IDataflowBlock)_processor).Fault(exception); + } + catch + { + // The processor may already be terminal; its completion remains authoritative. + } + } + + private void CompleteOutputs() + { + _output.Complete(); + foreach (var output in _extraOutputs) + { + output.Complete(); + } + } + + private void FaultOutputs(Exception exception) + { + _output.Fault(exception); + foreach (var output in _extraOutputs) + { + output.Fault(exception); + } + } + + private async ValueTask DisposeOutputsAsync() + { + await _output.DisposeAsync().ConfigureAwait(false); + foreach (var output in _extraOutputs.Cast()) + { + await output.DisposeAsync().ConfigureAwait(false); + } + } + + private static async ValueTask ThrowOutputUnavailableAsync(IDataflowBlock output) + { + if (output.Completion.IsFaulted) + { + await output.Completion.ConfigureAwait(false); + } + + throw new InvalidOperationException("The node data output is no longer accepting messages."); + } + + private static Exception Unwrap(Exception exception) + => exception is AggregateException aggregate + ? aggregate.GetBaseException() + : exception; +} diff --git a/src/Core/Foundation/FluxFlow.Nodes/FlowValueSource.cs b/src/Core/Foundation/FluxFlow.Nodes/FlowValueSource.cs new file mode 100644 index 00000000..487b3603 --- /dev/null +++ b/src/Core/Foundation/FluxFlow.Nodes/FlowValueSource.cs @@ -0,0 +1,314 @@ +using System.Threading.Tasks.Dataflow; +using FluxFlow.Data; + +namespace FluxFlow.Nodes; + +/// +/// Base for a zero-input source. Normal data outputs are bounded and reliable; +/// events remain a best-effort observation stream. +/// +public abstract class FlowSource : IFlowSource +{ + private readonly FlowOutput _output; + private readonly BroadcastBlock _events; + private readonly List _extraOutputs = []; + private readonly CancellationTokenSource _stopping = new(); + private readonly TaskCompletionSource _completion = + new(TaskCreationOptions.RunContinuationsAsynchronously); + private readonly int _outputCapacity; + private Exception? _outputFailure; + private int _outputShutdownStarted; + private int _started; + private int _disposed; + + protected FlowSource(FlowSourceOptions? options = null) + { + options ??= new FlowSourceOptions(); + if (options.OutputCapacity <= 0) + { + throw new ArgumentOutOfRangeException( + nameof(options), + "OutputCapacity must be greater than zero."); + } + + _outputCapacity = options.OutputCapacity; + _output = CreateOutput(); + _events = new BroadcastBlock(static value => value); + _ = ObserveOutputTerminationAsync(_output); + } + + public ISourceBlock Output => _output; + + public ISourceBlock Events => _events; + + public Task Completion => _completion.Task; + + /// Signaled when the source is asked to stop. + protected CancellationToken Stopping => _stopping.Token; + + public Task StartAsync(CancellationToken cancellationToken = default) + { + if (cancellationToken.IsCancellationRequested) + { + return Task.FromCanceled(cancellationToken); + } + + if (Interlocked.Exchange(ref _started, 1) != 0) + { + return Task.CompletedTask; + } + + _ = ProduceAsync(); + return Task.CompletedTask; + } + + /// + /// Produce messages via until this returns or + /// is canceled. + /// + protected abstract Task RunAsync(CancellationToken cancellationToken); + + protected async ValueTask EmitAsync( + FlowMessage message, + CancellationToken cancellationToken = default) + { + if (await _output.SendAsync(message, cancellationToken).ConfigureAwait(false)) + { + return; + } + + await ThrowOutputUnavailableAsync(_output).ConfigureAwait(false); + } + + /// + /// Reliably accepts a value on an additional output created by . + /// + protected static async ValueTask EmitAsync( + FlowOutput output, + T value, + CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(output); + if (await output.SendAsync(value, cancellationToken).ConfigureAwait(false)) + { + return; + } + + await ThrowOutputUnavailableAsync(output).ConfigureAwait(false); + } + + /// Creates an additional bounded reliable data output owned by this source. + protected FlowOutput AddOutput() + { + var output = CreateOutput(); + _extraOutputs.Add(output); + _ = ObserveOutputTerminationAsync(output); + return output; + } + + protected ValueTask EmitErrorAsync( + FlowError error, + CancellationToken cancellationToken = default) + => EmitAsync(FlowMessage.CreateError(error), cancellationToken); + + protected bool EmitEvent(FlowEvent @event) => _events.Post(@event); + + protected bool EmitEvent(FlowMessage @event) => _events.Post(@event); + + public void Complete() => _stopping.Cancel(); + + public void Fault(Exception exception) + { + ArgumentNullException.ThrowIfNull(exception); + Interlocked.Exchange(ref _outputShutdownStarted, 1); + _stopping.Cancel(); + FaultOutputs(exception); + _events.Complete(); + _completion.TrySetException(exception); + } + + public async ValueTask DisposeAsync() + { + if (Interlocked.Exchange(ref _disposed, 1) != 0) + { + return; + } + + _stopping.Cancel(); + if (Volatile.Read(ref _started) == 0) + { + try + { + Interlocked.Exchange(ref _outputShutdownStarted, 1); + await CompleteAndAwaitOutputsAsync().ConfigureAwait(false); + _completion.TrySetResult(); + } + catch (Exception exception) + { + var unwrapped = Unwrap(exception); + Interlocked.Exchange(ref _outputShutdownStarted, 1); + FaultOutputs(unwrapped); + _events.Complete(); + _completion.TrySetException(unwrapped); + } + } + + try + { + await Completion.ConfigureAwait(false); + } + catch + { + // Completion remains the authoritative fault surface. + } + + try + { + await OnDisposeAsync().ConfigureAwait(false); + } + finally + { + try + { + await DisposeOutputsAsync().ConfigureAwait(false); + } + finally + { + _stopping.Dispose(); + } + } + } + + protected virtual ValueTask OnDisposeAsync() => ValueTask.CompletedTask; + + private FlowOutput CreateOutput() + => new(new FlowOutputOptions { Capacity = _outputCapacity }); + + private async Task ProduceAsync() + { + try + { + await RunAsync(_stopping.Token).ConfigureAwait(false); + ThrowIfOutputFailed(); + Interlocked.Exchange(ref _outputShutdownStarted, 1); + await CompleteAndAwaitOutputsAsync().ConfigureAwait(false); + _completion.TrySetResult(); + } + catch (OperationCanceledException) when (_stopping.IsCancellationRequested) + { + try + { + ThrowIfOutputFailed(); + Interlocked.Exchange(ref _outputShutdownStarted, 1); + await CompleteAndAwaitOutputsAsync().ConfigureAwait(false); + _completion.TrySetResult(); + } + catch (Exception exception) + { + var unwrapped = Unwrap(exception); + Interlocked.Exchange(ref _outputShutdownStarted, 1); + FaultOutputs(unwrapped); + _events.Complete(); + _completion.TrySetException(unwrapped); + } + } + catch (Exception exception) + { + var unwrapped = Unwrap(exception); + Interlocked.Exchange(ref _outputShutdownStarted, 1); + FaultOutputs(unwrapped); + _events.Complete(); + _completion.TrySetException(unwrapped); + } + } + + private async Task ObserveOutputTerminationAsync(IDataflowBlock output) + { + try + { + await output.Completion.ConfigureAwait(false); + if (Volatile.Read(ref _outputShutdownStarted) == 0 && + !_completion.Task.IsCompleted) + { + RecordOutputFailure(new InvalidOperationException( + "A source data output completed before source production stopped.")); + } + } + catch (Exception exception) + { + RecordOutputFailure(Unwrap(exception)); + } + } + + private void RecordOutputFailure(Exception exception) + { + if (_completion.Task.IsCompleted) + { + return; + } + + Interlocked.CompareExchange(ref _outputFailure, exception, null); + _stopping.Cancel(); + } + + private void ThrowIfOutputFailed() + { + var failure = Volatile.Read(ref _outputFailure); + if (failure is not null) + { + throw failure; + } + } + + private async Task CompleteAndAwaitOutputsAsync() + { + CompleteOutputs(); + _events.Complete(); + + var completions = new List { _output.Completion, _events.Completion }; + completions.AddRange(_extraOutputs.Select(static output => output.Completion)); + await Task.WhenAll(completions).ConfigureAwait(false); + } + + private void CompleteOutputs() + { + _output.Complete(); + foreach (var output in _extraOutputs) + { + output.Complete(); + } + } + + private void FaultOutputs(Exception exception) + { + _output.Fault(exception); + foreach (var output in _extraOutputs) + { + output.Fault(exception); + } + } + + private async ValueTask DisposeOutputsAsync() + { + await _output.DisposeAsync().ConfigureAwait(false); + foreach (var output in _extraOutputs.Cast()) + { + await output.DisposeAsync().ConfigureAwait(false); + } + } + + private static async ValueTask ThrowOutputUnavailableAsync(IDataflowBlock output) + { + if (output.Completion.IsFaulted) + { + await output.Completion.ConfigureAwait(false); + } + + throw new InvalidOperationException("The source data output is no longer accepting messages."); + } + + private static Exception Unwrap(Exception exception) + => exception is AggregateException aggregate + ? aggregate.GetBaseException() + : exception; +} diff --git a/src/FluxFlow.Nodes/FluxFlow.Nodes.csproj b/src/Core/Foundation/FluxFlow.Nodes/FluxFlow.Nodes.csproj similarity index 77% rename from src/FluxFlow.Nodes/FluxFlow.Nodes.csproj rename to src/Core/Foundation/FluxFlow.Nodes/FluxFlow.Nodes.csproj index 0f7df56f..a8c389c5 100644 --- a/src/FluxFlow.Nodes/FluxFlow.Nodes.csproj +++ b/src/Core/Foundation/FluxFlow.Nodes/FluxFlow.Nodes.csproj @@ -5,11 +5,11 @@ FluxFlow.Nodes FluxFlow.Nodes FluxFlow.Nodes - 4.0.0 + 5.0.0-rc.1 Minimal typed TPL Dataflow node foundation with transport-neutral FlowError and exact immutable FlowContent contracts. Nodes run standalone; no engine required. workflow;dataflow;tpl;nodes;data;content README.md - Owns the transport-neutral FluxFlow.Data namespace alongside the node foundation, removing a package boundary while preserving source-level type names. + Breaking release: node and source event ports carry canonical FlowMessage envelopes instead of FlowEvent. FlowEvent remains an authoring/access helper; rebuild event consumers against this major version. true diff --git a/src/FluxFlow.Nodes/IFlowNode.cs b/src/Core/Foundation/FluxFlow.Nodes/IFlowNode.cs similarity index 100% rename from src/FluxFlow.Nodes/IFlowNode.cs rename to src/Core/Foundation/FluxFlow.Nodes/IFlowNode.cs diff --git a/src/Core/Foundation/FluxFlow.Nodes/IFlowSignalTarget.cs b/src/Core/Foundation/FluxFlow.Nodes/IFlowSignalTarget.cs new file mode 100644 index 00000000..b8472731 --- /dev/null +++ b/src/Core/Foundation/FluxFlow.Nodes/IFlowSignalTarget.cs @@ -0,0 +1,20 @@ +namespace FluxFlow.Nodes; + +public interface IFlowSignalTarget +{ + Task Completion { get; } + + ValueTask SendAsync( + FlowMessage signal, + CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(signal); + return signal.IsError + ? SendAsync(signal.ConvertError(), cancellationToken) + : SendAsync(signal.ConvertValue(signal.Value!), cancellationToken); + } + + ValueTask SendAsync( + FlowMessage signal, + CancellationToken cancellationToken = default); +} diff --git a/src/FluxFlow.Nodes/MessageId.cs b/src/Core/Foundation/FluxFlow.Nodes/MessageId.cs similarity index 100% rename from src/FluxFlow.Nodes/MessageId.cs rename to src/Core/Foundation/FluxFlow.Nodes/MessageId.cs diff --git a/src/FluxFlow.Nodes/README.md b/src/Core/Foundation/FluxFlow.Nodes/README.md similarity index 100% rename from src/FluxFlow.Nodes/README.md rename to src/Core/Foundation/FluxFlow.Nodes/README.md diff --git a/src/FluxFlow.Nodes/TraceId.cs b/src/Core/Foundation/FluxFlow.Nodes/TraceId.cs similarity index 100% rename from src/FluxFlow.Nodes/TraceId.cs rename to src/Core/Foundation/FluxFlow.Nodes/TraceId.cs diff --git a/src/FluxFlow.Engine.DurableInput.SqlFile/FluxFlow.Engine.DurableInput.SqlFile.csproj b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/FluxFlow.Engine.DurableInput.SqlFile.csproj similarity index 77% rename from src/FluxFlow.Engine.DurableInput.SqlFile/FluxFlow.Engine.DurableInput.SqlFile.csproj rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/FluxFlow.Engine.DurableInput.SqlFile.csproj index 6f5bdc9d..0888e31e 100644 --- a/src/FluxFlow.Engine.DurableInput.SqlFile/FluxFlow.Engine.DurableInput.SqlFile.csproj +++ b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/FluxFlow.Engine.DurableInput.SqlFile.csproj @@ -5,11 +5,11 @@ FluxFlow.Engine.DurableInput.SqlFile FluxFlow.Engine.DurableInput.SqlFile FluxFlow.Engine.DurableInput.SqlFile - 2.0.0-rc.1 + 3.0.0-rc.2 SQLite single-file durable input store for FluxFlow.Engine.DurableInput. workflow;dataflow;durability;inbox;sqlite;at-least-once README.md - Adds transactional bounded retention of delivered and dead-lettered durable inputs without a schema change. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. Requires the corrected passive-observation runtime candidate. true diff --git a/src/FluxFlow.Engine.DurableInput.SqlFile/README.md b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/README.md similarity index 100% rename from src/FluxFlow.Engine.DurableInput.SqlFile/README.md rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/README.md diff --git a/src/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputSchema.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputSchema.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputSchema.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputSchema.cs diff --git a/src/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputServiceCollectionExtensions.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputServiceCollectionExtensions.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputServiceCollectionExtensions.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputServiceCollectionExtensions.cs diff --git a/src/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStore.DeadLetters.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStore.DeadLetters.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStore.DeadLetters.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStore.DeadLetters.cs diff --git a/src/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStore.Retention.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStore.Retention.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStore.Retention.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStore.Retention.cs diff --git a/src/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStore.Status.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStore.Status.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStore.Status.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStore.Status.cs diff --git a/src/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStore.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStore.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStore.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStore.cs diff --git a/src/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStoreOptions.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStoreOptions.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStoreOptions.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStoreOptions.cs diff --git a/src/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStoreOptionsBuilder.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStoreOptionsBuilder.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStoreOptionsBuilder.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/SqlFileDurableInputStoreOptionsBuilder.cs diff --git a/src/FluxFlow.Engine.DurableInput.TSql/FluxFlow.Engine.DurableInput.TSql.csproj b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/FluxFlow.Engine.DurableInput.TSql.csproj similarity index 80% rename from src/FluxFlow.Engine.DurableInput.TSql/FluxFlow.Engine.DurableInput.TSql.csproj rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/FluxFlow.Engine.DurableInput.TSql.csproj index aa8d35a2..fa506f87 100644 --- a/src/FluxFlow.Engine.DurableInput.TSql/FluxFlow.Engine.DurableInput.TSql.csproj +++ b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/FluxFlow.Engine.DurableInput.TSql.csproj @@ -5,11 +5,11 @@ FluxFlow.Engine.DurableInput.TSql FluxFlow.Engine.DurableInput.TSql FluxFlow.Engine.DurableInput.TSql - 2.0.0-rc.1 + 3.0.0-rc.2 Production networked T-SQL durable-input, lease-renewal, dead-letter inspection, and generation-protected replay provider. workflow;dataflow;durability;inbox;tsql;at-least-once;dead-letter README.md - Adds transactional bounded retention of delivered and dead-lettered durable inputs using direct parameterized SQL without a schema change. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. Requires the corrected passive-observation runtime candidate. true diff --git a/src/FluxFlow.Engine.DurableInput.TSql/README.md b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/README.md similarity index 100% rename from src/FluxFlow.Engine.DurableInput.TSql/README.md rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/README.md diff --git a/src/FluxFlow.Engine.DurableInput.TSql/RelationalDurableInputRows.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/RelationalDurableInputRows.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput.TSql/RelationalDurableInputRows.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/RelationalDurableInputRows.cs diff --git a/src/FluxFlow.Engine.DurableInput.TSql/RelationalDurableInputSchema.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/RelationalDurableInputSchema.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput.TSql/RelationalDurableInputSchema.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/RelationalDurableInputSchema.cs diff --git a/src/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputSchemaManagement.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputSchemaManagement.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputSchemaManagement.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputSchemaManagement.cs diff --git a/src/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputServiceCollectionExtensions.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputServiceCollectionExtensions.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputServiceCollectionExtensions.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputServiceCollectionExtensions.cs diff --git a/src/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStore.DeadLetters.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStore.DeadLetters.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStore.DeadLetters.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStore.DeadLetters.cs diff --git a/src/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStore.Retention.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStore.Retention.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStore.Retention.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStore.Retention.cs diff --git a/src/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStore.Status.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStore.Status.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStore.Status.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStore.Status.cs diff --git a/src/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStore.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStore.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStore.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStore.cs diff --git a/src/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStoreOptions.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStoreOptions.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStoreOptions.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStoreOptions.cs diff --git a/src/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStoreOptionsBuilder.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStoreOptionsBuilder.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStoreOptionsBuilder.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/TSqlDurableInputStoreOptionsBuilder.cs diff --git a/src/FluxFlow.Engine.DurableInput/DurableApplicationInputs.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableApplicationInputs.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput/DurableApplicationInputs.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableApplicationInputs.cs diff --git a/src/FluxFlow.Engine.DurableInput/DurableInputCompletion.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableInputCompletion.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput/DurableInputCompletion.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableInputCompletion.cs diff --git a/src/FluxFlow.Engine.DurableInput/DurableInputContractRegistry.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableInputContractRegistry.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput/DurableInputContractRegistry.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableInputContractRegistry.cs diff --git a/src/FluxFlow.Engine.DurableInput/DurableInputContracts.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableInputContracts.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput/DurableInputContracts.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableInputContracts.cs diff --git a/src/FluxFlow.Engine.DurableInput/DurableInputDeadLetterContracts.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableInputDeadLetterContracts.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput/DurableInputDeadLetterContracts.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableInputDeadLetterContracts.cs diff --git a/src/FluxFlow.Engine.DurableInput/DurableInputDispatcher.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableInputDispatcher.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput/DurableInputDispatcher.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableInputDispatcher.cs diff --git a/src/FluxFlow.Engine.DurableInput/DurableInputInstrumentation.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableInputInstrumentation.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput/DurableInputInstrumentation.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableInputInstrumentation.cs diff --git a/src/FluxFlow.Engine.DurableInput/DurableInputOptions.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableInputOptions.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput/DurableInputOptions.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableInputOptions.cs diff --git a/src/FluxFlow.Engine.DurableInput/DurableInputRetentionContracts.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableInputRetentionContracts.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput/DurableInputRetentionContracts.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableInputRetentionContracts.cs diff --git a/src/FluxFlow.Engine.DurableInput/DurableInputServiceCollectionExtensions.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableInputServiceCollectionExtensions.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput/DurableInputServiceCollectionExtensions.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableInputServiceCollectionExtensions.cs diff --git a/src/FluxFlow.Engine.DurableInput/DurableInputStatusContracts.cs b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableInputStatusContracts.cs similarity index 100% rename from src/FluxFlow.Engine.DurableInput/DurableInputStatusContracts.cs rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput/DurableInputStatusContracts.cs diff --git a/src/FluxFlow.Engine.DurableInput/FluxFlow.Engine.DurableInput.csproj b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput/FluxFlow.Engine.DurableInput.csproj similarity index 73% rename from src/FluxFlow.Engine.DurableInput/FluxFlow.Engine.DurableInput.csproj rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput/FluxFlow.Engine.DurableInput.csproj index b9865f2f..28f766b6 100644 --- a/src/FluxFlow.Engine.DurableInput/FluxFlow.Engine.DurableInput.csproj +++ b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput/FluxFlow.Engine.DurableInput.csproj @@ -5,11 +5,11 @@ FluxFlow.Engine.DurableInput FluxFlow.Engine.DurableInput FluxFlow.Engine.DurableInput - 2.0.0-rc.1 + 3.0.0-rc.2 Optional provider-neutral durable input delivery for FluxFlow.Engine with leased at-least-once dispatch. workflow;dataflow;durability;inbox;at-least-once README.md - Adds immutable contracts for explicit, address-scoped, bounded retention of delivered and dead-lettered durable inputs. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. Requires the corrected passive-observation runtime candidate. true @@ -24,7 +24,7 @@ - + diff --git a/src/FluxFlow.Engine.DurableInput/README.md b/src/Engine/DurableInput/FluxFlow.Engine.DurableInput/README.md similarity index 100% rename from src/FluxFlow.Engine.DurableInput/README.md rename to src/Engine/DurableInput/FluxFlow.Engine.DurableInput/README.md diff --git a/src/FluxFlow.Engine.DurableOutput.SqlFile/FluxFlow.Engine.DurableOutput.SqlFile.csproj b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/FluxFlow.Engine.DurableOutput.SqlFile.csproj similarity index 80% rename from src/FluxFlow.Engine.DurableOutput.SqlFile/FluxFlow.Engine.DurableOutput.SqlFile.csproj rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/FluxFlow.Engine.DurableOutput.SqlFile.csproj index 028d6201..62577406 100644 --- a/src/FluxFlow.Engine.DurableOutput.SqlFile/FluxFlow.Engine.DurableOutput.SqlFile.csproj +++ b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/FluxFlow.Engine.DurableOutput.SqlFile.csproj @@ -5,11 +5,11 @@ FluxFlow.Engine.DurableOutput.SqlFile FluxFlow.Engine.DurableOutput.SqlFile FluxFlow.Engine.DurableOutput.SqlFile - 4.0.0-rc.1 + 5.0.0-rc.2 Production SQLite single-file durable-output capture, renewable leased delivery, dead-letter, and replay store for local FluxFlow hosts. workflow;dataflow;durability;outbox;sqlite;at-least-once;lease-renewal;dead-letter;replay README.md - Breaking with core 3.0: implements exact-token durable-output lease renewal with a direct transactional update and no schema or dependency change. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. Requires the corrected passive-observation runtime candidate. true diff --git a/src/FluxFlow.Engine.DurableOutput.SqlFile/README.md b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/README.md similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.SqlFile/README.md rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/README.md diff --git a/src/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputDeliverySchema.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputDeliverySchema.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputDeliverySchema.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputDeliverySchema.cs diff --git a/src/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputSchema.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputSchema.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputSchema.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputSchema.cs diff --git a/src/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputServiceCollectionExtensions.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputServiceCollectionExtensions.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputServiceCollectionExtensions.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputServiceCollectionExtensions.cs diff --git a/src/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.DeadLetters.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.DeadLetters.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.DeadLetters.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.DeadLetters.cs diff --git a/src/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.Delivery.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.Delivery.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.Delivery.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.Delivery.cs diff --git a/src/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.Retention.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.Retention.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.Retention.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.Retention.cs diff --git a/src/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.Status.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.Status.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.Status.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.Status.cs diff --git a/src/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStore.cs diff --git a/src/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStoreOptions.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStoreOptions.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStoreOptions.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStoreOptions.cs diff --git a/src/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStoreOptionsBuilder.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStoreOptionsBuilder.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStoreOptionsBuilder.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/SqlFileDurableOutputStoreOptionsBuilder.cs diff --git a/src/FluxFlow.Engine.DurableOutput.TSql/FluxFlow.Engine.DurableOutput.TSql.csproj b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/FluxFlow.Engine.DurableOutput.TSql.csproj similarity index 80% rename from src/FluxFlow.Engine.DurableOutput.TSql/FluxFlow.Engine.DurableOutput.TSql.csproj rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/FluxFlow.Engine.DurableOutput.TSql.csproj index c44146a1..fc9ba943 100644 --- a/src/FluxFlow.Engine.DurableOutput.TSql/FluxFlow.Engine.DurableOutput.TSql.csproj +++ b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/FluxFlow.Engine.DurableOutput.TSql.csproj @@ -5,11 +5,11 @@ FluxFlow.Engine.DurableOutput.TSql FluxFlow.Engine.DurableOutput.TSql FluxFlow.Engine.DurableOutput.TSql - 3.0.0-rc.1 + 4.0.0-rc.2 Production networked T-SQL durable-output capture, renewable leased delivery, dead-letter inspection, and generation-protected replay provider. workflow;dataflow;durability;outbox;tsql;at-least-once;lease-renewal;dead-letter README.md - Breaking with core 3.0: implements exact-token lease renewal and cooperative blocked-command cancellation with direct parameterized SQL and no schema or dependency change. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. Requires the corrected passive-observation runtime candidate. true diff --git a/src/FluxFlow.Engine.DurableOutput.TSql/README.md b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/README.md similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.TSql/README.md rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/README.md diff --git a/src/FluxFlow.Engine.DurableOutput.TSql/RelationalDurableOutputRows.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/RelationalDurableOutputRows.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.TSql/RelationalDurableOutputRows.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/RelationalDurableOutputRows.cs diff --git a/src/FluxFlow.Engine.DurableOutput.TSql/RelationalDurableOutputSchema.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/RelationalDurableOutputSchema.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.TSql/RelationalDurableOutputSchema.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/RelationalDurableOutputSchema.cs diff --git a/src/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputSchemaManagement.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputSchemaManagement.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputSchemaManagement.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputSchemaManagement.cs diff --git a/src/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputServiceCollectionExtensions.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputServiceCollectionExtensions.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputServiceCollectionExtensions.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputServiceCollectionExtensions.cs diff --git a/src/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.DeadLetters.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.DeadLetters.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.DeadLetters.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.DeadLetters.cs diff --git a/src/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.Delivery.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.Delivery.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.Delivery.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.Delivery.cs diff --git a/src/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.Retention.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.Retention.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.Retention.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.Retention.cs diff --git a/src/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.Status.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.Status.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.Status.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.Status.cs diff --git a/src/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStore.cs diff --git a/src/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStoreOptions.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStoreOptions.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStoreOptions.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStoreOptions.cs diff --git a/src/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStoreOptionsBuilder.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStoreOptionsBuilder.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStoreOptionsBuilder.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/TSqlDurableOutputStoreOptionsBuilder.cs diff --git a/src/FluxFlow.Engine.DurableOutput/DurableOutputCaptureResolver.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputCaptureResolver.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput/DurableOutputCaptureResolver.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputCaptureResolver.cs diff --git a/src/FluxFlow.Engine.DurableOutput/DurableOutputContracts.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputContracts.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput/DurableOutputContracts.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputContracts.cs diff --git a/src/FluxFlow.Engine.DurableOutput/DurableOutputDeadLetterContracts.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputDeadLetterContracts.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput/DurableOutputDeadLetterContracts.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputDeadLetterContracts.cs diff --git a/src/FluxFlow.Engine.DurableOutput/DurableOutputDeliveryContracts.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputDeliveryContracts.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput/DurableOutputDeliveryContracts.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputDeliveryContracts.cs diff --git a/src/FluxFlow.Engine.DurableOutput/DurableOutputDeliveryDispatcher.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputDeliveryDispatcher.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput/DurableOutputDeliveryDispatcher.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputDeliveryDispatcher.cs diff --git a/src/FluxFlow.Engine.DurableOutput/DurableOutputDeliveryOptions.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputDeliveryOptions.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput/DurableOutputDeliveryOptions.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputDeliveryOptions.cs diff --git a/src/FluxFlow.Engine.DurableOutput/DurableOutputDeliveryServiceCollectionExtensions.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputDeliveryServiceCollectionExtensions.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput/DurableOutputDeliveryServiceCollectionExtensions.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputDeliveryServiceCollectionExtensions.cs diff --git a/src/FluxFlow.Engine.DurableOutput/DurableOutputInstrumentation.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputInstrumentation.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput/DurableOutputInstrumentation.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputInstrumentation.cs diff --git a/src/FluxFlow.Engine.DurableOutput/DurableOutputRegistration.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputRegistration.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput/DurableOutputRegistration.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputRegistration.cs diff --git a/src/FluxFlow.Engine.DurableOutput/DurableOutputRetentionContracts.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputRetentionContracts.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput/DurableOutputRetentionContracts.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputRetentionContracts.cs diff --git a/src/FluxFlow.Engine.DurableOutput/DurableOutputServiceCollectionExtensions.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputServiceCollectionExtensions.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput/DurableOutputServiceCollectionExtensions.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputServiceCollectionExtensions.cs diff --git a/src/FluxFlow.Engine.DurableOutput/DurableOutputStatusContracts.cs b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputStatusContracts.cs similarity index 100% rename from src/FluxFlow.Engine.DurableOutput/DurableOutputStatusContracts.cs rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/DurableOutputStatusContracts.cs diff --git a/src/FluxFlow.Engine.DurableOutput/FluxFlow.Engine.DurableOutput.csproj b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/FluxFlow.Engine.DurableOutput.csproj similarity index 75% rename from src/FluxFlow.Engine.DurableOutput/FluxFlow.Engine.DurableOutput.csproj rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/FluxFlow.Engine.DurableOutput.csproj index 5176f5ea..982056d5 100644 --- a/src/FluxFlow.Engine.DurableOutput/FluxFlow.Engine.DurableOutput.csproj +++ b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/FluxFlow.Engine.DurableOutput.csproj @@ -5,11 +5,11 @@ FluxFlow.Engine.DurableOutput FluxFlow.Engine.DurableOutput FluxFlow.Engine.DurableOutput - 4.0.0-rc.1 + 5.0.0-rc.2 Optional provider-neutral durable output capture, renewable leased at-least-once delivery, and dead-letter operations for FluxFlow.Engine. workflow;dataflow;durability;outbox;capture;at-least-once;lease-renewal;dead-letter;replay README.md - Breaking: adds exact-token renewal to the cohesive delivery-store contract, replaces the four-argument options constructor, and requires a flat renewal interval; custom providers and direct options callers must update. No dependency was added. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. Requires the corrected passive-observation runtime candidate. true @@ -24,7 +24,7 @@ - + diff --git a/src/FluxFlow.Engine.DurableOutput/README.md b/src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/README.md similarity index 100% rename from src/FluxFlow.Engine.DurableOutput/README.md rename to src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/README.md diff --git a/src/FluxFlow.Engine.HealthChecks/FluxFlow.Engine.HealthChecks.csproj b/src/Engine/Health/FluxFlow.Engine.HealthChecks/FluxFlow.Engine.HealthChecks.csproj similarity index 73% rename from src/FluxFlow.Engine.HealthChecks/FluxFlow.Engine.HealthChecks.csproj rename to src/Engine/Health/FluxFlow.Engine.HealthChecks/FluxFlow.Engine.HealthChecks.csproj index f61de627..222e9170 100644 --- a/src/FluxFlow.Engine.HealthChecks/FluxFlow.Engine.HealthChecks.csproj +++ b/src/Engine/Health/FluxFlow.Engine.HealthChecks/FluxFlow.Engine.HealthChecks.csproj @@ -5,11 +5,11 @@ FluxFlow.Engine.HealthChecks FluxFlow.Engine.HealthChecks FluxFlow.Engine.HealthChecks - 1.0.0-rc.1 + 2.0.0-rc.2 Optional standard .NET readiness health check for FluxFlow application lifecycle and revision state. workflow;dataflow;health-checks;readiness;hosting;operations README.md - Adds one idempotent standard readiness check over existing FluxFlow application state with bounded privacy-safe metadata. + Breaking dependency upgrade: rebuilt for the canonical runtime and event contracts. Adopt the coordinated package set and recompile consumers; no legacy compatibility transport is provided. Requires the corrected passive-observation runtime candidate. https://github.com/araxis/FluxFlow https://github.com/araxis/FluxFlow true @@ -24,7 +24,7 @@ - + diff --git a/src/FluxFlow.Engine.HealthChecks/FluxFlowApplicationHealthCheck.cs b/src/Engine/Health/FluxFlow.Engine.HealthChecks/FluxFlowApplicationHealthCheck.cs similarity index 100% rename from src/FluxFlow.Engine.HealthChecks/FluxFlowApplicationHealthCheck.cs rename to src/Engine/Health/FluxFlow.Engine.HealthChecks/FluxFlowApplicationHealthCheck.cs diff --git a/src/FluxFlow.Engine.HealthChecks/FluxFlowHealthChecksBuilderExtensions.cs b/src/Engine/Health/FluxFlow.Engine.HealthChecks/FluxFlowHealthChecksBuilderExtensions.cs similarity index 100% rename from src/FluxFlow.Engine.HealthChecks/FluxFlowHealthChecksBuilderExtensions.cs rename to src/Engine/Health/FluxFlow.Engine.HealthChecks/FluxFlowHealthChecksBuilderExtensions.cs diff --git a/src/FluxFlow.Engine.HealthChecks/README.md b/src/Engine/Health/FluxFlow.Engine.HealthChecks/README.md similarity index 100% rename from src/FluxFlow.Engine.HealthChecks/README.md rename to src/Engine/Health/FluxFlow.Engine.HealthChecks/README.md diff --git a/src/FluxFlow.Engine/ApplicationDefinitionSources.cs b/src/Engine/Runtime/FluxFlow.Engine/ApplicationDefinitionSources.cs similarity index 100% rename from src/FluxFlow.Engine/ApplicationDefinitionSources.cs rename to src/Engine/Runtime/FluxFlow.Engine/ApplicationDefinitionSources.cs diff --git a/src/FluxFlow.Engine/ApplicationPorts.cs b/src/Engine/Runtime/FluxFlow.Engine/ApplicationPorts.cs similarity index 83% rename from src/FluxFlow.Engine/ApplicationPorts.cs rename to src/Engine/Runtime/FluxFlow.Engine/ApplicationPorts.cs index b0b7fa2d..32051e06 100644 --- a/src/FluxFlow.Engine/ApplicationPorts.cs +++ b/src/Engine/Runtime/FluxFlow.Engine/ApplicationPorts.cs @@ -24,9 +24,11 @@ internal ApplicationPorts(Func getRuntime) public ISourceBlock Rejections => Runtime.Rejections; - public ISourceBlock> SystemEvents => Runtime.SystemEvents; + public ISourceBlock SystemEvents => Runtime.SystemEvents; - public ISourceBlock> Diagnostics => Runtime.Diagnostics; + public ISourceBlock Diagnostics => Runtime.Diagnostics; + + public ISourceBlock Activity => Runtime.Activity; public Task Completion => Runtime.Completion; @@ -36,12 +38,24 @@ public ValueTask SendAsync( CancellationToken cancellationToken = default) => SendAsync(ApplicationAddress.Parse(input), message, cancellationToken); + public ValueTask SendAsync( + string input, + FlowMessage message, + CancellationToken cancellationToken = default) + => SendAsync(ApplicationAddress.Parse(input), message, cancellationToken); + public ValueTask SendAsync( ApplicationAddress input, FlowMessage message, CancellationToken cancellationToken = default) => Runtime.SendAsync(input, message, cancellationToken); + public ValueTask SendAsync( + ApplicationAddress input, + FlowMessage message, + CancellationToken cancellationToken = default) + => Runtime.SendAsync(input, message, cancellationToken); + public ValueTask SendAsync( InputPortHandle input, FlowMessage message, @@ -51,6 +65,15 @@ public ValueTask SendAsync( return SendAsync(input.Address, message, cancellationToken); } + public ValueTask SendAsync( + InputPortHandle input, + FlowMessage message, + CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(input); + return SendAsync(input.Address, message, cancellationToken); + } + public ValueTask SendAsync( SignalInputPortHandle input, FlowMessage message, diff --git a/src/FluxFlow.Engine/ApplicationSnapshot.cs b/src/Engine/Runtime/FluxFlow.Engine/ApplicationSnapshot.cs similarity index 100% rename from src/FluxFlow.Engine/ApplicationSnapshot.cs rename to src/Engine/Runtime/FluxFlow.Engine/ApplicationSnapshot.cs diff --git a/src/FluxFlow.Engine/ApplicationState.cs b/src/Engine/Runtime/FluxFlow.Engine/ApplicationState.cs similarity index 100% rename from src/FluxFlow.Engine/ApplicationState.cs rename to src/Engine/Runtime/FluxFlow.Engine/ApplicationState.cs diff --git a/src/FluxFlow.Engine/ApplicationUpdateResult.cs b/src/Engine/Runtime/FluxFlow.Engine/ApplicationUpdateResult.cs similarity index 100% rename from src/FluxFlow.Engine/ApplicationUpdateResult.cs rename to src/Engine/Runtime/FluxFlow.Engine/ApplicationUpdateResult.cs diff --git a/src/Engine/Runtime/FluxFlow.Engine/CompatibilitySuppressions.xml b/src/Engine/Runtime/FluxFlow.Engine/CompatibilitySuppressions.xml new file mode 100644 index 00000000..78c60c48 --- /dev/null +++ b/src/Engine/Runtime/FluxFlow.Engine/CompatibilitySuppressions.xml @@ -0,0 +1,132 @@ + + + + + CP0001 + T:FluxFlow.Engine.Signals.ApplicationDiagnostic + lib/net10.0/FluxFlow.Engine.dll + lib/net10.0/FluxFlow.Engine.dll + true + + + CP0001 + T:FluxFlow.Engine.Signals.ApplicationDiagnosticKind + lib/net10.0/FluxFlow.Engine.dll + lib/net10.0/FluxFlow.Engine.dll + true + + + CP0001 + T:FluxFlow.Engine.Signals.ApplicationDiagnosticLevel + lib/net10.0/FluxFlow.Engine.dll + lib/net10.0/FluxFlow.Engine.dll + true + + + CP0001 + T:FluxFlow.Engine.Signals.ApplicationSystemEvent + lib/net10.0/FluxFlow.Engine.dll + lib/net10.0/FluxFlow.Engine.dll + true + + + CP0001 + T:FluxFlow.Engine.Signals.ApplicationSystemEventCategory + lib/net10.0/FluxFlow.Engine.dll + lib/net10.0/FluxFlow.Engine.dll + true + + + CP0001 + T:FluxFlow.Engine.Signals.SystemEventPublishResult + lib/net10.0/FluxFlow.Engine.dll + lib/net10.0/FluxFlow.Engine.dll + true + + + CP0001 + T:FluxFlow.Engine.Signals.SystemEventPublishStatus + lib/net10.0/FluxFlow.Engine.dll + lib/net10.0/FluxFlow.Engine.dll + true + + + CP0001 + T:FluxFlow.Engine.Signals.ApplicationDiagnostic + lib/net8.0/FluxFlow.Engine.dll + lib/net8.0/FluxFlow.Engine.dll + true + + + CP0001 + T:FluxFlow.Engine.Signals.ApplicationDiagnosticKind + lib/net8.0/FluxFlow.Engine.dll + lib/net8.0/FluxFlow.Engine.dll + true + + + CP0001 + T:FluxFlow.Engine.Signals.ApplicationDiagnosticLevel + lib/net8.0/FluxFlow.Engine.dll + lib/net8.0/FluxFlow.Engine.dll + true + + + CP0001 + T:FluxFlow.Engine.Signals.ApplicationSystemEvent + lib/net8.0/FluxFlow.Engine.dll + lib/net8.0/FluxFlow.Engine.dll + true + + + CP0001 + T:FluxFlow.Engine.Signals.ApplicationSystemEventCategory + lib/net8.0/FluxFlow.Engine.dll + lib/net8.0/FluxFlow.Engine.dll + true + + + CP0001 + T:FluxFlow.Engine.Signals.SystemEventPublishResult + lib/net8.0/FluxFlow.Engine.dll + lib/net8.0/FluxFlow.Engine.dll + true + + + CP0001 + T:FluxFlow.Engine.Signals.SystemEventPublishStatus + lib/net8.0/FluxFlow.Engine.dll + lib/net8.0/FluxFlow.Engine.dll + true + + + CP0002 + M:FluxFlow.Engine.ApplicationPorts.get_Diagnostics + lib/net10.0/FluxFlow.Engine.dll + lib/net10.0/FluxFlow.Engine.dll + true + + + CP0002 + M:FluxFlow.Engine.ApplicationPorts.get_SystemEvents + lib/net10.0/FluxFlow.Engine.dll + lib/net10.0/FluxFlow.Engine.dll + true + + + CP0002 + M:FluxFlow.Engine.ApplicationPorts.get_Diagnostics + lib/net8.0/FluxFlow.Engine.dll + lib/net8.0/FluxFlow.Engine.dll + true + + + CP0002 + M:FluxFlow.Engine.ApplicationPorts.get_SystemEvents + lib/net8.0/FluxFlow.Engine.dll + lib/net8.0/FluxFlow.Engine.dll + true + + diff --git a/src/FluxFlow.Engine/Core/FlowFanoutSource.cs b/src/Engine/Runtime/FluxFlow.Engine/Core/FlowFanoutSource.cs similarity index 100% rename from src/FluxFlow.Engine/Core/FlowFanoutSource.cs rename to src/Engine/Runtime/FluxFlow.Engine/Core/FlowFanoutSource.cs diff --git a/src/Engine/Runtime/FluxFlow.Engine/Events/ApplicationEventAttachment.cs b/src/Engine/Runtime/FluxFlow.Engine/Events/ApplicationEventAttachment.cs new file mode 100644 index 00000000..709fcfbf --- /dev/null +++ b/src/Engine/Runtime/FluxFlow.Engine/Events/ApplicationEventAttachment.cs @@ -0,0 +1,31 @@ +using System.Threading.Tasks.Dataflow; +using FluxFlow.Composition; +using FluxFlow.Nodes; + +namespace FluxFlow.Engine.Events; + +/// Owns only the native links and forwarding blocks for one revision. +internal sealed class ApplicationEventAttachment : IAsyncDisposable +{ + private readonly List _links = []; + private readonly List> _targets = []; + + internal ApplicationEventAttachment(ApplicationEventStream events, string revisionId, + IEnumerable components) + { + foreach (var component in components) + { + var target = new ActionBlock(message => events.Publish(message, revisionId), + new ExecutionDataflowBlockOptions { BoundedCapacity = 256 }); + _targets.Add(target); + _links.Add(component.Activity.LinkTo(target, new DataflowLinkOptions { PropagateCompletion = true })); + } + } + + public async ValueTask DisposeAsync() + { + foreach (var link in _links) link.Dispose(); + foreach (var target in _targets) target.Complete(); + await Task.WhenAll(_targets.Select(target => target.Completion)).ConfigureAwait(false); + } +} diff --git a/src/Engine/Runtime/FluxFlow.Engine/Events/ApplicationEventOptions.cs b/src/Engine/Runtime/FluxFlow.Engine/Events/ApplicationEventOptions.cs new file mode 100644 index 00000000..9bcfb9ba --- /dev/null +++ b/src/Engine/Runtime/FluxFlow.Engine/Events/ApplicationEventOptions.cs @@ -0,0 +1,8 @@ +namespace FluxFlow.Engine.Events; + +/// Bounds the application's live observational feed. History and reporting are consumer-owned. +public sealed record ApplicationEventOptions +{ + public string? Application { get; init; } + public int Capacity { get; init; } = 256; +} diff --git a/src/Engine/Runtime/FluxFlow.Engine/Events/ApplicationEventStream.cs b/src/Engine/Runtime/FluxFlow.Engine/Events/ApplicationEventStream.cs new file mode 100644 index 00000000..e26f6631 --- /dev/null +++ b/src/Engine/Runtime/FluxFlow.Engine/Events/ApplicationEventStream.cs @@ -0,0 +1,46 @@ +using System.Threading.Tasks.Dataflow; +using FluxFlow.Nodes; + +namespace FluxFlow.Engine.Events; + +/// Application-lifetime fan-in of canonical events; no history, queries or report definitions. +internal sealed class ApplicationEventStream : IAsyncDisposable +{ + private readonly BroadcastBlock _events; + private readonly string? _application; + + internal ApplicationEventStream(ApplicationEventOptions options) + { + ArgumentNullException.ThrowIfNull(options); + if (options.Capacity is < 1 or > 65536) + throw new ArgumentOutOfRangeException(nameof(options), "Event capacity must be between one and 65536."); + _application = options.Application; + _events = new BroadcastBlock(static message => message, + new DataflowBlockOptions { BoundedCapacity = options.Capacity }); + } + + internal ISourceBlock Events => _events; + + internal void Publish(FlowMessage message, string? revisionId = null) + { + ArgumentNullException.ThrowIfNull(message); + var headers = message.Headers.ToDictionary(pair => pair.Key, pair => pair.Value, StringComparer.Ordinal); + if (_application is not null) headers[FlowEventHeaders.Application] = _application; + if (revisionId is not null) headers[FlowEventHeaders.Revision] = revisionId; + var observation = message.IsError + ? FlowMessage.RestoreError(message.Error!, message.MessageId, message.TraceId, message.Timestamp, + message.CorrelationId, message.CausationId, headers) + : FlowMessage.Restore(message.Value!, message.MessageId, message.TraceId, message.Timestamp, + message.CorrelationId, message.CausationId, headers); + // Observations never apply backpressure to runtime processing. Rejection is possible at capacity. + _events.Post(observation); + } + + internal void Complete() => _events.Complete(); + + public async ValueTask DisposeAsync() + { + Complete(); + await _events.Completion.ConfigureAwait(false); + } +} diff --git a/src/FluxFlow.Engine/FluxFlow.Engine.csproj b/src/Engine/Runtime/FluxFlow.Engine/FluxFlow.Engine.csproj similarity index 70% rename from src/FluxFlow.Engine/FluxFlow.Engine.csproj rename to src/Engine/Runtime/FluxFlow.Engine/FluxFlow.Engine.csproj index 92b65c5b..020a83b2 100644 --- a/src/FluxFlow.Engine/FluxFlow.Engine.csproj +++ b/src/Engine/Runtime/FluxFlow.Engine/FluxFlow.Engine.csproj @@ -5,10 +5,10 @@ FluxFlow.Engine FluxFlow.Engine FluxFlow.Engine - 8.0.0-rc.1 + 9.0.0-rc.2 Canonical FluxFlow application runtime assembler with transactional revisions, stable addressable ports, conditional routing, system events, and diagnostics. workflow;dataflow;pipeline;flow-engine;tpl - Loads only canonical definitions, owns configuration-tree reconstruction, and consumes public Composition link and resource-registration boundaries. + Breaking release: application, system-event and diagnostic streams carry canonical FlowMessage envelopes. Consumers migrate from the retired Signals payload types; reports, filters and history remain consumer-owned. Fixes passive observation overflow fault propagation and removes redundant canonical observation buffering. https://github.com/araxis/FluxFlow https://github.com/araxis/FluxFlow README.md @@ -31,9 +31,9 @@ - - - + + + diff --git a/src/FluxFlow.Engine/FluxFlowApplication.cs b/src/Engine/Runtime/FluxFlow.Engine/FluxFlowApplication.cs similarity index 97% rename from src/FluxFlow.Engine/FluxFlowApplication.cs rename to src/Engine/Runtime/FluxFlow.Engine/FluxFlowApplication.cs index 9efceb9c..f06c828a 100644 --- a/src/FluxFlow.Engine/FluxFlowApplication.cs +++ b/src/Engine/Runtime/FluxFlow.Engine/FluxFlowApplication.cs @@ -1,4 +1,6 @@ using System.Text.Json; +using System.Threading.Tasks.Dataflow; +using FluxFlow.Nodes; using FluxFlow.Engine.Internal.Revisions; using FluxFlow.Composition.Model; using FluxFlow.Data; @@ -45,6 +47,13 @@ public ApplicationDefinition? CurrentDefinition public ApplicationPorts Ports { get; } + /// + /// Application-lifetime canonical events, including events before activation and across revisions. + /// Use native LinkTo predicates. Delivery is observational: bounded ingress and slow targets can lose events. + /// History, metrics and reports belong to the consumer. The source completes when the application stops. + /// + public ISourceBlock Events => _assembler.Events.Events; + public async ValueTask StartAsync( CancellationToken cancellationToken = default) { diff --git a/src/FluxFlow.Engine/FluxFlowApplicationOptions.cs b/src/Engine/Runtime/FluxFlow.Engine/FluxFlowApplicationOptions.cs similarity index 86% rename from src/FluxFlow.Engine/FluxFlowApplicationOptions.cs rename to src/Engine/Runtime/FluxFlow.Engine/FluxFlowApplicationOptions.cs index f6e5ab47..d7ce1308 100644 --- a/src/FluxFlow.Engine/FluxFlowApplicationOptions.cs +++ b/src/Engine/Runtime/FluxFlow.Engine/FluxFlowApplicationOptions.cs @@ -4,6 +4,8 @@ namespace FluxFlow.Engine; public sealed class FluxFlowApplicationOptions { + public Events.ApplicationEventOptions Events { get; set; } = new(); + public string InitialRevisionId { get; set; } = "initial"; public bool StartWithHost { get; set; } = true; diff --git a/src/FluxFlow.Engine/FluxFlowApplicationServiceCollectionExtensions.cs b/src/Engine/Runtime/FluxFlow.Engine/FluxFlowApplicationServiceCollectionExtensions.cs similarity index 98% rename from src/FluxFlow.Engine/FluxFlowApplicationServiceCollectionExtensions.cs rename to src/Engine/Runtime/FluxFlow.Engine/FluxFlowApplicationServiceCollectionExtensions.cs index fe509195..c4a8c743 100644 --- a/src/FluxFlow.Engine/FluxFlowApplicationServiceCollectionExtensions.cs +++ b/src/Engine/Runtime/FluxFlow.Engine/FluxFlowApplicationServiceCollectionExtensions.cs @@ -81,6 +81,7 @@ private static FluxFlowRegistrationBuilder AddFluxFlowCore( { runtime.InputCapacity = current.Value.InputCapacity; runtime.OutputCapacity = current.Value.OutputCapacity; + runtime.Events = current.Value.Events; }); services.TryAddSingleton(static provider => new FluxFlowApplication( provider.GetRequiredService(), diff --git a/src/FluxFlow.Engine/Hosting/ApplicationRuntimeAssembler.cs b/src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeAssembler.cs similarity index 83% rename from src/FluxFlow.Engine/Hosting/ApplicationRuntimeAssembler.cs rename to src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeAssembler.cs index 7392e953..739140ec 100644 --- a/src/FluxFlow.Engine/Hosting/ApplicationRuntimeAssembler.cs +++ b/src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeAssembler.cs @@ -3,6 +3,7 @@ using FluxFlow.Engine.Ports; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using FluxFlow.Nodes; namespace FluxFlow.Engine.Hosting; @@ -12,7 +13,7 @@ internal sealed class ApplicationRuntimeAssembler : IAsyncDisposable private readonly ApplicationRuntimePreparation _preparation; private readonly SemaphoreSlim _gate = new(1, 1); private readonly object _eventGate = new(); - private readonly Queue _pendingRevisionEvents = []; + private readonly Queue _pendingRevisionEvents = []; private ApplicationRuntimePortGeneration? _generation; private ApplicationPortRuntime? _ports; private int _disposed; @@ -35,6 +36,9 @@ public ApplicationRuntimeAssembler( if (runtimeOptions.OutputCapacity <= 0) throw new ArgumentOutOfRangeException(nameof(options), "Output capacity must be greater than zero."); + ArgumentNullException.ThrowIfNull(runtimeOptions.Events); + Events = new Events.ApplicationEventStream(runtimeOptions.Events); + var portSurfaces = new ApplicationRuntimePortSurfaceFactory( runtimeOptions, logger, @@ -45,9 +49,12 @@ public ApplicationRuntimeAssembler( new ApplicationRuntimeResourceSnapshotFactory( hostServices, resourceRegistrars.ToArray()), - new ApplicationRuntimeComponentActivator()); + new ApplicationRuntimeComponentActivator(), + Events); } + internal Events.ApplicationEventStream Events { get; } + internal ApplicationPortRuntime? Ports => Volatile.Read(ref _ports); internal ApplicationPortRuntime GetRequiredPorts() @@ -81,16 +88,19 @@ internal ValueTask PublishAsync( CancellationToken cancellationToken = default) { ArgumentNullException.ThrowIfNull(revisionEvent); + cancellationToken.ThrowIfCancellationRequested(); + var message = ApplicationPortRuntime.CreateRevisionMessage(revisionEvent); + Events.Publish(message, revisionEvent.RevisionId); lock (_eventGate) { var ports = _ports; if (ports is not null) - return ports.PublishAsync(revisionEvent, cancellationToken); + return PublishToPortsAsync(ports, message, cancellationToken); cancellationToken.ThrowIfCancellationRequested(); if (_pendingRevisionEvents.Count >= PendingRevisionEventCapacity) return ValueTask.FromResult(false); - _pendingRevisionEvents.Enqueue(revisionEvent); + _pendingRevisionEvents.Enqueue(message); return ValueTask.FromResult(true); } } @@ -116,11 +126,14 @@ public async ValueTask DisposeAsync() } finally { - _gate.Release(); - _gate.Dispose(); + try { await Events.DisposeAsync().ConfigureAwait(false); } + finally { _gate.Release(); _gate.Dispose(); } } } + private static async ValueTask PublishToPortsAsync(ApplicationPortRuntime ports, FlowMessage message, CancellationToken token) + => (await ports.PublishSystemEventAsync(message, token).ConfigureAwait(false)).IsAccepted; + private async ValueTask AdoptGenerationAsync(ApplicationRuntimePortGeneration generation) { await _gate.WaitAsync().ConfigureAwait(false); @@ -134,7 +147,7 @@ private async ValueTask AdoptGenerationAsync(ApplicationRuntimePortGeneration ge ApplicationRuntimePortGeneration? previous; while (true) { - ApplicationRevisionEvent[] pending; + FlowMessage[] pending; lock (_eventGate) { previous = _generation; @@ -152,7 +165,7 @@ private async ValueTask AdoptGenerationAsync(ApplicationRuntimePortGeneration ge foreach (var revisionEvent in pending) { - if (!await generation.Ports.PublishAsync(revisionEvent, CancellationToken.None) + if (!await PublishToPortsAsync(generation.Ports, revisionEvent, CancellationToken.None) .ConfigureAwait(false)) { throw new ApplicationRuntimeAssemblerException( diff --git a/src/FluxFlow.Engine/Hosting/ApplicationRuntimeAssemblerException.cs b/src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeAssemblerException.cs similarity index 100% rename from src/FluxFlow.Engine/Hosting/ApplicationRuntimeAssemblerException.cs rename to src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeAssemblerException.cs diff --git a/src/FluxFlow.Engine/Hosting/ApplicationRuntimeAssemblerHostingExtensions.cs b/src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeAssemblerHostingExtensions.cs similarity index 100% rename from src/FluxFlow.Engine/Hosting/ApplicationRuntimeAssemblerHostingExtensions.cs rename to src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeAssemblerHostingExtensions.cs diff --git a/src/FluxFlow.Engine/Hosting/ApplicationRuntimeAssemblerOptions.cs b/src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeAssemblerOptions.cs similarity index 81% rename from src/FluxFlow.Engine/Hosting/ApplicationRuntimeAssemblerOptions.cs rename to src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeAssemblerOptions.cs index 44920d4c..0561f1e0 100644 --- a/src/FluxFlow.Engine/Hosting/ApplicationRuntimeAssemblerOptions.cs +++ b/src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeAssemblerOptions.cs @@ -4,6 +4,8 @@ namespace FluxFlow.Engine.Hosting; internal sealed class ApplicationRuntimeAssemblerOptions { + public Events.ApplicationEventOptions Events { get; set; } = new(); + public int InputCapacity { get; set; } = ApplicationPortRuntimeBuilder.DefaultInputCapacity; public int OutputCapacity { get; set; } = ApplicationPortRuntimeBuilder.DefaultOutputCapacity; diff --git a/src/FluxFlow.Engine/Hosting/ApplicationRuntimeCleanup.cs b/src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeCleanup.cs similarity index 100% rename from src/FluxFlow.Engine/Hosting/ApplicationRuntimeCleanup.cs rename to src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeCleanup.cs diff --git a/src/FluxFlow.Engine/Hosting/ApplicationRuntimeComponentActivator.cs b/src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeComponentActivator.cs similarity index 100% rename from src/FluxFlow.Engine/Hosting/ApplicationRuntimeComponentActivator.cs rename to src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeComponentActivator.cs diff --git a/src/FluxFlow.Engine/Hosting/ApplicationRuntimeDrainPlan.cs b/src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeDrainPlan.cs similarity index 100% rename from src/FluxFlow.Engine/Hosting/ApplicationRuntimeDrainPlan.cs rename to src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeDrainPlan.cs diff --git a/src/FluxFlow.Engine/Hosting/ApplicationRuntimePlanFactory.cs b/src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimePlanFactory.cs similarity index 100% rename from src/FluxFlow.Engine/Hosting/ApplicationRuntimePlanFactory.cs rename to src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimePlanFactory.cs diff --git a/src/FluxFlow.Engine/Hosting/ApplicationRuntimePortBinder.cs b/src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimePortBinder.cs similarity index 82% rename from src/FluxFlow.Engine/Hosting/ApplicationRuntimePortBinder.cs rename to src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimePortBinder.cs index cd363021..ed7bcb21 100644 --- a/src/FluxFlow.Engine/Hosting/ApplicationRuntimePortBinder.cs +++ b/src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimePortBinder.cs @@ -117,6 +117,14 @@ private sealed class RevisionInputVisitor( { public void Visit(ComponentPortMetadata metadata) { + if (typeof(TMessage) == typeof(global::FluxFlow.Data.FlowValue)) + { + if (input is not FlowValueComponentInputPort canonical) + throw new ApplicationRuntimeAssemblerException($"Input descriptor '{address}' has the wrong type."); + builder.ReplaceFlowValueInput(address, canonical.Target); + return; + } + if (input is not ComponentInputPort typed) throw new ApplicationRuntimeAssemblerException($"Input descriptor '{address}' has the wrong type."); builder.ReplaceInput(address, typed.Target); @@ -137,6 +145,14 @@ private sealed class RevisionOutputVisitor( { public void Visit(ComponentPortMetadata metadata) { + if (typeof(TMessage) == typeof(global::FluxFlow.Data.FlowValue)) + { + if (output is not FlowValueComponentOutputPort canonical) + throw new ApplicationRuntimeAssemblerException($"Output descriptor '{address}' has the wrong type."); + builder.AttachFlowValueOutput(address, canonical.Source); + return; + } + if (output is not ComponentOutputPort typed) throw new ApplicationRuntimeAssemblerException($"Output descriptor '{address}' has the wrong type."); builder.AttachOutput(address, typed.Source); @@ -153,6 +169,14 @@ private sealed class WorkflowInputViewVisitor( { public void Visit(ComponentPortMetadata metadata) { + if (typeof(TMessage) == typeof(global::FluxFlow.Data.FlowValue)) + { + if (input is not FlowValueComponentInputPort canonical) + throw new ApplicationRuntimeAssemblerException($"Input descriptor '{address}' has the wrong type."); + services.AddExternalFluxFlowInputPort(address, canonical.Target); + return; + } + if (input is not ComponentInputPort typed) throw new ApplicationRuntimeAssemblerException($"Input descriptor '{address}' has the wrong type."); services.AddExternalFluxFlowInputPort(address, typed.Target); @@ -173,6 +197,14 @@ private sealed class WorkflowOutputViewVisitor( { public void Visit(ComponentPortMetadata metadata) { + if (typeof(TMessage) == typeof(global::FluxFlow.Data.FlowValue)) + { + if (output is not FlowValueComponentOutputPort canonical) + throw new ApplicationRuntimeAssemblerException($"Output descriptor '{address}' has the wrong type."); + services.AddExternalFluxFlowOutputPort(address, canonical.Source); + return; + } + if (output is not ComponentOutputPort typed) throw new ApplicationRuntimeAssemblerException($"Output descriptor '{address}' has the wrong type."); services.AddExternalFluxFlowOutputPort(address, typed.Source); diff --git a/src/FluxFlow.Engine/Hosting/ApplicationRuntimePortGeneration.cs b/src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimePortGeneration.cs similarity index 100% rename from src/FluxFlow.Engine/Hosting/ApplicationRuntimePortGeneration.cs rename to src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimePortGeneration.cs diff --git a/src/FluxFlow.Engine/Hosting/ApplicationRuntimePortSurface.cs b/src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimePortSurface.cs similarity index 91% rename from src/FluxFlow.Engine/Hosting/ApplicationRuntimePortSurface.cs rename to src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimePortSurface.cs index ed3f7ff9..5c46b7e3 100644 --- a/src/FluxFlow.Engine/Hosting/ApplicationRuntimePortSurface.cs +++ b/src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimePortSurface.cs @@ -107,7 +107,12 @@ private sealed class RuntimePortBuilderVisitor( { public void Visit(ComponentPortMetadata metadata) { - if (direction == ApplicationPortDirection.Input) + if (typeof(TMessage) == typeof(global::FluxFlow.Data.FlowValue) && + direction == ApplicationPortDirection.Input) + builder.AddFlowValueInput(address, options.InputCapacity); + else if (typeof(TMessage) == typeof(global::FluxFlow.Data.FlowValue)) + builder.AddFlowValueOutput(address, options.OutputCapacity); + else if (direction == ApplicationPortDirection.Input) builder.AddInput(address, options.InputCapacity); else builder.AddOutput(address, options.OutputCapacity); diff --git a/src/FluxFlow.Engine/Hosting/ApplicationRuntimePreparation.cs b/src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimePreparation.cs similarity index 86% rename from src/FluxFlow.Engine/Hosting/ApplicationRuntimePreparation.cs rename to src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimePreparation.cs index 889540e9..4c90ff25 100644 --- a/src/FluxFlow.Engine/Hosting/ApplicationRuntimePreparation.cs +++ b/src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimePreparation.cs @@ -9,7 +9,8 @@ internal sealed class ApplicationRuntimePreparation( ApplicationRuntimePlanFactory plans, ApplicationRuntimePortSurfaceFactory portSurfaces, ApplicationRuntimeResourceSnapshotFactory resourceSnapshots, - ApplicationRuntimeComponentActivator componentActivator) + ApplicationRuntimeComponentActivator componentActivator, + Events.ApplicationEventStream events) { internal async ValueTask PrepareAsync( ApplicationRevisionPreparationContext context, @@ -24,6 +25,8 @@ internal async ValueTask PrepareAsync( ApplicationRuntime? runtime = null; ApplicationRuntimePortGeneration? generation = null; ApplicationPortRevision? portRevision = null; + IDisposable? activityLink = null; + Events.ApplicationEventAttachment? eventLink = null; var releaseGeneration = false; try @@ -52,6 +55,7 @@ await componentActivator.PopulateAsync( .Select(static value => value.Instance) .ToArray(); runtime = ApplicationRuntime.Create(descriptors, [], descriptors); + eventLink = new Events.ApplicationEventAttachment(events, context.RevisionId, descriptors); var drainPlan = ApplicationRuntimeDrainPlan.TryCreate(definition, components); generation = currentGeneration is not null && @@ -61,6 +65,8 @@ await componentActivator.PopulateAsync( portSurfaces.Create(plan.Surface), plan.Surface); releaseGeneration = true; + generation.Ports.ForwardEventsTo(events); + activityLink = generation.Ports.AttachActivity(runtime.Activity); await using (var revisionBuilder = generation.Ports.CreateRevision(context.RevisionId)) { @@ -75,13 +81,16 @@ await componentActivator.PopulateAsync( snapshots, drainPlan, generation.ReleaseAsync, + activityLink, ReferenceEquals(generation, currentGeneration) ? null - : () => adoptGeneration(generation)); + : () => adoptGeneration(generation), + eventLink); } catch (Exception preparationFailure) { var cleanupFailures = new List(); + activityLink?.Dispose(); if (portRevision is not null) { try @@ -112,6 +121,12 @@ await ApplicationRuntimeCleanup.DisposeComponentsAsync( cleanupFailures.Add(exception); } + try + { + if (eventLink is not null) await eventLink.DisposeAsync().ConfigureAwait(false); + } + catch (Exception exception) { cleanupFailures.Add(exception); } + try { await ApplicationRuntimeCleanup.DisposeSnapshotsAsync(snapshots).ConfigureAwait(false); diff --git a/src/FluxFlow.Engine/Hosting/ApplicationRuntimeResourceSnapshotFactory.cs b/src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeResourceSnapshotFactory.cs similarity index 100% rename from src/FluxFlow.Engine/Hosting/ApplicationRuntimeResourceSnapshotFactory.cs rename to src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeResourceSnapshotFactory.cs diff --git a/src/FluxFlow.Engine/Hosting/ApplicationRuntimeRevisionCandidate.cs b/src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeRevisionCandidate.cs similarity index 87% rename from src/FluxFlow.Engine/Hosting/ApplicationRuntimeRevisionCandidate.cs rename to src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeRevisionCandidate.cs index 05fc45c1..508beb03 100644 --- a/src/FluxFlow.Engine/Hosting/ApplicationRuntimeRevisionCandidate.cs +++ b/src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeRevisionCandidate.cs @@ -14,6 +14,8 @@ internal sealed class ApplicationRuntimeRevisionCandidate : IApplicationRevision private readonly Func _releasePorts; private readonly bool _releasePortsAfterActivation; private readonly Func? _adoptPorts; + private readonly IDisposable? _activityLink; + private readonly Events.ApplicationEventAttachment? _eventLink; private ApplicationPortRevisionLease? _portLease; private int _activationCompleted; private int _activated; @@ -27,6 +29,7 @@ public ApplicationRuntimeRevisionCandidate( IReadOnlyList snapshots, bool ownsPorts, Func? adoptPorts, + IDisposable? activityLink = null, ApplicationRuntimeDrainPlan? drainPlan = null) { _runtime = runtime; @@ -36,6 +39,7 @@ public ApplicationRuntimeRevisionCandidate( _releasePorts = ownsPorts ? ports.DisposeAsync : NoopReleaseAsync; _releasePortsAfterActivation = false; _adoptPorts = adoptPorts; + _activityLink = activityLink; ProviderSnapshots = snapshots.Select(static snapshot => snapshot.Info).ToArray(); } @@ -45,7 +49,9 @@ internal ApplicationRuntimeRevisionCandidate( IReadOnlyList snapshots, ApplicationRuntimeDrainPlan? drainPlan, Func releasePorts, - Func? adoptPorts) + IDisposable? activityLink, + Func? adoptPorts, + Events.ApplicationEventAttachment? eventLink = null) { _runtime = runtime; _portRevision = portRevision; @@ -53,7 +59,9 @@ internal ApplicationRuntimeRevisionCandidate( _drainPlan = drainPlan; _releasePorts = releasePorts; _releasePortsAfterActivation = true; + _eventLink = eventLink; _adoptPorts = adoptPorts; + _activityLink = activityLink; ProviderSnapshots = snapshots.Select(static snapshot => snapshot.Info).ToArray(); } @@ -96,6 +104,15 @@ public async ValueTask DisposeAsync() return; var failures = new List(); + try + { + _activityLink?.Dispose(); + } + catch (Exception exception) + { + failures.Add(exception); + } + try { if (_portLease is not null) @@ -117,6 +134,12 @@ public async ValueTask DisposeAsync() failures.Add(exception); } + try + { + if (_eventLink is not null) await _eventLink.DisposeAsync().ConfigureAwait(false); + } + catch (Exception exception) { failures.Add(exception); } + foreach (var snapshot in _snapshots.Reverse()) { try diff --git a/src/FluxFlow.Engine/Hosting/FluxFlowApplicationHostedService.cs b/src/Engine/Runtime/FluxFlow.Engine/Hosting/FluxFlowApplicationHostedService.cs similarity index 100% rename from src/FluxFlow.Engine/Hosting/FluxFlowApplicationHostedService.cs rename to src/Engine/Runtime/FluxFlow.Engine/Hosting/FluxFlowApplicationHostedService.cs diff --git a/src/FluxFlow.Engine/IApplicationDefinitionSource.cs b/src/Engine/Runtime/FluxFlow.Engine/IApplicationDefinitionSource.cs similarity index 100% rename from src/FluxFlow.Engine/IApplicationDefinitionSource.cs rename to src/Engine/Runtime/FluxFlow.Engine/IApplicationDefinitionSource.cs diff --git a/src/FluxFlow.Engine/Internal/ConfigurationJsonReader.cs b/src/Engine/Runtime/FluxFlow.Engine/Internal/ConfigurationJsonReader.cs similarity index 100% rename from src/FluxFlow.Engine/Internal/ConfigurationJsonReader.cs rename to src/Engine/Runtime/FluxFlow.Engine/Internal/ConfigurationJsonReader.cs diff --git a/src/FluxFlow.Engine/Internal/Revisions/ApplicationResourceRevisionChange.cs b/src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/ApplicationResourceRevisionChange.cs similarity index 100% rename from src/FluxFlow.Engine/Internal/Revisions/ApplicationResourceRevisionChange.cs rename to src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/ApplicationResourceRevisionChange.cs diff --git a/src/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionChangeKind.cs b/src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionChangeKind.cs similarity index 100% rename from src/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionChangeKind.cs rename to src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionChangeKind.cs diff --git a/src/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionDiagnostic.cs b/src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionDiagnostic.cs similarity index 100% rename from src/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionDiagnostic.cs rename to src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionDiagnostic.cs diff --git a/src/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionDiagnosticCode.cs b/src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionDiagnosticCode.cs similarity index 100% rename from src/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionDiagnosticCode.cs rename to src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionDiagnosticCode.cs diff --git a/src/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionEvent.cs b/src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionEvent.cs similarity index 100% rename from src/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionEvent.cs rename to src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionEvent.cs diff --git a/src/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionPhase.cs b/src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionPhase.cs similarity index 100% rename from src/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionPhase.cs rename to src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionPhase.cs diff --git a/src/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionPlan.cs b/src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionPlan.cs similarity index 100% rename from src/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionPlan.cs rename to src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionPlan.cs diff --git a/src/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionPlanner.cs b/src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionPlanner.cs similarity index 100% rename from src/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionPlanner.cs rename to src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionPlanner.cs diff --git a/src/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionPreparationContext.cs b/src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionPreparationContext.cs similarity index 100% rename from src/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionPreparationContext.cs rename to src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/ApplicationRevisionPreparationContext.cs diff --git a/src/FluxFlow.Engine/Internal/Revisions/ApplicationWorkflowRevisionChange.cs b/src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/ApplicationWorkflowRevisionChange.cs similarity index 100% rename from src/FluxFlow.Engine/Internal/Revisions/ApplicationWorkflowRevisionChange.cs rename to src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/ApplicationWorkflowRevisionChange.cs diff --git a/src/FluxFlow.Engine/Internal/Revisions/IApplicationRevisionCandidate.cs b/src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/IApplicationRevisionCandidate.cs similarity index 100% rename from src/FluxFlow.Engine/Internal/Revisions/IApplicationRevisionCandidate.cs rename to src/Engine/Runtime/FluxFlow.Engine/Internal/Revisions/IApplicationRevisionCandidate.cs diff --git a/src/FluxFlow.Engine/Internal/Snapshots/CompositionProviderBoundary.cs b/src/Engine/Runtime/FluxFlow.Engine/Internal/Snapshots/CompositionProviderBoundary.cs similarity index 100% rename from src/FluxFlow.Engine/Internal/Snapshots/CompositionProviderBoundary.cs rename to src/Engine/Runtime/FluxFlow.Engine/Internal/Snapshots/CompositionProviderBoundary.cs diff --git a/src/FluxFlow.Engine/Internal/Snapshots/CompositionProviderSnapshotInfo.cs b/src/Engine/Runtime/FluxFlow.Engine/Internal/Snapshots/CompositionProviderSnapshotInfo.cs similarity index 100% rename from src/FluxFlow.Engine/Internal/Snapshots/CompositionProviderSnapshotInfo.cs rename to src/Engine/Runtime/FluxFlow.Engine/Internal/Snapshots/CompositionProviderSnapshotInfo.cs diff --git a/src/FluxFlow.Engine/Internal/Snapshots/CompositionServiceProviderSnapshot.cs b/src/Engine/Runtime/FluxFlow.Engine/Internal/Snapshots/CompositionServiceProviderSnapshot.cs similarity index 100% rename from src/FluxFlow.Engine/Internal/Snapshots/CompositionServiceProviderSnapshot.cs rename to src/Engine/Runtime/FluxFlow.Engine/Internal/Snapshots/CompositionServiceProviderSnapshot.cs diff --git a/src/FluxFlow.Engine/Internal/Snapshots/CompositionServiceProviderSnapshotBuilder.cs b/src/Engine/Runtime/FluxFlow.Engine/Internal/Snapshots/CompositionServiceProviderSnapshotBuilder.cs similarity index 100% rename from src/FluxFlow.Engine/Internal/Snapshots/CompositionServiceProviderSnapshotBuilder.cs rename to src/Engine/Runtime/FluxFlow.Engine/Internal/Snapshots/CompositionServiceProviderSnapshotBuilder.cs diff --git a/src/FluxFlow.Engine/Ports/ApplicationInputPort.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationInputPort.cs similarity index 100% rename from src/FluxFlow.Engine/Ports/ApplicationInputPort.cs rename to src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationInputPort.cs diff --git a/src/FluxFlow.Engine/Ports/ApplicationInputPortCore.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationInputPortCore.cs similarity index 100% rename from src/FluxFlow.Engine/Ports/ApplicationInputPortCore.cs rename to src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationInputPortCore.cs diff --git a/src/FluxFlow.Engine/Ports/ApplicationInputRevisionLifetime.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationInputRevisionLifetime.cs similarity index 100% rename from src/FluxFlow.Engine/Ports/ApplicationInputRevisionLifetime.cs rename to src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationInputRevisionLifetime.cs diff --git a/src/FluxFlow.Engine/Ports/ApplicationOutputAttachments.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationOutputAttachments.cs similarity index 100% rename from src/FluxFlow.Engine/Ports/ApplicationOutputAttachments.cs rename to src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationOutputAttachments.cs diff --git a/src/FluxFlow.Engine/Ports/ApplicationOutputCapture.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationOutputCapture.cs similarity index 100% rename from src/FluxFlow.Engine/Ports/ApplicationOutputCapture.cs rename to src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationOutputCapture.cs diff --git a/src/FluxFlow.Engine/Ports/ApplicationOutputConnections.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationOutputConnections.cs similarity index 100% rename from src/FluxFlow.Engine/Ports/ApplicationOutputConnections.cs rename to src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationOutputConnections.cs diff --git a/src/FluxFlow.Engine/Ports/ApplicationOutputPort.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationOutputPort.cs similarity index 100% rename from src/FluxFlow.Engine/Ports/ApplicationOutputPort.cs rename to src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationOutputPort.cs diff --git a/src/FluxFlow.Engine/Ports/ApplicationOutputSubscriptions.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationOutputSubscriptions.cs similarity index 100% rename from src/FluxFlow.Engine/Ports/ApplicationOutputSubscriptions.cs rename to src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationOutputSubscriptions.cs diff --git a/src/FluxFlow.Engine/Ports/ApplicationPortActivity.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationPortActivity.cs similarity index 100% rename from src/FluxFlow.Engine/Ports/ApplicationPortActivity.cs rename to src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationPortActivity.cs diff --git a/src/FluxFlow.Engine/Ports/ApplicationPortContracts.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationPortContracts.cs similarity index 100% rename from src/FluxFlow.Engine/Ports/ApplicationPortContracts.cs rename to src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationPortContracts.cs diff --git a/src/FluxFlow.Engine/Ports/ApplicationPortEventPublisher.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationPortEventPublisher.cs similarity index 67% rename from src/FluxFlow.Engine/Ports/ApplicationPortEventPublisher.cs rename to src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationPortEventPublisher.cs index f09f5b24..35c9ba4e 100644 --- a/src/FluxFlow.Engine/Ports/ApplicationPortEventPublisher.cs +++ b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationPortEventPublisher.cs @@ -46,26 +46,25 @@ internal void ReportActivity(ApplicationPortActivity activity) return; } - var diagnostic = new ApplicationDiagnostic + var diagnostic = new FlowEvent { Timestamp = activity.Timestamp, Name = activity.Kind == ApplicationPortActivityKind.InputAccepted ? ApplicationDiagnosticNames.InputAccepted : ApplicationDiagnosticNames.OutputEmitted, - Kind = activity.Kind == ApplicationPortActivityKind.InputAccepted - ? ApplicationDiagnosticKind.Input - : ApplicationDiagnosticKind.Output, - Level = ApplicationDiagnosticLevel.Trace, - Subject = activity.Port.Value, - Attributes = CreateAttributes( + Kind = FlowEventKind.Diagnostic, + Level = FlowEventLevel.Trace, + Dimensions = CreateAttributes( + ("kind", activity.Kind == ApplicationPortActivityKind.InputAccepted ? "Input" : "Output"), ("port", activity.Port.Value), ("relatedPort", activity.RelatedPort?.Value)) }; - signals.TryPublishDiagnostic(FlowMessage.Create( + signals.TryPublishDiagnostic(ApplicationSignalMessage.Create( diagnostic, activity.CorrelationId, activity.TraceId, - causationId: activity.MessageId)); + activity.MessageId, + activity.Port)); } internal void ReportRequest( @@ -75,62 +74,75 @@ internal void ReportRequest( ApplicationAddress output, long startedAt) { - var diagnostic = new ApplicationDiagnostic + var diagnostic = new FlowEvent { Timestamp = DateTimeOffset.UtcNow, Name = ApplicationDiagnosticNames.RequestCompleted, - Kind = ApplicationDiagnosticKind.Timing, + Kind = FlowEventKind.Diagnostic, Level = status == PortRequestStatus.Received - ? ApplicationDiagnosticLevel.Debug - : ApplicationDiagnosticLevel.Warning, - Subject = input.Value, - Duration = Stopwatch.GetElapsedTime(startedAt), + ? FlowEventLevel.Trace + : FlowEventLevel.Warning, + Dimensions = CreateAttributes( + ("kind", "Timing"), + ("subject", input.Value), + ("status", status.ToString())), + Measurements = new Dictionary(StringComparer.Ordinal) + { + ["duration.ms"] = Stopwatch.GetElapsedTime(startedAt).TotalMilliseconds + }, Attributes = CreateAttributes( ("input", input.Value), ("output", output.Value), ("status", status.ToString())) }; - signals.TryPublishDiagnostic(request.With(diagnostic)); + signals.TryPublishDiagnostic(ApplicationSignalMessage.Create( + diagnostic, + request.CorrelationId, + request.TraceId, + request.MessageId, + input)); } - private FlowMessage CreateDiagnosticMessage( + private FlowMessage CreateDiagnosticMessage( ApplicationPortRejection rejection) { - var diagnostic = new ApplicationDiagnostic + var error = rejection.Exception is null ? null : CreateFlowError(rejection); + var diagnostic = new FlowEvent { Timestamp = rejection.Timestamp, Name = ApplicationDiagnosticNames.PortRejected, - Kind = metadataByAddress.TryGetValue(rejection.Port, out var metadata) && - metadata.Direction == ApplicationPortDirection.Input - ? ApplicationDiagnosticKind.Input - : ApplicationDiagnosticKind.Output, + Kind = FlowEventKind.Diagnostic, Level = rejection.Reason is ApplicationPortRejectionReason.ConditionFailed or ApplicationPortRejectionReason.SourceFaulted or ApplicationPortRejectionReason.ComponentFaulted or ApplicationPortRejectionReason.OutputCaptureFailed - ? ApplicationDiagnosticLevel.Error - : ApplicationDiagnosticLevel.Warning, - Subject = rejection.Port.Value, + ? FlowEventLevel.Error + : FlowEventLevel.Warning, Message = $"Port activity was rejected with reason '{rejection.Reason}'.", - Error = rejection.Exception is null - ? null - : CreateFlowError(rejection), + Dimensions = CreateAttributes( + ("kind", metadataByAddress.TryGetValue(rejection.Port, out var metadata) && + metadata.Direction == ApplicationPortDirection.Input ? "Input" : "Output"), + ("subject", rejection.Port.Value), + ("reason", rejection.Reason.ToString())), Attributes = CreateAttributes( ("port", rejection.Port.Value), ("relatedPort", rejection.RelatedPort?.Value), - ("reason", rejection.Reason.ToString())) + ("reason", rejection.Reason.ToString())), + Details = error is null ? FlowValue.Null : FlowValue.From(error) }; - return CreateSignalMessage( + return ApplicationSignalMessage.Create( diagnostic, rejection.CorrelationId, rejection.TraceId, - rejection.MessageId); + rejection.MessageId, + rejection.Port); } - private static FlowMessage CreateSystemEventMessage( + private static FlowMessage CreateSystemEventMessage( ApplicationPortRejection rejection) { - var systemEvent = new ApplicationSystemEvent + var error = CreateFlowError(rejection); + var systemEvent = new FlowEvent { Timestamp = rejection.Timestamp, Name = rejection.Reason switch @@ -143,22 +155,25 @@ private static FlowMessage CreateSystemEventMessage( ApplicationSystemEventNames.ComponentFaulted, _ => ApplicationSystemEventNames.LinkTargetRejected }, - Category = rejection.Reason is ApplicationPortRejectionReason.SourceFaulted or - ApplicationPortRejectionReason.ComponentFaulted - ? ApplicationSystemEventCategory.Component - : ApplicationSystemEventCategory.Link, - Subject = rejection.Port.Value, - Error = CreateFlowError(rejection), - Details = CreateDetails( + Kind = FlowEventKind.Lifecycle, + Level = FlowEventLevel.Error, + Message = error.Message, + Dimensions = CreateAttributes( + ("category", rejection.Reason is ApplicationPortRejectionReason.SourceFaulted or + ApplicationPortRejectionReason.ComponentFaulted ? "Component" : "Link"), + ("subject", rejection.Port.Value)), + Attributes = new Dictionary(StringComparer.Ordinal) { ["error"] = error }, + Details = FlowValue.From(CreateDetails( ("port", rejection.Port.Value), ("relatedPort", rejection.RelatedPort?.Value), - ("reason", rejection.Reason.ToString())) + ("reason", rejection.Reason.ToString()))) }; - return CreateSignalMessage( + return ApplicationSignalMessage.Create( systemEvent, rejection.CorrelationId, rejection.TraceId, - rejection.MessageId); + rejection.MessageId, + rejection.Port); } private static bool CreatesSystemEvent(ApplicationPortRejection rejection) @@ -183,33 +198,22 @@ ApplicationPortRejectionReason.SourceFaulted or ("port", rejection.Port.Value), ("relatedPort", rejection.RelatedPort?.Value))); - private static FlowMessage CreateSignalMessage( - T payload, - CorrelationId? correlationId, - TraceId? traceId, - MessageId? causationId) - => FlowMessage.Create( - payload, - correlationId is { IsEmpty: false } ? correlationId : null, - traceId is { IsEmpty: false } ? traceId : null, - causationId: causationId); - - private static Dictionary CreateAttributes( + private static Dictionary CreateAttributes( (string Name, string? Value) first, (string Name, string? Value) second) { - var attributes = new Dictionary(2, StringComparer.Ordinal); + var attributes = new Dictionary(2, StringComparer.Ordinal); AddAttribute(attributes, first); AddAttribute(attributes, second); return attributes; } - private static Dictionary CreateAttributes( + private static Dictionary CreateAttributes( (string Name, string? Value) first, (string Name, string? Value) second, (string Name, string? Value) third) { - var attributes = new Dictionary(3, StringComparer.Ordinal); + var attributes = new Dictionary(3, StringComparer.Ordinal); AddAttribute(attributes, first); AddAttribute(attributes, second); AddAttribute(attributes, third); @@ -228,7 +232,7 @@ private static JsonElement CreateDetails( => JsonSerializer.SerializeToElement(CreateAttributes(first, second, third)); private static void AddAttribute( - Dictionary attributes, + Dictionary attributes, (string Name, string? Value) attribute) { if (attribute.Value is not null) diff --git a/src/FluxFlow.Engine/Ports/ApplicationPortRevision.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationPortRevision.cs similarity index 94% rename from src/FluxFlow.Engine/Ports/ApplicationPortRevision.cs rename to src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationPortRevision.cs index dfc9842f..ca9d24d8 100644 --- a/src/FluxFlow.Engine/Ports/ApplicationPortRevision.cs +++ b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationPortRevision.cs @@ -39,6 +39,17 @@ public ApplicationPortRevisionBuilder ReplaceInput( return this; } + public ApplicationPortRevisionBuilder ReplaceFlowValueInput( + ApplicationAddress address, + ITargetBlock target) + { + ThrowIfUnavailable(); + ArgumentNullException.ThrowIfNull(target); + _runtime.ValidateRevisionFlowValueInput(address); + AddInputReplacement(address, target); + return this; + } + public ApplicationPortRevisionBuilder RemoveInput(ApplicationAddress address) { ThrowIfUnavailable(); @@ -76,6 +87,16 @@ public ApplicationPortRevisionBuilder AttachOutput( return this; } + public ApplicationPortRevisionBuilder AttachFlowValueOutput( + ApplicationAddress address, + ISourceBlock source) + { + ThrowIfUnavailable(); + ArgumentNullException.ThrowIfNull(source); + _preparedOutputs.Add(_runtime.PrepareRevisionOutput(address, source)); + return this; + } + public ApplicationPortRevisionBuilder SetLinks( IEnumerable links) { diff --git a/src/FluxFlow.Engine/Ports/ApplicationPortRevisionInfo.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationPortRevisionInfo.cs similarity index 100% rename from src/FluxFlow.Engine/Ports/ApplicationPortRevisionInfo.cs rename to src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationPortRevisionInfo.cs diff --git a/src/FluxFlow.Engine/Ports/ApplicationPortRuntime.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationPortRuntime.cs similarity index 70% rename from src/FluxFlow.Engine/Ports/ApplicationPortRuntime.cs rename to src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationPortRuntime.cs index 7a2d13aa..3b8462e8 100644 --- a/src/FluxFlow.Engine/Ports/ApplicationPortRuntime.cs +++ b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationPortRuntime.cs @@ -93,9 +93,9 @@ internal ApplicationPortRuntime( _inputs = inputs; _outputs = outputs; - GetOutput(ApplicationAddress.SystemEvents) + GetFlowValueOutput(ApplicationAddress.SystemEvents) .Attach(_signals.SystemEvents); - GetOutput(ApplicationAddress.SystemDiagnostics) + GetFlowValueOutput(ApplicationAddress.SystemDiagnostics) .Attach(_signals.Diagnostics); _completion = CompleteRuntimeAsync(); } @@ -104,9 +104,18 @@ internal ApplicationPortRuntime( public ISourceBlock Rejections => _rejections; - public ISourceBlock> SystemEvents => _signals.SystemEvents; + public ISourceBlock SystemEvents => _signals.SystemEvents; - public ISourceBlock> Diagnostics => _signals.Diagnostics; + public ISourceBlock Diagnostics => _signals.Diagnostics; + + public ISourceBlock Activity => _signals.Activity; + + internal void ForwardEventsTo(Events.ApplicationEventStream events) + => _signals.EventObserver = message => + { + if (message.Headers.GetValueOrDefault(FlowEventHeaders.Type) != ApplicationSystemEventNames.RevisionChanged) + events.Publish(message); + }; public Task Completion => _completion; @@ -136,14 +145,18 @@ public ApplicationRuntimeStatus Status } } - public ValueTask PublishSystemEventAsync( - FlowMessage message, + internal ValueTask PublishSystemEventAsync( + FlowMessage message, CancellationToken cancellationToken = default) => _signals.PublishSystemEventAsync(message, cancellationToken); internal async ValueTask PublishAsync( ApplicationRevisionEvent revisionEvent, CancellationToken cancellationToken = default) + => (await PublishSystemEventAsync(CreateRevisionMessage(revisionEvent), cancellationToken) + .ConfigureAwait(false)).IsAccepted; + + internal static FlowMessage CreateRevisionMessage(ApplicationRevisionEvent revisionEvent) { ArgumentNullException.ThrowIfNull(revisionEvent); var details = JsonSerializer.SerializeToElement(new @@ -153,24 +166,33 @@ internal async ValueTask PublishAsync( sequence = revisionEvent.Sequence, workflows = revisionEvent.Workflows.ToArray() }); - var result = await PublishSystemEventAsync( - FlowMessage.Create(new ApplicationSystemEvent + return ApplicationSignalMessage.Create(new FlowEvent + { + Timestamp = revisionEvent.Timestamp, + Name = ApplicationSystemEventNames.RevisionChanged, + Kind = FlowEventKind.Lifecycle, + Level = revisionEvent.Error is null ? FlowEventLevel.Information : FlowEventLevel.Warning, + Dimensions = new Dictionary(StringComparer.Ordinal) + { + ["category"] = "Revision", + ["subject"] = revisionEvent.RevisionId + }, + Attributes = revisionEvent.Error is null + ? new Dictionary(StringComparer.Ordinal) + : new Dictionary(StringComparer.Ordinal) { - Timestamp = revisionEvent.Timestamp, - Name = ApplicationSystemEventNames.RevisionChanged, - Category = ApplicationSystemEventCategory.Revision, - Subject = revisionEvent.RevisionId, - Error = revisionEvent.Error, - Details = details - }), - cancellationToken) - .ConfigureAwait(false); - return result.IsAccepted; + ["error"] = revisionEvent.Error + }, + Details = global::FluxFlow.Data.FlowValue.From(details) + }); } - public bool TryPublishDiagnostic(FlowMessage message) + internal bool TryPublishDiagnostic(FlowMessage message) => _signals.TryPublishDiagnostic(message); + internal IDisposable AttachActivity(ISourceBlock source) + => _signals.AttachActivity(source); + public ApplicationPortRevisionBuilder CreateRevision(string revisionId) { ThrowIfDisposed(); @@ -186,6 +208,15 @@ public ValueTask SendAsync( return SendAsync(input.Address, message, cancellationToken); } + public ValueTask SendAsync( + InputPortHandle input, + FlowMessage message, + CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(input); + return SendAsync(input.Address, message, cancellationToken); + } + public ValueTask SendAsync( SignalInputPortHandle input, FlowMessage message, @@ -221,9 +252,59 @@ public ValueTask SendAsync( }); } - return ValueTask.FromResult(inputPort is IApplicationSignalInputPort signalInput - ? signalInput.TrySend(message) - : GetInput(input).TrySend(message)); + if (inputPort is IApplicationSignalInputPort signalInput) + return ValueTask.FromResult(signalInput.TrySend(message)); + if (inputPort is ApplicationInputPort typedInput) + return ValueTask.FromResult(typedInput.TrySend(message)); + if (inputPort is FlowValueApplicationInputPort flowValueInput) + { + var canonical = message.IsError + ? message.ConvertError() + : message.ConvertValue(global::FluxFlow.Data.FlowValue.From(message.Value)); + return ValueTask.FromResult(flowValueInput.TrySend(canonical)); + } + + throw CreateTypeException(input, typeof(T), inputPort.PayloadType); + } + + public ValueTask SendAsync( + ApplicationAddress input, + FlowMessage message, + CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(message); + cancellationToken.ThrowIfCancellationRequested(); + var inputPort = GetInputPort(input); + if (Volatile.Read(ref _completeRequested) != 0) + { + _events.ReportRejection(new ApplicationPortRejection + { + Timestamp = DateTimeOffset.UtcNow, + Port = input, + CorrelationId = message.CorrelationId, + TraceId = message.TraceId, + MessageId = message.MessageId, + Reason = ApplicationPortRejectionReason.Completed + }); + return ValueTask.FromResult(new PortSendResult + { + Port = inputPort.Address, + Status = PortSendStatus.Completed + }); + } + + if (inputPort is IApplicationSignalInputPort signalInput) + { + var typedSignal = message.IsError + ? message.ConvertError() + : message.ConvertValue(message.Value!); + return ValueTask.FromResult(signalInput.TrySend(typedSignal)); + } + + if (inputPort is FlowValueApplicationInputPort flowValueInput) + return ValueTask.FromResult(flowValueInput.TrySend(message)); + + throw CreateTypeException(input, typeof(global::FluxFlow.Data.FlowValue), inputPort.PayloadType); } public async Task> ReceiveAsync( @@ -234,13 +315,38 @@ public async Task> ReceiveAsync( cancellationToken.ThrowIfCancellationRequested(); ValidateTimeout(timeout); - using var registration = GetOutput(output).RegisterReceive(traceId: null); - return await WaitForReceiveAsync( - registration, - output, - timeout, - cancellationToken) - .ConfigureAwait(false); + if (!_outputs.TryGetValue(output, out var outputPort)) + throw CreatePortException(output, ApplicationPortDirection.Output); + + if (outputPort is ApplicationOutputPort typedOutput) + { + using var registration = typedOutput.RegisterReceive(traceId: null); + return await WaitForReceiveAsync( + registration, + output, + timeout, + cancellationToken) + .ConfigureAwait(false); + } + + if (outputPort is FlowValueApplicationOutputPort flowValueOutput) + { + using var registration = flowValueOutput.RegisterReceive(traceId: null); + var result = await WaitForReceiveAsync( + registration, + output, + timeout, + cancellationToken) + .ConfigureAwait(false); + return new PortReceiveResult + { + Port = result.Port, + Status = result.Status, + Message = ConvertFlowValueMessage(result.Message) + }; + } + + throw CreateTypeException(output, typeof(T), outputPort.PayloadType); } public Task> ReceiveAsync( @@ -258,7 +364,39 @@ public ValueTask> ObserveAsync( CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); - return ValueTask.FromResult(GetOutput(output).Observe(capacity)); + if (!_outputs.TryGetValue(output, out var outputPort)) + throw CreatePortException(output, ApplicationPortDirection.Output); + if (outputPort is ApplicationOutputPort typedOutput) + return ValueTask.FromResult(typedOutput.Observe(capacity)); + if (outputPort is FlowValueApplicationOutputPort flowValueOutput) + { + var sourceResult = flowValueOutput.Observe(capacity); + if (typeof(T) == typeof(FlowValue)) + return ValueTask.FromResult((PortObserveResult)(object)sourceResult); + if (sourceResult.Observation is null) + { + return ValueTask.FromResult(new PortObserveResult + { + Port = sourceResult.Port, + Status = sourceResult.Status + }); + } + + var source = sourceResult.Observation; + var adapted = new PortObservation( + output, + capacity, + ignored => _ = source.DisposeAsync()); + _ = PumpFlowValueObservationAsync(source, adapted); + return ValueTask.FromResult(new PortObserveResult + { + Port = sourceResult.Port, + Status = sourceResult.Status, + Observation = adapted + }); + } + + throw CreateTypeException(output, typeof(T), outputPort.PayloadType); } public ValueTask> ObserveAsync( @@ -380,6 +518,19 @@ public ValueTask AttachInputAsync( return GetInput(input).AttachAsync(target, cancellationToken); } + public ValueTask AttachInputAsync( + ApplicationAddress input, + ITargetBlock target, + CancellationToken cancellationToken = default) + { + ThrowIfDisposed(); + ArgumentNullException.ThrowIfNull(target); + var port = GetInputPort(input); + if (port is not FlowValueApplicationInputPort canonical) + throw CreateTypeException(input, typeof(global::FluxFlow.Data.FlowValue), port.PayloadType); + return canonical.AttachAsync(target, cancellationToken); + } + public ValueTask AttachSignalInputAsync( SignalInputPortHandle input, IFlowSignalTarget target, @@ -508,6 +659,13 @@ public async ValueTask DisposeAsync() internal void ValidateRevisionInput(ApplicationAddress address) => _ = GetInput(address); + internal void ValidateRevisionFlowValueInput(ApplicationAddress address) + { + var input = GetInputPort(address); + if (input is not FlowValueApplicationInputPort) + throw CreateTypeException(address, typeof(global::FluxFlow.Data.FlowValue), input.PayloadType); + } + internal void ValidateRevisionSignalInput(ApplicationAddress address) => _ = GetSignalInput(address); @@ -516,6 +674,17 @@ internal IPreparedApplicationOutput PrepareRevisionOutput( ISourceBlock> source) => GetOutput(address).PrepareRevisionOutput(source); + internal IPreparedApplicationOutput PrepareRevisionOutput( + ApplicationAddress address, + ISourceBlock source) + { + if (!_outputs.TryGetValue(address, out var output)) + throw CreatePortException(address, ApplicationPortDirection.Output); + if (output is not FlowValueApplicationOutputPort canonical) + throw CreateTypeException(address, typeof(global::FluxFlow.Data.FlowValue), output.PayloadType); + return canonical.PrepareRevisionOutput(source); + } + internal ApplicationRevisionRouting.Snapshot PrepareRevisionRouting( IEnumerable links) { @@ -681,12 +850,16 @@ private async Task CompletePortsAsync() try { await _signals.PublishSystemEventAsync( - FlowMessage.Create(new ApplicationSystemEvent + ApplicationSignalMessage.Create(new FlowEvent { Timestamp = DateTimeOffset.UtcNow, Name = ApplicationSystemEventNames.RuntimeCompleting, - Category = ApplicationSystemEventCategory.Lifecycle, - Subject = "runtime" + Kind = FlowEventKind.Lifecycle, + Dimensions = new Dictionary(StringComparer.Ordinal) + { + ["category"] = "Lifecycle", + ["subject"] = "runtime" + } }), CancellationToken.None) .ConfigureAwait(false); @@ -763,6 +936,16 @@ private ApplicationOutputPort GetOutput(ApplicationAddress address) return typed; } + private FlowValueApplicationOutputPort GetFlowValueOutput(ApplicationAddress address) + { + ArgumentNullException.ThrowIfNull(address); + if (!_outputs.TryGetValue(address, out var output)) + throw CreatePortException(address, ApplicationPortDirection.Output); + if (output is not FlowValueApplicationOutputPort canonical) + throw CreateTypeException(address, typeof(global::FluxFlow.Data.FlowValue), output.PayloadType); + return canonical; + } + private Exception CreatePortException( ApplicationAddress address, ApplicationPortDirection expected) @@ -783,6 +966,68 @@ private static InvalidOperationException CreateTypeException( => new( $"Application port '{address}' carries payload type '{actual}', not requested type '{requested}'."); + private static FlowMessage? ConvertFlowValueMessage( + FlowMessage? message) + { + if (message is null) + return null; + if (message.IsError) + return message.ConvertError(); + if (typeof(T) == typeof(global::FluxFlow.Data.FlowValue)) + { + return message.ConvertValue((T)(object)message.Value); + } + if (typeof(T) == typeof(System.Text.Json.JsonElement)) + { + return message.ConvertValue( + (T)(object)message.Value.ToJsonElement()); + } + + return message.ConvertValue(message.Value.Deserialize()!); + } + + private async Task PumpFlowValueObservationAsync( + PortObservation source, + PortObservation target) + { + try + { + await foreach (var message in source.ReadAllAsync().ConfigureAwait(false)) + { + var converted = ConvertFlowValueMessage(message)!; + if (target.TryPost(converted)) + continue; + if (!target.IsActive) + return; + + var exception = new InvalidOperationException( + $"Observation of output port '{target.Port}' exceeded its capacity of {target.Capacity}."); + target.Fault(exception); + _events.ReportRejection(new ApplicationPortRejection + { + Timestamp = DateTimeOffset.UtcNow, + Port = target.Port, + CorrelationId = message.CorrelationId, + TraceId = message.TraceId, + MessageId = message.MessageId, + Reason = ApplicationPortRejectionReason.ObservationOverflowed, + Exception = exception + }); + return; + } + + target.Complete(); + } + catch (Exception exception) + { + target.Fault(exception); + } + finally + { + await source.DisposeAsync().ConfigureAwait(false); + } + } + private static async Task> WaitForReceiveAsync( ApplicationOutputReceiveRegistration registration, ApplicationAddress output, @@ -808,6 +1053,31 @@ private static async Task> WaitForReceiveAsync( } } + private static async Task> WaitForReceiveAsync( + FlowValueApplicationOutputReceiveRegistration registration, + ApplicationAddress output, + TimeSpan? timeout, + CancellationToken cancellationToken) + { + if (timeout is null || timeout == Timeout.InfiniteTimeSpan) + return await registration.Task.WaitAsync(cancellationToken).ConfigureAwait(false); + + try + { + return await registration.Task + .WaitAsync(timeout.Value, cancellationToken) + .ConfigureAwait(false); + } + catch (TimeoutException) + { + return new PortReceiveResult + { + Port = output, + Status = PortReceiveStatus.TimedOut + }; + } + } + private static void ValidateTimeout(TimeSpan? timeout) { if (timeout is not null && diff --git a/src/FluxFlow.Engine/Ports/ApplicationPortRuntimeBuilder.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationPortRuntimeBuilder.cs similarity index 74% rename from src/FluxFlow.Engine/Ports/ApplicationPortRuntimeBuilder.cs rename to src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationPortRuntimeBuilder.cs index 63021ef0..bda02d78 100644 --- a/src/FluxFlow.Engine/Ports/ApplicationPortRuntimeBuilder.cs +++ b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationPortRuntimeBuilder.cs @@ -15,9 +15,9 @@ internal sealed class ApplicationPortRuntimeBuilder private static readonly IReadOnlyList SystemOutputValues = Array.AsReadOnly( [ - ApplicationSystemOutputMetadata.Create( + ApplicationSystemOutputMetadata.Create( ApplicationAddress.SystemEvents), - ApplicationSystemOutputMetadata.Create( + ApplicationSystemOutputMetadata.Create( ApplicationAddress.SystemDiagnostics) ]); @@ -29,10 +29,10 @@ public ApplicationPortRuntimeBuilder( IApplicationOutputCaptureResolver? outputCaptures = null) { _outputCaptures = outputCaptures; - Add(CreateOutputRegistration( + Add(CreateFlowValueOutputRegistration( ApplicationAddress.SystemEvents, DefaultSystemOutputCapacity)); - Add(CreateOutputRegistration( + Add(CreateFlowValueOutputRegistration( ApplicationAddress.SystemDiagnostics, DefaultSystemOutputCapacity)); } @@ -61,6 +61,22 @@ public ApplicationPortRuntimeBuilder AddInput( return this; } + public ApplicationPortRuntimeBuilder AddFlowValueInput( + ApplicationAddress address, + int capacity = DefaultInputCapacity) + { + ValidateAddress(address, ApplicationPortDirection.Input); + Add(new PortRegistration( + address, + ApplicationPortDirection.Input, + ApplicationPortKind.Message, + typeof(global::FluxFlow.Data.FlowValue), + capacity, + (report, activity) => new FlowValueApplicationInputPort(address, capacity, report, activity), + null)); + return this; + } + public ApplicationPortRuntimeBuilder AddSignalInput( ApplicationAddress address, int capacity = DefaultInputCapacity) @@ -86,6 +102,15 @@ public ApplicationPortRuntimeBuilder AddOutput( return this; } + public ApplicationPortRuntimeBuilder AddFlowValueOutput( + ApplicationAddress address, + int capacity = DefaultOutputCapacity) + { + ValidateAddress(address, ApplicationPortDirection.Output); + Add(CreateFlowValueOutputRegistration(address, capacity)); + return this; + } + public ApplicationPortRuntime Build() => new(_ports.Values .OrderBy(static registration => registration.Address.Value, StringComparer.Ordinal) @@ -142,6 +167,27 @@ private PortRegistration CreateOutputRegistration( capture)); } + private PortRegistration CreateFlowValueOutputRegistration( + ApplicationAddress address, + int capacity) + { + var capture = _outputCaptures?.Resolve(address); + return new PortRegistration( + address, + ApplicationPortDirection.Output, + ApplicationPortKind.Message, + typeof(global::FluxFlow.Data.FlowValue), + capacity, + null, + (report, activity, revisionRouting) => new FlowValueApplicationOutputPort( + address, + capacity, + report, + activity, + revisionRouting, + capture)); + } + internal sealed record PortRegistration( ApplicationAddress Address, ApplicationPortDirection Direction, diff --git a/src/FluxFlow.Engine/Ports/ApplicationRevisionRouting.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationRevisionRouting.cs similarity index 100% rename from src/FluxFlow.Engine/Ports/ApplicationRevisionRouting.cs rename to src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationRevisionRouting.cs diff --git a/src/FluxFlow.Engine/Ports/ApplicationRuntimeStatus.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationRuntimeStatus.cs similarity index 100% rename from src/FluxFlow.Engine/Ports/ApplicationRuntimeStatus.cs rename to src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationRuntimeStatus.cs diff --git a/src/FluxFlow.Engine/Ports/ApplicationSignalInputPort.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationSignalInputPort.cs similarity index 100% rename from src/FluxFlow.Engine/Ports/ApplicationSignalInputPort.cs rename to src/Engine/Runtime/FluxFlow.Engine/Ports/ApplicationSignalInputPort.cs diff --git a/src/Engine/Runtime/FluxFlow.Engine/Ports/FlowValueApplicationInputPort.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/FlowValueApplicationInputPort.cs new file mode 100644 index 00000000..bb4b467e --- /dev/null +++ b/src/Engine/Runtime/FluxFlow.Engine/Ports/FlowValueApplicationInputPort.cs @@ -0,0 +1,109 @@ +using System.Threading.Tasks.Dataflow; +using FluxFlow.Composition.Addressing; +using FluxFlow.Nodes; + +namespace FluxFlow.Engine.Ports; + +internal sealed class FlowValueApplicationInputPort : IApplicationInputPort +{ + private readonly ApplicationInputPortCore> _core; + + public FlowValueApplicationInputPort( + ApplicationAddress address, + int capacity, + Action report, + Action activity) + { + Address = address; + Capacity = capacity; + _core = new ApplicationInputPortCore>( + address, + ApplicationPortKind.Message, + typeof(global::FluxFlow.Data.FlowValue), + capacity, + "Input port", + $"target payload type '{typeof(global::FluxFlow.Data.FlowValue)}'", + report, + activity, + static message => new ApplicationInputMessageIdentity( + message.CorrelationId, + message.TraceId, + message.MessageId), + static (message, target, cancellationToken) => + new ValueTask(target.SendAsync(message, cancellationToken)), + static target => target.Completion, + CompleteTargetAsync); + } + + public ApplicationAddress Address { get; } + + public Type PayloadType => typeof(global::FluxFlow.Data.FlowValue); + + public ApplicationPortKind Kind => ApplicationPortKind.Message; + + public int Capacity { get; } + + public Task Completion => _core.Completion; + + public PortSendResult TrySend( + FlowMessage message, + ApplicationAddress? source = null) + { + ArgumentNullException.ThrowIfNull(message); + return _core.TrySend(message, source); + } + + public ApplicationPortStatus GetStatus() + { + return _core.GetStatus(); + } + + public async ValueTask AttachAsync( + ITargetBlock target, + CancellationToken cancellationToken) + { + ArgumentNullException.ThrowIfNull(target); + var revision = await BeginRevisionAsync(cancellationToken).ConfigureAwait(false); + try + { + return revision.Commit(target); + } + finally + { + await revision.DisposeAsync().ConfigureAwait(false); + } + } + + public async ValueTask BeginRevisionAsync( + CancellationToken cancellationToken) + { + await _core.BeginRevisionAsync(cancellationToken).ConfigureAwait(false); + return new ApplicationInputRevisionLifetime( + Address, + PayloadType, + "Input port", + target => new ApplicationInputAttachmentLifetime( + Address, + _core.CommitRevision(target), + _core.DrainAsync, + _core.DetachAsync), + _core.EndRevision); + } + + public void Complete() + { + _core.Complete(); + } + + public void Abort() + { + _core.Abort(); + } + + private static async Task CompleteTargetAsync(ITargetBlock target) + { + target.Complete(); + await target.Completion.ConfigureAwait(false); + } + +} diff --git a/src/Engine/Runtime/FluxFlow.Engine/Ports/FlowValueApplicationOutputAttachments.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/FlowValueApplicationOutputAttachments.cs new file mode 100644 index 00000000..237b231a --- /dev/null +++ b/src/Engine/Runtime/FluxFlow.Engine/Ports/FlowValueApplicationOutputAttachments.cs @@ -0,0 +1,106 @@ +using System.Threading.Tasks.Dataflow; +using FluxFlow.Composition.Addressing; +using FluxFlow.Nodes; + +namespace FluxFlow.Engine.Ports; + +internal sealed class FlowValueApplicationOutputAttachment( + FlowValueApplicationOutputPort owner, + IDisposable link) : IDisposable +{ + private int _disposed; + + public void Dispose() + { + if (Interlocked.Exchange(ref _disposed, 1) != 0) + return; + + link.Dispose(); + owner.RemoveAttachment(this); + } + + internal void ReportSourceFault(Exception exception) + => owner.ReportSourceFault(exception); +} + +internal sealed class FlowValueApplicationOutputRevision(FlowValueApplicationOutputPort owner) : + IApplicationOutputRevision +{ + private int _disposed; + + public ApplicationAddress Address => owner.Address; + + public ValueTask DisposeAsync() + { + if (Interlocked.Exchange(ref _disposed, 1) == 0) + owner.ReleaseRevision(); + return ValueTask.CompletedTask; + } +} + +internal sealed class FlowValuePreparedApplicationOutput : IPreparedApplicationOutput +{ + private readonly FlowValueApplicationOutputPort _owner; + private readonly BufferBlock _staging; + private readonly Task _sourceCompletion; + private readonly IDisposable _sourceLink; + private IDisposable? _activeAttachment; + private int _activated; + private int _disposed; + + internal FlowValuePreparedApplicationOutput( + FlowValueApplicationOutputPort owner, + ISourceBlock source) + { + _owner = owner; + _staging = new BufferBlock(new DataflowBlockOptions + { + BoundedCapacity = owner.Capacity + }); + _sourceCompletion = source.Completion; + _sourceLink = source.LinkTo( + _staging, + new DataflowLinkOptions { PropagateCompletion = true }); + } + + public ApplicationAddress Address => _owner.Address; + + public void ThrowIfFaulted() + { + var faultedCompletion = _sourceCompletion.IsFaulted + ? _sourceCompletion + : _staging.Completion.IsFaulted + ? _staging.Completion + : null; + if (faultedCompletion is null) + return; + + throw new InvalidOperationException( + $"Prepared output source for '{Address}' faulted before activation.", + faultedCompletion.Exception?.GetBaseException()); + } + + public void Activate() + { + ObjectDisposedException.ThrowIf(Volatile.Read(ref _disposed) != 0, this); + if (Interlocked.Exchange(ref _activated, 1) != 0) + throw new InvalidOperationException($"Prepared output '{Address}' is already active."); + _activeAttachment = _owner.Attach(_staging); + } + + async ValueTask IPreparedApplicationOutput.DrainAsync( + CancellationToken cancellationToken) + { + await _staging.Completion.WaitAsync(cancellationToken).ConfigureAwait(false); + await _owner.DrainAsync(cancellationToken).ConfigureAwait(false); + } + + public void Dispose() + { + if (Interlocked.Exchange(ref _disposed, 1) != 0) + return; + _activeAttachment?.Dispose(); + _sourceLink.Dispose(); + _staging.Complete(); + } +} diff --git a/src/Engine/Runtime/FluxFlow.Engine/Ports/FlowValueApplicationOutputConnections.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/FlowValueApplicationOutputConnections.cs new file mode 100644 index 00000000..add22f04 --- /dev/null +++ b/src/Engine/Runtime/FluxFlow.Engine/Ports/FlowValueApplicationOutputConnections.cs @@ -0,0 +1,76 @@ +using FluxFlow.Composition.Addressing; +using FluxFlow.Composition.Links; +using FluxFlow.Nodes; + +namespace FluxFlow.Engine.Ports; + +internal interface IFlowValueApplicationOutputLink : IDisposable +{ + void TryDeliver(FlowMessage message); +} + +internal sealed class FlowValueApplicationMessageOutputLink( + FlowValueApplicationOutputPort owner, + FlowValueApplicationInputPort target, + CompiledApplicationLink link) : IFlowValueApplicationOutputLink +{ + private int _disposed; + + public void TryDeliver(FlowMessage message) + { + if (Volatile.Read(ref _disposed) == 0) + owner.TryDeliver(target, link, message); + } + + public void Dispose() + { + if (Interlocked.Exchange(ref _disposed, 1) == 0) + owner.RemoveLink(this); + } +} + +internal sealed class FlowValueApplicationSignalOutputLink( + FlowValueApplicationOutputPort owner, + IApplicationSignalInputPort target, + CompiledApplicationLink link) : IFlowValueApplicationOutputLink +{ + private int _disposed; + + public void TryDeliver(FlowMessage message) + { + if (Volatile.Read(ref _disposed) == 0) + owner.TryDeliver(target, link, message); + } + + public void Dispose() + { + if (Interlocked.Exchange(ref _disposed, 1) == 0) + owner.RemoveLink(this); + } +} + +internal sealed class FlowValueApplicationMessageRevisionRoute( + FlowValueApplicationOutputPort owner, + FlowValueApplicationInputPort target, + CompiledApplicationLink link) : IApplicationRevisionRoute +{ + public ApplicationAddress Source => link.Source; + + public ApplicationAddress Target => link.Target; + + public void TryDeliver(object message) + => owner.TryDeliver(target, link, (FlowMessage)message); +} + +internal sealed class FlowValueApplicationSignalRevisionRoute( + FlowValueApplicationOutputPort owner, + IApplicationSignalInputPort target, + CompiledApplicationLink link) : IApplicationRevisionRoute +{ + public ApplicationAddress Source => link.Source; + + public ApplicationAddress Target => link.Target; + + public void TryDeliver(object message) + => owner.TryDeliver(target, link, (FlowMessage)message); +} diff --git a/src/Engine/Runtime/FluxFlow.Engine/Ports/FlowValueApplicationOutputPort.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/FlowValueApplicationOutputPort.cs new file mode 100644 index 00000000..a98c1e6b --- /dev/null +++ b/src/Engine/Runtime/FluxFlow.Engine/Ports/FlowValueApplicationOutputPort.cs @@ -0,0 +1,584 @@ +using System.Threading.Tasks.Dataflow; +using FluxFlow.Composition.Addressing; +using FluxFlow.Composition.Links; +using FluxFlow.Mapping; +using FluxFlow.Nodes; + +namespace FluxFlow.Engine.Ports; + +internal sealed class FlowValueApplicationOutputPort : IApplicationOutputPort +{ + private readonly object _gate = new(); + private readonly BufferBlock _ingress; + private readonly Action _report; + private readonly Action _activity; + private readonly ApplicationRevisionRouting _revisionRouting; + private readonly IApplicationOutputCapture? _capture; + private readonly List _links = []; + private readonly List _waiters = []; + private readonly List> _observations = []; + private readonly List _attachments = []; + private readonly CancellationTokenSource _abort = new(); + private readonly SemaphoreSlim _dispatchGate = new(1, 1); + private readonly TaskCompletionSource _completion = + new(TaskCreationOptions.RunContinuationsAsynchronously); + private readonly Task _pump; + + private bool _completeRequested; + private bool _aborted; + private int _activeSources; + + public FlowValueApplicationOutputPort( + ApplicationAddress address, + int capacity, + Action report, + Action activity, + ApplicationRevisionRouting revisionRouting, + IApplicationOutputCapture? capture = null) + { + Address = address; + Capacity = capacity; + _report = report; + _activity = activity; + _revisionRouting = revisionRouting; + _capture = capture; + _ingress = new BufferBlock(new DataflowBlockOptions + { + BoundedCapacity = capacity + }); + _pump = PumpAsync(); + } + + public ApplicationAddress Address { get; } + + public Type PayloadType => typeof(global::FluxFlow.Data.FlowValue); + + public int Capacity { get; } + + public Task Completion => _completion.Task; + + public ApplicationPortStatus GetStatus() + { + lock (_gate) + { + return new ApplicationPortStatus + { + Address = Address, + Direction = ApplicationPortDirection.Output, + Kind = ApplicationPortKind.Message, + PayloadType = typeof(global::FluxFlow.Data.FlowValue), + Capacity = Capacity, + PendingMessages = _aborted ? 0 : _ingress.Count, + ActiveAttachments = _activeSources, + Availability = _completeRequested || _aborted + ? ApplicationPortAvailability.Completed + : _activeSources == 0 + ? ApplicationPortAvailability.Unavailable + : ApplicationPortAvailability.Available + }; + } + } + + public async ValueTask BeginRevisionAsync( + CancellationToken cancellationToken) + { + cancellationToken.ThrowIfCancellationRequested(); + await _dispatchGate.WaitAsync(cancellationToken).ConfigureAwait(false); + lock (_gate) + { + if (_aborted) + { + _dispatchGate.Release(); + throw new ObjectDisposedException(GetType().FullName); + } + + if (_completeRequested) + { + _dispatchGate.Release(); + throw new InvalidOperationException($"Output port '{Address}' is completed."); + } + } + + return new FlowValueApplicationOutputRevision(this); + } + + public IPreparedApplicationOutput PrepareRevisionOutput(object source) + { + if (source is not ISourceBlock typedSource) + { + throw new InvalidOperationException( + $"Output port '{Address}' requires source payload type '{typeof(global::FluxFlow.Data.FlowValue)}'."); + } + + lock (_gate) + { + ObjectDisposedException.ThrowIf(_aborted, this); + if (_completeRequested) + throw new InvalidOperationException($"Output port '{Address}' is completed."); + } + + return new FlowValuePreparedApplicationOutput(this, typedSource); + } + + public IDisposable Attach(ISourceBlock source) + { + ArgumentNullException.ThrowIfNull(source); + + FlowValueApplicationOutputAttachment attachment; + lock (_gate) + { + ObjectDisposedException.ThrowIf(_aborted, this); + if (_completeRequested) + throw new InvalidOperationException($"Output port '{Address}' is completed."); + + var link = source.LinkTo( + _ingress, + new DataflowLinkOptions { PropagateCompletion = false }); + attachment = new FlowValueApplicationOutputAttachment(this, link); + _attachments.Add(attachment); + _activeSources++; + } + + _ = source.Completion.ContinueWith( + static (task, state) => + { + var value = (FlowValueApplicationOutputAttachment)state!; + if (task.IsFaulted) + value.ReportSourceFault(task.Exception?.GetBaseException() ?? task.Exception!); + value.Dispose(); + }, + attachment, + CancellationToken.None, + TaskContinuationOptions.ExecuteSynchronously, + TaskScheduler.Default); + + return attachment; + } + + public IDisposable Connect( + IApplicationInputPort input, + CompiledApplicationLink link) + { + if (input is IApplicationSignalInputPort signalInput) + { + var signalLink = new FlowValueApplicationSignalOutputLink(this, signalInput, link); + lock (_gate) + { + ObjectDisposedException.ThrowIf(_aborted, this); + if (_completeRequested) + throw new InvalidOperationException($"Output port '{Address}' is completed."); + _links.Add(signalLink); + } + + return signalLink; + } + + if (input is not FlowValueApplicationInputPort typedInput) + { + throw new InvalidOperationException( + $"Link '{link.Source}' to '{link.Target}' requires exact payload type '{typeof(global::FluxFlow.Data.FlowValue)}'."); + } + + var outputLink = new FlowValueApplicationMessageOutputLink(this, typedInput, link); + lock (_gate) + { + ObjectDisposedException.ThrowIf(_aborted, this); + if (_completeRequested) + throw new InvalidOperationException($"Output port '{Address}' is completed."); + _links.Add(outputLink); + } + + return outputLink; + } + + public IApplicationRevisionRoute CreateRevisionRoute( + IApplicationInputPort input, + CompiledApplicationLink link) + { + if (input is IApplicationSignalInputPort signalInput) + return new FlowValueApplicationSignalRevisionRoute(this, signalInput, link); + + if (input is not FlowValueApplicationInputPort typedInput) + { + throw new InvalidOperationException( + $"Link '{link.Source}' to '{link.Target}' requires exact payload type '{typeof(global::FluxFlow.Data.FlowValue)}'."); + } + + return new FlowValueApplicationMessageRevisionRoute(this, typedInput, link); + } + + public FlowValueApplicationOutputReceiveRegistration RegisterReceive(TraceId? traceId) + { + lock (_gate) + { + if (_completeRequested || _aborted) + { + return FlowValueApplicationOutputReceiveRegistration.Completed(new PortReceiveResult + { + Port = Address, + Status = PortReceiveStatus.Completed + }); + } + + if (_activeSources == 0 && _ingress.Count == 0) + { + return FlowValueApplicationOutputReceiveRegistration.Completed(new PortReceiveResult + { + Port = Address, + Status = PortReceiveStatus.Unavailable + }); + } + + var waiter = new FlowValueApplicationOutputReceiveWaiter(this, traceId); + _waiters.Add(waiter); + return new FlowValueApplicationOutputReceiveRegistration(waiter); + } + } + + public PortObserveResult Observe(int capacity) + { + if (capacity <= 0) + throw new ArgumentOutOfRangeException(nameof(capacity), "Observation capacity must be greater than zero."); + + lock (_gate) + { + if (_completeRequested || _aborted) + { + return new PortObserveResult + { + Port = Address, + Status = PortObserveStatus.Completed + }; + } + + if (_activeSources == 0 && _ingress.Count == 0) + { + return new PortObserveResult + { + Port = Address, + Status = PortObserveStatus.Unavailable + }; + } + + var observation = new PortObservation(Address, capacity, RemoveObservation); + _observations.Add(observation); + return new PortObserveResult + { + Port = Address, + Status = PortObserveStatus.Started, + Observation = observation + }; + } + } + + public void Complete() + { + FlowValueApplicationOutputAttachment[] attachments; + lock (_gate) + { + if (_completeRequested || _aborted) + return; + + _completeRequested = true; + attachments = _attachments.ToArray(); + } + + foreach (var attachment in attachments) + attachment.Dispose(); + _ingress.Complete(); + } + + public void Abort() + { + FlowValueApplicationOutputAttachment[] attachments; + lock (_gate) + { + if (_aborted) + return; + + _aborted = true; + _completeRequested = true; + attachments = _attachments.ToArray(); + } + + foreach (var attachment in attachments) + attachment.Dispose(); + + _abort.Cancel(); + ((IDataflowBlock)_ingress).Fault(new OperationCanceledException("The application port runtime was disposed.")); + FinishSubscribers(); + _completion.TrySetResult(); + } + + internal async ValueTask DrainAsync(CancellationToken cancellationToken) + { + while (true) + { + await _dispatchGate.WaitAsync(cancellationToken).ConfigureAwait(false); + try + { + if (_ingress.Count == 0) + return; + } + finally + { + _dispatchGate.Release(); + } + + await Task.Yield(); + } + } + + private async Task PumpAsync() + { + try + { + while (await _ingress.OutputAvailableAsync(_abort.Token).ConfigureAwait(false)) + { + while (true) + { + await _dispatchGate.WaitAsync(_abort.Token).ConfigureAwait(false); + try + { + if (!_ingress.TryReceive(out var message)) + break; + await CaptureAndDispatchAsync(message).ConfigureAwait(false); + } + finally + { + _dispatchGate.Release(); + } + } + } + + await _ingress.Completion.ConfigureAwait(false); + FinishSubscribers(); + _completion.TrySetResult(); + } + catch (OperationCanceledException) when (_abort.IsCancellationRequested) + { + _completion.TrySetResult(); + } + catch (Exception exception) + { + FinishSubscribers(exception.GetBaseException()); + _completion.TrySetException(exception.GetBaseException()); + } + } + + private async ValueTask CaptureAndDispatchAsync(FlowMessage message) + { + if (_capture is not null) + { + try + { + await _capture.CaptureAsync(ToTypedMessage(message), _abort.Token).ConfigureAwait(false); + } + catch (OperationCanceledException) when (_abort.IsCancellationRequested) + { + throw; + } + catch (Exception exception) + { + _report(new ApplicationPortRejection + { + Timestamp = DateTimeOffset.UtcNow, + Port = Address, + CorrelationId = message.CorrelationId, + TraceId = message.TraceId, + MessageId = message.MessageId, + Reason = ApplicationPortRejectionReason.OutputCaptureFailed, + Exception = exception + }); + throw; + } + } + + Dispatch(message); + } + + private void Dispatch(FlowMessage message) + { + _activity(new ApplicationPortActivity( + DateTimeOffset.UtcNow, + ApplicationPortActivityKind.OutputEmitted, + Address, + RelatedPort: null, + message.CorrelationId, + message.TraceId, + message.MessageId)); + + IFlowValueApplicationOutputLink[] links; + var revisionLinks = _revisionRouting.GetRoutes(Address); + FlowValueApplicationOutputReceiveWaiter[] waiters; + PortObservation[] observations; + lock (_gate) + { + links = _links.ToArray(); + waiters = _waiters.ToArray(); + observations = _observations.ToArray(); + } + + foreach (var link in revisionLinks) + link.TryDeliver(message); + + foreach (var link in links) + link.TryDeliver(message); + + foreach (var waiter in waiters) + waiter.TryDeliver(message); + + foreach (var observation in observations) + { + if (observation.TryPost(ToTypedMessage(message))) + continue; + if (!observation.IsActive) + continue; + + var exception = new InvalidOperationException( + $"Observation of output port '{Address}' exceeded its capacity of {observation.Capacity}."); + observation.Fault(exception); + _report(new ApplicationPortRejection + { + Timestamp = DateTimeOffset.UtcNow, + Port = Address, + CorrelationId = message.CorrelationId, + TraceId = message.TraceId, + MessageId = message.MessageId, + Reason = ApplicationPortRejectionReason.ObservationOverflowed, + Exception = exception + }); + } + } + + private void FinishSubscribers(Exception? exception = null) + { + FlowValueApplicationOutputReceiveWaiter[] waiters; + PortObservation[] observations; + lock (_gate) + { + waiters = _waiters.ToArray(); + observations = _observations.ToArray(); + _waiters.Clear(); + _observations.Clear(); + } + + foreach (var waiter in waiters) + waiter.Complete(); + + foreach (var observation in observations) + { + if (exception is null) + observation.Complete(); + else + observation.Fault(exception); + } + } + + internal void RemoveLink(IFlowValueApplicationOutputLink link) + { + lock (_gate) + _links.Remove(link); + } + + internal void RemoveWaiter(FlowValueApplicationOutputReceiveWaiter waiter) + { + lock (_gate) + _waiters.Remove(waiter); + } + + private void RemoveObservation(PortObservation observation) + { + lock (_gate) + _observations.Remove(observation); + } + + internal void RemoveAttachment(FlowValueApplicationOutputAttachment attachment) + { + lock (_gate) + { + if (_attachments.Remove(attachment)) + _activeSources--; + } + } + + internal void ReportSourceFault(Exception exception) + => _report(new ApplicationPortRejection + { + Timestamp = DateTimeOffset.UtcNow, + Port = Address, + Reason = ApplicationPortRejectionReason.SourceFaulted, + Exception = exception + }); + + internal void ReleaseRevision() => _dispatchGate.Release(); + + internal void TryDeliver( + FlowValueApplicationInputPort target, + CompiledApplicationLink link, + FlowMessage message) + { + if (!TryMatch(link, message, target.Address)) + return; + + target.TrySend(message, Address); + } + + internal void TryDeliver( + IApplicationSignalInputPort target, + CompiledApplicationLink link, + FlowMessage message) + { + if (!TryMatch(link, message, target.Address)) + return; + + target.TrySend(ToTypedMessage(message), Address); + } + + internal static FlowMessage ToTypedMessage(FlowMessage message) + => message.IsError + ? message.ConvertError() + : message.ConvertValue(message.Value!); + + private bool TryMatch( + CompiledApplicationLink link, + FlowMessage message, + ApplicationAddress target) + { + if (!link.IsConditional) + return true; + + object? input = message.IsError ? message.Error : message.Value; + var context = new FlowMapContext + { + Variables = new Dictionary(StringComparer.Ordinal) + { + ["input"] = input, + ["message"] = message, + ["payload"] = input + } + }; + + if (!link.TryMatch(context, out var exception)) + { + if (exception is not null) + { + _report(new ApplicationPortRejection + { + Timestamp = DateTimeOffset.UtcNow, + Port = Address, + RelatedPort = target, + CorrelationId = message.CorrelationId, + TraceId = message.TraceId, + MessageId = message.MessageId, + Reason = ApplicationPortRejectionReason.ConditionFailed, + Exception = exception + }); + } + + return false; + } + + return true; + } +} diff --git a/src/Engine/Runtime/FluxFlow.Engine/Ports/FlowValueApplicationOutputSubscriptions.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/FlowValueApplicationOutputSubscriptions.cs new file mode 100644 index 00000000..bc8cd69c --- /dev/null +++ b/src/Engine/Runtime/FluxFlow.Engine/Ports/FlowValueApplicationOutputSubscriptions.cs @@ -0,0 +1,74 @@ +using FluxFlow.Composition.Addressing; +using FluxFlow.Nodes; + +namespace FluxFlow.Engine.Ports; + +internal sealed class FlowValueApplicationOutputReceiveRegistration : IDisposable +{ + private readonly FlowValueApplicationOutputReceiveWaiter? _waiter; + + internal FlowValueApplicationOutputReceiveRegistration(FlowValueApplicationOutputReceiveWaiter waiter) + { + _waiter = waiter; + Task = waiter.Task; + } + + private FlowValueApplicationOutputReceiveRegistration(PortReceiveResult result) + { + Task = System.Threading.Tasks.Task.FromResult(result); + } + + internal Task> Task { get; } + + public void Dispose() => _waiter?.Dispose(); + + internal static FlowValueApplicationOutputReceiveRegistration Completed( + PortReceiveResult result) + => new(result); +} + +internal sealed class FlowValueApplicationOutputReceiveWaiter( + FlowValueApplicationOutputPort owner, + TraceId? traceId) : IDisposable +{ + private readonly TaskCompletionSource> _result = + new(TaskCreationOptions.RunContinuationsAsynchronously); + private int _disposed; + + internal Task> Task => _result.Task; + + internal void TryDeliver(FlowMessage message) + { + if (traceId is not null && message.TraceId != traceId.Value) + return; + if (Interlocked.Exchange(ref _disposed, 1) != 0) + return; + + owner.RemoveWaiter(this); + _result.TrySetResult(new PortReceiveResult + { + Port = owner.Address, + Status = PortReceiveStatus.Received, + Message = FlowValueApplicationOutputPort.ToTypedMessage(message) + }); + } + + internal void Complete() + { + if (Interlocked.Exchange(ref _disposed, 1) != 0) + return; + + owner.RemoveWaiter(this); + _result.TrySetResult(new PortReceiveResult + { + Port = owner.Address, + Status = PortReceiveStatus.Completed + }); + } + + public void Dispose() + { + if (Interlocked.Exchange(ref _disposed, 1) == 0) + owner.RemoveWaiter(this); + } +} diff --git a/src/FluxFlow.Engine/Ports/PortObservation.cs b/src/Engine/Runtime/FluxFlow.Engine/Ports/PortObservation.cs similarity index 100% rename from src/FluxFlow.Engine/Ports/PortObservation.cs rename to src/Engine/Runtime/FluxFlow.Engine/Ports/PortObservation.cs diff --git a/src/FluxFlow.Engine/README.md b/src/Engine/Runtime/FluxFlow.Engine/README.md similarity index 92% rename from src/FluxFlow.Engine/README.md rename to src/Engine/Runtime/FluxFlow.Engine/README.md index 66f862ec..6a2bc347 100644 --- a/src/FluxFlow.Engine/README.md +++ b/src/Engine/Runtime/FluxFlow.Engine/README.md @@ -143,8 +143,8 @@ rejected. Canonical system outputs remain: -- `System.Events.Output` with `FlowMessage`. -- `System.Diagnostics.Output` with `FlowMessage`. +- `System.Events.Output` with canonical `FlowMessage` lifecycle activity. +- `System.Diagnostics.Output` with canonical `FlowMessage` diagnostic activity. System-event delivery is bounded and reliable for accepted events. Diagnostic delivery is bounded and best effort; overflow rejects immediately while @@ -231,6 +231,16 @@ The primary host-level contracts are: `ConfigurationApplicationDefinitionSource`, and `StaticApplicationDefinitionSource`. - operational contracts in `FluxFlow.Engine.Signals`. +- application-lifetime canonical events exposed through `FluxFlowApplication.Events`, + configured with `FluxFlow.Engine.Events.ApplicationEventOptions`. + +Events use native Dataflow links and the existing `FlowEvent` / `FlowMessage` +representation. The library contains no report catalog, filter language, replay +journal or reporting snapshot. Live broadcast can lose observations at bounded +ingress or slow targets. Report definitions, filters, metrics, storage and +dashboard presentation remain consumer-owned. See +[the consumer guide](../../../../docs/45-reporting-consumer-guide.md) and +[the historical sample](../../../../samples/FluxFlow.ReportingSample/README.md). Retired Engine and Composition document shapes are rejected. Convert stored documents outside the runtime before loading them, then persist the canonical diff --git a/src/Engine/Runtime/FluxFlow.Engine/Signals/ApplicationDiagnosticNames.cs b/src/Engine/Runtime/FluxFlow.Engine/Signals/ApplicationDiagnosticNames.cs new file mode 100644 index 00000000..8196a9d2 --- /dev/null +++ b/src/Engine/Runtime/FluxFlow.Engine/Signals/ApplicationDiagnosticNames.cs @@ -0,0 +1,10 @@ +namespace FluxFlow.Engine.Signals; + +public static class ApplicationDiagnosticNames +{ + public const string InputAccepted = "flow.port.input.accepted"; + public const string OutputEmitted = "flow.port.output.emitted"; + public const string PortRejected = "flow.port.rejected"; + public const string RequestCompleted = "flow.port.request.completed"; + public const string SystemEventDeliveryFailed = "flow.system.event.delivery.failed"; +} diff --git a/src/FluxFlow.Engine/Signals/ApplicationRuntimeInstrumentation.cs b/src/Engine/Runtime/FluxFlow.Engine/Signals/ApplicationRuntimeInstrumentation.cs similarity index 70% rename from src/FluxFlow.Engine/Signals/ApplicationRuntimeInstrumentation.cs rename to src/Engine/Runtime/FluxFlow.Engine/Signals/ApplicationRuntimeInstrumentation.cs index 62303bd2..3151294a 100644 --- a/src/FluxFlow.Engine/Signals/ApplicationRuntimeInstrumentation.cs +++ b/src/Engine/Runtime/FluxFlow.Engine/Signals/ApplicationRuntimeInstrumentation.cs @@ -28,16 +28,16 @@ public static class ApplicationRuntimeInstrumentation Meter.CreateHistogram("fluxflow.runtime.diagnostic.measurement"); internal static void RecordDiagnostic( - FlowMessage message, + FlowMessage message, ILogger? logger) { try { - var diagnostic = message.Value; + var diagnostic = message.ToFlowEvent(); var tags = CreateTags(diagnostic, message); DiagnosticsAccepted.Add(1, tags); - if (diagnostic.Measurement is { } measurement) + if (diagnostic.Measurements.TryGetValue("value", out var measurement)) DiagnosticMeasurements.Record(measurement, tags); logger?.Log( @@ -50,20 +50,22 @@ internal static void RecordDiagnostic( if (DiagnosticSource.IsEnabled(DiagnosticEventName)) DiagnosticSource.Write(DiagnosticEventName, message); - if (ShouldCreateActivity(diagnostic.Kind)) + var operationKind = Dimension(diagnostic, "kind"); + if (ShouldCreateActivity(operationKind)) { using var activity = ActivitySource.StartActivity( diagnostic.Name, - diagnostic.Kind is ApplicationDiagnosticKind.Input or ApplicationDiagnosticKind.Output + operationKind is "Input" or "Output" ? ActivityKind.Producer : ActivityKind.Internal); if (activity is not null) { activity.SetTag("flow.trace_id", message.TraceId.Value); activity.SetTag("flow.message_id", message.MessageId.Value); - activity.SetTag("flow.diagnostic.kind", diagnostic.Kind.ToString()); - activity.SetTag("flow.diagnostic.subject", diagnostic.Subject); - activity.SetTag("flow.diagnostic.duration_ms", diagnostic.Duration?.TotalMilliseconds); + activity.SetTag("flow.diagnostic.kind", operationKind); + activity.SetTag("flow.diagnostic.subject", Dimension(diagnostic, "subject")); + activity.SetTag("flow.diagnostic.duration_ms", + diagnostic.Measurements.GetValueOrDefault("duration.ms")); } } } @@ -86,7 +88,7 @@ internal static void RecordDiagnosticDrop() } internal static void RecordSystemEvent( - FlowMessage message, + FlowMessage message, bool accepted) { try @@ -106,37 +108,36 @@ internal static void RecordSystemEvent( } private static TagList CreateTags( - ApplicationDiagnostic diagnostic, - FlowMessage message) + FlowEvent diagnostic, + FlowMessage message) { var tags = new TagList { { "flow.diagnostic.name", diagnostic.Name }, - { "flow.diagnostic.kind", diagnostic.Kind.ToString() }, + { "flow.diagnostic.kind", Dimension(diagnostic, "kind") ?? diagnostic.Kind.ToString() }, { "flow.diagnostic.level", diagnostic.Level.ToString() }, - { "flow.diagnostic.subject", diagnostic.Subject }, + { "flow.diagnostic.subject", Dimension(diagnostic, "subject") }, { "flow.trace_id", message.TraceId.Value } }; - if (!string.IsNullOrWhiteSpace(diagnostic.Unit)) - tags.Add("flow.diagnostic.unit", diagnostic.Unit); + var unit = Dimension(diagnostic, "unit"); + if (!string.IsNullOrWhiteSpace(unit)) + tags.Add("flow.diagnostic.unit", unit); return tags; } - private static bool ShouldCreateActivity(ApplicationDiagnosticKind kind) - => kind is ApplicationDiagnosticKind.Input or - ApplicationDiagnosticKind.Output or - ApplicationDiagnosticKind.Timing or - ApplicationDiagnosticKind.Trace; + private static string? Dimension(FlowEvent @event, string name) + => @event.Dimensions.TryGetValue(name, out var value) ? value?.ToString() : null; - private static LogLevel MapLevel(ApplicationDiagnosticLevel level) + private static bool ShouldCreateActivity(string? kind) + => kind is "Input" or "Output" or "Timing" or "Trace"; + + private static LogLevel MapLevel(FlowEventLevel level) => level switch { - ApplicationDiagnosticLevel.Trace => LogLevel.Trace, - ApplicationDiagnosticLevel.Debug => LogLevel.Debug, - ApplicationDiagnosticLevel.Information => LogLevel.Information, - ApplicationDiagnosticLevel.Warning => LogLevel.Warning, - ApplicationDiagnosticLevel.Error => LogLevel.Error, - ApplicationDiagnosticLevel.Critical => LogLevel.Critical, + FlowEventLevel.Trace => LogLevel.Trace, + FlowEventLevel.Information => LogLevel.Information, + FlowEventLevel.Warning => LogLevel.Warning, + FlowEventLevel.Error => LogLevel.Error, _ => LogLevel.None }; } diff --git a/src/FluxFlow.Engine/Signals/ApplicationRuntimeSignals.cs b/src/Engine/Runtime/FluxFlow.Engine/Signals/ApplicationRuntimeSignals.cs similarity index 59% rename from src/FluxFlow.Engine/Signals/ApplicationRuntimeSignals.cs rename to src/Engine/Runtime/FluxFlow.Engine/Signals/ApplicationRuntimeSignals.cs index 94afb0da..04ebb6f8 100644 --- a/src/FluxFlow.Engine/Signals/ApplicationRuntimeSignals.cs +++ b/src/Engine/Runtime/FluxFlow.Engine/Signals/ApplicationRuntimeSignals.cs @@ -9,32 +9,42 @@ internal sealed class ApplicationRuntimeSignals : IDisposable, IAsyncDisposable { internal const int Capacity = 256; - private readonly FlowFanoutSource> _systemEvents; - private readonly FlowFanoutSource> _diagnostics = new(); + private readonly FlowFanoutSource _systemEvents; + private readonly FlowFanoutSource _diagnostics = new(); + private readonly FlowFanoutSource _activity = new(); private readonly ILogger? _logger; private int _stopped; public ApplicationRuntimeSignals(ILogger? logger) { _logger = logger; - _systemEvents = new FlowFanoutSource>( + _systemEvents = new FlowFanoutSource( deliveryFailure: ReportSystemEventDeliveryFailure); } - public ISourceBlock> SystemEvents => _systemEvents; + public ISourceBlock SystemEvents => _systemEvents; - public ISourceBlock> Diagnostics => _diagnostics; + public ISourceBlock Diagnostics => _diagnostics; - public Task Completion => Task.WhenAll(_systemEvents.Completion, _diagnostics.Completion); + public ISourceBlock Activity => _activity; - public async ValueTask PublishSystemEventAsync( - FlowMessage message, + internal Action? EventObserver { get; set; } + + public Task Completion => Task.WhenAll( + _systemEvents.Completion, + _diagnostics.Completion, + _activity.Completion); + + internal async ValueTask PublishSystemEventAsync( + FlowMessage message, CancellationToken cancellationToken) { ArgumentNullException.ThrowIfNull(message); - ValidateSystemEvent(message.Value); + ValidateActivity(message); cancellationToken.ThrowIfCancellationRequested(); + EventObserver?.Invoke(message); + if (Volatile.Read(ref _stopped) != 0) { ApplicationRuntimeInstrumentation.RecordSystemEvent(message, accepted: false); @@ -45,6 +55,8 @@ public async ValueTask PublishSystemEventAsync( .SendWithBackpressureAsync(message, cancellationToken) .ConfigureAwait(false); ApplicationRuntimeInstrumentation.RecordSystemEvent(message, accepted); + if (accepted) + _activity.Post(message); return new SystemEventPublishResult { Status = accepted @@ -53,10 +65,12 @@ public async ValueTask PublishSystemEventAsync( }; } - public bool TryPublishDiagnostic(FlowMessage message) + internal bool TryPublishDiagnostic(FlowMessage message) { ArgumentNullException.ThrowIfNull(message); - ValidateDiagnostic(message.Value); + ValidateActivity(message); + + EventObserver?.Invoke(message); if (Volatile.Read(ref _stopped) != 0 || !_diagnostics.Post(message)) { @@ -65,9 +79,17 @@ public bool TryPublishDiagnostic(FlowMessage message) } ApplicationRuntimeInstrumentation.RecordDiagnostic(message, _logger); + _activity.Post(message); return true; } + public IDisposable AttachActivity(ISourceBlock source) + { + ArgumentNullException.ThrowIfNull(source); + var sink = new ActionBlock(message => _activity.Post(message)); + return source.LinkTo(sink, new DataflowLinkOptions { PropagateCompletion = true }); + } + public void Complete() { if (Interlocked.Exchange(ref _stopped, 1) != 0) @@ -75,6 +97,7 @@ public void Complete() _systemEvents.Complete(); _diagnostics.Complete(); + _activity.Complete(); } public void Dispose() @@ -82,6 +105,7 @@ public void Dispose() Interlocked.Exchange(ref _stopped, 1); _systemEvents.Dispose(); _diagnostics.Dispose(); + _activity.Dispose(); } public async ValueTask DisposeAsync() @@ -89,6 +113,7 @@ public async ValueTask DisposeAsync() Interlocked.Exchange(ref _stopped, 1); await _systemEvents.DisposeAsync().ConfigureAwait(false); await _diagnostics.DisposeAsync().ConfigureAwait(false); + await _activity.DisposeAsync().ConfigureAwait(false); } private void ReportSystemEventDeliveryFailure(Exception exception) @@ -98,27 +123,21 @@ private void ReportSystemEventDeliveryFailure(Exception exception) exception.Message, "runtime", isTransient: true); - var diagnostic = new ApplicationDiagnostic + var diagnostic = new FlowEvent { Timestamp = DateTimeOffset.UtcNow, Name = ApplicationDiagnosticNames.SystemEventDeliveryFailed, - Kind = ApplicationDiagnosticKind.Runtime, - Level = ApplicationDiagnosticLevel.Warning, + Kind = FlowEventKind.Diagnostic, + Level = FlowEventLevel.Warning, Message = "A system-event subscriber stopped accepting messages and was detached.", - Error = error + Details = FlowValue.From(error) }; - TryPublishDiagnostic(FlowMessage.Create(diagnostic)); + TryPublishDiagnostic(ApplicationSignalMessage.Create(diagnostic)); } - private static void ValidateSystemEvent(ApplicationSystemEvent systemEvent) + private static void ValidateActivity(FlowMessage message) { - ArgumentNullException.ThrowIfNull(systemEvent); - ArgumentException.ThrowIfNullOrWhiteSpace(systemEvent.Name); - } - - private static void ValidateDiagnostic(ApplicationDiagnostic diagnostic) - { - ArgumentNullException.ThrowIfNull(diagnostic); - ArgumentException.ThrowIfNullOrWhiteSpace(diagnostic.Name); + ArgumentNullException.ThrowIfNull(message); + _ = message.ToFlowEvent(); } } diff --git a/src/Engine/Runtime/FluxFlow.Engine/Signals/ApplicationSignalMessage.cs b/src/Engine/Runtime/FluxFlow.Engine/Signals/ApplicationSignalMessage.cs new file mode 100644 index 00000000..b0eab5d8 --- /dev/null +++ b/src/Engine/Runtime/FluxFlow.Engine/Signals/ApplicationSignalMessage.cs @@ -0,0 +1,37 @@ +using FluxFlow.Data; +using FluxFlow.Nodes; +using FluxFlow.Composition.Addressing; + +namespace FluxFlow.Engine.Signals; + +internal static class ApplicationSignalMessage +{ + internal static FlowMessage Create( + FlowEvent @event, + CorrelationId? correlationId = null, + TraceId? traceId = null, + MessageId? causationId = null, + ApplicationAddress? source = null) + { + ArgumentNullException.ThrowIfNull(@event); + var canonical = @event.ToMessage(); + var headers = canonical.Headers.ToDictionary(pair => pair.Key, pair => pair.Value, StringComparer.Ordinal); + if (source is not null) + { + headers[FlowEventHeaders.Source] = source.Value; + if (source.Kind == ApplicationAddressKind.WorkflowPort) + { + headers[FlowEventHeaders.Workflow] = source.Segments[0]; + headers[FlowEventHeaders.Component] = source.Segments[1]; + } + } + return FlowMessage.Restore( + canonical.Value ?? FlowValue.Null, + canonical.MessageId, + traceId is { IsEmpty: false } ? traceId.Value : canonical.TraceId, + @event.Timestamp, + correlationId is { IsEmpty: false } ? correlationId : canonical.CorrelationId, + causationId, + headers); + } +} diff --git a/src/Engine/Runtime/FluxFlow.Engine/Signals/ApplicationSystemEventNames.cs b/src/Engine/Runtime/FluxFlow.Engine/Signals/ApplicationSystemEventNames.cs new file mode 100644 index 00000000..05316956 --- /dev/null +++ b/src/Engine/Runtime/FluxFlow.Engine/Signals/ApplicationSystemEventNames.cs @@ -0,0 +1,24 @@ +namespace FluxFlow.Engine.Signals; + +public static class ApplicationSystemEventNames +{ + public const string RuntimeCompleting = "flow.runtime.completing"; + public const string ComponentFaulted = "flow.component.faulted"; + public const string LinkConditionFailed = "flow.link.condition.failed"; + public const string LinkTargetRejected = "flow.link.target.rejected"; + public const string ResourceChanged = "flow.resource.changed"; + public const string RevisionChanged = "flow.revision.changed"; +} + +internal enum SystemEventPublishStatus +{ + Accepted = 1, + Completed = 2 +} + +internal sealed record SystemEventPublishResult +{ + public required SystemEventPublishStatus Status { get; init; } + + public bool IsAccepted => Status == SystemEventPublishStatus.Accepted; +} diff --git a/src/FluxFlow.Components.Designer/CompatibilitySuppressions.xml b/src/FluxFlow.Components.Designer/CompatibilitySuppressions.xml deleted file mode 100644 index cc6471ce..00000000 --- a/src/FluxFlow.Components.Designer/CompatibilitySuppressions.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - CP0002 - M:FluxFlow.Components.Designer.ComponentRegistrationBuilder.AddInput``1(System.String,System.String,System.String,System.Int32,System.String,System.Boolean,FluxFlow.Composition.ComponentPortLinkCardinality) - lib/net10.0/FluxFlow.Components.Designer.dll - lib/net10.0/FluxFlow.Components.Designer.dll - true - - - CP0002 - M:FluxFlow.Components.Designer.ComponentRegistrationBuilder.AddOutput``1(System.String,System.String,System.String,System.Int32,System.String,System.Boolean,FluxFlow.Composition.ComponentPortLinkCardinality) - lib/net10.0/FluxFlow.Components.Designer.dll - lib/net10.0/FluxFlow.Components.Designer.dll - true - - - CP0002 - M:FluxFlow.Components.Designer.ComponentRegistrationBuilder.AddSignalInput(System.String,System.String,System.String,System.Int32,System.String,System.Boolean,FluxFlow.Composition.ComponentPortLinkCardinality) - lib/net10.0/FluxFlow.Components.Designer.dll - lib/net10.0/FluxFlow.Components.Designer.dll - true - - - CP0002 - M:FluxFlow.Components.Designer.ComponentRegistrationBuilder.AddInput``1(System.String,System.String,System.String,System.Int32,System.String,System.Boolean,FluxFlow.Composition.ComponentPortLinkCardinality) - lib/net8.0/FluxFlow.Components.Designer.dll - lib/net8.0/FluxFlow.Components.Designer.dll - true - - - CP0002 - M:FluxFlow.Components.Designer.ComponentRegistrationBuilder.AddOutput``1(System.String,System.String,System.String,System.Int32,System.String,System.Boolean,FluxFlow.Composition.ComponentPortLinkCardinality) - lib/net8.0/FluxFlow.Components.Designer.dll - lib/net8.0/FluxFlow.Components.Designer.dll - true - - - CP0002 - M:FluxFlow.Components.Designer.ComponentRegistrationBuilder.AddSignalInput(System.String,System.String,System.String,System.Int32,System.String,System.Boolean,FluxFlow.Composition.ComponentPortLinkCardinality) - lib/net8.0/FluxFlow.Components.Designer.dll - lib/net8.0/FluxFlow.Components.Designer.dll - true - - diff --git a/src/FluxFlow.Components.FileSystem/Nodes/FileSystemOperationPipeline.cs b/src/FluxFlow.Components.FileSystem/Nodes/FileSystemOperationPipeline.cs deleted file mode 100644 index 00e9120e..00000000 --- a/src/FluxFlow.Components.FileSystem/Nodes/FileSystemOperationPipeline.cs +++ /dev/null @@ -1,40 +0,0 @@ -using FluxFlow.Data; -using FluxFlow.Nodes; - -namespace FluxFlow.Components.FileSystem.Nodes; - -internal sealed class FileSystemOperationPipeline : FlowNode -{ - private readonly Func, CancellationToken, Task>> _process; - - public FileSystemOperationPipeline( - int boundedCapacity, - Func, CancellationToken, Task>> process) - : base(CreateOptions(boundedCapacity)) - { - ArgumentNullException.ThrowIfNull(process); - _process = process; - } - - public void PublishEvent(FlowEvent @event) - { - ArgumentNullException.ThrowIfNull(@event); - EmitEvent(@event); - } - - protected override async Task ProcessAsync(FlowMessage message) - { - var result = await _process(message, Stopping).ConfigureAwait(false); - await EmitAsync(result, Stopping).ConfigureAwait(false); - } - - private static FlowNodeOptions CreateOptions(int boundedCapacity) - { - ArgumentOutOfRangeException.ThrowIfLessThan(boundedCapacity, 1); - return new FlowNodeOptions - { - InputCapacity = boundedCapacity, - OutputCapacity = boundedCapacity - }; - } -} diff --git a/src/FluxFlow.Components.Http.AspNetCore/HttpTriggerNode.cs b/src/FluxFlow.Components.Http.AspNetCore/HttpTriggerNode.cs deleted file mode 100644 index e6f1b388..00000000 --- a/src/FluxFlow.Components.Http.AspNetCore/HttpTriggerNode.cs +++ /dev/null @@ -1,51 +0,0 @@ -using FluxFlow.Components.Http.Contracts; -using FluxFlow.Components.RequestReply; -using FluxFlow.Nodes; -using System.Threading.Tasks.Dataflow; - -namespace FluxFlow.Components.Http.AspNetCore; - -/// -/// The HTTP trigger as a component. It is given its inbound request source (injected, -/// keyed) and uses a to -/// correlate replies back to callers. It exposes the graph-facing ports: requests on -/// , responses back on . The endpoint and the -/// transport never appear here — only the request source and the coordinator. -/// -public sealed class HttpTriggerNode : IFlowNode -{ - private readonly RequestReplyCoordinator _coordinator; - private readonly IDisposable _link; - - public HttpTriggerNode( - ISourceBlock> requests, - RequestReplyOptions? options = null, - TimeProvider? clock = null) - { - ArgumentNullException.ThrowIfNull(requests); - _coordinator = new RequestReplyCoordinator(options, clock); - _link = requests.LinkTo( - _coordinator.Incoming, - new DataflowLinkOptions { PropagateCompletion = true }); - } - - /// Inbound requests for the graph to handle. - public ISourceBlock> Output => _coordinator.Output; - - /// Where the graph posts the correlated reply. - public ITargetBlock> Responses => _coordinator.Responses; - - public ISourceBlock Events => _coordinator.Events; - - public Task Completion => _coordinator.Completion; - - public void Complete() => _coordinator.Complete(); - - public void Fault(Exception exception) => _coordinator.Fault(exception); - - public async ValueTask DisposeAsync() - { - _link.Dispose(); - await _coordinator.DisposeAsync().ConfigureAwait(false); - } -} diff --git a/src/FluxFlow.Components.Resilience/Nodes/FlowRetryNode.cs b/src/FluxFlow.Components.Resilience/Nodes/FlowRetryNode.cs deleted file mode 100644 index aa3749fb..00000000 --- a/src/FluxFlow.Components.Resilience/Nodes/FlowRetryNode.cs +++ /dev/null @@ -1,759 +0,0 @@ -using System.Text.Json; -using FluxFlow.Components.Resilience.Contracts; -using FluxFlow.Components.Resilience.Diagnostics; -using FluxFlow.Components.Resilience.Options; -using FluxFlow.Coordination; -using FluxFlow.Data; -using FluxFlow.Nodes; -using FluxFlow.Resilience; -using System.Threading.Tasks.Dataflow; - -using DataFlowError = FluxFlow.Data.FlowError; - -namespace FluxFlow.Components.Resilience.Nodes; - -public sealed class FlowRetryNode : FlowRetryNode -{ - public FlowRetryNode( - FlowRetryOptions? options = null, - TimeProvider? clock = null, - IRetryJitterSource? jitterSource = null) - : base(options, clock, jitterSource) - { - } -} - -public class FlowRetryNode : IFlowNode -{ - private readonly object _gate = new(); - private readonly FlowRetryOptions _options; - private readonly TimeProvider _clock; - private readonly IRetryJitterSource _jitterSource; - private readonly PendingExchangeCoordinator _attempts; - private readonly Dictionary _operations = []; - private readonly HashSet _observations = []; - private readonly CancellationTokenSource _stopping = new(); - private readonly ActionBlock> _input; - private readonly FlowOutput>> _output; - private readonly BroadcastBlock _events = new(static @event => @event); - private readonly TaskCompletionSource _completion = - new(TaskCreationOptions.RunContinuationsAsynchronously); - private readonly string _attemptHeaderName; - private Exception? _fatalError; - private int _disposed; - - public FlowRetryNode( - FlowRetryOptions? options = null, - TimeProvider? clock = null, - IRetryJitterSource? jitterSource = null) - { - _options = FlowRetryOptionValidation.Validate(options); - _clock = clock ?? TimeProvider.System; - _jitterSource = jitterSource ?? RandomRetryJitterSource.Shared; - _attemptHeaderName = $"flow.retry.attempt.{Guid.NewGuid():N}"; - _attempts = new PendingExchangeCoordinator( - new PendingExchangeCoordinatorOptions - { - DefaultTimeout = TimeSpan.FromMilliseconds(_options.AttemptTimeoutMilliseconds), - MaxPending = _options.Capacity, - SettledKeyCapacity = Math.Max(_options.Capacity, 4096) - }, - _clock); - _output = new FlowOutput>>( - new FlowOutputOptions { Capacity = _options.Capacity }); - _input = new ActionBlock>( - ProcessInputAsync, - new ExecutionDataflowBlockOptions - { - BoundedCapacity = _options.Capacity, - EnsureOrdered = true, - MaxDegreeOfParallelism = 1 - }); - - Ack = new RetrySignalTarget(HandleFeedbackAsync, Completion, RetryFeedbackKind.Ack); - Nak = new RetrySignalTarget(HandleFeedbackAsync, Completion, RetryFeedbackKind.Nak); - Cancel = new RetrySignalTarget(HandleFeedbackAsync, Completion, RetryFeedbackKind.Cancel); - _ = MonitorAsync(); - _ = ObserveOutputFailureAsync(); - } - - public ITargetBlock> Input => _input; - - public IFlowSignalTarget Ack { get; } - - public IFlowSignalTarget Nak { get; } - - public IFlowSignalTarget Cancel { get; } - - public ISourceBlock>> Output => _output; - - public ISourceBlock Events => _events; - - public Task Completion => _completion.Task; - - public void Complete() => _input.Complete(); - - public void Fault(Exception exception) - { - ArgumentNullException.ThrowIfNull(exception); - RecordFatalError(exception); - ((IDataflowBlock)_input).Fault(exception); - } - - public async ValueTask DisposeAsync() - { - if (Interlocked.Exchange(ref _disposed, 1) != 0) - return; - - Complete(); - try - { - await Completion.ConfigureAwait(false); - } - catch - { - // Completion remains the authoritative unexpected-fault surface. - } - finally - { - await _attempts.DisposeAsync().ConfigureAwait(false); - await _output.DisposeAsync().ConfigureAwait(false); - _stopping.Dispose(); - } - } - - private async Task ProcessInputAsync(FlowMessage message) - { - ArgumentNullException.ThrowIfNull(message); - if (message.IsError) - { - if (!await _output.SendAsync( - message.WithError>(message.Error!), - _stopping.Token).ConfigureAwait(false)) - { - throw new InvalidOperationException("Retry output declined an accepted error."); - } - return; - } - - RetryOperation? operation; - RetryFailureReason rejection; - lock (_gate) - { - if (_operations.ContainsKey(message.TraceId)) - { - operation = null; - rejection = RetryFailureReason.Duplicate; - } - else if (_operations.Count >= _options.Capacity) - { - operation = null; - rejection = RetryFailureReason.CapacityReached; - } - else - { - operation = new RetryOperation( - message, - new RetryStateMachine(FlowRetryOptionValidation.CreatePolicy(_options)), - CancellationTokenSource.CreateLinkedTokenSource(_stopping.Token)); - _operations.Add(message.TraceId, operation); - rejection = RetryFailureReason.None; - } - } - - if (operation is null) - { - await EmitTerminalAsync( - message, - attempt: 0, - startedAt: _clock.GetUtcNow(), - RetrySignalStatus.Rejected, - RetryResultKinds.Rejected, - rejection, - nextDelay: null, - causationId: message.MessageId).ConfigureAwait(false); - return; - } - - var directive = operation.StateMachine.Begin(_clock.GetUtcNow()); - await BeginAttemptAsync(operation, directive).ConfigureAwait(false); - } - - private async Task BeginAttemptAsync(RetryOperation operation, RetryDirective directive) - { - var key = new RetryAttemptKey(operation.Message.TraceId, directive.Attempt); - lock (_gate) - { - if (operation.Terminal) - return; - operation.State = directive.State; - operation.CurrentAttempt = directive.Attempt; - } - - var start = _attempts.TryStart( - key, - operation, - TimeSpan.FromMilliseconds(_options.AttemptTimeoutMilliseconds)); - if (start.Status != PendingExchangeStartStatus.Accepted || start.Completion is null) - { - var reason = start.Status switch - { - PendingExchangeStartStatus.Duplicate => RetryFailureReason.Duplicate, - PendingExchangeStartStatus.CapacityReached => RetryFailureReason.CapacityReached, - _ => RetryFailureReason.Stopped - }; - if (TryClaimTerminal(operation)) - { - await EmitTerminalAsync( - operation.Message, - directive.Attempt, - directive.State.StartedAt, - RetrySignalStatus.Rejected, - RetryResultKinds.Rejected, - reason, - nextDelay: null, - causationId: operation.LastMessageId).ConfigureAwait(false); - } - return; - } - - TrackObservation(ObserveAttemptAsync(operation, key, start.Completion)); - var attemptOutput = await EmitAsync( - operation.Message, - RetryResultKinds.Attempt, - RetrySignalStatus.Attempt, - directive.Attempt, - directive.State.StartedAt, - RetryFailureReason.None, - nextDelay: null, - error: null, - causationId: operation.LastMessageId).ConfigureAwait(false); - lock (_gate) - operation.LastMessageId = attemptOutput.MessageId; - EmitEvent( - operation.Message, - RetryDiagnosticNames.Attempted, - FlowEventLevel.Information, - directive.Attempt, - RetryFailureReason.None, - nextDelay: null); - } - - private async Task ObserveAttemptAsync( - RetryOperation operation, - RetryAttemptKey key, - Task> completionTask) - { - try - { - var completion = await completionTask.ConfigureAwait(false); - if (!IsCurrent(operation, key.Attempt)) - return; - - switch (completion.Kind) - { - case PendingExchangeCompletionKind.Resolved when completion.Outcome?.Kind == RetryFeedbackKind.Ack: - await CompleteOperationAsync(operation, completion.Outcome.MessageId).ConfigureAwait(false); - break; - case PendingExchangeCompletionKind.Resolved when completion.Outcome?.Kind == RetryFeedbackKind.Cancel: - await CancelOperationAsync(operation, RetryFailureReason.Cancelled, completion.Outcome.MessageId).ConfigureAwait(false); - break; - case PendingExchangeCompletionKind.Resolved when completion.Outcome?.Kind == RetryFeedbackKind.Nak: - await RetryOperationAsync(operation, RetryFailureReason.Nak, completion.Outcome.MessageId).ConfigureAwait(false); - break; - case PendingExchangeCompletionKind.TimedOut: - await RetryOperationAsync(operation, RetryFailureReason.Timeout, operation.LastMessageId).ConfigureAwait(false); - break; - case PendingExchangeCompletionKind.Stopped: - case PendingExchangeCompletionKind.Cancelled: - await CancelOperationAsync(operation, RetryFailureReason.Stopped, operation.LastMessageId).ConfigureAwait(false); - break; - case PendingExchangeCompletionKind.Faulted: - break; - } - } - catch (Exception exception) - { - RecordFatalError(exception); - } - } - - private async Task CompleteOperationAsync(RetryOperation operation, MessageId causationId) - { - if (!TryClaimTerminal(operation)) - return; - - await EmitTerminalAsync( - operation.Message, - operation.CurrentAttempt, - operation.State.StartedAt, - RetrySignalStatus.Completed, - RetryResultKinds.Completed, - RetryFailureReason.None, - nextDelay: null, - causationId).ConfigureAwait(false); - EmitEvent( - operation.Message, - RetryDiagnosticNames.Completed, - FlowEventLevel.Information, - operation.CurrentAttempt, - RetryFailureReason.None, - nextDelay: null); - } - - private async Task RetryOperationAsync( - RetryOperation operation, - RetryFailureReason reason, - MessageId? causationId) - { - RetryDirective directive; - lock (_gate) - { - if (operation.Terminal) - return; - directive = operation.StateMachine.AfterFailure( - operation.State, - _clock.GetUtcNow(), - _jitterSource.NextSample()); - operation.State = directive.State; - } - - if (directive.Kind == RetryDirectiveKind.Exhausted) - { - await ExhaustOperationAsync(operation, reason, causationId).ConfigureAwait(false); - return; - } - - var scheduledOutput = await EmitAsync( - operation.Message, - RetryResultKinds.Scheduled, - RetrySignalStatus.RetryScheduled, - operation.CurrentAttempt, - operation.State.StartedAt, - reason, - directive.Delay, - CreateError(reason, operation.CurrentAttempt, RetrySignalStatus.RetryScheduled, directive.Delay), - causationId).ConfigureAwait(false); - lock (_gate) - operation.LastMessageId = scheduledOutput.MessageId; - EmitEvent( - operation.Message, - RetryDiagnosticNames.Scheduled, - FlowEventLevel.Warning, - operation.CurrentAttempt, - reason, - directive.Delay); - - try - { - if (directive.Delay > TimeSpan.Zero) - { - await Task.Delay( - directive.Delay, - _clock, - operation.Token).ConfigureAwait(false); - } - } - catch (OperationCanceledException) when (operation.Token.IsCancellationRequested) - { - await CancelOperationAsync( - operation, - RetryFailureReason.Stopped, - operation.LastMessageId).ConfigureAwait(false); - return; - } - - lock (_gate) - { - if (operation.Terminal) - return; - directive = operation.StateMachine.AfterDelay(operation.State, _clock.GetUtcNow()); - operation.State = directive.State; - } - - if (directive.Kind == RetryDirectiveKind.Exhausted) - { - await ExhaustOperationAsync(operation, reason, operation.LastMessageId).ConfigureAwait(false); - return; - } - - await BeginAttemptAsync(operation, directive).ConfigureAwait(false); - } - - private async Task ExhaustOperationAsync( - RetryOperation operation, - RetryFailureReason reason, - MessageId? causationId) - { - if (!TryClaimTerminal(operation)) - return; - - await EmitTerminalAsync( - operation.Message, - operation.CurrentAttempt, - operation.State.StartedAt, - RetrySignalStatus.Exhausted, - RetryResultKinds.Exhausted, - reason, - nextDelay: null, - causationId).ConfigureAwait(false); - EmitEvent( - operation.Message, - RetryDiagnosticNames.Exhausted, - FlowEventLevel.Warning, - operation.CurrentAttempt, - reason, - nextDelay: null); - } - - private async Task CancelOperationAsync( - RetryOperation operation, - RetryFailureReason reason, - MessageId? causationId) - { - if (!TryClaimTerminal(operation)) - return; - - await EmitTerminalAsync( - operation.Message, - operation.CurrentAttempt, - operation.State.StartedAt, - RetrySignalStatus.Cancelled, - RetryResultKinds.Cancelled, - reason, - nextDelay: null, - causationId).ConfigureAwait(false); - EmitEvent( - operation.Message, - RetryDiagnosticNames.Cancelled, - FlowEventLevel.Information, - operation.CurrentAttempt, - reason, - nextDelay: null); - } - - private async ValueTask HandleFeedbackAsync( - TraceId traceId, - IReadOnlyDictionary headers, - RetryFeedback feedback, - CancellationToken cancellationToken) - { - cancellationToken.ThrowIfCancellationRequested(); - if (!TryReadAttempt(headers, out var attempt)) - { - EmitIgnoredFeedback(traceId, feedback.Kind, "missing-attempt"); - return false; - } - - var key = new RetryAttemptKey(traceId, attempt); - var result = _attempts.TryResolve(key, feedback); - if (result.Status == PendingExchangeFeedbackStatus.Resolved) - return true; - - if (feedback.Kind == RetryFeedbackKind.Cancel && TryClaimWaitingCancellation(traceId, attempt, out var operation)) - { - await CancelOperationAsync(operation, RetryFailureReason.Cancelled, feedback.MessageId).ConfigureAwait(false); - return true; - } - - EmitIgnoredFeedback(traceId, feedback.Kind, result.Status.ToString()); - return false; - } - - private bool TryClaimWaitingCancellation(TraceId traceId, int attempt, out RetryOperation operation) - { - lock (_gate) - { - if (_operations.TryGetValue(traceId, out operation!) && - !operation.Terminal && - operation.CurrentAttempt == attempt && - operation.State.Status == RetryStateStatus.Waiting) - { - return true; - } - } - - operation = null!; - return false; - } - - private bool TryClaimTerminal(RetryOperation operation) - { - lock (_gate) - { - if (operation.Terminal) - return false; - operation.Terminal = true; - _operations.Remove(operation.Message.TraceId); - } - - operation.Cancellation.Cancel(); - operation.Cancellation.Dispose(); - return true; - } - - private bool IsCurrent(RetryOperation operation, int attempt) - { - lock (_gate) - return !operation.Terminal && operation.CurrentAttempt == attempt; - } - - private bool TryReadAttempt(IReadOnlyDictionary headers, out int attempt) - { - attempt = 0; - if (!headers.TryGetValue(_attemptHeaderName, out var value)) - return false; - return int.TryParse( - value, - System.Globalization.NumberStyles.None, - System.Globalization.CultureInfo.InvariantCulture, - out attempt) && attempt > 0; - } - - private Task EmitTerminalAsync( - FlowMessage message, - int attempt, - DateTimeOffset startedAt, - RetrySignalStatus status, - string resultKind, - RetryFailureReason reason, - TimeSpan? nextDelay, - MessageId? causationId) - => EmitAsync( - message, - resultKind, - status, - attempt, - startedAt, - reason, - nextDelay, - status is RetrySignalStatus.Completed - ? null - : CreateError(reason, attempt, status, nextDelay), - causationId); - - private async Task>> EmitAsync( - FlowMessage message, - string resultKind, - RetrySignalStatus status, - int attempt, - DateTimeOffset startedAt, - RetryFailureReason reason, - TimeSpan? nextDelay, - DataFlowError? error, - MessageId? causationId) - { - var now = _clock.GetUtcNow(); - var signal = new RetrySignal - { - Value = message.Value, - Status = status, - Attempt = attempt, - StartedAt = startedAt, - OccurredAt = now, - Reason = reason, - NextDelay = nextDelay - }; - var headers = new Dictionary(message.Headers, StringComparer.Ordinal) - { - [_attemptHeaderName] = attempt.ToString(System.Globalization.CultureInfo.InvariantCulture) - }; - var output = error is null - ? message.With(signal, headers, causationId ?? message.MessageId) - : message.WithError>(error, headers, causationId ?? message.MessageId); - if (!await _output.SendAsync(output, _stopping.Token).ConfigureAwait(false)) - { - await _output.Completion.ConfigureAwait(false); - throw new InvalidOperationException("Retry output declined an accepted result."); - } - return output; - } - - private void EmitEvent( - FlowMessage message, - string name, - FlowEventLevel level, - int attempt, - RetryFailureReason reason, - TimeSpan? nextDelay) - => _events.Post(new FlowEvent - { - Timestamp = _clock.GetUtcNow(), - CorrelationId = message.CorrelationId, - Name = name, - Level = level, - Message = $"Retry operation '{_options.Name}' produced {name}.", - Attributes = new Dictionary(StringComparer.Ordinal) - { - ["traceId"] = message.TraceId.ToString(), - ["attempt"] = attempt, - ["reason"] = reason.ToString(), - ["nextDelayMilliseconds"] = nextDelay?.TotalMilliseconds - } - }); - - private void EmitIgnoredFeedback(TraceId traceId, RetryFeedbackKind feedback, string reason) - => _events.Post(new FlowEvent - { - Timestamp = _clock.GetUtcNow(), - Name = RetryDiagnosticNames.FeedbackIgnored, - Level = FlowEventLevel.Warning, - Message = $"Retry operation '{_options.Name}' ignored {feedback} feedback.", - Attributes = new Dictionary(StringComparer.Ordinal) - { - ["traceId"] = traceId.ToString(), - ["feedback"] = feedback.ToString(), - ["reason"] = reason - } - }); - - private static DataFlowError CreateError( - RetryFailureReason reason, - int attempt, - RetrySignalStatus status, - TimeSpan? nextDelay) - { - var code = status == RetrySignalStatus.Exhausted - ? RetryErrorCodeNames.Exhausted - : reason switch - { - RetryFailureReason.Nak => RetryErrorCodeNames.Nak, - RetryFailureReason.Timeout => RetryErrorCodeNames.Timeout, - RetryFailureReason.Cancelled => RetryErrorCodeNames.Cancelled, - RetryFailureReason.Duplicate => RetryErrorCodeNames.Duplicate, - RetryFailureReason.CapacityReached => RetryErrorCodeNames.CapacityReached, - RetryFailureReason.Stopped => RetryErrorCodeNames.Stopped, - _ => RetryErrorCodeNames.Nak - }; - var terminal = status is not RetrySignalStatus.RetryScheduled; - var message = terminal - ? $"Retry operation ended after attempt {attempt}: {reason}." - : $"Retry attempt {attempt} did not complete successfully: {reason}."; - return new DataFlowError( - code, - message, - category: "Resilience", - isTransient: !terminal, - details: JsonSerializer.SerializeToElement(new Dictionary(StringComparer.Ordinal) - { - ["attempt"] = attempt, - ["nextDelayMilliseconds"] = nextDelay?.TotalMilliseconds, - ["reason"] = reason.ToString() - })); - } - - private void TrackObservation(Task task) - { - lock (_gate) - _observations.Add(task); - _ = task.ContinueWith( - completed => - { - lock (_gate) - _observations.Remove(completed); - }, - CancellationToken.None, - TaskContinuationOptions.ExecuteSynchronously, - TaskScheduler.Default); - } - - private async Task DrainObservationsAsync() - { - while (true) - { - Task[] pending; - lock (_gate) - pending = [.. _observations]; - if (pending.Length == 0) - return; - await Task.WhenAll(pending).ConfigureAwait(false); - } - } - - private void RecordFatalError(Exception exception) - { - lock (_gate) - _fatalError ??= exception; - _stopping.Cancel(); - _attempts.Stop(exception); - ((IDataflowBlock)_input).Fault(exception); - } - - private async Task MonitorAsync() - { - Exception? inputError = null; - try - { - await _input.Completion.ConfigureAwait(false); - } - catch (Exception exception) - { - inputError = exception; - } - - if (inputError is null) - { - // Graceful completion must let stopped attempts publish their terminal - // result before the owner cancellation token closes reliable output. - _attempts.Stop(); - } - else - { - _stopping.Cancel(); - _attempts.Stop(inputError); - } - - await DrainObservationsAsync().ConfigureAwait(false); - _stopping.Cancel(); - - Exception? fatal; - lock (_gate) - fatal = _fatalError ?? inputError; - if (fatal is null) - { - _output.Complete(); - _events.Complete(); - await Task.WhenAll(_output.Completion, _events.Completion).ConfigureAwait(false); - _completion.TrySetResult(); - return; - } - - _output.Fault(fatal); - _events.Complete(); - _completion.TrySetException(fatal); - } - - private async Task ObserveOutputFailureAsync() - { - try - { - await _output.Completion.ConfigureAwait(false); - } - catch (Exception exception) - { - RecordFatalError(exception); - } - } - - private sealed class RetryOperation( - FlowMessage message, - RetryStateMachine stateMachine, - CancellationTokenSource cancellation) - { - public FlowMessage Message { get; } = message; - - public RetryStateMachine StateMachine { get; } = stateMachine; - - public CancellationTokenSource Cancellation { get; } = cancellation; - - public CancellationToken Token { get; } = cancellation.Token; - - public RetryState State { get; set; } - - public int CurrentAttempt { get; set; } - - public MessageId? LastMessageId { get; set; } = message.MessageId; - - public bool Terminal { get; set; } - } -} diff --git a/src/FluxFlow.Components.Sessions/Nodes/SessionOperationPipeline.cs b/src/FluxFlow.Components.Sessions/Nodes/SessionOperationPipeline.cs deleted file mode 100644 index 998058da..00000000 --- a/src/FluxFlow.Components.Sessions/Nodes/SessionOperationPipeline.cs +++ /dev/null @@ -1,49 +0,0 @@ -using FluxFlow.Data; -using FluxFlow.Nodes; - -namespace FluxFlow.Components.Sessions.Nodes; - -internal sealed class SessionOperationPipeline : FlowNode -{ - private readonly Func, CancellationToken, Task>> _process; - private readonly Func? _finalize; - - public SessionOperationPipeline( - int boundedCapacity, - Func, CancellationToken, Task>> process, - Func? finalize = null) - : base(CreateOptions(boundedCapacity)) - { - ArgumentNullException.ThrowIfNull(process); - - _process = process; - _finalize = finalize; - } - - public void PublishEvent(FlowEvent value) - { - ArgumentNullException.ThrowIfNull(value); - EmitEvent(value); - } - - protected override async Task ProcessAsync(FlowMessage message) - { - var result = await _process(message, Stopping).ConfigureAwait(false); - await EmitAsync(result, Stopping).ConfigureAwait(false); - } - - protected override ValueTask OnInputCompletedAsync() - => _finalize is null - ? ValueTask.CompletedTask - : new ValueTask(_finalize()); - - private static FlowNodeOptions CreateOptions(int boundedCapacity) - { - ArgumentOutOfRangeException.ThrowIfLessThan(boundedCapacity, 1); - return new FlowNodeOptions - { - InputCapacity = boundedCapacity, - OutputCapacity = boundedCapacity - }; - } -} diff --git a/src/FluxFlow.Components.Storage/Nodes/StorageOperationPipeline.cs b/src/FluxFlow.Components.Storage/Nodes/StorageOperationPipeline.cs deleted file mode 100644 index d54d8c78..00000000 --- a/src/FluxFlow.Components.Storage/Nodes/StorageOperationPipeline.cs +++ /dev/null @@ -1,40 +0,0 @@ -using FluxFlow.Data; -using FluxFlow.Nodes; - -namespace FluxFlow.Components.Storage.Nodes; - -internal sealed class StorageOperationPipeline : FlowNode -{ - private readonly Func, CancellationToken, Task>> _process; - - public StorageOperationPipeline( - int boundedCapacity, - Func, CancellationToken, Task>> process) - : base(CreateOptions(boundedCapacity)) - { - ArgumentNullException.ThrowIfNull(process); - _process = process; - } - - public void PublishEvent(FlowEvent value) - { - ArgumentNullException.ThrowIfNull(value); - EmitEvent(value); - } - - protected override async Task ProcessAsync(FlowMessage message) - { - var result = await _process(message, Stopping).ConfigureAwait(false); - await EmitAsync(result, Stopping).ConfigureAwait(false); - } - - private static FlowNodeOptions CreateOptions(int boundedCapacity) - { - ArgumentOutOfRangeException.ThrowIfLessThan(boundedCapacity, 1); - return new FlowNodeOptions - { - InputCapacity = boundedCapacity, - OutputCapacity = boundedCapacity - }; - } -} diff --git a/src/FluxFlow.Composition/Runtime/ComponentEvent.cs b/src/FluxFlow.Composition/Runtime/ComponentEvent.cs deleted file mode 100644 index 252a9213..00000000 --- a/src/FluxFlow.Composition/Runtime/ComponentEvent.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System.Collections.Immutable; -using FluxFlow.Nodes; - -namespace FluxFlow.Composition; - -public sealed record ComponentEvent -{ - private IReadOnlyDictionary _attributes = - ImmutableDictionary.Create(StringComparer.Ordinal); - - public required string ComponentAddress { get; init; } - - public required DateTimeOffset Timestamp { get; init; } - - public required string Name { get; init; } - - public FlowEventLevel Level { get; init; } = FlowEventLevel.Information; - - public string? Message { get; init; } - - public IReadOnlyDictionary Attributes - { - get => _attributes; - init => _attributes = CopyAttributes(value); - } - - private static IReadOnlyDictionary CopyAttributes( - IReadOnlyDictionary? attributes) - { - if (attributes is null || attributes.Count == 0) - return ImmutableDictionary.Create(StringComparer.Ordinal); - - var builder = ImmutableDictionary.CreateBuilder(StringComparer.Ordinal); - foreach (var (name, value) in attributes) - { - builder.Add( - name, - value ?? throw new ArgumentException( - "Component event attributes cannot contain null values.", - nameof(attributes))); - } - - return builder.ToImmutable(); - } -} diff --git a/src/FluxFlow.Engine/Signals/ApplicationDiagnostic.cs b/src/FluxFlow.Engine/Signals/ApplicationDiagnostic.cs deleted file mode 100644 index 9607f145..00000000 --- a/src/FluxFlow.Engine/Signals/ApplicationDiagnostic.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System.Collections.Immutable; -using FluxFlow.Data; -using DataFlowError = FluxFlow.Data.FlowError; - -namespace FluxFlow.Engine.Signals; - -public enum ApplicationDiagnosticKind -{ - Runtime = 1, - Input = 2, - Output = 3, - Timing = 4, - Log = 5, - Metric = 6, - Trace = 7 -} - -public enum ApplicationDiagnosticLevel -{ - Trace = 0, - Debug = 1, - Information = 2, - Warning = 3, - Error = 4, - Critical = 5 -} - -public static class ApplicationDiagnosticNames -{ - public const string InputAccepted = "flow.port.input.accepted"; - public const string OutputEmitted = "flow.port.output.emitted"; - public const string PortRejected = "flow.port.rejected"; - public const string RequestCompleted = "flow.port.request.completed"; - public const string SystemEventDeliveryFailed = "flow.system.event.delivery.failed"; -} - -public sealed record ApplicationDiagnostic -{ - private IReadOnlyDictionary _attributes = - ImmutableDictionary.Create(StringComparer.Ordinal); - - public required DateTimeOffset Timestamp { get; init; } - - public required string Name { get; init; } - - public required ApplicationDiagnosticKind Kind { get; init; } - - public ApplicationDiagnosticLevel Level { get; init; } = ApplicationDiagnosticLevel.Information; - - public string? Subject { get; init; } - - public string? Message { get; init; } - - public TimeSpan? Duration { get; init; } - - public double? Measurement { get; init; } - - public string? Unit { get; init; } - - public DataFlowError? Error { get; init; } - - public IReadOnlyDictionary Attributes - { - get => _attributes; - init - { - if (value is null || value.Count == 0) - { - _attributes = ImmutableDictionary.Create(StringComparer.Ordinal); - return; - } - - var builder = ImmutableDictionary.CreateBuilder(StringComparer.Ordinal); - foreach (var attribute in value) - { - ArgumentException.ThrowIfNullOrWhiteSpace(attribute.Key); - builder.Add( - attribute.Key, - attribute.Value ?? throw new ArgumentException( - "Diagnostic attributes cannot contain null values.", - nameof(value))); - } - - _attributes = builder.ToImmutable(); - } - } -} diff --git a/src/FluxFlow.Engine/Signals/ApplicationSystemEvent.cs b/src/FluxFlow.Engine/Signals/ApplicationSystemEvent.cs deleted file mode 100644 index aceb70eb..00000000 --- a/src/FluxFlow.Engine/Signals/ApplicationSystemEvent.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System.Text.Json; -using FluxFlow.Data; - -namespace FluxFlow.Engine.Signals; - -public enum ApplicationSystemEventCategory -{ - Lifecycle = 1, - Component = 2, - Link = 3, - Resource = 4, - Revision = 5 -} - -public static class ApplicationSystemEventNames -{ - public const string RuntimeCompleting = "flow.runtime.completing"; - public const string ComponentFaulted = "flow.component.faulted"; - public const string LinkConditionFailed = "flow.link.condition.failed"; - public const string LinkTargetRejected = "flow.link.target.rejected"; - public const string ResourceChanged = "flow.resource.changed"; - public const string RevisionChanged = "flow.revision.changed"; -} - -public sealed record ApplicationSystemEvent -{ - private JsonElement? _details; - - public required DateTimeOffset Timestamp { get; init; } - - public required string Name { get; init; } - - public required ApplicationSystemEventCategory Category { get; init; } - - public string? Subject { get; init; } - - public FlowError? Error { get; init; } - - public JsonElement? Details - { - get => _details; - init => _details = value is { ValueKind: not JsonValueKind.Undefined } - ? value.Value.Clone() - : null; - } -} - -public enum SystemEventPublishStatus -{ - Accepted = 1, - Completed = 2 -} - -public sealed record SystemEventPublishResult -{ - public required SystemEventPublishStatus Status { get; init; } - - public bool IsAccepted => Status == SystemEventPublishStatus.Accepted; -} diff --git a/src/FluxFlow.Nodes/FlowEvent.cs b/src/FluxFlow.Nodes/FlowEvent.cs deleted file mode 100644 index 8cf545c4..00000000 --- a/src/FluxFlow.Nodes/FlowEvent.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace FluxFlow.Nodes; - -public enum FlowEventLevel -{ - Trace, - Information, - Warning, - Error -} - -/// -/// Uniform observability/event item every node emits on its Events port. -/// -public sealed record FlowEvent -{ - private IReadOnlyDictionary _attributes = - new Dictionary(StringComparer.Ordinal); - - public DateTimeOffset Timestamp { get; init; } - - /// The correlation id of the message this event relates to, if any. - public CorrelationId? CorrelationId { get; init; } - - public required string Name { get; init; } - - public FlowEventLevel Level { get; init; } = FlowEventLevel.Information; - - public string? Message { get; init; } - - public IReadOnlyDictionary Attributes - { - get => _attributes; - init => _attributes = CopyAttributes(value); - } - - private static IReadOnlyDictionary CopyAttributes( - IReadOnlyDictionary? attributes) - => attributes is null - ? new Dictionary(StringComparer.Ordinal) - : new Dictionary(attributes, StringComparer.Ordinal); -} diff --git a/src/FluxFlow.Nodes/FlowMessage.cs b/src/FluxFlow.Nodes/FlowMessage.cs deleted file mode 100644 index 236c39e9..00000000 --- a/src/FluxFlow.Nodes/FlowMessage.cs +++ /dev/null @@ -1,261 +0,0 @@ -using System.Collections.Immutable; -using System.Text.Json.Serialization; -using FluxFlow.Data; - -namespace FluxFlow.Nodes; - -/// -/// Immutable workflow envelope containing exactly one active case: a value of -/// or a . -/// -[JsonConverter(typeof(FlowMessageJsonConverterFactory))] -public sealed record FlowMessage -{ - private readonly T? _value; - private readonly FlowError? _error; - - private FlowMessage( - bool isError, - T? value, - FlowError? error, - CorrelationId? correlationId, - TraceId traceId, - MessageId messageId, - MessageId? causationId, - DateTimeOffset timestamp, - IReadOnlyDictionary? headers) - { - if (isError && error is null) - throw new ArgumentException("An error message requires an error.", nameof(error)); - if (!isError && error is not null) - throw new ArgumentException("A value message cannot contain an error.", nameof(error)); - if (traceId.IsEmpty) - throw new ArgumentException("Trace id cannot be empty.", nameof(traceId)); - if (messageId.IsEmpty) - throw new ArgumentException("Message id cannot be empty.", nameof(messageId)); - - IsError = isError; - _value = value; - _error = error; - CorrelationId = correlationId is { IsEmpty: false } ? correlationId : null; - TraceId = traceId; - MessageId = messageId; - CausationId = causationId is { IsEmpty: false } ? causationId : null; - Timestamp = timestamp; - Headers = FlowMessage.CopyHeaders(headers); - } - - public bool IsError { get; } - - public T Value => !IsError - ? _value! - : throw new InvalidOperationException("An error message does not contain a value."); - - public FlowError? Error => _error; - - public CorrelationId? CorrelationId { get; } - - public TraceId TraceId { get; } - - public MessageId MessageId { get; } - - public MessageId? CausationId { get; } - - public DateTimeOffset Timestamp { get; } - - public IReadOnlyDictionary Headers { get; } - - public TResult Match( - Func onValue, - Func onError) - { - ArgumentNullException.ThrowIfNull(onValue); - ArgumentNullException.ThrowIfNull(onError); - return IsError ? onError(_error!) : onValue(_value!); - } - - public FlowMessage With( - TNext value, - IReadOnlyDictionary? headers = null, - MessageId? causationId = null) - => FlowMessage.CreateDerived(this, value, error: null, headers, causationId); - - public FlowMessage WithError( - FlowError error, - IReadOnlyDictionary? headers = null, - MessageId? causationId = null) - { - ArgumentNullException.ThrowIfNull(error); - return FlowMessage.CreateDerived( - this, - value: default, - error, - headers, - causationId); - } - - internal static FlowMessage CreateInitial( - T? value, - FlowError? error, - CorrelationId? correlationId, - TraceId? traceId, - IReadOnlyDictionary? headers, - MessageId? causationId) - => new( - error is not null, - value, - error, - correlationId, - traceId is { IsEmpty: false } ? traceId.Value : global::FluxFlow.Nodes.TraceId.New(), - global::FluxFlow.Nodes.MessageId.New(), - causationId is { IsEmpty: false } ? causationId : null, - DateTimeOffset.UtcNow, - headers); - - internal static FlowMessage Rehydrate( - bool isError, - T? value, - FlowError? error, - CorrelationId? correlationId, - TraceId traceId, - MessageId messageId, - MessageId? causationId, - DateTimeOffset timestamp, - IReadOnlyDictionary? headers) - => new( - isError, - value, - error, - correlationId, - traceId, - messageId, - causationId, - timestamp, - headers); - - private static FlowMessage CreateDerived( - FlowMessage previous, - T? value, - FlowError? error, - IReadOnlyDictionary? headers, - MessageId? causationId) - => new( - error is not null, - value, - error, - previous.CorrelationId, - previous.TraceId, - global::FluxFlow.Nodes.MessageId.New(), - causationId is { IsEmpty: false } ? causationId : previous.MessageId, - DateTimeOffset.UtcNow, - headers ?? previous.Headers); -} - -public static class FlowMessage -{ - internal static readonly IReadOnlyDictionary EmptyHeaders = - ImmutableDictionary.Create(StringComparer.Ordinal); - - public static FlowMessage Create( - T value, - CorrelationId? correlationId = null, - TraceId? traceId = null, - IReadOnlyDictionary? headers = null, - MessageId? causationId = null) - => FlowMessage.CreateInitial( - value, - error: null, - correlationId, - traceId, - headers, - causationId); - - public static FlowMessage CreateError( - FlowError error, - CorrelationId? correlationId = null, - TraceId? traceId = null, - IReadOnlyDictionary? headers = null, - MessageId? causationId = null) - { - ArgumentNullException.ThrowIfNull(error); - return FlowMessage.CreateInitial( - value: default, - error, - correlationId, - traceId, - headers, - causationId); - } - - /// - /// Restores a previously created value message without generating new identity or timing metadata. - /// - public static FlowMessage Restore( - T value, - MessageId messageId, - TraceId traceId, - DateTimeOffset timestamp, - CorrelationId? correlationId = null, - MessageId? causationId = null, - IReadOnlyDictionary? headers = null) - => FlowMessage.Rehydrate( - isError: false, - value, - error: null, - correlationId, - traceId, - messageId, - causationId, - timestamp, - headers); - - /// - /// Restores a previously created error message without generating new identity or timing metadata. - /// - public static FlowMessage RestoreError( - FlowError error, - MessageId messageId, - TraceId traceId, - DateTimeOffset timestamp, - CorrelationId? correlationId = null, - MessageId? causationId = null, - IReadOnlyDictionary? headers = null) - { - ArgumentNullException.ThrowIfNull(error); - return FlowMessage.Rehydrate( - isError: true, - value: default, - error, - correlationId, - traceId, - messageId, - causationId, - timestamp, - headers); - } - - internal static IReadOnlyDictionary CopyHeaders( - IReadOnlyDictionary? headers) - { - if (headers is null || headers.Count == 0) - return EmptyHeaders; - if (headers is ImmutableDictionary immutable && - immutable.KeyComparer == StringComparer.Ordinal) - { - return immutable; - } - - var builder = ImmutableDictionary.CreateBuilder(StringComparer.Ordinal); - foreach (var header in headers) - { - ArgumentException.ThrowIfNullOrWhiteSpace(header.Key); - builder.Add( - header.Key, - header.Value ?? throw new ArgumentException( - "FlowMessage headers cannot contain null values.", - nameof(headers))); - } - - return builder.ToImmutable(); - } -} diff --git a/src/FluxFlow.Nodes/IFlowSignalTarget.cs b/src/FluxFlow.Nodes/IFlowSignalTarget.cs deleted file mode 100644 index 89ca8fa3..00000000 --- a/src/FluxFlow.Nodes/IFlowSignalTarget.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace FluxFlow.Nodes; - -public interface IFlowSignalTarget -{ - Task Completion { get; } - - ValueTask SendAsync( - FlowMessage signal, - CancellationToken cancellationToken = default); -} diff --git a/tests/Acceptance/Workflows/MqttToHttp/FluxFlow.Workflow.Acceptance.Tests/FluxFlow.Workflow.Acceptance.Tests.csproj b/tests/Acceptance/Workflows/MqttToHttp/FluxFlow.Workflow.Acceptance.Tests/FluxFlow.Workflow.Acceptance.Tests.csproj new file mode 100644 index 00000000..4fc8497c --- /dev/null +++ b/tests/Acceptance/Workflows/MqttToHttp/FluxFlow.Workflow.Acceptance.Tests/FluxFlow.Workflow.Acceptance.Tests.csproj @@ -0,0 +1,31 @@ + + + + net10.0 + false + + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/Acceptance/Workflows/MqttToHttp/FluxFlow.Workflow.Acceptance.Tests/MqttToHttpFlowValueAcceptanceTests.cs b/tests/Acceptance/Workflows/MqttToHttp/FluxFlow.Workflow.Acceptance.Tests/MqttToHttpFlowValueAcceptanceTests.cs new file mode 100644 index 00000000..2b5d603f --- /dev/null +++ b/tests/Acceptance/Workflows/MqttToHttp/FluxFlow.Workflow.Acceptance.Tests/MqttToHttpFlowValueAcceptanceTests.cs @@ -0,0 +1,152 @@ +using System.Net; +using System.Text; +using System.Text.Json; +using FluxFlow.Components.Http.Composition; +using FluxFlow.Components.Mapping.Composition; +using FluxFlow.Components.Mqtt.Contracts; +using FluxFlow.Composition; +using FluxFlow.Composition.Authoring; +using FluxFlow.Composition.DependencyInjection; +using FluxFlow.Data; +using FluxFlow.Expressions.Jsonata; +using FluxFlow.Mapping; +using FluxFlow.Nodes; +using FluxFlow.Testing; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; +using Xunit; + +namespace FluxFlow.Workflow.Acceptance.Tests; + +public sealed class MqttToHttpFlowValueAcceptanceTests +{ + private static readonly TimeSpan Timeout = TimeSpan.FromSeconds(5); + + [Fact] + [Trait("Category", "Acceptance")] + public async Task Authored_mqtt_value_maps_through_jsonata_to_http_and_preserves_flow_context() + { + var builder = new ApplicationDefinitionBuilder(); + var engine = builder.AddResource("mappingEngine", "host.expression"); + var client = builder.AddResource("httpClient", "host.http-client"); + var workflow = builder.AddWorkflow("ingress"); + var mapper = workflow.AddMapper("mapMqttMessage", options => + { + options.Engine = engine; + options.Expression = """ + $type(input) = 'object' + ? { + 'method': 'POST', + 'url': 'https://collector.test/readings', + 'headers': { 'x-mqtt-topic': input.topic }, + 'body': { + 'topic': input.topic, + 'payload': input.content.bytes + } + } + : input + """; + }); + var request = workflow.AddHttpRequest("sendHttpRequest", options => options.Client = client); + workflow.Connect(mapper.Output, request.Input); + + var handler = new RecordingHandler(); + using var httpClient = new HttpClient(handler); + await using var host = await CanonicalApplicationTestHost.StartAsync( + builder.Build(), + services => services.AddFluxFlowComponents().AddMapping().AddHttp(), + registerResources: context => + { + context.Services.AddExternalFluxFlowResource( + engine.Address, + new JsonataFlowExpressionEngine()); + context.Services.AddExternalFluxFlowResource(client.Address, httpClient); + }); + + host.StartResult.Succeeded.ShouldBeTrue( + JsonSerializer.Serialize(host.StartResult.Update?.Diagnostics)); + var ports = host.GetRequiredPorts(); + + var invalidOutput = ports.ReceiveAsync(request.Output, Timeout); + var invalidInput = FlowMessage.Create(FlowValue.From(42)); + (await ports.SendAsync(request.Input, invalidInput)).IsAccepted.ShouldBeTrue(); + var invalid = (await invalidOutput).Message.ShouldNotBeNull(); + invalid.IsError.ShouldBeTrue(); + invalid.Error.ShouldNotBeNull().Code.ShouldBe("http.request.invalid_shape"); + handler.CallCount.ShouldBe(0); + + var mappedOutput = ports.ReceiveAsync(mapper.Output, Timeout); + var httpOutput = ports.ReceiveAsync(request.Output, Timeout); + var mqttMessage = new MqttReceivedApplicationMessage + { + Timestamp = new DateTimeOffset(2026, 9, 2, 12, 0, 0, TimeSpan.Zero), + Topic = "devices/alpha/temperature", + Content = FlowContent.FromBytes( + Encoding.UTF8.GetBytes("{\"temperature\":21}"), + "application/json", + "utf-8") + }; + var input = FlowMessage.Create( + mqttMessage, + headers: new Dictionary(StringComparer.Ordinal) + { + ["tenant"] = "north" + }); + + (await ports.SendAsync(mapper.Input.Address, input)).IsAccepted.ShouldBeTrue(); + + var mapped = (await mappedOutput).Message.ShouldNotBeNull(); + var response = (await httpOutput).Message.ShouldNotBeNull(); + mapped.IsError.ShouldBeFalse(); + response.IsError.ShouldBeFalse(); + mapped.TraceId.ShouldBe(input.TraceId); + mapped.CausationId.ShouldBe(input.MessageId); + mapped.Headers["tenant"].ShouldBe("north"); + response.TraceId.ShouldBe(input.TraceId); + response.CausationId.ShouldBe(mapped.MessageId); + response.Headers["tenant"].ShouldBe("north"); + + handler.CallCount.ShouldBe(1); + handler.Method.ShouldBe(HttpMethod.Post); + handler.Url.ShouldBe("https://collector.test/readings"); + handler.MqttTopic.ShouldBe(mqttMessage.Topic); + using var body = JsonDocument.Parse(handler.Body.ShouldNotBeNull()); + body.RootElement.GetProperty("topic").GetString().ShouldBe(mqttMessage.Topic); + body.RootElement.GetProperty("payload").GetString().ShouldBe( + Convert.ToBase64String(mqttMessage.Content.Bytes.AsSpan())); + } + + private sealed class RecordingHandler : HttpMessageHandler + { + public int CallCount { get; private set; } + + public HttpMethod? Method { get; private set; } + + public string? Url { get; private set; } + + public string? MqttTopic { get; private set; } + + public string? Body { get; private set; } + + protected override async Task SendAsync( + HttpRequestMessage request, + CancellationToken cancellationToken) + { + CallCount++; + Method = request.Method; + Url = request.RequestUri?.AbsoluteUri; + MqttTopic = request.Headers.GetValues("x-mqtt-topic").Single(); + Body = request.Content is null + ? null + : await request.Content.ReadAsStringAsync(cancellationToken); + + return new HttpResponseMessage(HttpStatusCode.Accepted) + { + Content = new StringContent( + "{\"accepted\":true}", + Encoding.UTF8, + "application/json") + }; + } + } +} diff --git a/tests/FluxFlow.Components.Assertions.Composition.Tests/FluxFlow.Components.Assertions.Composition.Tests.csproj b/tests/FluxFlow.Components.Assertions.Composition.Tests/FluxFlow.Components.Assertions.Composition.Tests.csproj deleted file mode 100644 index e2728302..00000000 --- a/tests/FluxFlow.Components.Assertions.Composition.Tests/FluxFlow.Components.Assertions.Composition.Tests.csproj +++ /dev/null @@ -1,31 +0,0 @@ - - - - net10.0 - false - - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - diff --git a/tests/FluxFlow.Components.Expectations.Composition.Tests/FluxFlow.Components.Expectations.Composition.Tests.csproj b/tests/FluxFlow.Components.Expectations.Composition.Tests/FluxFlow.Components.Expectations.Composition.Tests.csproj deleted file mode 100644 index 10107c97..00000000 --- a/tests/FluxFlow.Components.Expectations.Composition.Tests/FluxFlow.Components.Expectations.Composition.Tests.csproj +++ /dev/null @@ -1,31 +0,0 @@ - - - - net10.0 - false - - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - diff --git a/tests/FluxFlow.Components.FileSystem.Composition.Tests/FluxFlow.Components.FileSystem.Composition.Tests.csproj b/tests/FluxFlow.Components.FileSystem.Composition.Tests/FluxFlow.Components.FileSystem.Composition.Tests.csproj deleted file mode 100644 index db50faa9..00000000 --- a/tests/FluxFlow.Components.FileSystem.Composition.Tests/FluxFlow.Components.FileSystem.Composition.Tests.csproj +++ /dev/null @@ -1,30 +0,0 @@ - - - - net10.0 - false - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - diff --git a/tests/FluxFlow.Components.Http.Composition.Tests/FluxFlow.Components.Http.Composition.Tests.csproj b/tests/FluxFlow.Components.Http.Composition.Tests/FluxFlow.Components.Http.Composition.Tests.csproj deleted file mode 100644 index 2a1ba900..00000000 --- a/tests/FluxFlow.Components.Http.Composition.Tests/FluxFlow.Components.Http.Composition.Tests.csproj +++ /dev/null @@ -1,28 +0,0 @@ - - - - net10.0 - false - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - diff --git a/tests/FluxFlow.Components.Mapping.Composition.Tests/FluxFlow.Components.Mapping.Composition.Tests.csproj b/tests/FluxFlow.Components.Mapping.Composition.Tests/FluxFlow.Components.Mapping.Composition.Tests.csproj deleted file mode 100644 index 4ba5aba7..00000000 --- a/tests/FluxFlow.Components.Mapping.Composition.Tests/FluxFlow.Components.Mapping.Composition.Tests.csproj +++ /dev/null @@ -1,30 +0,0 @@ - - - - net10.0 - false - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - diff --git a/tests/FluxFlow.Components.Metrics.Composition.Tests/FluxFlow.Components.Metrics.Composition.Tests.csproj b/tests/FluxFlow.Components.Metrics.Composition.Tests/FluxFlow.Components.Metrics.Composition.Tests.csproj deleted file mode 100644 index 34269d89..00000000 --- a/tests/FluxFlow.Components.Metrics.Composition.Tests/FluxFlow.Components.Metrics.Composition.Tests.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - net10.0 - false - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - diff --git a/tests/FluxFlow.Components.Mqtt.Composition.Tests/FluxFlow.Components.Mqtt.Composition.Tests.csproj b/tests/FluxFlow.Components.Mqtt.Composition.Tests/FluxFlow.Components.Mqtt.Composition.Tests.csproj deleted file mode 100644 index 95a62c63..00000000 --- a/tests/FluxFlow.Components.Mqtt.Composition.Tests/FluxFlow.Components.Mqtt.Composition.Tests.csproj +++ /dev/null @@ -1,28 +0,0 @@ - - - - net10.0 - false - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - diff --git a/tests/FluxFlow.Components.Observability.Composition.Tests/FluxFlow.Components.Observability.Composition.Tests.csproj b/tests/FluxFlow.Components.Observability.Composition.Tests/FluxFlow.Components.Observability.Composition.Tests.csproj deleted file mode 100644 index 2f5547ed..00000000 --- a/tests/FluxFlow.Components.Observability.Composition.Tests/FluxFlow.Components.Observability.Composition.Tests.csproj +++ /dev/null @@ -1,31 +0,0 @@ - - - - net10.0 - false - - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - diff --git a/tests/FluxFlow.Components.Payloads.Composition.Tests/FluxFlow.Components.Payloads.Composition.Tests.csproj b/tests/FluxFlow.Components.Payloads.Composition.Tests/FluxFlow.Components.Payloads.Composition.Tests.csproj deleted file mode 100644 index 284adada..00000000 --- a/tests/FluxFlow.Components.Payloads.Composition.Tests/FluxFlow.Components.Payloads.Composition.Tests.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - net10.0 - false - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - diff --git a/tests/FluxFlow.Components.Projections.Composition.Tests/FluxFlow.Components.Projections.Composition.Tests.csproj b/tests/FluxFlow.Components.Projections.Composition.Tests/FluxFlow.Components.Projections.Composition.Tests.csproj deleted file mode 100644 index f96e6adb..00000000 --- a/tests/FluxFlow.Components.Projections.Composition.Tests/FluxFlow.Components.Projections.Composition.Tests.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - net10.0 - false - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - diff --git a/tests/FluxFlow.Components.Resilience.Composition.Tests/FluxFlow.Components.Resilience.Composition.Tests.csproj b/tests/FluxFlow.Components.Resilience.Composition.Tests/FluxFlow.Components.Resilience.Composition.Tests.csproj deleted file mode 100644 index 8c303a85..00000000 --- a/tests/FluxFlow.Components.Resilience.Composition.Tests/FluxFlow.Components.Resilience.Composition.Tests.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - net10.0 - false - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - diff --git a/tests/FluxFlow.Components.Routing.Composition.Tests/FluxFlow.Components.Routing.Composition.Tests.csproj b/tests/FluxFlow.Components.Routing.Composition.Tests/FluxFlow.Components.Routing.Composition.Tests.csproj deleted file mode 100644 index 0a092c0a..00000000 --- a/tests/FluxFlow.Components.Routing.Composition.Tests/FluxFlow.Components.Routing.Composition.Tests.csproj +++ /dev/null @@ -1,30 +0,0 @@ - - - - net10.0 - false - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - diff --git a/tests/FluxFlow.Components.Serialization.Composition.Tests/FluxFlow.Components.Serialization.Composition.Tests.csproj b/tests/FluxFlow.Components.Serialization.Composition.Tests/FluxFlow.Components.Serialization.Composition.Tests.csproj deleted file mode 100644 index 6b6f0453..00000000 --- a/tests/FluxFlow.Components.Serialization.Composition.Tests/FluxFlow.Components.Serialization.Composition.Tests.csproj +++ /dev/null @@ -1,30 +0,0 @@ - - - - net10.0 - false - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - diff --git a/tests/FluxFlow.Components.Sessions.Composition.Tests/FluxFlow.Components.Sessions.Composition.Tests.csproj b/tests/FluxFlow.Components.Sessions.Composition.Tests/FluxFlow.Components.Sessions.Composition.Tests.csproj deleted file mode 100644 index 059d6b6b..00000000 --- a/tests/FluxFlow.Components.Sessions.Composition.Tests/FluxFlow.Components.Sessions.Composition.Tests.csproj +++ /dev/null @@ -1,30 +0,0 @@ - - - - net10.0 - false - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - diff --git a/tests/FluxFlow.Components.Sources.Composition.Tests/FluxFlow.Components.Sources.Composition.Tests.csproj b/tests/FluxFlow.Components.Sources.Composition.Tests/FluxFlow.Components.Sources.Composition.Tests.csproj deleted file mode 100644 index a2241443..00000000 --- a/tests/FluxFlow.Components.Sources.Composition.Tests/FluxFlow.Components.Sources.Composition.Tests.csproj +++ /dev/null @@ -1,30 +0,0 @@ - - - - net10.0 - false - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - diff --git a/tests/FluxFlow.Components.State.Composition.Tests/FluxFlow.Components.State.Composition.Tests.csproj b/tests/FluxFlow.Components.State.Composition.Tests/FluxFlow.Components.State.Composition.Tests.csproj deleted file mode 100644 index 49816055..00000000 --- a/tests/FluxFlow.Components.State.Composition.Tests/FluxFlow.Components.State.Composition.Tests.csproj +++ /dev/null @@ -1,31 +0,0 @@ - - - - net10.0 - false - - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - diff --git a/tests/FluxFlow.Components.Storage.Composition.Tests/FluxFlow.Components.Storage.Composition.Tests.csproj b/tests/FluxFlow.Components.Storage.Composition.Tests/FluxFlow.Components.Storage.Composition.Tests.csproj deleted file mode 100644 index eb90b651..00000000 --- a/tests/FluxFlow.Components.Storage.Composition.Tests/FluxFlow.Components.Storage.Composition.Tests.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - net10.0 - false - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - diff --git a/tests/FluxFlow.Components.Timers.Composition.Tests/FluxFlow.Components.Timers.Composition.Tests.csproj b/tests/FluxFlow.Components.Timers.Composition.Tests/FluxFlow.Components.Timers.Composition.Tests.csproj deleted file mode 100644 index 8055a756..00000000 --- a/tests/FluxFlow.Components.Timers.Composition.Tests/FluxFlow.Components.Timers.Composition.Tests.csproj +++ /dev/null @@ -1,30 +0,0 @@ - - - - net10.0 - false - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - diff --git a/tests/FluxFlow.Components.Validation.Composition.Tests/FluxFlow.Components.Validation.Composition.Tests.csproj b/tests/FluxFlow.Components.Validation.Composition.Tests/FluxFlow.Components.Validation.Composition.Tests.csproj deleted file mode 100644 index ec82392d..00000000 --- a/tests/FluxFlow.Components.Validation.Composition.Tests/FluxFlow.Components.Validation.Composition.Tests.csproj +++ /dev/null @@ -1,30 +0,0 @@ - - - - net10.0 - false - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - diff --git a/tests/FluxFlow.Release.Tests/FluxFlow.Release.Tests.csproj b/tests/FluxFlow.Release.Tests/FluxFlow.Release.Tests.csproj deleted file mode 100644 index 2e02adf6..00000000 --- a/tests/FluxFlow.Release.Tests/FluxFlow.Release.Tests.csproj +++ /dev/null @@ -1,42 +0,0 @@ - - - - net10.0 - false - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/AssemblyInfo.cs b/tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/AssemblyInfo.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/AssemblyInfo.cs rename to tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/AssemblyInfo.cs diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests.csproj b/tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests.csproj similarity index 67% rename from tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests.csproj rename to tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests.csproj index 97ebc239..1ea17eff 100644 --- a/tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests.csproj +++ b/tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,8 +6,8 @@ - - + + diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/README.md b/tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/README.md similarity index 72% rename from tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/README.md rename to tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/README.md index e27df2de..288540c3 100644 --- a/tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/README.md +++ b/tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/README.md @@ -1,4 +1,4 @@ -# T-SQL durable-input integration tests +# T-SQL durable-input integration tests This explicit suite validates the production T-SQL durable-input provider against SQL Server 2022. It intentionally remains outside the main solution so @@ -8,7 +8,7 @@ access. Run the suite from the repository root: ```powershell -powershell -NoProfile -ExecutionPolicy Bypass -File ./tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/run-integration.ps1 -AcceptLicense +powershell -NoProfile -ExecutionPolicy Bypass -File ./tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/run-integration.ps1 -AcceptLicense ``` `-AcceptLicense` confirms acceptance of the container image license. The runner @@ -23,7 +23,7 @@ For a CI-managed server, set run: ```powershell -powershell -NoProfile -ExecutionPolicy Bypass -File ./tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/run-integration.ps1 -AcceptLicense -UseExternalConnectionString +powershell -NoProfile -ExecutionPolicy Bypass -File ./tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/run-integration.ps1 -AcceptLicense -UseExternalConnectionString ``` The configured identity must be able to create, alter, and drop the isolated diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputConcurrencyTests.cs b/tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputConcurrencyTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputConcurrencyTests.cs rename to tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputConcurrencyTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputConformanceTests.cs b/tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputConformanceTests.cs rename to tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputPersistenceTests.cs b/tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputPersistenceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputPersistenceTests.cs rename to tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputPersistenceTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputResiliencyTests.cs b/tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputResiliencyTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputResiliencyTests.cs rename to tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputResiliencyTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputRetentionTests.cs b/tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputRetentionTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputRetentionTests.cs rename to tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputRetentionTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputSchemaTests.cs b/tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputSchemaTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputSchemaTests.cs rename to tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputSchemaTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputStatusTests.cs b/tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputStatusTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputStatusTests.cs rename to tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputStatusTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputTestSupport.cs b/tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputTestSupport.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputTestSupport.cs rename to tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlDurableInputTestSupport.cs diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlIntegrationEnvironment.cs b/tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlIntegrationEnvironment.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlIntegrationEnvironment.cs rename to tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlIntegrationEnvironment.cs diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlIntegrationEnvironmentTests.cs b/tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlIntegrationEnvironmentTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlIntegrationEnvironmentTests.cs rename to tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlIntegrationEnvironmentTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlTestDatabase.cs b/tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlTestDatabase.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlTestDatabase.cs rename to tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/TSqlTestDatabase.cs diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/run-integration.ps1 b/tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/run-integration.ps1 similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/run-integration.ps1 rename to tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/run-integration.ps1 diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/xunit.runner.json b/tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/xunit.runner.json similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/xunit.runner.json rename to tests/Integration/Containers/Databases/TSql/DurableInput/FluxFlow.Engine.DurableInput.TSql.IntegrationTests/xunit.runner.json diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/AssemblyInfo.cs b/tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/AssemblyInfo.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/AssemblyInfo.cs rename to tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/AssemblyInfo.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests.csproj b/tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests.csproj similarity index 67% rename from tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests.csproj rename to tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests.csproj index ad24d989..65201789 100644 --- a/tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests.csproj +++ b/tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,8 +6,8 @@ - - + + diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/README.md b/tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/README.md similarity index 73% rename from tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/README.md rename to tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/README.md index d1e140c8..43eca4f8 100644 --- a/tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/README.md +++ b/tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/README.md @@ -1,11 +1,11 @@ -# T-SQL durable-output integration tests +# T-SQL durable-output integration tests This explicit suite validates the production T-SQL durable-output provider against SQL Server 2022. It is intentionally outside the main solution so ordinary builds and tests require neither Docker nor network access. Run the suite from the repository root: ```powershell -powershell -NoProfile -ExecutionPolicy Bypass -File ./tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/run-integration.ps1 -AcceptLicense +powershell -NoProfile -ExecutionPolicy Bypass -File ./tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/run-integration.ps1 -AcceptLicense ``` `-AcceptLicense` is required and confirms acceptance of the container image license. The runner uses `mcr.microsoft.com/mssql/server:2022-latest` by default, assigns a unique container name and host port, generates a strong ephemeral password, waits at most 90 seconds for readiness, and removes the container in `finally`. It prints the exact image tag and digest used for the run, but never prints the password or full connection string. @@ -15,7 +15,7 @@ Use `-KeepContainer` only for an intentional diagnostic session. The runner prin For a CI-managed server, set `FLUXFLOW_TSQL_INTEGRATION_CONNECTION_STRING` in the process environment and run: ```powershell -powershell -NoProfile -ExecutionPolicy Bypass -File ./tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/run-integration.ps1 -AcceptLicense -UseExternalConnectionString +powershell -NoProfile -ExecutionPolicy Bypass -File ./tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/run-integration.ps1 -AcceptLicense -UseExternalConnectionString ``` The configured identity must be able to create, alter, and drop the isolated test databases. The runner exposes the connection string only through the test process environment, requires at least one executed test, and fails when any test fails or is skipped. diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputConcurrencyTests.cs b/tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputConcurrencyTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputConcurrencyTests.cs rename to tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputConcurrencyTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputConformanceTests.cs b/tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputConformanceTests.cs rename to tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputLeaseRenewalTests.cs b/tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputLeaseRenewalTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputLeaseRenewalTests.cs rename to tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputLeaseRenewalTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputPersistenceTests.cs b/tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputPersistenceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputPersistenceTests.cs rename to tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputPersistenceTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputProviderIntegrationTests.cs b/tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputProviderIntegrationTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputProviderIntegrationTests.cs rename to tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputProviderIntegrationTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputRetentionTests.cs b/tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputRetentionTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputRetentionTests.cs rename to tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputRetentionTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputSchemaTests.cs b/tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputSchemaTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputSchemaTests.cs rename to tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputSchemaTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputStatusTests.cs b/tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputStatusTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputStatusTests.cs rename to tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputStatusTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputTestSupport.cs b/tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputTestSupport.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputTestSupport.cs rename to tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlDurableOutputTestSupport.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlIntegrationEnvironment.cs b/tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlIntegrationEnvironment.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlIntegrationEnvironment.cs rename to tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlIntegrationEnvironment.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlIntegrationEnvironmentTests.cs b/tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlIntegrationEnvironmentTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlIntegrationEnvironmentTests.cs rename to tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlIntegrationEnvironmentTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlTestDatabase.cs b/tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlTestDatabase.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlTestDatabase.cs rename to tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlTestDatabase.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlTestDatabaseTests.cs b/tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlTestDatabaseTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlTestDatabaseTests.cs rename to tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/TSqlTestDatabaseTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/run-integration.ps1 b/tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/run-integration.ps1 similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/run-integration.ps1 rename to tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/run-integration.ps1 diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/xunit.runner.json b/tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/xunit.runner.json similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/xunit.runner.json rename to tests/Integration/Containers/Databases/TSql/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.IntegrationTests/xunit.runner.json diff --git a/tests/Integration/Containers/Workflows/MqttToHttp/FluxFlow.Workflow.ContainerIntegrationTests/FluxFlow.Workflow.ContainerIntegrationTests.csproj b/tests/Integration/Containers/Workflows/MqttToHttp/FluxFlow.Workflow.ContainerIntegrationTests/FluxFlow.Workflow.ContainerIntegrationTests.csproj new file mode 100644 index 00000000..d19a6062 --- /dev/null +++ b/tests/Integration/Containers/Workflows/MqttToHttp/FluxFlow.Workflow.ContainerIntegrationTests/FluxFlow.Workflow.ContainerIntegrationTests.csproj @@ -0,0 +1,38 @@ + + + + net10.0 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/Integration/Containers/Workflows/MqttToHttp/FluxFlow.Workflow.ContainerIntegrationTests/HttpCaptureProbe.cs b/tests/Integration/Containers/Workflows/MqttToHttp/FluxFlow.Workflow.ContainerIntegrationTests/HttpCaptureProbe.cs new file mode 100644 index 00000000..3e9cc79b --- /dev/null +++ b/tests/Integration/Containers/Workflows/MqttToHttp/FluxFlow.Workflow.ContainerIntegrationTests/HttpCaptureProbe.cs @@ -0,0 +1,79 @@ +using System.Net; +using System.Threading.Channels; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Hosting.Server; +using Microsoft.AspNetCore.Hosting.Server.Features; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; + +namespace FluxFlow.Workflow.ContainerIntegrationTests; + +internal sealed class HttpCaptureProbe : IAsyncDisposable +{ + private readonly WebApplication _application; + private readonly Channel _requests; + + private HttpCaptureProbe(WebApplication application, Channel requests, Uri captureUrl) + { + _application = application; + _requests = requests; + CaptureUrl = captureUrl; + } + + internal Uri CaptureUrl { get; } + + internal static async ValueTask StartAsync(CancellationToken cancellationToken = default) + { + var requests = Channel.CreateUnbounded( + new UnboundedChannelOptions + { + SingleReader = true, + SingleWriter = false, + AllowSynchronousContinuations = false + }); + var builder = WebApplication.CreateSlimBuilder(); + builder.WebHost.ConfigureKestrel(options => options.Listen(IPAddress.Loopback, 0)); + var application = builder.Build(); + application.MapPost("/capture", async context => + { + using var reader = new StreamReader(context.Request.Body); + var body = await reader.ReadToEndAsync(context.RequestAborted); + await requests.Writer.WriteAsync( + new CapturedHttpRequest( + context.Request.Headers["x-flow-scenario"].ToString(), + context.Request.Headers["x-mqtt-topic"].ToString(), + body), + context.RequestAborted); + context.Response.StatusCode = StatusCodes.Status202Accepted; + await context.Response.WriteAsync("{\"accepted\":true}", context.RequestAborted); + }); + await application.StartAsync(cancellationToken); + + var addresses = application.Services + .GetRequiredService() + .Features + .Get()? + .Addresses + ?? throw new InvalidOperationException("The HTTP capture server did not publish an address."); + var address = addresses.ShouldHaveSingleItem(); + return new HttpCaptureProbe(application, requests, new Uri(new Uri(address), "/capture")); + } + + internal async ValueTask ReceiveAsync(TimeSpan timeout, CancellationToken cancellationToken = default) + { + using var timeoutSource = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); + timeoutSource.CancelAfter(timeout); + return await _requests.Reader.ReadAsync(timeoutSource.Token); + } + + public async ValueTask DisposeAsync() + { + _requests.Writer.TryComplete(); + await _application.StopAsync(); + await _application.DisposeAsync(); + } +} + +internal sealed record CapturedHttpRequest(string Scenario, string Topic, string Body); diff --git a/tests/Integration/Containers/Workflows/MqttToHttp/FluxFlow.Workflow.ContainerIntegrationTests/MqttBrokerFixture.cs b/tests/Integration/Containers/Workflows/MqttToHttp/FluxFlow.Workflow.ContainerIntegrationTests/MqttBrokerFixture.cs new file mode 100644 index 00000000..1573bcd6 --- /dev/null +++ b/tests/Integration/Containers/Workflows/MqttToHttp/FluxFlow.Workflow.ContainerIntegrationTests/MqttBrokerFixture.cs @@ -0,0 +1,65 @@ +using System.Text; +using DotNet.Testcontainers.Builders; +using DotNet.Testcontainers.Configurations; +using DotNet.Testcontainers.Containers; +using Xunit; + +namespace FluxFlow.Workflow.ContainerIntegrationTests; + +public sealed class MqttBrokerFixture : IAsyncLifetime +{ + private const ushort MqttPort = 1883; + private IContainer? _container; + + public string Host => + _container?.Hostname + ?? throw new InvalidOperationException("The MQTT broker container has not started."); + + public int Port => + _container?.GetMappedPublicPort(MqttPort) + ?? throw new InvalidOperationException("The MQTT broker container has not started."); + + public async Task InitializeAsync() + { + const string configuration = """ + listener 1883 + allow_anonymous true + persistence false + """; + var container = new ContainerBuilder("eclipse-mosquitto:2.0.22") + .WithPortBinding(MqttPort, assignRandomHostPort: true) + .WithResourceMapping( + Encoding.UTF8.GetBytes(configuration), + FilePath.Of("/mosquitto/config/mosquitto.conf")) + .WithWaitStrategy( + Wait.ForUnixContainer() + .UntilInternalTcpPortIsAvailable(MqttPort) + .UntilExternalTcpPortIsAvailable(MqttPort)) + .Build(); + + try + { + using var timeout = new CancellationTokenSource(TimeSpan.FromMinutes(1)); + await container.StartAsync(timeout.Token); + _container = container; + } + catch (Exception exception) + { + var (stdout, stderr) = await container.GetLogsAsync(); + await container.DisposeAsync(); + throw new InvalidOperationException( + $"The MQTT broker container did not become ready.{Environment.NewLine}" + + $"stdout:{Environment.NewLine}{stdout}{Environment.NewLine}" + + $"stderr:{Environment.NewLine}{stderr}", + exception); + } + } + + public async Task DisposeAsync() + { + if (_container is not null) + { + await _container.DisposeAsync(); + } + } +} diff --git a/tests/Integration/Containers/Workflows/MqttToHttp/FluxFlow.Workflow.ContainerIntegrationTests/MqttToHttpContainerIntegrationTests.cs b/tests/Integration/Containers/Workflows/MqttToHttp/FluxFlow.Workflow.ContainerIntegrationTests/MqttToHttpContainerIntegrationTests.cs new file mode 100644 index 00000000..8217ea4e --- /dev/null +++ b/tests/Integration/Containers/Workflows/MqttToHttp/FluxFlow.Workflow.ContainerIntegrationTests/MqttToHttpContainerIntegrationTests.cs @@ -0,0 +1,135 @@ +using System.Text; +using System.Text.Json; +using FluxFlow.Components.Http.Composition; +using FluxFlow.Components.Mapping.Composition; +using FluxFlow.Components.Mqtt.Composition; +using FluxFlow.Components.Mqtt.Configuration; +using FluxFlow.Components.Mqtt.Contracts; +using FluxFlow.Components.Mqtt.MqttNet; +using FluxFlow.Components.Mqtt.Transport; +using FluxFlow.Composition.Authoring; +using FluxFlow.Composition.DependencyInjection; +using FluxFlow.Data; +using FluxFlow.Expressions.Jsonata; +using FluxFlow.Mapping; +using FluxFlow.Nodes; +using FluxFlow.Testing; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; +using Xunit; + +namespace FluxFlow.Workflow.ContainerIntegrationTests; + +public sealed class MqttToHttpContainerIntegrationTests : IClassFixture +{ + private static readonly TimeSpan Timeout = TimeSpan.FromSeconds(30); + private readonly MqttBrokerFixture _broker; + + public MqttToHttpContainerIntegrationTests(MqttBrokerFixture broker) => _broker = broker; + + [Fact] + [Trait("Category", "ContainerIntegration")] + public async Task Containerized_mqtt_broker_routes_a_dynamic_workflow_to_a_real_http_boundary() + { + await using var httpProbe = await HttpCaptureProbe.StartAsync(); + var scenarioId = Guid.NewGuid().ToString("N"); + var topic = $"fluxflow/container/{scenarioId}"; + + var application = new ApplicationDefinitionBuilder(); + var broker = application.AddMqttBroker("broker", options => + { + options.Host = _broker.Host; + options.Port = _broker.Port; + options.Transport = MqttBrokerTransport.Tcp; + }); + var subscription = application.AddMqttSubscription("scenario", options => + { + options.TopicFilter = topic; + options.Qos = MqttQos.AtLeastOnce; + }); + var mqttClient = application.AddMqttClient("client", options => + { + options.ClientId = $"fluxflow-container-{scenarioId}"; + options.Broker = broker; + options.CleanStart = true; + options.AutoConnect = MqttAutoConnectMode.OnStart; + options.DisableReconnect(); + options.AddSubscription(subscription); + }); + var expressionEngine = application.AddResource("expressionEngine", "host.expression"); + var httpClient = application.AddResource("httpClient", "host.http-client"); + var workflow = application.AddWorkflow("crossTransport"); + var publish = workflow.AddMqttPublish("publish", options => options.Client = mqttClient); + var receive = workflow.AddMqttReceive("receive", options => + { + options.Client = mqttClient; + options.AddSubscription(subscription); + }); + var mapper = workflow.AddMapper("map", options => + { + options.Engine = expressionEngine; + options.Expression = $$""" + { + 'method': 'POST', + 'url': '{{httpProbe.CaptureUrl.AbsoluteUri}}', + 'headers': { + 'x-flow-scenario': '{{scenarioId}}', + 'x-mqtt-topic': input.topic + }, + 'body': { + 'topic': input.topic, + 'payload': input.content.bytes + } + } + """; + }); + var request = workflow.AddHttpRequest("request", options => options.Client = httpClient); + workflow.Connect(receive.Output, mapper.Input); + workflow.Connect(mapper.Output, request.Input); + + using var outboundHttpClient = new HttpClient(); + await using var host = await CanonicalApplicationTestHost.StartAsync( + application.Build(), + static _ => { }, + configureHostServices: services => + services.AddSingleton(), + registerResources: context => + { + context.Services.AddExternalFluxFlowResource( + expressionEngine.Address, + new JsonataFlowExpressionEngine()); + context.Services.AddExternalFluxFlowResource(httpClient.Address, outboundHttpClient); + }); + host.StartResult.Succeeded.ShouldBeTrue(JsonSerializer.Serialize(host.StartResult.Update?.Diagnostics)); + + var ports = host.GetRequiredPorts(); + var publishOutput = ports.ReceiveAsync(publish.Output, Timeout); + var httpOutput = ports.ReceiveAsync(request.Output, Timeout); + var content = FlowContent.FromBytes( + Encoding.UTF8.GetBytes("{\"temperature\":21}"), + "application/json", + "utf-8"); + + (await ports.SendAsync( + publish.Input.Address, + FlowMessage.Create(new MqttPublishMessage + { + Topic = topic, + Content = content, + Qos = MqttQos.AtLeastOnce + }))) + .IsAccepted.ShouldBeTrue(); + + (await publishOutput).Message.ShouldNotBeNull().IsError.ShouldBeFalse(); + var captured = await httpProbe.ReceiveAsync(Timeout); + (await httpOutput).Message.ShouldNotBeNull().IsError.ShouldBeFalse(); + captured.Scenario.ShouldBe(scenarioId); + captured.Topic.ShouldBe(topic); + using var body = JsonDocument.Parse(captured.Body); + body.RootElement.GetProperty("topic").GetString().ShouldBe(topic); + body.RootElement.GetProperty("payload").GetString().ShouldBe( + Convert.ToBase64String(content.Bytes.AsSpan())); + + await host.Application.StopAsync(); + } +} diff --git a/tests/Integration/Containers/Workflows/MqttToHttp/FluxFlow.Workflow.ContainerIntegrationTests/README.md b/tests/Integration/Containers/Workflows/MqttToHttp/FluxFlow.Workflow.ContainerIntegrationTests/README.md new file mode 100644 index 00000000..fcf26471 --- /dev/null +++ b/tests/Integration/Containers/Workflows/MqttToHttp/FluxFlow.Workflow.ContainerIntegrationTests/README.md @@ -0,0 +1,12 @@ +# MQTT-to-HTTP container integration tests + +This deterministic suite provisions a disposable MQTT broker, runs the real +MQTT adapter, JSONata mapper, workflow runtime, and HTTP component, then sends +the request to a real loopback HTTP socket. + +The broker image is pinned, the host port is assigned dynamically, readiness is +checked before the test starts, container logs are included in startup +failures, and every run uses unique MQTT identities and topics. + +Run ./eng/test.ps1 -Suite Integration from the repository root. A compatible +container runtime must be available to the test process. diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 00000000..fa7f569c --- /dev/null +++ b/tests/README.md @@ -0,0 +1,37 @@ +# Test architecture + +Tests use a four-kind layout: + + tests/ + Unit/// + Integration/Containers/// + Acceptance/Workflows// + Smoke/External/// + Support/ + +| Kind | Purpose | Dependencies | Default execution | +| --- | --- | --- | --- | +| Unit | One package or cohesive module | In-process substitutes only | Every build | +| Integration | Production adapters against disposable infrastructure | Test-owned containers and real sockets | CI and container-capable development | +| Acceptance | Cross-module product behavior through public authoring APIs | Deterministic in-process boundaries | Every build | +| Smoke | Deployed or externally managed environment verification | Explicit endpoints and credentials | Opt-in after deployment or on schedule | + +Support contains reusable test infrastructure and is not a fifth test kind. +Scenario-specific settings, containers, and probes stay inside their scenario +project. Shared support is promoted only after multiple scenarios need exactly +the same semantics. + +## Naming + +- Projects use .Tests, IntegrationTests, .Acceptance.Tests, or SmokeTests. +- Test classes name the subject or scenario and end in Tests. +- Test methods describe behavior using Condition_expected_behavior. +- Category traits are Acceptance, ContainerIntegration, and ExternalSmoke. +- Tests allocate unique ports, topics, queues, subjects, databases, and client + identifiers. They never depend on execution order or shared external state. + +## Running + +Run ./eng/test.ps1 with Suite set to Unit, Acceptance, Integration, Smoke, or +All. All excludes external smoke tests. Add IncludeLicensedDatabaseTests when +the database container license has been accepted. diff --git a/tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/ExternalSmokeFactAttribute.cs b/tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/ExternalSmokeFactAttribute.cs new file mode 100644 index 00000000..48fe5d9d --- /dev/null +++ b/tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/ExternalSmokeFactAttribute.cs @@ -0,0 +1,20 @@ +using Xunit; + +namespace FluxFlow.Workflow.ExternalSmokeTests; + +[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] +internal sealed class ExternalSmokeFactAttribute : FactAttribute +{ + internal const string EnabledVariable = "FLUXFLOW_EXTERNAL_SMOKE"; + + public ExternalSmokeFactAttribute() + { + if (!string.Equals( + Environment.GetEnvironmentVariable(EnabledVariable), + "1", + StringComparison.Ordinal)) + { + Skip = $"Set {EnabledVariable}=1 to run external workflow smoke tests."; + } + } +} diff --git a/tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/FluxFlow.Workflow.ExternalSmokeTests.csproj b/tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/FluxFlow.Workflow.ExternalSmokeTests.csproj new file mode 100644 index 00000000..f10034da --- /dev/null +++ b/tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/FluxFlow.Workflow.ExternalSmokeTests.csproj @@ -0,0 +1,37 @@ + + + + net10.0 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/HttpCaptureProbe.cs b/tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/HttpCaptureProbe.cs new file mode 100644 index 00000000..b7eb3162 --- /dev/null +++ b/tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/HttpCaptureProbe.cs @@ -0,0 +1,85 @@ +using System.Net; +using System.Threading.Channels; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Hosting.Server; +using Microsoft.AspNetCore.Hosting.Server.Features; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; + +namespace FluxFlow.Workflow.ExternalSmokeTests; + +internal sealed class HttpCaptureProbe : IAsyncDisposable +{ + private readonly WebApplication _application; + private readonly Channel _requests; + + private HttpCaptureProbe( + WebApplication application, + Channel requests, + Uri captureUrl) + { + _application = application; + _requests = requests; + CaptureUrl = captureUrl; + } + + internal Uri CaptureUrl { get; } + + internal static async ValueTask StartAsync( + CancellationToken cancellationToken = default) + { + var requests = Channel.CreateUnbounded( + new UnboundedChannelOptions + { + SingleReader = true, + SingleWriter = false, + AllowSynchronousContinuations = false + }); + var builder = WebApplication.CreateSlimBuilder(); + builder.WebHost.ConfigureKestrel(options => options.Listen(IPAddress.Loopback, 0)); + var application = builder.Build(); + application.MapPost("/capture", async context => + { + using var reader = new StreamReader(context.Request.Body); + var body = await reader.ReadToEndAsync(context.RequestAborted); + await requests.Writer.WriteAsync( + new CapturedHttpRequest( + context.Request.Headers["x-flow-scenario"].ToString(), + context.Request.Headers["x-mqtt-topic"].ToString(), + body), + context.RequestAborted); + context.Response.StatusCode = StatusCodes.Status202Accepted; + await context.Response.WriteAsync("{\"accepted\":true}", context.RequestAborted); + }); + await application.StartAsync(cancellationToken); + + var addresses = application.Services + .GetRequiredService() + .Features + .Get()? + .Addresses + ?? throw new InvalidOperationException("The HTTP capture server did not publish an address."); + var address = addresses.ShouldHaveSingleItem(); + return new HttpCaptureProbe(application, requests, new Uri(new Uri(address), "/capture")); + } + + internal async ValueTask ReceiveAsync( + TimeSpan timeout, + CancellationToken cancellationToken = default) + { + using var timeoutSource = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); + timeoutSource.CancelAfter(timeout); + return await _requests.Reader.ReadAsync(timeoutSource.Token); + } + + public async ValueTask DisposeAsync() + { + _requests.Writer.TryComplete(); + await _application.StopAsync(); + await _application.DisposeAsync(); + } +} + +internal sealed record CapturedHttpRequest(string Scenario, string Topic, string Body); diff --git a/tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/MqttToHttpExternalSettings.cs b/tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/MqttToHttpExternalSettings.cs new file mode 100644 index 00000000..8e8239cc --- /dev/null +++ b/tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/MqttToHttpExternalSettings.cs @@ -0,0 +1,57 @@ +namespace FluxFlow.Workflow.ExternalSmokeTests; + +internal sealed record MqttToHttpExternalSettings( + string Host, + int Port, + bool UseTls, + string? Username, + string? Password) +{ + private const string HostVariable = "FLUXFLOW_EXTERNAL_MQTT_HOST"; + private const string PortVariable = "FLUXFLOW_EXTERNAL_MQTT_PORT"; + private const string TlsVariable = "FLUXFLOW_EXTERNAL_MQTT_TLS"; + private const string UsernameVariable = "FLUXFLOW_EXTERNAL_MQTT_USERNAME"; + private const string PasswordVariable = "FLUXFLOW_EXTERNAL_MQTT_PASSWORD"; + + internal static MqttToHttpExternalSettings Load() + { + var host = Environment.GetEnvironmentVariable(HostVariable); + if (string.IsNullOrWhiteSpace(host)) + { + throw new InvalidOperationException( + $"The {HostVariable} environment variable is required when external smoke tests are enabled."); + } + + var useTls = ParseBoolean(TlsVariable, defaultValue: false); + var port = ParsePort(useTls ? 8883 : 1883); + return new MqttToHttpExternalSettings( + host.Trim(), + port, + useTls, + Normalize(Environment.GetEnvironmentVariable(UsernameVariable)), + Normalize(Environment.GetEnvironmentVariable(PasswordVariable))); + } + + private static int ParsePort(int defaultPort) + { + var value = Environment.GetEnvironmentVariable(PortVariable); + if (string.IsNullOrWhiteSpace(value)) + return defaultPort; + if (int.TryParse(value, out var port) && port is > 0 and <= 65535) + return port; + throw new InvalidOperationException($"The {PortVariable} environment variable must be a valid TCP port."); + } + + private static bool ParseBoolean(string variable, bool defaultValue) + { + var value = Environment.GetEnvironmentVariable(variable); + if (string.IsNullOrWhiteSpace(value)) + return defaultValue; + if (bool.TryParse(value, out var parsed)) + return parsed; + throw new InvalidOperationException($"The {variable} environment variable must be true or false."); + } + + private static string? Normalize(string? value) + => string.IsNullOrWhiteSpace(value) ? null : value.Trim(); +} diff --git a/tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/MqttToHttpExternalSmokeTests.cs b/tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/MqttToHttpExternalSmokeTests.cs new file mode 100644 index 00000000..bf7d9970 --- /dev/null +++ b/tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/MqttToHttpExternalSmokeTests.cs @@ -0,0 +1,141 @@ +using System.Text; +using System.Text.Json; +using FluxFlow.Components.Http.Composition; +using FluxFlow.Components.Mapping.Composition; +using FluxFlow.Components.Mqtt.Composition; +using FluxFlow.Components.Mqtt.Configuration; +using FluxFlow.Components.Mqtt.Contracts; +using FluxFlow.Components.Mqtt.MqttNet; +using FluxFlow.Components.Mqtt.Transport; +using FluxFlow.Composition.Authoring; +using FluxFlow.Composition.DependencyInjection; +using FluxFlow.Data; +using FluxFlow.Expressions.Jsonata; +using FluxFlow.Mapping; +using FluxFlow.Nodes; +using FluxFlow.Testing; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; +using Xunit; + +namespace FluxFlow.Workflow.ExternalSmokeTests; + +public sealed class MqttToHttpExternalSmokeTests +{ + private static readonly TimeSpan Timeout = TimeSpan.FromSeconds(30); + + [ExternalSmokeFact] + [Trait("Category", "ExternalSmoke")] + public async Task Configured_external_broker_routes_a_dynamic_workflow_to_a_real_http_boundary() + { + var settings = MqttToHttpExternalSettings.Load(); + await using var httpProbe = await HttpCaptureProbe.StartAsync(); + var scenarioId = Guid.NewGuid().ToString("N"); + var topic = $"fluxflow/external/{scenarioId}"; + + var application = new ApplicationDefinitionBuilder(); + var broker = application.AddMqttBroker("broker", options => + { + options.Host = settings.Host; + options.Port = settings.Port; + options.UseTls = settings.UseTls; + options.Transport = MqttBrokerTransport.Tcp; + }); + var subscription = application.AddMqttSubscription("scenario", options => + { + options.TopicFilter = topic; + options.Qos = MqttQos.AtLeastOnce; + }); + var mqttClient = application.AddMqttClient("client", options => + { + options.ClientId = $"fluxflow-external-{scenarioId}"; + options.Broker = broker; + options.Username = settings.Username; + options.Password = settings.Password; + options.CleanStart = true; + options.AutoConnect = MqttAutoConnectMode.OnStart; + options.DisableReconnect(); + options.AddSubscription(subscription); + }); + var expressionEngine = application.AddResource( + "expressionEngine", + "host.expression"); + var httpClient = application.AddResource("httpClient", "host.http-client"); + var workflow = application.AddWorkflow("crossTransport"); + var publish = workflow.AddMqttPublish("publish", options => options.Client = mqttClient); + var receive = workflow.AddMqttReceive("receive", options => + { + options.Client = mqttClient; + options.AddSubscription(subscription); + }); + var mapper = workflow.AddMapper("map", options => + { + options.Engine = expressionEngine; + options.Expression = $$""" + { + 'method': 'POST', + 'url': '{{httpProbe.CaptureUrl.AbsoluteUri}}', + 'headers': { + 'x-flow-scenario': '{{scenarioId}}', + 'x-mqtt-topic': input.topic + }, + 'body': { + 'topic': input.topic, + 'payload': input.content.bytes + } + } + """; + }); + var request = workflow.AddHttpRequest("request", options => options.Client = httpClient); + workflow.Connect(receive.Output, mapper.Input); + workflow.Connect(mapper.Output, request.Input); + + using var outboundHttpClient = new HttpClient(); + await using var host = await CanonicalApplicationTestHost.StartAsync( + application.Build(), + static _ => { }, + configureHostServices: services => + services.AddSingleton(), + registerResources: context => + { + context.Services.AddExternalFluxFlowResource( + expressionEngine.Address, + new JsonataFlowExpressionEngine()); + context.Services.AddExternalFluxFlowResource( + httpClient.Address, + outboundHttpClient); + }); + host.StartResult.Succeeded.ShouldBeTrue( + JsonSerializer.Serialize(host.StartResult.Update?.Diagnostics)); + + var ports = host.GetRequiredPorts(); + var publishOutput = ports.ReceiveAsync(publish.Output, Timeout); + var httpOutput = ports.ReceiveAsync(request.Output, Timeout); + var content = FlowContent.FromBytes( + Encoding.UTF8.GetBytes("{\"temperature\":21}"), + "application/json", + "utf-8"); + + (await ports.SendAsync( + publish.Input.Address, + FlowMessage.Create(new MqttPublishMessage + { + Topic = topic, + Content = content, + Qos = MqttQos.AtLeastOnce + }))) + .IsAccepted.ShouldBeTrue(); + + (await publishOutput).Message.ShouldNotBeNull().IsError.ShouldBeFalse(); + var captured = await httpProbe.ReceiveAsync(Timeout); + (await httpOutput).Message.ShouldNotBeNull().IsError.ShouldBeFalse(); + captured.Scenario.ShouldBe(scenarioId); + captured.Topic.ShouldBe(topic); + using var body = JsonDocument.Parse(captured.Body); + body.RootElement.GetProperty("topic").GetString().ShouldBe(topic); + body.RootElement.GetProperty("payload").GetString().ShouldBe( + Convert.ToBase64String(content.Bytes.AsSpan())); + + await host.Application.StopAsync(); + } +} diff --git a/tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/README.md b/tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/README.md new file mode 100644 index 00000000..f3646345 --- /dev/null +++ b/tests/Smoke/External/Workflows/MqttToHttp/FluxFlow.Workflow.ExternalSmokeTests/README.md @@ -0,0 +1,16 @@ +# MQTT-to-HTTP external smoke tests + +This opt-in suite verifies a complete dynamically authored workflow against an +externally managed MQTT broker and a real HTTP socket. It is not part of the +deterministic CI suite because its availability and credentials belong to the +deployment environment. + +Set FLUXFLOW_EXTERNAL_SMOKE=1 and configure FLUXFLOW_EXTERNAL_MQTT_HOST. +Optional settings are FLUXFLOW_EXTERNAL_MQTT_PORT, +FLUXFLOW_EXTERNAL_MQTT_TLS, FLUXFLOW_EXTERNAL_MQTT_USERNAME, and +FLUXFLOW_EXTERNAL_MQTT_PASSWORD. + +Run ./eng/test.ps1 -Suite Smoke from the repository root. + +Each future transport scenario owns its settings and probes. Do not extend a +global settings object with protocol-specific configuration. diff --git a/tests/FluxFlow.Testing/CanonicalApplicationTestHost.cs b/tests/Support/FluxFlow.Testing/CanonicalApplicationTestHost.cs similarity index 100% rename from tests/FluxFlow.Testing/CanonicalApplicationTestHost.cs rename to tests/Support/FluxFlow.Testing/CanonicalApplicationTestHost.cs diff --git a/tests/FluxFlow.Testing/CanonicalTestApplication.cs b/tests/Support/FluxFlow.Testing/CanonicalTestApplication.cs similarity index 100% rename from tests/FluxFlow.Testing/CanonicalTestApplication.cs rename to tests/Support/FluxFlow.Testing/CanonicalTestApplication.cs diff --git a/tests/FluxFlow.Testing/ComponentCatalogTestHost.cs b/tests/Support/FluxFlow.Testing/ComponentCatalogTestHost.cs similarity index 100% rename from tests/FluxFlow.Testing/ComponentCatalogTestHost.cs rename to tests/Support/FluxFlow.Testing/ComponentCatalogTestHost.cs diff --git a/tests/FluxFlow.Testing/ComponentDesignMetadataAssertions.cs b/tests/Support/FluxFlow.Testing/ComponentDesignMetadataAssertions.cs similarity index 100% rename from tests/FluxFlow.Testing/ComponentDesignMetadataAssertions.cs rename to tests/Support/FluxFlow.Testing/ComponentDesignMetadataAssertions.cs diff --git a/tests/Support/FluxFlow.Testing/FluxFlow.Testing.csproj b/tests/Support/FluxFlow.Testing/FluxFlow.Testing.csproj new file mode 100644 index 00000000..2b63f176 --- /dev/null +++ b/tests/Support/FluxFlow.Testing/FluxFlow.Testing.csproj @@ -0,0 +1,17 @@ + + + + net10.0 + false + + + + + + + + + + + + diff --git a/tests/FluxFlow.ComponentPackageTemplate.Tests/FluxFlow.ComponentPackageTemplate.Tests.csproj b/tests/Unit/Adapters/Expressions/FluxFlow.Expressions.Jsonata.Tests/FluxFlow.Expressions.Jsonata.Tests.csproj similarity index 70% rename from tests/FluxFlow.ComponentPackageTemplate.Tests/FluxFlow.ComponentPackageTemplate.Tests.csproj rename to tests/Unit/Adapters/Expressions/FluxFlow.Expressions.Jsonata.Tests/FluxFlow.Expressions.Jsonata.Tests.csproj index 695be13b..38b695b8 100644 --- a/tests/FluxFlow.ComponentPackageTemplate.Tests/FluxFlow.ComponentPackageTemplate.Tests.csproj +++ b/tests/Unit/Adapters/Expressions/FluxFlow.Expressions.Jsonata.Tests/FluxFlow.Expressions.Jsonata.Tests.csproj @@ -1,23 +1,22 @@ - + net10.0 false + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - diff --git a/tests/Unit/Adapters/Expressions/FluxFlow.Expressions.Jsonata.Tests/JsonataFlowExpressionEngineTests.cs b/tests/Unit/Adapters/Expressions/FluxFlow.Expressions.Jsonata.Tests/JsonataFlowExpressionEngineTests.cs new file mode 100644 index 00000000..5843907d --- /dev/null +++ b/tests/Unit/Adapters/Expressions/FluxFlow.Expressions.Jsonata.Tests/JsonataFlowExpressionEngineTests.cs @@ -0,0 +1,103 @@ +using System.Text.Json; +using FluxFlow.Mapping; +using Shouldly; +using Xunit; + +namespace FluxFlow.Expressions.Jsonata.Tests; + +public sealed class JsonataFlowExpressionEngineTests +{ + private readonly JsonataFlowExpressionEngine _engine = new(); + private IFlowExpressionEngine Engine => _engine; + + [Fact] + public void Name_identifies_jsonata() + => _engine.Name.ShouldBe("jsonata"); + + [Fact] + public void Evaluate_maps_json_input_to_json_element() + { + var context = Context(JsonSerializer.SerializeToElement(new + { + firstName = "Ada", + lastName = "Lovelace", + })); + + var result = Engine.Evaluate( + "{'displayName': input.firstName & ' ' & input.lastName}", + context); + + result.GetProperty("displayName").GetString().ShouldBe("Ada Lovelace"); + } + + [Theory] + [InlineData("input.count", 3)] + [InlineData("input.enabled", true)] + public void Evaluate_converts_primitive_results(string expression, object expected) + { + var context = Context(JsonSerializer.SerializeToElement(new + { + count = 3, + enabled = true, + })); + + _engine.Evaluate(expression, context, expected.GetType()).ShouldBe(expected); + } + + [Fact] + public void Evaluate_returns_null_for_json_null() + { + var context = Context(JsonSerializer.SerializeToElement(new { value = (string?)null })); + + _engine.Evaluate("input.value", context, typeof(object)).ShouldBeNull(); + } + + [Fact] + public void Evaluate_filters_non_serializable_runtime_variables() + { + var context = new FlowMapContext + { + Variables = new Dictionary(StringComparer.Ordinal) + { + ["input"] = JsonSerializer.SerializeToElement(new { value = "safe" }), + ["runtimeType"] = typeof(string), + ["callback"] = static () => { }, + }, + }; + + var result = Engine.Evaluate("input", context); + + result.GetProperty("value").GetString().ShouldBe("safe"); + } + + [Fact] + public void Compile_reuses_a_valid_expression() + { + var compiled = _engine.Compile("{'value': input.value}"); + + compiled.Evaluate(Context(JsonSerializer.SerializeToElement(new { value = 1 }))) + .GetProperty("value").GetInt32().ShouldBe(1); + compiled.Evaluate(Context(JsonSerializer.SerializeToElement(new { value = 2 }))) + .GetProperty("value").GetInt32().ShouldBe(2); + } + + [Fact] + public void Evaluate_rejects_blank_expression() + => Should.Throw(() => + _engine.Evaluate(" ", Context(JsonSerializer.SerializeToElement(1)), typeof(object))); + + [Fact] + public void Evaluate_surfaces_invalid_expression() + => Should.Throw(() => + _engine.Evaluate("input[", Context(JsonSerializer.SerializeToElement(1)), typeof(object))); + + private static FlowMapContext Context(JsonElement input) => + new() + { + Variables = new Dictionary(StringComparer.Ordinal) + { + ["input"] = input, + ["value"] = input, + }, + }; +} diff --git a/tests/FluxFlow.Fluent.Hosting.Tests/FlowGraphHostingTests.cs b/tests/Unit/Authoring/FluxFlow.Fluent.Hosting.Tests/FlowGraphHostingTests.cs similarity index 100% rename from tests/FluxFlow.Fluent.Hosting.Tests/FlowGraphHostingTests.cs rename to tests/Unit/Authoring/FluxFlow.Fluent.Hosting.Tests/FlowGraphHostingTests.cs diff --git a/tests/FluxFlow.Fluent.Hosting.Tests/FluxFlow.Fluent.Hosting.Tests.csproj b/tests/Unit/Authoring/FluxFlow.Fluent.Hosting.Tests/FluxFlow.Fluent.Hosting.Tests.csproj similarity index 64% rename from tests/FluxFlow.Fluent.Hosting.Tests/FluxFlow.Fluent.Hosting.Tests.csproj rename to tests/Unit/Authoring/FluxFlow.Fluent.Hosting.Tests/FluxFlow.Fluent.Hosting.Tests.csproj index 7a2041c8..5824bfb7 100644 --- a/tests/FluxFlow.Fluent.Hosting.Tests/FluxFlow.Fluent.Hosting.Tests.csproj +++ b/tests/Unit/Authoring/FluxFlow.Fluent.Hosting.Tests/FluxFlow.Fluent.Hosting.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,9 +6,9 @@ - - - + + + diff --git a/tests/FluxFlow.Fluent.Hosting.Tests/TestNodes.cs b/tests/Unit/Authoring/FluxFlow.Fluent.Hosting.Tests/TestNodes.cs similarity index 100% rename from tests/FluxFlow.Fluent.Hosting.Tests/TestNodes.cs rename to tests/Unit/Authoring/FluxFlow.Fluent.Hosting.Tests/TestNodes.cs diff --git a/tests/FluxFlow.Fluent.Tests/FlowBuilderTests.cs b/tests/Unit/Authoring/FluxFlow.Fluent.Tests/FlowBuilderTests.cs similarity index 100% rename from tests/FluxFlow.Fluent.Tests/FlowBuilderTests.cs rename to tests/Unit/Authoring/FluxFlow.Fluent.Tests/FlowBuilderTests.cs diff --git a/tests/FluxFlow.Fluent.Tests/FlowObservationTests.cs b/tests/Unit/Authoring/FluxFlow.Fluent.Tests/FlowObservationTests.cs similarity index 100% rename from tests/FluxFlow.Fluent.Tests/FlowObservationTests.cs rename to tests/Unit/Authoring/FluxFlow.Fluent.Tests/FlowObservationTests.cs diff --git a/tests/FluxFlow.Fluent.Tests/FlowSegmentTests.cs b/tests/Unit/Authoring/FluxFlow.Fluent.Tests/FlowSegmentTests.cs similarity index 100% rename from tests/FluxFlow.Fluent.Tests/FlowSegmentTests.cs rename to tests/Unit/Authoring/FluxFlow.Fluent.Tests/FlowSegmentTests.cs diff --git a/tests/Unit/Authoring/FluxFlow.Fluent.Tests/FluxFlow.Fluent.Tests.csproj b/tests/Unit/Authoring/FluxFlow.Fluent.Tests/FluxFlow.Fluent.Tests.csproj new file mode 100644 index 00000000..41bd20ee --- /dev/null +++ b/tests/Unit/Authoring/FluxFlow.Fluent.Tests/FluxFlow.Fluent.Tests.csproj @@ -0,0 +1,24 @@ + + + + net10.0 + false + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/FluxFlow.Fluent.Tests/TestFlowNodes.cs b/tests/Unit/Authoring/FluxFlow.Fluent.Tests/TestFlowNodes.cs similarity index 100% rename from tests/FluxFlow.Fluent.Tests/TestFlowNodes.cs rename to tests/Unit/Authoring/FluxFlow.Fluent.Tests/TestFlowNodes.cs diff --git a/tests/FluxFlow.Components.Assertions.Composition.Tests/AssertionsServiceCollectionExtensionsTests.cs b/tests/Unit/Components/Assertions/FluxFlow.Components.Assertions.Composition.Tests/AssertionsServiceCollectionExtensionsTests.cs similarity index 98% rename from tests/FluxFlow.Components.Assertions.Composition.Tests/AssertionsServiceCollectionExtensionsTests.cs rename to tests/Unit/Components/Assertions/FluxFlow.Components.Assertions.Composition.Tests/AssertionsServiceCollectionExtensionsTests.cs index 9cca7dc5..a0c2de31 100644 --- a/tests/FluxFlow.Components.Assertions.Composition.Tests/AssertionsServiceCollectionExtensionsTests.cs +++ b/tests/Unit/Components/Assertions/FluxFlow.Components.Assertions.Composition.Tests/AssertionsServiceCollectionExtensionsTests.cs @@ -43,9 +43,9 @@ public void AddAssertions_registers_only_the_canonical_contract() "Events" ], ignoreOrder: false); assertion.Inputs[AssertionsComponentDefinition.Ports.Input].MessageType.ShouldBe( - typeof(JsonElement)); + typeof(FlowValue)); assertion.Outputs[AssertionsComponentDefinition.Ports.Output].MessageType.ShouldBe( - typeof(AssertionResult)); + typeof(FlowValue)); assertion.Options.Values.Select(option => ( option.Name, option.ValueType, @@ -136,9 +136,9 @@ public void Design_declaration_describes_canonical_ports() port.Order, port.IsPrimary, port.ValueType?.Value)).ShouldBe([ - (AssertionsComponentDefinition.Ports.Input, PortDirection.Input, 0, true, nameof(JsonElement)), - (AssertionsComponentDefinition.Ports.Output, PortDirection.Output, 1, true, "AssertionResult"), - (AssertionsComponentDefinition.Ports.Events, PortDirection.Output, 2, false, nameof(ComponentEvent)) + (AssertionsComponentDefinition.Ports.Input, PortDirection.Input, 0, true, nameof(FlowValue)), + (AssertionsComponentDefinition.Ports.Output, PortDirection.Output, 1, true, nameof(FlowValue)), + (AssertionsComponentDefinition.Ports.Events, PortDirection.Output, 2, false, nameof(global::FluxFlow.Data.FlowValue)) ]); } @@ -219,7 +219,7 @@ await WithNodeAsync( .IsAccepted.ShouldBeTrue(); var passed = (await passedReceive).Message.ShouldNotBeNull(); passed.IsError.ShouldBeFalse(); - passed.Value.Input.ShouldBe(passedInput); + passed.Value.Input.GetRawText().ShouldBe(passedInput.GetRawText()); passed.Value.Description.ShouldBe("score-check"); var failedReceive = ports.ReceiveAsync>(Output, Timeout); @@ -228,7 +228,7 @@ await WithNodeAsync( .IsAccepted.ShouldBeTrue(); var failed = (await failedReceive).Message.ShouldNotBeNull(); failed.IsError.ShouldBeFalse(); - failed.Value.Input.ShouldBe(failedInput); + failed.Value.Input.GetRawText().ShouldBe(failedInput.GetRawText()); failed.Value.Message.ShouldBe("Score too low."); }, Properties( @@ -261,7 +261,7 @@ await WithNodeAsync( var result = (await receive).Message.ShouldNotBeNull().Value; contextFactory.Input.ShouldBe(input); - result.Input.ShouldBe(input); + result.Input.GetRawText().ShouldBe(input.GetRawText()); result.EvaluatedAt.ShouldBe(timestamp); }, Properties( diff --git a/tests/Unit/Components/Assertions/FluxFlow.Components.Assertions.Composition.Tests/FluxFlow.Components.Assertions.Composition.Tests.csproj b/tests/Unit/Components/Assertions/FluxFlow.Components.Assertions.Composition.Tests/FluxFlow.Components.Assertions.Composition.Tests.csproj new file mode 100644 index 00000000..7abd1ce1 --- /dev/null +++ b/tests/Unit/Components/Assertions/FluxFlow.Components.Assertions.Composition.Tests/FluxFlow.Components.Assertions.Composition.Tests.csproj @@ -0,0 +1,31 @@ + + + + net10.0 + false + + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/FluxFlow.Components.Assertions.Tests/AssertionNodeTests.cs b/tests/Unit/Components/Assertions/FluxFlow.Components.Assertions.Tests/AssertionNodeTests.cs similarity index 84% rename from tests/FluxFlow.Components.Assertions.Tests/AssertionNodeTests.cs rename to tests/Unit/Components/Assertions/FluxFlow.Components.Assertions.Tests/AssertionNodeTests.cs index 1aff238d..631df161 100644 --- a/tests/FluxFlow.Components.Assertions.Tests/AssertionNodeTests.cs +++ b/tests/Unit/Components/Assertions/FluxFlow.Components.Assertions.Tests/AssertionNodeTests.cs @@ -4,6 +4,7 @@ using FluxFlow.Components.Assertions.Diagnostics; using FluxFlow.Components.Assertions.Nodes; using FluxFlow.Components.Assertions.Options; +using FluxFlow.Data; using FluxFlow.Mapping; using FluxFlow.Nodes; using Microsoft.Extensions.Time.Testing; @@ -127,12 +128,12 @@ public async Task Events_and_results_use_injected_clock() var @event = await events.ReceiveAsync().WaitAsync(Timeout); result.Value.EvaluatedAt.ShouldBe(timestamp); @event.Timestamp.ShouldBe(timestamp); - @event.Name.ShouldBe(AssertionDiagnosticNames.Evaluated); - @event.Level.ShouldBe(FlowEventLevel.Information); - @event.Attributes["resultKind"].ShouldBe(AssertionResultKinds.Failed); - @event.Attributes["passed"].ShouldBe(false); - @event.Attributes["isError"].ShouldBe(false); - @event.Attributes["expressionId"].ShouldBe("assert-v2"); + @event.ToFlowEvent().Name.ShouldBe(AssertionDiagnosticNames.Evaluated); + @event.ToFlowEvent().Level.ShouldBe(FlowEventLevel.Information); + @event.ToFlowEvent().Attributes["resultKind"].ShouldBe(AssertionResultKinds.Failed); + @event.ToFlowEvent().Attributes["passed"].ShouldBe(false); + @event.ToFlowEvent().Attributes["isError"].ShouldBe(false); + @event.ToFlowEvent().Attributes["expressionId"].ShouldBe("assert-v2"); } [Fact] @@ -195,6 +196,28 @@ public void Json_facade_rejects_invalid_options_and_has_no_legacy_ports() typeof(AssertionOptions).GetProperty("Engine").ShouldBeNull(); } + [Fact] + public async Task Json_runtime_facade_uses_canonical_ports_and_preserves_lineage() + { + await using var node = new JsonAssertionNode( + new AssertionOptions { Expression = "assert" }, + new RecordingExpressionEngine( + evaluate: (_, context, _) => + ((JsonElement)context.Variables["input"]!).GetProperty("score").GetInt32() >= 10)); + var output = Sink(node.Output); + var request = FlowMessage.Create(FlowValue.From(new { score = 12 })); + + await node.Input.SendAsync(request); + + var response = await output.ReceiveAsync().WaitAsync(Timeout); + var result = response.Value!.Deserialize>(); + response.IsError.ShouldBeFalse(); + result.ShouldNotBeNull().Passed.ShouldBeTrue(); + result.Input.GetProperty("score").GetInt32().ShouldBe(12); + response.CorrelationId.ShouldBe(request.CorrelationId); + response.CausationId.ShouldBe(request.MessageId); + } + private static BufferBlock Sink(ISourceBlock source) { var sink = new BufferBlock(); diff --git a/tests/FluxFlow.Components.Assertions.Tests/FluxFlow.Components.Assertions.Tests.csproj b/tests/Unit/Components/Assertions/FluxFlow.Components.Assertions.Tests/FluxFlow.Components.Assertions.Tests.csproj similarity index 61% rename from tests/FluxFlow.Components.Assertions.Tests/FluxFlow.Components.Assertions.Tests.csproj rename to tests/Unit/Components/Assertions/FluxFlow.Components.Assertions.Tests/FluxFlow.Components.Assertions.Tests.csproj index de471833..c64cf02d 100644 --- a/tests/FluxFlow.Components.Assertions.Tests/FluxFlow.Components.Assertions.Tests.csproj +++ b/tests/Unit/Components/Assertions/FluxFlow.Components.Assertions.Tests/FluxFlow.Components.Assertions.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,9 +6,9 @@ - - - + + + diff --git a/tests/FluxFlow.Components.Assertions.Tests/RecordingExpressionEngine.cs b/tests/Unit/Components/Assertions/FluxFlow.Components.Assertions.Tests/RecordingExpressionEngine.cs similarity index 100% rename from tests/FluxFlow.Components.Assertions.Tests/RecordingExpressionEngine.cs rename to tests/Unit/Components/Assertions/FluxFlow.Components.Assertions.Tests/RecordingExpressionEngine.cs diff --git a/tests/FluxFlow.Components.Designer.Tests/ComponentDesignDeclarationTests.cs b/tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/ComponentDesignDeclarationTests.cs similarity index 100% rename from tests/FluxFlow.Components.Designer.Tests/ComponentDesignDeclarationTests.cs rename to tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/ComponentDesignDeclarationTests.cs diff --git a/tests/FluxFlow.Components.Designer.Tests/ComponentDesignMetadataCatalogTests.cs b/tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/ComponentDesignMetadataCatalogTests.cs similarity index 99% rename from tests/FluxFlow.Components.Designer.Tests/ComponentDesignMetadataCatalogTests.cs rename to tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/ComponentDesignMetadataCatalogTests.cs index 7690ac15..58d3f323 100644 --- a/tests/FluxFlow.Components.Designer.Tests/ComponentDesignMetadataCatalogTests.cs +++ b/tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/ComponentDesignMetadataCatalogTests.cs @@ -522,8 +522,8 @@ public void Registration_finalization_preserves_canonical_and_structural_metadat var events = found.Ports.Single(port => port.Name.Value == "Events"); events.Direction.ShouldBe(PortDirection.Output); - events.MessageType.ShouldBe(typeof(ComponentEvent)); - events.ValueType?.Value.ShouldBe(nameof(ComponentEvent)); + events.MessageType.ShouldBe(typeof(global::FluxFlow.Data.FlowValue)); + events.ValueType?.Value.ShouldBe(nameof(global::FluxFlow.Data.FlowValue)); events.Group?.Value.ShouldBe("Diagnostics"); events.Order.ShouldBe(int.MaxValue); AttributeValue(found.Attributes, "component-scope").ShouldBe("original"); @@ -644,7 +644,7 @@ .. CreateMetadata().Ports, Name = new ComponentPortName("Events"), Direction = PortDirection.Input, Order = int.MaxValue, - ValueType = new ComponentValueTypeHint(nameof(ComponentEvent)) + ValueType = new ComponentValueTypeHint(nameof(global::FluxFlow.Data.FlowValue)) } ] }; @@ -654,7 +654,7 @@ .. CreateMetadata().Ports, catalog.TryGet(metadata.Type, out var found).ShouldBeTrue(); var events = found.Ports.Single(port => port.Name.Value == "Events"); events.Direction.ShouldBe(PortDirection.Input); - events.ValueType?.Value.ShouldBe(nameof(ComponentEvent)); + events.ValueType?.Value.ShouldBe(nameof(global::FluxFlow.Data.FlowValue)); } [Fact] @@ -1891,7 +1891,7 @@ private sealed class MetadataNode : IFlowNode public BufferBlock>> Output { get; } = new(); - public BufferBlock Events { get; } = new(); + public BufferBlock Events { get; } = new(); public Task Completion { get; } = Task.CompletedTask; diff --git a/tests/FluxFlow.Components.Designer.Tests/ComponentResourcePickerHintsTests.cs b/tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/ComponentResourcePickerHintsTests.cs similarity index 100% rename from tests/FluxFlow.Components.Designer.Tests/ComponentResourcePickerHintsTests.cs rename to tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/ComponentResourcePickerHintsTests.cs diff --git a/tests/FluxFlow.Components.Designer.Tests/DesignedComponentBindingBuilderTests.cs b/tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/DesignedComponentBindingBuilderTests.cs similarity index 73% rename from tests/FluxFlow.Components.Designer.Tests/DesignedComponentBindingBuilderTests.cs rename to tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/DesignedComponentBindingBuilderTests.cs index 44237631..270044b6 100644 --- a/tests/FluxFlow.Components.Designer.Tests/DesignedComponentBindingBuilderTests.cs +++ b/tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/DesignedComponentBindingBuilderTests.cs @@ -1,6 +1,7 @@ using System.Threading.Tasks.Dataflow; using FluxFlow.Components.Designer.Contracts; using FluxFlow.Composition; +using FluxFlow.Data; using FluxFlow.Nodes; using Microsoft.Extensions.DependencyInjection; using Shouldly; @@ -68,7 +69,7 @@ public void Designed_typed_ports_create_runtime_and_design_metadata_from_one_dec descriptor.Inputs["Input"].LinkCardinality.ShouldBe(ComponentPortLinkCardinality.Single); descriptor.Inputs["Signal"].Kind.ShouldBe(ComponentPortKind.Signal); descriptor.Outputs["Output"].MessageType.ShouldBe(typeof(int)); - descriptor.Outputs["Diagnostics"].MessageType.ShouldBe(typeof(ComponentEvent)); + descriptor.Outputs["Diagnostics"].MessageType.ShouldBe(typeof(global::FluxFlow.Data.FlowValue)); metadata.DisplayName?.Value.ShouldBe("Designed test"); metadata.Category?.Value.ShouldBe("Testing"); @@ -106,8 +107,8 @@ public void Designed_typed_ports_create_runtime_and_design_metadata_from_one_dec var events = metadata.Ports.Single(port => port.Name.Value == "Diagnostics"); events.Direction.ShouldBe(PortDirection.Output); - events.MessageType.ShouldBe(typeof(ComponentEvent)); - events.ValueType?.Value.ShouldBe(nameof(ComponentEvent)); + events.MessageType.ShouldBe(typeof(global::FluxFlow.Data.FlowValue)); + events.ValueType?.Value.ShouldBe(nameof(global::FluxFlow.Data.FlowValue)); events.DisplayName?.Value.ShouldBe("Diagnostic events"); events.Group?.Value.ShouldBe("Observability"); events.Order.ShouldBe(6); @@ -119,8 +120,19 @@ public void Designed_typed_ports_create_runtime_and_design_metadata_from_one_dec [Fact] public void Designed_component_binding_builders_expose_only_Has_port_methods() { - AssertCanonicalPortMethods(typeof(DesignedComponentBindingBuilder<>)); - AssertCanonicalPortMethods(typeof(DesignedComponentInstanceBindingBuilder)); + AssertCanonicalPortMethods( + typeof(DesignedComponentBindingBuilder<>), + [ + "HasEvents", + "HasFlowValueInput", + "HasFlowValueOutput", + "HasInput", + "HasOutput", + "HasSignalInput" + ]); + AssertCanonicalPortMethods( + typeof(DesignedComponentInstanceBindingBuilder), + ["HasEvents", "HasFlowValueInput", "HasInput", "HasOutput", "HasSignalInput"]); } [Fact] @@ -175,7 +187,7 @@ public void Designed_advanced_factory_declares_metadata_without_activating_insta descriptor.Inputs["Input"].LinkCardinality.ShouldBe(ComponentPortLinkCardinality.Single); descriptor.Inputs["Signal"].Kind.ShouldBe(ComponentPortKind.Signal); descriptor.Outputs["Output"].MessageType.ShouldBe(typeof(int)); - descriptor.Outputs["Diagnostics"].MessageType.ShouldBe(typeof(ComponentEvent)); + descriptor.Outputs["Diagnostics"].MessageType.ShouldBe(typeof(global::FluxFlow.Data.FlowValue)); metadata.Ports.Select(static port => (port.Name.Value, port.Direction, port.Order, port.DisplayName?.Value)) .ShouldBe( @@ -209,6 +221,79 @@ public void Equivalent_designed_typed_registration_is_idempotent_and_changed_sel .ShouldBe(1); } + [Theory] + [InlineData(false)] + [InlineData(true)] + public void Designed_input_shape_reaches_runtime_and_catalog_without_activation(bool instanceFactory) + { + var services = new ServiceCollection(); + var factoryCalls = 0; + var selectorCalls = 0; + var shape = FlowValueShape.Object("Request", "target", "body"); + services.AddFluxFlowComponents().AddComponent("test.designed-shape", component => + { + if (instanceFactory) + { + component.UseInstanceFactory(_ => + { + factoryCalls++; + throw new InvalidOperationException("Catalog discovery must not activate a component."); + }).HasFlowValueInput("Input", shape, displayName: "Request", isPrimary: true, + linkCardinality: ComponentPortLinkCardinality.Single); + } + else + { + component.UseFactory(_ => + { + factoryCalls++; + return new DesignedNode(); + }).HasFlowValueInput("Input", node => + { + selectorCalls++; + return node.CanonicalInput; + }, shape, displayName: "Request", isPrimary: true, + linkCardinality: ComponentPortLinkCardinality.Single); + } + }); + using var provider = services.BuildServiceProvider(); + var descriptor = provider.GetRequiredService(); + var metadata = provider.GetRequiredService().All.ShouldHaveSingleItem(); + var input = metadata.Ports.ShouldHaveSingleItem(); + + descriptor.Inputs["Input"].InputShape.ShouldBeSameAs(shape); + input.InputShape.ShouldBeSameAs(shape); + input.Name.Value.ShouldBe("Input"); + input.Direction.ShouldBe(PortDirection.Input); + input.MessageType.ShouldBe(typeof(FlowValue)); + input.DisplayName?.Value.ShouldBe("Request"); + input.IsPrimary.ShouldBeTrue(); + input.LinkCardinality.ShouldBe(ComponentPortLinkCardinality.Single); + factoryCalls.ShouldBe(0); + selectorCalls.ShouldBe(0); + } + + [Fact] + public void Designed_equivalent_input_shapes_are_idempotent_and_changed_shapes_conflict() + { + var services = new ServiceCollection(); + var builder = services.AddFluxFlowComponents(); + Register(FlowValueShape.Object("Request", "target", "body")); + Register(FlowValueShape.Object("Request", "BODY", "TARGET")); + + services.Count(registration => registration.ServiceType == typeof(ComponentDescriptor)).ShouldBe(1); + services.Count(registration => registration.ServiceType == typeof(ComponentDesignMetadataCatalog)).ShouldBe(1); + var exception = Should.Throw(() => + Register(FlowValueShape.Object("Request", "target", "body", "method"))); + exception.Message.ShouldContain("test.designed-shape-identity"); + exception.Message.ShouldContain("conflicting descriptor registration"); + services.Count(registration => registration.ServiceType == typeof(ComponentDescriptor)).ShouldBe(1); + + void Register(FlowValueShape shape) => builder.AddComponent("test.designed-shape-identity", component => + component.UseFactory(CreateNode).HasFlowValueInput("Input", SelectCanonicalInput, shape)); + } + + private static ITargetBlock SelectCanonicalInput(DesignedNode node) => node.CanonicalInput; + private static void ConfigureEquivalent(ComponentRegistrationBuilder component) => component .UseFactory(CreateNode) @@ -232,7 +317,7 @@ private static ITargetBlock> SelectAlternateInput(DesignedNo private static ISourceBlock> SelectOutput(DesignedNode node) => node.Output; - private static ISourceBlock SelectEvents(DesignedNode node) => node.Events; + private static ISourceBlock SelectEvents(DesignedNode node) => node.Events; private static IFlowSignalTarget SelectSignal(DesignedNode node) => node.Signal; @@ -241,7 +326,7 @@ private static string AttributeValue( string name) => attributes[new ComponentAttributeName(name)].Value; - private static void AssertCanonicalPortMethods(Type builderType) + private static void AssertCanonicalPortMethods(Type builderType, string[] expected) { var methodNames = builderType .GetMethods( @@ -253,13 +338,8 @@ private static void AssertCanonicalPortMethods(Type builderType) .ToArray(); methodNames.ShouldBe( - [ - "HasEvents", - "HasInput", - "HasOutput", - "HasSignalInput" - ], - $"{builderType.Name} must expose only the canonical Has port DSL."); + expected, + $"{builderType.Name} must expose only the canonical Has port DSL."); methodNames.ShouldNotContain( static name => name.StartsWith("Add", StringComparison.Ordinal), $"{builderType.Name} must not retain a public Add port alias."); @@ -267,13 +347,15 @@ private static void AssertCanonicalPortMethods(Type builderType) private sealed class DesignedNode : IFlowNode { + public BufferBlock CanonicalInput { get; } = new(); + public BufferBlock> Input { get; } = new(); public BufferBlock> AlternateInput { get; } = new(); public BufferBlock> Output { get; } = new(); - public BufferBlock Events { get; } = new(); + public BufferBlock Events { get; } = new(); public DesignedSignalTarget Signal { get; } = new(); @@ -281,6 +363,7 @@ private sealed class DesignedNode : IFlowNode public void Complete() { + CanonicalInput.Complete(); Input.Complete(); AlternateInput.Complete(); Output.Complete(); diff --git a/tests/FluxFlow.Components.Designer.Tests/DesignerApplicationPersistenceTests.cs b/tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/DesignerApplicationPersistenceTests.cs similarity index 100% rename from tests/FluxFlow.Components.Designer.Tests/DesignerApplicationPersistenceTests.cs rename to tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/DesignerApplicationPersistenceTests.cs diff --git a/tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/EventDesignMetadataTests.cs b/tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/EventDesignMetadataTests.cs new file mode 100644 index 00000000..f23794bb --- /dev/null +++ b/tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/EventDesignMetadataTests.cs @@ -0,0 +1,68 @@ +using FluxFlow.Components.Designer.Contracts; +using FluxFlow.Composition; +using FluxFlow.Data; +using FluxFlow.Nodes; +using Shouldly; +using Xunit; + +namespace FluxFlow.Components.Designer.Tests; + +public sealed class EventDesignMetadataTests +{ + [Fact] + public void Valid_event_shape_is_discoverable_on_event_port() + { + var shape = new EventDesignMetadata + { + Type = "message.received", + Kind = FlowEventKind.Domain, + Fields = + [ + new EventFieldDesignMetadata + { + Path = "attributes.topic", + Role = EventFieldRole.Dimension, + ValueKind = EventFieldValueKind.String + }, + new EventFieldDesignMetadata + { + Path = "measurements.bytes", + Role = EventFieldRole.Measurement, + ValueKind = EventFieldValueKind.Number, + Unit = "By" + } + ] + }; + var metadata = CreateMetadata([shape]); + + ComponentDesignMetadataValidator.Validate(metadata).ShouldBeEmpty(); + metadata.Ports[0].EventShapes.ShouldHaveSingleItem().ShouldBe(shape); + } + + [Fact] + public void Duplicate_event_types_are_rejected() + { + var first = new EventDesignMetadata { Type = "message.received" }; + var second = new EventDesignMetadata { Type = "message.received" }; + + var errors = ComponentDesignMetadataValidator.Validate(CreateMetadata([first, second])); + + errors.ShouldContain(error => error.Message.Contains("duplicated", StringComparison.Ordinal)); + } + + private static ComponentDesignMetadata CreateMetadata(IReadOnlyList shapes) + => new() + { + Type = new ComponentType("test.event-source"), + Ports = + [ + new PortDesignMetadata + { + Name = new ComponentPortName("Events"), + Direction = PortDirection.Output, + MessageType = typeof(FlowValue), + EventShapes = shapes + } + ] + }; +} diff --git a/tests/FluxFlow.Components.Designer.Tests/FluxFlow.Components.Designer.Tests.csproj b/tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/FluxFlow.Components.Designer.Tests.csproj similarity index 61% rename from tests/FluxFlow.Components.Designer.Tests/FluxFlow.Components.Designer.Tests.csproj rename to tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/FluxFlow.Components.Designer.Tests.csproj index b4f4b9d0..f78c7348 100644 --- a/tests/FluxFlow.Components.Designer.Tests/FluxFlow.Components.Designer.Tests.csproj +++ b/tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/FluxFlow.Components.Designer.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,9 +6,9 @@ - - - + + + diff --git a/tests/FluxFlow.Components.Designer.Tests/FluxFlowDesignedComponentRegistrationTests.cs b/tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/FluxFlowDesignedComponentRegistrationTests.cs similarity index 99% rename from tests/FluxFlow.Components.Designer.Tests/FluxFlowDesignedComponentRegistrationTests.cs rename to tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/FluxFlowDesignedComponentRegistrationTests.cs index a7463f37..0c8c1034 100644 --- a/tests/FluxFlow.Components.Designer.Tests/FluxFlowDesignedComponentRegistrationTests.cs +++ b/tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/FluxFlowDesignedComponentRegistrationTests.cs @@ -488,7 +488,7 @@ private static string AttributeValue( private static ISourceBlock> SelectOutput(RegistrationNode node) => node.Output; - private static ISourceBlock SelectEvents(RegistrationNode node) => node.Events; + private static ISourceBlock SelectEvents(RegistrationNode node) => node.Events; private sealed class RegistrationNode : IFlowNode { @@ -498,7 +498,7 @@ private sealed class RegistrationNode : IFlowNode public BufferBlock> Late { get; } = new(); - public BufferBlock Events { get; } = new(); + public BufferBlock Events { get; } = new(); public Task Completion { get; } = Task.CompletedTask; diff --git a/tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/InputShapeMetadataTests.cs b/tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/InputShapeMetadataTests.cs new file mode 100644 index 00000000..b4ad4cdf --- /dev/null +++ b/tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/InputShapeMetadataTests.cs @@ -0,0 +1,36 @@ +using FluxFlow.Components.Designer.Contracts; +using FluxFlow.Composition; +using FluxFlow.Data; +using Shouldly; +using Xunit; + +namespace FluxFlow.Components.Designer.Tests; + +public sealed class InputShapeMetadataTests +{ + [Theory] + [InlineData(PortDirection.Output, ComponentPortKind.Message, false)] + [InlineData(PortDirection.Input, ComponentPortKind.Signal, false)] + [InlineData(PortDirection.Input, ComponentPortKind.Message, true)] + public void Shape_on_noncanonical_input_reports_the_metadata_path( + PortDirection direction, ComponentPortKind kind, bool typed) + { + var metadata = new ComponentDesignMetadata + { + Type = new ComponentType("sample.request"), + Ports = [new PortDesignMetadata + { + Name = new ComponentPortName("Input"), + Direction = direction, + Kind = kind, + MessageType = typed ? typeof(string) : null, + InputShape = FlowValueShape.Object("Request") + }] + }; + + var error = ComponentDesignMetadataValidator.Validate(metadata).ShouldHaveSingleItem(); + + error.Path.ShouldBe("Ports[0].InputShape"); + error.Message.ShouldContain("canonical value input"); + } +} diff --git a/tests/FluxFlow.Components.Designer.Tests/PortDesignMetadataAttributesTests.cs b/tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/PortDesignMetadataAttributesTests.cs similarity index 100% rename from tests/FluxFlow.Components.Designer.Tests/PortDesignMetadataAttributesTests.cs rename to tests/Unit/Components/Designer/FluxFlow.Components.Designer.Tests/PortDesignMetadataAttributesTests.cs diff --git a/tests/FluxFlow.Components.Expectations.Composition.Tests/ExpectationsServiceCollectionExtensionsTests.cs b/tests/Unit/Components/Expectations/FluxFlow.Components.Expectations.Composition.Tests/ExpectationsServiceCollectionExtensionsTests.cs similarity index 97% rename from tests/FluxFlow.Components.Expectations.Composition.Tests/ExpectationsServiceCollectionExtensionsTests.cs rename to tests/Unit/Components/Expectations/FluxFlow.Components.Expectations.Composition.Tests/ExpectationsServiceCollectionExtensionsTests.cs index f371e933..0bccba60 100644 --- a/tests/FluxFlow.Components.Expectations.Composition.Tests/ExpectationsServiceCollectionExtensionsTests.cs +++ b/tests/Unit/Components/Expectations/FluxFlow.Components.Expectations.Composition.Tests/ExpectationsServiceCollectionExtensionsTests.cs @@ -51,10 +51,8 @@ public void AddExpectations_registers_only_the_canonical_contract() ExpectationsComponentDefinition.Ports.Output, "Events" ], ignoreOrder: false); - registration.Inputs[ExpectationsComponentDefinition.Ports.Input].MessageType - .ShouldBe(typeof(ProjectionEvent)); - registration.Outputs[ExpectationsComponentDefinition.Ports.Output].MessageType - .ShouldBe(typeof(EventExpectationResult)); + registration.Inputs[ExpectationsComponentDefinition.Ports.Input].MessageType.ShouldBe(typeof(FlowValue)); + registration.Outputs[ExpectationsComponentDefinition.Ports.Output].MessageType.ShouldBe(typeof(FlowValue)); } [Fact] @@ -101,11 +99,11 @@ public void Design_metadata_provider_describes_expectation_ports() port.ValueType?.Value, port.IsPrimary)).ShouldBe([ (ExpectationsComponentDefinition.Ports.Input, PortDirection.Input, 0, - nameof(ProjectionEvent), true), + nameof(FlowValue), true), (ExpectationsComponentDefinition.Ports.Output, PortDirection.Output, 1, - "EventExpectationResult", true), + nameof(FlowValue), true), (ExpectationsComponentDefinition.Ports.Events, PortDirection.Output, 2, - nameof(ComponentEvent), false) + nameof(global::FluxFlow.Data.FlowValue), false) ], ignoreOrder: false); } @@ -344,7 +342,7 @@ public async Task Canonical_host_exposes_correlated_events() await WithNodeAsync( async (ports, _) => { - var eventReceive = ports.ReceiveAsync( + var eventReceive = ports.ReceiveAsync( Events, Timeout); var message = FlowMessage.Create(CreateEvent( @@ -355,9 +353,9 @@ await WithNodeAsync( var @event = (await eventReceive).Message.ShouldNotBeNull(); @event.CorrelationId.ShouldBe(message.CorrelationId); - @event.Value.Name.ShouldBe(ExpectationDiagnosticNames.Matched); - bool.Parse(@event.Value.Attributes["satisfied"]).ShouldBeTrue(); - bool.Parse(@event.Value.Attributes["isError"]).ShouldBeFalse(); + @event.ToFlowEvent().Name.ShouldBe(ExpectationDiagnosticNames.Matched); + @event.ToFlowEvent().Attributes["satisfied"].ShouldBe(true); + @event.ToFlowEvent().Attributes["isError"].ShouldBe(false); }, Properties(("filter", new EventFilter { Type = "job.finished" }))); } diff --git a/tests/Unit/Components/Expectations/FluxFlow.Components.Expectations.Composition.Tests/FluxFlow.Components.Expectations.Composition.Tests.csproj b/tests/Unit/Components/Expectations/FluxFlow.Components.Expectations.Composition.Tests/FluxFlow.Components.Expectations.Composition.Tests.csproj new file mode 100644 index 00000000..f456ebc8 --- /dev/null +++ b/tests/Unit/Components/Expectations/FluxFlow.Components.Expectations.Composition.Tests/FluxFlow.Components.Expectations.Composition.Tests.csproj @@ -0,0 +1,31 @@ + + + + net10.0 + false + + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/FluxFlow.Components.Expectations.Tests/EventExpectationNodeTests.cs b/tests/Unit/Components/Expectations/FluxFlow.Components.Expectations.Tests/EventExpectationNodeTests.cs similarity index 78% rename from tests/FluxFlow.Components.Expectations.Tests/EventExpectationNodeTests.cs rename to tests/Unit/Components/Expectations/FluxFlow.Components.Expectations.Tests/EventExpectationNodeTests.cs index 19dbb349..c5b94e5a 100644 --- a/tests/FluxFlow.Components.Expectations.Tests/EventExpectationNodeTests.cs +++ b/tests/Unit/Components/Expectations/FluxFlow.Components.Expectations.Tests/EventExpectationNodeTests.cs @@ -31,7 +31,7 @@ public async Task Expect_match_is_normal_result_with_message_lineage() clock); var results = Link(node.Output); var events = Link(node.Events); - var input = FlowMessage.Create( + var input = ExpectationMessage( CreateEvent(now, "order.completed"), new CorrelationId("order-42"), new TraceId("trace-42"), @@ -44,10 +44,10 @@ public async Task Expect_match_is_normal_result_with_message_lineage() var output = await results.ReceiveAsync().WaitAsync(WaitTimeout); output.IsError.ShouldBeFalse(); - output.Value.Kind.ShouldBe(EventExpectationResultKind.Expect); - output.Value.Satisfied.ShouldBeTrue(); - output.Value.Matched.ShouldBeTrue(); - output.Value.Name.ShouldBe("order-completed"); + output.Value.Deserialize()!.Kind.ShouldBe(EventExpectationResultKind.Expect); + output.Value.Deserialize()!.Satisfied.ShouldBeTrue(); + output.Value.Deserialize()!.Matched.ShouldBeTrue(); + output.Value.Deserialize()!.Name.ShouldBe("order-completed"); output.CorrelationId.ShouldBe(input.CorrelationId); output.TraceId.ShouldBe(input.TraceId); output.CausationId.ShouldBe(input.MessageId); @@ -55,10 +55,10 @@ public async Task Expect_match_is_normal_result_with_message_lineage() output.Headers.ShouldBeSameAs(input.Headers); var diagnostic = await events.ReceiveAsync().WaitAsync(WaitTimeout); - diagnostic.Name.ShouldBe(ExpectationDiagnosticNames.Matched); + diagnostic.ToFlowEvent().Name.ShouldBe(ExpectationDiagnosticNames.Matched); diagnostic.CorrelationId.ShouldBe(input.CorrelationId); - diagnostic.Attributes["resultKind"].ShouldBe(ExpectationResultKinds.Matched); - diagnostic.Attributes["isError"].ShouldBe(false); + diagnostic.ToFlowEvent().Attributes["resultKind"].ShouldBe(ExpectationResultKinds.Matched); + diagnostic.ToFlowEvent().Attributes["isError"].ShouldBe(false); } [Fact] @@ -78,9 +78,9 @@ public async Task Guard_match_is_normal_unmet_result() var output = await results.ReceiveAsync().WaitAsync(WaitTimeout); output.IsError.ShouldBeFalse(); - output.Value.Satisfied.ShouldBeFalse(); - output.Value.Matched.ShouldBeTrue(); - output.Value.Kind.ShouldBe(EventExpectationResultKind.Guard); + output.Value.Deserialize()!.Satisfied.ShouldBeFalse(); + output.Value.Deserialize()!.Matched.ShouldBeTrue(); + output.Value.Deserialize()!.Kind.ShouldBe(EventExpectationResultKind.Guard); } [Theory] @@ -106,9 +106,9 @@ public async Task Timeout_is_normal_result( var output = await results.ReceiveAsync().WaitAsync(WaitTimeout); output.IsError.ShouldBeFalse(); - output.Value.Satisfied.ShouldBe(satisfied); - output.Value.TimedOut.ShouldBeTrue(); - output.Value.EvaluatedAt.ShouldBe(clock.GetUtcNow()); + output.Value.Deserialize()!.Satisfied.ShouldBe(satisfied); + output.Value.Deserialize()!.TimedOut.ShouldBeTrue(); + output.Value.Deserialize()!.EvaluatedAt.ShouldBe(clock.GetUtcNow()); } [Theory] @@ -135,9 +135,9 @@ public async Task Completion_drains_input_then_emits_one_normal_result( var output = await results.ReceiveAsync().WaitAsync(WaitTimeout); output.IsError.ShouldBeFalse(); - output.Value.Satisfied.ShouldBe(satisfied); - output.Value.TimedOut.ShouldBeFalse(); - output.Value.ObservedEvents.Count.ShouldBe(1); + output.Value.Deserialize()!.Satisfied.ShouldBe(satisfied); + output.Value.Deserialize()!.TimedOut.ShouldBeFalse(); + output.Value.Deserialize()!.ObservedEvents.Count.ShouldBe(1); output.CorrelationId.ShouldBe(input.CorrelationId); output.CausationId.ShouldBe(input.MessageId); results.TryReceive(out _).ShouldBeFalse(); @@ -169,8 +169,8 @@ public async Task Match_wins_once_over_later_timeout_and_completion() await node.Input.SendAsync(CreateMessage(now, type: "match")); var output = await results.ReceiveAsync().WaitAsync(WaitTimeout); - output.Value.Satisfied.ShouldBeTrue(); - output.Value.Matched.ShouldBeTrue(); + output.Value!.Deserialize()!.Satisfied.ShouldBeTrue(); + output.Value.Deserialize()!.Matched.ShouldBeTrue(); clock.Advance(TimeSpan.FromMilliseconds(100)); await node.CompleteWithResultAsync().WaitAsync(WaitTimeout); @@ -193,9 +193,9 @@ public async Task Output_fans_out_one_result_to_every_consumer() await node.Input.SendAsync(CreateMessage(now, type: "match")); (await first.ReceiveAsync().WaitAsync(WaitTimeout)) - .Value.Satisfied.ShouldBeTrue(); + .Value!.Deserialize()!.Satisfied.ShouldBeTrue(); (await second.ReceiveAsync().WaitAsync(WaitTimeout)) - .Value.Satisfied.ShouldBeTrue(); + .Value!.Deserialize()!.Satisfied.ShouldBeTrue(); } [Fact] @@ -225,24 +225,24 @@ public async Task Result_caps_observed_events_and_previews_and_snapshots_filter( ["tenant"] = "north" }; - await node.Input.SendAsync(FlowMessage.Create(CreateEvent( + await node.Input.SendAsync(ExpectationMessage(CreateEvent( now, "ignored-1", eventAttributes, payloadPreview: "first"))); - await node.Input.SendAsync(FlowMessage.Create(CreateEvent( + await node.Input.SendAsync(ExpectationMessage(CreateEvent( now, "ignored-2", eventAttributes, payloadPreview: "second"))); - await node.Input.SendAsync(FlowMessage.Create(CreateEvent( + await node.Input.SendAsync(ExpectationMessage(CreateEvent( now, "match", eventAttributes, payloadPreview: "abcdef"))); var value = (await results.ReceiveAsync().WaitAsync(WaitTimeout)) - .Value; + .Value!.Deserialize()!; value.ObservedEvents.Select(@event => @event.Type) .ShouldBe(["ignored-2", "match"], ignoreOrder: false); value.ObservedEvents.Select(@event => @event.PayloadPreview) @@ -277,7 +277,7 @@ public async Task Concurrent_timeout_and_completion_emit_exactly_one_result() await node.Completion.WaitAsync(WaitTimeout); var result = await results.ReceiveAsync().WaitAsync(WaitTimeout); - result.Value.Reason.ShouldBeOneOf( + result.Value!.Deserialize()!.Reason.ShouldBeOneOf( "Expected event was not observed before timeout.", "Input completed before a matching event was observed."); results.TryReceive(out _).ShouldBeFalse(); @@ -306,6 +306,22 @@ public void Invalid_options_are_rejected( })); } + [Fact] + public async Task Malformed_value_resolves_once_as_rejected_without_faulting() + { + await using var node = new EventExpectationNode(); + var output = Link(node.Output); + var events = Link(node.Events); + + await node.Input.SendAsync(FlowMessage.Create(FlowValue.From(42))); + + var rejection = await output.ReceiveAsync().WaitAsync(WaitTimeout); + rejection.IsError.ShouldBeTrue(); + (await events.ReceiveAsync().WaitAsync(WaitTimeout)).ToFlowEvent().Name + .ShouldBe("event.expect.rejected"); + node.Completion.IsFaulted.ShouldBeFalse(); + } + private static BufferBlock Link(ISourceBlock source) { var buffer = new BufferBlock(); @@ -313,11 +329,24 @@ private static BufferBlock Link(ISourceBlock source) return buffer; } - private static FlowMessage CreateMessage( + private static FlowMessage CreateMessage( DateTimeOffset timestamp, string type = "event", string? status = null) - => FlowMessage.Create(CreateEvent(timestamp, type, status: status)); + => ExpectationMessage(CreateEvent(timestamp, type, status: status)); + + private static FlowMessage ExpectationMessage( + ProjectionEvent projectionEvent, + CorrelationId? correlationId = null, + TraceId? traceId = null, + IReadOnlyDictionary? headers = null, + MessageId? causationId = null) + => FlowMessage.Create( + FlowValue.From(projectionEvent), + correlationId, + traceId, + headers, + causationId); private static ProjectionEvent CreateEvent( DateTimeOffset timestamp, diff --git a/tests/FluxFlow.Components.Expectations.Tests/FluxFlow.Components.Expectations.Tests.csproj b/tests/Unit/Components/Expectations/FluxFlow.Components.Expectations.Tests/FluxFlow.Components.Expectations.Tests.csproj similarity index 59% rename from tests/FluxFlow.Components.Expectations.Tests/FluxFlow.Components.Expectations.Tests.csproj rename to tests/Unit/Components/Expectations/FluxFlow.Components.Expectations.Tests/FluxFlow.Components.Expectations.Tests.csproj index a76f2403..ff9e19d4 100644 --- a/tests/FluxFlow.Components.Expectations.Tests/FluxFlow.Components.Expectations.Tests.csproj +++ b/tests/Unit/Components/Expectations/FluxFlow.Components.Expectations.Tests/FluxFlow.Components.Expectations.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,9 +6,9 @@ - - - + + + diff --git a/tests/FluxFlow.Components.FileSystem.Composition.Tests/FileSystemServiceCollectionExtensionsTests.cs b/tests/Unit/Components/FileSystem/FluxFlow.Components.FileSystem.Composition.Tests/FileSystemServiceCollectionExtensionsTests.cs similarity index 92% rename from tests/FluxFlow.Components.FileSystem.Composition.Tests/FileSystemServiceCollectionExtensionsTests.cs rename to tests/Unit/Components/FileSystem/FluxFlow.Components.FileSystem.Composition.Tests/FileSystemServiceCollectionExtensionsTests.cs index 48bfb464..66c9b386 100644 --- a/tests/FluxFlow.Components.FileSystem.Composition.Tests/FileSystemServiceCollectionExtensionsTests.cs +++ b/tests/Unit/Components/FileSystem/FluxFlow.Components.FileSystem.Composition.Tests/FileSystemServiceCollectionExtensionsTests.cs @@ -43,24 +43,18 @@ public void AddFileSystem_registers_request_result_metadata() services => services.AddFluxFlowComponents().AddFileSystem()); var read = registry.Components[FileSystemComponentDefinition.Types.Read]; - read.Inputs[FileSystemComponentDefinition.Ports.Input].MessageType - .ShouldBe(typeof(FileReadRequest)); - read.Outputs[FileSystemComponentDefinition.Ports.Output].MessageType - .ShouldBe(typeof(FileReadContent)); + read.Inputs[FileSystemComponentDefinition.Ports.Input].MessageType.ShouldBe(typeof(FlowValue)); + read.Outputs[FileSystemComponentDefinition.Ports.Output].MessageType.ShouldBe(typeof(FlowValue)); var write = registry.Components[FileSystemComponentDefinition.Types.Write]; - write.Inputs[FileSystemComponentDefinition.Ports.Input].MessageType - .ShouldBe(typeof(FileContentWriteRequest)); - write.Outputs[FileSystemComponentDefinition.Ports.Output].MessageType - .ShouldBe(typeof(FileWriteResult)); + write.Inputs[FileSystemComponentDefinition.Ports.Input].MessageType.ShouldBe(typeof(FlowValue)); + write.Outputs[FileSystemComponentDefinition.Ports.Output].MessageType.ShouldBe(typeof(FlowValue)); registry.Components[FileSystemComponentDefinition.Types.DirectoryEnumerate] - .Outputs[FileSystemComponentDefinition.Ports.Output].MessageType - .ShouldBe(typeof(DirectoryEntry)); + .Outputs[FileSystemComponentDefinition.Ports.Output].MessageType.ShouldBe(typeof(FlowValue)); registry.Components[FileSystemComponentDefinition.Types.Watch] - .Outputs[FileSystemComponentDefinition.Ports.Output].MessageType - .ShouldBe(typeof(FileChange)); + .Outputs[FileSystemComponentDefinition.Ports.Output].MessageType.ShouldBe(typeof(FlowValue)); } [Fact] @@ -383,7 +377,7 @@ await WithTransformNodeAsync( var resultReceive = ports.ReceiveAsync( Output, Timeout); - var eventReceive = ports.ReceiveAsync( + var eventReceive = ports.ReceiveAsync( Events, Timeout); @@ -399,8 +393,8 @@ await WithTransformNodeAsync( var @event = (await eventReceive).Message.ShouldNotBeNull(); @event.CorrelationId.ShouldBe(message.CorrelationId); - @event.Value.Name.ShouldBe(FileSystemDiagnosticNames.FileReadSucceeded); - @event.Value.Timestamp.ShouldBe(timestamp); + @event.ToFlowEvent().Name.ShouldBe(FileSystemDiagnosticNames.FileReadSucceeded); + @event.ToFlowEvent().Timestamp.ShouldBe(timestamp); await host.RevisionHost.StopAsync(); }, Properties( @@ -435,7 +429,7 @@ await WithTransformNodeAsync( var resultReceive = ports.ReceiveAsync( Output, Timeout); - var eventReceive = ports.ReceiveAsync( + var eventReceive = ports.ReceiveAsync( Events, Timeout); @@ -451,8 +445,8 @@ await WithTransformNodeAsync( var @event = (await eventReceive).Message.ShouldNotBeNull(); @event.CorrelationId.ShouldBe(message.CorrelationId); - @event.Value.Name.ShouldBe(FileSystemDiagnosticNames.FileWriteSucceeded); - @event.Value.Timestamp.ShouldBe(timestamp); + @event.ToFlowEvent().Name.ShouldBe(FileSystemDiagnosticNames.FileWriteSucceeded); + @event.ToFlowEvent().Timestamp.ShouldBe(timestamp); await host.RevisionHost.StopAsync(); }, Properties(("baseDirectory", directory.Path)), @@ -471,7 +465,7 @@ public async Task Hosted_directory_enumerate_starts_through_runtime_and_complete var timestamp = DateTimeOffset.Parse("2026-06-19T11:00:00Z"); var clock = new FakeTimeProvider(timestamp); var entries = new MessageTracker(); - var events = new MessageTracker(); + var events = new MessageTracker(); await using var host = await StartSourceNodeAsync( FileSystemComponentDefinition.Types.DirectoryEnumerate, @@ -488,8 +482,8 @@ public async Task Hosted_directory_enumerate_starts_through_runtime_and_complete host.StartResult.Succeeded.ShouldBeTrue(); var completed = await events.WaitForAsync(value => - value.Value.Name == FileSystemDiagnosticNames.DirectoryEnumerateCompleted); - completed.Value.Timestamp.ShouldBe(timestamp); + value.ToFlowEvent().Name == FileSystemDiagnosticNames.DirectoryEnumerateCompleted); + completed.ToFlowEvent().Timestamp.ShouldBe(timestamp); await entries.WaitForAsync(value => value.Value.Name == "root.txt"); await entries.WaitForAsync(value => value.Value.Name == "child.txt"); var emitted = entries.Values; @@ -508,7 +502,7 @@ public async Task Hosted_file_watch_starts_observes_change_and_stops() var clock = new FakeTimeProvider(timestamp); var watchedPath = Path.Combine(directory.Path, "created.txt"); var changes = new MessageTracker(); - var events = new MessageTracker(); + var events = new MessageTracker(); await using var host = await StartSourceNodeAsync( FileSystemComponentDefinition.Types.Watch, @@ -523,8 +517,8 @@ public async Task Hosted_file_watch_starts_observes_change_and_stops() host.StartResult.Succeeded.ShouldBeTrue(); var started = await events.WaitForAsync(value => - value.Value.Name == FileSystemDiagnosticNames.FileWatchStarted); - started.Value.Timestamp.ShouldBe(timestamp); + value.ToFlowEvent().Name == FileSystemDiagnosticNames.FileWatchStarted); + started.ToFlowEvent().Timestamp.ShouldBe(timestamp); await File.WriteAllTextAsync(watchedPath, "hello"); @@ -537,7 +531,7 @@ public async Task Hosted_file_watch_starts_observes_change_and_stops() change.CorrelationId.ShouldBeNull(); await events.WaitForAsync(value => - value.Value.Name == FileSystemDiagnosticNames.FileWatchChanged); + value.ToFlowEvent().Name == FileSystemDiagnosticNames.FileWatchChanged); await host.RevisionHost.StopAsync(); } @@ -671,7 +665,7 @@ private static async ValueTask StartSourceNodeAsyn IReadOnlyDictionary properties, TimeProvider clock, MessageTracker values, - MessageTracker events, + MessageTracker events, Action configureComponents) { var componentProperties = CopyProperties(properties); @@ -687,8 +681,8 @@ private static async ValueTask StartSourceNodeAsyn services => { configureComponents(services); - RegisterRecorder(services, ValueRecorderType, values); - RegisterRecorder(services, EventRecorderType, events); + RegisterFlowValueRecorder(services, ValueRecorderType, values); + RegisterFlowValueRecorder(services, EventRecorderType, events); }, registerResources: context => context.Services.AddExternalFluxFlowResource( @@ -737,6 +731,15 @@ private static void RegisterRecorder( .UseFactory(_ => new MessageRecordingNode(tracker)) .HasInput("Input", static node => node.Input)); + private static void RegisterFlowValueRecorder( + IServiceCollection services, + string nodeType, + MessageTracker tracker) + => services.AddFluxFlowComponents().Advanced.AddDynamicComponent(nodeType, component => + component + .UseFactory(_ => new FlowValueRecordingNode(tracker)) + .HasFlowValueInput("Input", static node => node.Input)); + private static Dictionary CopyProperties( IReadOnlyDictionary? properties) => properties?.ToDictionary( @@ -779,14 +782,14 @@ private static void AssertTransformPorts( input.Name.Value.ShouldBe(FileSystemComponentDefinition.Ports.Input); input.Direction.ShouldBe(PortDirection.Input); input.Order.ShouldBe(0); - input.ValueType?.Value.ShouldBe(TypeName(typeof(TInput))); + input.ValueType?.Value.ShouldBe(nameof(FlowValue)); input.IsPrimary.ShouldBeTrue(); var output = metadata.Ports[1]; output.Name.Value.ShouldBe(FileSystemComponentDefinition.Ports.Output); output.Direction.ShouldBe(PortDirection.Output); output.Order.ShouldBe(1); - output.ValueType?.Value.ShouldBe(TypeName(typeof(TOutput))); + output.ValueType?.Value.ShouldBe(nameof(FlowValue)); output.IsPrimary.ShouldBeTrue(); } @@ -800,7 +803,7 @@ private static void AssertSourcePort( output.Name.Value.ShouldBe(FileSystemComponentDefinition.Ports.Output); output.Direction.ShouldBe(PortDirection.Output); output.Order.ShouldBe(0); - output.ValueType?.Value.ShouldBe(typeof(TOutput).Name); + output.ValueType?.Value.ShouldBe(nameof(FlowValue)); output.IsPrimary.ShouldBeTrue(); } @@ -913,6 +916,33 @@ protected override Task ProcessAsync(FlowMessage message) } } + private sealed class FlowValueRecordingNode(MessageTracker tracker) + : FlowNode + { + private readonly TestFlowValueMaterializer _materializer = new(); + + protected override Task ProcessAsync(FlowMessage message) + { + if (message.IsError) + { + tracker.Add(message.ConvertError()); + return Task.CompletedTask; + } + + var materialization = _materializer.Materialize(message.Value); + tracker.Add(materialization.IsSuccess + ? message.ConvertValue(materialization.Value) + : message.WithError(materialization.Error!).ConvertError()); + return Task.CompletedTask; + } + } + + private sealed class TestFlowValueMaterializer() + : JsonFlowValueMaterializer( + "test.recording.invalid", + "Test recorder", + FlowValueShape.Any("Test recorder input.")); + private sealed class MessageTracker { private readonly object _gate = new(); diff --git a/tests/Unit/Components/FileSystem/FluxFlow.Components.FileSystem.Composition.Tests/FluxFlow.Components.FileSystem.Composition.Tests.csproj b/tests/Unit/Components/FileSystem/FluxFlow.Components.FileSystem.Composition.Tests/FluxFlow.Components.FileSystem.Composition.Tests.csproj new file mode 100644 index 00000000..53f240c4 --- /dev/null +++ b/tests/Unit/Components/FileSystem/FluxFlow.Components.FileSystem.Composition.Tests/FluxFlow.Components.FileSystem.Composition.Tests.csproj @@ -0,0 +1,30 @@ + + + + net10.0 + false + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/FluxFlow.Components.FileSystem.Tests/BoundedFileReaderTests.cs b/tests/Unit/Components/FileSystem/FluxFlow.Components.FileSystem.Tests/BoundedFileReaderTests.cs similarity index 100% rename from tests/FluxFlow.Components.FileSystem.Tests/BoundedFileReaderTests.cs rename to tests/Unit/Components/FileSystem/FluxFlow.Components.FileSystem.Tests/BoundedFileReaderTests.cs diff --git a/tests/FluxFlow.Components.FileSystem.Tests/DirectoryEnumerateNodeTests.cs b/tests/Unit/Components/FileSystem/FluxFlow.Components.FileSystem.Tests/DirectoryEnumerateNodeTests.cs similarity index 95% rename from tests/FluxFlow.Components.FileSystem.Tests/DirectoryEnumerateNodeTests.cs rename to tests/Unit/Components/FileSystem/FluxFlow.Components.FileSystem.Tests/DirectoryEnumerateNodeTests.cs index 0ae8dc4d..2663fa79 100644 --- a/tests/FluxFlow.Components.FileSystem.Tests/DirectoryEnumerateNodeTests.cs +++ b/tests/Unit/Components/FileSystem/FluxFlow.Components.FileSystem.Tests/DirectoryEnumerateNodeTests.cs @@ -1,3 +1,4 @@ +using FluxFlow.Components.FileSystem.Contracts; using FluxFlow.Components.FileSystem.Nodes; using FluxFlow.Components.FileSystem.Options; using FluxFlow.Data; @@ -35,7 +36,9 @@ public async Task DirectoryEnumerate_EmitsMatchingFilesInsideBaseDirectory() await node.StartAsync(); await node.Completion.WaitAsync(TestTimeout); - var entries = (await DrainAsync(output)).Select(message => message.Value).ToList(); + var entries = (await DrainAsync(output)) + .Select(message => message.Value!.Deserialize()!) + .ToList(); entries.Select(entry => entry.Name).Order() .ShouldBe(["child.txt", "root.txt"]); entries.ShouldAllBe(entry => entry.EntryType == "File"); @@ -59,7 +62,7 @@ public async Task DirectoryEnumerate_UsesInjectedClockForEntryTimestamp() await node.Completion.WaitAsync(TestTimeout); var entry = (await DrainAsync(output)).ShouldHaveSingleItem(); - entry.Value.EnumeratedAt.ShouldBe(enumeratedAt); + entry.Value!.Deserialize()!.EnumeratedAt.ShouldBe(enumeratedAt); } [Fact] @@ -81,7 +84,8 @@ public async Task DirectoryEnumerate_CanEmitDirectories() await node.StartAsync(); await node.Completion.WaitAsync(TestTimeout); - var entry = (await DrainAsync(output)).ShouldHaveSingleItem().Value; + var entry = (await DrainAsync(output)).ShouldHaveSingleItem() + .Value!.Deserialize()!; entry.Name.ShouldBe("nested"); entry.EntryType.ShouldBe("Directory"); entry.Length.ShouldBeNull(); @@ -209,7 +213,7 @@ public void DirectoryEnumerate_RejectsInvalidMaxEntries() exception.Message.ShouldContain("maxEntries"); } - private static async Task> DrainEventsAsync(BufferBlock events) + private static async Task> DrainEventsAsync(BufferBlock events) { using var cancellation = new CancellationTokenSource(TestTimeout); var collected = new List(); @@ -217,7 +221,7 @@ private static async Task> DrainEventsAsync(BufferBlock>> DrainAsync(BufferBlock> DrainAsync(BufferBlock sink) + { + using var cancellation = new CancellationTokenSource(TestTimeout); + var items = new List(); + while (await sink.OutputAvailableAsync(cancellation.Token).ConfigureAwait(false)) + { + while (sink.TryReceive(out var item)) + items.Add(item); + } + + return items; + } } internal sealed class TempDirectory : IDisposable diff --git a/tests/FluxFlow.Components.FileSystem.Tests/FileWatchNodeTests.cs b/tests/Unit/Components/FileSystem/FluxFlow.Components.FileSystem.Tests/FileWatchNodeTests.cs similarity index 96% rename from tests/FluxFlow.Components.FileSystem.Tests/FileWatchNodeTests.cs rename to tests/Unit/Components/FileSystem/FluxFlow.Components.FileSystem.Tests/FileWatchNodeTests.cs index feded427..4c8ef885 100644 --- a/tests/FluxFlow.Components.FileSystem.Tests/FileWatchNodeTests.cs +++ b/tests/Unit/Components/FileSystem/FluxFlow.Components.FileSystem.Tests/FileWatchNodeTests.cs @@ -217,31 +217,32 @@ public void FileWatch_RejectsUnsupportedNotifyFilter() } private static async Task> ReceiveMatchingAsync( - BufferBlock> output, + BufferBlock output, Func predicate) { using var cancellation = new CancellationTokenSource(TestTimeout); while (!cancellation.IsCancellationRequested) { var value = await output.ReceiveAsync(cancellation.Token); - if (predicate(value.Value)) + var change = value.Value!.Deserialize()!; + if (predicate(change)) { - return value; + return value.ConvertValue(change); } } throw new TimeoutException("Timed out waiting for file watch event."); } - private static async Task ReceiveEventAsync(BufferBlock events, string name) + private static async Task ReceiveEventAsync(BufferBlock events, string name) { using var cancellation = new CancellationTokenSource(TestTimeout); while (!cancellation.IsCancellationRequested) { var value = await events.ReceiveAsync(cancellation.Token); - if (value.Name == name) + if (value.ToFlowEvent().Name == name) { - return value; + return value.ToFlowEvent(); } } diff --git a/tests/FluxFlow.Components.FileSystem.Tests/FlowContentFileSystemNodeTests.cs b/tests/Unit/Components/FileSystem/FluxFlow.Components.FileSystem.Tests/FlowContentFileSystemNodeTests.cs similarity index 81% rename from tests/FluxFlow.Components.FileSystem.Tests/FlowContentFileSystemNodeTests.cs rename to tests/Unit/Components/FileSystem/FluxFlow.Components.FileSystem.Tests/FlowContentFileSystemNodeTests.cs index f99e815c..804d9899 100644 --- a/tests/FluxFlow.Components.FileSystem.Tests/FlowContentFileSystemNodeTests.cs +++ b/tests/Unit/Components/FileSystem/FluxFlow.Components.FileSystem.Tests/FlowContentFileSystemNodeTests.cs @@ -25,7 +25,7 @@ public async Task Read_preserves_exact_content_and_message_lineage() new FileReadOptions { BaseDirectory = directory.Path }, new FakeTimeProvider(timestamp)); var output = Sink(node.Output); - var input = FlowMessage.Create( + var input = FileRequest( new FileReadRequest { Path = "input.bin", @@ -38,7 +38,7 @@ public async Task Read_preserves_exact_content_and_message_lineage() (await node.Input.SendAsync(input)).ShouldBeTrue(); var message = await output.ReceiveAsync().WaitAsync(TestTimeout); - var result = message.Value; + var result = message.Value!.Deserialize()!; message.CorrelationId.ShouldBe(input.CorrelationId); message.TraceId.ShouldBe(input.TraceId); message.CausationId.ShouldBe(input.MessageId); @@ -63,13 +63,14 @@ public async Task Text_read_records_normalized_encoding_without_decoding_bytes() }); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new FileReadRequest + await node.Input.SendAsync(FileRequest(new FileReadRequest { Path = "input.txt", ReadAs = FileReadMode.Text })); - var content = (await output.ReceiveAsync().WaitAsync(TestTimeout)).Value.Content; + var content = (await output.ReceiveAsync().WaitAsync(TestTimeout)) + .Value!.Deserialize()!.Content; content.Bytes.AsSpan().ToArray().ShouldBe(bytes); content.ContentType.ShouldBe("text/plain"); content.Encoding.ShouldBe("iso-8859-1"); @@ -84,8 +85,8 @@ public async Task Missing_read_is_normal_failure_and_later_input_continues() new FileReadOptions { BaseDirectory = directory.Path }); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new FileReadRequest { Path = "missing.txt" })); - await node.Input.SendAsync(FlowMessage.Create(new FileReadRequest { Path = "valid.txt" })); + await node.Input.SendAsync(FileRequest(new FileReadRequest { Path = "missing.txt" })); + await node.Input.SendAsync(FileRequest(new FileReadRequest { Path = "valid.txt" })); var failure = await output.ReceiveAsync().WaitAsync(TestTimeout); failure.Error.ShouldNotBeNull().Code.ShouldBe(FileSystemErrorCodeNames.ReadNotFound); @@ -93,7 +94,7 @@ public async Task Missing_read_is_normal_failure_and_later_input_continues() var success = await output.ReceiveAsync().WaitAsync(TestTimeout); success.IsError.ShouldBeFalse(); - success.Value.Content.Bytes.AsSpan().ToArray() + success.Value.Deserialize()!.Content.Bytes.AsSpan().ToArray() .ShouldBe(Encoding.UTF8.GetBytes("ok")); node.Completion.IsFaulted.ShouldBeFalse(); } @@ -110,7 +111,7 @@ public async Task Oversized_read_is_a_normal_failure() }); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new FileReadRequest + await node.Input.SendAsync(FileRequest(new FileReadRequest { Path = "large.bin", ReadAs = FileReadMode.Bytes @@ -131,11 +132,11 @@ public async Task Read_path_policy_failures_are_normal_results() new FileReadOptions { BaseDirectory = directory.Path }); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new FileReadRequest + await node.Input.SendAsync(FileRequest(new FileReadRequest { Path = absolutePath })); - await node.Input.SendAsync(FlowMessage.Create(new FileReadRequest + await node.Input.SendAsync(FileRequest(new FileReadRequest { Path = "../outside.txt" })); @@ -155,7 +156,7 @@ public async Task Unsupported_read_encoding_is_a_normal_result() new FileReadOptions { BaseDirectory = directory.Path }); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new FileReadRequest + await node.Input.SendAsync(FileRequest(new FileReadRequest { Path = "input.txt", Encoding = "not-a-real-encoding" @@ -174,7 +175,7 @@ public async Task Read_success_emits_correlated_event_and_completes_cleanly() new FileReadOptions { BaseDirectory = directory.Path }); var output = Sink(node.Output); var events = Sink(node.Events); - var input = FlowMessage.Create( + var input = FileRequest( new FileReadRequest { Path = "input.txt" }, new CorrelationId("read-event")); @@ -182,9 +183,9 @@ public async Task Read_success_emits_correlated_event_and_completes_cleanly() await output.ReceiveAsync().WaitAsync(TestTimeout); var value = await events.ReceiveAsync().WaitAsync(TestTimeout); - value.Name.ShouldBe(FileReadNode.ReadSucceeded); + value.ToFlowEvent().Name.ShouldBe(FileReadNode.ReadSucceeded); value.CorrelationId.ShouldBe(input.CorrelationId); - value.Attributes["bytesRead"].ShouldBe(5L); + value.ToFlowEvent().Attributes["bytesRead"].ShouldBe(5L); node.Complete(); await node.Completion.WaitAsync(TestTimeout); @@ -215,7 +216,7 @@ public async Task Write_uses_exact_original_bytes_and_preserves_lineage() new FileWriteOptions { BaseDirectory = directory.Path }, new FakeTimeProvider(timestamp)); var output = Sink(node.Output); - var input = FlowMessage.Create( + var input = FileRequest( new FileContentWriteRequest { Path = "nested/output.bin", @@ -233,8 +234,9 @@ public async Task Write_uses_exact_original_bytes_and_preserves_lineage() message.TraceId.ShouldBe(input.TraceId); message.CausationId.ShouldBe(input.MessageId); message.IsError.ShouldBeFalse(); - message.Value.WrittenAt.ShouldBe(timestamp); - message.Value.BytesWritten.ShouldBe(bytes.Length); + var result = message.Value.Deserialize()!; + result.WrittenAt.ShouldBe(timestamp); + result.BytesWritten.ShouldBe(bytes.Length); (await File.ReadAllBytesAsync(Path.Combine(directory.Path, "nested", "output.bin"))) .ShouldBe(bytes); } @@ -247,9 +249,9 @@ public async Task Incoming_error_propagates_and_later_write_continues() new FileWriteOptions { BaseDirectory = directory.Path }); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.CreateError( + await node.Input.SendAsync(FlowMessage.CreateError( new FlowError("upstream.failed", "Upstream failed.", "test"))); - await node.Input.SendAsync(FlowMessage.Create(new FileContentWriteRequest + await node.Input.SendAsync(FileRequest(new FileContentWriteRequest { Path = "valid.txt", Content = FlowContent.FromBytes(Encoding.UTF8.GetBytes("ok"), "text/plain", "utf-8") @@ -271,18 +273,18 @@ public async Task Write_append_and_create_new_preserve_mode_behavior() var output = Sink(node.Output); var path = "output.bin"; - await node.Input.SendAsync(FlowMessage.Create(new FileContentWriteRequest + await node.Input.SendAsync(FileRequest(new FileContentWriteRequest { Path = path, Content = FlowContent.FromBytes(new byte[] { 1 }, "application/octet-stream") })); - await node.Input.SendAsync(FlowMessage.Create(new FileContentWriteRequest + await node.Input.SendAsync(FileRequest(new FileContentWriteRequest { Path = path, Content = FlowContent.FromBytes(new byte[] { 2 }, "application/octet-stream"), Mode = FileWriteMode.Append })); - await node.Input.SendAsync(FlowMessage.Create(new FileContentWriteRequest + await node.Input.SendAsync(FileRequest(new FileContentWriteRequest { Path = path, Content = FlowContent.FromBytes(new byte[] { 3 }, "application/octet-stream"), @@ -305,12 +307,12 @@ public async Task Write_path_policy_failures_are_normal_results() var output = Sink(node.Output); var content = FlowContent.FromBytes(new byte[] { 1 }, "application/octet-stream"); - await node.Input.SendAsync(FlowMessage.Create(new FileContentWriteRequest + await node.Input.SendAsync(FileRequest(new FileContentWriteRequest { Path = Path.Combine(directory.Path, "blocked.bin"), Content = content })); - await node.Input.SendAsync(FlowMessage.Create(new FileContentWriteRequest + await node.Input.SendAsync(FileRequest(new FileContentWriteRequest { Path = "../outside.bin", Content = content @@ -330,7 +332,7 @@ public async Task Write_success_emits_correlated_event_and_completes_cleanly() new FileWriteOptions { BaseDirectory = directory.Path }); var output = Sink(node.Output); var events = Sink(node.Events); - var input = FlowMessage.Create( + var input = FileRequest( new FileContentWriteRequest { Path = "output.txt", @@ -342,9 +344,9 @@ public async Task Write_success_emits_correlated_event_and_completes_cleanly() await output.ReceiveAsync().WaitAsync(TestTimeout); var value = await events.ReceiveAsync().WaitAsync(TestTimeout); - value.Name.ShouldBe(FileWriteNode.WriteSucceeded); + value.ToFlowEvent().Name.ShouldBe(FileWriteNode.WriteSucceeded); value.CorrelationId.ShouldBe(input.CorrelationId); - value.Attributes["bytesWritten"].ShouldBe(5L); + value.ToFlowEvent().Attributes["bytesWritten"].ShouldBe(5L); node.Complete(); await node.Completion.WaitAsync(TestTimeout); @@ -374,7 +376,8 @@ public async Task Directory_source_emits_typed_entries_and_faults_on_source_fail await node.StartAsync(); await node.Completion.WaitAsync(TestTimeout); - var value = (await output.ReceiveAsync().WaitAsync(TestTimeout)).Value; + var value = (await output.ReceiveAsync().WaitAsync(TestTimeout)) + .Value!.Deserialize()!; value.Name.ShouldBe("entry.txt"); value.EntryType.ShouldBe("File"); } @@ -388,4 +391,35 @@ public async Task Directory_source_emits_typed_entries_and_faults_on_source_fail await failing.StartAsync(); await Should.ThrowAsync(() => failing.Completion.WaitAsync(TestTimeout)); } + + [Fact] + public async Task Read_rejects_malformed_value_without_faulting_and_accepts_later_input() + { + using var directory = TempDirectory.Create("canonical-read-rejected"); + await File.WriteAllTextAsync(Path.Combine(directory.Path, "valid.txt"), "ok"); + await using var node = new FileReadNode( + new FileReadOptions { BaseDirectory = directory.Path }); + var output = Sink(node.Output); + var events = Sink(node.Events); + + await node.Input.SendAsync(FlowMessage.Create(FlowValue.From(42))); + await node.Input.SendAsync(FileRequest(new FileReadRequest { Path = "valid.txt" })); + + var rejection = await output.ReceiveAsync().WaitAsync(TestTimeout); + rejection.IsError.ShouldBeTrue(); + rejection.Error.ShouldNotBeNull(); + (await events.ReceiveAsync().WaitAsync(TestTimeout)).ToFlowEvent().Name.ShouldBe("file.read.rejected"); + + var success = await output.ReceiveAsync().WaitAsync(TestTimeout); + success.IsError.ShouldBeFalse(); + success.Value.Deserialize()!.Content.Bytes.AsSpan().ToArray() + .ShouldBe(Encoding.UTF8.GetBytes("ok")); + node.Completion.IsFaulted.ShouldBeFalse(); + } + + private static FlowMessage FileRequest( + T request, + CorrelationId? correlationId = null, + TraceId? traceId = null) + => FlowMessage.Create(FlowValue.From(request), correlationId, traceId); } diff --git a/tests/FluxFlow.Components.FileSystem.Tests/FluxFlow.Components.FileSystem.Tests.csproj b/tests/Unit/Components/FileSystem/FluxFlow.Components.FileSystem.Tests/FluxFlow.Components.FileSystem.Tests.csproj similarity index 68% rename from tests/FluxFlow.Components.FileSystem.Tests/FluxFlow.Components.FileSystem.Tests.csproj rename to tests/Unit/Components/FileSystem/FluxFlow.Components.FileSystem.Tests/FluxFlow.Components.FileSystem.Tests.csproj index 56f16b2d..04461381 100644 --- a/tests/FluxFlow.Components.FileSystem.Tests/FluxFlow.Components.FileSystem.Tests.csproj +++ b/tests/Unit/Components/FileSystem/FluxFlow.Components.FileSystem.Tests/FluxFlow.Components.FileSystem.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,8 +6,8 @@ - - + + diff --git a/tests/FluxFlow.Components.Http.AspNetCore.Tests/FluxFlow.Components.Http.AspNetCore.Tests.csproj b/tests/Unit/Components/Http/FluxFlow.Components.Http.AspNetCore.Tests/FluxFlow.Components.Http.AspNetCore.Tests.csproj similarity index 55% rename from tests/FluxFlow.Components.Http.AspNetCore.Tests/FluxFlow.Components.Http.AspNetCore.Tests.csproj rename to tests/Unit/Components/Http/FluxFlow.Components.Http.AspNetCore.Tests/FluxFlow.Components.Http.AspNetCore.Tests.csproj index 19c3df98..7887b08f 100644 --- a/tests/FluxFlow.Components.Http.AspNetCore.Tests/FluxFlow.Components.Http.AspNetCore.Tests.csproj +++ b/tests/Unit/Components/Http/FluxFlow.Components.Http.AspNetCore.Tests/FluxFlow.Components.Http.AspNetCore.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -10,10 +10,10 @@ - - - - + + + + diff --git a/tests/FluxFlow.Components.Http.AspNetCore.Tests/HttpRequestContextTests.cs b/tests/Unit/Components/Http/FluxFlow.Components.Http.AspNetCore.Tests/HttpRequestContextTests.cs similarity index 100% rename from tests/FluxFlow.Components.Http.AspNetCore.Tests/HttpRequestContextTests.cs rename to tests/Unit/Components/Http/FluxFlow.Components.Http.AspNetCore.Tests/HttpRequestContextTests.cs diff --git a/tests/FluxFlow.Components.Http.AspNetCore.Tests/HttpTriggerEndpointTests.cs b/tests/Unit/Components/Http/FluxFlow.Components.Http.AspNetCore.Tests/HttpTriggerEndpointTests.cs similarity index 95% rename from tests/FluxFlow.Components.Http.AspNetCore.Tests/HttpTriggerEndpointTests.cs rename to tests/Unit/Components/Http/FluxFlow.Components.Http.AspNetCore.Tests/HttpTriggerEndpointTests.cs index f660f4ab..56bf524b 100644 --- a/tests/FluxFlow.Components.Http.AspNetCore.Tests/HttpTriggerEndpointTests.cs +++ b/tests/Unit/Components/Http/FluxFlow.Components.Http.AspNetCore.Tests/HttpTriggerEndpointTests.cs @@ -1,5 +1,6 @@ using FluxFlow.Components.Http.AspNetCore; using FluxFlow.Components.Http.Contracts; +using FluxFlow.Data; using FluxFlow.Components.RequestReply; using FluxFlow.Nodes; using Microsoft.AspNetCore.Builder; @@ -85,9 +86,12 @@ public async Task DiComposition_RoutesThroughKeyedTrigger() services.AddRouting(); services.AddFluxFlowHttpTrigger("echo", trigger => { - var handler = new ActionBlock>(request => - trigger.Responses.Post(request.With(HttpTriggerReply.Text( - $"di:{Encoding.UTF8.GetString(request.Value.Body ?? [])}")))); + var handler = new ActionBlock(request => + { + var value = request.Value!.Deserialize()!; + trigger.Responses.Post(request.With(FlowValue.From(HttpTriggerReply.Text( + $"di:{Encoding.UTF8.GetString(value.Body ?? [])}")))); + }); trigger.Output.LinkTo(handler); }); }) @@ -116,9 +120,12 @@ public async Task DiComposition_TrimsKeyedTriggerNames() services.AddRouting(); services.AddFluxFlowHttpTrigger(" echo ", trigger => { - var handler = new ActionBlock>(request => - trigger.Responses.Post(request.With(HttpTriggerReply.Text( - $"trimmed:{Encoding.UTF8.GetString(request.Value.Body ?? [])}")))); + var handler = new ActionBlock(request => + { + var value = request.Value!.Deserialize()!; + trigger.Responses.Post(request.With(FlowValue.From(HttpTriggerReply.Text( + $"trimmed:{Encoding.UTF8.GetString(value.Body ?? [])}")))); + }); trigger.Output.LinkTo(handler); }); }) diff --git a/tests/Unit/Components/Http/FluxFlow.Components.Http.Composition.Tests/FluxFlow.Components.Http.Composition.Tests.csproj b/tests/Unit/Components/Http/FluxFlow.Components.Http.Composition.Tests/FluxFlow.Components.Http.Composition.Tests.csproj new file mode 100644 index 00000000..b734231b --- /dev/null +++ b/tests/Unit/Components/Http/FluxFlow.Components.Http.Composition.Tests/FluxFlow.Components.Http.Composition.Tests.csproj @@ -0,0 +1,28 @@ + + + + net10.0 + false + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/FluxFlow.Components.Http.Composition.Tests/HttpServiceCollectionExtensionsTests.cs b/tests/Unit/Components/Http/FluxFlow.Components.Http.Composition.Tests/HttpServiceCollectionExtensionsTests.cs similarity index 95% rename from tests/FluxFlow.Components.Http.Composition.Tests/HttpServiceCollectionExtensionsTests.cs rename to tests/Unit/Components/Http/FluxFlow.Components.Http.Composition.Tests/HttpServiceCollectionExtensionsTests.cs index 92255495..0244232d 100644 --- a/tests/FluxFlow.Components.Http.Composition.Tests/HttpServiceCollectionExtensionsTests.cs +++ b/tests/Unit/Components/Http/FluxFlow.Components.Http.Composition.Tests/HttpServiceCollectionExtensionsTests.cs @@ -38,9 +38,9 @@ public void AddHttp_registers_client_metadata() var client = registry.Components[HttpComponentDefinition.Types.Client]; client.Inputs[HttpComponentDefinition.Ports.Input].MessageType.ShouldBe( - typeof(HttpClientRequest)); + typeof(FlowValue)); client.Outputs[HttpComponentDefinition.Ports.Output].MessageType.ShouldBe( - typeof(HttpResponseResult)); + typeof(FlowValue)); } [Fact] @@ -78,14 +78,14 @@ public void Design_metadata_provider_describes_http_client_ports() var input = metadata.Ports[0]; input.Name.ShouldBe(new ComponentPortName(HttpComponentDefinition.Ports.Input)); input.Direction.ShouldBe(PortDirection.Input); - input.ValueType?.Value.ShouldBe(nameof(HttpClientRequest)); + input.ValueType?.Value.ShouldBe(nameof(FlowValue)); input.IsPrimary.ShouldBeTrue(); input.Order.ShouldBe(0); var output = metadata.Ports[1]; output.Name.ShouldBe(new ComponentPortName(HttpComponentDefinition.Ports.Output)); output.Direction.ShouldBe(PortDirection.Output); - output.ValueType?.Value.ShouldBe(nameof(HttpResponseResult)); + output.ValueType?.Value.ShouldBe(nameof(FlowValue)); output.IsPrimary.ShouldBeTrue(); output.Order.ShouldBe(1); } @@ -194,16 +194,16 @@ await WithClientNodeAsync( client, async (ports, host) => { - var request = FlowMessage.Create( + var request = HttpRequest( new HttpClientRequest { Method = "GET", Url = "v1/status" }, new CorrelationId("http-correlation")); - var receive = ports.ReceiveAsync(Output, Timeout); + var receive = ports.ReceiveAsync(Output, Timeout); (await ports.SendAsync(Input, request)).IsAccepted.ShouldBeTrue(); var response = (await receive).Message.ShouldNotBeNull(); response.CorrelationId.ShouldBe(new CorrelationId("http-correlation")); - var result = response.Value.ShouldBeOfType(); + var result = response.Value.Deserialize()!; result.StatusCode.ShouldBe(200); Encoding.UTF8.GetString(result.Body.Bytes.AsSpan()).ShouldBe("pong"); handler.LastRequest!.RequestUri!.ToString() @@ -224,10 +224,10 @@ await WithClientNodeAsync( client, async (ports, _) => { - var receive = ports.ReceiveAsync(Output, Timeout); + var receive = ports.ReceiveAsync(Output, Timeout); (await ports.SendAsync( Input, - FlowMessage.Create(new HttpClientRequest + HttpRequest(new HttpClientRequest { Url = "https://example.test/" }))).IsAccepted.ShouldBeTrue(); @@ -299,6 +299,11 @@ public async Task Invalid_client_options_surface_factory_diagnostic( host.RuntimeAccess.Ports.ShouldBeNull(); } + private static FlowMessage HttpRequest( + HttpClientRequest request, + CorrelationId? correlationId = null) + => FlowMessage.Create(FlowValue.From(request), correlationId); + private static async Task WithClientNodeAsync( HttpClient client, Func run, diff --git a/tests/FluxFlow.Fluent.Tests/FluxFlow.Fluent.Tests.csproj b/tests/Unit/Components/Http/FluxFlow.Components.Http.Tests/FluxFlow.Components.Http.Tests.csproj similarity index 65% rename from tests/FluxFlow.Fluent.Tests/FluxFlow.Fluent.Tests.csproj rename to tests/Unit/Components/Http/FluxFlow.Components.Http.Tests/FluxFlow.Components.Http.Tests.csproj index 34c8653d..3fa0866a 100644 --- a/tests/FluxFlow.Fluent.Tests/FluxFlow.Fluent.Tests.csproj +++ b/tests/Unit/Components/Http/FluxFlow.Components.Http.Tests/FluxFlow.Components.Http.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,9 +6,8 @@ - - - + + diff --git a/tests/FluxFlow.Components.Http.Tests/HttpClientNodeTests.cs b/tests/Unit/Components/Http/FluxFlow.Components.Http.Tests/HttpClientNodeTests.cs similarity index 80% rename from tests/FluxFlow.Components.Http.Tests/HttpClientNodeTests.cs rename to tests/Unit/Components/Http/FluxFlow.Components.Http.Tests/HttpClientNodeTests.cs index af3038fd..4f2380db 100644 --- a/tests/FluxFlow.Components.Http.Tests/HttpClientNodeTests.cs +++ b/tests/Unit/Components/Http/FluxFlow.Components.Http.Tests/HttpClientNodeTests.cs @@ -59,6 +59,41 @@ public void Canonical_contracts_copy_headers_and_serialize_message_error_discrim .ShouldBe(HttpErrorCodeNames.NonSuccessStatus); } + [Fact] + public async Task Malformed_workflow_value_is_rejected_inside_the_visible_node_and_processing_continues() + { + var handler = new RecordingHandler((_, _) => Respond( + HttpStatusCode.OK, + [], + null)); + await using var node = new HttpClientNode(new HttpClient(handler)); + var output = Sink(node.Output); + var events = Sink(node.Events); + var malformed = FlowMessage.Create( + FlowValue.From(42), + new CorrelationId("http-malformed")); + + (await node.Input.SendAsync(malformed)).ShouldBeTrue(); + (await node.Input.SendAsync(HttpRequest(new HttpClientRequest + { + Url = "https://example.test/valid" + }))).ShouldBeTrue(); + + var rejected = await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); + rejected.IsError.ShouldBeTrue(); + rejected.Error!.Code.ShouldBe("http.request.invalid_shape"); + rejected.CorrelationId.ShouldBe(malformed.CorrelationId); + var @event = await events.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); + @event.ToFlowEvent().Name.ShouldBe(HttpClientNode.RequestRejected); + @event.CorrelationId.ShouldBe(malformed.CorrelationId); + @event.ToFlowEvent().Attributes["errorCode"].ShouldBe("http.request.invalid_shape"); + + HttpResponse(await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30))) + .StatusCode.ShouldBe(200); + handler.CallCount.ShouldBe(1); + node.Completion.IsFaulted.ShouldBeFalse(); + } + [Fact] public async Task Request_and_response_preserve_exact_content_and_message_lineage() { @@ -70,7 +105,7 @@ public async Task Request_and_response_preserve_exact_content_and_message_lineag "text/plain; charset=\"iso-8859-1\"")); await using var node = new HttpClientNode(new HttpClient(handler)); var output = Sink(node.Output); - var request = FlowMessage.Create( + var request = HttpRequest( new HttpClientRequest { Method = "POST", @@ -89,7 +124,7 @@ public async Task Request_and_response_preserve_exact_content_and_message_lineag (await node.Input.SendAsync(request)).ShouldBeTrue(); var message = await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); - var result = message.Value.ShouldBeOfType(); + var result = message.Value!.Deserialize()!; message.CorrelationId.ShouldBe(request.CorrelationId); message.TraceId.ShouldBe(request.TraceId); message.CausationId.ShouldBe(request.MessageId); @@ -117,23 +152,23 @@ public async Task Output_fans_out_every_result_to_every_consumer() var first = Sink(node.Output); var second = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new HttpClientRequest + await node.Input.SendAsync(HttpRequest(new HttpClientRequest { Url = "https://example.test/1" })); - await node.Input.SendAsync(FlowMessage.Create(new HttpClientRequest + await node.Input.SendAsync(HttpRequest(new HttpClientRequest { Url = "https://example.test/2" })); DecodeText((await first.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30))) - .Value.ShouldBeOfType().Body).ShouldBe("r1"); + .Value!.Deserialize()!.Body).ShouldBe("r1"); DecodeText((await first.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30))) - .Value.ShouldBeOfType().Body).ShouldBe("r2"); + .Value!.Deserialize()!.Body).ShouldBe("r2"); DecodeText((await second.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30))) - .Value.ShouldBeOfType().Body).ShouldBe("r1"); + .Value!.Deserialize()!.Body).ShouldBe("r1"); DecodeText((await second.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30))) - .Value.ShouldBeOfType().Body).ShouldBe("r2"); + .Value!.Deserialize()!.Body).ShouldBe("r2"); } [Fact] @@ -150,13 +185,13 @@ public async Task Relative_url_resolves_against_client_base_address() await using var node = new HttpClientNode(client); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new HttpClientRequest + await node.Input.SendAsync(HttpRequest(new HttpClientRequest { Url = "v1/status" })); (await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30))) - .Value.ShouldBeOfType().StatusCode.ShouldBe(200); + .Value!.Deserialize()!.StatusCode.ShouldBe(200); handler.LastRequestUri.ShouldBe("https://api.example.test/v1/status"); } @@ -170,13 +205,13 @@ public async Task Non_success_response_is_a_normal_response_result_by_default() await using var node = new HttpClientNode(new HttpClient(handler)); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new HttpClientRequest + await node.Input.SendAsync(HttpRequest(new HttpClientRequest { Url = "https://example.test/items" })); var message = await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); - var result = message.Value.ShouldBeOfType(); + var result = message.Value!.Deserialize()!; result.StatusCode.ShouldBe(422); result.Success.ShouldBeFalse(); message.IsError.ShouldBeFalse(); @@ -195,11 +230,11 @@ public async Task Configured_non_success_response_is_an_error_result_and_later_i new HttpClientNodeOptions { TreatNonSuccessStatusAsError = true }); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new HttpClientRequest + await node.Input.SendAsync(HttpRequest(new HttpClientRequest { Url = "https://example.test/status" })); - await node.Input.SendAsync(FlowMessage.Create(new HttpClientRequest + await node.Input.SendAsync(HttpRequest(new HttpClientRequest { Url = "https://example.test/status" })); @@ -210,7 +245,7 @@ await node.Input.SendAsync(FlowMessage.Create(new HttpClientRequest failure.Error.Details!.Value.GetProperty("statusCode").GetInt32().ShouldBe(503); var success = (await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30))) - .Value.ShouldBeOfType(); + .Value!.Deserialize()!; success.StatusCode.ShouldBe(200); node.Completion.IsFaulted.ShouldBeFalse(); } @@ -229,8 +264,8 @@ public async Task Incoming_error_is_propagated_without_sending_and_later_input_c "upstream.failed", "Upstream processing failed.", "test"); - await node.Input.SendAsync(FlowMessage.CreateError(upstreamError)); - await node.Input.SendAsync(FlowMessage.Create(new HttpClientRequest + await node.Input.SendAsync(FlowMessage.CreateError(upstreamError)); + await node.Input.SendAsync(HttpRequest(new HttpClientRequest { Url = "https://example.test/bytes", Body = FlowContent.FromBytes(Array.Empty(), "application/octet-stream") @@ -239,8 +274,7 @@ await node.Input.SendAsync(FlowMessage.Create(new HttpClientRequest var failure = await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); failure.IsError.ShouldBeTrue(); failure.Error.ShouldBeSameAs(upstreamError); - (await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30))) - .Value.ShouldBeOfType(); + HttpResponse(await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30))); handler.CallCount.ShouldBe(1); } @@ -254,12 +288,12 @@ public async Task Invalid_method_returns_error_result_and_later_input_continues( await using var node = new HttpClientNode(new HttpClient(handler)); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new HttpClientRequest + await node.Input.SendAsync(HttpRequest(new HttpClientRequest { Method = "NOT VALID", Url = "https://example.test/invalid" })); - await node.Input.SendAsync(FlowMessage.Create(new HttpClientRequest + await node.Input.SendAsync(HttpRequest(new HttpClientRequest { Url = "https://example.test/valid" })); @@ -267,8 +301,7 @@ await node.Input.SendAsync(FlowMessage.Create(new HttpClientRequest var failure = await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); failure.IsError.ShouldBeTrue(); failure.Error!.Code.ShouldBe(HttpErrorCodeNames.InvalidMethod); - (await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30))) - .Value.ShouldBeOfType(); + HttpResponse(await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30))); handler.CallCount.ShouldBe(1); } @@ -280,7 +313,7 @@ public async Task Network_failure_is_a_normal_error_result() await using var node = new HttpClientNode(new HttpClient(handler)); var output = Sink(node.Output); var events = Sink(node.Events); - var request = FlowMessage.Create(new HttpClientRequest + var request = HttpRequest(new HttpClientRequest { Url = "https://example.test/status" }); @@ -292,7 +325,7 @@ public async Task Network_failure_is_a_normal_error_result() failure.Error!.Code.ShouldBe(HttpErrorCodeNames.Network); failure.Error.IsTransient.ShouldBeTrue(); var @event = await events.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); - @event.Name.ShouldBe(HttpClientNode.RequestFailed); + @event.ToFlowEvent().Name.ShouldBe(HttpClientNode.RequestFailed); @event.CorrelationId.ShouldBe(request.CorrelationId); } @@ -309,7 +342,7 @@ public async Task Request_timeout_is_a_normal_transient_error_result() new HttpClientNodeOptions { DefaultTimeoutMilliseconds = 20 }); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new HttpClientRequest + await node.Input.SendAsync(HttpRequest(new HttpClientRequest { Url = "https://example.test/timeout" })); @@ -331,7 +364,7 @@ public async Task Missing_url_without_base_address_is_a_normal_error_result() await using var node = new HttpClientNode(new HttpClient(handler)); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new HttpClientRequest())); + await node.Input.SendAsync(HttpRequest(new HttpClientRequest())); var failure = await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); failure.IsError.ShouldBeTrue(); @@ -352,13 +385,13 @@ public async Task Response_body_is_bounded_and_keeps_content_metadata() new HttpClientNodeOptions { MaxResponseBodyBytes = 8 }); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new HttpClientRequest + await node.Input.SendAsync(HttpRequest(new HttpClientRequest { Url = "https://example.test/content" })); var result = (await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30))) - .Value.ShouldBeOfType(); + .Value!.Deserialize()!; result.BodyTruncated.ShouldBeTrue(); result.Body.Bytes.Length.ShouldBe(8); result.Body.ContentType.ShouldBe("application/octet-stream"); @@ -377,13 +410,13 @@ public async Task Response_body_preserves_and_honors_declared_charset(string cha await using var node = new HttpClientNode(new HttpClient(handler)); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new HttpClientRequest + await node.Input.SendAsync(HttpRequest(new HttpClientRequest { Url = "https://example.test/encoded" })); var body = (await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30))) - .Value.ShouldBeOfType().Body; + .Value!.Deserialize()!.Body; body.Bytes.AsSpan().ToArray().ShouldBe(bytes); body.Encoding.ShouldBe("iso-8859-1"); DecodeText(body).ShouldBe("\u00e9"); @@ -400,13 +433,13 @@ public async Task Invalid_response_charset_falls_back_to_utf8_when_decoded() await using var node = new HttpClientNode(new HttpClient(handler)); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new HttpClientRequest + await node.Input.SendAsync(HttpRequest(new HttpClientRequest { Url = "https://example.test/fallback" })); var body = (await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30))) - .Value.ShouldBeOfType().Body; + .Value!.Deserialize()!.Body; body.Encoding.ShouldBe("not-a-real-charset"); DecodeText(body).ShouldBe(expected); } @@ -422,13 +455,13 @@ public async Task Structured_json_response_can_be_decoded_explicitly() await using var node = new HttpClientNode(new HttpClient(handler)); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new HttpClientRequest + await node.Input.SendAsync(HttpRequest(new HttpClientRequest { Url = "https://example.test/problem" })); var body = (await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30))) - .Value.ShouldBeOfType().Body; + .Value!.Deserialize()!.Body; using var document = JsonDocument.Parse(body.Bytes.AsSpan().ToArray()); document.RootElement.GetProperty("message").GetString().ShouldBe("hello"); } @@ -443,7 +476,7 @@ public async Task Success_emits_a_correlated_completion_event() await using var node = new HttpClientNode(new HttpClient(handler)); Sink(node.Output); var events = Sink(node.Events); - var request = FlowMessage.Create(new HttpClientRequest + var request = HttpRequest(new HttpClientRequest { Url = "https://example.test/status" }); @@ -451,8 +484,8 @@ public async Task Success_emits_a_correlated_completion_event() await node.Input.SendAsync(request); var @event = await events.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); - @event.Name.ShouldBe(HttpClientNode.RequestCompleted); - @event.Level.ShouldBe(FlowEventLevel.Information); + @event.ToFlowEvent().Name.ShouldBe(HttpClientNode.RequestCompleted); + @event.ToFlowEvent().Level.ShouldBe(FlowEventLevel.Information); @event.CorrelationId.ShouldBe(request.CorrelationId); } @@ -491,6 +524,21 @@ public void Constructor_rejects_invalid_options(string option) }); } + private static FlowMessage HttpRequest( + HttpClientRequest request, + CorrelationId? correlationId = null, + TraceId? traceId = null) + => FlowMessage.Create( + FlowValue.From(request), + correlationId, + traceId); + + private static HttpResponseResult HttpResponse(FlowMessage message) + { + message.IsError.ShouldBeFalse(); + return message.Value.Deserialize()!; + } + private static string DecodeText(FlowContent content) { Encoding encoding; diff --git a/tests/Unit/Components/Http/FluxFlow.Components.Http.Tests/HttpClientRequestMaterializerTests.cs b/tests/Unit/Components/Http/FluxFlow.Components.Http.Tests/HttpClientRequestMaterializerTests.cs new file mode 100644 index 00000000..b324e9b2 --- /dev/null +++ b/tests/Unit/Components/Http/FluxFlow.Components.Http.Tests/HttpClientRequestMaterializerTests.cs @@ -0,0 +1,44 @@ +using System.Text; +using FluxFlow.Components.Http.Materialization; +using FluxFlow.Data; +using Shouldly; +using Xunit; + +namespace FluxFlow.Components.Http.Tests; + +public sealed class HttpClientRequestMaterializerTests +{ + [Fact] + public void Materialize_accepts_a_structural_request_and_normalizes_json_body() + { + var materializer = new HttpClientRequestMaterializer(); + var value = FlowValue.From(new + { + method = "POST", + url = "https://example.test/orders", + body = new { orderId = 42 } + }); + + var result = materializer.Materialize(value); + + materializer.InputShape.Validate(value).IsValid.ShouldBeTrue(); + result.IsSuccess.ShouldBeTrue(); + result.Value.Method.ShouldBe("POST"); + result.Value.Url.ShouldBe("https://example.test/orders"); + result.Value.Body.ShouldNotBeNull().ContentType.ShouldBe("application/json"); + Encoding.UTF8.GetString(result.Value.Body.Bytes.ToArray()).ShouldBe("{\"orderId\":42}"); + } + + [Fact] + public void Materialize_rejects_a_non_object_with_http_owned_error() + { + var materializer = new HttpClientRequestMaterializer(); + var value = FlowValue.From("invalid"); + var result = materializer.Materialize(value); + + materializer.InputShape.Validate(value).IsValid.ShouldBeFalse(); + result.IsSuccess.ShouldBeFalse(); + result.Error.ShouldNotBeNull().Code.ShouldBe("http.request.invalid_shape"); + result.Error.Category.ShouldBe("HTTP"); + } +} diff --git a/tests/Unit/Components/Mapping/FluxFlow.Components.Mapping.Composition.Tests/FluxFlow.Components.Mapping.Composition.Tests.csproj b/tests/Unit/Components/Mapping/FluxFlow.Components.Mapping.Composition.Tests/FluxFlow.Components.Mapping.Composition.Tests.csproj new file mode 100644 index 00000000..c3cd5efd --- /dev/null +++ b/tests/Unit/Components/Mapping/FluxFlow.Components.Mapping.Composition.Tests/FluxFlow.Components.Mapping.Composition.Tests.csproj @@ -0,0 +1,30 @@ + + + + net10.0 + false + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/FluxFlow.Components.Mapping.Composition.Tests/MappingServiceCollectionExtensionsTests.cs b/tests/Unit/Components/Mapping/FluxFlow.Components.Mapping.Composition.Tests/MappingServiceCollectionExtensionsTests.cs similarity index 98% rename from tests/FluxFlow.Components.Mapping.Composition.Tests/MappingServiceCollectionExtensionsTests.cs rename to tests/Unit/Components/Mapping/FluxFlow.Components.Mapping.Composition.Tests/MappingServiceCollectionExtensionsTests.cs index 918f8826..c2f4c407 100644 --- a/tests/FluxFlow.Components.Mapping.Composition.Tests/MappingServiceCollectionExtensionsTests.cs +++ b/tests/Unit/Components/Mapping/FluxFlow.Components.Mapping.Composition.Tests/MappingServiceCollectionExtensionsTests.cs @@ -43,8 +43,8 @@ public void AddMapping_registers_only_the_canonical_json_contract() MappingComponentDefinition.Ports.Output, "Events" ], ignoreOrder: false); - mapper.Inputs[MappingComponentDefinition.Ports.Input].MessageType.ShouldBe(typeof(JsonElement)); - mapper.Outputs[MappingComponentDefinition.Ports.Output].MessageType.ShouldBe(typeof(JsonElement)); + mapper.Inputs[MappingComponentDefinition.Ports.Input].MessageType.ShouldBe(typeof(FlowValue)); + mapper.Outputs[MappingComponentDefinition.Ports.Output].MessageType.ShouldBe(typeof(FlowValue)); } [Fact] @@ -149,9 +149,9 @@ public void Design_metadata_provider_describes_only_canonical_mapper_ports() port.Order, port.IsPrimary, port.ValueType?.Value)).ShouldBe([ - (MappingComponentDefinition.Ports.Input, PortDirection.Input, 0, true, nameof(JsonElement)), - (MappingComponentDefinition.Ports.Output, PortDirection.Output, 1, true, nameof(JsonElement)), - (MappingComponentDefinition.Ports.Events, PortDirection.Output, 2, false, nameof(ComponentEvent)) + (MappingComponentDefinition.Ports.Input, PortDirection.Input, 0, true, nameof(FlowValue)), + (MappingComponentDefinition.Ports.Output, PortDirection.Output, 1, true, nameof(FlowValue)), + (MappingComponentDefinition.Ports.Events, PortDirection.Output, 2, false, nameof(global::FluxFlow.Data.FlowValue)) ]); } @@ -190,7 +190,7 @@ await WithNodeAsync( async (ports, _) => { var resultReceive = ports.ReceiveAsync(Output, Timeout); - var eventReceive = ports.ReceiveAsync(Events, Timeout); + var eventReceive = ports.ReceiveAsync(Events, Timeout); (await ports.SendAsync(Input, request)).IsAccepted.ShouldBeTrue(); @@ -204,7 +204,7 @@ await WithNodeAsync( var @event = (await eventReceive).Message.ShouldNotBeNull(); @event.CorrelationId.ShouldBe(request.CorrelationId); - @event.Value.Name.ShouldBe("flow.mapper.succeeded"); + @event.ToFlowEvent().Name.ShouldBe("flow.mapper.succeeded"); }, Properties( ("expression", "map"), diff --git a/tests/FluxFlow.Components.Mapping.Tests/FlowMapperNodeTests.cs b/tests/Unit/Components/Mapping/FluxFlow.Components.Mapping.Tests/FlowMapperNodeTests.cs similarity index 87% rename from tests/FluxFlow.Components.Mapping.Tests/FlowMapperNodeTests.cs rename to tests/Unit/Components/Mapping/FluxFlow.Components.Mapping.Tests/FlowMapperNodeTests.cs index 37897578..186fb083 100644 --- a/tests/FluxFlow.Components.Mapping.Tests/FlowMapperNodeTests.cs +++ b/tests/Unit/Components/Mapping/FluxFlow.Components.Mapping.Tests/FlowMapperNodeTests.cs @@ -3,6 +3,7 @@ using FluxFlow.Components.Mapping.Contracts; using FluxFlow.Components.Mapping.Nodes; using FluxFlow.Components.Mapping.Options; +using FluxFlow.Data; using FluxFlow.Mapping; using FluxFlow.Nodes; using Microsoft.Extensions.Time.Testing; @@ -164,10 +165,10 @@ public async Task Expected_failure_is_an_error_message_and_processing_continues( success.Value.ShouldBe("valid"); var failedEvent = await events.ReceiveAsync().WaitAsync(Timeout); - failedEvent.Name.ShouldBe(FlowMapperNode.MapperFailed); - failedEvent.Level.ShouldBe(FlowEventLevel.Warning); + failedEvent.ToFlowEvent().Name.ShouldBe(FlowMapperNode.MapperFailed); + failedEvent.ToFlowEvent().Level.ShouldBe(FlowEventLevel.Warning); var succeededEvent = await events.ReceiveAsync().WaitAsync(Timeout); - succeededEvent.Name.ShouldBe(FlowMapperNode.MapperSucceeded); + succeededEvent.ToFlowEvent().Name.ShouldBe(FlowMapperNode.MapperSucceeded); node.Complete(); await node.Completion.WaitAsync(Timeout); @@ -210,7 +211,7 @@ public async Task Incompatible_expression_output_is_a_normal_error_message() var results = Sink(node.Output); (await node.Input.SendAsync(FlowMessage.Create( - JsonSerializer.SerializeToElement(new { value = "input" })))).ShouldBeTrue(); + FlowValue.From(JsonSerializer.SerializeToElement(new { value = "input" }))))).ShouldBeTrue(); var result = await results.ReceiveAsync().WaitAsync(Timeout); result.IsError.ShouldBeTrue(); @@ -222,6 +223,26 @@ public async Task Incompatible_expression_output_is_a_normal_error_message() node.Completion.IsFaulted.ShouldBeFalse(); } + [Fact] + public async Task Json_runtime_facade_uses_canonical_ports_and_preserves_lineage() + { + var engine = new RecordingExpressionEngine( + (_, context, _) => context.Variables["input"]); + await using var node = new JsonMapperNode( + new MapperOptions { Expression = "map" }, + engine); + var results = Sink(node.Output); + var request = FlowMessage.Create(FlowValue.From(new { value = "input" })); + + (await node.Input.SendAsync(request)).ShouldBeTrue(); + + var response = await results.ReceiveAsync().WaitAsync(Timeout); + response.IsError.ShouldBeFalse(); + response.Value.ToJsonElement().GetProperty("value").GetString().ShouldBe("input"); + response.CorrelationId.ShouldBe(request.CorrelationId); + response.CausationId.ShouldBe(request.MessageId); + } + [Fact] public async Task Success_event_uses_configured_clock_and_diagnostic_metadata() { @@ -247,12 +268,12 @@ public async Task Success_event_uses_configured_clock_and_diagnostic_metadata() var @event = await events.ReceiveAsync().WaitAsync(Timeout); @event.Timestamp.ShouldBe(timestamp); @event.CorrelationId.ShouldBe(message.CorrelationId); - @event.Name.ShouldBe(FlowMapperNode.MapperSucceeded); - @event.Attributes["engine"].ShouldBe("test"); - @event.Attributes["expressionId"].ShouldBe("map-v1"); - @event.Attributes["expressionName"].ShouldBe("normalize"); - @event.Attributes["inputType"].ShouldBe(typeof(string).FullName); - @event.Attributes["outputType"].ShouldBe(typeof(string).FullName); + @event.ToFlowEvent().Name.ShouldBe(FlowMapperNode.MapperSucceeded); + @event.ToFlowEvent().Attributes["engine"].ShouldBe("test"); + @event.ToFlowEvent().Attributes["expressionId"].ShouldBe("map-v1"); + @event.ToFlowEvent().Attributes["expressionName"].ShouldBe("normalize"); + @event.ToFlowEvent().Attributes["inputType"].ShouldBe(typeof(string).FullName); + @event.ToFlowEvent().Attributes["outputType"].ShouldBe(typeof(string).FullName); } [Fact] @@ -292,7 +313,7 @@ private static async Task> ReceiveAsync(BufferBlock sink, return items; } - private static async Task ReceiveEventsAsync(BufferBlock events, int count) + private static async Task ReceiveEventsAsync(BufferBlock events, int count) { for (var index = 0; index < count; index++) { @@ -301,7 +322,7 @@ private static async Task ReceiveEventsAsync(BufferBlock events, int } private static async Task ReceiveEventAsync( - BufferBlock events, + BufferBlock events, CorrelationId? correlationId) { while (true) diff --git a/tests/FluxFlow.Components.Mapping.Tests/FluxFlow.Components.Mapping.Tests.csproj b/tests/Unit/Components/Mapping/FluxFlow.Components.Mapping.Tests/FluxFlow.Components.Mapping.Tests.csproj similarity index 62% rename from tests/FluxFlow.Components.Mapping.Tests/FluxFlow.Components.Mapping.Tests.csproj rename to tests/Unit/Components/Mapping/FluxFlow.Components.Mapping.Tests/FluxFlow.Components.Mapping.Tests.csproj index ae7a97d3..658f2994 100644 --- a/tests/FluxFlow.Components.Mapping.Tests/FluxFlow.Components.Mapping.Tests.csproj +++ b/tests/Unit/Components/Mapping/FluxFlow.Components.Mapping.Tests/FluxFlow.Components.Mapping.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,9 +6,9 @@ - - - + + + diff --git a/tests/FluxFlow.Components.Mapping.Tests/PostponedTargetBlock.cs b/tests/Unit/Components/Mapping/FluxFlow.Components.Mapping.Tests/PostponedTargetBlock.cs similarity index 100% rename from tests/FluxFlow.Components.Mapping.Tests/PostponedTargetBlock.cs rename to tests/Unit/Components/Mapping/FluxFlow.Components.Mapping.Tests/PostponedTargetBlock.cs diff --git a/tests/Unit/Components/Metrics/FluxFlow.Components.Metrics.Composition.Tests/FluxFlow.Components.Metrics.Composition.Tests.csproj b/tests/Unit/Components/Metrics/FluxFlow.Components.Metrics.Composition.Tests/FluxFlow.Components.Metrics.Composition.Tests.csproj new file mode 100644 index 00000000..2b186cdc --- /dev/null +++ b/tests/Unit/Components/Metrics/FluxFlow.Components.Metrics.Composition.Tests/FluxFlow.Components.Metrics.Composition.Tests.csproj @@ -0,0 +1,29 @@ + + + + net10.0 + false + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/FluxFlow.Components.Metrics.Composition.Tests/MetricsServiceCollectionExtensionsTests.cs b/tests/Unit/Components/Metrics/FluxFlow.Components.Metrics.Composition.Tests/MetricsServiceCollectionExtensionsTests.cs similarity index 97% rename from tests/FluxFlow.Components.Metrics.Composition.Tests/MetricsServiceCollectionExtensionsTests.cs rename to tests/Unit/Components/Metrics/FluxFlow.Components.Metrics.Composition.Tests/MetricsServiceCollectionExtensionsTests.cs index 9dbc6a7c..1a31a90e 100644 --- a/tests/FluxFlow.Components.Metrics.Composition.Tests/MetricsServiceCollectionExtensionsTests.cs +++ b/tests/Unit/Components/Metrics/FluxFlow.Components.Metrics.Composition.Tests/MetricsServiceCollectionExtensionsTests.cs @@ -38,10 +38,8 @@ public void AddMetrics_registers_request_result_metadata() services => services.AddFluxFlowComponents().AddMetrics()); var registration = registry.Components[MetricsComponentDefinition.Types.Aggregate]; - registration.Inputs[MetricsComponentDefinition.Ports.Input].MessageType - .ShouldBe(typeof(MetricSampleInput)); - registration.Outputs[MetricsComponentDefinition.Ports.Output].MessageType - .ShouldBe(typeof(MetricSnapshotOutput)); + registration.Inputs[MetricsComponentDefinition.Ports.Input].MessageType.ShouldBe(typeof(FlowValue)); + registration.Outputs[MetricsComponentDefinition.Ports.Output].MessageType.ShouldBe(typeof(FlowValue)); } [Fact] @@ -71,14 +69,14 @@ public void Design_metadata_provider_describes_metrics_ports() input.Name.Value.ShouldBe(MetricsComponentDefinition.Ports.Input); input.Direction.ShouldBe(PortDirection.Input); input.Order.ShouldBe(0); - input.ValueType?.Value.ShouldBe(nameof(MetricSampleInput)); + input.ValueType?.Value.ShouldBe(nameof(FlowValue)); input.IsPrimary.ShouldBeTrue(); var output = metadata.Ports[1]; output.Name.Value.ShouldBe(MetricsComponentDefinition.Ports.Output); output.Direction.ShouldBe(PortDirection.Output); output.Order.ShouldBe(1); - output.ValueType?.Value.ShouldBe("MetricSnapshotOutput"); + output.ValueType?.Value.ShouldBe(nameof(FlowValue)); output.IsPrimary.ShouldBeTrue(); } @@ -327,14 +325,14 @@ await WithNodeAsync(async (ports, _) => Group = "items" }); - var eventReceive = ports.ReceiveAsync(Events, Timeout); + var eventReceive = ports.ReceiveAsync(Events, Timeout); (await ports.SendAsync(Input, message)).IsAccepted.ShouldBeTrue(); var eventMessage = (await eventReceive).Message.ShouldNotBeNull(); var @event = eventMessage.Value; - @event.Name.ShouldBe(MetricsDiagnosticNames.AggregateUpdated); + @event.ToFlowEvent().Name.ShouldBe(MetricsDiagnosticNames.AggregateUpdated); eventMessage.CorrelationId.ShouldBe(message.CorrelationId); - @event.Attributes["sampleCount"].ShouldBe("1"); + @event.ToFlowEvent().Attributes["sampleCount"].ShouldBe(1d); }); } diff --git a/tests/FluxFlow.Components.Metrics.Tests/FluxFlow.Components.Metrics.Tests.csproj b/tests/Unit/Components/Metrics/FluxFlow.Components.Metrics.Tests/FluxFlow.Components.Metrics.Tests.csproj similarity index 69% rename from tests/FluxFlow.Components.Metrics.Tests/FluxFlow.Components.Metrics.Tests.csproj rename to tests/Unit/Components/Metrics/FluxFlow.Components.Metrics.Tests/FluxFlow.Components.Metrics.Tests.csproj index f4d4d867..b732bba6 100644 --- a/tests/FluxFlow.Components.Metrics.Tests/FluxFlow.Components.Metrics.Tests.csproj +++ b/tests/Unit/Components/Metrics/FluxFlow.Components.Metrics.Tests/FluxFlow.Components.Metrics.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,8 +6,8 @@ - - + + diff --git a/tests/FluxFlow.Components.Metrics.Tests/MetricsAggregateNodeTests.cs b/tests/Unit/Components/Metrics/FluxFlow.Components.Metrics.Tests/MetricsAggregateNodeTests.cs similarity index 76% rename from tests/FluxFlow.Components.Metrics.Tests/MetricsAggregateNodeTests.cs rename to tests/Unit/Components/Metrics/FluxFlow.Components.Metrics.Tests/MetricsAggregateNodeTests.cs index 4b14c661..b0b2946b 100644 --- a/tests/FluxFlow.Components.Metrics.Tests/MetricsAggregateNodeTests.cs +++ b/tests/Unit/Components/Metrics/FluxFlow.Components.Metrics.Tests/MetricsAggregateNodeTests.cs @@ -24,7 +24,7 @@ public async Task Samples_emit_ordered_snapshots_with_groups_rates_and_lineage() GroupByTag = "topic" }); var results = Link(node.Output); - var first = FlowMessage.Create( + var first = MetricMessage( new MetricSampleInput { Timestamp = start, @@ -37,7 +37,7 @@ public async Task Samples_emit_ordered_snapshots_with_groups_rates_and_lineage() { ["tenant"] = "north" }); - var second = FlowMessage.Create(new MetricSampleInput + var second = MetricMessage(new MetricSampleInput { Timestamp = start.AddSeconds(1), Name = "messages", @@ -56,9 +56,9 @@ public async Task Samples_emit_ordered_snapshots_with_groups_rates_and_lineage() firstResult.TraceId.ShouldBe(first.TraceId); firstResult.CausationId.ShouldBe(first.MessageId); firstResult.Headers.ShouldBeSameAs(first.Headers); - firstResult.Value.ShouldNotBeNull().SampleCount.ShouldBe(1); + firstResult.Value.Deserialize()!.SampleCount.ShouldBe(1); - var snapshot = secondResult.Value.ShouldNotBeNull(); + var snapshot = secondResult.Value!.Deserialize()!; snapshot.SampleCount.ShouldBe(2); snapshot.ValueCount.ShouldBe(2); snapshot.TotalValue.ShouldBe(6); @@ -73,10 +73,10 @@ public async Task Invalid_sample_is_normal_failure_and_later_sample_continues() { await using var node = new MetricsAggregateNode(); var results = Link(node.Output); - var bad = FlowMessage.Create( + var bad = MetricMessage( new MetricSampleInput { Size = -1 }, new CorrelationId("bad")); - var good = FlowMessage.Create( + var good = MetricMessage( new MetricSampleInput { Size = 3 }, new CorrelationId("good")); @@ -93,7 +93,7 @@ public async Task Invalid_sample_is_normal_failure_and_later_sample_continues() failure.Error.Details!.Value.GetProperty("legacyCode").GetInt32() .ShouldBe(MetricsErrorCodes.InvalidSample); success.CorrelationId.ShouldBe(good.CorrelationId); - success.Value.ShouldNotBeNull().TotalSize.ShouldBe(3); + success.Value!.Deserialize()!.TotalSize.ShouldBe(3); } [Fact] @@ -104,11 +104,11 @@ public async Task Group_limit_failure_carries_updated_global_snapshot() MaxGroups = 1 }); var results = Link(node.Output); - var rejected = FlowMessage.Create( + var rejected = MetricMessage( new MetricSampleInput { Group = "b", Value = 2 }, new CorrelationId("rejected")); - await node.Input.SendAsync(FlowMessage.Create( + await node.Input.SendAsync(MetricMessage( new MetricSampleInput { Group = "a", Value = 1 })); await node.Input.SendAsync(rejected); @@ -131,11 +131,11 @@ public async Task Every_sample_for_an_untracked_group_is_reported_as_partial() }); var results = Link(node.Output); - await node.Input.SendAsync(FlowMessage.Create( + await node.Input.SendAsync(MetricMessage( new MetricSampleInput { Group = "a", Value = 1 })); - await node.Input.SendAsync(FlowMessage.Create( + await node.Input.SendAsync(MetricMessage( new MetricSampleInput { Group = "b", Value = 2 })); - await node.Input.SendAsync(FlowMessage.Create( + await node.Input.SendAsync(MetricMessage( new MetricSampleInput { Group = "b", Value = 3 })); await results.ReceiveAsync().WaitAsync(Timeout); @@ -157,8 +157,8 @@ public async Task Coalesced_mode_emits_group_failure_then_one_final_snapshot() MaxGroups = 1 }); var results = Link(node.Output); - var first = FlowMessage.Create(new MetricSampleInput { Group = "a", Value = 1 }); - var last = FlowMessage.Create( + var first = MetricMessage(new MetricSampleInput { Group = "a", Value = 1 }); + var last = MetricMessage( new MetricSampleInput { Group = "b", Value = 2 }, new CorrelationId("last")); @@ -175,7 +175,7 @@ public async Task Coalesced_mode_emits_group_failure_then_one_final_snapshot() final.CorrelationId.ShouldBe(last.CorrelationId); final.TraceId.ShouldBe(last.TraceId); final.CausationId.ShouldBe(last.MessageId); - final.Value.ShouldNotBeNull().TotalValue.ShouldBe(3); + final.Value.Deserialize()!.TotalValue.ShouldBe(3); results.TryReceive(out _).ShouldBeFalse(); } @@ -189,47 +189,30 @@ public async Task Missing_timestamp_uses_clock_and_coalesced_completion_is_exact clock); var results = Link(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new MetricSampleInput { Value = 1 })); + await node.Input.SendAsync(MetricMessage(new MetricSampleInput { Value = 1 })); node.Complete(); await node.Completion.WaitAsync(Timeout); var result = await results.ReceiveAsync().WaitAsync(Timeout); result.IsError.ShouldBeFalse(); - var snapshot = result.Value.ShouldNotBeNull(); + var snapshot = result.Value.Deserialize()!; snapshot.Timestamp.ShouldBe(timestamp); snapshot.Latest.ShouldNotBeNull().Timestamp.ShouldBe(timestamp); results.TryReceive(out _).ShouldBeFalse(); } - [Theory] - [InlineData(double.NaN)] - [InlineData(double.PositiveInfinity)] - [InlineData(double.NegativeInfinity)] - public async Task Non_finite_values_are_normal_invalid_sample_results(double value) - { - await using var node = new MetricsAggregateNode(); - var results = Link(node.Output); - - await node.Input.SendAsync(FlowMessage.Create(new MetricSampleInput { Value = value })); - - var failure = await results.ReceiveAsync().WaitAsync(Timeout); - failure.IsError.ShouldBeTrue(); - failure.Error.ShouldNotBeNull().Code - .ShouldBe(MetricsErrorCodeNames.InvalidSample); - } - [Fact] public async Task Missing_sample_is_normal_failure() { await using var node = new MetricsAggregateNode(); var results = Link(node.Output); - await node.Input.SendAsync(FlowMessage.Create(null!)); + await node.Input.SendAsync(FlowMessage.Create(FlowValue.Null)); var failure = await results.ReceiveAsync().WaitAsync(Timeout); failure.IsError.ShouldBeTrue(); failure.Error.ShouldNotBeNull().Code - .ShouldBe(MetricsErrorCodeNames.InvalidSample); + .ShouldBe("metrics.sample.invalid_shape"); } [Fact] @@ -239,12 +222,12 @@ public async Task Output_fans_out_each_result_to_every_consumer() var first = Link(node.Output); var second = Link(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new MetricSampleInput { Value = 1 })); + await node.Input.SendAsync(MetricMessage(new MetricSampleInput { Value = 1 })); - (await first.ReceiveAsync().WaitAsync(Timeout)).Value - .ShouldNotBeNull().SampleCount.ShouldBe(1); - (await second.ReceiveAsync().WaitAsync(Timeout)).Value - .ShouldNotBeNull().SampleCount.ShouldBe(1); + (await first.ReceiveAsync().WaitAsync(Timeout)).Value! + .Deserialize()!.SampleCount.ShouldBe(1); + (await second.ReceiveAsync().WaitAsync(Timeout)).Value! + .Deserialize()!.SampleCount.ShouldBe(1); } [Fact] @@ -256,7 +239,7 @@ public async Task Paused_consumer_receives_every_snapshot_in_order() for (var index = 0; index < sampleCount; index++) { - await node.Input.SendAsync(FlowMessage.Create( + await node.Input.SendAsync(MetricMessage( new MetricSampleInput { Value = index })); } @@ -266,7 +249,7 @@ await node.Input.SendAsync(FlowMessage.Create( for (var index = 0; index < sampleCount; index++) { counts.Add((await results.ReceiveAsync().WaitAsync(Timeout)) - .Value.ShouldNotBeNull().SampleCount); + .Value!.Deserialize()!.SampleCount); } await node.Completion.WaitAsync(Timeout); @@ -284,14 +267,14 @@ public async Task Snapshot_timestamp_trims_inactive_group_rates() }); var results = Link(node.Output); - await node.Input.SendAsync(FlowMessage.Create( + await node.Input.SendAsync(MetricMessage( new MetricSampleInput { Timestamp = start, Group = "a" })); - await node.Input.SendAsync(FlowMessage.Create( + await node.Input.SendAsync(MetricMessage( new MetricSampleInput { Timestamp = start.AddSeconds(3), Group = "b" })); await results.ReceiveAsync().WaitAsync(Timeout); var snapshot = (await results.ReceiveAsync().WaitAsync(Timeout)) - .Value.ShouldNotBeNull(); + .Value!.Deserialize()!; snapshot.Groups["a"].CurrentRate.ShouldBe(0); snapshot.Groups["b"].CurrentRate.ShouldBe(0.5); snapshot.CurrentRate.ShouldBe(0.5); @@ -311,10 +294,10 @@ public async Task Missing_values_follow_zero_aggregation_option( }); var results = Link(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new MetricSampleInput())); + await node.Input.SendAsync(MetricMessage(new MetricSampleInput())); var snapshot = (await results.ReceiveAsync().WaitAsync(Timeout)) - .Value.ShouldNotBeNull(); + .Value!.Deserialize()!; snapshot.SampleCount.ShouldBe(1); snapshot.ValueCount.ShouldBe(expectedValueCount); snapshot.TotalValue.ShouldBe(expectedTotal); @@ -330,11 +313,11 @@ public async Task Missing_group_tag_uses_default_group() }); var results = Link(node.Output); - await node.Input.SendAsync(FlowMessage.Create( + await node.Input.SendAsync(MetricMessage( new MetricSampleInput { Tags = null! })); (await results.ReceiveAsync().WaitAsync(Timeout)) - .Value.ShouldNotBeNull().Groups.Keys.ShouldBe(["default"]); + .Value!.Deserialize()!.Groups.Keys.ShouldBe(["default"]); } [Fact] @@ -345,14 +328,14 @@ public async Task Rejected_group_tracking_is_capped_in_partial_result_details() MaxGroups = 1 }); var results = Link(node.Output); - await node.Input.SendAsync(FlowMessage.Create( + await node.Input.SendAsync(MetricMessage( new MetricSampleInput { Group = "tracked" })); await results.ReceiveAsync().WaitAsync(Timeout); - FlowMessage? last = null; + FlowMessage? last = null; for (var index = 0; index < 1025; index++) { - await node.Input.SendAsync(FlowMessage.Create( + await node.Input.SendAsync(MetricMessage( new MetricSampleInput { Group = $"rejected-{index}" })); last = await results.ReceiveAsync().WaitAsync(Timeout); } @@ -367,7 +350,7 @@ public async Task Unlinked_output_completes_cleanly() { await using var node = new MetricsAggregateNode(); - await node.Input.SendAsync(FlowMessage.Create( + await node.Input.SendAsync(MetricMessage( new MetricSampleInput { Value = 1, Size = 10 })); node.Complete(); @@ -375,6 +358,38 @@ await node.Input.SendAsync(FlowMessage.Create( node.Completion.IsFaulted.ShouldBeFalse(); } + [Fact] + public async Task Aggregate_rejects_malformed_value_without_faulting_and_accepts_later_input() + { + await using var node = new MetricsAggregateNode(); + var output = Link(node.Output); + var events = Link(node.Events); + + await node.Input.SendAsync(FlowMessage.Create(FlowValue.From("invalid"))); + await node.Input.SendAsync(MetricMessage(new MetricSampleInput { Value = 3 })); + + var rejection = await output.ReceiveAsync().WaitAsync(Timeout); + rejection.IsError.ShouldBeTrue(); + (await events.ReceiveAsync().WaitAsync(Timeout)).ToFlowEvent().Name + .ShouldBe("metrics.aggregate.rejected"); + var success = await output.ReceiveAsync().WaitAsync(Timeout); + success.Value!.Deserialize()!.TotalValue.ShouldBe(3); + node.Completion.IsFaulted.ShouldBeFalse(); + } + + private static FlowMessage MetricMessage( + MetricSampleInput input, + CorrelationId? correlationId = null, + TraceId? traceId = null, + IReadOnlyDictionary? headers = null, + MessageId? causationId = null) + => FlowMessage.Create( + FlowValue.From(input), + correlationId, + traceId, + headers, + causationId); + private static BufferBlock Link(ISourceBlock source) { var buffer = new BufferBlock(); diff --git a/tests/FluxFlow.Components.Metrics.Tests/MetricsContractTests.cs b/tests/Unit/Components/Metrics/FluxFlow.Components.Metrics.Tests/MetricsContractTests.cs similarity index 100% rename from tests/FluxFlow.Components.Metrics.Tests/MetricsContractTests.cs rename to tests/Unit/Components/Metrics/FluxFlow.Components.Metrics.Tests/MetricsContractTests.cs diff --git a/tests/FluxFlow.Components.Metrics.Tests/MetricsOptionsTests.cs b/tests/Unit/Components/Metrics/FluxFlow.Components.Metrics.Tests/MetricsOptionsTests.cs similarity index 100% rename from tests/FluxFlow.Components.Metrics.Tests/MetricsOptionsTests.cs rename to tests/Unit/Components/Metrics/FluxFlow.Components.Metrics.Tests/MetricsOptionsTests.cs diff --git a/tests/FluxFlow.Components.Mqtt.Adapters.Tests/FluxFlow.Components.Mqtt.Adapters.Tests.csproj b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Adapters.Tests/FluxFlow.Components.Mqtt.Adapters.Tests.csproj similarity index 67% rename from tests/FluxFlow.Components.Mqtt.Adapters.Tests/FluxFlow.Components.Mqtt.Adapters.Tests.csproj rename to tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Adapters.Tests/FluxFlow.Components.Mqtt.Adapters.Tests.csproj index 418186ef..1fc365dc 100644 --- a/tests/FluxFlow.Components.Mqtt.Adapters.Tests/FluxFlow.Components.Mqtt.Adapters.Tests.csproj +++ b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Adapters.Tests/FluxFlow.Components.Mqtt.Adapters.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,8 +6,8 @@ - - + + diff --git a/tests/FluxFlow.Components.Mqtt.Adapters.Tests/MqttAdapterRegistrationTests.cs b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Adapters.Tests/MqttAdapterRegistrationTests.cs similarity index 100% rename from tests/FluxFlow.Components.Mqtt.Adapters.Tests/MqttAdapterRegistrationTests.cs rename to tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Adapters.Tests/MqttAdapterRegistrationTests.cs diff --git a/tests/FluxFlow.Components.Mqtt.Adapters.Tests/MqttTransportAdapterConformanceTests.cs b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Adapters.Tests/MqttTransportAdapterConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Components.Mqtt.Adapters.Tests/MqttTransportAdapterConformanceTests.cs rename to tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Adapters.Tests/MqttTransportAdapterConformanceTests.cs diff --git a/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Composition.Tests/FluxFlow.Components.Mqtt.Composition.Tests.csproj b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Composition.Tests/FluxFlow.Components.Mqtt.Composition.Tests.csproj new file mode 100644 index 00000000..85222181 --- /dev/null +++ b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Composition.Tests/FluxFlow.Components.Mqtt.Composition.Tests.csproj @@ -0,0 +1,28 @@ + + + + net10.0 + false + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/FluxFlow.Components.Mqtt.Composition.Tests/MqttApplicationDefinitionAuthoringTests.cs b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Composition.Tests/MqttApplicationDefinitionAuthoringTests.cs similarity index 98% rename from tests/FluxFlow.Components.Mqtt.Composition.Tests/MqttApplicationDefinitionAuthoringTests.cs rename to tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Composition.Tests/MqttApplicationDefinitionAuthoringTests.cs index 1af42d10..adab6023 100644 --- a/tests/FluxFlow.Components.Mqtt.Composition.Tests/MqttApplicationDefinitionAuthoringTests.cs +++ b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Composition.Tests/MqttApplicationDefinitionAuthoringTests.cs @@ -107,7 +107,7 @@ public void Typed_mqtt_authoring_projects_resources_components_options_and_ports var outcome = workflow.AddComponent("Outcome", "sample.outcome"); workflow.Connect( receive.Output, - handler.Input("Input")); + handler.Input("Input")); workflow.Connect(outcome.Output("Ack"), receive.Ack); workflow.Connect(outcome.Output("Nak"), receive.Nak, "failed == true"); @@ -138,10 +138,10 @@ public void Typed_mqtt_authoring_projects_resources_components_options_and_ports publish.Output.Address.Value.ShouldBe("Main.Publish.Output"); receive.Ack.Address.Value.ShouldBe("Main.Receive.Ack"); receive.Nak.Address.Value.ShouldBe("Main.Receive.Nak"); - InputPortHandle commandInput = command.Input; - OutputPortHandle commandOutput = command.Output; - OutputPortHandle receiveOutput = receive.Output; - OutputPortHandle eventsOutput = events.Output; + InputPortHandle commandInput = command.Input; + OutputPortHandle commandOutput = command.Output; + OutputPortHandle receiveOutput = receive.Output; + OutputPortHandle eventsOutput = events.Output; commandInput.Address.Value.ShouldBe("Main.Command.Input"); commandOutput.Address.Value.ShouldBe("Main.Command.Output"); receiveOutput.Address.Value.ShouldBe("Main.Receive.Output"); @@ -245,7 +245,7 @@ public void Typed_mqtt_authoring_projects_resources_components_options_and_ports definition.Links.Count.ShouldBe(3); definition.Links[0].Source.ShouldBe(receive.Output.Address); definition.Links[0].Target.ShouldBe(handler.Input("Input").Address); - definition.Links[0].MessageType.ShouldBe(typeof(MqttReceivedApplicationMessage)); + definition.Links[0].MessageType.ShouldBe(typeof(FlowValue)); definition.Links[0].IsConditional.ShouldBeFalse(); definition.Links[1].Source.ShouldBe(outcome.Output("Ack").Address); definition.Links[1].Target.ShouldBe(receive.Ack.Address); diff --git a/tests/FluxFlow.Components.Mqtt.Composition.Tests/MqttFluentCaptureAuthoringTests.cs b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Composition.Tests/MqttFluentCaptureAuthoringTests.cs similarity index 100% rename from tests/FluxFlow.Components.Mqtt.Composition.Tests/MqttFluentCaptureAuthoringTests.cs rename to tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Composition.Tests/MqttFluentCaptureAuthoringTests.cs diff --git a/tests/FluxFlow.Components.Mqtt.Composition.Tests/MqttServiceCollectionExtensionsTests.cs b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Composition.Tests/MqttServiceCollectionExtensionsTests.cs similarity index 99% rename from tests/FluxFlow.Components.Mqtt.Composition.Tests/MqttServiceCollectionExtensionsTests.cs rename to tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Composition.Tests/MqttServiceCollectionExtensionsTests.cs index df7b9936..737e7ae7 100644 --- a/tests/FluxFlow.Components.Mqtt.Composition.Tests/MqttServiceCollectionExtensionsTests.cs +++ b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Composition.Tests/MqttServiceCollectionExtensionsTests.cs @@ -20,6 +20,8 @@ using System.Text.Json; using Xunit; +using FluxFlow.Data; + namespace FluxFlow.Components.Mqtt.Composition.Tests; public sealed class MqttServiceCollectionExtensionsTests @@ -38,29 +40,29 @@ public void AddMqtt_registers_four_vnext_contracts() MqttComponentDefinition.Types.Publish, MqttComponentDefinition.Types.Trigger ], ignoreOrder: false); - AssertMessagePort( + AssertFlowValuePort( registry.Components[MqttComponentDefinition.Types.Control].Inputs, MqttComponentDefinition.Ports.Input); - AssertMessagePort( + AssertFlowValuePort( registry.Components[MqttComponentDefinition.Types.Control].Outputs, MqttComponentDefinition.Ports.Output); - AssertMessagePort( + AssertFlowValuePort( registry.Components[MqttComponentDefinition.Types.Publish].Inputs, MqttComponentDefinition.Ports.Input); - AssertMessagePort( + AssertFlowValuePort( registry.Components[MqttComponentDefinition.Types.Publish].Outputs, MqttComponentDefinition.Ports.Output); var trigger = registry.Components[MqttComponentDefinition.Types.Trigger]; AssertSignalPort(trigger.Inputs, MqttComponentDefinition.Ports.Ack); AssertSignalPort(trigger.Inputs, MqttComponentDefinition.Ports.Nak); - AssertMessagePort( + AssertFlowValuePort( trigger.Outputs, MqttComponentDefinition.Ports.Output); var events = registry.Components[MqttComponentDefinition.Types.Events]; events.Inputs.ShouldBeEmpty(); - AssertMessagePort(events.Outputs, MqttComponentDefinition.Ports.Output); + AssertFlowValuePort(events.Outputs, MqttComponentDefinition.Ports.Output); registry.TryGetDescriptor("mqtt.control", out _).ShouldBeFalse(); registry.TryGetDescriptor("mqtt.trigger", out _).ShouldBeFalse(); @@ -1064,12 +1066,12 @@ private static IReadOnlyDictionary DesignMetada services => services.AddFluxFlowComponents().AddMqtt()).All .ToDictionary(metadata => metadata.Type.Value, StringComparer.Ordinal); - private static void AssertMessagePort( + private static void AssertFlowValuePort( IReadOnlyDictionary ports, string name) { ports[name].Kind.ShouldBe(ComponentPortKind.Message); - ports[name].MessageType.ShouldBe(typeof(T)); + ports[name].MessageType.ShouldBe(typeof(FlowValue)); } private static void AssertSignalPort( diff --git a/tests/FluxFlow.Components.Mqtt.MqttNet.Tests/FluxFlow.Components.Mqtt.MqttNet.Tests.csproj b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.MqttNet.Tests/FluxFlow.Components.Mqtt.MqttNet.Tests.csproj similarity index 75% rename from tests/FluxFlow.Components.Mqtt.MqttNet.Tests/FluxFlow.Components.Mqtt.MqttNet.Tests.csproj rename to tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.MqttNet.Tests/FluxFlow.Components.Mqtt.MqttNet.Tests.csproj index f9f585de..ad336a9c 100644 --- a/tests/FluxFlow.Components.Mqtt.MqttNet.Tests/FluxFlow.Components.Mqtt.MqttNet.Tests.csproj +++ b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.MqttNet.Tests/FluxFlow.Components.Mqtt.MqttNet.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,7 +6,7 @@ - + diff --git a/tests/FluxFlow.Components.Mqtt.MqttNet.Tests/MqttNetMessageMapperTests.cs b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.MqttNet.Tests/MqttNetMessageMapperTests.cs similarity index 100% rename from tests/FluxFlow.Components.Mqtt.MqttNet.Tests/MqttNetMessageMapperTests.cs rename to tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.MqttNet.Tests/MqttNetMessageMapperTests.cs diff --git a/tests/FluxFlow.Components.Mqtt.MqttNet.Tests/MqttNetTransportSessionTests.cs b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.MqttNet.Tests/MqttNetTransportSessionTests.cs similarity index 100% rename from tests/FluxFlow.Components.Mqtt.MqttNet.Tests/MqttNetTransportSessionTests.cs rename to tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.MqttNet.Tests/MqttNetTransportSessionTests.cs diff --git a/tests/FluxFlow.Components.Mqtt.MqttNet.Tests/VNextRecordingMqttNetClient.cs b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.MqttNet.Tests/VNextRecordingMqttNetClient.cs similarity index 100% rename from tests/FluxFlow.Components.Mqtt.MqttNet.Tests/VNextRecordingMqttNetClient.cs rename to tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.MqttNet.Tests/VNextRecordingMqttNetClient.cs diff --git a/tests/FluxFlow.Components.Mqtt.PulseMqtt.Tests/FluxFlow.Components.Mqtt.PulseMqtt.Tests.csproj b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt.Tests/FluxFlow.Components.Mqtt.PulseMqtt.Tests.csproj similarity index 76% rename from tests/FluxFlow.Components.Mqtt.PulseMqtt.Tests/FluxFlow.Components.Mqtt.PulseMqtt.Tests.csproj rename to tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt.Tests/FluxFlow.Components.Mqtt.PulseMqtt.Tests.csproj index b26fdea2..e832a66a 100644 --- a/tests/FluxFlow.Components.Mqtt.PulseMqtt.Tests/FluxFlow.Components.Mqtt.PulseMqtt.Tests.csproj +++ b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt.Tests/FluxFlow.Components.Mqtt.PulseMqtt.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,7 +6,7 @@ - + diff --git a/tests/FluxFlow.Components.Mqtt.PulseMqtt.Tests/PulseMqttMessageMapperTests.cs b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt.Tests/PulseMqttMessageMapperTests.cs similarity index 100% rename from tests/FluxFlow.Components.Mqtt.PulseMqtt.Tests/PulseMqttMessageMapperTests.cs rename to tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt.Tests/PulseMqttMessageMapperTests.cs diff --git a/tests/FluxFlow.Components.Mqtt.PulseMqtt.Tests/PulseMqttTransportSessionTests.cs b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt.Tests/PulseMqttTransportSessionTests.cs similarity index 100% rename from tests/FluxFlow.Components.Mqtt.PulseMqtt.Tests/PulseMqttTransportSessionTests.cs rename to tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.PulseMqtt.Tests/PulseMqttTransportSessionTests.cs diff --git a/tests/FluxFlow.Components.Mqtt.Tests/FluxFlow.Components.Mqtt.Tests.csproj b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/FluxFlow.Components.Mqtt.Tests.csproj similarity index 70% rename from tests/FluxFlow.Components.Mqtt.Tests/FluxFlow.Components.Mqtt.Tests.csproj rename to tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/FluxFlow.Components.Mqtt.Tests.csproj index 4a6fa986..d9715e64 100644 --- a/tests/FluxFlow.Components.Mqtt.Tests/FluxFlow.Components.Mqtt.Tests.csproj +++ b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/FluxFlow.Components.Mqtt.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,8 +6,8 @@ - - + + diff --git a/tests/FluxFlow.Components.Mqtt.Tests/MqttBrokerConfigurationTests.cs b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/MqttBrokerConfigurationTests.cs similarity index 100% rename from tests/FluxFlow.Components.Mqtt.Tests/MqttBrokerConfigurationTests.cs rename to tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/MqttBrokerConfigurationTests.cs diff --git a/tests/FluxFlow.Components.Mqtt.Tests/MqttClientControllerTests.cs b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/MqttClientControllerTests.cs similarity index 90% rename from tests/FluxFlow.Components.Mqtt.Tests/MqttClientControllerTests.cs rename to tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/MqttClientControllerTests.cs index 37e0ab96..569ebaa6 100644 --- a/tests/FluxFlow.Components.Mqtt.Tests/MqttClientControllerTests.cs +++ b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/MqttClientControllerTests.cs @@ -207,21 +207,21 @@ await Task.Delay( }); var output = MqttTestContext.Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new MqttPublishClientRequest + await node.Input.SendAsync(MqttRequest(new MqttPublishClientRequest { Message = Publish("events/first") })); - await node.Input.SendAsync(FlowMessage.Create(new MqttPublishClientRequest + await node.Input.SendAsync(MqttRequest(new MqttPublishClientRequest { Message = Publish("events/second") })); - var first = (await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5))).Value - .ShouldBeOfType(); - var second = (await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5))).Value - .ShouldBeOfType(); - first.Topic.ShouldBe("events/first"); - second.Topic.ShouldBe("events/second"); + var firstTopic = MqttResultTopic( + await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5))); + var secondTopic = MqttResultTopic( + await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5))); + firstTopic.ShouldBe("events/first"); + secondTopic.ShouldBe("events/second"); session.Published.Count.ShouldBe(2); } @@ -242,7 +242,7 @@ public async Task ControlNodeFansOutEveryOrderedResultToTwoSubscribers() var first = MqttTestContext.Sink(node.Output, propagateCompletion: true); var second = MqttTestContext.Sink(node.Output, propagateCompletion: true); var inputs = Enumerable.Range(1, 3) - .Select(index => FlowMessage.Create( + .Select(index => MqttRequest( new MqttPublishClientRequest { Message = Publish($"events/{index}") @@ -260,11 +260,9 @@ public async Task ControlNodeFansOutEveryOrderedResultToTwoSubscribers() await node.Completion.WaitAsync(timeout); await Task.WhenAll(first.Completion, second.Completion).WaitAsync(timeout); - firstMessages.Select(static message => - message.Value.ShouldBeOfType().Topic) + firstMessages.Select(MqttResultTopic) .ShouldBe(["events/1", "events/2", "events/3"]); - secondMessages.Select(static message => - message.Value.ShouldBeOfType().Topic) + secondMessages.Select(MqttResultTopic) .ShouldBe(["events/1", "events/2", "events/3"]); firstMessages.Select(static message => message.MessageId) .ShouldBe(secondMessages.Select(static message => message.MessageId)); @@ -299,18 +297,18 @@ await Task.Delay( }); var output = MqttTestContext.Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new MqttPublishClientRequest + await node.Input.SendAsync(MqttRequest(new MqttPublishClientRequest { Message = Publish("events/first") })); - await node.Input.SendAsync(FlowMessage.Create(new MqttPublishClientRequest + await node.Input.SendAsync(MqttRequest(new MqttPublishClientRequest { Message = Publish("events/second") })); - var firstResult = (await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5))).Value - .ShouldBeOfType(); - firstResult.Topic.ShouldBe("events/second"); + var firstResultTopic = MqttResultTopic( + await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5))); + firstResultTopic.ShouldBe("events/second"); } [Fact] @@ -525,8 +523,9 @@ public async Task MissingNamedSubscriptionWaitsUntilControlAddsIt() await session.EmitAsync(Received("commands/two"), "delivery-2"); var received = await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5)); - received.Value.Topic.ShouldBe("commands/two"); - received.Value.MatchedSubscriptions.ShouldBe(["commands"]); + var receivedMessage = received.Value!.Deserialize()!; + receivedMessage.Topic.ShouldBe("commands/two"); + receivedMessage.MatchedSubscriptions.ShouldBe(["commands"]); } [Fact] @@ -678,7 +677,7 @@ public async Task AckSignalUsesTraceIdentityAndCompletesBrokerOutcomeOnce() await WaitUntilAsync(() => session.Acknowledged.Count == 1); session.Acknowledged.Single().Outcome.ShouldBe(MqttWorkflowOutcome.Ack); await WaitUntilAsync(() => events.TryReceiveAll(out var values) && - values.Any(@event => @event.Name == "mqtt.receive.outcome-ignored")); + values.Any(@event => @event.ToFlowEvent().Name == "mqtt.receive.outcome-ignored")); } [Fact] @@ -714,7 +713,7 @@ public async Task WorkflowOutcomeTimeoutCompletesBrokerOutcomeOnceAndRejectsLate session.Acknowledged.Single().Outcome.ShouldBe(MqttWorkflowOutcome.Timeout); (await trigger.Ack.SendAsync(FlowMessage.Create("late", traceId: received.TraceId))).ShouldBeTrue(); await WaitUntilAsync(() => events.TryReceiveAll(out var values) && - values.Any(@event => @event.Name == "mqtt.receive.outcome-ignored")); + values.Any(@event => @event.ToFlowEvent().Name == "mqtt.receive.outcome-ignored")); session.Acknowledged.Count.ShouldBe(1); } @@ -884,6 +883,50 @@ public async Task PublishUsesFlowContentExactBytes() session.Published.Single().Content.Bytes.ToArray().ShouldBe([1, 2, 3]); } + [Fact] + public async Task ControlNodeRejectsMalformedWorkflowValueInsideVisibleComponent() + { + var session = new VNextRecordingMqttTransportSession(); + await using var controller = CreateController(session); + await controller.StartAsync(); + await using var node = new MqttControlNode(controller); + var output = MqttTestContext.Sink(node.Output); + var events = MqttTestContext.Sink(node.Events); + var malformed = FlowMessage.Create(FlowValue.From(42)); + + (await node.Input.SendAsync(malformed)).ShouldBeTrue(); + + var failure = await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5)); + failure.IsError.ShouldBeTrue(); + failure.Error!.Code.ShouldBe("mqtt.command.invalid_shape"); + var @event = await events.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5)); + @event.ToFlowEvent().Name.ShouldBe("mqtt.command.rejected"); + @event.ToFlowEvent().Attributes["errorCode"].ShouldBe("mqtt.command.invalid_shape"); + session.Published.ShouldBeEmpty(); + } + + [Fact] + public async Task PublishNodeRejectsMalformedWorkflowValueInsideVisibleComponent() + { + var session = new VNextRecordingMqttTransportSession(); + await using var controller = CreateController(session); + await controller.StartAsync(); + await using var node = new MqttPublishOperationNode(controller); + var output = MqttTestContext.Sink(node.Output); + var events = MqttTestContext.Sink(node.Events); + var malformed = FlowMessage.Create(FlowValue.From(42)); + + (await node.Input.SendAsync(malformed)).ShouldBeTrue(); + + var failure = await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5)); + failure.IsError.ShouldBeTrue(); + failure.Error!.Code.ShouldBe("mqtt.publish.invalid_shape"); + var @event = await events.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5)); + @event.ToFlowEvent().Name.ShouldBe("mqtt.publish.rejected"); + @event.ToFlowEvent().Attributes["errorCode"].ShouldBe("mqtt.publish.invalid_shape"); + session.Published.ShouldBeEmpty(); + } + [Fact] public async Task PublishNodePreservesLineageAndContinuesAfterInvalidInput() { @@ -895,11 +938,11 @@ public async Task PublishNodePreservesLineageAndContinuesAfterInvalidInput() var correlationId = CorrelationId.New(); var traceId = TraceId.New(); var invalid = FlowMessage.Create( - new MqttPublishMessage + FlowValue.From(new MqttPublishMessage { Topic = "invalid/#", Content = FlowContent.FromBytes(new byte[] { 1 }) - }, + }), correlationId, traceId); @@ -911,10 +954,13 @@ public async Task PublishNodePreservesLineageAndContinuesAfterInvalidInput() failure.TraceId.ShouldBe(traceId); failure.CausationId.ShouldBe(invalid.MessageId); - var valid = FlowMessage.Create(Publish("events/valid"), correlationId, traceId); + var valid = FlowMessage.Create( + FlowValue.From(Publish("events/valid")), + correlationId, + traceId); (await node.Input.SendAsync(valid)).ShouldBeTrue(); var success = await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5)); - success.Value.ShouldBeOfType(); + MqttResultTopic(success).ShouldBe("events/valid"); success.CorrelationId.ShouldBe(correlationId); success.TraceId.ShouldBe(traceId); success.CausationId.ShouldBe(valid.MessageId); @@ -935,8 +981,8 @@ public async Task EventsNodeEmitsConnectionDomainEvents() await eventsNode.StartAsync(); var @event = await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5)); - @event.Value.ShouldBeOfType(); - @event.Value.Client.ShouldBe("client-1"); + var connected = @event.Value!.Deserialize()!; + connected.Client.ShouldBe("client-1"); } [Fact] @@ -1017,6 +1063,18 @@ public void RetryPolicySupportsFixedLinearAndExponentialSchedules() }.GetDelay(4).ShouldBe(TimeSpan.FromSeconds(8)); } + private static FlowMessage MqttRequest(MqttClientRequest request) + => FlowMessage.Create(FlowValue.From( + JsonSerializer.SerializeToElement( + request, + new JsonSerializerOptions(JsonSerializerDefaults.Web)))); + + private static string MqttResultTopic(FlowMessage message) + { + message.IsError.ShouldBeFalse(); + return message.Value.ToJsonElement().GetProperty("topic").GetString()!; + } + private static async Task ExecuteFailureAsync( MqttClientController controller, MqttClientRequest request) diff --git a/tests/FluxFlow.Components.Mqtt.Tests/MqttContractTests.cs b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/MqttContractTests.cs similarity index 100% rename from tests/FluxFlow.Components.Mqtt.Tests/MqttContractTests.cs rename to tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/MqttContractTests.cs diff --git a/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/MqttPublishMessageMaterializerTests.cs b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/MqttPublishMessageMaterializerTests.cs new file mode 100644 index 00000000..157504aa --- /dev/null +++ b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/MqttPublishMessageMaterializerTests.cs @@ -0,0 +1,43 @@ +using System.Text; +using FluxFlow.Components.Mqtt.Contracts; +using FluxFlow.Components.Mqtt.Materialization; +using FluxFlow.Data; +using Shouldly; +using Xunit; + +namespace FluxFlow.Components.Mqtt.Tests; + +public sealed class MqttPublishMessageMaterializerTests +{ + [Fact] + public void Materialize_accepts_a_structural_publish_request_and_normalizes_text_content() + { + var materializer = new MqttPublishMessageMaterializer(); + var value = FlowValue.From(new + { + topic = "orders/created", + content = "payload", + qos = 1, + retain = true + }); + + var result = materializer.Materialize(value); + + result.IsSuccess.ShouldBeTrue(); + result.Value.Topic.ShouldBe("orders/created"); + result.Value.Qos.ShouldBe(MqttQos.AtLeastOnce); + result.Value.Retain.ShouldBeTrue(); + result.Value.Content.ContentType.ShouldBe("text/plain"); + Encoding.UTF8.GetString(result.Value.Content.Bytes.ToArray()).ShouldBe("payload"); + } + + [Fact] + public void Materialize_rejects_a_non_object_with_mqtt_owned_error() + { + var result = new MqttPublishMessageMaterializer().Materialize(FlowValue.From(42)); + + result.IsSuccess.ShouldBeFalse(); + result.Error.ShouldNotBeNull().Code.ShouldBe("mqtt.publish.invalid_shape"); + result.Error.Category.ShouldBe("MQTT"); + } +} diff --git a/tests/FluxFlow.Components.Mqtt.Tests/MqttTestContext.cs b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/MqttTestContext.cs similarity index 100% rename from tests/FluxFlow.Components.Mqtt.Tests/MqttTestContext.cs rename to tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/MqttTestContext.cs diff --git a/tests/FluxFlow.Components.Mqtt.Tests/MqttTopicValidatorTests.cs b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/MqttTopicValidatorTests.cs similarity index 100% rename from tests/FluxFlow.Components.Mqtt.Tests/MqttTopicValidatorTests.cs rename to tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/MqttTopicValidatorTests.cs diff --git a/tests/FluxFlow.Components.Mqtt.Tests/TrackingFakeTimeProvider.cs b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/TrackingFakeTimeProvider.cs similarity index 100% rename from tests/FluxFlow.Components.Mqtt.Tests/TrackingFakeTimeProvider.cs rename to tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/TrackingFakeTimeProvider.cs diff --git a/tests/FluxFlow.Components.Mqtt.Tests/VNextRecordingMqttTransport.cs b/tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/VNextRecordingMqttTransport.cs similarity index 100% rename from tests/FluxFlow.Components.Mqtt.Tests/VNextRecordingMqttTransport.cs rename to tests/Unit/Components/Mqtt/FluxFlow.Components.Mqtt.Tests/VNextRecordingMqttTransport.cs diff --git a/tests/Unit/Components/Observability/FluxFlow.Components.Observability.Composition.Tests/FluxFlow.Components.Observability.Composition.Tests.csproj b/tests/Unit/Components/Observability/FluxFlow.Components.Observability.Composition.Tests/FluxFlow.Components.Observability.Composition.Tests.csproj new file mode 100644 index 00000000..99ee7287 --- /dev/null +++ b/tests/Unit/Components/Observability/FluxFlow.Components.Observability.Composition.Tests/FluxFlow.Components.Observability.Composition.Tests.csproj @@ -0,0 +1,31 @@ + + + + net10.0 + false + + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/FluxFlow.Components.Observability.Composition.Tests/ObservabilityServiceCollectionExtensionsTests.cs b/tests/Unit/Components/Observability/FluxFlow.Components.Observability.Composition.Tests/ObservabilityServiceCollectionExtensionsTests.cs similarity index 98% rename from tests/FluxFlow.Components.Observability.Composition.Tests/ObservabilityServiceCollectionExtensionsTests.cs rename to tests/Unit/Components/Observability/FluxFlow.Components.Observability.Composition.Tests/ObservabilityServiceCollectionExtensionsTests.cs index cb58215a..4ab6a2ee 100644 --- a/tests/FluxFlow.Components.Observability.Composition.Tests/ObservabilityServiceCollectionExtensionsTests.cs +++ b/tests/Unit/Components/Observability/FluxFlow.Components.Observability.Composition.Tests/ObservabilityServiceCollectionExtensionsTests.cs @@ -377,7 +377,7 @@ public async Task Hosted_logger_binds_options_and_resolves_selectors() entry.Level.ShouldBe(FlowLogLevel.Warning); entry.Category.ShouldBe("workflow.test"); entry.Message.ShouldBe("Observed alpha:3 #1"); - entry.Attributes["kind"].ShouldBe("alpha"); + entry.Attributes["kind"].ShouldBeOfType().GetString().ShouldBe("alpha"); } [Fact] @@ -542,13 +542,13 @@ await WithNodeAsync( ObservabilityComponentDefinition.Types.Logger, async ports => { - var eventReceive = ports.ReceiveAsync(Events, Timeout); + var eventReceive = ports.ReceiveAsync(Events, Timeout); var input = FlowMessage.Create(Json("item")); (await ports.SendAsync(Input, input)).IsAccepted.ShouldBeTrue(); var eventMessage = (await eventReceive).Message.ShouldNotBeNull(); eventMessage.CorrelationId.ShouldBe(input.CorrelationId); - eventMessage.Value.Name.ShouldBe(ObservabilityDiagnosticNames.LoggerEmitted); + eventMessage.ToFlowEvent().Name.ShouldBe(ObservabilityDiagnosticNames.LoggerEmitted); }); } @@ -577,10 +577,8 @@ private static void AssertMetadata( string nodeType) { var registration = registry.Components[nodeType]; - registration.Inputs[ObservabilityComponentDefinition.Ports.Input].MessageType - .ShouldBe(typeof(JsonElement)); - registration.Outputs[ObservabilityComponentDefinition.Ports.Output].MessageType - .ShouldBe(typeof(TOutput)); + registration.Inputs[ObservabilityComponentDefinition.Ports.Input].MessageType.ShouldBe(typeof(FlowValue)); + registration.Outputs[ObservabilityComponentDefinition.Ports.Output].MessageType.ShouldBe(typeof(FlowValue)); } private static Dictionary MetadataByType() @@ -604,13 +602,13 @@ private static void AssertPorts(ComponentDesignMetadata metadata, string outputT input.Name.Value.ShouldBe(ObservabilityComponentDefinition.Ports.Input); input.Direction.ShouldBe(PortDirection.Input); input.Order.ShouldBe(0); - input.ValueType?.Value.ShouldBe(nameof(JsonElement)); + input.ValueType?.Value.ShouldBe(nameof(FlowValue)); input.IsPrimary.ShouldBeTrue(); var output = metadata.Ports[1]; output.Name.Value.ShouldBe(ObservabilityComponentDefinition.Ports.Output); output.Direction.ShouldBe(PortDirection.Output); output.Order.ShouldBe(1); - output.ValueType?.Value.ShouldBe(outputType); + output.ValueType?.Value.ShouldBe(nameof(FlowValue)); output.IsPrimary.ShouldBeTrue(); } diff --git a/tests/FluxFlow.Components.Observability.Tests/FluxFlow.Components.Observability.Tests.csproj b/tests/Unit/Components/Observability/FluxFlow.Components.Observability.Tests/FluxFlow.Components.Observability.Tests.csproj similarity index 60% rename from tests/FluxFlow.Components.Observability.Tests/FluxFlow.Components.Observability.Tests.csproj rename to tests/Unit/Components/Observability/FluxFlow.Components.Observability.Tests/FluxFlow.Components.Observability.Tests.csproj index 1daa2eb7..48beb4a6 100644 --- a/tests/FluxFlow.Components.Observability.Tests/FluxFlow.Components.Observability.Tests.csproj +++ b/tests/Unit/Components/Observability/FluxFlow.Components.Observability.Tests/FluxFlow.Components.Observability.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,9 +6,9 @@ - - - + + + diff --git a/tests/FluxFlow.Components.Observability.Tests/ObservabilityNodeTests.cs b/tests/Unit/Components/Observability/FluxFlow.Components.Observability.Tests/ObservabilityNodeTests.cs similarity index 89% rename from tests/FluxFlow.Components.Observability.Tests/ObservabilityNodeTests.cs rename to tests/Unit/Components/Observability/FluxFlow.Components.Observability.Tests/ObservabilityNodeTests.cs index 8b9bcfee..fe8c0cf0 100644 --- a/tests/FluxFlow.Components.Observability.Tests/ObservabilityNodeTests.cs +++ b/tests/Unit/Components/Observability/FluxFlow.Components.Observability.Tests/ObservabilityNodeTests.cs @@ -22,7 +22,7 @@ public sealed class ObservabilityNodeTests public async Task Counter_emits_counted_and_rejected_snapshots_with_lineage() { var calls = 0; - await using var node = new FlowCounterNode( + await using var node = new FlowCounterNode( new FlowCounterOptions { Name = "accepted", Predicate = "enabled" }, new RecordingExpressionEngine((_, _, _) => ++calls > 1)); var results = Sink(node.Output); @@ -47,7 +47,7 @@ public async Task Counter_emits_counted_and_rejected_snapshots_with_lineage() public async Task Counter_predicate_failure_is_in_band_and_later_input_continues() { var calls = 0; - await using var node = new FlowCounterNode( + await using var node = new FlowCounterNode( new FlowCounterOptions { Predicate = "ok" }, new RecordingExpressionEngine((_, _, _) => { @@ -71,7 +71,7 @@ public async Task Counter_predicate_failure_is_in_band_and_later_input_continues [Fact] public async Task Counter_output_fans_out_every_snapshot() { - await using var node = new FlowCounterNode(new FlowCounterOptions()); + await using var node = new FlowCounterNode(new FlowCounterOptions()); var first = Sink(node.Output); var second = Sink(node.Output); @@ -88,7 +88,7 @@ public async Task Counter_output_fans_out_every_snapshot() public async Task Counter_without_predicate_uses_clock_and_emits_correlated_event() { var timestamp = new DateTimeOffset(2026, 7, 23, 12, 0, 0, TimeSpan.Zero); - await using var node = new FlowCounterNode( + await using var node = new FlowCounterNode( new FlowCounterOptions { Name = "items" }, clock: new FakeTimeProvider(timestamp)); var results = Sink(node.Output); @@ -102,16 +102,16 @@ public async Task Counter_without_predicate_uses_clock_and_emits_correlated_even snapshot.LastObservedAt.ShouldBe(timestamp); snapshot.InputType.ShouldBe(typeof(JsonElement).FullName); var @event = await events.ReceiveAsync().WaitAsync(Timeout); - @event.Name.ShouldBe(ObservabilityDiagnosticNames.CounterIncremented); + @event.ToFlowEvent().Name.ShouldBe(ObservabilityDiagnosticNames.CounterIncremented); @event.CorrelationId.ShouldBe(input.CorrelationId); - @event.Attributes["name"].ShouldBe("items"); - @event.Attributes["nodeType"].ShouldBe("metric.count"); + @event.ToFlowEvent().Attributes["name"].ShouldBe("items"); + @event.ToFlowEvent().Attributes["nodeType"].ShouldBe("metric.count"); } [Fact] public async Task Counter_uses_supplied_context_factory() { - await using var node = new FlowCounterNode( + await using var node = new FlowCounterNode( new FlowCounterOptions { Predicate = "accepted" }, new RecordingExpressionEngine((_, context, _) => context.Variables["accepted"]), new DelegateContextFactory(input => new FlowMapContext @@ -133,7 +133,7 @@ public async Task Counter_uses_supplied_context_factory() public async Task Logger_emits_typed_attributes_and_renders_template() { var timestamp = new DateTimeOffset(2026, 7, 19, 12, 0, 0, TimeSpan.Zero); - await using var node = new FlowLoggerNode( + await using var node = new FlowLoggerNode( new FlowLoggerOptions { Category = "workflow.test", @@ -161,7 +161,7 @@ public async Task Logger_emits_typed_attributes_and_renders_template() [Fact] public async Task Logger_selector_failure_is_an_in_band_error() { - await using var node = new FlowLoggerNode( + await using var node = new FlowLoggerNode( new FlowLoggerOptions { AttributeSelectors = ["good", "broken"] }, new Dictionary>(StringComparer.Ordinal) { @@ -184,7 +184,7 @@ public async Task Logger_selector_failure_is_an_in_band_error() [Fact] public async Task Logger_does_not_expand_substituted_placeholders_and_allows_no_selectors() { - await using var node = new FlowLoggerNode(new FlowLoggerOptions + await using var node = new FlowLoggerNode(new FlowLoggerOptions { Category = "workflow.test", MessageTemplate = "Observed {input}" @@ -199,9 +199,9 @@ public async Task Logger_does_not_expand_substituted_placeholders_and_allows_no_ entry.Message.ShouldBe("Observed {category}"); entry.Attributes.ShouldBeEmpty(); var @event = await events.ReceiveAsync().WaitAsync(Timeout); - @event.Name.ShouldBe(ObservabilityDiagnosticNames.LoggerEmitted); + @event.ToFlowEvent().Name.ShouldBe(ObservabilityDiagnosticNames.LoggerEmitted); @event.CorrelationId.ShouldBe(input.CorrelationId); - @event.Attributes["nodeType"].ShouldBe("log.write"); + @event.ToFlowEvent().Attributes["nodeType"].ShouldBe("log.write"); } [Fact] @@ -221,7 +221,7 @@ public async Task Logger_reuses_compiled_template_without_changing_literal_or_va ["nullValue"] = new DelegateSelector((_, _) => null), ["recursive"] = new DelegateSelector((_, _) => "{category}") }; - await using var node = new FlowLoggerNode( + await using var node = new FlowLoggerNode( new FlowLoggerOptions { Category = "workflow.test", @@ -259,7 +259,7 @@ public async Task Logger_reuses_compiled_template_without_changing_literal_or_va public async Task Metrics_size_failure_is_in_band_and_later_input_continues() { var calls = 0; - await using var node = new FlowMetricsNode( + await using var node = new FlowMetricsNode( new FlowMetricsOptions { Name = "items" }, new DelegateSelector((_, _) => { @@ -283,7 +283,7 @@ public async Task Metrics_size_failure_is_in_band_and_later_input_continues() [Fact] public async Task Metrics_non_finite_size_is_an_in_band_error() { - await using var node = new FlowMetricsNode( + await using var node = new FlowMetricsNode( new FlowMetricsOptions(), new DelegateSelector((_, _) => double.NaN)); var results = Sink(node.Output); @@ -300,7 +300,7 @@ public async Task Metrics_tracks_rate_and_averages_only_sized_observations() { var firstObservedAt = new DateTimeOffset(2026, 7, 23, 12, 0, 0, TimeSpan.Zero); var clock = new FakeTimeProvider(firstObservedAt); - await using var node = new FlowMetricsNode( + await using var node = new FlowMetricsNode( new FlowMetricsOptions { Name = "messages" }, new DelegateSelector((input, _) => input.GetProperty("size").ValueKind == JsonValueKind.Null @@ -326,33 +326,33 @@ public async Task Metrics_tracks_rate_and_averages_only_sized_observations() second.AverageRatePerSecond.ShouldBe(1d); var firstEvent = await events.ReceiveAsync().WaitAsync(Timeout); var secondEvent = await events.ReceiveAsync().WaitAsync(Timeout); - firstEvent.Name.ShouldBe(ObservabilityDiagnosticNames.MetricsObserved); + firstEvent.ToFlowEvent().Name.ShouldBe(ObservabilityDiagnosticNames.MetricsObserved); secondEvent.CorrelationId.ShouldBe(secondInput.CorrelationId); - secondEvent.Attributes["nodeType"].ShouldBe("metric.measure"); + secondEvent.ToFlowEvent().Attributes["nodeType"].ShouldBe("metric.measure"); } [Fact] public void Constructors_validate_required_dependencies_and_options() { - Should.Throw(() => new FlowCounterNode(null!)); - Should.Throw(() => new FlowLoggerNode(null!)); - Should.Throw(() => new FlowMetricsNode(null!)); - Should.Throw(() => new FlowCounterNode( + Should.Throw(() => new FlowCounterNode(null!)); + Should.Throw(() => new FlowLoggerNode(null!)); + Should.Throw(() => new FlowMetricsNode(null!)); + Should.Throw(() => new FlowCounterNode( new FlowCounterOptions { Predicate = "accepted" })); - Should.Throw(() => new FlowCounterNode( + Should.Throw(() => new FlowCounterNode( new FlowCounterOptions { BoundedCapacity = 0 })); - Should.Throw(() => new FlowLoggerNode( + Should.Throw(() => new FlowLoggerNode( new FlowLoggerOptions { BoundedCapacity = 0 })); - Should.Throw(() => new FlowMetricsNode( + Should.Throw(() => new FlowMetricsNode( new FlowMetricsOptions { BoundedCapacity = 0 })); - Should.Throw(() => new FlowLoggerNode( + Should.Throw(() => new FlowLoggerNode( new FlowLoggerOptions { Level = "unsupported" })); } [Fact] public async Task Normal_completion_drains_results_and_events() { - await using var node = new FlowMetricsNode(new FlowMetricsOptions()); + await using var node = new FlowMetricsNode(new FlowMetricsOptions()); var results = Sink(node.Output); var events = Sink(node.Events); @@ -361,7 +361,7 @@ public async Task Normal_completion_drains_results_and_events() await node.Completion.WaitAsync(Timeout); (await results.ReceiveAsync().WaitAsync(Timeout)).IsError.ShouldBeFalse(); - (await events.ReceiveAsync().WaitAsync(Timeout)).Name + (await events.ReceiveAsync().WaitAsync(Timeout)).ToFlowEvent().Name .ShouldBe(ObservabilityDiagnosticNames.MetricsObserved); results.TryReceive(out _).ShouldBeFalse(); events.TryReceive(out _).ShouldBeFalse(); diff --git a/tests/FluxFlow.Components.Observability.Tests/RecordingExpressionEngine.cs b/tests/Unit/Components/Observability/FluxFlow.Components.Observability.Tests/RecordingExpressionEngine.cs similarity index 100% rename from tests/FluxFlow.Components.Observability.Tests/RecordingExpressionEngine.cs rename to tests/Unit/Components/Observability/FluxFlow.Components.Observability.Tests/RecordingExpressionEngine.cs diff --git a/tests/Unit/Components/Payloads/FluxFlow.Components.Payloads.Composition.Tests/FluxFlow.Components.Payloads.Composition.Tests.csproj b/tests/Unit/Components/Payloads/FluxFlow.Components.Payloads.Composition.Tests/FluxFlow.Components.Payloads.Composition.Tests.csproj new file mode 100644 index 00000000..5c29d7ba --- /dev/null +++ b/tests/Unit/Components/Payloads/FluxFlow.Components.Payloads.Composition.Tests/FluxFlow.Components.Payloads.Composition.Tests.csproj @@ -0,0 +1,29 @@ + + + + net10.0 + false + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/FluxFlow.Components.Payloads.Composition.Tests/PayloadsServiceCollectionExtensionsTests.cs b/tests/Unit/Components/Payloads/FluxFlow.Components.Payloads.Composition.Tests/PayloadsServiceCollectionExtensionsTests.cs similarity index 95% rename from tests/FluxFlow.Components.Payloads.Composition.Tests/PayloadsServiceCollectionExtensionsTests.cs rename to tests/Unit/Components/Payloads/FluxFlow.Components.Payloads.Composition.Tests/PayloadsServiceCollectionExtensionsTests.cs index 9adb2269..67cd40f4 100644 --- a/tests/FluxFlow.Components.Payloads.Composition.Tests/PayloadsServiceCollectionExtensionsTests.cs +++ b/tests/Unit/Components/Payloads/FluxFlow.Components.Payloads.Composition.Tests/PayloadsServiceCollectionExtensionsTests.cs @@ -38,10 +38,8 @@ public void AddPayloads_registers_canonical_content_result_metadata() services => services.AddFluxFlowComponents().AddPayloads()); var registration = registry.Components[PayloadsComponentDefinition.Types.Inspect]; - registration.Inputs[PayloadsComponentDefinition.Ports.Input].MessageType - .ShouldBe(typeof(FlowContent)); - registration.Outputs[PayloadsComponentDefinition.Ports.Output].MessageType - .ShouldBe(typeof(PayloadInspectionResult)); + registration.Inputs[PayloadsComponentDefinition.Ports.Input].MessageType.ShouldBe(typeof(FlowValue)); + registration.Outputs[PayloadsComponentDefinition.Ports.Output].MessageType.ShouldBe(typeof(FlowValue)); } [Fact] @@ -71,14 +69,14 @@ public void Design_metadata_provider_describes_canonical_payload_ports() input.Name.Value.ShouldBe(PayloadsComponentDefinition.Ports.Input); input.Direction.ShouldBe(PortDirection.Input); input.Order.ShouldBe(0); - input.ValueType?.Value.ShouldBe(nameof(FlowContent)); + input.ValueType?.Value.ShouldBe(nameof(FlowValue)); input.IsPrimary.ShouldBeTrue(); var output = metadata.Ports[1]; output.Name.Value.ShouldBe(PayloadsComponentDefinition.Ports.Output); output.Direction.ShouldBe(PortDirection.Output); output.Order.ShouldBe(1); - output.ValueType?.Value.ShouldBe("PayloadInspectionResult"); + output.ValueType?.Value.ShouldBe(nameof(FlowValue)); output.IsPrimary.ShouldBeTrue(); } @@ -158,8 +156,11 @@ public async Task Hosted_payload_inspect_classifies_json_and_preserves_content() result.CorrelationId.ShouldBe(new CorrelationId("payload.inspect")); result.IsError.ShouldBeFalse(); - var inspection = result.Value; - inspection.Content.ShouldBeSameAs(content); + var inspection = result.Value.ShouldNotBeNull(); + var inspectedContent = inspection.Content.ShouldNotBeNull(); + inspectedContent.ContentType.ShouldBe(content.ContentType); + inspectedContent.Encoding.ShouldBe(content.Encoding); + inspectedContent.Bytes.ToArray().ShouldBe(content.Bytes.ToArray()); inspection.Kind.ShouldBe(PayloadKind.JsonObject); inspection.TextPreview.ShouldNotBeNull().ShouldContain("\"name\""); inspection.FormattedPreview.ShouldNotBeNull().ShouldContain("\n"); @@ -240,12 +241,12 @@ await WithNodeAsync(async ports => var message = FlowMessage.Create( FlowContent.FromBytes(Encoding.UTF8.GetBytes("hello"), "text/plain")); - var eventResult = ports.ReceiveAsync(Events, Timeout); + var eventResult = ports.ReceiveAsync(Events, Timeout); (await ports.SendAsync(Input, message)).IsAccepted.ShouldBeTrue(); var eventMessage = (await eventResult).Message.ShouldNotBeNull(); var @event = eventMessage.Value; - @event.Name.ShouldBe(PayloadDiagnosticNames.Inspected); + @event.ToFlowEvent().Name.ShouldBe(PayloadDiagnosticNames.Inspected); eventMessage.CorrelationId.ShouldBe(message.CorrelationId); }); } diff --git a/tests/FluxFlow.Components.Payloads.Tests/FluxFlow.Components.Payloads.Tests.csproj b/tests/Unit/Components/Payloads/FluxFlow.Components.Payloads.Tests/FluxFlow.Components.Payloads.Tests.csproj similarity index 69% rename from tests/FluxFlow.Components.Payloads.Tests/FluxFlow.Components.Payloads.Tests.csproj rename to tests/Unit/Components/Payloads/FluxFlow.Components.Payloads.Tests/FluxFlow.Components.Payloads.Tests.csproj index 22fc7169..29c90697 100644 --- a/tests/FluxFlow.Components.Payloads.Tests/FluxFlow.Components.Payloads.Tests.csproj +++ b/tests/Unit/Components/Payloads/FluxFlow.Components.Payloads.Tests/FluxFlow.Components.Payloads.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,8 +6,8 @@ - - + + diff --git a/tests/FluxFlow.Components.Payloads.Tests/PayloadInspectNodeTests.cs b/tests/Unit/Components/Payloads/FluxFlow.Components.Payloads.Tests/PayloadInspectNodeTests.cs similarity index 80% rename from tests/FluxFlow.Components.Payloads.Tests/PayloadInspectNodeTests.cs rename to tests/Unit/Components/Payloads/FluxFlow.Components.Payloads.Tests/PayloadInspectNodeTests.cs index 588d16db..753cb259 100644 --- a/tests/FluxFlow.Components.Payloads.Tests/PayloadInspectNodeTests.cs +++ b/tests/Unit/Components/Payloads/FluxFlow.Components.Payloads.Tests/PayloadInspectNodeTests.cs @@ -1,4 +1,5 @@ using System.Text; +using System.Text.Json; using System.Threading.Tasks.Dataflow; using FluxFlow.Components.Payloads.Contracts; using FluxFlow.Components.Payloads.Diagnostics; @@ -15,6 +16,8 @@ namespace FluxFlow.Components.Payloads.Tests; public sealed class PayloadInspectNodeTests { private static readonly TimeSpan Timeout = TimeSpan.FromSeconds(5); + private static readonly JsonSerializerOptions SerializerOptions = + new(JsonSerializerDefaults.Web); [Fact] public async Task Inspects_declared_json_and_preserves_content_and_message_identity() @@ -27,7 +30,7 @@ public async Task Inspects_declared_json_and_preserves_content_and_message_ident var content = FlowContent.FromBytes( Encoding.UTF8.GetBytes("""{"name":"sample","count":2}"""), "application/json"); - var message = FlowMessage.Create(content); + var message = Message(content); (await node.Input.SendAsync(message)).ShouldBeTrue(); @@ -36,9 +39,9 @@ public async Task Inspects_declared_json_and_preserves_content_and_message_ident received.CorrelationId.ShouldBe(message.CorrelationId); received.TraceId.ShouldBe(message.TraceId); received.CausationId.ShouldBe(message.MessageId); - var inspection = received.Value; + var inspection = Read(received.Value); inspection.Timestamp.ShouldBe(timestamp); - inspection.Content.ShouldBeSameAs(content); + inspection.Content.ShouldNotBeNull().Bytes.ShouldBe(content.Bytes); inspection.Kind.ShouldBe(PayloadKind.JsonObject); inspection.JsonValue.ShouldNotBeNull().GetProperty("name").GetString() .ShouldBe("sample"); @@ -57,9 +60,9 @@ public async Task Falls_back_to_utf8_for_an_invalid_declared_text_encoding() "text/plain", "missing-encoding"); - await node.Input.SendAsync(FlowMessage.Create(content)); + await node.Input.SendAsync(Message(content)); - var inspection = (await output.ReceiveAsync().WaitAsync(Timeout)).Value; + var inspection = Read((await output.ReceiveAsync().WaitAsync(Timeout)).Value!); inspection.Kind.ShouldBe(PayloadKind.Text); inspection.DetectedEncoding.ShouldBe("utf-8"); inspection.TextPreview.ShouldBe("hello"); @@ -74,8 +77,8 @@ public async Task Emits_invalid_declared_json_as_an_in_band_error_and_continues( var invalid = FlowContent.FromBytes(Encoding.UTF8.GetBytes("{"), "application/json"); var valid = FlowContent.FromBytes(Encoding.UTF8.GetBytes("{}"), "application/json"); - await node.Input.SendAsync(FlowMessage.Create(invalid)); - await node.Input.SendAsync(FlowMessage.Create(valid)); + await node.Input.SendAsync(Message(invalid)); + await node.Input.SendAsync(Message(valid)); var failure = await output.ReceiveAsync().WaitAsync(Timeout); failure.IsError.ShouldBeTrue(); @@ -86,11 +89,11 @@ public async Task Emits_invalid_declared_json_as_an_in_band_error_and_continues( var success = await output.ReceiveAsync().WaitAsync(Timeout); success.IsError.ShouldBeFalse(); - success.Value.Content.ShouldBeSameAs(valid); + Read(success.Value).Content.ShouldNotBeNull().Bytes.ShouldBe(valid.Bytes); - (await events.ReceiveAsync().WaitAsync(Timeout)).Name + (await events.ReceiveAsync().WaitAsync(Timeout)).ToFlowEvent().Name .ShouldBe(PayloadDiagnosticNames.Failed); - (await events.ReceiveAsync().WaitAsync(Timeout)).Name + (await events.ReceiveAsync().WaitAsync(Timeout)).ToFlowEvent().Name .ShouldBe(PayloadDiagnosticNames.Inspected); node.Complete(); @@ -109,7 +112,7 @@ public async Task Propagates_incoming_errors_without_inspection() "Payloads", isTransient: false); - await node.Input.SendAsync(FlowMessage.CreateError(error)); + await node.Input.SendAsync(FlowMessage.CreateError(error)); var result = await output.ReceiveAsync().WaitAsync(Timeout); result.IsError.ShouldBeTrue(); @@ -124,11 +127,10 @@ public async Task Keeps_unknown_media_as_exact_binary_without_content_sniffing() var bytes = Encoding.UTF8.GetBytes("""{"looks":"json"}"""); var content = FlowContent.FromBytes(bytes, "application/octet-stream"); - await node.Input.SendAsync(FlowMessage.Create(content)); + await node.Input.SendAsync(Message(content)); - var inspection = (await output.ReceiveAsync().WaitAsync(Timeout)).Value; + var inspection = Read((await output.ReceiveAsync().WaitAsync(Timeout)).Value!); inspection.Kind.ShouldBe(PayloadKind.Binary); - inspection.Content.ShouldBeSameAs(content); inspection.Content.ShouldNotBeNull().Bytes.AsSpan().SequenceEqual(bytes).ShouldBeTrue(); inspection.JsonValue.ShouldBeNull(); inspection.TextPreview.ShouldBeNull(); @@ -142,7 +144,7 @@ public async Task Rejects_oversized_content_before_decoding() var output = Sink(node.Output); var content = FlowContent.FromBytes(new byte[] { 1, 2, 3, 4 }, "application/json"); - await node.Input.SendAsync(FlowMessage.Create(content)); + await node.Input.SendAsync(Message(content)); var result = await output.ReceiveAsync().WaitAsync(Timeout); result.IsError.ShouldBeTrue(); @@ -163,14 +165,14 @@ public async Task Inspects_xml_and_text_base64_through_declared_media_types() Encoding.UTF8.GetBytes(Convert.ToBase64String(Encoding.UTF8.GetBytes("hello"))), "text/plain"); - await node.Input.SendAsync(FlowMessage.Create(xml)); - await node.Input.SendAsync(FlowMessage.Create(base64)); + await node.Input.SendAsync(Message(xml)); + await node.Input.SendAsync(Message(base64)); - var xmlResult = (await output.ReceiveAsync().WaitAsync(Timeout)).Value; + var xmlResult = Read((await output.ReceiveAsync().WaitAsync(Timeout)).Value!); xmlResult.Kind.ShouldBe(PayloadKind.Xml); xmlResult.FormattedPreview.ShouldNotBeNull().ShouldContain("1"); - var base64Result = (await output.ReceiveAsync().WaitAsync(Timeout)).Value; + var base64Result = Read((await output.ReceiveAsync().WaitAsync(Timeout)).Value!); base64Result.Kind.ShouldBe(PayloadKind.Base64); base64Result.Base64DecodedByteCount.ShouldBe(5); base64Result.FormattedPreview.ShouldBe("hello"); @@ -186,9 +188,9 @@ public async Task Classifies_each_declared_json_shape(string json, PayloadKind e var output = Sink(node.Output); var content = FlowContent.FromBytes(Encoding.UTF8.GetBytes(json), "application/json"); - await node.Input.SendAsync(FlowMessage.Create(content)); + await node.Input.SendAsync(Message(content)); - (await output.ReceiveAsync().WaitAsync(Timeout)).Value.Kind.ShouldBe(expectedKind); + Read((await output.ReceiveAsync().WaitAsync(Timeout)).Value!).Kind.ShouldBe(expectedKind); } [Fact] @@ -199,9 +201,9 @@ public async Task Honors_a_quoted_charset_from_content_type() var bytes = Encoding.Unicode.GetBytes("{\"name\":\"sample\"}"); var content = FlowContent.FromBytes(bytes, "application/json; charset=\"utf-16\""); - await node.Input.SendAsync(FlowMessage.Create(content)); + await node.Input.SendAsync(Message(content)); - var inspection = (await output.ReceiveAsync().WaitAsync(Timeout)).Value; + var inspection = Read((await output.ReceiveAsync().WaitAsync(Timeout)).Value!); inspection.Kind.ShouldBe(PayloadKind.JsonObject); inspection.DetectedEncoding.ShouldBe("utf-16"); inspection.TextPreview.ShouldNotBeNull().ShouldContain("sample"); @@ -217,17 +219,17 @@ public async Task Preserves_empty_content_and_preview_limits() }); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create( + await node.Input.SendAsync(Message( FlowContent.FromBytes(ReadOnlyMemory.Empty, "text/plain"))); - await node.Input.SendAsync(FlowMessage.Create(FlowContent.FromBytes( + await node.Input.SendAsync(Message(FlowContent.FromBytes( Encoding.UTF8.GetBytes("{\"message\":\"abcdef\"}"), "application/json"))); - var empty = (await output.ReceiveAsync().WaitAsync(Timeout)).Value; + var empty = Read((await output.ReceiveAsync().WaitAsync(Timeout)).Value!); empty.Kind.ShouldBe(PayloadKind.Empty); empty.TextPreview.ShouldBe(string.Empty); - var truncated = (await output.ReceiveAsync().WaitAsync(Timeout)).Value; + var truncated = Read((await output.ReceiveAsync().WaitAsync(Timeout)).Value!); truncated.TextPreview.ShouldBe("{\"m"); truncated.TextPreviewTruncated.ShouldBeTrue(); truncated.FormattedPreview.ShouldNotBeNull().Length.ShouldBe(10); @@ -242,7 +244,7 @@ public async Task Fans_out_each_result_to_every_consumer() var second = Sink(node.Output); var content = FlowContent.FromBytes(Encoding.UTF8.GetBytes("hello"), "text/plain"); - await node.Input.SendAsync(FlowMessage.Create(content)); + await node.Input.SendAsync(Message(content)); (await first.ReceiveAsync().WaitAsync(Timeout)).IsError.ShouldBeFalse(); (await second.ReceiveAsync().WaitAsync(Timeout)).IsError.ShouldBeFalse(); @@ -275,4 +277,10 @@ private static BufferBlock Sink(ISourceBlock source) source.LinkTo(sink); return sink; } + + private static FlowMessage Message(T value) + => FlowMessage.Create(FlowValue.From(value)); + + private static PayloadInspectionResult Read(FlowValue value) + => value.ToJsonElement().Deserialize(SerializerOptions)!; } diff --git a/tests/Unit/Components/Projections/FluxFlow.Components.Projections.Composition.Tests/FluxFlow.Components.Projections.Composition.Tests.csproj b/tests/Unit/Components/Projections/FluxFlow.Components.Projections.Composition.Tests/FluxFlow.Components.Projections.Composition.Tests.csproj new file mode 100644 index 00000000..9205ca68 --- /dev/null +++ b/tests/Unit/Components/Projections/FluxFlow.Components.Projections.Composition.Tests/FluxFlow.Components.Projections.Composition.Tests.csproj @@ -0,0 +1,29 @@ + + + + net10.0 + false + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/FluxFlow.Components.Projections.Composition.Tests/ProjectionsServiceCollectionExtensionsTests.cs b/tests/Unit/Components/Projections/FluxFlow.Components.Projections.Composition.Tests/ProjectionsServiceCollectionExtensionsTests.cs similarity index 97% rename from tests/FluxFlow.Components.Projections.Composition.Tests/ProjectionsServiceCollectionExtensionsTests.cs rename to tests/Unit/Components/Projections/FluxFlow.Components.Projections.Composition.Tests/ProjectionsServiceCollectionExtensionsTests.cs index 9ecad3b1..55f86d7c 100644 --- a/tests/FluxFlow.Components.Projections.Composition.Tests/ProjectionsServiceCollectionExtensionsTests.cs +++ b/tests/Unit/Components/Projections/FluxFlow.Components.Projections.Composition.Tests/ProjectionsServiceCollectionExtensionsTests.cs @@ -38,10 +38,8 @@ public void AddProjections_registers_request_result_metadata() services => services.AddFluxFlowComponents().AddProjections()); var registration = registry.Components[ProjectionsComponentDefinition.Types.EventProjection]; - registration.Inputs[ProjectionsComponentDefinition.Ports.Input].MessageType - .ShouldBe(typeof(ProjectionEvent)); - registration.Outputs[ProjectionsComponentDefinition.Ports.Output].MessageType - .ShouldBe(typeof(EventProjectionSnapshot)); + registration.Inputs[ProjectionsComponentDefinition.Ports.Input].MessageType.ShouldBe(typeof(FlowValue)); + registration.Outputs[ProjectionsComponentDefinition.Ports.Output].MessageType.ShouldBe(typeof(FlowValue)); } [Fact] @@ -71,14 +69,14 @@ public void Design_metadata_provider_describes_projection_ports() input.Name.Value.ShouldBe(ProjectionsComponentDefinition.Ports.Input); input.Direction.ShouldBe(PortDirection.Input); input.Order.ShouldBe(0); - input.ValueType?.Value.ShouldBe(nameof(ProjectionEvent)); + input.ValueType?.Value.ShouldBe(nameof(FlowValue)); input.IsPrimary.ShouldBeTrue(); var output = metadata.Ports[1]; output.Name.Value.ShouldBe(ProjectionsComponentDefinition.Ports.Output); output.Direction.ShouldBe(PortDirection.Output); output.Order.ShouldBe(1); - output.ValueType?.Value.ShouldBe("EventProjectionSnapshot"); + output.ValueType?.Value.ShouldBe(nameof(FlowValue)); output.IsPrimary.ShouldBeTrue(); } @@ -325,14 +323,14 @@ await WithNodeAsync(async (ports, _) => DateTimeOffset.Parse("2026-06-18T13:00:00Z"), "event.created")); - var eventReceive = ports.ReceiveAsync(Events, Timeout); + var eventReceive = ports.ReceiveAsync(Events, Timeout); (await ports.SendAsync(Input, message)).IsAccepted.ShouldBeTrue(); var eventMessage = (await eventReceive).Message.ShouldNotBeNull(); var @event = eventMessage.Value; - @event.Name.ShouldBe(ProjectionDiagnosticNames.ProjectionUpdated); + @event.ToFlowEvent().Name.ShouldBe(ProjectionDiagnosticNames.ProjectionUpdated); eventMessage.CorrelationId.ShouldBe(message.CorrelationId); - @event.Attributes["matchedCount"].ShouldBe("1"); + @event.ToFlowEvent().Attributes["matchedCount"].ShouldBe(1d); }); } diff --git a/tests/FluxFlow.Components.Projections.Tests/EventProjectionNodeTests.cs b/tests/Unit/Components/Projections/FluxFlow.Components.Projections.Tests/EventProjectionNodeTests.cs similarity index 80% rename from tests/FluxFlow.Components.Projections.Tests/EventProjectionNodeTests.cs rename to tests/Unit/Components/Projections/FluxFlow.Components.Projections.Tests/EventProjectionNodeTests.cs index 4a6ce7a6..3a4c9da5 100644 --- a/tests/FluxFlow.Components.Projections.Tests/EventProjectionNodeTests.cs +++ b/tests/Unit/Components/Projections/FluxFlow.Components.Projections.Tests/EventProjectionNodeTests.cs @@ -31,15 +31,15 @@ public async Task Matching_events_emit_ordered_snapshots_with_message_lineage() clock); var results = Link(node.Output); var events = Link(node.Events); - var first = FlowMessage.Create( + var first = ProjectionMessage( Event(timestamp.AddSeconds(-5), "first", status: "failed", preview: "abcdef"), new CorrelationId("first"), headers: new Dictionary(StringComparer.Ordinal) { ["tenant"] = "north" }); - var ignored = FlowMessage.Create(Event(timestamp.AddSeconds(-2), "ignored", status: "ok")); - var second = FlowMessage.Create( + var ignored = ProjectionMessage(Event(timestamp.AddSeconds(-2), "ignored", status: "ok")); + var second = ProjectionMessage( Event(timestamp.AddSeconds(-1), "second", status: "failed"), new CorrelationId("second")); @@ -55,22 +55,22 @@ public async Task Matching_events_emit_ordered_snapshots_with_message_lineage() firstResult.TraceId.ShouldBe(first.TraceId); firstResult.CausationId.ShouldBe(first.MessageId); firstResult.Headers.ShouldBeSameAs(first.Headers); - var firstSnapshot = firstResult.Value; + var firstSnapshot = firstResult.Value.Deserialize()!; firstSnapshot.Name.ShouldBe("orders"); firstSnapshot.ObservedCount.ShouldBe(1); firstSnapshot.MatchedCount.ShouldBe(1); firstSnapshot.Latest.ShouldNotBeNull().PayloadPreview.ShouldBe("abcd"); secondResult.CorrelationId.ShouldBe(second.CorrelationId); - var secondSnapshot = secondResult.Value; + var secondSnapshot = secondResult.Value!.Deserialize()!; secondSnapshot.ObservedCount.ShouldBe(3); secondSnapshot.MatchedCount.ShouldBe(2); secondSnapshot.CurrentRate.ShouldBe(0.2d); var diagnostic = await events.ReceiveAsync().WaitAsync(Timeout); - diagnostic.Name.ShouldBe(ProjectionDiagnosticNames.ProjectionUpdated); + diagnostic.ToFlowEvent().Name.ShouldBe(ProjectionDiagnosticNames.ProjectionUpdated); diagnostic.CorrelationId.ShouldBe(first.CorrelationId); - diagnostic.Attributes["resultKind"].ShouldBe(ProjectionResultKinds.Snapshot); + diagnostic.ToFlowEvent().Attributes["resultKind"].ShouldBe(ProjectionResultKinds.Snapshot); } [Fact] @@ -102,11 +102,11 @@ public async Task Projection_node_preserves_contract_owned_attributes_in_filter_ eventAttributes["Tenant"] = "west"; eventAttributes["Later"] = "ignored"; - await node.Input.SendAsync(FlowMessage.Create(projectionEvent)); + await node.Input.SendAsync(ProjectionMessage(projectionEvent)); var result = await results.ReceiveAsync().WaitAsync(Timeout); result.IsError.ShouldBeFalse(); - var snapshot = result.Value; + var snapshot = result.Value.Deserialize()!; snapshot.Name.ShouldBe("orders"); snapshot.ObservedCount.ShouldBe(1); snapshot.MatchedCount.ShouldBe(1); @@ -133,10 +133,10 @@ public async Task Incoming_error_is_propagated_and_later_input_continues() "Projection input was unavailable.", "Projections", isTransient: false); - var missing = FlowMessage.CreateError( + var missing = FlowMessage.CreateError( upstreamError, new CorrelationId("missing")); - var valid = FlowMessage.Create( + var valid = ProjectionMessage( Event(DateTimeOffset.Parse("2026-07-19T16:05:00Z"), "valid"), new CorrelationId("valid")); @@ -150,7 +150,7 @@ public async Task Incoming_error_is_propagated_and_later_input_continues() failure.IsError.ShouldBeTrue(); failure.Error.ShouldBeSameAs(upstreamError); success.CorrelationId.ShouldBe(valid.CorrelationId); - success.Value.MatchedCount.ShouldBe(1); + success.Value!.Deserialize()!.MatchedCount.ShouldBe(1); } [Fact] @@ -167,8 +167,8 @@ public async Task Completion_emits_one_final_snapshot_after_accepted_input() }, clock); var results = Link(node.Output); - var first = FlowMessage.Create(Event(eventTime, "first")); - var last = FlowMessage.Create( + var first = ProjectionMessage(Event(eventTime, "first")); + var last = ProjectionMessage( Event(eventTime.AddSeconds(1), "last"), new CorrelationId("last")); @@ -182,7 +182,7 @@ public async Task Completion_emits_one_final_snapshot_after_accepted_input() result.CorrelationId.ShouldBe(last.CorrelationId); result.TraceId.ShouldBe(last.TraceId); result.CausationId.ShouldBe(last.MessageId); - var snapshot = result.Value; + var snapshot = result.Value.Deserialize()!; snapshot.Timestamp.ShouldBe(clock.GetUtcNow()); snapshot.ObservedCount.ShouldBe(2); snapshot.MatchedCount.ShouldBe(2); @@ -215,8 +215,8 @@ public async Task Output_fans_out_each_result_to_every_consumer() await node.Input.SendAsync(EventMessage("event")); - (await first.ReceiveAsync().WaitAsync(Timeout)).Value.MatchedCount.ShouldBe(1); - (await second.ReceiveAsync().WaitAsync(Timeout)).Value.MatchedCount.ShouldBe(1); + (await first.ReceiveAsync().WaitAsync(Timeout)).Value!.Deserialize()!.MatchedCount.ShouldBe(1); + (await second.ReceiveAsync().WaitAsync(Timeout)).Value!.Deserialize()!.MatchedCount.ShouldBe(1); } [Fact] @@ -258,7 +258,7 @@ public async Task Filter_applies_exclusions_identity_attributes_and_time_range() }); var results = Link(node.Output); - await node.Input.SendAsync(FlowMessage.Create(Event( + await node.Input.SendAsync(ProjectionMessage(Event( from.AddSeconds(-1), "item.created", subject: "orders/1", @@ -266,7 +266,7 @@ await node.Input.SendAsync(FlowMessage.Create(Event( source: "processor", sourceNodeId: sourceNodeId, attributes: Attributes()))); - await node.Input.SendAsync(FlowMessage.Create(Event( + await node.Input.SendAsync(ProjectionMessage(Event( from.AddSeconds(1), "item.created", subject: "orders/2", @@ -274,7 +274,7 @@ await node.Input.SendAsync(FlowMessage.Create(Event( source: "processor", sourceNodeId: sourceNodeId, attributes: Attributes()))); - await node.Input.SendAsync(FlowMessage.Create(Event( + await node.Input.SendAsync(ProjectionMessage(Event( from.AddSeconds(30), "item.created", subject: "orders/3", @@ -283,7 +283,8 @@ await node.Input.SendAsync(FlowMessage.Create(Event( sourceNodeId: sourceNodeId, attributes: Attributes()))); - var snapshot = (await results.ReceiveAsync().WaitAsync(Timeout)).Value; + var snapshot = (await results.ReceiveAsync().WaitAsync(Timeout)) + .Value!.Deserialize()!; snapshot.ObservedCount.ShouldBe(3); snapshot.MatchedCount.ShouldBe(1); snapshot.Latest.ShouldNotBeNull().Subject.ShouldBe("orders/3"); @@ -306,7 +307,7 @@ public async Task Null_filter_matches_every_event() await node.Input.SendAsync(EventMessage("operation.completed")); - (await results.ReceiveAsync().WaitAsync(Timeout)).Value.MatchedCount.ShouldBe(1); + (await results.ReceiveAsync().WaitAsync(Timeout)).Value!.Deserialize()!.MatchedCount.ShouldBe(1); } [Fact] @@ -328,8 +329,40 @@ public void Filter_matcher_supports_attributes_and_prefixes() }).ShouldBeTrue(); } - private static FlowMessage EventMessage(string type) - => FlowMessage.Create(Event(DateTimeOffset.UtcNow, type)); + [Fact] + public async Task Projection_rejects_malformed_value_without_faulting_and_accepts_later_input() + { + await using var node = new EventProjectionNode(); + var output = Link(node.Output); + var events = Link(node.Events); + + await node.Input.SendAsync(FlowMessage.Create(FlowValue.From(42))); + await node.Input.SendAsync(EventMessage("valid")); + + var rejection = await output.ReceiveAsync().WaitAsync(Timeout); + rejection.IsError.ShouldBeTrue(); + (await events.ReceiveAsync().WaitAsync(Timeout)).ToFlowEvent().Name + .ShouldBe("event.projection.rejected"); + var success = await output.ReceiveAsync().WaitAsync(Timeout); + success.Value!.Deserialize()!.MatchedCount.ShouldBe(1); + node.Completion.IsFaulted.ShouldBeFalse(); + } + + private static FlowMessage EventMessage(string type) + => ProjectionMessage(Event(DateTimeOffset.UtcNow, type)); + + private static FlowMessage ProjectionMessage( + ProjectionEvent projectionEvent, + CorrelationId? correlationId = null, + TraceId? traceId = null, + IReadOnlyDictionary? headers = null, + MessageId? causationId = null) + => FlowMessage.Create( + FlowValue.From(projectionEvent), + correlationId, + traceId, + headers, + causationId); private static ProjectionEvent Event( DateTimeOffset timestamp, diff --git a/tests/FluxFlow.Components.Projections.Tests/FluxFlow.Components.Projections.Tests.csproj b/tests/Unit/Components/Projections/FluxFlow.Components.Projections.Tests/FluxFlow.Components.Projections.Tests.csproj similarity index 68% rename from tests/FluxFlow.Components.Projections.Tests/FluxFlow.Components.Projections.Tests.csproj rename to tests/Unit/Components/Projections/FluxFlow.Components.Projections.Tests/FluxFlow.Components.Projections.Tests.csproj index db59f13b..722e6035 100644 --- a/tests/FluxFlow.Components.Projections.Tests/FluxFlow.Components.Projections.Tests.csproj +++ b/tests/Unit/Components/Projections/FluxFlow.Components.Projections.Tests/FluxFlow.Components.Projections.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,8 +6,8 @@ - - + + diff --git a/tests/FluxFlow.Components.Projections.Tests/ProjectionContractTests.cs b/tests/Unit/Components/Projections/FluxFlow.Components.Projections.Tests/ProjectionContractTests.cs similarity index 100% rename from tests/FluxFlow.Components.Projections.Tests/ProjectionContractTests.cs rename to tests/Unit/Components/Projections/FluxFlow.Components.Projections.Tests/ProjectionContractTests.cs diff --git a/tests/FluxFlow.Components.RequestReply.Tests/CorrelatedRequestTrackerTests.cs b/tests/Unit/Components/RequestReply/FluxFlow.Components.RequestReply.Tests/CorrelatedRequestTrackerTests.cs similarity index 100% rename from tests/FluxFlow.Components.RequestReply.Tests/CorrelatedRequestTrackerTests.cs rename to tests/Unit/Components/RequestReply/FluxFlow.Components.RequestReply.Tests/CorrelatedRequestTrackerTests.cs diff --git a/tests/FluxFlow.Components.RequestReply.Tests/FluxFlow.Components.RequestReply.Tests.csproj b/tests/Unit/Components/RequestReply/FluxFlow.Components.RequestReply.Tests/FluxFlow.Components.RequestReply.Tests.csproj similarity index 68% rename from tests/FluxFlow.Components.RequestReply.Tests/FluxFlow.Components.RequestReply.Tests.csproj rename to tests/Unit/Components/RequestReply/FluxFlow.Components.RequestReply.Tests/FluxFlow.Components.RequestReply.Tests.csproj index 9a155463..c2667acd 100644 --- a/tests/FluxFlow.Components.RequestReply.Tests/FluxFlow.Components.RequestReply.Tests.csproj +++ b/tests/Unit/Components/RequestReply/FluxFlow.Components.RequestReply.Tests/FluxFlow.Components.RequestReply.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,8 +6,8 @@ - - + + diff --git a/tests/FluxFlow.Components.RequestReply.Tests/RequestReplyCoordinatorTests.cs b/tests/Unit/Components/RequestReply/FluxFlow.Components.RequestReply.Tests/RequestReplyCoordinatorTests.cs similarity index 94% rename from tests/FluxFlow.Components.RequestReply.Tests/RequestReplyCoordinatorTests.cs rename to tests/Unit/Components/RequestReply/FluxFlow.Components.RequestReply.Tests/RequestReplyCoordinatorTests.cs index 688a04d9..f8b9fac4 100644 --- a/tests/FluxFlow.Components.RequestReply.Tests/RequestReplyCoordinatorTests.cs +++ b/tests/Unit/Components/RequestReply/FluxFlow.Components.RequestReply.Tests/RequestReplyCoordinatorTests.cs @@ -108,11 +108,11 @@ public async Task RequestReplyMode_EmitsPublishedEventAfterRequestReachesOutput( var published = await events.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); var replied = await events.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); - received.Name.ShouldBe(RequestReplyEvents.Received); + received.ToFlowEvent().Name.ShouldBe(RequestReplyEvents.Received); received.CorrelationId.ShouldBe(request.CorrelationId); - published.Name.ShouldBe(RequestReplyEvents.Published); + published.ToFlowEvent().Name.ShouldBe(RequestReplyEvents.Published); published.CorrelationId.ShouldBe(request.CorrelationId); - replied.Name.ShouldBe(RequestReplyEvents.Replied); + replied.ToFlowEvent().Name.ShouldBe(RequestReplyEvents.Replied); replied.CorrelationId.ShouldBe(request.CorrelationId); } @@ -164,7 +164,7 @@ public async Task UnmatchedResponse_ReportsError() await bridge.Responses.SendAsync(FlowMessage.Create("orphan", new CorrelationId("unknown"))); var error = await events.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); - error.Attributes["code"].ShouldBe(RequestReplyErrorCodes.Unmatched); + error.ToFlowEvent().Attributes["code"].ShouldBe(RequestReplyErrorCodes.Unmatched); error.CorrelationId.ShouldBe(new CorrelationId("unknown")); } @@ -178,10 +178,10 @@ public async Task NullRequestContext_ReportsError_AndContinues() var error = await events.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); var flowEvent = await events.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); - error.Attributes["code"].ShouldBe(RequestReplyErrorCodes.InvalidRequestContext); + error.ToFlowEvent().Attributes["code"].ShouldBe(RequestReplyErrorCodes.InvalidRequestContext); error.CorrelationId.ShouldBeNull(); - flowEvent.Name.ShouldBe(RequestReplyEvents.Invalid); - flowEvent.Level.ShouldBe(FlowEventLevel.Error); + flowEvent.ToFlowEvent().Name.ShouldBe(RequestReplyEvents.Invalid); + flowEvent.ToFlowEvent().Level.ShouldBe(FlowEventLevel.Error); var context = new FakeContext("valid"); await bridge.Incoming.SendAsync(context); @@ -203,10 +203,10 @@ public async Task NullResponseMessage_ReportsError_AndContinues() var error = await events.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); var flowEvent = await events.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); - error.Attributes["code"].ShouldBe(RequestReplyErrorCodes.InvalidResponseMessage); + error.ToFlowEvent().Attributes["code"].ShouldBe(RequestReplyErrorCodes.InvalidResponseMessage); error.CorrelationId.ShouldBeNull(); - flowEvent.Name.ShouldBe(RequestReplyEvents.Invalid); - flowEvent.Level.ShouldBe(FlowEventLevel.Error); + flowEvent.ToFlowEvent().Name.ShouldBe(RequestReplyEvents.Invalid); + flowEvent.ToFlowEvent().Level.ShouldBe(FlowEventLevel.Error); var context = new FakeContext("valid"); await bridge.Incoming.SendAsync(context); @@ -374,14 +374,14 @@ public async Task FireAndForget_IgnoresLateResponses() context.Replied.ShouldBeNull(); } - private static async Task ReceiveErrorEventAsync(BufferBlock events) + private static async Task ReceiveErrorEventAsync(BufferBlock events) { while (true) { var @event = await events.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); - if (@event.Attributes.ContainsKey("code")) + if (@event.ToFlowEvent().Attributes.ContainsKey("code")) { - return @event; + return @event.ToFlowEvent(); } } } diff --git a/tests/Unit/Components/Resilience/FluxFlow.Components.Resilience.Composition.Tests/FluxFlow.Components.Resilience.Composition.Tests.csproj b/tests/Unit/Components/Resilience/FluxFlow.Components.Resilience.Composition.Tests/FluxFlow.Components.Resilience.Composition.Tests.csproj new file mode 100644 index 00000000..78ba9127 --- /dev/null +++ b/tests/Unit/Components/Resilience/FluxFlow.Components.Resilience.Composition.Tests/FluxFlow.Components.Resilience.Composition.Tests.csproj @@ -0,0 +1,26 @@ + + + net10.0 + false + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + diff --git a/tests/FluxFlow.Components.Resilience.Composition.Tests/ResilienceServiceCollectionExtensionsTests.cs b/tests/Unit/Components/Resilience/FluxFlow.Components.Resilience.Composition.Tests/ResilienceServiceCollectionExtensionsTests.cs similarity index 97% rename from tests/FluxFlow.Components.Resilience.Composition.Tests/ResilienceServiceCollectionExtensionsTests.cs rename to tests/Unit/Components/Resilience/FluxFlow.Components.Resilience.Composition.Tests/ResilienceServiceCollectionExtensionsTests.cs index f24cca44..f8befce0 100644 --- a/tests/FluxFlow.Components.Resilience.Composition.Tests/ResilienceServiceCollectionExtensionsTests.cs +++ b/tests/Unit/Components/Resilience/FluxFlow.Components.Resilience.Composition.Tests/ResilienceServiceCollectionExtensionsTests.cs @@ -31,12 +31,11 @@ public void Registration_declares_message_and_signal_ports() services => services.AddFluxFlowComponents().AddResilience()); var registration = registry.Components[ResilienceComponentDefinition.Types.Retry]; - registration.Inputs[ResilienceComponentDefinition.Ports.Input].MessageType.ShouldBe(typeof(JsonElement)); + registration.Inputs[ResilienceComponentDefinition.Ports.Input].MessageType.ShouldBe(typeof(FlowValue)); AssertSignal(registration, ResilienceComponentDefinition.Ports.Ack); AssertSignal(registration, ResilienceComponentDefinition.Ports.Nak); AssertSignal(registration, ResilienceComponentDefinition.Ports.Cancel); - registration.Outputs[ResilienceComponentDefinition.Ports.Output].MessageType - .ShouldBe(typeof(RetrySignal)); + registration.Outputs[ResilienceComponentDefinition.Ports.Output].MessageType.ShouldBe(typeof(FlowValue)); } [Fact] @@ -59,7 +58,7 @@ public void Designer_metadata_is_valid_and_describes_signal_ports() .ShouldBe(PortDesignMetadataAttributeValues.Signal); } metadata.Ports.Single(port => port.Name.Value == "Output") - .ValueType?.Value.ShouldBe("RetrySignal"); + .ValueType?.Value.ShouldBe(nameof(FlowValue)); } [Fact] diff --git a/tests/FluxFlow.Components.Resilience.Tests/FlowRetryNodeTests.cs b/tests/Unit/Components/Resilience/FluxFlow.Components.Resilience.Tests/FlowRetryNodeTests.cs similarity index 97% rename from tests/FluxFlow.Components.Resilience.Tests/FlowRetryNodeTests.cs rename to tests/Unit/Components/Resilience/FluxFlow.Components.Resilience.Tests/FlowRetryNodeTests.cs index e7818e81..3f2c2ef1 100644 --- a/tests/FluxFlow.Components.Resilience.Tests/FlowRetryNodeTests.cs +++ b/tests/Unit/Components/Resilience/FluxFlow.Components.Resilience.Tests/FlowRetryNodeTests.cs @@ -281,9 +281,9 @@ private static BufferBlock>> LinkOutput( return target; } - private static BufferBlock LinkEvents(FlowRetryNode node) + private static BufferBlock LinkEvents(FlowRetryNode node) { - var target = new BufferBlock(); + var target = new BufferBlock(); node.Events.LinkTo(target, new DataflowLinkOptions { PropagateCompletion = true }); return target; } @@ -292,14 +292,14 @@ private static Task>> ReceiveAsync( BufferBlock>> output) => output.ReceiveAsync(TimeSpan.FromSeconds(5)); - private static async Task ReceiveEventAsync(BufferBlock events, string name) + private static async Task ReceiveEventAsync(BufferBlock events, string name) { using var timeout = new CancellationTokenSource(TimeSpan.FromSeconds(5)); while (true) { var @event = await events.ReceiveAsync(timeout.Token); - if (string.Equals(@event.Name, name, StringComparison.Ordinal)) - return @event; + if (string.Equals(@event.ToFlowEvent().Name, name, StringComparison.Ordinal)) + return @event.ToFlowEvent(); } } diff --git a/tests/FluxFlow.Components.Resilience.Tests/FluxFlow.Components.Resilience.Tests.csproj b/tests/Unit/Components/Resilience/FluxFlow.Components.Resilience.Tests/FluxFlow.Components.Resilience.Tests.csproj similarity index 68% rename from tests/FluxFlow.Components.Resilience.Tests/FluxFlow.Components.Resilience.Tests.csproj rename to tests/Unit/Components/Resilience/FluxFlow.Components.Resilience.Tests/FluxFlow.Components.Resilience.Tests.csproj index 827164a4..84c0f4cb 100644 --- a/tests/FluxFlow.Components.Resilience.Tests/FluxFlow.Components.Resilience.Tests.csproj +++ b/tests/Unit/Components/Resilience/FluxFlow.Components.Resilience.Tests/FluxFlow.Components.Resilience.Tests.csproj @@ -1,11 +1,11 @@ - + net10.0 false - - + + diff --git a/tests/Unit/Components/Routing/FluxFlow.Components.Routing.Composition.Tests/FluxFlow.Components.Routing.Composition.Tests.csproj b/tests/Unit/Components/Routing/FluxFlow.Components.Routing.Composition.Tests/FluxFlow.Components.Routing.Composition.Tests.csproj new file mode 100644 index 00000000..30ec9ca6 --- /dev/null +++ b/tests/Unit/Components/Routing/FluxFlow.Components.Routing.Composition.Tests/FluxFlow.Components.Routing.Composition.Tests.csproj @@ -0,0 +1,30 @@ + + + + net10.0 + false + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/FluxFlow.Components.Routing.Composition.Tests/RoutingServiceCollectionExtensionsTests.cs b/tests/Unit/Components/Routing/FluxFlow.Components.Routing.Composition.Tests/RoutingServiceCollectionExtensionsTests.cs similarity index 95% rename from tests/FluxFlow.Components.Routing.Composition.Tests/RoutingServiceCollectionExtensionsTests.cs rename to tests/Unit/Components/Routing/FluxFlow.Components.Routing.Composition.Tests/RoutingServiceCollectionExtensionsTests.cs index 9b333700..892df2e5 100644 --- a/tests/FluxFlow.Components.Routing.Composition.Tests/RoutingServiceCollectionExtensionsTests.cs +++ b/tests/Unit/Components/Routing/FluxFlow.Components.Routing.Composition.Tests/RoutingServiceCollectionExtensionsTests.cs @@ -31,10 +31,10 @@ public void AddRouting_registers_canonical_json_metadata() registry.Components[RoutingComponentDefinition.Types.Window] .Outputs[RoutingComponentDefinition.Ports.Output].MessageType.ShouldBe( - typeof(FlowWindow)); + typeof(FlowValue)); registry.Components[RoutingComponentDefinition.Types.Correlation] .Outputs[RoutingComponentDefinition.Ports.Output].MessageType.ShouldBe( - typeof(FlowCorrelationOutcome)); + typeof(FlowValue)); registry.Components[RoutingComponentDefinition.Types.Correlation] .Outputs.Keys.ShouldBe([ RoutingComponentDefinition.Ports.Output, @@ -42,12 +42,12 @@ public void AddRouting_registers_canonical_json_metadata() ], ignoreOrder: false); registry.Components[RoutingComponentDefinition.Types.Join] .Inputs.Values.Select(input => input.MessageType).ShouldBe([ - typeof(JsonElement), - typeof(JsonElement) + typeof(FlowValue), + typeof(FlowValue) ]); registry.Components[RoutingComponentDefinition.Types.Join] .Outputs[RoutingComponentDefinition.Ports.Output].MessageType.ShouldBe( - typeof(FlowJoinOutcome)); + typeof(FlowValue)); } [Fact] @@ -120,24 +120,24 @@ public void Design_metadata_provider_describes_static_routing_ports() AssertPorts( metadata[RoutingComponentDefinition.Types.Window], [ - (RoutingComponentDefinition.Ports.Input, PortDirection.Input, 0, true, nameof(JsonElement)), - (RoutingComponentDefinition.Ports.Output, PortDirection.Output, 1, true, "FlowWindow"), - (RoutingComponentDefinition.Ports.Events, PortDirection.Output, 2, false, nameof(ComponentEvent)) + (RoutingComponentDefinition.Ports.Input, PortDirection.Input, 0, true, nameof(FlowValue)), + (RoutingComponentDefinition.Ports.Output, PortDirection.Output, 1, true, nameof(FlowValue)), + (RoutingComponentDefinition.Ports.Events, PortDirection.Output, 2, false, nameof(global::FluxFlow.Data.FlowValue)) ]); AssertPorts( metadata[RoutingComponentDefinition.Types.Correlation], [ - (RoutingComponentDefinition.Ports.Input, PortDirection.Input, 0, true, nameof(JsonElement)), - (RoutingComponentDefinition.Ports.Output, PortDirection.Output, 1, true, "FlowCorrelationOutcome"), - (RoutingComponentDefinition.Ports.Events, PortDirection.Output, 2, false, nameof(ComponentEvent)) + (RoutingComponentDefinition.Ports.Input, PortDirection.Input, 0, true, nameof(FlowValue)), + (RoutingComponentDefinition.Ports.Output, PortDirection.Output, 1, true, nameof(FlowValue)), + (RoutingComponentDefinition.Ports.Events, PortDirection.Output, 2, false, nameof(global::FluxFlow.Data.FlowValue)) ]); AssertPorts( metadata[RoutingComponentDefinition.Types.Join], [ - (RoutingComponentDefinition.Ports.Left, PortDirection.Input, 0, true, nameof(JsonElement)), - (RoutingComponentDefinition.Ports.Right, PortDirection.Input, 1, false, nameof(JsonElement)), - (RoutingComponentDefinition.Ports.Output, PortDirection.Output, 2, true, "FlowJoinOutcome"), - (RoutingComponentDefinition.Ports.Events, PortDirection.Output, 3, false, nameof(ComponentEvent)) + (RoutingComponentDefinition.Ports.Left, PortDirection.Input, 0, true, nameof(FlowValue)), + (RoutingComponentDefinition.Ports.Right, PortDirection.Input, 1, false, nameof(FlowValue)), + (RoutingComponentDefinition.Ports.Output, PortDirection.Output, 2, true, nameof(FlowValue)), + (RoutingComponentDefinition.Ports.Events, PortDirection.Output, 3, false, nameof(global::FluxFlow.Data.FlowValue)) ]); } @@ -400,7 +400,7 @@ public async Task Hosted_canonical_correlation_resolves_json_selectors() "Events", RoutingComponentDefinition.Ports.Output ], ignoreOrder: false); - var outputResult = ports.ReceiveAsync>( + var outputResult = ports.ReceiveAsync( Port(RoutingComponentDefinition.Ports.Output), Timeout); var request = FlowMessage.Create( @@ -416,9 +416,10 @@ public async Task Hosted_canonical_correlation_resolves_json_selectors() var result = (await outputResult).Message.ShouldNotBeNull(); result.CorrelationId.ShouldBe(request.CorrelationId); - result.Value - .ShouldBeOfType>() - .Match.Key.ShouldBe("A-350"); + result.Value.ToJsonElement() + .GetProperty("match") + .GetProperty("key") + .GetString().ShouldBe("A-350"); } [Fact] @@ -450,7 +451,7 @@ public async Task Hosted_join_resolves_selectors_and_routes_matches() host.StartResult.Succeeded.ShouldBeTrue(); var ports = host.GetRequiredPorts(); - var outputResult = ports.ReceiveAsync>( + var outputResult = ports.ReceiveAsync( Port(RoutingComponentDefinition.Ports.Output), Timeout); var leftMessage = FlowMessage.Create( RoutingItem("A-400", "left", "left"), @@ -467,13 +468,11 @@ public async Task Hosted_join_resolves_selectors_and_routes_matches() result.CorrelationId.ShouldBe(leftMessage.CorrelationId); result.IsError.ShouldBeFalse(); - var match = result.Value - .ShouldBeOfType>() - .Match; - match.Key.ShouldBe("A-400"); - match.Left.GetProperty("value").GetString().ShouldBe("left"); - match.Right.GetProperty("value").GetString().ShouldBe("right"); - match.JoinedAt.ShouldBe(timestamp); + var match = result.Value.ToJsonElement().GetProperty("match"); + match.GetProperty("key").GetString().ShouldBe("A-400"); + match.GetProperty("left").GetProperty("value").GetString().ShouldBe("left"); + match.GetProperty("right").GetProperty("value").GetString().ShouldBe("right"); + match.GetProperty("joinedAt").GetDateTimeOffset().ShouldBe(timestamp); } [Fact] diff --git a/tests/FluxFlow.Components.Routing.Tests/CorrelationNodeRuntimeTests.cs b/tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/CorrelationNodeRuntimeTests.cs similarity index 97% rename from tests/FluxFlow.Components.Routing.Tests/CorrelationNodeRuntimeTests.cs rename to tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/CorrelationNodeRuntimeTests.cs index 787be6f9..8b6760ed 100644 --- a/tests/FluxFlow.Components.Routing.Tests/CorrelationNodeRuntimeTests.cs +++ b/tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/CorrelationNodeRuntimeTests.cs @@ -175,9 +175,9 @@ await node.Input.SendAsync(FlowMessage.Create( await node.Completion.WaitAsync(TimeSpan.FromSeconds(30)); var matched = (await RoutingTestSink.DrainUntilCompletedAsync(events)) - .Single(@event => @event.Name == RoutingDiagnosticNames.CorrelationMatched); - matched.Attributes["key"].ShouldBe("A-100"); - matched.Attributes["expressionId"].ShouldBe("corr-v1"); + .Single(@event => @event.ToFlowEvent().Name == RoutingDiagnosticNames.CorrelationMatched); + matched.ToFlowEvent().Attributes["key"].ShouldBe("A-100"); + matched.ToFlowEvent().Attributes["expressionId"].ShouldBe("corr-v1"); } [Fact] diff --git a/tests/FluxFlow.Components.Routing.Tests/CorrelationPendingStoreTests.cs b/tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/CorrelationPendingStoreTests.cs similarity index 100% rename from tests/FluxFlow.Components.Routing.Tests/CorrelationPendingStoreTests.cs rename to tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/CorrelationPendingStoreTests.cs diff --git a/tests/FluxFlow.Components.Routing.Tests/FluxFlow.Components.Routing.Tests.csproj b/tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/FluxFlow.Components.Routing.Tests.csproj similarity index 62% rename from tests/FluxFlow.Components.Routing.Tests/FluxFlow.Components.Routing.Tests.csproj rename to tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/FluxFlow.Components.Routing.Tests.csproj index 77980aad..5f764126 100644 --- a/tests/FluxFlow.Components.Routing.Tests/FluxFlow.Components.Routing.Tests.csproj +++ b/tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/FluxFlow.Components.Routing.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,9 +6,9 @@ - - - + + + diff --git a/tests/FluxFlow.Components.Routing.Tests/JoinNodeRuntimeTests.cs b/tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/JoinNodeRuntimeTests.cs similarity index 98% rename from tests/FluxFlow.Components.Routing.Tests/JoinNodeRuntimeTests.cs rename to tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/JoinNodeRuntimeTests.cs index f006c3aa..4721b423 100644 --- a/tests/FluxFlow.Components.Routing.Tests/JoinNodeRuntimeTests.cs +++ b/tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/JoinNodeRuntimeTests.cs @@ -219,8 +219,8 @@ public async Task Join_emits_match_diagnostic_and_fans_out() Matched((await RoutingTestSink.DrainUntilCompletedAsync(second)).ShouldHaveSingleItem()) .Key.ShouldBe("A-100"); var matched = (await RoutingTestSink.DrainUntilCompletedAsync(events)) - .Single(@event => @event.Name == RoutingDiagnosticNames.JoinMatched); - matched.Attributes["expressionId"].ShouldBe("join-v1"); + .Single(@event => @event.ToFlowEvent().Name == RoutingDiagnosticNames.JoinMatched); + matched.ToFlowEvent().Attributes["expressionId"].ShouldBe("join-v1"); } [Fact] diff --git a/tests/FluxFlow.Components.Routing.Tests/JoinPendingStoreTests.cs b/tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/JoinPendingStoreTests.cs similarity index 100% rename from tests/FluxFlow.Components.Routing.Tests/JoinPendingStoreTests.cs rename to tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/JoinPendingStoreTests.cs diff --git a/tests/FluxFlow.Components.Routing.Tests/JsonRoutingNodeTests.cs b/tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/JsonRoutingNodeTests.cs similarity index 95% rename from tests/FluxFlow.Components.Routing.Tests/JsonRoutingNodeTests.cs rename to tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/JsonRoutingNodeTests.cs index 99d0152a..fd49c61a 100644 --- a/tests/FluxFlow.Components.Routing.Tests/JsonRoutingNodeTests.cs +++ b/tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/JsonRoutingNodeTests.cs @@ -19,7 +19,7 @@ public sealed class JsonRoutingNodeTests public async Task Window_emits_count_result_with_message_lineage() { var now = DateTimeOffset.Parse("2026-07-19T12:00:00Z"); - await using var node = new JsonWindowNode( + await using var node = new WindowNode( new WindowRoutingOptions { MaxItems = 2 }, new FakeTimeProvider(now)); var results = Link(node.Output); @@ -43,7 +43,7 @@ public async Task Correlation_emits_match_and_timeout_on_one_output() { var now = DateTimeOffset.Parse("2026-07-19T12:05:00Z"); var clock = new TrackingFakeTimeProvider(now); - await using var node = new JsonCorrelationNode( + await using var node = new CorrelationNode( new CorrelationRoutingOptions { TimeoutMilliseconds = 100 }, Key, Side, @@ -76,7 +76,7 @@ public async Task Correlation_emits_match_and_timeout_on_one_output() [Fact] public async Task Correlation_selector_failure_is_normal_error_result() { - await using var node = new JsonCorrelationNode( + await using var node = new CorrelationNode( new CorrelationRoutingOptions(), static _ => throw new InvalidOperationException("selector failed"), Side); @@ -99,7 +99,7 @@ public async Task Join_emits_match_and_timeout_on_one_output() { var now = DateTimeOffset.Parse("2026-07-19T12:10:00Z"); var clock = new TrackingFakeTimeProvider(now); - await using var node = new JsonJoinNode( + await using var node = new JoinNode( new JoinRoutingOptions { TimeoutMilliseconds = 100 }, Key, Key, @@ -131,7 +131,7 @@ public async Task Join_emits_match_and_timeout_on_one_output() [Fact] public async Task Join_selector_failure_is_normal_error_result_with_message_lineage() { - await using var node = new JsonJoinNode( + await using var node = new JoinNode( new JoinRoutingOptions(), static _ => throw new InvalidOperationException("selector failed"), Key); diff --git a/tests/FluxFlow.Components.Routing.Tests/PostponedTargetBlock.cs b/tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/PostponedTargetBlock.cs similarity index 100% rename from tests/FluxFlow.Components.Routing.Tests/PostponedTargetBlock.cs rename to tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/PostponedTargetBlock.cs diff --git a/tests/FluxFlow.Components.Routing.Tests/RoutingTestSink.cs b/tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/RoutingTestSink.cs similarity index 100% rename from tests/FluxFlow.Components.Routing.Tests/RoutingTestSink.cs rename to tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/RoutingTestSink.cs diff --git a/tests/FluxFlow.Components.Routing.Tests/ThrowingTimeProvider.cs b/tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/ThrowingTimeProvider.cs similarity index 100% rename from tests/FluxFlow.Components.Routing.Tests/ThrowingTimeProvider.cs rename to tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/ThrowingTimeProvider.cs diff --git a/tests/FluxFlow.Components.Routing.Tests/TrackingFakeTimeProvider.cs b/tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/TrackingFakeTimeProvider.cs similarity index 100% rename from tests/FluxFlow.Components.Routing.Tests/TrackingFakeTimeProvider.cs rename to tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/TrackingFakeTimeProvider.cs diff --git a/tests/FluxFlow.Components.Routing.Tests/WindowNodeRuntimeTests.cs b/tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/WindowNodeRuntimeTests.cs similarity index 97% rename from tests/FluxFlow.Components.Routing.Tests/WindowNodeRuntimeTests.cs rename to tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/WindowNodeRuntimeTests.cs index 1d8b5726..7d2a6bf1 100644 --- a/tests/FluxFlow.Components.Routing.Tests/WindowNodeRuntimeTests.cs +++ b/tests/Unit/Components/Routing/FluxFlow.Components.Routing.Tests/WindowNodeRuntimeTests.cs @@ -158,9 +158,9 @@ public async Task Window_EmitsEvents() await node.Completion.WaitAsync(TimeSpan.FromSeconds(30)); var emitted = (await RoutingTestSink.DrainUntilCompletedAsync(events)).ShouldHaveSingleItem(); - emitted.Name.ShouldBe(RoutingDiagnosticNames.WindowEmitted); - emitted.Attributes["count"].ShouldBe(1); - emitted.Attributes["reason"].ShouldBe(FlowWindowEmitReason.Count.ToString()); + emitted.ToFlowEvent().Name.ShouldBe(RoutingDiagnosticNames.WindowEmitted); + emitted.ToFlowEvent().Attributes["count"].ShouldBe(1); + emitted.ToFlowEvent().Attributes["reason"].ShouldBe(FlowWindowEmitReason.Count.ToString()); } [Fact] diff --git a/tests/Unit/Components/Serialization/FluxFlow.Components.Serialization.Composition.Tests/FluxFlow.Components.Serialization.Composition.Tests.csproj b/tests/Unit/Components/Serialization/FluxFlow.Components.Serialization.Composition.Tests/FluxFlow.Components.Serialization.Composition.Tests.csproj new file mode 100644 index 00000000..96fa0d2c --- /dev/null +++ b/tests/Unit/Components/Serialization/FluxFlow.Components.Serialization.Composition.Tests/FluxFlow.Components.Serialization.Composition.Tests.csproj @@ -0,0 +1,30 @@ + + + + net10.0 + false + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/FluxFlow.Components.Serialization.Composition.Tests/SerializationServiceCollectionExtensionsTests.cs b/tests/Unit/Components/Serialization/FluxFlow.Components.Serialization.Composition.Tests/SerializationServiceCollectionExtensionsTests.cs similarity index 97% rename from tests/FluxFlow.Components.Serialization.Composition.Tests/SerializationServiceCollectionExtensionsTests.cs rename to tests/Unit/Components/Serialization/FluxFlow.Components.Serialization.Composition.Tests/SerializationServiceCollectionExtensionsTests.cs index ce735867..fdfb2178 100644 --- a/tests/FluxFlow.Components.Serialization.Composition.Tests/SerializationServiceCollectionExtensionsTests.cs +++ b/tests/Unit/Components/Serialization/FluxFlow.Components.Serialization.Composition.Tests/SerializationServiceCollectionExtensionsTests.cs @@ -237,15 +237,15 @@ await WithNodeAsync( SerializationComponentDefinition.Types.JsonParse, async (ports, _) => { - var receive = ports.ReceiveAsync(Events, Timeout); + var receive = ports.ReceiveAsync(Events, Timeout); (await ports.SendAsync(Input, FlowMessage.Create( FlowContent.FromBytes( Encoding.UTF8.GetBytes("{}"), "application/json")))).IsAccepted.ShouldBeTrue(); var @event = (await receive).Message.ShouldNotBeNull().Value; - @event.Name.ShouldBe(SerializationDiagnosticNames.JsonParsed); - @event.Timestamp.ShouldBe(timestamp); + @event.ToFlowEvent().Name.ShouldBe(SerializationDiagnosticNames.JsonParsed); + @event.ToFlowEvent().Timestamp.ShouldBe(timestamp); }, clock: clock); } @@ -301,10 +301,8 @@ private static void AssertMetadata( string nodeType) { var registration = registry.Components[nodeType]; - registration.Inputs[SerializationComponentDefinition.Ports.Input].MessageType - .ShouldBe(typeof(TInput)); - registration.Outputs[SerializationComponentDefinition.Ports.Output].MessageType - .ShouldBe(typeof(TOutput)); + registration.Inputs[SerializationComponentDefinition.Ports.Input].MessageType.ShouldBe(typeof(FlowValue)); + registration.Outputs[SerializationComponentDefinition.Ports.Output].MessageType.ShouldBe(typeof(FlowValue)); } private static IReadOnlyDictionary DesignMetadataByType() @@ -327,13 +325,13 @@ private static void AssertDesignPorts( input.Name.Value.ShouldBe(SerializationComponentDefinition.Ports.Input); input.Direction.ShouldBe(PortDirection.Input); input.Order.ShouldBe(0); - input.ValueType?.Value.ShouldBe(inputType); + input.ValueType?.Value.ShouldBe(nameof(FlowValue)); input.IsPrimary.ShouldBeTrue(); var output = metadata.Ports[1]; output.Name.Value.ShouldBe(SerializationComponentDefinition.Ports.Output); output.Direction.ShouldBe(PortDirection.Output); output.Order.ShouldBe(1); - output.ValueType?.Value.ShouldBe(outputType); + output.ValueType?.Value.ShouldBe(nameof(FlowValue)); output.IsPrimary.ShouldBeTrue(); } diff --git a/tests/FluxFlow.Components.Serialization.Tests/FluxFlow.Components.Serialization.Tests.csproj b/tests/Unit/Components/Serialization/FluxFlow.Components.Serialization.Tests/FluxFlow.Components.Serialization.Tests.csproj similarity index 68% rename from tests/FluxFlow.Components.Serialization.Tests/FluxFlow.Components.Serialization.Tests.csproj rename to tests/Unit/Components/Serialization/FluxFlow.Components.Serialization.Tests/FluxFlow.Components.Serialization.Tests.csproj index 2c319be7..bedab3db 100644 --- a/tests/FluxFlow.Components.Serialization.Tests/FluxFlow.Components.Serialization.Tests.csproj +++ b/tests/Unit/Components/Serialization/FluxFlow.Components.Serialization.Tests/FluxFlow.Components.Serialization.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,8 +6,8 @@ - - + + diff --git a/tests/FluxFlow.Components.Serialization.Tests/SerializationNodeTests.cs b/tests/Unit/Components/Serialization/FluxFlow.Components.Serialization.Tests/SerializationNodeTests.cs similarity index 67% rename from tests/FluxFlow.Components.Serialization.Tests/SerializationNodeTests.cs rename to tests/Unit/Components/Serialization/FluxFlow.Components.Serialization.Tests/SerializationNodeTests.cs index ba611d1d..e255da64 100644 --- a/tests/FluxFlow.Components.Serialization.Tests/SerializationNodeTests.cs +++ b/tests/Unit/Components/Serialization/FluxFlow.Components.Serialization.Tests/SerializationNodeTests.cs @@ -19,15 +19,15 @@ public async Task JsonParse_ProducesOwnedJsonElement() { await using var node = new JsonParseNode(); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(FlowContent.FromBytes( + await node.Input.SendAsync(Message(FlowContent.FromBytes( Encoding.UTF8.GetBytes("{\"count\":2,\"enabled\":true}"), "application/json"))); var result = await Receive(output); result.IsError.ShouldBeFalse(); - result.Value.GetProperty("count").GetInt32().ShouldBe(2); - result.Value.GetProperty("enabled").GetBoolean().ShouldBeTrue(); + result.Value.ToJsonElement().GetProperty("count").GetInt32().ShouldBe(2); + result.Value.ToJsonElement().GetProperty("enabled").GetBoolean().ShouldBeTrue(); } [Fact] @@ -39,11 +39,11 @@ public async Task JsonParse_HonorsParserOptions() SkipComments = true }); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(FlowContent.FromBytes( + await node.Input.SendAsync(Message(FlowContent.FromBytes( Encoding.UTF8.GetBytes("{/*comment*/\"value\":1,}"), "application/json"))); - (await Receive(output)).Value.GetProperty("value").GetInt32().ShouldBe(1); + (await Receive(output)).Value!.ToJsonElement().GetProperty("value").GetInt32().ShouldBe(1); } [Fact] @@ -51,10 +51,10 @@ public async Task ConversionFailure_IsErrorDataAndLaterInputContinues() { await using var node = new JsonParseNode(); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(FlowContent.FromBytes( + await node.Input.SendAsync(Message(FlowContent.FromBytes( Encoding.UTF8.GetBytes("{invalid"), "application/json"))); - await node.Input.SendAsync(FlowMessage.Create(FlowContent.FromBytes( + await node.Input.SendAsync(Message(FlowContent.FromBytes( Encoding.UTF8.GetBytes("{\"ok\":true}"), "application/json"))); @@ -64,7 +64,7 @@ await node.Input.SendAsync(FlowMessage.Create(FlowContent.FromBytes( failure.IsError.ShouldBeTrue(); failure.Error!.Code.ShouldBe(SerializationErrorCodeNames.JsonParseFailed); success.IsError.ShouldBeFalse(); - success.Value.GetProperty("ok").GetBoolean().ShouldBeTrue(); + success.Value.ToJsonElement().GetProperty("ok").GetBoolean().ShouldBeTrue(); } [Theory] @@ -83,20 +83,22 @@ public async Task JsonStringify_reuses_format_options_without_changing_exact_utf DefaultEncoding = "utf-8" }); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(document.RootElement.Clone())); - await node.Input.SendAsync(FlowMessage.Create(document.RootElement.Clone())); + await node.Input.SendAsync(Message(document.RootElement.Clone())); + await node.Input.SendAsync(Message(document.RootElement.Clone())); var first = await Receive(output); var second = await Receive(output); first.IsError.ShouldBeFalse(); second.IsError.ShouldBeFalse(); - first.Value.Bytes.AsSpan().ToArray().ShouldBe(Encoding.UTF8.GetBytes(expected)); - second.Value.Bytes.ShouldBe(first.Value.Bytes); - first.Value.ContentType.ShouldBe("application/json"); - second.Value.ContentType.ShouldBe("application/json"); - first.Value.Encoding.ShouldBe("utf-8"); - second.Value.Encoding.ShouldBe("utf-8"); + var firstContent = Read(first.Value); + var secondContent = Read(second.Value); + firstContent.Bytes.AsSpan().ToArray().ShouldBe(Encoding.UTF8.GetBytes(expected)); + secondContent.Bytes.ShouldBe(firstContent.Bytes); + firstContent.ContentType.ShouldBe("application/json"); + secondContent.ContentType.ShouldBe("application/json"); + firstContent.Encoding.ShouldBe("utf-8"); + secondContent.Encoding.ShouldBe("utf-8"); var converters = typeof(JsonStringifyNode).Assembly.GetType( "FluxFlow.Components.Serialization.Nodes.SerializationConverters") .ShouldNotBeNull(); @@ -123,12 +125,12 @@ public async Task TextEncodeAndDecode_RoundTripDeclaredEncoding() var encoded = Sink(encoder.Output); var decoded = Sink(decoder.Output); - await encoder.Input.SendAsync(FlowMessage.Create("café")); - var content = (await Receive(encoded)).Value; - await decoder.Input.SendAsync(FlowMessage.Create(content)); + await encoder.Input.SendAsync(Message("café")); + var content = Read((await Receive(encoded)).Value!); + await decoder.Input.SendAsync(Message(content)); content.Bytes.ShouldBe([0x63, 0x61, 0x66, 0xe9]); - (await Receive(decoded)).Value.ShouldBe("café"); + Read((await Receive(decoded)).Value!).ShouldBe("café"); } [Fact] @@ -136,15 +138,15 @@ public async Task TextDecode_UsesQuotedCharsetAndFallbackForInvalidCharset() { await using var node = new TextDecodeNode(); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(FlowContent.FromBytes( + await node.Input.SendAsync(Message(FlowContent.FromBytes( new byte[] { 0x63, 0x61, 0x66, 0xe9 }, "text/plain; charset=\"iso-8859-1\""))); - await node.Input.SendAsync(FlowMessage.Create(FlowContent.FromBytes( + await node.Input.SendAsync(Message(FlowContent.FromBytes( Encoding.UTF8.GetBytes("value"), "text/plain; charset=not-valid"))); - (await Receive(output)).Value.ShouldBe("café"); - (await Receive(output)).Value.ShouldBe("value"); + Read((await Receive(output)).Value!).ShouldBe("café"); + Read((await Receive(output)).Value!).ShouldBe("value"); } [Fact] @@ -156,12 +158,12 @@ public async Task Base64_RoundTripPreservesExactBytes() var decoded = Sink(decoder.Output); var original = FlowContent.FromBytes(new byte[] { 0, 1, 2, 255 }); - await encoder.Input.SendAsync(FlowMessage.Create(original)); - var text = (await Receive(encoded)).Value; - await decoder.Input.SendAsync(FlowMessage.Create(text)); + await encoder.Input.SendAsync(Message(original)); + var text = Read((await Receive(encoded)).Value!); + await decoder.Input.SendAsync(Message(text)); text.ShouldBe("AAEC/w=="); - (await Receive(decoded)).Value.Bytes.ShouldBe(original.Bytes); + Read((await Receive(decoded)).Value!).Bytes.ShouldBe(original.Bytes); } [Fact] @@ -169,7 +171,7 @@ public async Task Base64Decode_InvalidTextProducesError() { await using var node = new Base64DecodeNode(); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create("not-base64")); + await node.Input.SendAsync(Message("not-base64")); var result = await Receive(output); @@ -183,7 +185,7 @@ public async Task InputError_IsPropagatedWithoutConversion() await using var node = new JsonParseNode(); var output = Sink(node.Output); var error = new FlowError("upstream.failed", "Upstream failed.", "upstream"); - var input = FlowMessage.CreateError(error); + var input = FlowMessage.CreateError(error); await node.Input.SendAsync(input); var result = await Receive(output); @@ -200,7 +202,7 @@ public async Task Output_FansOutSameOwnedJsonValueWithoutReparse() await using var node = new JsonParseNode(); var first = Sink(node.Output); var second = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(FlowContent.FromBytes( + await node.Input.SendAsync(Message(FlowContent.FromBytes( Encoding.UTF8.GetBytes("{\"id\":7}"), "application/json"))); @@ -208,7 +210,7 @@ await node.Input.SendAsync(FlowMessage.Create(FlowContent.FromBytes( var secondResult = await Receive(second); firstResult.ShouldBeSameAs(secondResult); - firstResult.Value.GetProperty("id").GetInt32().ShouldBe(7); + firstResult.Value!.ToJsonElement().GetProperty("id").GetInt32().ShouldBe(7); } [Fact] @@ -219,7 +221,7 @@ public async Task LimitsProduceErrorData() MaxInputBytes = 2 }); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(FlowContent.FromBytes( + await node.Input.SendAsync(Message(FlowContent.FromBytes( Encoding.UTF8.GetBytes("{} "), "application/json"))); @@ -231,15 +233,15 @@ public async Task SuccessAndFailureEmitDiagnosticEvents() { await using var node = new JsonParseNode(); var events = Sink(node.Events); - await node.Input.SendAsync(FlowMessage.Create(FlowContent.FromBytes( + await node.Input.SendAsync(Message(FlowContent.FromBytes( Encoding.UTF8.GetBytes("{}"), "application/json"))); - await node.Input.SendAsync(FlowMessage.Create(FlowContent.FromBytes( + await node.Input.SendAsync(Message(FlowContent.FromBytes( Encoding.UTF8.GetBytes("{"), "application/json"))); - (await Receive(events)).Name.ShouldBe(SerializationDiagnosticNames.JsonParsed); - (await Receive(events)).Name.ShouldBe(SerializationDiagnosticNames.JsonParseFailed); + (await Receive(events)).ToFlowEvent().Name.ShouldBe(SerializationDiagnosticNames.JsonParsed); + (await Receive(events)).ToFlowEvent().Name.ShouldBe(SerializationDiagnosticNames.JsonParseFailed); } [Fact] @@ -251,6 +253,24 @@ public void CanonicalNode_RejectsInvalidStaticOptions() new SerializationNodeOptions { DefaultEncoding = "not-an-encoding" })); } + [Fact] + public async Task MaterializationFailure_IsRejectedAndLaterInputContinues() + { + await using var node = new Base64DecodeNode(); + var output = Sink(node.Output); + var events = Sink(node.Events); + + await node.Input.SendAsync(Message(new { unexpected = true })); + await node.Input.SendAsync(Message("AAEC/w==")); + + var failure = await Receive(output); + var success = await Receive(output); + failure.Error!.Code.ShouldBe("flow.value.expected_string"); + success.IsError.ShouldBeFalse(); + Read(success.Value).Bytes.ShouldBe([0, 1, 2, 255]); + (await Receive(events)).ToFlowEvent().Name.ShouldBe("base64.decode.rejected"); + } + private static BufferBlock Sink(ISourceBlock source) { var sink = new BufferBlock(); @@ -260,4 +280,10 @@ private static BufferBlock Sink(ISourceBlock source) private static Task Receive(IReceivableSourceBlock source) => source.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); + + private static FlowMessage Message(T value) + => FlowMessage.Create(FlowValue.From(value)); + + private static T Read(FlowValue value) + => value.ToJsonElement().Deserialize()!; } diff --git a/tests/Unit/Components/Sessions/FluxFlow.Components.Sessions.Composition.Tests/FluxFlow.Components.Sessions.Composition.Tests.csproj b/tests/Unit/Components/Sessions/FluxFlow.Components.Sessions.Composition.Tests/FluxFlow.Components.Sessions.Composition.Tests.csproj new file mode 100644 index 00000000..5c419c72 --- /dev/null +++ b/tests/Unit/Components/Sessions/FluxFlow.Components.Sessions.Composition.Tests/FluxFlow.Components.Sessions.Composition.Tests.csproj @@ -0,0 +1,30 @@ + + + + net10.0 + false + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/FluxFlow.Components.Sessions.Composition.Tests/SessionsServiceCollectionExtensionsTests.cs b/tests/Unit/Components/Sessions/FluxFlow.Components.Sessions.Composition.Tests/SessionsServiceCollectionExtensionsTests.cs similarity index 95% rename from tests/FluxFlow.Components.Sessions.Composition.Tests/SessionsServiceCollectionExtensionsTests.cs rename to tests/Unit/Components/Sessions/FluxFlow.Components.Sessions.Composition.Tests/SessionsServiceCollectionExtensionsTests.cs index 3592dfe6..f9107338 100644 --- a/tests/FluxFlow.Components.Sessions.Composition.Tests/SessionsServiceCollectionExtensionsTests.cs +++ b/tests/Unit/Components/Sessions/FluxFlow.Components.Sessions.Composition.Tests/SessionsServiceCollectionExtensionsTests.cs @@ -51,21 +51,16 @@ public void AddSessions_registers_canonical_metadata() var registry = ComponentCatalogTestHost.Create(AddSessions); var recorder = registry.Components[SessionsComponentDefinition.Types.Recorder]; - recorder.Inputs[SessionsComponentDefinition.Ports.Input].MessageType - .ShouldBe(typeof(SessionContentRecordInput)); - recorder.Outputs[SessionsComponentDefinition.Ports.Output].MessageType - .ShouldBe(typeof(SessionContentRecord)); + recorder.Inputs[SessionsComponentDefinition.Ports.Input].MessageType.ShouldBe(typeof(FlowValue)); + recorder.Outputs[SessionsComponentDefinition.Ports.Output].MessageType.ShouldBe(typeof(FlowValue)); var replay = registry.Components[SessionsComponentDefinition.Types.Replay]; replay.Inputs.ShouldBeEmpty(); - replay.Outputs[SessionsComponentDefinition.Ports.Output].MessageType - .ShouldBe(typeof(SessionContentRecord)); + replay.Outputs[SessionsComponentDefinition.Ports.Output].MessageType.ShouldBe(typeof(FlowValue)); var query = registry.Components[SessionsComponentDefinition.Types.Query]; - query.Inputs[SessionsComponentDefinition.Ports.Input].MessageType - .ShouldBe(typeof(SessionQueryRequest)); - query.Outputs[SessionsComponentDefinition.Ports.Output].MessageType - .ShouldBe(typeof(SessionQueryOutcome)); + query.Inputs[SessionsComponentDefinition.Ports.Input].MessageType.ShouldBe(typeof(FlowValue)); + query.Outputs[SessionsComponentDefinition.Ports.Output].MessageType.ShouldBe(typeof(FlowValue)); query.Outputs.Keys.ShouldBe([ SessionsComponentDefinition.Ports.Output, "Events" @@ -100,11 +95,11 @@ public void Design_metadata_provider_describes_sessions_ports() var metadata = DesignMetadataByType(); AssertTransformPorts( - nameof(SessionContentRecordInput), - "SessionContentRecord", + nameof(FlowValue), + nameof(FlowValue), metadata[SessionsComponentDefinition.Types.Recorder]); AssertSourcePort( - "SessionContentRecord", + nameof(FlowValue), metadata[SessionsComponentDefinition.Types.Replay]); AssertQueryPorts(metadata[SessionsComponentDefinition.Types.Query]); } @@ -304,7 +299,7 @@ public async Task Canonical_host_records_content_preserves_lineage_and_closes_se host.StartResult.Succeeded.ShouldBeTrue(); var ports = host.GetRequiredPorts(); var resultReceive = ports.ReceiveAsync(Output, Timeout); - var eventObservation = (await ports.ObserveAsync(Events)) + var eventObservation = (await ports.ObserveAsync(Events)) .Observation.ShouldNotBeNull(); await using var observation = eventObservation; var message = FlowMessage.Create( @@ -329,7 +324,7 @@ public async Task Canonical_host_records_content_preserves_lineage_and_closes_se var firstEvent = await observation.Messages.ReceiveAsync().WaitAsync(Timeout); var secondEvent = await observation.Messages.ReceiveAsync().WaitAsync(Timeout); - new[] { firstEvent.Value.Name, secondEvent.Value.Name }.ShouldBe([ + new[] { firstEvent.ToFlowEvent().Name, secondEvent.ToFlowEvent().Name }.ShouldBe([ SessionsDiagnosticNames.RecorderStarted, SessionsDiagnosticNames.RecorderRecorded ]); @@ -471,7 +466,7 @@ public async Task Canonical_host_queries_with_options_clock_and_one_output() host.StartResult.Succeeded.ShouldBeTrue(); var ports = host.GetRequiredPorts(); var receive = ports.ReceiveAsync(Output, Timeout); - var eventReceive = ports.ReceiveAsync(Events, Timeout); + var eventReceive = ports.ReceiveAsync(Events, Timeout); var request = FlowMessage.Create( new SessionQueryRequest { @@ -484,7 +479,7 @@ public async Task Canonical_host_queries_with_options_clock_and_one_output() var @event = (await eventReceive).Message.ShouldNotBeNull(); result.CorrelationId.ShouldBe(request.CorrelationId); - @event.Value.Timestamp.ShouldBe(timestamp); + @event.ToFlowEvent().Timestamp.ShouldBe(timestamp); store.LastQuery.ShouldNotBeNull().NamePrefix.ShouldBe("orders"); store.LastQuery.Name.ShouldBeNull(); store.LastQuery.Tags["kind"].ShouldBe("order"); @@ -764,7 +759,13 @@ private static void RegisterRecorder( => services.AddFluxFlowComponents().Advanced.AddDynamicComponent(RecorderType, component => component .UseFactory(_ => new MessageRecordingNode(tracker)) - .HasInput("Input", static node => node.Input)); + .HasFlowValueInput("Input", static node => node.Input)); + + private sealed class TestFlowValueMaterializer() + : JsonFlowValueMaterializer( + "test.recording.invalid", + "Test recorder", + FlowValueShape.Any("Test recorder input.")); private static void AssertPreparationFailure( CanonicalApplicationTestHost host, @@ -800,7 +801,7 @@ private static void AssertTransformPorts( input.Name.Value.ShouldBe(SessionsComponentDefinition.Ports.Input); input.Direction.ShouldBe(PortDirection.Input); input.Order.ShouldBe(0); - input.ValueType?.Value.ShouldBe(inputType); + input.ValueType?.Value.ShouldBe(nameof(FlowValue)); input.IsPrimary.ShouldBeTrue(); var output = metadata.Ports[1]; @@ -835,13 +836,13 @@ private static void AssertQueryPorts(ComponentDesignMetadata metadata) metadata.Ports[0].Name.Value.ShouldBe(SessionsComponentDefinition.Ports.Input); metadata.Ports[0].Direction.ShouldBe(PortDirection.Input); metadata.Ports[0].Order.ShouldBe(0); - metadata.Ports[0].ValueType?.Value.ShouldBe(nameof(SessionQueryRequest)); + metadata.Ports[0].ValueType?.Value.ShouldBe(nameof(FlowValue)); metadata.Ports[0].IsPrimary.ShouldBeTrue(); AssertOutputPort( metadata.Ports[1], SessionsComponentDefinition.Ports.Output, - "SessionQueryOutcome", + nameof(FlowValue), order: 1, isPrimary: true); } @@ -964,15 +965,16 @@ private static async Task SeedContentRecordsAsync( store, clock); recorder.Output.LinkTo( - DataflowBlock.NullTarget>()); + DataflowBlock.NullTarget()); foreach (var record in records) { - await recorder.Input.SendAsync(FlowMessage.Create(new SessionContentRecordInput - { - Timestamp = record.Timestamp, - Name = record.Name, - Content = FlowContent.FromBytes(record.Bytes, "application/octet-stream") - })).WaitAsync(Timeout); + await recorder.Input.SendAsync(FlowMessage.Create( + FlowValue.From(new SessionContentRecordInput + { + Timestamp = record.Timestamp, + Name = record.Name, + Content = FlowContent.FromBytes(record.Bytes, "application/octet-stream") + }))).WaitAsync(Timeout); } recorder.Complete(); @@ -1002,15 +1004,28 @@ public void Record(FlowMessage message) private sealed class MessageRecordingNode : IFlowNode { - private readonly ActionBlock> _input; + private readonly ActionBlock _input; + private readonly TestFlowValueMaterializer _materializer = new(); public MessageRecordingNode(MessageTracker tracker) { ArgumentNullException.ThrowIfNull(tracker); - _input = new ActionBlock>(tracker.Record); + _input = new ActionBlock(message => + { + if (message.IsError) + { + tracker.Record(message.ConvertError()); + return; + } + + var materialization = _materializer.Materialize(message.Value); + tracker.Record(materialization.IsSuccess + ? message.ConvertValue(materialization.Value) + : message.WithError(materialization.Error!).ConvertError()); + }); } - public ITargetBlock> Input => _input; + public ITargetBlock Input => _input; public Task Completion => _input.Completion; diff --git a/tests/FluxFlow.Components.Sessions.Tests/FluxFlow.Components.Sessions.Tests.csproj b/tests/Unit/Components/Sessions/FluxFlow.Components.Sessions.Tests/FluxFlow.Components.Sessions.Tests.csproj similarity index 71% rename from tests/FluxFlow.Components.Sessions.Tests/FluxFlow.Components.Sessions.Tests.csproj rename to tests/Unit/Components/Sessions/FluxFlow.Components.Sessions.Tests/FluxFlow.Components.Sessions.Tests.csproj index 2f65aa73..f920207c 100644 --- a/tests/FluxFlow.Components.Sessions.Tests/FluxFlow.Components.Sessions.Tests.csproj +++ b/tests/Unit/Components/Sessions/FluxFlow.Components.Sessions.Tests/FluxFlow.Components.Sessions.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,8 +6,8 @@ - - + + diff --git a/tests/FluxFlow.Components.Sessions.Tests/SessionComponentTests.cs b/tests/Unit/Components/Sessions/FluxFlow.Components.Sessions.Tests/SessionComponentTests.cs similarity index 86% rename from tests/FluxFlow.Components.Sessions.Tests/SessionComponentTests.cs rename to tests/Unit/Components/Sessions/FluxFlow.Components.Sessions.Tests/SessionComponentTests.cs index 1f4580bf..112720bb 100644 --- a/tests/FluxFlow.Components.Sessions.Tests/SessionComponentTests.cs +++ b/tests/Unit/Components/Sessions/FluxFlow.Components.Sessions.Tests/SessionComponentTests.cs @@ -24,7 +24,7 @@ public async Task Recorder_passes_typed_content_to_the_store() store); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(ContentInput(7, "typed"))); + await node.Input.SendAsync(SessionRequest(ContentInput(7, "typed"))); node.Complete(); await node.Completion.WaitAsync(TimeSpan.FromSeconds(30)); await DrainUntilCompletedAsync(output); @@ -51,13 +51,13 @@ public async Task Recorder_preserves_content_lineage_order_and_existing_sequence }, store); var output = Sink(node.Output); - var first = FlowMessage.Create( + var first = SessionRequest( ContentInput(1, "first"), headers: new Dictionary { ["tenant"] = "north" }); - var second = FlowMessage.Create(ContentInput(2, "second")); + var second = SessionRequest(ContentInput(2, "second")); await node.Input.SendAsync(first); await node.Input.SendAsync(second); @@ -68,11 +68,11 @@ public async Task Recorder_preserves_content_lineage_order_and_existing_sequence await node.SessionCompleted.WaitAsync(TimeSpan.FromSeconds(30)); results.Count.ShouldBe(2); - results.Select(result => result.Value.Sequence) + results.Select(result => result.Value!.Deserialize()!.Sequence) .ShouldBe([6L, 7L]); - results.Select(result => result.Value.Name) + results.Select(result => result.Value!.Deserialize()!.Name) .ShouldBe(["first", "second"]); - results[0].Value.Content.Bytes.ToArray() + results[0].Value!.Deserialize()!.Content.Bytes.ToArray() .ShouldBe(new byte[] { 1 }); results[0].CorrelationId.ShouldBe(first.CorrelationId); results[0].TraceId.ShouldBe(first.TraceId); @@ -91,8 +91,8 @@ public async Task Recorder_returns_start_failure_as_data_and_continues() new SessionRecorderOptions { SessionId = "session-1" }, store); var output = Sink(node.Output); - var failed = FlowMessage.Create(ContentInput(1, "failed")); - var succeeded = FlowMessage.Create(ContentInput(2, "succeeded")); + var failed = SessionRequest(ContentInput(1, "failed")); + var succeeded = SessionRequest(ContentInput(2, "succeeded")); await node.Input.SendAsync(failed); await node.Input.SendAsync(succeeded); @@ -106,7 +106,7 @@ public async Task Recorder_returns_start_failure_as_data_and_continues() SessionErrorCodeNames.StoreUnavailable); results[0].CorrelationId.ShouldBe(failed.CorrelationId); results[1].IsError.ShouldBeFalse(); - results[1].Value.Sequence.ShouldBe(1); + results[1].Value!.Deserialize()!.Sequence.ShouldBe(1); results[1].CorrelationId.ShouldBe(succeeded.CorrelationId); } @@ -122,9 +122,9 @@ public async Task Recorder_propagates_input_and_append_failures_as_data_and_cont "upstream.failed", "Upstream processing failed.", "test"); - var unavailable = FlowMessage.CreateError(upstreamError); - var appendFailure = FlowMessage.Create(ContentInput(1, "append-failure")); - var succeeded = FlowMessage.Create(ContentInput(2, "succeeded")); + var unavailable = FlowMessage.CreateError(upstreamError); + var appendFailure = SessionRequest(ContentInput(1, "append-failure")); + var succeeded = SessionRequest(ContentInput(2, "succeeded")); await node.Input.SendAsync(unavailable); await node.Input.SendAsync(appendFailure); @@ -139,7 +139,7 @@ public async Task Recorder_propagates_input_and_append_failures_as_data_and_cont results[1].Error.ShouldNotBeNull().Code.ShouldBe( SessionErrorCodeNames.RecordFailed); results[2].IsError.ShouldBeFalse(); - results[2].Value.Sequence.ShouldBe(1); + results[2].Value!.Deserialize()!.Sequence.ShouldBe(1); node.Completion.IsFaulted.ShouldBeFalse(); } @@ -152,8 +152,8 @@ public async Task Recorder_returns_null_append_result_as_data_and_continues() store); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(ContentInput(1, "failed"))); - await node.Input.SendAsync(FlowMessage.Create(ContentInput(2, "succeeded"))); + await node.Input.SendAsync(SessionRequest(ContentInput(1, "failed"))); + await node.Input.SendAsync(SessionRequest(ContentInput(2, "succeeded"))); node.Complete(); var results = await DrainUntilCompletedAsync(output); @@ -163,7 +163,7 @@ public async Task Recorder_returns_null_append_result_as_data_and_continues() results[0].Error.ShouldNotBeNull().Code.ShouldBe( SessionErrorCodeNames.StoreUnavailable); results[0].Error.ShouldNotBeNull().Message.ShouldContain("null record"); - results[1].Value.Sequence.ShouldBe(1); + results[1].Value!.Deserialize()!.Sequence.ShouldBe(1); } [Fact] @@ -179,21 +179,21 @@ public async Task Recorder_uses_clock_and_emits_lifecycle_events() var output = Sink(node.Output); var events = Sink(node.Events); - await node.Input.SendAsync(FlowMessage.Create(ContentInput(1, "timed"))); + await node.Input.SendAsync(SessionRequest(ContentInput(1, "timed"))); node.Complete(); var result = (await DrainUntilCompletedAsync(output)).ShouldHaveSingleItem(); await node.Completion.WaitAsync(TimeSpan.FromSeconds(30)); var diagnosticEvents = await DrainUntilCompletedAsync(events); - result.Value.Timestamp.ShouldBe(timestamp); + result.Value!.Deserialize()!.Timestamp.ShouldBe(timestamp); store.Metadata.ShouldNotBeNull().StartedAt.ShouldBe(timestamp); store.Metadata.EndedAt.ShouldBe(timestamp); - diagnosticEvents.Select(@event => @event.Name).ShouldContain( + diagnosticEvents.Select(@event => @event.ToFlowEvent().Name).ShouldContain( SessionsDiagnosticNames.RecorderStarted); - diagnosticEvents.Select(@event => @event.Name).ShouldContain( + diagnosticEvents.Select(@event => @event.ToFlowEvent().Name).ShouldContain( SessionsDiagnosticNames.RecorderRecorded); - diagnosticEvents.Select(@event => @event.Name).ShouldContain( + diagnosticEvents.Select(@event => @event.ToFlowEvent().Name).ShouldContain( SessionsDiagnosticNames.RecorderCompleted); } @@ -207,7 +207,7 @@ public async Task Recorder_reports_close_failure_without_faulting_normal_complet var output = Sink(node.Output); var events = Sink(node.Events); - await node.Input.SendAsync(FlowMessage.Create(ContentInput(1, "only"))); + await node.Input.SendAsync(SessionRequest(ContentInput(1, "only"))); node.Complete(); await DrainUntilCompletedAsync(output); @@ -219,8 +219,8 @@ public async Task Recorder_reports_close_failure_without_faulting_normal_complet exception.Message.ShouldContain("failed to complete session"); node.Completion.IsFaulted.ShouldBeFalse(); diagnosticEvents.ShouldContain(@event => - @event.Name == SessionsDiagnosticNames.RecorderFailed && - Equals(@event.Attributes["errorCode"], SessionErrorCodeNames.CompleteFailed)); + @event.ToFlowEvent().Name == SessionsDiagnosticNames.RecorderFailed && + Equals(@event.ToFlowEvent().Attributes["errorCode"], SessionErrorCodeNames.CompleteFailed)); } [Fact] @@ -253,9 +253,9 @@ public async Task Replay_emits_exact_content_in_order_and_mints_message_identity await node.Completion.WaitAsync(TimeSpan.FromSeconds(30)); var results = await DrainUntilCompletedAsync(output); - results.Select(result => result.Value.Sequence) + results.Select(result => result.Value!.Deserialize()!.Sequence) .ShouldBe([2L, 3L]); - results.Select(result => result.Value.Content.Bytes[0]) + results.Select(result => result.Value!.Deserialize()!.Content.Bytes[0]) .ShouldBe([(byte)2, (byte)3]); results.ShouldAllBe(result => !result.IsError); results.ShouldAllBe(result => result.CorrelationId == null); @@ -283,7 +283,7 @@ public async Task Replay_supports_fixed_interval() await AdvanceUntilCompletedAsync(clock, node, TimeSpan.FromMilliseconds(40)); (await DrainUntilCompletedAsync(output)) - .Select(result => result.Value.Sequence) + .Select(result => result.Value!.Deserialize()!.Sequence) .ShouldBe([1L, 2L, 3L]); } @@ -331,7 +331,7 @@ public async Task Replay_cancellation_completes_without_late_output() node.Complete(); await node.Completion.WaitAsync(TimeSpan.FromSeconds(30)); - first.Value.Sequence.ShouldBe(1); + first.Value!.Deserialize()!.Sequence.ShouldBe(1); node.Completion.IsFaulted.ShouldBeFalse(); output.TryReceive(out _).ShouldBeFalse(); } @@ -388,11 +388,11 @@ public async Task Replay_emits_lifecycle_events() await DrainUntilCompletedAsync(output); var diagnosticEvents = await DrainUntilCompletedAsync(events); - diagnosticEvents.Select(@event => @event.Name).ShouldContain( + diagnosticEvents.Select(@event => @event.ToFlowEvent().Name).ShouldContain( SessionsDiagnosticNames.ReplayStarted); - diagnosticEvents.Select(@event => @event.Name).ShouldContain( + diagnosticEvents.Select(@event => @event.ToFlowEvent().Name).ShouldContain( SessionsDiagnosticNames.ReplayEmitted); - diagnosticEvents.Select(@event => @event.Name).ShouldContain( + diagnosticEvents.Select(@event => @event.ToFlowEvent().Name).ShouldContain( SessionsDiagnosticNames.ReplayCompleted); } @@ -428,7 +428,7 @@ public async Task Replay_returns_mid_stream_store_failure_as_normal_result() var results = await DrainUntilCompletedAsync(output); results.Count.ShouldBe(2); - results[0].Value.Sequence.ShouldBe(1); + results[0].Value!.Deserialize()!.Sequence.ShouldBe(1); results[1].Error.ShouldNotBeNull().Code.ShouldBe( SessionErrorCodeNames.ReplayFailed); results[1].Error.ShouldNotBeNull().Message.ShouldContain("mid-stream"); @@ -480,7 +480,7 @@ public async Task Replay_returns_malformed_records_as_data_and_continues() results[0].IsError.ShouldBeFalse(); results[1].Error.ShouldNotBeNull().Code.ShouldBe( SessionErrorCodeNames.StoredContentInvalid); - results[2].Value.Sequence.ShouldBe(3); + results[2].Value!.Deserialize()!.Sequence.ShouldBe(3); } [Fact] @@ -500,7 +500,7 @@ public async Task Replay_returns_null_record_as_data_and_continues() results.Count.ShouldBe(2); results[0].Error.ShouldNotBeNull().Code.ShouldBe( SessionErrorCodeNames.StoreUnavailable); - results[1].Value.Sequence.ShouldBe(2); + results[1].Value!.Deserialize()!.Sequence.ShouldBe(2); } [Fact] @@ -554,7 +554,7 @@ public async Task Query_returns_filtered_result_with_clock_and_lineage() clock); var output = Sink(node.Output); var events = Sink(node.Events); - var input = FlowMessage.Create(new SessionQueryRequest { CorrelationId = "corr-1" }); + var input = SessionRequest(new SessionQueryRequest { CorrelationId = "corr-1" }); await node.Input.SendAsync(input); node.Complete(); @@ -563,12 +563,12 @@ public async Task Query_returns_filtered_result_with_clock_and_lineage() var diagnostics = await DrainUntilCompletedAsync(events); result.IsError.ShouldBeFalse(); - result.Value.Count.ShouldBe(1); - result.Value.Sessions.ShouldHaveSingleItem() + result.Value.Deserialize()!.Count.ShouldBe(1); + result.Value.Deserialize()!.Sessions.ShouldHaveSingleItem() .SessionId.ShouldBe("session-1"); result.CorrelationId.ShouldBe(input.CorrelationId); result.CausationId.ShouldBe(input.MessageId); - diagnostics.Single(@event => @event.Name == SessionsDiagnosticNames.QueryCompleted) + diagnostics.Single(@event => @event.ToFlowEvent().Name == SessionsDiagnosticNames.QueryCompleted) .Timestamp.ShouldBe(timestamp); store.LastQuery.ShouldNotBeNull().NamePrefix.ShouldBe("alpha"); store.LastQuery.Tags["kind"].ShouldBe("demo"); @@ -590,13 +590,13 @@ public async Task Query_can_omit_sessions_without_changing_count() store); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new SessionQueryRequest())); + await node.Input.SendAsync(SessionRequest(new SessionQueryRequest())); node.Complete(); var result = (await DrainUntilCompletedAsync(output)).ShouldHaveSingleItem(); await node.Completion.WaitAsync(TimeSpan.FromSeconds(30)); - result.Value.Count.ShouldBe(1); - result.Value.Sessions.ShouldBeEmpty(); + result.Value!.Deserialize()!.Count.ShouldBe(1); + result.Value.Deserialize()!.Sessions.ShouldBeEmpty(); } [Fact] @@ -607,8 +607,8 @@ public async Task Query_returns_invalid_request_as_data_and_continues() new SessionQueryOptions { EmitSessionsInResult = true }, store); var output = Sink(node.Output); - var failed = FlowMessage.Create(new SessionQueryRequest { Limit = 0 }); - var succeeded = FlowMessage.Create(new SessionQueryRequest()); + var failed = SessionRequest(new SessionQueryRequest { Limit = 0 }); + var succeeded = SessionRequest(new SessionQueryRequest()); await node.Input.SendAsync(failed); await node.Input.SendAsync(succeeded); @@ -620,7 +620,7 @@ public async Task Query_returns_invalid_request_as_data_and_continues() results[0].Error.ShouldNotBeNull().Code.ShouldBe( SessionErrorCodeNames.InvalidRequest); results[0].CorrelationId.ShouldBe(failed.CorrelationId); - results[1].Value.Count.ShouldBe(1); + results[1].Value!.Deserialize()!.Count.ShouldBe(1); results[1].CorrelationId.ShouldBe(succeeded.CorrelationId); } @@ -634,15 +634,15 @@ public async Task Query_returns_store_failure_as_data_and_continues() store); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new SessionQueryRequest())); - await node.Input.SendAsync(FlowMessage.Create(new SessionQueryRequest())); + await node.Input.SendAsync(SessionRequest(new SessionQueryRequest())); + await node.Input.SendAsync(SessionRequest(new SessionQueryRequest())); node.Complete(); var results = await DrainUntilCompletedAsync(output); await node.Completion.WaitAsync(TimeSpan.FromSeconds(30)); results[0].Error.ShouldNotBeNull().Code.ShouldBe( SessionErrorCodeNames.QueryFailed); - results[1].Value.Count.ShouldBe(1); + results[1].Value!.Deserialize()!.Count.ShouldBe(1); node.Completion.IsFaulted.ShouldBeFalse(); } @@ -656,8 +656,8 @@ public async Task Query_rejects_null_store_results_as_data_and_continues() store); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new SessionQueryRequest())); - await node.Input.SendAsync(FlowMessage.Create(new SessionQueryRequest())); + await node.Input.SendAsync(SessionRequest(new SessionQueryRequest())); + await node.Input.SendAsync(SessionRequest(new SessionQueryRequest())); node.Complete(); var results = await DrainUntilCompletedAsync(output); await node.Completion.WaitAsync(TimeSpan.FromSeconds(30)); @@ -665,7 +665,7 @@ public async Task Query_rejects_null_store_results_as_data_and_continues() results[0].Error.ShouldNotBeNull().Code.ShouldBe( SessionErrorCodeNames.StoreUnavailable); results[0].Error.ShouldNotBeNull().Message.ShouldContain("null result"); - results[1].Value.Count.ShouldBe(1); + results[1].Value!.Deserialize()!.Count.ShouldBe(1); } [Fact] @@ -678,8 +678,8 @@ public async Task Query_rejects_null_sessions_as_data_and_continues() store); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new SessionQueryRequest())); - await node.Input.SendAsync(FlowMessage.Create(new SessionQueryRequest())); + await node.Input.SendAsync(SessionRequest(new SessionQueryRequest())); + await node.Input.SendAsync(SessionRequest(new SessionQueryRequest())); node.Complete(); var results = await DrainUntilCompletedAsync(output); await node.Completion.WaitAsync(TimeSpan.FromSeconds(30)); @@ -687,7 +687,7 @@ public async Task Query_rejects_null_sessions_as_data_and_continues() results[0].Error.ShouldNotBeNull().Code.ShouldBe( SessionErrorCodeNames.StoreUnavailable); results[0].Error.ShouldNotBeNull().Message.ShouldContain("null session"); - results[1].Value.Count.ShouldBe(1); + results[1].Value!.Deserialize()!.Count.ShouldBe(1); } [Fact] @@ -712,8 +712,8 @@ public async Task Query_rejects_store_results_outside_filter_as_data_and_continu var output = Sink(node.Output); var request = new SessionQueryRequest { NamePrefix = "alpha" }; - await node.Input.SendAsync(FlowMessage.Create(request)); - await node.Input.SendAsync(FlowMessage.Create(request)); + await node.Input.SendAsync(SessionRequest(request)); + await node.Input.SendAsync(SessionRequest(request)); node.Complete(); var results = await DrainUntilCompletedAsync(output); await node.Completion.WaitAsync(TimeSpan.FromSeconds(30)); @@ -721,7 +721,7 @@ public async Task Query_rejects_store_results_outside_filter_as_data_and_continu results[0].Error.ShouldNotBeNull().Code.ShouldBe( SessionErrorCodeNames.StoredContentInvalid); results[0].Error.ShouldNotBeNull().Message.ShouldContain("namePrefix"); - results[1].Value.Sessions.ShouldHaveSingleItem() + results[1].Value!.Deserialize()!.Sessions.ShouldHaveSingleItem() .SessionId.ShouldBe("session-2"); } @@ -747,8 +747,8 @@ public async Task Query_rejects_store_results_over_limit_as_data_and_continues() var output = Sink(node.Output); var request = new SessionQueryRequest { Name = "alpha", Limit = 1 }; - await node.Input.SendAsync(FlowMessage.Create(request)); - await node.Input.SendAsync(FlowMessage.Create(request)); + await node.Input.SendAsync(SessionRequest(request)); + await node.Input.SendAsync(SessionRequest(request)); node.Complete(); var results = await DrainUntilCompletedAsync(output); await node.Completion.WaitAsync(TimeSpan.FromSeconds(30)); @@ -757,7 +757,7 @@ public async Task Query_rejects_store_results_over_limit_as_data_and_continues() SessionErrorCodeNames.StoredContentInvalid); results[0].Error.ShouldNotBeNull().Message.ShouldContain( "more sessions than requested"); - results[1].Value.Count.ShouldBe(1); + results[1].Value!.Deserialize()!.Count.ShouldBe(1); } [Fact] @@ -770,7 +770,7 @@ public async Task Query_emits_started_event() var started = await events.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); - started.Name.ShouldBe(SessionsDiagnosticNames.QueryStarted); + started.ToFlowEvent().Name.ShouldBe(SessionsDiagnosticNames.QueryStarted); } [Fact] @@ -788,6 +788,44 @@ public void Query_validates_options_and_dependencies() () => new SessionQueryNode(new SessionQueryOptions(), null!)); } + [Fact] + public async Task Recorder_rejects_malformed_value_without_faulting_and_accepts_later_input() + { + var store = new TestSessionStore(); + await using var node = new SessionRecorderNode( + new SessionRecorderOptions { SessionId = "session-1" }, + store); + var output = Sink(node.Output); + var events = Sink(node.Events); + + await node.Input.SendAsync(FlowMessage.Create(FlowValue.From(42))); + await node.Input.SendAsync(SessionRequest(ContentInput(7, "valid"))); + + var rejection = await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); + rejection.IsError.ShouldBeTrue(); + rejection.Error.ShouldNotBeNull(); + (await events.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30))) + .ToFlowEvent().Name.ShouldBe("session.recorder.rejected"); + + var success = await output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); + success.IsError.ShouldBeFalse(); + success.Value.Deserialize()!.Name.ShouldBe("valid"); + node.Completion.IsFaulted.ShouldBeFalse(); + } + + private static FlowMessage SessionRequest( + T request, + CorrelationId? correlationId = null, + TraceId? traceId = null, + IReadOnlyDictionary? headers = null, + MessageId? causationId = null) + => FlowMessage.Create( + FlowValue.From(request), + correlationId, + traceId, + headers, + causationId); + private static SessionContentRecordInput ContentInput(byte value, string? name = null) => new() { diff --git a/tests/FluxFlow.Components.Sessions.Tests/SessionContractTests.cs b/tests/Unit/Components/Sessions/FluxFlow.Components.Sessions.Tests/SessionContractTests.cs similarity index 100% rename from tests/FluxFlow.Components.Sessions.Tests/SessionContractTests.cs rename to tests/Unit/Components/Sessions/FluxFlow.Components.Sessions.Tests/SessionContractTests.cs diff --git a/tests/FluxFlow.Components.Sessions.Tests/SessionOptionsTests.cs b/tests/Unit/Components/Sessions/FluxFlow.Components.Sessions.Tests/SessionOptionsTests.cs similarity index 100% rename from tests/FluxFlow.Components.Sessions.Tests/SessionOptionsTests.cs rename to tests/Unit/Components/Sessions/FluxFlow.Components.Sessions.Tests/SessionOptionsTests.cs diff --git a/tests/FluxFlow.Components.Sessions.Tests/TrackingFakeTimeProvider.cs b/tests/Unit/Components/Sessions/FluxFlow.Components.Sessions.Tests/TrackingFakeTimeProvider.cs similarity index 100% rename from tests/FluxFlow.Components.Sessions.Tests/TrackingFakeTimeProvider.cs rename to tests/Unit/Components/Sessions/FluxFlow.Components.Sessions.Tests/TrackingFakeTimeProvider.cs diff --git a/tests/Unit/Components/Sources/FluxFlow.Components.Sources.Composition.Tests/FluxFlow.Components.Sources.Composition.Tests.csproj b/tests/Unit/Components/Sources/FluxFlow.Components.Sources.Composition.Tests/FluxFlow.Components.Sources.Composition.Tests.csproj new file mode 100644 index 00000000..dd266dc7 --- /dev/null +++ b/tests/Unit/Components/Sources/FluxFlow.Components.Sources.Composition.Tests/FluxFlow.Components.Sources.Composition.Tests.csproj @@ -0,0 +1,30 @@ + + + + net10.0 + false + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/FluxFlow.Components.Sources.Composition.Tests/SourcesServiceCollectionExtensionsTests.cs b/tests/Unit/Components/Sources/FluxFlow.Components.Sources.Composition.Tests/SourcesServiceCollectionExtensionsTests.cs similarity index 96% rename from tests/FluxFlow.Components.Sources.Composition.Tests/SourcesServiceCollectionExtensionsTests.cs rename to tests/Unit/Components/Sources/FluxFlow.Components.Sources.Composition.Tests/SourcesServiceCollectionExtensionsTests.cs index 6b2f1b87..c11d01b6 100644 --- a/tests/FluxFlow.Components.Sources.Composition.Tests/SourcesServiceCollectionExtensionsTests.cs +++ b/tests/Unit/Components/Sources/FluxFlow.Components.Sources.Composition.Tests/SourcesServiceCollectionExtensionsTests.cs @@ -44,10 +44,10 @@ public void AddSources_exposes_canonical_typed_metadata() registry.Components[SourcesComponentDefinition.Types.Generated] .Outputs[SourcesComponentDefinition.Ports.Output].MessageType.ShouldBe( - typeof(JsonElement)); + typeof(FlowValue)); registry.Components[SourcesComponentDefinition.Types.Sequence] .Outputs[SourcesComponentDefinition.Ports.Output].MessageType.ShouldBe( - typeof(SequenceItem)); + typeof(FlowValue)); typeof(SourcesServiceCollectionExtensions).GetMethods() .ShouldNotContain(static method => method.IsGenericMethodDefinition); } @@ -103,8 +103,8 @@ public void Design_metadata_provider_describes_source_ports() { var metadata = MetadataByType(); - AssertSourcePorts(metadata[SourcesComponentDefinition.Types.Generated], nameof(JsonElement)); - AssertSourcePorts(metadata[SourcesComponentDefinition.Types.Sequence], nameof(SequenceItem)); + AssertSourcePorts(metadata[SourcesComponentDefinition.Types.Generated], nameof(FlowValue)); + AssertSourcePorts(metadata[SourcesComponentDefinition.Types.Sequence], nameof(FlowValue)); } [Fact] @@ -231,7 +231,7 @@ public async Task Hosted_generated_source_binds_items_and_emits_events() var output = (await ports.ObserveAsync(Output)) .Observation.ShouldNotBeNull(); await using var outputObservation = output; - var events = (await ports.ObserveAsync(Events)) + var events = (await ports.ObserveAsync(Events)) .Observation.ShouldNotBeNull(); await using var eventObservation = events; @@ -286,7 +286,7 @@ public async Task Typed_generated_source_authoring_writes_canonical_capacity_and var output = (await ports.ObserveAsync(Output)) .Observation.ShouldNotBeNull(); await using var outputObservation = output; - var events = (await ports.ObserveAsync(Events)) + var events = (await ports.ObserveAsync(Events)) .Observation.ShouldNotBeNull(); await using var eventObservation = events; var emittedEvent = ReceiveEventAsync(events.Messages, GeneratedSourceNode.Emitted); @@ -295,7 +295,7 @@ public async Task Typed_generated_source_authoring_writes_canonical_capacity_and (await output.Messages.ReceiveAsync().WaitAsync(Timeout)).Value.GetString() .ShouldBe("one"); - (await emittedEvent).Attributes["boundedCapacity"].ShouldBe("3"); + (await emittedEvent).ToFlowEvent().Attributes["boundedCapacity"].ShouldBe(3d); } [Fact] @@ -333,7 +333,7 @@ public async Task Hosted_generated_source_missing_items_completes_empty() host.StartResult.Succeeded.ShouldBeTrue(); await scheduled.WaitAsync(Timeout); var ports = host.GetRequiredPorts(); - var events = (await ports.ObserveAsync(Events)) + var events = (await ports.ObserveAsync(Events)) .Observation.ShouldNotBeNull(); await using var eventObservation = events; @@ -436,7 +436,7 @@ private static void AssertSourcePorts(ComponentDesignMetadata metadata, string v port.IsPrimary, port.ValueType?.Value)).ShouldBe([ (SourcesComponentDefinition.Ports.Output, PortDirection.Output, 0, true, valueType), - (SourcesComponentDefinition.Ports.Events, PortDirection.Output, 1, false, nameof(ComponentEvent)) + (SourcesComponentDefinition.Ports.Events, PortDirection.Output, 1, false, nameof(global::FluxFlow.Data.FlowValue)) ]); } @@ -557,27 +557,27 @@ private static void AssertPreparationFailure( } private static async Task> ReceiveEventsThroughAsync( - ISourceBlock> messages, + ISourceBlock> messages, string terminalEvent) { var names = new List(); while (!names.Contains(terminalEvent, StringComparer.Ordinal)) { var message = await messages.ReceiveAsync().WaitAsync(Timeout); - names.Add(message.Value.Name); + names.Add(message.ToFlowEvent().Name); } return names; } - private static async Task ReceiveEventAsync( - ISourceBlock> messages, + private static async Task ReceiveEventAsync( + ISourceBlock> messages, string eventName) { while (true) { var @event = (await messages.ReceiveAsync().WaitAsync(Timeout)).Value; - if (string.Equals(@event.Name, eventName, StringComparison.Ordinal)) + if (string.Equals(@event.ToFlowEvent().Name, eventName, StringComparison.Ordinal)) return @event; } } diff --git a/tests/FluxFlow.Components.Sources.Tests/FluxFlow.Components.Sources.Tests.csproj b/tests/Unit/Components/Sources/FluxFlow.Components.Sources.Tests/FluxFlow.Components.Sources.Tests.csproj similarity index 69% rename from tests/FluxFlow.Components.Sources.Tests/FluxFlow.Components.Sources.Tests.csproj rename to tests/Unit/Components/Sources/FluxFlow.Components.Sources.Tests/FluxFlow.Components.Sources.Tests.csproj index 4f79fb9e..6361e5dc 100644 --- a/tests/FluxFlow.Components.Sources.Tests/FluxFlow.Components.Sources.Tests.csproj +++ b/tests/Unit/Components/Sources/FluxFlow.Components.Sources.Tests/FluxFlow.Components.Sources.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,8 +6,8 @@ - - + + diff --git a/tests/FluxFlow.Components.Sources.Tests/GeneratedSourceNodeTests.cs b/tests/Unit/Components/Sources/FluxFlow.Components.Sources.Tests/GeneratedSourceNodeTests.cs similarity index 90% rename from tests/FluxFlow.Components.Sources.Tests/GeneratedSourceNodeTests.cs rename to tests/Unit/Components/Sources/FluxFlow.Components.Sources.Tests/GeneratedSourceNodeTests.cs index 62b6bae3..b6484ee5 100644 --- a/tests/FluxFlow.Components.Sources.Tests/GeneratedSourceNodeTests.cs +++ b/tests/Unit/Components/Sources/FluxFlow.Components.Sources.Tests/GeneratedSourceNodeTests.cs @@ -1,5 +1,7 @@ +using System.Text.Json; using FluxFlow.Components.Sources.Nodes; using FluxFlow.Components.Sources.Options; +using FluxFlow.Data; using FluxFlow.Nodes; using Shouldly; using System.Threading.Tasks.Dataflow; @@ -10,6 +12,8 @@ namespace FluxFlow.Components.Sources.Tests; public sealed class GeneratedSourceNodeTests { private static readonly TimeSpan Timeout = TimeSpan.FromSeconds(30); + private static readonly JsonSerializerOptions SerializerOptions = + new(JsonSerializerDefaults.Web); [Fact] public async Task Generated_emits_immutable_values_with_fresh_lineage_and_fan_out() @@ -26,8 +30,8 @@ public async Task Generated_emits_immutable_values_with_fresh_lineage_and_fan_ou var firstMessages = await SourcesTestSink.DrainUntilCompletedAsync(firstOutput); var secondMessages = await SourcesTestSink.DrainUntilCompletedAsync(secondOutput); - firstMessages.Select(message => message.Value) - .ShouldBe([first, "done"]); + Read(firstMessages[0].Value!).ShouldBe(first); + Read(firstMessages[1].Value!).ShouldBe("done"); firstMessages.Select(message => message.MessageId).Distinct().Count().ShouldBe(2); firstMessages.ShouldAllBe(message => !message.TraceId.IsEmpty); firstMessages[0].Value.ShouldBeSameAs(secondMessages[0].Value); @@ -42,7 +46,7 @@ public async Task Generated_source_delivers_every_configured_item_to_each_subscr new GeneratedSourceOptions { BoundedCapacity = 1 }, values); var fast = SourcesTestSink.Link(node.Output); - var slow = new PostponedTargetBlock>(); + var slow = new PostponedTargetBlock(); using var slowLink = node.Output.LinkTo( slow, new DataflowLinkOptions { PropagateCompletion = true }); @@ -64,8 +68,8 @@ public async Task Generated_source_delivers_every_configured_item_to_each_subscr var fastMessages = await SourcesTestSink.DrainUntilCompletedAsync(fast); var slowMessages = slow.Accepted; - fastMessages.Select(static message => message.Value).ShouldBe(values); - slowMessages.Select(static message => message.Value).ShouldBe(values); + fastMessages.Select(message => Read(message.Value!)).ShouldBe(values); + slowMessages.Select(message => Read(message.Value!)).ShouldBe(values); fastMessages.Select(static message => message.MessageId) .ShouldBe(slowMessages.Select(static message => message.MessageId)); fastMessages.Select(static message => message.CorrelationId) @@ -86,7 +90,7 @@ public async Task Generated_loops_until_max_items() await node.Completion.WaitAsync(Timeout); (await SourcesTestSink.DrainUntilCompletedAsync(output)) - .Select(message => message.Value) + .Select(message => Read(message.Value!)) .ShouldBe([1, 2, 1, 2, 1]); } @@ -109,7 +113,7 @@ public async Task Generated_uses_configured_clock_for_timing() await AdvanceUntilCompletedAsync(clock, node, TimeSpan.FromMilliseconds(30)); (await SourcesTestSink.DrainUntilCompletedAsync(output)) - .Select(message => message.Value) + .Select(message => Read(message.Value!)) .ShouldBe(["one", "two"]); } @@ -141,7 +145,7 @@ public async Task Generated_emits_lifecycle_events_without_an_error_port() (await SourcesTestSink.DrainUntilCompletedAsync(output)).ShouldHaveSingleItem(); var names = (await SourcesTestSink.DrainUntilCompletedAsync(events)) - .Select(flowEvent => flowEvent.Name) + .Select(flowEvent => flowEvent.ToFlowEvent().Name) .ToArray(); names.ShouldContain(GeneratedSourceNode.Started); names.ShouldContain(GeneratedSourceNode.Emitted); @@ -181,7 +185,7 @@ await Should.ThrowAsync( var message = (await SourcesTestSink.DrainUntilCompletedAsync(output)) .ShouldHaveSingleItem(); - message.Value.ShouldBe("ready"); + Read(message.Value!).ShouldBe("ready"); } [Fact] @@ -201,8 +205,8 @@ public async Task Generated_runtime_failure_emits_event_and_faults_completion() thrown.ShouldBeSameAs(failure); (await SourcesTestSink.DrainUntilCompletedAsync(events)) .ShouldContain(@event => - @event.Name == GeneratedSourceNode.Failed && - @event.Level == FlowEventLevel.Error); + @event.ToFlowEvent().Name == GeneratedSourceNode.Failed && + @event.ToFlowEvent().Level == FlowEventLevel.Error); } [Fact] @@ -285,4 +289,7 @@ public override ITimer CreateTimer( } private sealed record SourceItem(string Id, int Value); + + private static T Read(FlowValue value) + => value.ToJsonElement().Deserialize(SerializerOptions)!; } diff --git a/tests/FluxFlow.Components.Sources.Tests/PostponedTargetBlock.cs b/tests/Unit/Components/Sources/FluxFlow.Components.Sources.Tests/PostponedTargetBlock.cs similarity index 100% rename from tests/FluxFlow.Components.Sources.Tests/PostponedTargetBlock.cs rename to tests/Unit/Components/Sources/FluxFlow.Components.Sources.Tests/PostponedTargetBlock.cs diff --git a/tests/FluxFlow.Components.Sources.Tests/SequenceSourceNodeTests.cs b/tests/Unit/Components/Sources/FluxFlow.Components.Sources.Tests/SequenceSourceNodeTests.cs similarity index 91% rename from tests/FluxFlow.Components.Sources.Tests/SequenceSourceNodeTests.cs rename to tests/Unit/Components/Sources/FluxFlow.Components.Sources.Tests/SequenceSourceNodeTests.cs index 219ca109..1784406e 100644 --- a/tests/FluxFlow.Components.Sources.Tests/SequenceSourceNodeTests.cs +++ b/tests/Unit/Components/Sources/FluxFlow.Components.Sources.Tests/SequenceSourceNodeTests.cs @@ -1,6 +1,9 @@ +using System.Text.Json; using System.Threading.Tasks.Dataflow; using FluxFlow.Components.Sources.Nodes; using FluxFlow.Components.Sources.Options; +using FluxFlow.Components.Sources.Contracts; +using FluxFlow.Data; using FluxFlow.Nodes; using Shouldly; using Xunit; @@ -10,6 +13,8 @@ namespace FluxFlow.Components.Sources.Tests; public sealed class SequenceSourceNodeTests { private static readonly TimeSpan Timeout = TimeSpan.FromSeconds(30); + private static readonly JsonSerializerOptions SerializerOptions = + new(JsonSerializerDefaults.Web); [Fact] public async Task Sequence_emits_configured_immutable_values() @@ -28,12 +33,12 @@ public async Task Sequence_emits_configured_immutable_values() await node.Completion.WaitAsync(Timeout); var items = await SourcesTestSink.DrainUntilCompletedAsync(output); - items.Select(message => message.Value.Sequence) + items.Select(message => Read(message.Value!).Sequence) .ShouldBe([1, 2, 3]); - items.Select(message => message.Value.Value) + items.Select(message => Read(message.Value!).Value) .ShouldBe([10, 15, 20]); items.ShouldAllBe(message => - message.Value.Name == "numbers"); + Read(message.Value!).Name == "numbers"); } [Fact] @@ -73,9 +78,9 @@ public async Task Sequence_uses_configured_clock_for_timing_and_timestamp() var items = await SourcesTestSink.DrainUntilCompletedAsync(output); items.Count.ShouldBe(2); items.ShouldAllBe(message => - message.Value.Timestamp >= startInstant); + Read(message.Value!).Timestamp >= startInstant); items.ShouldAllBe(message => - message.Value.Timestamp <= clock.GetUtcNow()); + Read(message.Value!).Timestamp <= clock.GetUtcNow()); } [Fact] @@ -101,7 +106,7 @@ public async Task Sequence_honors_initial_delay() var item = (await SourcesTestSink.DrainUntilCompletedAsync(output)) .ShouldHaveSingleItem(); - item.Value.Timestamp + Read(item.Value!).Timestamp .ShouldBe(startInstant.AddMilliseconds(40)); } @@ -151,7 +156,7 @@ public async Task Sequence_emits_lifecycle_events_without_an_error_port() (await SourcesTestSink.DrainUntilCompletedAsync(output)).ShouldHaveSingleItem(); var names = (await SourcesTestSink.DrainUntilCompletedAsync(events)) - .Select(flowEvent => flowEvent.Name) + .Select(flowEvent => flowEvent.ToFlowEvent().Name) .ToArray(); names.ShouldContain(SequenceSourceNode.Started); names.ShouldContain(SequenceSourceNode.Emitted); @@ -228,4 +233,7 @@ private static async Task AdvanceUntilCompletedAsync( await node.Completion.WaitAsync(Timeout); } + + private static SequenceItem Read(FlowValue value) + => value.ToJsonElement().Deserialize(SerializerOptions)!; } diff --git a/tests/FluxFlow.Components.Sources.Tests/SourcesTestSink.cs b/tests/Unit/Components/Sources/FluxFlow.Components.Sources.Tests/SourcesTestSink.cs similarity index 100% rename from tests/FluxFlow.Components.Sources.Tests/SourcesTestSink.cs rename to tests/Unit/Components/Sources/FluxFlow.Components.Sources.Tests/SourcesTestSink.cs diff --git a/tests/FluxFlow.Components.Sources.Tests/TrackingFakeTimeProvider.cs b/tests/Unit/Components/Sources/FluxFlow.Components.Sources.Tests/TrackingFakeTimeProvider.cs similarity index 100% rename from tests/FluxFlow.Components.Sources.Tests/TrackingFakeTimeProvider.cs rename to tests/Unit/Components/Sources/FluxFlow.Components.Sources.Tests/TrackingFakeTimeProvider.cs diff --git a/tests/Unit/Components/State/FluxFlow.Components.State.Composition.Tests/FluxFlow.Components.State.Composition.Tests.csproj b/tests/Unit/Components/State/FluxFlow.Components.State.Composition.Tests/FluxFlow.Components.State.Composition.Tests.csproj new file mode 100644 index 00000000..0f581dcb --- /dev/null +++ b/tests/Unit/Components/State/FluxFlow.Components.State.Composition.Tests/FluxFlow.Components.State.Composition.Tests.csproj @@ -0,0 +1,31 @@ + + + + net10.0 + false + + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/FluxFlow.Components.State.Composition.Tests/StateServiceCollectionExtensionsTests.cs b/tests/Unit/Components/State/FluxFlow.Components.State.Composition.Tests/StateServiceCollectionExtensionsTests.cs similarity index 96% rename from tests/FluxFlow.Components.State.Composition.Tests/StateServiceCollectionExtensionsTests.cs rename to tests/Unit/Components/State/FluxFlow.Components.State.Composition.Tests/StateServiceCollectionExtensionsTests.cs index 04c2c9c0..b0437284 100644 --- a/tests/FluxFlow.Components.State.Composition.Tests/StateServiceCollectionExtensionsTests.cs +++ b/tests/Unit/Components/State/FluxFlow.Components.State.Composition.Tests/StateServiceCollectionExtensionsTests.cs @@ -44,10 +44,8 @@ public void AddState_registers_only_the_canonical_contract() StateComponentDefinition.Ports.Output, "Events" ], ignoreOrder: false); - reducer.Inputs[StateComponentDefinition.Ports.Input].MessageType - .ShouldBe(typeof(StateReducerInput)); - reducer.Outputs[StateComponentDefinition.Ports.Output].MessageType - .ShouldBe(typeof(StateReducerResult)); + reducer.Inputs[StateComponentDefinition.Ports.Input].MessageType.ShouldBe(typeof(FlowValue)); + reducer.Outputs[StateComponentDefinition.Ports.Output].MessageType.ShouldBe(typeof(FlowValue)); } [Fact] @@ -101,11 +99,11 @@ public void Design_metadata_provider_describes_canonical_state_ports() port.ValueType?.Value, port.IsPrimary)).ShouldBe([ (StateComponentDefinition.Ports.Input, PortDirection.Input, 0, - "StateReducerInput", true), + nameof(FlowValue), true), (StateComponentDefinition.Ports.Output, PortDirection.Output, 1, - "StateReducerResult", true), + nameof(FlowValue), true), (StateComponentDefinition.Ports.Events, PortDirection.Output, 2, - nameof(ComponentEvent), false) + nameof(global::FluxFlow.Data.FlowValue), false) ], ignoreOrder: false); } @@ -194,7 +192,7 @@ await WithNodeAsync( var firstReceive = ports.ReceiveAsync>( Output, Timeout); - var eventReceive = ports.ReceiveAsync(Events, Timeout); + var eventReceive = ports.ReceiveAsync(Events, Timeout); var first = FlowMessage.Create( new StateReducerInput { @@ -233,9 +231,9 @@ await WithNodeAsync( var @event = (await eventReceive).Message.ShouldNotBeNull(); @event.CorrelationId.ShouldBe(first.CorrelationId); - @event.Value.Name.ShouldBe(StateDiagnosticNames.ReducerUpdated); - @event.Value.Attributes["engine"].ShouldBe("sample"); - @event.Value.Attributes["expressionName"].ShouldBe("counter"); + @event.ToFlowEvent().Name.ShouldBe(StateDiagnosticNames.ReducerUpdated); + @event.ToFlowEvent().Attributes["engine"].ShouldBe("sample"); + @event.ToFlowEvent().Attributes["expressionName"].ShouldBe("counter"); }, Properties( ("reducer", "count"), @@ -256,7 +254,7 @@ await WithNodeAsync( var resultReceive = ports.ReceiveAsync>( Output, Timeout); - var eventReceive = ports.ReceiveAsync(Events, Timeout); + var eventReceive = ports.ReceiveAsync(Events, Timeout); var message = FlowMessage.Create(new StateReducerInput { Key = "ignored", @@ -273,8 +271,8 @@ await WithNodeAsync( result.Value.Key.ShouldBe("orders/created"); result.Value.NewState.GetString().ShouldBe("payload"); var @event = (await eventReceive).Message.ShouldNotBeNull(); - @event.Value.Attributes["expressionId"].ShouldBe("state-1"); - @event.Value.Attributes["expressionName"].ShouldBe("last payload"); + @event.ToFlowEvent().Attributes["expressionId"].ShouldBe("state-1"); + @event.ToFlowEvent().Attributes["expressionName"].ShouldBe("last payload"); }, Properties( ("reducer", "last-input"), diff --git a/tests/FluxFlow.Components.State.Tests/FluxFlow.Components.State.Tests.csproj b/tests/Unit/Components/State/FluxFlow.Components.State.Tests/FluxFlow.Components.State.Tests.csproj similarity index 62% rename from tests/FluxFlow.Components.State.Tests/FluxFlow.Components.State.Tests.csproj rename to tests/Unit/Components/State/FluxFlow.Components.State.Tests/FluxFlow.Components.State.Tests.csproj index d09d3887..e44f4af6 100644 --- a/tests/FluxFlow.Components.State.Tests/FluxFlow.Components.State.Tests.csproj +++ b/tests/Unit/Components/State/FluxFlow.Components.State.Tests/FluxFlow.Components.State.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,9 +6,9 @@ - - - + + + diff --git a/tests/FluxFlow.Components.State.Tests/StateContractTests.cs b/tests/Unit/Components/State/FluxFlow.Components.State.Tests/StateContractTests.cs similarity index 100% rename from tests/FluxFlow.Components.State.Tests/StateContractTests.cs rename to tests/Unit/Components/State/FluxFlow.Components.State.Tests/StateContractTests.cs diff --git a/tests/FluxFlow.Components.State.Tests/StateOptionsTests.cs b/tests/Unit/Components/State/FluxFlow.Components.State.Tests/StateOptionsTests.cs similarity index 100% rename from tests/FluxFlow.Components.State.Tests/StateOptionsTests.cs rename to tests/Unit/Components/State/FluxFlow.Components.State.Tests/StateOptionsTests.cs diff --git a/tests/FluxFlow.Components.State.Tests/StateReducerNodeTests.cs b/tests/Unit/Components/State/FluxFlow.Components.State.Tests/StateReducerNodeTests.cs similarity index 60% rename from tests/FluxFlow.Components.State.Tests/StateReducerNodeTests.cs rename to tests/Unit/Components/State/FluxFlow.Components.State.Tests/StateReducerNodeTests.cs index 82eb1618..6dd3d442 100644 --- a/tests/FluxFlow.Components.State.Tests/StateReducerNodeTests.cs +++ b/tests/Unit/Components/State/FluxFlow.Components.State.Tests/StateReducerNodeTests.cs @@ -3,6 +3,7 @@ using FluxFlow.Components.State.Diagnostics; using FluxFlow.Components.State.Nodes; using FluxFlow.Components.State.Options; +using FluxFlow.Data; using FluxFlow.Mapping; using FluxFlow.Nodes; using Microsoft.Extensions.Time.Testing; @@ -24,9 +25,9 @@ public async Task Reduce_preserves_order_typed_state_and_message_lineage() new NumericExpressionEngine(), new FakeTimeProvider(timestamp)); var results = Link(node.Output); - var first = FlowMessage.Create(Command("counter", 2)); - var second = FlowMessage.Create(Command("counter", 3)); - var other = FlowMessage.Create(Command("other", 4)); + var first = StateMessage(Command("counter", 2)); + var second = StateMessage(Command("counter", 3)); + var other = StateMessage(Command("other", 4)); await node.Input.SendAsync(first); await node.Input.SendAsync(second); @@ -37,23 +38,23 @@ public async Task Reduce_preserves_order_typed_state_and_message_lineage() var otherResult = await results.ReceiveAsync().WaitAsync(WaitTimeout); firstResult.IsError.ShouldBeFalse(); - firstResult.Value.PreviousState.ShouldBe(0); - firstResult.Value.NewState.ShouldBe(2); - firstResult.Value.Version.ShouldBe(1); - firstResult.Value.UpdatedAt.ShouldBe(timestamp); + firstResult.Value.Deserialize>()!.PreviousState.ShouldBe(0); + firstResult.Value.Deserialize>()!.NewState.ShouldBe(2); + firstResult.Value.Deserialize>()!.Version.ShouldBe(1); + firstResult.Value.Deserialize>()!.UpdatedAt.ShouldBe(timestamp); firstResult.CorrelationId.ShouldBe(first.CorrelationId); firstResult.TraceId.ShouldBe(first.TraceId); firstResult.CausationId.ShouldBe(first.MessageId); - secondResult.Value.PreviousState.ShouldBe(2); - secondResult.Value.NewState.ShouldBe(5); - secondResult.Value.Version.ShouldBe(2); + secondResult.Value!.Deserialize>()!.PreviousState.ShouldBe(2); + secondResult.Value.Deserialize>()!.NewState.ShouldBe(5); + secondResult.Value.Deserialize>()!.Version.ShouldBe(2); secondResult.CorrelationId.ShouldBe(second.CorrelationId); - otherResult.Value.Key.ShouldBe("other"); - otherResult.Value.PreviousState.ShouldBe(0); - otherResult.Value.NewState.ShouldBe(4); - otherResult.Value.Version.ShouldBe(1); + otherResult.Value!.Deserialize>()!.Key.ShouldBe("other"); + otherResult.Value.Deserialize>()!.PreviousState.ShouldBe(0); + otherResult.Value.Deserialize>()!.NewState.ShouldBe(4); + otherResult.Value.Deserialize>()!.Version.ShouldBe(1); } [Fact] @@ -64,38 +65,38 @@ public async Task Reset_and_clear_are_successful_domain_results() new NumericExpressionEngine()); var results = Link(node.Output); - await node.Input.SendAsync(FlowMessage.Create(Command("counter", 2))); + await node.Input.SendAsync(StateMessage(Command("counter", 2))); await results.ReceiveAsync().WaitAsync(WaitTimeout); - await node.Input.SendAsync(FlowMessage.Create(new StateReducerInput + await node.Input.SendAsync(StateMessage(new StateReducerInput { Key = "counter", InitialState = 10, Operation = StateReducerOperation.Reset })); - await node.Input.SendAsync(FlowMessage.Create(new StateReducerInput + await node.Input.SendAsync(StateMessage(new StateReducerInput { Key = "counter", Operation = StateReducerOperation.Clear })); - await node.Input.SendAsync(FlowMessage.Create(Command("counter", 4))); + await node.Input.SendAsync(StateMessage(Command("counter", 4))); var reset = await results.ReceiveAsync().WaitAsync(WaitTimeout); var cleared = await results.ReceiveAsync().WaitAsync(WaitTimeout); var afterClear = await results.ReceiveAsync().WaitAsync(WaitTimeout); - reset.Value.PreviousState.ShouldBe(3); - reset.Value.NewState.ShouldBe(10); - reset.Value.Operation.ShouldBe(StateReducerOperation.Reset); - reset.Value.Version.ShouldBe(2); + reset.Value!.Deserialize>()!.PreviousState.ShouldBe(3); + reset.Value.Deserialize>()!.NewState.ShouldBe(10); + reset.Value.Deserialize>()!.Operation.ShouldBe(StateReducerOperation.Reset); + reset.Value.Deserialize>()!.Version.ShouldBe(2); - cleared.Value.PreviousState.ShouldBe(10); - cleared.Value.NewState.ShouldBeNull(); - cleared.Value.Operation.ShouldBe(StateReducerOperation.Clear); - cleared.Value.Version.ShouldBe(3); + cleared.Value!.Deserialize>()!.PreviousState.ShouldBe(10); + cleared.Value.Deserialize>()!.NewState.ShouldBeNull(); + cleared.Value.Deserialize>()!.Operation.ShouldBe(StateReducerOperation.Clear); + cleared.Value.Deserialize>()!.Version.ShouldBe(3); - afterClear.Value.PreviousState.ShouldBe(1); - afterClear.Value.NewState.ShouldBe(5); - afterClear.Value.Version.ShouldBe(1); + afterClear.Value!.Deserialize>()!.PreviousState.ShouldBe(1); + afterClear.Value.Deserialize>()!.NewState.ShouldBe(5); + afterClear.Value.Deserialize>()!.Version.ShouldBe(1); } [Fact] @@ -105,10 +106,10 @@ public async Task Reducer_failure_is_in_band_and_later_input_continues() Options("fail-negative") with { InitialState = 0 }, new NumericExpressionEngine()); var results = Link(node.Output); - var rejected = FlowMessage.Create(Command("counter", -1)); + var rejected = StateMessage(Command("counter", -1)); await node.Input.SendAsync(rejected); - await node.Input.SendAsync(FlowMessage.Create(Command("counter", 4))); + await node.Input.SendAsync(StateMessage(Command("counter", 4))); var failure = await results.ReceiveAsync().WaitAsync(WaitTimeout); var success = await results.ReceiveAsync().WaitAsync(WaitTimeout); @@ -116,9 +117,9 @@ public async Task Reducer_failure_is_in_band_and_later_input_continues() failure.IsError.ShouldBeTrue(); failure.Error!.Code.ShouldBe(StateErrorCodeNames.ReducerFailed); failure.CorrelationId.ShouldBe(rejected.CorrelationId); - success.Value.PreviousState.ShouldBe(0); - success.Value.NewState.ShouldBe(4); - success.Value.Version.ShouldBe(1); + success.Value!.Deserialize>()!.PreviousState.ShouldBe(0); + success.Value.Deserialize>()!.NewState.ShouldBe(4); + success.Value.Deserialize>()!.Version.ShouldBe(1); } [Fact] @@ -129,14 +130,14 @@ public async Task Key_expression_and_key_limit_use_typed_input_variables() new NumericExpressionEngine()); var results = Link(node.Output); - await node.Input.SendAsync(FlowMessage.Create(Command("ignored", 1, "first"))); - await node.Input.SendAsync(FlowMessage.Create(Command("ignored", 2, "second"))); + await node.Input.SendAsync(StateMessage(Command("ignored", 1, "first"))); + await node.Input.SendAsync(StateMessage(Command("ignored", 2, "second"))); var first = await results.ReceiveAsync().WaitAsync(WaitTimeout); var second = await results.ReceiveAsync().WaitAsync(WaitTimeout); - first.Value.Key.ShouldBe("first"); - first.Value.NewState.ShouldBe(1); + first.Value!.Deserialize>()!.Key.ShouldBe("first"); + first.Value.Deserialize>()!.NewState.ShouldBe(1); second.IsError.ShouldBeTrue(); second.Error!.Code.ShouldBe(StateErrorCodeNames.KeyLimitReached); } @@ -154,7 +155,7 @@ public async Task Incoming_error_is_propagated() "State", isTransient: false); - await node.Input.SendAsync(FlowMessage.CreateError>(error)); + await node.Input.SendAsync(FlowMessage.CreateError(error)); var failure = await results.ReceiveAsync().WaitAsync(WaitTimeout); failure.IsError.ShouldBeTrue(); @@ -170,13 +171,13 @@ public async Task Output_fans_out_every_result_to_every_consumer() var firstConsumer = Link(node.Output); var secondConsumer = Link(node.Output); - await node.Input.SendAsync(FlowMessage.Create(Command("counter", 1))); - await node.Input.SendAsync(FlowMessage.Create(Command("counter", 2))); + await node.Input.SendAsync(StateMessage(Command("counter", 1))); + await node.Input.SendAsync(StateMessage(Command("counter", 2))); - (await firstConsumer.ReceiveAsync().WaitAsync(WaitTimeout)).Value.Version.ShouldBe(1); - (await firstConsumer.ReceiveAsync().WaitAsync(WaitTimeout)).Value.Version.ShouldBe(2); - (await secondConsumer.ReceiveAsync().WaitAsync(WaitTimeout)).Value.Version.ShouldBe(1); - (await secondConsumer.ReceiveAsync().WaitAsync(WaitTimeout)).Value.Version.ShouldBe(2); + (await firstConsumer.ReceiveAsync().WaitAsync(WaitTimeout)).Value!.Deserialize>()!.Version.ShouldBe(1); + (await firstConsumer.ReceiveAsync().WaitAsync(WaitTimeout)).Value!.Deserialize>()!.Version.ShouldBe(2); + (await secondConsumer.ReceiveAsync().WaitAsync(WaitTimeout)).Value!.Deserialize>()!.Version.ShouldBe(1); + (await secondConsumer.ReceiveAsync().WaitAsync(WaitTimeout)).Value!.Deserialize>()!.Version.ShouldBe(2); } [Fact] @@ -187,14 +188,15 @@ public async Task Command_initial_state_overrides_the_option_for_a_new_key() new NumericExpressionEngine()); var results = Link(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new StateReducerInput + await node.Input.SendAsync(StateMessage(new StateReducerInput { Key = "counter", Input = 2, InitialState = 20 })); - var result = (await results.ReceiveAsync().WaitAsync(WaitTimeout)).Value; + var result = (await results.ReceiveAsync().WaitAsync(WaitTimeout)) + .Value!.Deserialize>()!; result.PreviousState.ShouldBe(20); result.NewState.ShouldBe(22); } @@ -206,21 +208,21 @@ public async Task Unsupported_operation_is_in_band_and_later_input_continues() Options("sum") with { InitialState = 0 }, new NumericExpressionEngine()); var results = Link(node.Output); - var invalid = FlowMessage.Create(new StateReducerInput + var invalid = StateMessage(new StateReducerInput { Key = "counter", Operation = (StateReducerOperation)999 }); await node.Input.SendAsync(invalid); - await node.Input.SendAsync(FlowMessage.Create(Command("counter", 3))); + await node.Input.SendAsync(StateMessage(Command("counter", 3))); var failure = await results.ReceiveAsync().WaitAsync(WaitTimeout); var success = await results.ReceiveAsync().WaitAsync(WaitTimeout); failure.CorrelationId.ShouldBe(invalid.CorrelationId); failure.Error!.Code.ShouldBe(StateErrorCodeNames.InvalidMessage); - success.Value.NewState.ShouldBe(3); - success.Value.Version.ShouldBe(1); + success.Value!.Deserialize>()!.NewState.ShouldBe(3); + success.Value.Deserialize>()!.Version.ShouldBe(1); node.Completion.IsFaulted.ShouldBeFalse(); } @@ -232,18 +234,18 @@ public async Task Successful_operation_emits_correlated_diagnostic_metadata() new NumericExpressionEngine()); var results = Link(node.Output); var events = Link(node.Events); - var message = FlowMessage.Create(Command("counter", 4)); + var message = StateMessage(Command("counter", 4)); await node.Input.SendAsync(message); await results.ReceiveAsync().WaitAsync(WaitTimeout); var @event = await events.ReceiveAsync().WaitAsync(WaitTimeout); @event.CorrelationId.ShouldBe(message.CorrelationId); - @event.Name.ShouldBe(StateDiagnosticNames.ReducerUpdated); - @event.Attributes["engine"].ShouldBe("numeric"); - @event.Attributes["expressionName"].ShouldBe("latest value"); - @event.Attributes["key"].ShouldBe("counter"); - @event.Attributes["version"].ShouldBe(1L); + @event.ToFlowEvent().Name.ShouldBe(StateDiagnosticNames.ReducerUpdated); + @event.ToFlowEvent().Attributes["engine"].ShouldBe("numeric"); + @event.ToFlowEvent().Attributes["expressionName"].ShouldBe("latest value"); + @event.ToFlowEvent().Attributes["key"].ShouldBe("counter"); + @event.ToFlowEvent().Attributes["version"].ShouldBe(1L); } [Fact] @@ -267,9 +269,38 @@ public void Input_variables_are_copied_with_ordinal_keys() input.Variables.ContainsKey("name").ShouldBeFalse(); } + [Fact] + public async Task Reducer_rejects_malformed_value_without_faulting_and_accepts_later_input() + { + await using var node = new StateReducerNode( + Options("last-input"), + new NumericExpressionEngine()); + var results = Link(node.Output); + var events = Link(node.Events); + + await node.Input.SendAsync(FlowMessage.Create(FlowValue.From("invalid"))); + await node.Input.SendAsync(StateMessage(Command("counter", 3))); + + var rejection = await results.ReceiveAsync().WaitAsync(WaitTimeout); + rejection.IsError.ShouldBeTrue(); + (await events.ReceiveAsync().WaitAsync(WaitTimeout)).ToFlowEvent().Name + .ShouldBe("state.reducer.rejected"); + var success = await results.ReceiveAsync().WaitAsync(WaitTimeout); + success.Value!.Deserialize>()!.NewState.ShouldBe(3); + node.Completion.IsFaulted.ShouldBeFalse(); + } + private static StateReducerOptions Options(string reducer) => new() { Reducer = reducer }; + private static FlowMessage StateMessage(StateReducerInput input) + => FlowMessage.Create(FlowValue.From( + input, + new System.Text.Json.JsonSerializerOptions(System.Text.Json.JsonSerializerDefaults.Web) + { + DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull + })); + private static StateReducerInput Command( string key, long input, diff --git a/tests/FluxFlow.Components.Storage.Adapters.Tests/FluxFlow.Components.Storage.Adapters.Tests.csproj b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.Adapters.Tests/FluxFlow.Components.Storage.Adapters.Tests.csproj similarity index 68% rename from tests/FluxFlow.Components.Storage.Adapters.Tests/FluxFlow.Components.Storage.Adapters.Tests.csproj rename to tests/Unit/Components/Storage/FluxFlow.Components.Storage.Adapters.Tests/FluxFlow.Components.Storage.Adapters.Tests.csproj index d061dcd6..1496458b 100644 --- a/tests/FluxFlow.Components.Storage.Adapters.Tests/FluxFlow.Components.Storage.Adapters.Tests.csproj +++ b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.Adapters.Tests/FluxFlow.Components.Storage.Adapters.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,8 +6,8 @@ - - + + diff --git a/tests/FluxFlow.Components.Storage.Adapters.Tests/StorageAdapterRegistrationTests.cs b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.Adapters.Tests/StorageAdapterRegistrationTests.cs similarity index 100% rename from tests/FluxFlow.Components.Storage.Adapters.Tests/StorageAdapterRegistrationTests.cs rename to tests/Unit/Components/Storage/FluxFlow.Components.Storage.Adapters.Tests/StorageAdapterRegistrationTests.cs diff --git a/tests/Unit/Components/Storage/FluxFlow.Components.Storage.Composition.Tests/FluxFlow.Components.Storage.Composition.Tests.csproj b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.Composition.Tests/FluxFlow.Components.Storage.Composition.Tests.csproj new file mode 100644 index 00000000..56f2431b --- /dev/null +++ b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.Composition.Tests/FluxFlow.Components.Storage.Composition.Tests.csproj @@ -0,0 +1,29 @@ + + + + net10.0 + false + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/FluxFlow.Components.Storage.Composition.Tests/StorageServiceCollectionExtensionsTests.cs b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.Composition.Tests/StorageServiceCollectionExtensionsTests.cs similarity index 96% rename from tests/FluxFlow.Components.Storage.Composition.Tests/StorageServiceCollectionExtensionsTests.cs rename to tests/Unit/Components/Storage/FluxFlow.Components.Storage.Composition.Tests/StorageServiceCollectionExtensionsTests.cs index 27b5251f..acc82094 100644 --- a/tests/FluxFlow.Components.Storage.Composition.Tests/StorageServiceCollectionExtensionsTests.cs +++ b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.Composition.Tests/StorageServiceCollectionExtensionsTests.cs @@ -40,34 +40,27 @@ public void AddStorage_registers_canonical_metadata() var registry = ComponentCatalogTestHost.Create(AddStorage); var put = registry.Components[StorageComponentDefinition.Types.Put]; - put.Inputs[StorageComponentDefinition.Ports.Input].MessageType - .ShouldBe(typeof(StorageContentPutRequest)); - put.Outputs[StorageComponentDefinition.Ports.Output].MessageType - .ShouldBe(typeof(StoragePutOutcome)); + put.Inputs[StorageComponentDefinition.Ports.Input].MessageType.ShouldBe(typeof(FlowValue)); + put.Outputs[StorageComponentDefinition.Ports.Output].MessageType.ShouldBe(typeof(FlowValue)); var get = registry.Components[StorageComponentDefinition.Types.Get]; - get.Inputs[StorageComponentDefinition.Ports.Input].MessageType - .ShouldBe(typeof(StorageGetRequest)); + get.Inputs[StorageComponentDefinition.Ports.Input].MessageType.ShouldBe(typeof(FlowValue)); get.Outputs.Keys.ShouldBe([ StorageComponentDefinition.Ports.Output, "Events" ], ignoreOrder: false); - get.Outputs[StorageComponentDefinition.Ports.Output].MessageType - .ShouldBe(typeof(StorageGetOutcome)); + get.Outputs[StorageComponentDefinition.Ports.Output].MessageType.ShouldBe(typeof(FlowValue)); var query = registry.Components[StorageComponentDefinition.Types.Query]; - query.Inputs[StorageComponentDefinition.Ports.Input].MessageType - .ShouldBe(typeof(StorageQueryRequest)); + query.Inputs[StorageComponentDefinition.Ports.Input].MessageType.ShouldBe(typeof(FlowValue)); query.Outputs.Keys.ShouldBe([ StorageComponentDefinition.Ports.Output, "Events" ], ignoreOrder: false); - query.Outputs[StorageComponentDefinition.Ports.Output].MessageType - .ShouldBe(typeof(StorageQueryOutcome)); + query.Outputs[StorageComponentDefinition.Ports.Output].MessageType.ShouldBe(typeof(FlowValue)); var delete = registry.Components[StorageComponentDefinition.Types.Delete]; - delete.Outputs[StorageComponentDefinition.Ports.Output].MessageType - .ShouldBe(typeof(StorageDeleteOutcome)); + delete.Outputs[StorageComponentDefinition.Ports.Output].MessageType.ShouldBe(typeof(FlowValue)); } [Fact] @@ -200,7 +193,7 @@ await WithNodeAsync( var resultReceive = ports.ReceiveAsync( Output, Timeout); - var eventReceive = ports.ReceiveAsync( + var eventReceive = ports.ReceiveAsync( Events, Timeout); @@ -214,8 +207,8 @@ await WithNodeAsync( result.Value.Record.ShouldNotBeNull() .Content.Bytes.AsSpan().ToArray().ShouldBe([0x00, 0xFF]); var @event = (await eventReceive).Message.ShouldNotBeNull().Value; - @event.Name.ShouldBe(StorageDiagnosticNames.PutStored); - @event.Timestamp.ShouldBe(timestamp); + @event.ToFlowEvent().Name.ShouldBe(StorageDiagnosticNames.PutStored); + @event.ToFlowEvent().Timestamp.ShouldBe(timestamp); await host.RevisionHost.StopAsync(); }, Properties( @@ -599,11 +592,11 @@ private static void AssertTransformPorts( metadata.Ports[^1].Name.Value.ShouldBe("Events"); metadata.Ports[0].Name.Value.ShouldBe(StorageComponentDefinition.Ports.Input); metadata.Ports[0].Direction.ShouldBe(PortDirection.Input); - metadata.Ports[0].ValueType?.Value.ShouldBe(inputType); + metadata.Ports[0].ValueType?.Value.ShouldBe(nameof(FlowValue)); metadata.Ports[0].IsPrimary.ShouldBeTrue(); metadata.Ports[1].Name.Value.ShouldBe(StorageComponentDefinition.Ports.Output); metadata.Ports[1].Direction.ShouldBe(PortDirection.Output); - metadata.Ports[1].ValueType?.Value.ShouldBe(outputType); + metadata.Ports[1].ValueType?.Value.ShouldBe(nameof(FlowValue)); metadata.Ports[1].IsPrimary.ShouldBeTrue(); } @@ -651,11 +644,12 @@ private static async Task SeedContentAsync( store, new StoragePutOptions { Collection = collection }); var output = Link(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new StorageContentPutRequest - { - Key = key, - Content = FlowContent.FromBytes(bytes, "application/octet-stream") - })); + await node.Input.SendAsync(FlowMessage.Create( + FlowValue.From(new StorageContentPutRequest + { + Key = key, + Content = FlowContent.FromBytes(bytes, "application/octet-stream") + }))); (await output.ReceiveAsync().WaitAsync(Timeout)).IsError.ShouldBeFalse(); } diff --git a/tests/FluxFlow.Components.Storage.FileSystem.Tests/FileSystemStorageStoreTests.cs b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.FileSystem.Tests/FileSystemStorageStoreTests.cs similarity index 98% rename from tests/FluxFlow.Components.Storage.FileSystem.Tests/FileSystemStorageStoreTests.cs rename to tests/Unit/Components/Storage/FluxFlow.Components.Storage.FileSystem.Tests/FileSystemStorageStoreTests.cs index f31ced1c..0d34437f 100644 --- a/tests/FluxFlow.Components.Storage.FileSystem.Tests/FileSystemStorageStoreTests.cs +++ b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.FileSystem.Tests/FileSystemStorageStoreTests.cs @@ -23,7 +23,7 @@ public async Task Canonical_nodes_round_trip_exact_content_across_store_instance new StoragePutOptions { Collection = "items" })) { var output = Link(put.Output); - await put.Input.SendAsync(FlowMessage.Create(new StorageContentPutRequest + await put.Input.SendAsync(Message(new StorageContentPutRequest { Key = "content", Content = FlowContent.FromBytes(bytes, "application/octet-stream", "binary") @@ -35,9 +35,9 @@ await put.Input.SendAsync(FlowMessage.Create(new StorageContentPutRequest CreateStore(temp.Path), new StorageGetOptions { Collection = "items" }); var results = Link(get.Output); - await get.Input.SendAsync(FlowMessage.Create(new StorageGetRequest { Key = "content" })); + await get.Input.SendAsync(Message(new StorageGetRequest { Key = "content" })); - var record = (await results.ReceiveAsync()).Value.Record.ShouldNotBeNull(); + var record = (await results.ReceiveAsync()).Value!.Deserialize()!.Record.ShouldNotBeNull(); record.Content.Bytes.AsSpan().ToArray().ShouldBe(bytes); record.Content.ContentType.ShouldBe("application/octet-stream"); record.Content.Encoding.ShouldBe("binary"); @@ -1003,6 +1003,9 @@ public void Options_NormalizeTextFieldsAndRejectInvalidValueLimit() }); } + private static FlowMessage Message(T value) + => FlowMessage.Create(FlowValue.From(value)); + private static BufferBlock Link(ISourceBlock source) { var buffer = new BufferBlock(); diff --git a/tests/FluxFlow.Components.Storage.FileSystem.Tests/FluxFlow.Components.Storage.FileSystem.Tests.csproj b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.FileSystem.Tests/FluxFlow.Components.Storage.FileSystem.Tests.csproj similarity index 68% rename from tests/FluxFlow.Components.Storage.FileSystem.Tests/FluxFlow.Components.Storage.FileSystem.Tests.csproj rename to tests/Unit/Components/Storage/FluxFlow.Components.Storage.FileSystem.Tests/FluxFlow.Components.Storage.FileSystem.Tests.csproj index 6ef7e5e3..a8b56f61 100644 --- a/tests/FluxFlow.Components.Storage.FileSystem.Tests/FluxFlow.Components.Storage.FileSystem.Tests.csproj +++ b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.FileSystem.Tests/FluxFlow.Components.Storage.FileSystem.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,8 +6,8 @@ - - + + diff --git a/tests/FluxFlow.Components.Storage.SqlFile.Tests/FluxFlow.Components.Storage.SqlFile.Tests.csproj b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.SqlFile.Tests/FluxFlow.Components.Storage.SqlFile.Tests.csproj similarity index 77% rename from tests/FluxFlow.Components.Storage.SqlFile.Tests/FluxFlow.Components.Storage.SqlFile.Tests.csproj rename to tests/Unit/Components/Storage/FluxFlow.Components.Storage.SqlFile.Tests/FluxFlow.Components.Storage.SqlFile.Tests.csproj index e1bbce89..471a99e3 100644 --- a/tests/FluxFlow.Components.Storage.SqlFile.Tests/FluxFlow.Components.Storage.SqlFile.Tests.csproj +++ b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.SqlFile.Tests/FluxFlow.Components.Storage.SqlFile.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,8 +6,8 @@ - - + + diff --git a/tests/FluxFlow.Components.Storage.SqlFile.Tests/SqlFileStorageStoreTests.cs b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.SqlFile.Tests/SqlFileStorageStoreTests.cs similarity index 98% rename from tests/FluxFlow.Components.Storage.SqlFile.Tests/SqlFileStorageStoreTests.cs rename to tests/Unit/Components/Storage/FluxFlow.Components.Storage.SqlFile.Tests/SqlFileStorageStoreTests.cs index 2fee196a..ef0b5753 100644 --- a/tests/FluxFlow.Components.Storage.SqlFile.Tests/SqlFileStorageStoreTests.cs +++ b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.SqlFile.Tests/SqlFileStorageStoreTests.cs @@ -25,7 +25,7 @@ public async Task Canonical_nodes_round_trip_exact_content_across_store_instance new StoragePutOptions { Collection = "items" })) { var output = Link(put.Output); - await put.Input.SendAsync(FlowMessage.Create(new StorageContentPutRequest + await put.Input.SendAsync(Message(new StorageContentPutRequest { Key = "content", Content = FlowContent.FromBytes(bytes, "application/octet-stream", "binary") @@ -38,9 +38,9 @@ await put.Input.SendAsync(FlowMessage.Create(new StorageContentPutRequest reopened, new StorageGetOptions { Collection = "items" }); var results = Link(get.Output); - await get.Input.SendAsync(FlowMessage.Create(new StorageGetRequest { Key = "content" })); + await get.Input.SendAsync(Message(new StorageGetRequest { Key = "content" })); - var record = (await results.ReceiveAsync()).Value.Record.ShouldNotBeNull(); + var record = (await results.ReceiveAsync()).Value!.Deserialize()!.Record.ShouldNotBeNull(); record.Content.Bytes.AsSpan().ToArray().ShouldBe(bytes); record.Content.ContentType.ShouldBe("application/octet-stream"); record.Content.Encoding.ShouldBe("binary"); @@ -1034,6 +1034,9 @@ public void Options_ValidateDatabasePath() })); } + private static FlowMessage Message(T value) + => FlowMessage.Create(FlowValue.From(value)); + private static BufferBlock Link(ISourceBlock source) { var buffer = new BufferBlock(); diff --git a/tests/FluxFlow.Components.Storage.Tests/FluxFlow.Components.Storage.Tests.csproj b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.Tests/FluxFlow.Components.Storage.Tests.csproj similarity index 69% rename from tests/FluxFlow.Components.Storage.Tests/FluxFlow.Components.Storage.Tests.csproj rename to tests/Unit/Components/Storage/FluxFlow.Components.Storage.Tests/FluxFlow.Components.Storage.Tests.csproj index 9c56869e..223f12e5 100644 --- a/tests/FluxFlow.Components.Storage.Tests/FluxFlow.Components.Storage.Tests.csproj +++ b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.Tests/FluxFlow.Components.Storage.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,8 +6,8 @@ - - + + diff --git a/tests/FluxFlow.Components.Storage.Tests/InMemoryStorageStore.cs b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.Tests/InMemoryStorageStore.cs similarity index 100% rename from tests/FluxFlow.Components.Storage.Tests/InMemoryStorageStore.cs rename to tests/Unit/Components/Storage/FluxFlow.Components.Storage.Tests/InMemoryStorageStore.cs diff --git a/tests/FluxFlow.Components.Storage.Tests/StorageComponentOptionsTests.cs b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.Tests/StorageComponentOptionsTests.cs similarity index 100% rename from tests/FluxFlow.Components.Storage.Tests/StorageComponentOptionsTests.cs rename to tests/Unit/Components/Storage/FluxFlow.Components.Storage.Tests/StorageComponentOptionsTests.cs diff --git a/tests/FluxFlow.Components.Storage.Tests/StorageNodeOptionsTests.cs b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.Tests/StorageNodeOptionsTests.cs similarity index 100% rename from tests/FluxFlow.Components.Storage.Tests/StorageNodeOptionsTests.cs rename to tests/Unit/Components/Storage/FluxFlow.Components.Storage.Tests/StorageNodeOptionsTests.cs diff --git a/tests/FluxFlow.Components.Storage.Tests/StorageNodeTests.cs b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.Tests/StorageNodeTests.cs similarity index 80% rename from tests/FluxFlow.Components.Storage.Tests/StorageNodeTests.cs rename to tests/Unit/Components/Storage/FluxFlow.Components.Storage.Tests/StorageNodeTests.cs index 5001b19d..f81354d1 100644 --- a/tests/FluxFlow.Components.Storage.Tests/StorageNodeTests.cs +++ b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.Tests/StorageNodeTests.cs @@ -29,7 +29,7 @@ public async Task Put_and_get_preserve_exact_content_metadata_and_lineage() new StoragePutOptions { Collection = "items" }, clock); var putOutput = StorageTestSink.Link(put.Output); - var input = FlowMessage.Create( + var input = StorageRequest( new StorageContentPutRequest { Key = "a", @@ -50,7 +50,7 @@ public async Task Put_and_get_preserve_exact_content_metadata_and_lineage() putMessage.TraceId.ShouldBe(input.TraceId); putMessage.CausationId.ShouldBe(input.MessageId); putMessage.IsError.ShouldBeFalse(); - var stored = putMessage.Value; + var stored = putMessage.Value.Deserialize()!; stored.Record.ShouldNotBeNull().Content.Bytes.AsSpan().ToArray().ShouldBe(bytes); stored.Record.Content.ContentType.ShouldBe("application/vnd.example.record"); stored.Record.Content.Encoding.ShouldBe("binary"); @@ -68,7 +68,7 @@ public async Task Put_and_get_preserve_exact_content_metadata_and_lineage() new StorageGetOptions { Collection = "items" }, clock); var getOutput = StorageTestSink.Link(get.Output); - var getInput = FlowMessage.Create( + var getInput = StorageRequest( new StorageGetRequest { Key = "a" }, input.CorrelationId, input.TraceId); @@ -78,7 +78,7 @@ public async Task Put_and_get_preserve_exact_content_metadata_and_lineage() var getMessage = await getOutput.ReceiveAsync().WaitAsync(Timeout); getMessage.CausationId.ShouldBe(getInput.MessageId); getMessage.IsError.ShouldBeFalse(); - var found = getMessage.Value; + var found = getMessage.Value.Deserialize()!; found.Found.ShouldBeTrue(); found.Record.ShouldNotBeNull().Content.Bytes.AsSpan().ToArray().ShouldBe(bytes); } @@ -97,8 +97,8 @@ public async Task Incoming_error_is_propagated_and_later_input_continues() "Upstream processing failed.", "test"); await node.Input.SendAsync( - FlowMessage.CreateError(upstreamError)); - await node.Input.SendAsync(FlowMessage.Create(new StorageContentPutRequest + FlowMessage.CreateError(upstreamError)); + await node.Input.SendAsync(StorageRequest(new StorageContentPutRequest { Key = "valid", Content = FlowContent.FromBytes(Encoding.UTF8.GetBytes("ok"), "text/plain", "utf-8") @@ -109,7 +109,7 @@ await node.Input.SendAsync(FlowMessage.Create(new StorageContentPutRequest failure.Error.ShouldBeSameAs(upstreamError); var success = await output.ReceiveAsync().WaitAsync(Timeout); success.IsError.ShouldBeFalse(); - success.Value.Key.ShouldBe("valid"); + success.Value.Deserialize()!.Key.ShouldBe("valid"); node.Completion.IsFaulted.ShouldBeFalse(); } @@ -134,14 +134,14 @@ public async Task Invalid_requests_are_normal_invalid_request_results() var queryOutput = StorageTestSink.Link(query.Output); var deleteOutput = StorageTestSink.Link(delete.Output); - await put.Input.SendAsync(FlowMessage.Create(new StorageContentPutRequest + await put.Input.SendAsync(StorageRequest(new StorageContentPutRequest { Key = " ", Content = FlowContent.FromBytes(new byte[] { 1 }) })); - await get.Input.SendAsync(FlowMessage.Create(new StorageGetRequest { Key = " " })); - await query.Input.SendAsync(FlowMessage.Create(new StorageQueryRequest { Offset = -1 })); - await delete.Input.SendAsync(FlowMessage.Create(new StorageDeleteRequest { Key = " " })); + await get.Input.SendAsync(StorageRequest(new StorageGetRequest { Key = " " })); + await query.Input.SendAsync(StorageRequest(new StorageQueryRequest { Offset = -1 })); + await delete.Input.SendAsync(StorageRequest(new StorageDeleteRequest { Key = " " })); (await putOutput.ReceiveAsync().WaitAsync(Timeout)).Error .ShouldNotBeNull().Code.ShouldBe(StorageErrorCodeNames.InvalidRequest); @@ -169,12 +169,12 @@ await store.PutAsync(new StoragePutRequest new StorageGetOptions { Collection = "items" }); var output = StorageTestSink.Link(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new StorageGetRequest { Key = "missing" })); - await node.Input.SendAsync(FlowMessage.Create(new StorageGetRequest { Key = "legacy" })); + await node.Input.SendAsync(StorageRequest(new StorageGetRequest { Key = "missing" })); + await node.Input.SendAsync(StorageRequest(new StorageGetRequest { Key = "legacy" })); var missing = await output.ReceiveAsync().WaitAsync(Timeout); missing.IsError.ShouldBeFalse(); - missing.Value.Found.ShouldBeFalse(); + missing.Value.Deserialize()!.Found.ShouldBeFalse(); var invalid = await output.ReceiveAsync().WaitAsync(Timeout); invalid.IsError.ShouldBeTrue(); @@ -202,14 +202,15 @@ await store.PutAsync(new StoragePutRequest new StorageGetOptions { Collection = "items" }); var output = StorageTestSink.Link(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new StorageGetRequest { Key = "existing" })); + await node.Input.SendAsync(StorageRequest(new StorageGetRequest { Key = "existing" })); var result = await output.ReceiveAsync().WaitAsync(Timeout); result.IsError.ShouldBeFalse(); - result.Value.Record.ShouldNotBeNull().Content.Bytes.AsSpan().ToArray() + var outcome = result.Value.Deserialize()!; + outcome.Record.ShouldNotBeNull().Content.Bytes.AsSpan().ToArray() .ShouldBe(new byte[] { 0, 127, 255 }); - result.Value.Record.Content.ContentType.ShouldBe("application/test"); - result.Value.Record.Content.Encoding.ShouldBe("binary"); + outcome.Record.Content.ContentType.ShouldBe("application/test"); + outcome.Record.Content.Encoding.ShouldBe("binary"); } [Fact] @@ -223,7 +224,7 @@ public async Task Query_returns_one_content_result_without_record_branching() var putOutput = StorageTestSink.Link(put.Output); foreach (var key in new[] { "a", "b" }) { - await put.Input.SendAsync(FlowMessage.Create(new StorageContentPutRequest + await put.Input.SendAsync(StorageRequest(new StorageContentPutRequest { Key = key, Content = FlowContent.FromBytes(Encoding.UTF8.GetBytes(key), "text/plain") @@ -236,9 +237,10 @@ await put.Input.SendAsync(FlowMessage.Create(new StorageContentPutRequest store, new StorageQueryOptions { Collection = "items" }); var queryOutput = StorageTestSink.Link(query.Output); - await query.Input.SendAsync(FlowMessage.Create(new StorageQueryRequest())); + await query.Input.SendAsync(StorageRequest(new StorageQueryRequest())); - var result = (await queryOutput.ReceiveAsync().WaitAsync(Timeout)).Value; + var result = (await queryOutput.ReceiveAsync().WaitAsync(Timeout)) + .Value!.Deserialize()!; result.Count.ShouldBe(2); result.Records.Select(record => record.Key).ShouldBe(["a", "b"]); result.Records[0].Content.Bytes.AsSpan().ToArray() @@ -254,7 +256,7 @@ public async Task Delete_always_returns_deleted_or_missing_outcome() new StoragePutOptions { Collection = "items" })) { var putOutput = StorageTestSink.Link(put.Output); - await put.Input.SendAsync(FlowMessage.Create(new StorageContentPutRequest + await put.Input.SendAsync(StorageRequest(new StorageContentPutRequest { Key = "a", Content = FlowContent.FromBytes(new byte[] { 1 }) @@ -267,15 +269,15 @@ await put.Input.SendAsync(FlowMessage.Create(new StorageContentPutRequest new StorageDeleteOptions { Collection = "items" }); var deleteOutput = StorageTestSink.Link(delete.Output); - await delete.Input.SendAsync(FlowMessage.Create(new StorageDeleteRequest { Key = "a" })); - await delete.Input.SendAsync(FlowMessage.Create(new StorageDeleteRequest { Key = "a" })); + await delete.Input.SendAsync(StorageRequest(new StorageDeleteRequest { Key = "a" })); + await delete.Input.SendAsync(StorageRequest(new StorageDeleteRequest { Key = "a" })); var deleted = await deleteOutput.ReceiveAsync().WaitAsync(Timeout); deleted.IsError.ShouldBeFalse(); - deleted.Value.Deleted.ShouldBeTrue(); + deleted.Value.Deserialize()!.Deleted.ShouldBeTrue(); var missing = await deleteOutput.ReceiveAsync().WaitAsync(Timeout); missing.IsError.ShouldBeFalse(); - missing.Value.Found.ShouldBeFalse(); + missing.Value.Deserialize()!.Found.ShouldBeFalse(); } [Fact] @@ -290,17 +292,17 @@ public async Task Store_failure_is_normal_and_later_input_continues() new StorageGetOptions { Collection = "items" }); var output = StorageTestSink.Link(node.Output); - await node.Input.SendAsync(FlowMessage.Create(new StorageGetRequest { Key = "a" })); + await node.Input.SendAsync(StorageRequest(new StorageGetRequest { Key = "a" })); var failure = await output.ReceiveAsync().WaitAsync(Timeout); failure.IsError.ShouldBeTrue(); failure.Error.ShouldNotBeNull().Code.ShouldBe(StorageErrorCodeNames.GetFailed); failure.Error.IsTransient.ShouldBeTrue(); store.FailWith = null; - await node.Input.SendAsync(FlowMessage.Create(new StorageGetRequest { Key = "a" })); + await node.Input.SendAsync(StorageRequest(new StorageGetRequest { Key = "a" })); var missing = await output.ReceiveAsync().WaitAsync(Timeout); missing.IsError.ShouldBeFalse(); - missing.Value.Found.ShouldBeFalse(); + missing.Value.Deserialize()!.Found.ShouldBeFalse(); } [Fact] @@ -315,7 +317,7 @@ public async Task Completion_drains_accepted_results_and_events() foreach (var key in new[] { "a", "b" }) { - (await node.Input.SendAsync(FlowMessage.Create(new StorageContentPutRequest + (await node.Input.SendAsync(StorageRequest(new StorageContentPutRequest { Key = key, Content = FlowContent.FromBytes(Encoding.UTF8.GetBytes(key)) @@ -349,7 +351,7 @@ public async Task Put_preserves_request_mode_override_and_record_suppression() ("two", StorageWriteMode.Replace) }) { - await node.Input.SendAsync(FlowMessage.Create(new StorageContentPutRequest + await node.Input.SendAsync(StorageRequest(new StorageContentPutRequest { Key = "a", Content = FlowContent.FromBytes(Encoding.UTF8.GetBytes(text), "text/plain"), @@ -357,10 +359,12 @@ await node.Input.SendAsync(FlowMessage.Create(new StorageContentPutRequest })); } - var created = (await output.ReceiveAsync().WaitAsync(Timeout)).Value; + var created = (await output.ReceiveAsync().WaitAsync(Timeout)) + .Value!.Deserialize()!; created.Version.ShouldBe(1); created.Record.ShouldBeNull(); - var replaced = (await output.ReceiveAsync().WaitAsync(Timeout)).Value; + var replaced = (await output.ReceiveAsync().WaitAsync(Timeout)) + .Value!.Deserialize()!; replaced.Version.ShouldBe(2); replaced.Record.ShouldBeNull(); } @@ -376,7 +380,7 @@ public async Task Query_honors_filter_paging_and_result_suppression() var output = StorageTestSink.Link(put.Output); foreach (var key in new[] { "order:1", "user:1", "user:2" }) { - await put.Input.SendAsync(FlowMessage.Create(new StorageContentPutRequest + await put.Input.SendAsync(StorageRequest(new StorageContentPutRequest { Key = key, Content = FlowContent.FromBytes(Encoding.UTF8.GetBytes(key)) @@ -393,14 +397,15 @@ await put.Input.SendAsync(FlowMessage.Create(new StorageContentPutRequest EmitRecordsInResult = false }); var results = StorageTestSink.Link(query.Output); - await query.Input.SendAsync(FlowMessage.Create(new StorageQueryRequest + await query.Input.SendAsync(StorageRequest(new StorageQueryRequest { KeyPrefix = "user:", Offset = 1, Limit = 1 })); - var result = (await results.ReceiveAsync().WaitAsync(Timeout)).Value; + var result = (await results.ReceiveAsync().WaitAsync(Timeout)) + .Value!.Deserialize()!; result.Count.ShouldBe(1); result.Records.ShouldBeEmpty(); } @@ -422,13 +427,13 @@ public async Task Store_contract_anomalies_are_normal_failure_results() var queryOutput = StorageTestSink.Link(query.Output); var deleteOutput = StorageTestSink.Link(delete.Output); - await put.Input.SendAsync(FlowMessage.Create(new StorageContentPutRequest + await put.Input.SendAsync(StorageRequest(new StorageContentPutRequest { Key = "a", Content = FlowContent.FromBytes(new byte[] { 1 }) })); - await query.Input.SendAsync(FlowMessage.Create(new StorageQueryRequest())); - await delete.Input.SendAsync(FlowMessage.Create(new StorageDeleteRequest { Key = "a" })); + await query.Input.SendAsync(StorageRequest(new StorageQueryRequest())); + await delete.Input.SendAsync(StorageRequest(new StorageDeleteRequest { Key = "a" })); (await putOutput.ReceiveAsync().WaitAsync(Timeout)).Error .ShouldNotBeNull().Code.ShouldBe(StorageErrorCodeNames.PutFailed); @@ -454,8 +459,8 @@ public async Task Store_identity_and_query_contract_violations_are_normal_failur var getOutput = StorageTestSink.Link(get.Output); var queryOutput = StorageTestSink.Link(query.Output); - await get.Input.SendAsync(FlowMessage.Create(new StorageGetRequest { Key = "a" })); - await query.Input.SendAsync(FlowMessage.Create(new StorageQueryRequest + await get.Input.SendAsync(StorageRequest(new StorageGetRequest { Key = "a" })); + await query.Input.SendAsync(StorageRequest(new StorageQueryRequest { KeyPrefix = "user:", Limit = 1 @@ -478,12 +483,12 @@ public async Task Output_fans_out_and_events_preserve_result_order() var second = StorageTestSink.Link(node.Output); var events = StorageTestSink.Link(node.Events); - await node.Input.SendAsync(FlowMessage.Create(new StorageContentPutRequest + await node.Input.SendAsync(StorageRequest(new StorageContentPutRequest { Key = " ", Content = FlowContent.FromBytes(new byte[] { 1 }) })); - await node.Input.SendAsync(FlowMessage.Create(new StorageContentPutRequest + await node.Input.SendAsync(StorageRequest(new StorageContentPutRequest { Key = "good", Content = FlowContent.FromBytes(new byte[] { 1 }) @@ -496,13 +501,41 @@ await node.Input.SendAsync(FlowMessage.Create(new StorageContentPutRequest firstResults.Select(item => item.IsError).ShouldBe([true, false]); secondResults.Select(item => item.IsError).ShouldBe([true, false]); (await StorageTestSink.DrainUntilCompletedAsync(events)) - .Select(item => item.Name) + .Select(item => item.ToFlowEvent().Name) .ShouldBe([ StorageDiagnosticNames.PutFailed, StorageDiagnosticNames.PutStored ]); } + [Fact] + public async Task Put_rejects_malformed_value_without_faulting_and_accepts_later_input() + { + var store = new InMemoryStorageStore(); + await using var node = new StoragePutNode( + store, + new StoragePutOptions { Collection = "items" }); + var output = StorageTestSink.Link(node.Output); + var events = StorageTestSink.Link(node.Events); + + await node.Input.SendAsync(FlowMessage.Create(FlowValue.From(42))); + await node.Input.SendAsync(StorageRequest(new StorageContentPutRequest + { + Key = "valid", + Content = FlowContent.FromBytes(Encoding.UTF8.GetBytes("ok"), "text/plain", "utf-8") + })); + + var rejection = await output.ReceiveAsync().WaitAsync(Timeout); + rejection.IsError.ShouldBeTrue(); + rejection.Error.ShouldNotBeNull(); + (await events.ReceiveAsync().WaitAsync(Timeout)).ToFlowEvent().Name.ShouldBe("storage.put.rejected"); + + var success = await output.ReceiveAsync().WaitAsync(Timeout); + success.IsError.ShouldBeFalse(); + success.Value.Deserialize()!.Key.ShouldBe("valid"); + node.Completion.IsFaulted.ShouldBeFalse(); + } + [Fact] public void Nodes_reject_null_store() { @@ -512,6 +545,12 @@ public void Nodes_reject_null_store() Should.Throw(() => new StorageDeleteNode(null!)); } + private static FlowMessage StorageRequest( + T request, + CorrelationId? correlationId = null, + TraceId? traceId = null) + => FlowMessage.Create(FlowValue.From(request), correlationId, traceId); + private sealed class NullResultStorageStore : IStorageStore { public Task PutAsync( diff --git a/tests/FluxFlow.Components.Storage.Tests/StorageOutputContractTests.cs b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.Tests/StorageOutputContractTests.cs similarity index 100% rename from tests/FluxFlow.Components.Storage.Tests/StorageOutputContractTests.cs rename to tests/Unit/Components/Storage/FluxFlow.Components.Storage.Tests/StorageOutputContractTests.cs diff --git a/tests/FluxFlow.Components.Storage.Tests/StorageRequestContractTests.cs b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.Tests/StorageRequestContractTests.cs similarity index 100% rename from tests/FluxFlow.Components.Storage.Tests/StorageRequestContractTests.cs rename to tests/Unit/Components/Storage/FluxFlow.Components.Storage.Tests/StorageRequestContractTests.cs diff --git a/tests/FluxFlow.Components.Storage.Tests/StorageTestSink.cs b/tests/Unit/Components/Storage/FluxFlow.Components.Storage.Tests/StorageTestSink.cs similarity index 100% rename from tests/FluxFlow.Components.Storage.Tests/StorageTestSink.cs rename to tests/Unit/Components/Storage/FluxFlow.Components.Storage.Tests/StorageTestSink.cs diff --git a/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Composition.Tests/FluxFlow.Components.Timers.Composition.Tests.csproj b/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Composition.Tests/FluxFlow.Components.Timers.Composition.Tests.csproj new file mode 100644 index 00000000..0d569657 --- /dev/null +++ b/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Composition.Tests/FluxFlow.Components.Timers.Composition.Tests.csproj @@ -0,0 +1,30 @@ + + + + net10.0 + false + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/FluxFlow.Components.Timers.Composition.Tests/TimersServiceCollectionExtensionsTests.cs b/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Composition.Tests/TimersServiceCollectionExtensionsTests.cs similarity index 98% rename from tests/FluxFlow.Components.Timers.Composition.Tests/TimersServiceCollectionExtensionsTests.cs rename to tests/Unit/Components/Timers/FluxFlow.Components.Timers.Composition.Tests/TimersServiceCollectionExtensionsTests.cs index eeda14dc..9cb6b606 100644 --- a/tests/FluxFlow.Components.Timers.Composition.Tests/TimersServiceCollectionExtensionsTests.cs +++ b/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Composition.Tests/TimersServiceCollectionExtensionsTests.cs @@ -36,10 +36,10 @@ public void AddTimers_registers_timer_metadata() registry.Components[TimersComponentDefinition.Types.Interval] .Outputs[TimersComponentDefinition.Ports.Output].MessageType.ShouldBe( - typeof(TimerIntervalTick)); + typeof(FlowValue)); registry.Components[TimersComponentDefinition.Types.Schedule] .Outputs[TimersComponentDefinition.Ports.Output].MessageType.ShouldBe( - typeof(TimerScheduleTick)); + typeof(FlowValue)); AssertTransformMetadata(registry, TimersComponentDefinition.Types.Delay); AssertTransformMetadata(registry, TimersComponentDefinition.Types.Throttle); @@ -94,8 +94,8 @@ public void Design_metadata_provider_describes_timer_ports() { var metadata = MetadataByType(); - AssertSourcePorts(metadata[TimersComponentDefinition.Types.Interval], nameof(TimerIntervalTick)); - AssertSourcePorts(metadata[TimersComponentDefinition.Types.Schedule], nameof(TimerScheduleTick)); + AssertSourcePorts(metadata[TimersComponentDefinition.Types.Interval], nameof(FlowValue)); + AssertSourcePorts(metadata[TimersComponentDefinition.Types.Schedule], nameof(FlowValue)); AssertTransformPorts(metadata[TimersComponentDefinition.Types.Delay]); AssertTransformPorts(metadata[TimersComponentDefinition.Types.Throttle]); AssertTransformPorts(metadata[TimersComponentDefinition.Types.Debounce]); @@ -433,10 +433,10 @@ private static void AssertTransformMetadata( { registry.Components[nodeType] .Inputs[TimersComponentDefinition.Ports.Input].MessageType.ShouldBe( - typeof(JsonElement)); + typeof(FlowValue)); registry.Components[nodeType] .Outputs[TimersComponentDefinition.Ports.Output].MessageType.ShouldBe( - typeof(JsonElement)); + typeof(FlowValue)); } private static Dictionary MetadataByType() @@ -464,7 +464,7 @@ private static void AssertSourcePorts( port.IsPrimary, port.ValueType?.Value)).ShouldBe([ (TimersComponentDefinition.Ports.Output, PortDirection.Output, 1, true, outputType), - (TimersComponentDefinition.Ports.Events, PortDirection.Output, 2, false, nameof(ComponentEvent)) + (TimersComponentDefinition.Ports.Events, PortDirection.Output, 2, false, nameof(global::FluxFlow.Data.FlowValue)) ]); } @@ -476,9 +476,9 @@ private static void AssertTransformPorts(ComponentDesignMetadata metadata) port.Order, port.IsPrimary, port.ValueType?.Value)).ShouldBe([ - (TimersComponentDefinition.Ports.Input, PortDirection.Input, 0, true, nameof(JsonElement)), - (TimersComponentDefinition.Ports.Output, PortDirection.Output, 1, true, nameof(JsonElement)), - (TimersComponentDefinition.Ports.Events, PortDirection.Output, 2, false, nameof(ComponentEvent)) + (TimersComponentDefinition.Ports.Input, PortDirection.Input, 0, true, nameof(FlowValue)), + (TimersComponentDefinition.Ports.Output, PortDirection.Output, 1, true, nameof(FlowValue)), + (TimersComponentDefinition.Ports.Events, PortDirection.Output, 2, false, nameof(global::FluxFlow.Data.FlowValue)) ]); } diff --git a/tests/FluxFlow.Components.Timers.Tests/CronScheduleTests.cs b/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/CronScheduleTests.cs similarity index 100% rename from tests/FluxFlow.Components.Timers.Tests/CronScheduleTests.cs rename to tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/CronScheduleTests.cs diff --git a/tests/FluxFlow.Components.Timers.Tests/FluxFlow.Components.Timers.Tests.csproj b/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/FluxFlow.Components.Timers.Tests.csproj similarity index 69% rename from tests/FluxFlow.Components.Timers.Tests/FluxFlow.Components.Timers.Tests.csproj rename to tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/FluxFlow.Components.Timers.Tests.csproj index 34ab4643..bd62e838 100644 --- a/tests/FluxFlow.Components.Timers.Tests/FluxFlow.Components.Timers.Tests.csproj +++ b/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/FluxFlow.Components.Timers.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,8 +6,8 @@ - - + + diff --git a/tests/FluxFlow.Components.Timers.Tests/TimerCanonicalNodeTests.cs b/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TimerCanonicalNodeTests.cs similarity index 98% rename from tests/FluxFlow.Components.Timers.Tests/TimerCanonicalNodeTests.cs rename to tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TimerCanonicalNodeTests.cs index 6a5d7535..3b998ca4 100644 --- a/tests/FluxFlow.Components.Timers.Tests/TimerCanonicalNodeTests.cs +++ b/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TimerCanonicalNodeTests.cs @@ -32,7 +32,7 @@ public async Task Interval_emits_flow_value_tick_without_error_port() await node.Completion.WaitAsync(TimeSpan.FromSeconds(30)); var message = (await TimerTestSink.DrainUntilCompletedAsync(output)).ShouldHaveSingleItem(); - var tick = message.Value; + var tick = message.Value!.Deserialize()!; tick.Timestamp.ShouldBe(startedAt); tick.Name.ShouldBe("heartbeat"); tick.Sequence.ShouldBe(1); @@ -63,7 +63,7 @@ public async Task Schedule_emits_flow_value_tick() await node.Completion.WaitAsync(TimeSpan.FromSeconds(30)); var tick = (await TimerTestSink.DrainUntilCompletedAsync(output)) - .ShouldHaveSingleItem().Value; + .ShouldHaveSingleItem().Value!.Deserialize()!; tick.Cron.ShouldBe("* * * * * *"); tick.TimeZoneId.ShouldBe(TimeZoneInfo.Utc.Id); tick.DueAt.ShouldBe(startedAt.AddSeconds(1)); diff --git a/tests/FluxFlow.Components.Timers.Tests/TimerDebounceNodeTests.cs b/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TimerDebounceNodeTests.cs similarity index 96% rename from tests/FluxFlow.Components.Timers.Tests/TimerDebounceNodeTests.cs rename to tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TimerDebounceNodeTests.cs index 5882eb63..31b20568 100644 --- a/tests/FluxFlow.Components.Timers.Tests/TimerDebounceNodeTests.cs +++ b/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TimerDebounceNodeTests.cs @@ -154,9 +154,9 @@ public async Task Debounce_emits_result_event() (await TimerTestSink.DrainUntilCompletedAsync(output)).ShouldHaveSingleItem(); var flowEvent = (await TimerTestSink.DrainUntilCompletedAsync(events)) .ShouldHaveSingleItem(); - flowEvent.Name.ShouldBe(TimerDiagnosticNames.DebounceEmitted); - flowEvent.Attributes["resultKind"].ShouldBe(TimerResultKinds.Debounced); - flowEvent.Attributes["nodeType"].ShouldBe("timer.debounce"); + flowEvent.ToFlowEvent().Name.ShouldBe(TimerDiagnosticNames.DebounceEmitted); + flowEvent.ToFlowEvent().Attributes["resultKind"].ShouldBe(TimerResultKinds.Debounced); + flowEvent.ToFlowEvent().Attributes["nodeType"].ShouldBe("timer.debounce"); } [Fact] diff --git a/tests/FluxFlow.Components.Timers.Tests/TimerDelayNodeTests.cs b/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TimerDelayNodeTests.cs similarity index 97% rename from tests/FluxFlow.Components.Timers.Tests/TimerDelayNodeTests.cs rename to tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TimerDelayNodeTests.cs index 28c31156..f1890829 100644 --- a/tests/FluxFlow.Components.Timers.Tests/TimerDelayNodeTests.cs +++ b/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TimerDelayNodeTests.cs @@ -128,9 +128,9 @@ public async Task Delay_emits_result_event() (await TimerTestSink.DrainUntilCompletedAsync(output)).ShouldHaveSingleItem(); var flowEvent = (await TimerTestSink.DrainUntilCompletedAsync(events)) .ShouldHaveSingleItem(); - flowEvent.Name.ShouldBe(TimerDiagnosticNames.DelayEmitted); - flowEvent.Attributes["resultKind"].ShouldBe(TimerResultKinds.Delayed); - flowEvent.Attributes["nodeType"].ShouldBe("timer.delay"); + flowEvent.ToFlowEvent().Name.ShouldBe(TimerDiagnosticNames.DelayEmitted); + flowEvent.ToFlowEvent().Attributes["resultKind"].ShouldBe(TimerResultKinds.Delayed); + flowEvent.ToFlowEvent().Attributes["nodeType"].ShouldBe("timer.delay"); } [Fact] diff --git a/tests/FluxFlow.Components.Timers.Tests/TimerIntervalNodeTests.cs b/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TimerIntervalNodeTests.cs similarity index 97% rename from tests/FluxFlow.Components.Timers.Tests/TimerIntervalNodeTests.cs rename to tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TimerIntervalNodeTests.cs index 5a8a837b..ec163878 100644 --- a/tests/FluxFlow.Components.Timers.Tests/TimerIntervalNodeTests.cs +++ b/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TimerIntervalNodeTests.cs @@ -156,7 +156,7 @@ public async Task Interval_EmitsLifecycleEvents() TimerTestSink.Drain(output).ShouldHaveSingleItem(); var eventNames = (await TimerTestSink.DrainUntilCompletedAsync(events)) - .Select(flowEvent => flowEvent.Name) + .Select(flowEvent => flowEvent.ToFlowEvent().Name) .ToArray(); eventNames.ShouldContain(TimerIntervalNode.Started); eventNames.ShouldContain(TimerIntervalNode.Tick); @@ -207,6 +207,6 @@ public void Interval_RejectsInvalidBoundedCapacity() public void Interval_RejectsNullSettings() => Should.Throw(() => new TimerIntervalNode(null!)); - private static TimerIntervalTick Tick(FlowMessage message) - => message.Value; + private static TimerIntervalTick Tick(FlowMessage message) + => message.Value!.Deserialize()!; } diff --git a/tests/FluxFlow.Components.Timers.Tests/TimerScheduleNodeTests.cs b/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TimerScheduleNodeTests.cs similarity index 97% rename from tests/FluxFlow.Components.Timers.Tests/TimerScheduleNodeTests.cs rename to tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TimerScheduleNodeTests.cs index 99d0b999..20e8050f 100644 --- a/tests/FluxFlow.Components.Timers.Tests/TimerScheduleNodeTests.cs +++ b/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TimerScheduleNodeTests.cs @@ -98,7 +98,7 @@ public async Task Schedule_EmitsLifecycleEvents() TimerTestSink.Drain(output).ShouldHaveSingleItem(); var eventNames = (await TimerTestSink.DrainUntilCompletedAsync(events)) - .Select(flowEvent => flowEvent.Name) + .Select(flowEvent => flowEvent.ToFlowEvent().Name) .ToArray(); eventNames.ShouldContain(TimerScheduleNode.Started); eventNames.ShouldContain(TimerScheduleNode.Tick); @@ -192,6 +192,6 @@ private static TimeZoneInfo TryFindTimeZone(string ianaId, string windowsId) } } - private static TimerScheduleTick Tick(FlowMessage message) - => message.Value; + private static TimerScheduleTick Tick(FlowMessage message) + => message.Value!.Deserialize()!; } diff --git a/tests/FluxFlow.Components.Timers.Tests/TimerTestSink.cs b/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TimerTestSink.cs similarity index 100% rename from tests/FluxFlow.Components.Timers.Tests/TimerTestSink.cs rename to tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TimerTestSink.cs diff --git a/tests/FluxFlow.Components.Timers.Tests/TimerThrottleNodeTests.cs b/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TimerThrottleNodeTests.cs similarity index 96% rename from tests/FluxFlow.Components.Timers.Tests/TimerThrottleNodeTests.cs rename to tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TimerThrottleNodeTests.cs index 92e4624d..e2e2c01c 100644 --- a/tests/FluxFlow.Components.Timers.Tests/TimerThrottleNodeTests.cs +++ b/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TimerThrottleNodeTests.cs @@ -122,9 +122,9 @@ public async Task Throttle_emits_result_events() (await TimerTestSink.DrainUntilCompletedAsync(output)).ShouldHaveSingleItem(); var flowEvent = (await TimerTestSink.DrainUntilCompletedAsync(events)) .ShouldHaveSingleItem(); - flowEvent.Name.ShouldBe(TimerDiagnosticNames.ThrottleEmitted); - flowEvent.Attributes["resultKind"].ShouldBe(TimerResultKinds.Throttled); - flowEvent.Attributes["nodeType"].ShouldBe("timer.throttle"); + flowEvent.ToFlowEvent().Name.ShouldBe(TimerDiagnosticNames.ThrottleEmitted); + flowEvent.ToFlowEvent().Attributes["resultKind"].ShouldBe(TimerResultKinds.Throttled); + flowEvent.ToFlowEvent().Attributes["nodeType"].ShouldBe("timer.throttle"); } [Fact] diff --git a/tests/FluxFlow.Components.Timers.Tests/TrackingFakeTimeProvider.cs b/tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TrackingFakeTimeProvider.cs similarity index 100% rename from tests/FluxFlow.Components.Timers.Tests/TrackingFakeTimeProvider.cs rename to tests/Unit/Components/Timers/FluxFlow.Components.Timers.Tests/TrackingFakeTimeProvider.cs diff --git a/tests/Unit/Components/Validation/FluxFlow.Components.Validation.Composition.Tests/FluxFlow.Components.Validation.Composition.Tests.csproj b/tests/Unit/Components/Validation/FluxFlow.Components.Validation.Composition.Tests/FluxFlow.Components.Validation.Composition.Tests.csproj new file mode 100644 index 00000000..f724f378 --- /dev/null +++ b/tests/Unit/Components/Validation/FluxFlow.Components.Validation.Composition.Tests/FluxFlow.Components.Validation.Composition.Tests.csproj @@ -0,0 +1,30 @@ + + + + net10.0 + false + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tests/FluxFlow.Components.Validation.Composition.Tests/ValidationServiceCollectionExtensionsTests.cs b/tests/Unit/Components/Validation/FluxFlow.Components.Validation.Composition.Tests/ValidationServiceCollectionExtensionsTests.cs similarity index 98% rename from tests/FluxFlow.Components.Validation.Composition.Tests/ValidationServiceCollectionExtensionsTests.cs rename to tests/Unit/Components/Validation/FluxFlow.Components.Validation.Composition.Tests/ValidationServiceCollectionExtensionsTests.cs index 05dc088a..7fa426a1 100644 --- a/tests/FluxFlow.Components.Validation.Composition.Tests/ValidationServiceCollectionExtensionsTests.cs +++ b/tests/Unit/Components/Validation/FluxFlow.Components.Validation.Composition.Tests/ValidationServiceCollectionExtensionsTests.cs @@ -43,9 +43,9 @@ public void AddValidation_registers_only_the_canonical_contract() "Events" ], ignoreOrder: false); validator.Inputs[ValidationComponentDefinition.Ports.Input].MessageType.ShouldBe( - typeof(JsonElement)); + typeof(FlowValue)); validator.Outputs[ValidationComponentDefinition.Ports.Output].MessageType.ShouldBe( - typeof(JsonSchemaValidationResult)); + typeof(FlowValue)); typeof(ValidationServiceCollectionExtensions).GetMethods() .ShouldNotContain(static method => method.IsGenericMethodDefinition); } @@ -108,9 +108,9 @@ public void Design_metadata_provider_describes_canonical_ports() port.Order, port.IsPrimary, port.ValueType?.Value)).ShouldBe([ - (ValidationComponentDefinition.Ports.Input, PortDirection.Input, 0, true, nameof(JsonElement)), - (ValidationComponentDefinition.Ports.Output, PortDirection.Output, 1, true, nameof(JsonSchemaValidationResult)), - (ValidationComponentDefinition.Ports.Events, PortDirection.Output, 2, false, nameof(ComponentEvent)) + (ValidationComponentDefinition.Ports.Input, PortDirection.Input, 0, true, nameof(FlowValue)), + (ValidationComponentDefinition.Ports.Output, PortDirection.Output, 1, true, nameof(FlowValue)), + (ValidationComponentDefinition.Ports.Events, PortDirection.Output, 2, false, nameof(global::FluxFlow.Data.FlowValue)) ]); } diff --git a/tests/FluxFlow.Components.Validation.Tests/FluxFlow.Components.Validation.Tests.csproj b/tests/Unit/Components/Validation/FluxFlow.Components.Validation.Tests/FluxFlow.Components.Validation.Tests.csproj similarity index 68% rename from tests/FluxFlow.Components.Validation.Tests/FluxFlow.Components.Validation.Tests.csproj rename to tests/Unit/Components/Validation/FluxFlow.Components.Validation.Tests/FluxFlow.Components.Validation.Tests.csproj index 8d18d56d..c52c6d3c 100644 --- a/tests/FluxFlow.Components.Validation.Tests/FluxFlow.Components.Validation.Tests.csproj +++ b/tests/Unit/Components/Validation/FluxFlow.Components.Validation.Tests/FluxFlow.Components.Validation.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,8 +6,8 @@ - - + + diff --git a/tests/FluxFlow.Components.Validation.Tests/JsonSchemaValidatorNodeTests.cs b/tests/Unit/Components/Validation/FluxFlow.Components.Validation.Tests/JsonSchemaValidatorNodeTests.cs similarity index 76% rename from tests/FluxFlow.Components.Validation.Tests/JsonSchemaValidatorNodeTests.cs rename to tests/Unit/Components/Validation/FluxFlow.Components.Validation.Tests/JsonSchemaValidatorNodeTests.cs index b0d01074..94cc263f 100644 --- a/tests/FluxFlow.Components.Validation.Tests/JsonSchemaValidatorNodeTests.cs +++ b/tests/Unit/Components/Validation/FluxFlow.Components.Validation.Tests/JsonSchemaValidatorNodeTests.cs @@ -16,6 +16,8 @@ namespace FluxFlow.Components.Validation.Tests; public sealed class JsonSchemaValidatorNodeTests { private static readonly TimeSpan Timeout = TimeSpan.FromSeconds(5); + private static readonly JsonSerializerOptions SerializerOptions = + new(JsonSerializerDefaults.Web); [Fact] public async Task Valid_and_invalid_json_values_are_normal_domain_results() @@ -24,24 +26,26 @@ public async Task Valid_and_invalid_json_values_are_normal_domain_results() var output = Sink(node.Output); var validValue = Order("A-100", 125L); var invalidValue = Order("A-101", "wrong"); - var validInput = FlowMessage.Create(validValue, new CorrelationId("valid-order")); - var invalidInput = FlowMessage.Create(invalidValue, new CorrelationId("invalid-order")); + var validInput = Message(validValue, new CorrelationId("valid-order")); + var invalidInput = Message(invalidValue, new CorrelationId("invalid-order")); await node.Input.SendAsync(validInput); await node.Input.SendAsync(invalidInput); var valid = await output.ReceiveAsync().WaitAsync(Timeout); var invalid = await output.ReceiveAsync().WaitAsync(Timeout); + var validResult = Read(valid.Value!); + var invalidResult = Read(invalid.Value!); valid.IsError.ShouldBeFalse(); - valid.Value.IsValid.ShouldBeTrue(); - valid.Value.Input.ShouldBe(validValue); - valid.Value.Value.ShouldBe(validValue); + validResult.IsValid.ShouldBeTrue(); + validResult.Input.GetRawText().ShouldBe(validValue.GetRawText()); + validResult.Value.GetRawText().ShouldBe(validValue.GetRawText()); valid.CorrelationId.ShouldBe(validInput.CorrelationId); valid.TraceId.ShouldBe(validInput.TraceId); valid.CausationId.ShouldBe(validInput.MessageId); invalid.IsError.ShouldBeFalse(); - invalid.Value.IsValid.ShouldBeFalse(); - invalid.Value.Issues.ShouldNotBeEmpty(); + invalidResult.IsValid.ShouldBeFalse(); + invalidResult.Issues.ShouldNotBeEmpty(); invalid.CorrelationId.ShouldBe(invalidInput.CorrelationId); } @@ -57,12 +61,12 @@ public async Task Selector_returns_the_transport_neutral_selected_json_value() var body = Order("A-200", 200L); var input = Json(new { body, source = "test" }); - await node.Input.SendAsync(FlowMessage.Create(input)); + await node.Input.SendAsync(Message(input)); - var result = (await output.ReceiveAsync().WaitAsync(Timeout)).Value; + var result = Read((await output.ReceiveAsync().WaitAsync(Timeout)).Value!); selector.Calls.ShouldBe(1); selector.LastValueSelector.ShouldBe("body"); - result.Input.ShouldBe(input); + result.Input.GetRawText().ShouldBe(input.GetRawText()); result.Value.GetRawText().ShouldBe(body.GetRawText()); result.ValueSelector.ShouldBe("body"); } @@ -75,14 +79,14 @@ public async Task Selector_failure_is_in_band_and_later_input_continues() new FailOnceSelector()); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(Order("A-300", 300L))); - await node.Input.SendAsync(FlowMessage.Create(Order("A-301", 301L))); + await node.Input.SendAsync(Message(Order("A-300", 300L))); + await node.Input.SendAsync(Message(Order("A-301", 301L))); var failure = await output.ReceiveAsync().WaitAsync(Timeout); var success = await output.ReceiveAsync().WaitAsync(Timeout); failure.IsError.ShouldBeTrue(); failure.Error!.Code.ShouldBe(ValidationErrorCodeNames.ValueSelectorFailed); - success.Value.IsValid.ShouldBeTrue(); + Read(success.Value!).IsValid.ShouldBeTrue(); node.Completion.IsFaulted.ShouldBeFalse(); } @@ -97,7 +101,7 @@ public async Task Incoming_error_is_propagated() "Validation", isTransient: false); - await node.Input.SendAsync(FlowMessage.CreateError(error)); + await node.Input.SendAsync(FlowMessage.CreateError(error)); var result = await output.ReceiveAsync().WaitAsync(Timeout); result.IsError.ShouldBeTrue(); @@ -133,9 +137,9 @@ public async Task Ordinary_json_scalar_and_structured_values_validate_directly() binary = new byte[] { 1, 2, 3 } }); - await node.Input.SendAsync(FlowMessage.Create(value)); + await node.Input.SendAsync(Message(value)); - (await output.ReceiveAsync().WaitAsync(Timeout)).Value.IsValid.ShouldBeTrue(); + Read((await output.ReceiveAsync().WaitAsync(Timeout)).Value!).IsValid.ShouldBeTrue(); } [Fact] @@ -145,18 +149,18 @@ public async Task Output_fans_out_accepted_results_in_order() var first = Sink(node.Output); var second = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(Order("A-500", 500L))); - await node.Input.SendAsync(FlowMessage.Create(Order("A-501", "wrong"))); + await node.Input.SendAsync(Message(Order("A-500", 500L))); + await node.Input.SendAsync(Message(Order("A-501", "wrong"))); var firstValidity = new[] { - (await first.ReceiveAsync().WaitAsync(Timeout)).Value.IsValid, - (await first.ReceiveAsync().WaitAsync(Timeout)).Value.IsValid + Read((await first.ReceiveAsync().WaitAsync(Timeout)).Value!).IsValid, + Read((await first.ReceiveAsync().WaitAsync(Timeout)).Value!).IsValid }; var secondValidity = new[] { - (await second.ReceiveAsync().WaitAsync(Timeout)).Value.IsValid, - (await second.ReceiveAsync().WaitAsync(Timeout)).Value.IsValid + Read((await second.ReceiveAsync().WaitAsync(Timeout)).Value!).IsValid, + Read((await second.ReceiveAsync().WaitAsync(Timeout)).Value!).IsValid }; firstValidity.ShouldBe([true, false]); secondValidity.ShouldBe(firstValidity); @@ -178,11 +182,11 @@ public async Task Schema_path_is_loaded_before_processing() options: options); var output = Sink(node.Output); - await node.Input.SendAsync(FlowMessage.Create(Order("A-600", 600L))); + await node.Input.SendAsync(Message(Order("A-600", 600L))); - var result = (await output.ReceiveAsync().WaitAsync(Timeout)).Value; + var result = Read((await output.ReceiveAsync().WaitAsync(Timeout)).Value!); result.IsValid.ShouldBeTrue(); - result.Value.ShouldBe(result.Input); + result.Value.GetRawText().ShouldBe(result.Input.GetRawText()); } finally { @@ -215,14 +219,14 @@ public async Task Events_use_injected_clock_and_describe_domain_result_kind() Sink(node.Output); var events = Sink(node.Events); - await node.Input.SendAsync(FlowMessage.Create(Order("A-400", "wrong"))); + await node.Input.SendAsync(Message(Order("A-400", "wrong"))); var @event = await events.ReceiveAsync().WaitAsync(Timeout); @event.Timestamp.ShouldBe(timestamp); - @event.Name.ShouldBe(ValidationDiagnosticNames.JsonSchemaInvalid); - @event.Level.ShouldBe(FlowEventLevel.Information); - @event.Attributes["resultKind"].ShouldBe(ValidationResultKinds.Invalid); - @event.Attributes["isError"].ShouldBe(false); + @event.ToFlowEvent().Name.ShouldBe(ValidationDiagnosticNames.JsonSchemaInvalid); + @event.ToFlowEvent().Level.ShouldBe(FlowEventLevel.Information); + @event.ToFlowEvent().Attributes["resultKind"].ShouldBe(ValidationResultKinds.Invalid); + @event.ToFlowEvent().Attributes["isError"].ShouldBe(false); } [Fact] @@ -260,6 +264,14 @@ private static JsonElement Order(string id, object total) private static JsonElement Json(T value) => JsonSerializer.SerializeToElement(value); + private static FlowMessage Message( + JsonElement value, + CorrelationId? correlationId = null) + => FlowMessage.Create(FlowValue.From(value), correlationId); + + private static JsonSchemaValidationResult Read(FlowValue value) + => value.ToJsonElement().Deserialize(SerializerOptions)!; + private static BufferBlock Sink(ISourceBlock source) { var sink = new BufferBlock(); diff --git a/tests/FluxFlow.Composition.Tests/ApplicationAddressTests.cs b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/ApplicationAddressTests.cs similarity index 100% rename from tests/FluxFlow.Composition.Tests/ApplicationAddressTests.cs rename to tests/Unit/Core/Application/FluxFlow.Composition.Tests/ApplicationAddressTests.cs diff --git a/tests/FluxFlow.Composition.Tests/ApplicationDefinitionAuthoringTests.cs b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/ApplicationDefinitionAuthoringTests.cs similarity index 100% rename from tests/FluxFlow.Composition.Tests/ApplicationDefinitionAuthoringTests.cs rename to tests/Unit/Core/Application/FluxFlow.Composition.Tests/ApplicationDefinitionAuthoringTests.cs diff --git a/tests/FluxFlow.Composition.Tests/ApplicationDefinitionFluentCaptureTests.cs b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/ApplicationDefinitionFluentCaptureTests.cs similarity index 100% rename from tests/FluxFlow.Composition.Tests/ApplicationDefinitionFluentCaptureTests.cs rename to tests/Unit/Core/Application/FluxFlow.Composition.Tests/ApplicationDefinitionFluentCaptureTests.cs diff --git a/tests/FluxFlow.Composition.Tests/ApplicationDefinitionJsonTests.cs b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/ApplicationDefinitionJsonTests.cs similarity index 100% rename from tests/FluxFlow.Composition.Tests/ApplicationDefinitionJsonTests.cs rename to tests/Unit/Core/Application/FluxFlow.Composition.Tests/ApplicationDefinitionJsonTests.cs diff --git a/tests/Unit/Core/Application/FluxFlow.Composition.Tests/ApplicationLinkCompilerParityTests.cs b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/ApplicationLinkCompilerParityTests.cs new file mode 100644 index 00000000..37c42c63 --- /dev/null +++ b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/ApplicationLinkCompilerParityTests.cs @@ -0,0 +1,293 @@ +using FluxFlow.Composition.Authoring; +using FluxFlow.Composition.Links; +using FluxFlow.Composition.Model; +using FluxFlow.Mapping; +using Shouldly; +using Xunit; + +namespace FluxFlow.Composition.Tests; + +public sealed class ApplicationLinkCompilerParityTests +{ + [Theory] + [InlineData(false)] + [InlineData(true)] + public void Invalid_endpoint_and_condition_keep_diagnostic_order_and_origin_projection(bool codeAuthored) + { + var engine = new RecordingExpressionEngine(); + var application = new ApplicationDefinitionBuilder(); + var workflow = application.AddWorkflow("Main"); + var source = workflow.AddComponent("Source", "source", component => + { + if (!codeAuthored) + component.Set("Output", new { Port = "Sink.Missing", Condition = "invalid" }); + }); + var sink = workflow.AddComponent("Sink", "sink"); + if (codeAuthored) + source.Output("Output").ConnectTo(sink.Input("Missing"), "invalid"); + + var result = new ApplicationLinkCompiler(CreateCatalog(), engine).Compile(application.Build()); + + result.IsValid.ShouldBeFalse(); + result.Links.ShouldBeEmpty(); + result.Diagnostics.Select(diagnostic => diagnostic.Code).ShouldBe( + [ApplicationLinkDiagnosticCode.MissingInputPort, ApplicationLinkDiagnosticCode.InvalidCondition]); + foreach (var diagnostic in result.Diagnostics) + { + diagnostic.WorkflowName.ShouldBe("Main"); + diagnostic.ComponentName.ShouldBe("Source"); + diagnostic.PropertyName.ShouldBe("Output"); + diagnostic.Source.ShouldBeNull(); + } + result.Diagnostics[0].Message.ShouldBe("Component 'Main.Sink' has no input port 'Missing'."); + result.Diagnostics[0].Target!.Value.ShouldBe("Main.Sink.Missing"); + result.Diagnostics[0].Exception.ShouldBeNull(); + result.Diagnostics[1].Target.ShouldBeNull(); + result.Diagnostics[1].Exception.ShouldBeSameAs(engine.Failure); + result.Diagnostics[1].Message.ShouldBe( + "Conditional link 'Main.Source.Output' has invalid expression 'invalid': Invalid expression."); + engine.CompileCounts["invalid"].ShouldBe(1); + if (codeAuthored) + { + result.Declarations.ShouldBeEmpty(); + } + else + { + var declaration = result.Declarations.ShouldHaveSingleItem(); + declaration.DeclarationLocation.ShouldBe("Workflows.Main.Source.Output"); + declaration.PortReference.ShouldBe("Sink.Missing"); + declaration.ConditionExpression.ShouldBe("invalid"); + } + } + + [Fact] + public void Code_links_report_both_missing_endpoints_before_the_invalid_condition() + { + var engine = new RecordingExpressionEngine(); + var application = new ApplicationDefinitionBuilder(); + var workflow = application.AddWorkflow("Main"); + var source = workflow.AddComponent("Source", "source"); + var sink = workflow.AddComponent("Sink", "sink"); + source.Output("Missing").ConnectTo(sink.Input("Missing"), "invalid"); + + var result = new ApplicationLinkCompiler(CreateCatalog(), engine).Compile(application.Build()); + + result.IsValid.ShouldBeFalse(); + result.Links.ShouldBeEmpty(); + result.Declarations.ShouldBeEmpty(); + result.Diagnostics.Select(diagnostic => diagnostic.Code).ShouldBe( + [ + ApplicationLinkDiagnosticCode.MissingOutputPort, + ApplicationLinkDiagnosticCode.MissingInputPort, + ApplicationLinkDiagnosticCode.InvalidCondition + ]); + foreach (var diagnostic in result.Diagnostics) + { + diagnostic.WorkflowName.ShouldBe("Main"); + diagnostic.ComponentName.ShouldBe("Source"); + diagnostic.PropertyName.ShouldBe("Missing"); + } + result.Diagnostics[0].Source!.Value.ShouldBe("Main.Source.Missing"); + result.Diagnostics[0].Target.ShouldBeNull(); + result.Diagnostics[1].Source.ShouldBeNull(); + result.Diagnostics[1].Target!.Value.ShouldBe("Main.Sink.Missing"); + result.Diagnostics[2].Source.ShouldBeNull(); + result.Diagnostics[2].Target.ShouldBeNull(); + result.Diagnostics[2].Exception.ShouldBeSameAs(engine.Failure); + engine.CompileCounts["invalid"].ShouldBe(1); + } + + [Fact] + public void Mixed_origins_share_condition_compilation_but_report_each_invalid_use() + { + var engine = new RecordingExpressionEngine(); + var application = new ApplicationDefinitionBuilder(); + var workflow = application.AddWorkflow("Main"); + workflow.AddComponent("Json", "source", component => component.Set("Output", new[] + { + new { Port = "Accepted.Input", Condition = "allow" }, + new { Port = "Rejected.Input", Condition = "invalid" } + })); + var code = workflow.AddComponent("Code", "source"); + var accepted = workflow.AddComponent("Accepted", "sink"); + var rejected = workflow.AddComponent("Rejected", "sink"); + code.Output("Output") + .ConnectTo(accepted.Input("Input"), "allow") + .ConnectTo(rejected.Input("Input"), "invalid"); + + var result = new ApplicationLinkCompiler(CreateCatalog(), engine).Compile(application.Build()); + + engine.CompileCounts.Count.ShouldBe(2); + engine.CompileCounts["allow"].ShouldBe(1); + engine.CompileCounts["invalid"].ShouldBe(1); + result.IsValid.ShouldBeFalse(); + result.Diagnostics.Select(diagnostic => (diagnostic.Code, diagnostic.ComponentName)) + .ShouldBe( + [ + (ApplicationLinkDiagnosticCode.InvalidCondition, "Json"), + (ApplicationLinkDiagnosticCode.InvalidCondition, "Code") + ]); + foreach (var diagnostic in result.Diagnostics) + diagnostic.Exception.ShouldBeSameAs(engine.Failure); + result.Links.Select(link => (link.Source.Value, link.Target.Value)).ShouldBe( + [("Main.Code.Output", "Main.Accepted.Input"), ("Main.Json.Output", "Main.Accepted.Input")]); + foreach (var link in result.Links) + { + link.MessageType.ShouldBe(typeof(string)); + link.ConditionExpression.ShouldBe("allow"); + link.DeclarationSide.ShouldBe(ApplicationLinkDeclarationSide.Output); + link.TryMatch(Context(true), out var failure).ShouldBeTrue(); + failure.ShouldBeNull(); + link.TryMatch(Context(false), out failure).ShouldBeFalse(); + failure.ShouldBeNull(); + } + result.Declarations.Select(declaration => (declaration.DeclarationLocation, declaration.PortReference)) + .ShouldBe( + [ + ("Workflows.Main.Json.Output", "Accepted.Input"), + ("Workflows.Main.Json.Output", "Rejected.Input"), + ("Workflows.Main.Code.Output", "Accepted.Input") + ]); + } + + [Theory] + [InlineData(false)] + [InlineData(true)] + public void Exact_type_rejection_preserves_signal_sibling_for_both_origins(bool codeAuthored) + { + var application = new ApplicationDefinitionBuilder(); + var workflow = application.AddWorkflow("Main"); + var source = workflow.AddComponent("Source", "source", component => + { + if (!codeAuthored) + component.Set("Output", new[] { "Object.Input", "Signal.Trigger" }); + }); + var objectSink = workflow.AddComponent("Object", "object-sink"); + var signal = workflow.AddComponent("Signal", "signal"); + if (codeAuthored) + { + source.Output("Output") + .ConnectTo(objectSink.Input("Input")) + .ConnectTo(signal.SignalInput("Trigger")); + } + + var result = new ApplicationLinkCompiler(CreateCatalog()).Compile(application.Build()); + + result.IsValid.ShouldBeFalse(); + var diagnostic = result.Diagnostics.ShouldHaveSingleItem(); + diagnostic.Code.ShouldBe(ApplicationLinkDiagnosticCode.PortTypeMismatch); + diagnostic.Message.ShouldBe( + "Link 'Main.Source.Output' to 'Main.Object.Input' connects 'System.String' to incompatible 'System.Object'."); + diagnostic.Source!.Value.ShouldBe("Main.Source.Output"); + diagnostic.Target!.Value.ShouldBe("Main.Object.Input"); + var link = result.Links.ShouldHaveSingleItem(); + link.Source.Value.ShouldBe("Main.Source.Output"); + link.Target.Value.ShouldBe("Main.Signal.Trigger"); + link.MessageType.ShouldBe(typeof(string)); + link.IsConditional.ShouldBeFalse(); + link.TryMatch(new FlowMapContext(), out var failure).ShouldBeTrue(); + failure.ShouldBeNull(); + result.Declarations.Count.ShouldBe(codeAuthored ? 1 : 2); + } + + [Fact] + public void Code_declared_type_is_checked_before_target_compatibility_and_after_condition_compilation() + { + var engine = new RecordingExpressionEngine(); + var application = new ApplicationDefinitionBuilder(); + var workflow = application.AddWorkflow("Main"); + var source = workflow.AddComponent("Source", "source"); + var sink = workflow.AddComponent("Sink", "object-sink"); + source.Output("Output").ConnectTo(sink.Input("Input"), "allow"); + + var result = new ApplicationLinkCompiler(CreateCatalog(), engine).Compile(application.Build()); + + engine.CompileCounts["allow"].ShouldBe(1); + result.IsValid.ShouldBeFalse(); + result.Links.ShouldBeEmpty(); + result.Declarations.ShouldBeEmpty(); + var diagnostic = result.Diagnostics.ShouldHaveSingleItem(); + diagnostic.Code.ShouldBe(ApplicationLinkDiagnosticCode.PortTypeMismatch); + diagnostic.Message.ShouldBe( + "Link 'Main.Source.Output' to 'Main.Sink.Input' declares 'System.Int32' but source port 'Main.Source.Output' carries 'System.String'."); + diagnostic.Source!.Value.ShouldBe("Main.Source.Output"); + diagnostic.Target!.Value.ShouldBe("Main.Sink.Input"); + } + + [Fact] + public void Input_declaration_diagnostics_retain_the_declaring_target_context() + { + var definition = ApplicationDefinitionJson.Deserialize(""" + { + "Resources": {}, + "Workflows": { + "Main": { + "Source": { "Type": "source" }, + "Sink": { "Type": "sink", "Input": { "Port": "Source.Missing", "Condition": "allow" } } + } + } + } + """); + + var result = new ApplicationLinkCompiler(CreateCatalog()).Compile(definition); + + result.Links.ShouldBeEmpty(); + result.Diagnostics.Select(diagnostic => diagnostic.Code).ShouldBe( + [ApplicationLinkDiagnosticCode.MissingOutputPort, ApplicationLinkDiagnosticCode.MissingConditionEngine]); + foreach (var diagnostic in result.Diagnostics) + { + diagnostic.WorkflowName.ShouldBe("Main"); + diagnostic.ComponentName.ShouldBe("Sink"); + diagnostic.PropertyName.ShouldBe("Input"); + diagnostic.Target.ShouldBeNull(); + } + result.Diagnostics[0].Source!.Value.ShouldBe("Main.Source.Missing"); + result.Diagnostics[1].Source.ShouldBeNull(); + result.Diagnostics[1].Message.ShouldBe( + "Conditional link 'Main.Sink.Input' requires an expression engine."); + var declaration = result.Declarations.ShouldHaveSingleItem(); + declaration.DeclarationSide.ShouldBe(ApplicationLinkDeclarationSide.Input); + declaration.DeclarationLocation.ShouldBe("Workflows.Main.Sink.Input"); + declaration.PortReference.ShouldBe("Source.Missing"); + } + + private static FlowMapContext Context(bool allow) + => new() { Variables = new Dictionary { ["allow"] = allow } }; + + private static ComponentCatalog CreateCatalog() + => new( + [ + new ComponentDescriptor("source", UnusedFactory, outputs: [ComponentPorts.Metadata("Output")]), + new ComponentDescriptor("sink", UnusedFactory, inputs: [ComponentPorts.Metadata("Input")]), + new ComponentDescriptor("object-sink", UnusedFactory, inputs: [ComponentPorts.Metadata("Input")]), + new ComponentDescriptor("signal", UnusedFactory, inputs: [ComponentPorts.SignalMetadata("Trigger")]) + ]); + + private static ValueTask UnusedFactory(ComponentActivationContext _) + => throw new InvalidOperationException("Link compilation must not activate component factories."); + + private sealed class RecordingExpressionEngine : IFlowExpressionEngine + { + public string Name => "test"; + public FormatException Failure { get; } = new("Invalid expression."); + public Dictionary CompileCounts { get; } = new(StringComparer.Ordinal); + + public object? Evaluate(string expression, FlowMapContext context, Type resultType) + => throw new InvalidOperationException("Compiled expressions must be reused."); + + public IFlowCompiledExpression Compile(string expression) + { + CompileCounts[expression] = CompileCounts.GetValueOrDefault(expression) + 1; + if (expression == "invalid") + throw Failure; + if (typeof(T) != typeof(bool)) + throw new NotSupportedException("Only Boolean conditions are supported."); + return (IFlowCompiledExpression)(object)new AllowExpression(); + } + } + + private sealed class AllowExpression : IFlowCompiledExpression + { + public bool Evaluate(FlowMapContext context) => context.Variables["allow"] is true; + } +} diff --git a/tests/FluxFlow.Composition.Tests/ApplicationLinkCompilerTests.cs b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/ApplicationLinkCompilerTests.cs similarity index 99% rename from tests/FluxFlow.Composition.Tests/ApplicationLinkCompilerTests.cs rename to tests/Unit/Core/Application/FluxFlow.Composition.Tests/ApplicationLinkCompilerTests.cs index 62cbabc8..f1e6f40d 100644 --- a/tests/FluxFlow.Composition.Tests/ApplicationLinkCompilerTests.cs +++ b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/ApplicationLinkCompilerTests.cs @@ -172,7 +172,7 @@ public void Component_events_support_normal_addresses_and_conditional_links() var link = result.Links.ShouldHaveSingleItem(); link.Source.Value.ShouldBe("Orders.Source.Events"); link.Target.Value.ShouldBe("Orders.EventSink.Input"); - link.MessageType.ShouldBe(typeof(ComponentEvent)); + link.MessageType.ShouldBe(typeof(global::FluxFlow.Data.FlowValue)); link.IsConditional.ShouldBeTrue(); link.IsMatch(new FlowMapContext { @@ -805,7 +805,7 @@ private static ComponentCatalog CreateRegistry( outputs: [ ComponentPorts.Metadata("Output", sourceCardinality), - ComponentPorts.Metadata("Events") + ComponentPorts.Metadata("Events") ]), new ComponentDescriptor( "int-source", @@ -818,7 +818,7 @@ private static ComponentCatalog CreateRegistry( new ComponentDescriptor( "event-sink", UnusedFactory, - inputs: [ComponentPorts.Metadata("Input")]), + inputs: [ComponentPorts.Metadata("Input")]), new ComponentDescriptor( "transform", UnusedFactory, diff --git a/tests/FluxFlow.Composition.Tests/ComponentDescriptorTests.cs b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/ComponentDescriptorTests.cs similarity index 100% rename from tests/FluxFlow.Composition.Tests/ComponentDescriptorTests.cs rename to tests/Unit/Core/Application/FluxFlow.Composition.Tests/ComponentDescriptorTests.cs diff --git a/tests/FluxFlow.Composition.Tests/ComponentEventTests.cs b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/ComponentEventTests.cs similarity index 84% rename from tests/FluxFlow.Composition.Tests/ComponentEventTests.cs rename to tests/Unit/Core/Application/FluxFlow.Composition.Tests/ComponentEventTests.cs index 7820f68f..319ff533 100644 --- a/tests/FluxFlow.Composition.Tests/ComponentEventTests.cs +++ b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/ComponentEventTests.cs @@ -18,9 +18,9 @@ public async Task Component_event_bridge_fans_out_every_event_in_order_to_two_su var node = new EventNode(); var instance = await ActivateAsync(node); var output = instance.Outputs[EventPortName] - .ShouldBeOfType>(); - var first = new BufferBlock>(); - var second = new BufferBlock>(); + .ShouldBeOfType(); + var first = new BufferBlock(); + var second = new BufferBlock(); using var firstLink = output.Source.LinkTo( first, new DataflowLinkOptions { PropagateCompletion = true }); @@ -55,9 +55,9 @@ await second.ReceiveAsync(TimeSpan.FromSeconds(5)) await Task.WhenAll(first.Completion, second.Completion) .WaitAsync(TimeSpan.FromSeconds(5)); - firstMessages.Select(static message => message.Value.Name) + firstMessages.Select(static message => message.ToFlowEvent().Name) .ShouldBe(["validation.started", "validation.checked", "validation.completed"]); - secondMessages.Select(static message => message.Value.Name) + secondMessages.Select(static message => message.ToFlowEvent().Name) .ShouldBe(["validation.started", "validation.checked", "validation.completed"]); secondMessages.Select(static message => message.MessageId) .ShouldBe(firstMessages.Select(static message => message.MessageId)); @@ -71,7 +71,7 @@ public async Task HasEvents_uses_custom_name_and_preserves_component_event_envel var node = new EventNode(); var instance = await ActivateAsync(node); var output = instance.Outputs[EventPortName] - .ShouldBeOfType>(); + .ShouldBeOfType(); var correlationId = CorrelationId.New(); var occurredAt = DateTimeOffset.UtcNow.AddSeconds(-1); var receive = output.Source.ReceiveAsync(); @@ -97,14 +97,14 @@ public async Task HasEvents_uses_custom_name_and_preserves_component_event_envel message.TraceId.IsEmpty.ShouldBeFalse(); message.MessageId.IsEmpty.ShouldBeFalse(); message.Timestamp.ShouldBeGreaterThanOrEqualTo(occurredAt); - message.Value.ComponentAddress.ShouldBe("Orders.Validate"); - message.Value.Timestamp.ShouldBe(occurredAt); - message.Value.Name.ShouldBe("validation.completed"); - message.Value.Level.ShouldBe(FlowEventLevel.Warning); - message.Value.Message.ShouldBe("Validation completed with warnings."); - message.Value.Attributes["valid"].ShouldBe("true"); - message.Value.Attributes["count"].ShouldBe("2"); - message.Value.Attributes["bytes"].ShouldBe("AQID"); + message.Headers[FlowEventHeaders.Source].ShouldBe("Orders.Validate"); + message.ToFlowEvent().Timestamp.ShouldBe(occurredAt); + message.ToFlowEvent().Name.ShouldBe("validation.completed"); + message.ToFlowEvent().Level.ShouldBe(FlowEventLevel.Warning); + message.ToFlowEvent().Message.ShouldBe("Validation completed with warnings."); + message.ToFlowEvent().Attributes["valid"].ShouldBe(true); + message.ToFlowEvent().Attributes["count"].ShouldBe(2L); + message.ToFlowEvent().Attributes["bytes"].ShouldBe("AQID"); node.Complete(); await output.Source.Completion.WaitAsync(TimeSpan.FromSeconds(5)); @@ -117,7 +117,7 @@ public async Task Component_faults_remain_on_completion_and_do_not_fault_the_eve var node = new EventNode(); var instance = await ActivateAsync(node); var output = instance.Outputs[EventPortName] - .ShouldBeOfType>(); + .ShouldBeOfType(); node.Fault(new InvalidOperationException("component failed")); @@ -133,7 +133,7 @@ public async Task Unconsumed_component_events_do_not_hold_completion_open() var node = new EventNode(); var instance = await ActivateAsync(node); var output = instance.Outputs[EventPortName] - .ShouldBeOfType>(); + .ShouldBeOfType(); node.Events.Post(new FlowEvent { Timestamp = DateTimeOffset.UtcNow, @@ -167,7 +167,7 @@ private sealed class EventNode : IFlowNode private readonly TaskCompletionSource _completion = new( TaskCreationOptions.RunContinuationsAsynchronously); - public BufferBlock Events { get; } = new(); + public BufferBlock Events { get; } = new(); public Task Completion => _completion.Task; diff --git a/tests/Unit/Core/Application/FluxFlow.Composition.Tests/ComponentInputShapeTests.cs b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/ComponentInputShapeTests.cs new file mode 100644 index 00000000..1112cd5d --- /dev/null +++ b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/ComponentInputShapeTests.cs @@ -0,0 +1,109 @@ +using System.Text.Json; +using FluxFlow.Composition.Authoring; +using FluxFlow.Composition.Links; +using FluxFlow.Composition.Model; +using FluxFlow.Data; +using Shouldly; +using Xunit; + +namespace FluxFlow.Composition.Tests; + +public sealed class ComponentInputShapeTests +{ + [Theory] + [InlineData("{}", false, "target")] + [InlineData("42", false, "Number")] + [InlineData("\"orders\"", false, "String")] + [InlineData("null", false, "Null")] + [InlineData("{\"TARGET\":\"orders\"}", true, null)] + [InlineData("{\"target\":null}", true, null)] + public void Sample_preflight_checks_structure_without_materializing(string json, bool valid, string? errorPart) + { + var descriptor = new ComponentDescriptor("test.request", UnusedFactory, + inputs: [ComponentPortMetadata.CreateFlowValueInput("Input", FlowValueShape.Object("Request", "target"))]); + var sample = FlowValue.From(JsonSerializer.Deserialize(json)); + + var result = descriptor.ValidateInputShape("Input", sample).ShouldNotBeNull(); + + result.IsValid.ShouldBe(valid); + if (errorPart is null) + result.Error.ShouldBeNull(); + else + result.Error.ShouldNotBeNull().ShouldContain(errorPart); + } + + [Fact] + public void Undescribed_input_is_not_checked_and_unknown_input_is_reported() + { + var descriptor = new ComponentDescriptor("test.dynamic", UnusedFactory, + inputs: [ComponentPortMetadata.Create("Input")]); + + descriptor.ValidateInputShape("Input", FlowValue.Null).ShouldBeNull(); + var exception = Should.Throw(() => + descriptor.ValidateInputShape("Missing", FlowValue.Null)); + exception.ParamName.ShouldBe("inputName"); + exception.Message.ShouldContain("test.dynamic"); + exception.Message.ShouldContain("Missing"); + } + + [Fact] + public void Descriptor_rejects_input_shape_on_output_port() + { + var exception = Should.Throw(() => new ComponentDescriptor( + "test.invalid-output", UnusedFactory, + outputs: [ComponentPortMetadata.CreateFlowValueInput("Output", FlowValueShape.String("Text"))])); + + exception.ParamName.ShouldBe("outputs"); + } + + [Theory] + [InlineData(false)] + [InlineData(true)] + public void Link_compilation_accepts_unknown_canonical_output_with_restrictive_destination_shape(bool codeAuthored) + { + var catalog = new ComponentCatalog( + [ + new ComponentDescriptor("test.source", UnusedFactory, + outputs: [ComponentPortMetadata.Create("Output")]), + new ComponentDescriptor("test.destination", UnusedFactory, + inputs: [ComponentPortMetadata.CreateFlowValueInput("Input", FlowValueShape.Object("Request", "target"))]) + ]); + ApplicationDefinition definition; + if (codeAuthored) + { + var application = new ApplicationDefinitionBuilder(); + var workflow = application.AddWorkflow("Main"); + var source = workflow.AddComponent("Source", "test.source"); + var destination = workflow.AddComponent("Destination", "test.destination"); + source.Output("Output").ConnectTo(destination.Input("Input")); + definition = application.Build(); + } + else + { + definition = ApplicationDefinitionJson.Deserialize( + """ + { + "Resources": {}, + "Workflows": { + "Main": { + "Source": { "Type": "test.source", "Output": "Destination.Input" }, + "Destination": { "Type": "test.destination" } + } + } + } + """); + } + + var result = new ApplicationLinkCompiler(catalog).Compile(definition); + + result.IsValid.ShouldBeTrue(); + result.Diagnostics.ShouldBeEmpty(); + var link = result.Links.ShouldHaveSingleItem(); + link.Source.Value.ShouldBe("Main.Source.Output"); + link.Target.Value.ShouldBe("Main.Destination.Input"); + link.MessageType.ShouldBe(typeof(FlowValue)); + } + + private static ValueTask UnusedFactory(ComponentActivationContext _) + => throw new InvalidOperationException("Metadata inspection must not activate a component."); +} diff --git a/tests/FluxFlow.Composition.Tests/ComposedNodeTests.cs b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/ComposedNodeTests.cs similarity index 100% rename from tests/FluxFlow.Composition.Tests/ComposedNodeTests.cs rename to tests/Unit/Core/Application/FluxFlow.Composition.Tests/ComposedNodeTests.cs diff --git a/tests/FluxFlow.Composition.Tests/CompositionNodeFactoryContextTests.cs b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/CompositionNodeFactoryContextTests.cs similarity index 100% rename from tests/FluxFlow.Composition.Tests/CompositionNodeFactoryContextTests.cs rename to tests/Unit/Core/Application/FluxFlow.Composition.Tests/CompositionNodeFactoryContextTests.cs diff --git a/tests/FluxFlow.Composition.Tests/CompositionRuntimeReliabilityTests.cs b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/CompositionRuntimeReliabilityTests.cs similarity index 98% rename from tests/FluxFlow.Composition.Tests/CompositionRuntimeReliabilityTests.cs rename to tests/Unit/Core/Application/FluxFlow.Composition.Tests/CompositionRuntimeReliabilityTests.cs index 7a5163b5..e2fea2b3 100644 --- a/tests/FluxFlow.Composition.Tests/CompositionRuntimeReliabilityTests.cs +++ b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/CompositionRuntimeReliabilityTests.cs @@ -52,7 +52,7 @@ public async Task DisposeAsync_attempts_all_owned_cleanup_and_aggregates_failure var firstGraphLink = new TrackingDisposable(throwOnDispose: true); var secondGraphLink = new TrackingDisposable(throwOnDispose: false); var diagnosticLink = new TrackingDisposable(throwOnDispose: true); - var events = new TrackingSourceBlock(diagnosticLink); + var events = new TrackingSourceBlock(diagnosticLink); var runtime = ApplicationRuntime.Create( [ ComponentInstance.Create(firstNode, events: events), diff --git a/tests/FluxFlow.Composition.Tests/FluxFlow.Composition.Tests.csproj b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/FluxFlow.Composition.Tests.csproj similarity index 70% rename from tests/FluxFlow.Composition.Tests/FluxFlow.Composition.Tests.csproj rename to tests/Unit/Core/Application/FluxFlow.Composition.Tests/FluxFlow.Composition.Tests.csproj index eb655d01..382526f2 100644 --- a/tests/FluxFlow.Composition.Tests/FluxFlow.Composition.Tests.csproj +++ b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/FluxFlow.Composition.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,8 +6,8 @@ - - + + diff --git a/tests/FluxFlow.Composition.Tests/FluxFlowRegistrationBuilderTests.cs b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/FluxFlowRegistrationBuilderTests.cs similarity index 99% rename from tests/FluxFlow.Composition.Tests/FluxFlowRegistrationBuilderTests.cs rename to tests/Unit/Core/Application/FluxFlow.Composition.Tests/FluxFlowRegistrationBuilderTests.cs index 100180c9..ae2c2710 100644 --- a/tests/FluxFlow.Composition.Tests/FluxFlowRegistrationBuilderTests.cs +++ b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/FluxFlowRegistrationBuilderTests.cs @@ -291,7 +291,7 @@ private sealed class RegistrationNode : IFlowNode, IFlowSignalTarget public BufferBlock> Output { get; } = new(); - public BufferBlock Events { get; } = new(); + public BufferBlock Events { get; } = new(); public IFlowSignalTarget Signal => this; diff --git a/tests/FluxFlow.Composition.Tests/RuntimeComponentBindingBuilderTests.cs b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/RuntimeComponentBindingBuilderTests.cs similarity index 77% rename from tests/FluxFlow.Composition.Tests/RuntimeComponentBindingBuilderTests.cs rename to tests/Unit/Core/Application/FluxFlow.Composition.Tests/RuntimeComponentBindingBuilderTests.cs index ac541d1d..219c6e94 100644 --- a/tests/FluxFlow.Composition.Tests/RuntimeComponentBindingBuilderTests.cs +++ b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/RuntimeComponentBindingBuilderTests.cs @@ -1,5 +1,6 @@ using System.Threading.Tasks.Dataflow; using FluxFlow.Composition.Model; +using FluxFlow.Data; using FluxFlow.Nodes; using Microsoft.Extensions.DependencyInjection; using Shouldly; @@ -69,14 +70,61 @@ public void Typed_factory_registration_declares_metadata_without_running_factory descriptor.Inputs["Signal"].Kind.ShouldBe(ComponentPortKind.Signal); descriptor.Outputs.Keys.ShouldBe(["Output", "Diagnostics"]); descriptor.Outputs["Output"].MessageType.ShouldBe(typeof(int)); - descriptor.Outputs["Diagnostics"].MessageType.ShouldBe(typeof(ComponentEvent)); + descriptor.Outputs["Diagnostics"].MessageType.ShouldBe(typeof(global::FluxFlow.Data.FlowValue)); } [Fact] public void Runtime_component_binding_builders_expose_only_Has_port_methods() { - AssertCanonicalPortMethods(typeof(RuntimeComponentBindingBuilder<>)); - AssertCanonicalPortMethods(typeof(RuntimeComponentInstanceBindingBuilder)); + AssertCanonicalPortMethods( + typeof(RuntimeComponentBindingBuilder<>), + [ + "HasEvents", + "HasFlowValueInput", + "HasFlowValueInput", + "HasFlowValueOutput", + "HasInput", + "HasOutput", + "HasSignalInput" + ]); + AssertCanonicalPortMethods( + typeof(RuntimeComponentInstanceBindingBuilder), + ["HasEvents", "HasFlowValueInput", "HasInput", "HasOutput", "HasSignalInput"]); + } + + [Fact] + public async Task Flow_value_bindings_require_physical_canonical_node_ports() + { + var services = new ServiceCollection(); + BindingNode? created = null; + services.AddFluxFlowComponents().Advanced.AddDynamicComponent("test.flow-value", component => + component + .UseFactory(_ => created = new BindingNode()) + .HasFlowValueInput("Input", static node => node.CanonicalInput, FlowValueShape.String("Text")) + .HasFlowValueOutput("Output", static node => node.CanonicalOutput)); + using var provider = services.BuildServiceProvider(); + var descriptor = provider.GetRequiredService(); + var instance = await descriptor.Factory(Context(provider)); + + descriptor.Inputs["Input"].MessageType.ShouldBe(typeof(FlowValue)); + descriptor.Outputs["Output"].MessageType.ShouldBe(typeof(FlowValue)); + var input = instance.Inputs["Input"].ShouldBeOfType(); + var output = instance.Outputs["Output"].ShouldBeOfType(); + var node = created.ShouldNotBeNull(); + input.Target.ShouldBeSameAs(node.CanonicalInput); + output.Source.ShouldBeSameAs(node.CanonicalOutput); + + input.Target.Post(FlowMessage.Create(FlowValue.From("payload"))).ShouldBeTrue(); + var delivered = await node.CanonicalInput.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5)); + delivered.IsError.ShouldBeFalse(); + delivered.Value.Deserialize().ShouldBe("payload"); + + node.CanonicalOutput.Post(FlowMessage.Create(FlowValue.From(42))).ShouldBeTrue(); + var canonical = await output.Source.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5)); + canonical.IsError.ShouldBeFalse(); + canonical.Value.Deserialize().ShouldBe(42); + + await instance.DisposeAsync(); } [Fact] @@ -110,7 +158,7 @@ public async Task Sync_factory_infers_ports_and_binds_exact_node_members_once_in .Target.ShouldBeSameAs(created.Signal); instance.Outputs["Output"].ShouldBeOfType>() .Source.ShouldBeSameAs(created.Output); - instance.Outputs["Diagnostics"].ShouldBeOfType>(); + instance.Outputs["Diagnostics"].ShouldBeOfType(); await instance.DisposeAsync(); created.DisposeCount.ShouldBe(1); @@ -253,9 +301,9 @@ public async Task Multiple_named_event_ports_bind_their_selected_sources_indepen var descriptor = provider.GetRequiredService(); var instance = await descriptor.Factory(Context(provider)); var diagnostics = instance.Outputs["Diagnostics"] - .ShouldBeOfType>(); + .ShouldBeOfType(); var audit = instance.Outputs["Audit"] - .ShouldBeOfType>(); + .ShouldBeOfType(); var diagnosticReceive = diagnostics.Source.ReceiveAsync(); var auditReceive = audit.Source.ReceiveAsync(); @@ -263,12 +311,12 @@ public async Task Multiple_named_event_ports_bind_their_selected_sources_indepen node.Events.Post(new FlowEvent { Name = "diagnostic" }).ShouldBeTrue(); node.AuditEvents.Post(new FlowEvent { Name = "audit" }).ShouldBeTrue(); - (await diagnosticReceive.WaitAsync(TimeSpan.FromSeconds(5))).Value.Name + (await diagnosticReceive.WaitAsync(TimeSpan.FromSeconds(5))).ToFlowEvent().Name .ShouldBe("diagnostic"); - (await auditReceive.WaitAsync(TimeSpan.FromSeconds(5))).Value.Name + (await auditReceive.WaitAsync(TimeSpan.FromSeconds(5))).ToFlowEvent().Name .ShouldBe("audit"); descriptor.Outputs.Keys.ShouldBe(["Diagnostics", "Audit"]); - descriptor.Outputs.Values.All(port => port.MessageType == typeof(ComponentEvent)) + descriptor.Outputs.Values.All(port => port.MessageType == typeof(global::FluxFlow.Data.FlowValue)) .ShouldBeTrue(); await instance.DisposeAsync(); @@ -424,6 +472,71 @@ public void Equivalent_typed_registration_is_idempotent_and_changed_selector_con .ShouldBe(1); } + [Theory] + [InlineData(false)] + [InlineData(true)] + public void Input_shape_registration_and_preflight_do_not_activate_factories_or_selectors(bool instanceFactory) + { + var services = new ServiceCollection(); + var factoryCalls = 0; + var selectorCalls = 0; + var shape = FlowValueShape.Object("Request", "target"); + services.AddFluxFlowComponents().Advanced.AddDynamicComponent("test.shape", component => + { + if (instanceFactory) + { + component.UseInstanceFactory(_ => + { + factoryCalls++; + throw new InvalidOperationException("Preflight must not activate a component."); + }).HasFlowValueInput("Input", shape, ComponentPortLinkCardinality.Single); + } + else + { + component.UseFactory(_ => + { + factoryCalls++; + return new BindingNode(); + }).HasFlowValueInput("Input", node => + { + selectorCalls++; + return node.CanonicalInput; + }, shape, ComponentPortLinkCardinality.Single); + } + }); + using var provider = services.BuildServiceProvider(); + var descriptor = provider.GetRequiredService(); + + descriptor.Inputs["Input"].InputShape.ShouldBeSameAs(shape); + descriptor.Inputs["Input"].MessageType.ShouldBe(typeof(FlowValue)); + descriptor.Inputs["Input"].LinkCardinality.ShouldBe(ComponentPortLinkCardinality.Single); + descriptor.ValidateInputShape("Input", FlowValue.From(new { target = "orders" })) + .ShouldNotBeNull().IsValid.ShouldBeTrue(); + factoryCalls.ShouldBe(0); + selectorCalls.ShouldBe(0); + } + + [Fact] + public void Equivalent_input_shapes_are_idempotent_and_changed_shapes_conflict() + { + var services = new ServiceCollection(); + var builder = services.AddFluxFlowComponents().Advanced; + Register(FlowValueShape.Object("Request", "target", "body")); + Register(FlowValueShape.Object("Request", "BODY", "TARGET")); + + services.Count(registration => registration.ServiceType == typeof(ComponentDescriptor)).ShouldBe(1); + var exception = Should.Throw(() => + Register(FlowValueShape.Object("Request", "target", "body", "method"))); + exception.Message.ShouldContain("test.shape-identity"); + exception.Message.ShouldContain("conflicting descriptor registration"); + services.Count(registration => registration.ServiceType == typeof(ComponentDescriptor)).ShouldBe(1); + + void Register(FlowValueShape shape) => builder.AddDynamicComponent("test.shape-identity", component => + component.UseFactory(CreateNode).HasFlowValueInput("Input", SelectCanonicalInput, shape)); + } + + private static ITargetBlock SelectCanonicalInput(BindingNode node) => node.CanonicalInput; + private static void ConfigureEquivalent(RuntimeComponentRegistrationBuilder component) => component .UseFactory(CreateNode) @@ -447,7 +560,7 @@ private static ITargetBlock> SelectAlternateInput(BindingNod private static ISourceBlock> SelectOutput(BindingNode node) => node.Output; - private static ISourceBlock SelectEvents(BindingNode node) => node.Events; + private static ISourceBlock SelectEvents(BindingNode node) => node.Events; private static ComponentActivationContext Context(IServiceProvider services) => new( @@ -456,7 +569,7 @@ private static ComponentActivationContext Context(IServiceProvider services) "Worker", new ComponentDefinition("test.typed")); - private static void AssertCanonicalPortMethods(Type builderType) + private static void AssertCanonicalPortMethods(Type builderType, string[] expectedMethods) { var methodNames = builderType .GetMethods( @@ -468,12 +581,7 @@ private static void AssertCanonicalPortMethods(Type builderType) .ToArray(); methodNames.ShouldBe( - [ - "HasEvents", - "HasInput", - "HasOutput", - "HasSignalInput" - ], + expectedMethods, $"{builderType.Name} must expose only the canonical Has port DSL."); methodNames.ShouldNotContain( static name => name.StartsWith("Add", StringComparison.Ordinal), @@ -492,9 +600,13 @@ private sealed class BindingNode : IFlowNode public BufferBlock> Output { get; } = new(); - public BufferBlock Events { get; } = new(); + public BufferBlock CanonicalInput { get; } = new(); + + public BufferBlock CanonicalOutput { get; } = new(); + + public BufferBlock Events { get; } = new(); - public BufferBlock AuditEvents { get; } = new(); + public BufferBlock AuditEvents { get; } = new(); public RecordingSignalTarget Signal { get; } = new(); @@ -507,6 +619,8 @@ public void Complete() Input.Complete(); AlternateInput.Complete(); Output.Complete(); + CanonicalInput.Complete(); + CanonicalOutput.Complete(); Events.Complete(); AuditEvents.Complete(); Signal.Complete(); @@ -519,6 +633,8 @@ public void Fault(Exception exception) ((IDataflowBlock)Input).Fault(exception); ((IDataflowBlock)AlternateInput).Fault(exception); ((IDataflowBlock)Output).Fault(exception); + ((IDataflowBlock)CanonicalInput).Fault(exception); + ((IDataflowBlock)CanonicalOutput).Fault(exception); ((IDataflowBlock)Events).Fault(exception); ((IDataflowBlock)AuditEvents).Fault(exception); Signal.Fault(exception); diff --git a/tests/FluxFlow.Composition.Tests/TestCompositionNodes.cs b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/TestCompositionNodes.cs similarity index 93% rename from tests/FluxFlow.Composition.Tests/TestCompositionNodes.cs rename to tests/Unit/Core/Application/FluxFlow.Composition.Tests/TestCompositionNodes.cs index 8cf5b415..e6d3ece1 100644 --- a/tests/FluxFlow.Composition.Tests/TestCompositionNodes.cs +++ b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/TestCompositionNodes.cs @@ -74,7 +74,7 @@ public static ComponentCatalog Create(BuildTracker? tracker = null) outputs: [ ComponentPorts.Metadata("Output"), - ComponentPorts.Metadata("Events") + ComponentPorts.Metadata("Events") ]), new ComponentDescriptor( TestNodeTypes.TickingSource, @@ -89,7 +89,7 @@ public static ComponentCatalog Create(BuildTracker? tracker = null) outputs: [ ComponentPorts.Metadata("Output"), - ComponentPorts.Metadata("Events") + ComponentPorts.Metadata("Events") ]), new ComponentDescriptor( TestNodeTypes.IntSource, @@ -104,7 +104,7 @@ public static ComponentCatalog Create(BuildTracker? tracker = null) outputs: [ ComponentPorts.Metadata("Output"), - ComponentPorts.Metadata("Events") + ComponentPorts.Metadata("Events") ]), new ComponentDescriptor( TestNodeTypes.Uppercase, @@ -121,7 +121,7 @@ public static ComponentCatalog Create(BuildTracker? tracker = null) outputs: [ ComponentPorts.Metadata("Output"), - ComponentPorts.Metadata("Events") + ComponentPorts.Metadata("Events") ]), new ComponentDescriptor( TestNodeTypes.Sink, @@ -136,7 +136,7 @@ public static ComponentCatalog Create(BuildTracker? tracker = null) addressableEvents: [ComponentPorts.Events("Events", node.Events)])); }, inputs: [ComponentPorts.Metadata("Input")], - outputs: [ComponentPorts.Metadata("Events")]), + outputs: [ComponentPorts.Metadata("Events")]), new ComponentDescriptor( TestNodeTypes.TrackedSource, _ => @@ -150,7 +150,7 @@ public static ComponentCatalog Create(BuildTracker? tracker = null) outputs: [ ComponentPorts.Metadata("Output"), - ComponentPorts.Metadata("Events") + ComponentPorts.Metadata("Events") ]), new ComponentDescriptor( TestNodeTypes.Failing, diff --git a/tests/FluxFlow.Composition.Tests/TypedCodeFirstApplicationAuthoringTests.cs b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/TypedCodeFirstApplicationAuthoringTests.cs similarity index 98% rename from tests/FluxFlow.Composition.Tests/TypedCodeFirstApplicationAuthoringTests.cs rename to tests/Unit/Core/Application/FluxFlow.Composition.Tests/TypedCodeFirstApplicationAuthoringTests.cs index 6f675613..7882e861 100644 --- a/tests/FluxFlow.Composition.Tests/TypedCodeFirstApplicationAuthoringTests.cs +++ b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/TypedCodeFirstApplicationAuthoringTests.cs @@ -113,7 +113,7 @@ public void Complete_contracts_add_configured_and_configuration_free_components_ routerContract.Descriptor.Outputs.Keys.ShouldBe( ["Approved", "Events", "Orders", "Rejected"], ignoreOrder: true); - routerContract.Descriptor.Outputs["Events"].MessageType.ShouldBe(typeof(ComponentEvent)); + routerContract.Descriptor.Outputs["Events"].MessageType.ShouldBe(typeof(global::FluxFlow.Data.FlowValue)); routerContract.Descriptor.Options.Keys.ShouldBe(["minimum"]); routerContract.Descriptor.Options["minimum"].IsRequired.ShouldBeTrue(); routerContract.Descriptor.Resources.Keys.ShouldBe(["clock"]); @@ -437,7 +437,7 @@ public RouterHandle(ComponentHandle definition) Approved = definition.Output("Approved"); Rejected = definition.Output("Rejected"); Refresh = definition.SignalInput("Refresh"); - Events = definition.Output("Events"); + Events = definition.Output("Events"); } public InputPortHandle Input { get; } @@ -448,7 +448,7 @@ public RouterHandle(ComponentHandle definition) public SignalInputPortHandle Refresh { get; } - public OutputPortHandle Events { get; } + public OutputPortHandle Events { get; } } private sealed class SignalComponentHandle : AuthoredComponentHandle @@ -457,12 +457,12 @@ public SignalComponentHandle(ComponentHandle definition) : base(definition) { Signal = definition.SignalInput("Signal"); - Events = definition.Output("Events"); + Events = definition.Output("Events"); } public SignalInputPortHandle Signal { get; } - public OutputPortHandle Events { get; } + public OutputPortHandle Events { get; } } private sealed class RouterOptions @@ -509,7 +509,7 @@ private sealed class AuthoringNode : IFlowNode public BufferBlock> OrdersOutput { get; } = new(); - public BufferBlock Events { get; } = new(); + public BufferBlock Events { get; } = new(); public Task Completion => Task.CompletedTask; diff --git a/tests/FluxFlow.Composition.Tests/TypedCodeFirstApplicationLinkCompilerTests.cs b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/TypedCodeFirstApplicationLinkCompilerTests.cs similarity index 100% rename from tests/FluxFlow.Composition.Tests/TypedCodeFirstApplicationLinkCompilerTests.cs rename to tests/Unit/Core/Application/FluxFlow.Composition.Tests/TypedCodeFirstApplicationLinkCompilerTests.cs diff --git a/tests/FluxFlow.Composition.Tests/TypedCodeFirstResourceAuthoringTests.cs b/tests/Unit/Core/Application/FluxFlow.Composition.Tests/TypedCodeFirstResourceAuthoringTests.cs similarity index 100% rename from tests/FluxFlow.Composition.Tests/TypedCodeFirstResourceAuthoringTests.cs rename to tests/Unit/Core/Application/FluxFlow.Composition.Tests/TypedCodeFirstResourceAuthoringTests.cs diff --git a/tests/FluxFlow.Coordination.Tests/FluxFlow.Coordination.Tests.csproj b/tests/Unit/Core/Execution/FluxFlow.Coordination.Tests/FluxFlow.Coordination.Tests.csproj similarity index 80% rename from tests/FluxFlow.Coordination.Tests/FluxFlow.Coordination.Tests.csproj rename to tests/Unit/Core/Execution/FluxFlow.Coordination.Tests/FluxFlow.Coordination.Tests.csproj index 4908f8bb..3944e92f 100644 --- a/tests/FluxFlow.Coordination.Tests/FluxFlow.Coordination.Tests.csproj +++ b/tests/Unit/Core/Execution/FluxFlow.Coordination.Tests/FluxFlow.Coordination.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,7 +6,7 @@ - + diff --git a/tests/FluxFlow.Coordination.Tests/PendingExchangeCoordinatorTests.cs b/tests/Unit/Core/Execution/FluxFlow.Coordination.Tests/PendingExchangeCoordinatorTests.cs similarity index 100% rename from tests/FluxFlow.Coordination.Tests/PendingExchangeCoordinatorTests.cs rename to tests/Unit/Core/Execution/FluxFlow.Coordination.Tests/PendingExchangeCoordinatorTests.cs diff --git a/tests/FluxFlow.Resilience.Tests/FluxFlow.Resilience.Tests.csproj b/tests/Unit/Core/Execution/FluxFlow.Resilience.Tests/FluxFlow.Resilience.Tests.csproj similarity index 80% rename from tests/FluxFlow.Resilience.Tests/FluxFlow.Resilience.Tests.csproj rename to tests/Unit/Core/Execution/FluxFlow.Resilience.Tests/FluxFlow.Resilience.Tests.csproj index 0b5252b3..31df2c6d 100644 --- a/tests/FluxFlow.Resilience.Tests/FluxFlow.Resilience.Tests.csproj +++ b/tests/Unit/Core/Execution/FluxFlow.Resilience.Tests/FluxFlow.Resilience.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,7 +6,7 @@ - + diff --git a/tests/FluxFlow.Resilience.Tests/RetryTests.cs b/tests/Unit/Core/Execution/FluxFlow.Resilience.Tests/RetryTests.cs similarity index 100% rename from tests/FluxFlow.Resilience.Tests/RetryTests.cs rename to tests/Unit/Core/Execution/FluxFlow.Resilience.Tests/RetryTests.cs diff --git a/tests/FluxFlow.Mapping.Tests/FlowAdapterTests.cs b/tests/Unit/Core/Foundation/FluxFlow.Mapping.Tests/FlowAdapterTests.cs similarity index 100% rename from tests/FluxFlow.Mapping.Tests/FlowAdapterTests.cs rename to tests/Unit/Core/Foundation/FluxFlow.Mapping.Tests/FlowAdapterTests.cs diff --git a/tests/FluxFlow.Mapping.Tests/FlowMapContextTests.cs b/tests/Unit/Core/Foundation/FluxFlow.Mapping.Tests/FlowMapContextTests.cs similarity index 100% rename from tests/FluxFlow.Mapping.Tests/FlowMapContextTests.cs rename to tests/Unit/Core/Foundation/FluxFlow.Mapping.Tests/FlowMapContextTests.cs diff --git a/tests/FluxFlow.Mapping.Tests/FluxFlow.Mapping.Tests.csproj b/tests/Unit/Core/Foundation/FluxFlow.Mapping.Tests/FluxFlow.Mapping.Tests.csproj similarity index 79% rename from tests/FluxFlow.Mapping.Tests/FluxFlow.Mapping.Tests.csproj rename to tests/Unit/Core/Foundation/FluxFlow.Mapping.Tests/FluxFlow.Mapping.Tests.csproj index 6c0b7c67..2a1dd6a9 100644 --- a/tests/FluxFlow.Mapping.Tests/FluxFlow.Mapping.Tests.csproj +++ b/tests/Unit/Core/Foundation/FluxFlow.Mapping.Tests/FluxFlow.Mapping.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,7 +6,7 @@ - + diff --git a/tests/FluxFlow.Nodes.Tests/CorrelationIdTests.cs b/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/CorrelationIdTests.cs similarity index 100% rename from tests/FluxFlow.Nodes.Tests/CorrelationIdTests.cs rename to tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/CorrelationIdTests.cs diff --git a/tests/FluxFlow.Nodes.Tests/Data/FlowContentTests.cs b/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/Data/FlowContentTests.cs similarity index 100% rename from tests/FluxFlow.Nodes.Tests/Data/FlowContentTests.cs rename to tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/Data/FlowContentTests.cs diff --git a/tests/FluxFlow.Nodes.Tests/Data/FlowErrorTests.cs b/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/Data/FlowErrorTests.cs similarity index 100% rename from tests/FluxFlow.Nodes.Tests/Data/FlowErrorTests.cs rename to tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/Data/FlowErrorTests.cs diff --git a/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowEventMessageTests.cs b/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowEventMessageTests.cs new file mode 100644 index 00000000..2ad32012 --- /dev/null +++ b/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowEventMessageTests.cs @@ -0,0 +1,55 @@ +using FluxFlow.Data; +using Shouldly; +using Xunit; + +namespace FluxFlow.Nodes.Tests; + +public sealed class FlowEventMessageTests +{ + [Fact] + public void Event_round_trips_through_canonical_message_contract() + { + var timestamp = new DateTimeOffset(2026, 9, 4, 12, 30, 0, TimeSpan.Zero); + var source = new FlowEvent + { + Timestamp = timestamp, + CorrelationId = new CorrelationId("correlation-1"), + Name = "orders.received", + Kind = FlowEventKind.Domain, + Level = FlowEventLevel.Information, + Message = "Order received.", + Dimensions = new Dictionary { ["tenant"] = "north" }, + Measurements = new Dictionary { ["items"] = 3 }, + Details = FlowValue.From(new { orderId = "A-100" }), + Attributes = new Dictionary { ["attempt"] = 2 } + }; + + var message = source.ToMessage(); + + message.IsError.ShouldBeFalse(); + message.Headers[FlowEventHeaders.Type].ShouldBe("orders.received"); + message.Headers[FlowEventHeaders.Kind].ShouldBe("domain"); + message.Headers[FlowEventHeaders.Level].ShouldBe("information"); + message.Timestamp.ShouldBe(timestamp); + message.CorrelationId.ShouldBe(new CorrelationId("correlation-1")); + + message.TryGetFlowEvent(out var projected).ShouldBeTrue(); + projected.ShouldNotBeNull(); + projected.Name.ShouldBe(source.Name); + projected.Kind.ShouldBe(source.Kind); + projected.Level.ShouldBe(source.Level); + projected.Dimensions["tenant"].ShouldBe("north"); + projected.Measurements["items"].ShouldBe(3); + projected.Attributes["attempt"].ShouldBe(2L); + projected.Details.ToJsonElement().GetProperty("orderId").GetString().ShouldBe("A-100"); + } + + [Fact] + public void Non_event_message_does_not_project_as_event() + { + var message = FlowMessage.Create(FlowValue.From(new { value = 42 })); + + message.TryGetFlowEvent(out var projected).ShouldBeFalse(); + projected.ShouldBeNull(); + } +} diff --git a/tests/FluxFlow.Nodes.Tests/FlowEventTests.cs b/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowEventTests.cs similarity index 100% rename from tests/FluxFlow.Nodes.Tests/FlowEventTests.cs rename to tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowEventTests.cs diff --git a/tests/FluxFlow.Nodes.Tests/FlowFaultAndDrainHookTests.cs b/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowFaultAndDrainHookTests.cs similarity index 100% rename from tests/FluxFlow.Nodes.Tests/FlowFaultAndDrainHookTests.cs rename to tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowFaultAndDrainHookTests.cs diff --git a/tests/FluxFlow.Nodes.Tests/FlowMessageTests.cs b/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowMessageTests.cs similarity index 85% rename from tests/FluxFlow.Nodes.Tests/FlowMessageTests.cs rename to tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowMessageTests.cs index 8050a44c..e9c6cb9f 100644 --- a/tests/FluxFlow.Nodes.Tests/FlowMessageTests.cs +++ b/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowMessageTests.cs @@ -8,6 +8,51 @@ namespace FluxFlow.Nodes.Tests; public sealed class FlowMessageTests { + [Fact] + public void Canonical_message_exposes_non_throwing_script_friendly_cases() + { + var success = FlowMessage.Create(FlowValue.From(new { orderId = 42 })); + var failure = FlowMessage.CreateError( + new FlowError("order.invalid", "Invalid order.", "validation")); + + success.IsError.ShouldBeFalse(); + success.TryGetValue(out var value).ShouldBeTrue(); + value.ToJsonElement().GetProperty("orderId").GetInt32().ShouldBe(42); + success.TryGetError(out _).ShouldBeFalse(); + + failure.IsError.ShouldBeTrue(); + failure.Value.ShouldBeNull(); + failure.TryGetValue(out _).ShouldBeFalse(); + failure.TryGetError(out var error).ShouldBeTrue(); + error.Code.ShouldBe("order.invalid"); + } + + [Fact] + public void Canonical_message_preserves_explicit_json_null_as_a_success_value() + { + var message = FlowMessage.Create(FlowValue.Null); + + message.IsError.ShouldBeFalse(); + message.TryGetValue(out var value).ShouldBeTrue(); + value.ShouldBeSameAs(FlowValue.Null); + value.Kind.ShouldBe(JsonValueKind.Null); + } + + [Fact] + public void Canonical_message_json_round_trips_the_flat_expression_contract() + { + const string json = """ + {"traceId":"trace-9","messageId":"message-9","causationId":null,"correlationId":null,"timestamp":"2026-07-17T01:02:03+00:00","headers":{},"isError":false,"value":{"orderId":42},"error":null} + """; + + var message = JsonSerializer.Deserialize(json).ShouldNotBeNull(); + + message.IsError.ShouldBeFalse(); + message.TryGetValue(out var value).ShouldBeTrue(); + value.ToJsonElement().GetProperty("orderId").GetInt32().ShouldBe(42); + JsonSerializer.Serialize(message).ShouldBe(json); + } + [Fact] public void Create_ProducesValueCaseWithIdentity() { diff --git a/tests/FluxFlow.Nodes.Tests/FlowMultiOutputAndSourceTests.cs b/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowMultiOutputAndSourceTests.cs similarity index 99% rename from tests/FluxFlow.Nodes.Tests/FlowMultiOutputAndSourceTests.cs rename to tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowMultiOutputAndSourceTests.cs index 29115ef7..aa929472 100644 --- a/tests/FluxFlow.Nodes.Tests/FlowMultiOutputAndSourceTests.cs +++ b/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowMultiOutputAndSourceTests.cs @@ -182,7 +182,7 @@ public async Task Output_target_rejection_faults_source_stops_production_and_com () => rejectingTarget.Completion.WaitAsync(Timeout)); await source.Stopped.Task.WaitAsync(Timeout); - @event.Name.ShouldBe("source.started"); + @event.ToFlowEvent().Name.ShouldBe("source.started"); ownerFailure.ShouldBeSameAs(outputFailure); targetFailure.ShouldBeSameAs(outputFailure); await eventTarget.Completion.WaitAsync(Timeout); diff --git a/tests/FluxFlow.Nodes.Tests/FlowNodeTests.cs b/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowNodeTests.cs similarity index 99% rename from tests/FluxFlow.Nodes.Tests/FlowNodeTests.cs rename to tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowNodeTests.cs index 227288f4..72701bd8 100644 --- a/tests/FluxFlow.Nodes.Tests/FlowNodeTests.cs +++ b/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowNodeTests.cs @@ -154,7 +154,7 @@ public async Task Output_target_rejection_faults_node_stops_input_and_completes_ var targetFailure = await Should.ThrowAsync( async () => await rejecting.Completion.WaitAsync(Timeout)); - @event.Name.ShouldBe("test.output.emitting"); + @event.ToFlowEvent().Name.ShouldBe("test.output.emitting"); nodeFailure.ShouldBeSameAs(outputFailure); targetFailure.ShouldBeSameAs(outputFailure); node.IsStopping.ShouldBeTrue(); diff --git a/tests/FluxFlow.Nodes.Tests/FlowOptionsTests.cs b/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowOptionsTests.cs similarity index 100% rename from tests/FluxFlow.Nodes.Tests/FlowOptionsTests.cs rename to tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowOptionsTests.cs diff --git a/tests/FluxFlow.Nodes.Tests/FlowOutputTests.cs b/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowOutputTests.cs similarity index 100% rename from tests/FluxFlow.Nodes.Tests/FlowOutputTests.cs rename to tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowOutputTests.cs diff --git a/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowValueTests.cs b/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowValueTests.cs new file mode 100644 index 00000000..76c6a88b --- /dev/null +++ b/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FlowValueTests.cs @@ -0,0 +1,157 @@ +using System.Text.Json; +using FluxFlow.Data; +using Shouldly; +using Xunit; + +namespace FluxFlow.Nodes.Tests; + +public sealed class FlowValueTests +{ + [Fact] + public void From_and_deserialize_use_the_same_web_json_contract() + { + var value = FlowValue.From(new SamplePayload("alpha", 7)); + + var json = value.ToJsonElement(); + json.GetProperty("name").GetString().ShouldBe("alpha"); + json.GetProperty("count").GetInt32().ShouldBe(7); + value.Deserialize().ShouldBe(new SamplePayload("alpha", 7)); + } + + [Fact] + public void From_json_owns_a_clone_of_the_supplied_document() + { + FlowValue value; + using (var document = JsonDocument.Parse("{\"enabled\":true}")) + value = FlowValue.FromJson(document.RootElement); + + value.Kind.ShouldBe(JsonValueKind.Object); + value.ToJsonElement().GetProperty("enabled").GetBoolean().ShouldBeTrue(); + } + + [Fact] + public void From_preserves_an_existing_flow_value() + { + var value = FlowValue.From("payload"); + + FlowValue.From(value).ShouldBeSameAs(value); + } + + [Fact] + public void Convert_value_changes_only_the_payload_representation() + { + var original = FlowMessage.Create( + new SamplePayload("alpha", 7), + correlationId: CorrelationId.New(), + headers: new Dictionary { ["source"] = "test" }); + + var converted = original.ConvertValue(FlowValue.From(original.Value)); + + converted.Value!.Deserialize().ShouldBe(original.Value); + converted.CorrelationId.ShouldBe(original.CorrelationId); + converted.TraceId.ShouldBe(original.TraceId); + converted.MessageId.ShouldBe(original.MessageId); + converted.CausationId.ShouldBe(original.CausationId); + converted.Timestamp.ShouldBe(original.Timestamp); + converted.Headers.ShouldBe(original.Headers); + } + + [Fact] + public void From_omits_undefined_json_element_properties() + { + var value = FlowValue.From(new { Optional = default(JsonElement) }); + + value.ToJsonElement().TryGetProperty("optional", out _).ShouldBeFalse(); + } + + [Fact] + public void From_uses_the_concrete_runtime_type_for_polymorphic_values() + { + PolymorphicPayload payload = new ConcretePayload("runtime"); + + var value = FlowValue.From(payload); + + value.ToJsonElement().GetProperty("name").GetString().ShouldBe("runtime"); + } + + [Fact] + public void Primitive_materializers_accept_only_their_owned_shapes() + { + var materialized = FlowValueMaterializers.String.Materialize(FlowValue.From("value")); + var rejected = FlowValueMaterializers.String.Materialize(FlowValue.From(42)); + + materialized.IsSuccess.ShouldBeTrue(); + materialized.Value.ShouldBe("value"); + rejected.IsSuccess.ShouldBeFalse(); + rejected.Error.ShouldNotBeNull().Code.ShouldBe("flow.value.expected_string"); + } + + [Fact] + public void Primitive_materializer_lookup_rejects_domain_types() + { + var exception = Should.Throw( + () => FlowValueMaterializers.Primitive()); + + exception.Message.ShouldContain("owning module must provide"); + } + + [Fact] + public void Input_shape_validates_json_kind_and_required_properties_case_insensitively() + { + var shape = FlowValueShape.Object( + "An HTTP-like request.", + "method", + "url"); + + shape.Validate(FlowValue.From(new { Method = "POST", URL = "/orders" })) + .IsValid.ShouldBeTrue(); + + var missing = shape.Validate(FlowValue.From(new { method = "POST" })); + missing.IsValid.ShouldBeFalse(); + missing.Error.ShouldNotBeNull().ShouldContain("url"); + + var wrongKind = shape.Validate(FlowValue.From("POST /orders")); + wrongKind.IsValid.ShouldBeFalse(); + wrongKind.Error.ShouldNotBeNull().ShouldContain(nameof(JsonValueKind.String)); + } + + [Fact] + public void Input_shape_equality_compares_kind_and_property_sets_and_description() + { + var first = new FlowValueShape("Request", [JsonValueKind.Object, JsonValueKind.Null], ["id", "value"]); + var reordered = new FlowValueShape("Request", [JsonValueKind.Null, JsonValueKind.Object], ["VALUE", "ID"]); + + first.Equals(reordered).ShouldBeTrue(); + first.GetHashCode().ShouldBe(reordered.GetHashCode()); + first.Equals(new FlowValueShape("Request", [JsonValueKind.Object], ["id", "value"])).ShouldBeFalse(); + first.Equals(new FlowValueShape("Request", first.AcceptedKinds, ["id"])).ShouldBeFalse(); + first.Equals(new FlowValueShape("Other request", first.AcceptedKinds, first.RequiredProperties)).ShouldBeFalse(); + first.Equals(null).ShouldBeFalse(); + } + + [Fact] + public void Input_shape_round_trip_preserves_nullable_object_validation_and_snapshot() + { + JsonValueKind[] kinds = [JsonValueKind.Object, JsonValueKind.Null]; + string[] properties = ["id"]; + var original = new FlowValueShape("Optional request", kinds, properties); + kinds[0] = JsonValueKind.String; + properties[0] = "changed"; + var options = new JsonSerializerOptions(JsonSerializerDefaults.Web); + + var roundTripped = JsonSerializer.Deserialize( + JsonSerializer.Serialize(original, options), options).ShouldNotBeNull(); + + roundTripped.Equals(original).ShouldBeTrue(); + roundTripped.Validate(FlowValue.Null).IsValid.ShouldBeTrue(); + roundTripped.Validate(FlowValue.From(new { ID = "42" })).IsValid.ShouldBeTrue(); + roundTripped.Validate(FlowValue.From(new { changed = "42" })).IsValid.ShouldBeFalse(); + roundTripped.Validate(FlowValue.From("42")).IsValid.ShouldBeFalse(); + } + + private sealed record SamplePayload(string Name, int Count); + + private abstract record PolymorphicPayload; + + private sealed record ConcretePayload(string Name) : PolymorphicPayload; +} diff --git a/tests/FluxFlow.Nodes.Tests/FluxFlow.Nodes.Tests.csproj b/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FluxFlow.Nodes.Tests.csproj similarity index 79% rename from tests/FluxFlow.Nodes.Tests/FluxFlow.Nodes.Tests.csproj rename to tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FluxFlow.Nodes.Tests.csproj index 0dbd04ad..8ecae02c 100644 --- a/tests/FluxFlow.Nodes.Tests/FluxFlow.Nodes.Tests.csproj +++ b/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/FluxFlow.Nodes.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,7 +6,7 @@ - + diff --git a/tests/FluxFlow.Nodes.Tests/ReliableOutputTestTargets.cs b/tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/ReliableOutputTestTargets.cs similarity index 100% rename from tests/FluxFlow.Nodes.Tests/ReliableOutputTestTargets.cs rename to tests/Unit/Core/Foundation/FluxFlow.Nodes.Tests/ReliableOutputTestTargets.cs diff --git a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/FluxFlow.Engine.DurableInput.SqlFile.Tests.csproj b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/FluxFlow.Engine.DurableInput.SqlFile.Tests.csproj similarity index 84% rename from tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/FluxFlow.Engine.DurableInput.SqlFile.Tests.csproj rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/FluxFlow.Engine.DurableInput.SqlFile.Tests.csproj index aad0017e..92a6b83b 100644 --- a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/FluxFlow.Engine.DurableInput.SqlFile.Tests.csproj +++ b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/FluxFlow.Engine.DurableInput.SqlFile.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,7 +6,7 @@ - + diff --git a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDeadLetterSchemaAssertions.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDeadLetterSchemaAssertions.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDeadLetterSchemaAssertions.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDeadLetterSchemaAssertions.cs diff --git a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputDeadLetterBoundaryTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputDeadLetterBoundaryTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputDeadLetterBoundaryTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputDeadLetterBoundaryTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputDeadLetterMigrationTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputDeadLetterMigrationTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputDeadLetterMigrationTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputDeadLetterMigrationTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputDeadLetterOperationsTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputDeadLetterOperationsTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputDeadLetterOperationsTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputDeadLetterOperationsTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputDeadLetterStoreConformanceTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputDeadLetterStoreConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputDeadLetterStoreConformanceTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputDeadLetterStoreConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputLeaseRenewalPersistenceTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputLeaseRenewalPersistenceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputLeaseRenewalPersistenceTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputLeaseRenewalPersistenceTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputLeaseRenewalStoreConformanceTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputLeaseRenewalStoreConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputLeaseRenewalStoreConformanceTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputLeaseRenewalStoreConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputRegistrationTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputRegistrationTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputRegistrationTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputRegistrationTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputRetentionStoreConformanceTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputRetentionStoreConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputRetentionStoreConformanceTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputRetentionStoreConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputRetentionTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputRetentionTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputRetentionTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputRetentionTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStatusStoreConformanceTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStatusStoreConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStatusStoreConformanceTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStatusStoreConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStatusTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStatusTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStatusTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStatusTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStoreConcurrencyTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStoreConcurrencyTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStoreConcurrencyTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStoreConcurrencyTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStoreConformanceTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStoreConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStoreConformanceTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStoreConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStoreOptionsTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStoreOptionsTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStoreOptionsTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStoreOptionsTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStorePersistenceTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStorePersistenceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStorePersistenceTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStorePersistenceTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStoreSchemaAndLifecycleTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStoreSchemaAndLifecycleTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStoreSchemaAndLifecycleTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputStoreSchemaAndLifecycleTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputTestData.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputTestData.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputTestData.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileDurableInputTestData.cs diff --git a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileVersionOneDatabase.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileVersionOneDatabase.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileVersionOneDatabase.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/SqlFileVersionOneDatabase.cs diff --git a/tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/TemporarySqliteDatabase.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/TemporarySqliteDatabase.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.SqlFile.Tests/TemporarySqliteDatabase.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile.Tests/TemporarySqliteDatabase.cs diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.Tests/FluxFlow.Engine.DurableInput.TSql.Tests.csproj b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql.Tests/FluxFlow.Engine.DurableInput.TSql.Tests.csproj similarity index 79% rename from tests/FluxFlow.Engine.DurableInput.TSql.Tests/FluxFlow.Engine.DurableInput.TSql.Tests.csproj rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql.Tests/FluxFlow.Engine.DurableInput.TSql.Tests.csproj index 8cb7b3a3..422e1a7f 100644 --- a/tests/FluxFlow.Engine.DurableInput.TSql.Tests/FluxFlow.Engine.DurableInput.TSql.Tests.csproj +++ b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql.Tests/FluxFlow.Engine.DurableInput.TSql.Tests.csproj @@ -1,4 +1,4 @@ - + net8.0;net10.0 @@ -6,7 +6,7 @@ - + diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputPackageBoundaryTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputPackageBoundaryTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputPackageBoundaryTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputPackageBoundaryTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputPreflightAndDisposalTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputPreflightAndDisposalTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputPreflightAndDisposalTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputPreflightAndDisposalTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputRegistrationTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputRegistrationTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputRegistrationTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputRegistrationTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputStoreOptionsTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputStoreOptionsTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputStoreOptionsTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputStoreOptionsTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputTestData.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputTestData.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputTestData.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql.Tests/TSqlDurableInputTestData.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableApplicationInputsTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableApplicationInputsTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableApplicationInputsTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableApplicationInputsTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputBoundaryTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputBoundaryTests.cs similarity index 93% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputBoundaryTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputBoundaryTests.cs index 4ea9565d..4ff16325 100644 --- a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputBoundaryTests.cs +++ b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputBoundaryTests.cs @@ -52,7 +52,7 @@ public void Package_source_has_no_reflection_dispatch_unbounded_worker_or_provid "FluxFlow.Engine.DurableInput.csproj")); project.Descendants("ProjectReference") .Select(element => element.Attribute("Include")?.Value) - .ShouldBe(["..\\FluxFlow.Engine\\FluxFlow.Engine.csproj"]); + .ShouldBe(["..\\..\\Runtime\\FluxFlow.Engine\\FluxFlow.Engine.csproj"]); } [Fact] @@ -103,7 +103,12 @@ private static string FindPackageDirectory() directory is not null; directory = directory.Parent) { - var candidate = Path.Combine(directory.FullName, "src", "FluxFlow.Engine.DurableInput"); + var candidate = Path.Combine( + directory.FullName, + "src", + "Engine", + "DurableInput", + "FluxFlow.Engine.DurableInput"); if (Directory.Exists(candidate)) return candidate; } diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputCompletionTestSource.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputCompletionTestSource.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputCompletionTestSource.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputCompletionTestSource.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputCompletionTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputCompletionTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputCompletionTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputCompletionTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputContractTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputContractTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputContractTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputContractTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputDeadLetterContractTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputDeadLetterContractTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputDeadLetterContractTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputDeadLetterContractTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputDeadLetterStoreConformanceTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputDeadLetterStoreConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputDeadLetterStoreConformanceTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputDeadLetterStoreConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputDeadLetterStoreTestContext.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputDeadLetterStoreTestContext.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputDeadLetterStoreTestContext.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputDeadLetterStoreTestContext.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputDispatcherTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputDispatcherTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputDispatcherTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputDispatcherTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputInstrumentationTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputInstrumentationTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputInstrumentationTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputInstrumentationTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputLeaseRenewalStoreConformanceTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputLeaseRenewalStoreConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputLeaseRenewalStoreConformanceTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputLeaseRenewalStoreConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputLeaseRenewalStoreTestContext.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputLeaseRenewalStoreTestContext.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputLeaseRenewalStoreTestContext.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputLeaseRenewalStoreTestContext.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputRegistrationTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputRegistrationTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputRegistrationTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputRegistrationTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputRetentionContractTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputRetentionContractTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputRetentionContractTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputRetentionContractTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputRetentionStoreConformanceTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputRetentionStoreConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputRetentionStoreConformanceTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputRetentionStoreConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputRetentionStoreTestContext.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputRetentionStoreTestContext.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputRetentionStoreTestContext.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputRetentionStoreTestContext.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputStatusContractsTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputStatusContractsTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputStatusContractsTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputStatusContractsTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputStatusStoreConformanceTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputStatusStoreConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputStatusStoreConformanceTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputStatusStoreConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputStatusStoreTestContext.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputStatusStoreTestContext.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputStatusStoreTestContext.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputStatusStoreTestContext.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputStoreConformanceData.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputStoreConformanceData.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputStoreConformanceData.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputStoreConformanceData.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputStoreConformanceTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputStoreConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputStoreConformanceTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputStoreConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputStoreContractTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputStoreContractTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputStoreContractTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputStoreContractTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputStoreTestContext.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputStoreTestContext.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputStoreTestContext.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputStoreTestContext.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputTestApplication.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputTestApplication.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputTestApplication.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputTestApplication.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputTestData.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputTestData.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputTestData.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputTestData.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputTestStore.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputTestStore.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputTestStore.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputTestStore.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/DurableInputWorkflowCompletionDispatcherTests.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputWorkflowCompletionDispatcherTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/DurableInputWorkflowCompletionDispatcherTests.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/DurableInputWorkflowCompletionDispatcherTests.cs diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/FluxFlow.Engine.DurableInput.Tests.csproj b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/FluxFlow.Engine.DurableInput.Tests.csproj similarity index 80% rename from tests/FluxFlow.Engine.DurableInput.Tests/FluxFlow.Engine.DurableInput.Tests.csproj rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/FluxFlow.Engine.DurableInput.Tests.csproj index c799728e..5ecdd4ce 100644 --- a/tests/FluxFlow.Engine.DurableInput.Tests/FluxFlow.Engine.DurableInput.Tests.csproj +++ b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/FluxFlow.Engine.DurableInput.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,7 +6,7 @@ - + diff --git a/tests/FluxFlow.Engine.DurableInput.Tests/RecordingLogger.cs b/tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/RecordingLogger.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableInput.Tests/RecordingLogger.cs rename to tests/Unit/Engine/DurableInput/FluxFlow.Engine.DurableInput.Tests/RecordingLogger.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests.csproj b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests.csproj similarity index 74% rename from tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests.csproj rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests.csproj index 87673125..9fa05472 100644 --- a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests.csproj +++ b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,8 +6,8 @@ - - + + diff --git a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableInputOutputCoexistenceTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableInputOutputCoexistenceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableInputOutputCoexistenceTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableInputOutputCoexistenceTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeadLetterInfrastructureTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeadLetterInfrastructureTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeadLetterInfrastructureTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeadLetterInfrastructureTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeadLetterStoreConformanceTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeadLetterStoreConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeadLetterStoreConformanceTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeadLetterStoreConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeliveryInfrastructureTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeliveryInfrastructureTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeliveryInfrastructureTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeliveryInfrastructureTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeliverySchemaTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeliverySchemaTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeliverySchemaTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeliverySchemaTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeliveryStoreConformanceTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeliveryStoreConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeliveryStoreConformanceTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputDeliveryStoreConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputLeaseRenewalTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputLeaseRenewalTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputLeaseRenewalTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputLeaseRenewalTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputRegistrationTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputRegistrationTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputRegistrationTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputRegistrationTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputRetentionStoreConformanceTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputRetentionStoreConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputRetentionStoreConformanceTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputRetentionStoreConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputRetentionTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputRetentionTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputRetentionTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputRetentionTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStatusStoreConformanceTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStatusStoreConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStatusStoreConformanceTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStatusStoreConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStatusTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStatusTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStatusTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStatusTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStoreConcurrencyTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStoreConcurrencyTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStoreConcurrencyTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStoreConcurrencyTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStoreConformanceTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStoreConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStoreConformanceTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStoreConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStoreOptionsTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStoreOptionsTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStoreOptionsTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStoreOptionsTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStorePersistenceTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStorePersistenceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStorePersistenceTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStorePersistenceTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStoreSchemaAndLifecycleTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStoreSchemaAndLifecycleTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStoreSchemaAndLifecycleTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputStoreSchemaAndLifecycleTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputTestData.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputTestData.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputTestData.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputTestData.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputTestDatabase.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputTestDatabase.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputTestDatabase.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/SqlFileDurableOutputTestDatabase.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/TemporarySqliteDatabase.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/TemporarySqliteDatabase.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.SqlFile.Tests/TemporarySqliteDatabase.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile.Tests/TemporarySqliteDatabase.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.Tests/FluxFlow.Engine.DurableOutput.TSql.Tests.csproj b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.Tests/FluxFlow.Engine.DurableOutput.TSql.Tests.csproj similarity index 78% rename from tests/FluxFlow.Engine.DurableOutput.TSql.Tests/FluxFlow.Engine.DurableOutput.TSql.Tests.csproj rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.Tests/FluxFlow.Engine.DurableOutput.TSql.Tests.csproj index 02064577..6270bd48 100644 --- a/tests/FluxFlow.Engine.DurableOutput.TSql.Tests/FluxFlow.Engine.DurableOutput.TSql.Tests.csproj +++ b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.Tests/FluxFlow.Engine.DurableOutput.TSql.Tests.csproj @@ -1,4 +1,4 @@ - + net8.0;net10.0 @@ -6,7 +6,7 @@ - + diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputPackageBoundaryTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputPackageBoundaryTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputPackageBoundaryTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputPackageBoundaryTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputPreflightAndDisposalTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputPreflightAndDisposalTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputPreflightAndDisposalTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputPreflightAndDisposalTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputRegistrationTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputRegistrationTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputRegistrationTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputRegistrationTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputStoreOptionsTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputStoreOptionsTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputStoreOptionsTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputStoreOptionsTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputTestData.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputTestData.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputTestData.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql.Tests/TSqlDurableOutputTestData.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputCaptureTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputCaptureTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputCaptureTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputCaptureTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputContentComparisonTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputContentComparisonTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputContentComparisonTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputContentComparisonTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputContractTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputContractTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputContractTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputContractTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeadLetterContractTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeadLetterContractTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeadLetterContractTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeadLetterContractTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeadLetterStoreConformanceTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeadLetterStoreConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeadLetterStoreConformanceTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeadLetterStoreConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeadLetterStoreTestContext.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeadLetterStoreTestContext.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeadLetterStoreTestContext.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeadLetterStoreTestContext.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryContractTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryContractTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryContractTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryContractTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryDispatcherTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryDispatcherTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryDispatcherTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryDispatcherTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryRegistrationTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryRegistrationTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryRegistrationTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryRegistrationTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryStoreConformanceTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryStoreConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryStoreConformanceTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryStoreConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryStoreTestContext.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryStoreTestContext.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryStoreTestContext.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputDeliveryStoreTestContext.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputInstrumentationTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputInstrumentationTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputInstrumentationTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputInstrumentationTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputRegistrationTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputRegistrationTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputRegistrationTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputRegistrationTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputRetentionContractTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputRetentionContractTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputRetentionContractTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputRetentionContractTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputRetentionStoreConformanceTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputRetentionStoreConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputRetentionStoreConformanceTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputRetentionStoreConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputRetentionStoreTestContext.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputRetentionStoreTestContext.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputRetentionStoreTestContext.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputRetentionStoreTestContext.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStatusContractsTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStatusContractsTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStatusContractsTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStatusContractsTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStatusStoreConformanceTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStatusStoreConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStatusStoreConformanceTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStatusStoreConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStatusStoreTestContext.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStatusStoreTestContext.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStatusStoreTestContext.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStatusStoreTestContext.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStoreConformanceData.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStoreConformanceData.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStoreConformanceData.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStoreConformanceData.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStoreConformanceTests.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStoreConformanceTests.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStoreConformanceTests.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStoreConformanceTests.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStoreTestContext.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStoreTestContext.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStoreTestContext.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputStoreTestContext.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputTestData.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputTestData.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/DurableOutputTestData.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/DurableOutputTestData.cs diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/FluxFlow.Engine.DurableOutput.Tests.csproj b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/FluxFlow.Engine.DurableOutput.Tests.csproj similarity index 79% rename from tests/FluxFlow.Engine.DurableOutput.Tests/FluxFlow.Engine.DurableOutput.Tests.csproj rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/FluxFlow.Engine.DurableOutput.Tests.csproj index 17e532d5..acd77c71 100644 --- a/tests/FluxFlow.Engine.DurableOutput.Tests/FluxFlow.Engine.DurableOutput.Tests.csproj +++ b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/FluxFlow.Engine.DurableOutput.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,7 +6,7 @@ - + diff --git a/tests/FluxFlow.Engine.DurableOutput.Tests/RecordingDurableOutputStore.cs b/tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/RecordingDurableOutputStore.cs similarity index 100% rename from tests/FluxFlow.Engine.DurableOutput.Tests/RecordingDurableOutputStore.cs rename to tests/Unit/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.Tests/RecordingDurableOutputStore.cs diff --git a/tests/FluxFlow.Engine.HealthChecks.Tests/FluxFlow.Engine.HealthChecks.Tests.csproj b/tests/Unit/Engine/Health/FluxFlow.Engine.HealthChecks.Tests/FluxFlow.Engine.HealthChecks.Tests.csproj similarity index 82% rename from tests/FluxFlow.Engine.HealthChecks.Tests/FluxFlow.Engine.HealthChecks.Tests.csproj rename to tests/Unit/Engine/Health/FluxFlow.Engine.HealthChecks.Tests/FluxFlow.Engine.HealthChecks.Tests.csproj index d6c79f8b..f064f4fa 100644 --- a/tests/FluxFlow.Engine.HealthChecks.Tests/FluxFlow.Engine.HealthChecks.Tests.csproj +++ b/tests/Unit/Engine/Health/FluxFlow.Engine.HealthChecks.Tests/FluxFlow.Engine.HealthChecks.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,7 +6,7 @@ - + diff --git a/tests/FluxFlow.Engine.HealthChecks.Tests/FluxFlowApplicationHealthCheckTests.cs b/tests/Unit/Engine/Health/FluxFlow.Engine.HealthChecks.Tests/FluxFlowApplicationHealthCheckTests.cs similarity index 100% rename from tests/FluxFlow.Engine.HealthChecks.Tests/FluxFlowApplicationHealthCheckTests.cs rename to tests/Unit/Engine/Health/FluxFlow.Engine.HealthChecks.Tests/FluxFlowApplicationHealthCheckTests.cs diff --git a/tests/FluxFlow.Engine.HealthChecks.Tests/FluxFlowHealthCheckRegistrationTests.cs b/tests/Unit/Engine/Health/FluxFlow.Engine.HealthChecks.Tests/FluxFlowHealthCheckRegistrationTests.cs similarity index 100% rename from tests/FluxFlow.Engine.HealthChecks.Tests/FluxFlowHealthCheckRegistrationTests.cs rename to tests/Unit/Engine/Health/FluxFlow.Engine.HealthChecks.Tests/FluxFlowHealthCheckRegistrationTests.cs diff --git a/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationActivityTests.cs b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationActivityTests.cs new file mode 100644 index 00000000..87df6b65 --- /dev/null +++ b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationActivityTests.cs @@ -0,0 +1,63 @@ +using System.Threading.Tasks.Dataflow; +using FluxFlow.Data; +using FluxFlow.Engine.Signals; +using FluxFlow.Nodes; +using Shouldly; +using Xunit; + +namespace FluxFlow.Engine.Tests; + +public sealed class ApplicationActivityTests +{ + [Fact] + public async Task System_event_is_mirrored_to_canonical_activity() + { + await using var signals = new ApplicationRuntimeSignals(logger: null); + using var systemLink = signals.SystemEvents.LinkTo( + DataflowBlock.NullTarget()); + var activity = new BufferBlock(); + using var activityLink = signals.Activity.LinkTo(activity); + var timestamp = new DateTimeOffset(2026, 9, 4, 12, 0, 0, TimeSpan.Zero); + + var result = await signals.PublishSystemEventAsync( + ApplicationSignalMessage.Create(new FlowEvent + { + Timestamp = timestamp, + Name = ApplicationSystemEventNames.RevisionChanged, + Kind = FlowEventKind.Lifecycle, + Dimensions = new Dictionary(StringComparer.Ordinal) + { + ["category"] = "Revision", + ["subject"] = "revision-2" + } + }), + CancellationToken.None); + + result.IsAccepted.ShouldBeTrue(); + var message = await activity.ReceiveAsync(TimeSpan.FromSeconds(5)); + message.Headers[FlowEventHeaders.Type].ShouldBe(ApplicationSystemEventNames.RevisionChanged); + message.ToFlowEvent().Kind.ShouldBe(FlowEventKind.Lifecycle); + message.ToFlowEvent().Dimensions["subject"].ShouldBe("revision-2"); + } + + [Fact] + public async Task Component_activity_attachment_forwards_without_changing_identity() + { + await using var signals = new ApplicationRuntimeSignals(logger: null); + var source = new BufferBlock(); + var activity = new BufferBlock(); + using var aggregateLink = signals.AttachActivity(source); + using var observerLink = signals.Activity.LinkTo(activity); + var expected = new FlowEvent + { + Name = "message.received", + Kind = FlowEventKind.Domain + }.ToMessage(); + + await source.SendAsync(expected); + + var actual = await activity.ReceiveAsync(TimeSpan.FromSeconds(5)); + actual.MessageId.ShouldBe(expected.MessageId); + actual.Headers[FlowEventHeaders.Type].ShouldBe("message.received"); + } +} diff --git a/tests/FluxFlow.Engine.Tests/ApplicationDefinitionSourcesTests.cs b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationDefinitionSourcesTests.cs similarity index 100% rename from tests/FluxFlow.Engine.Tests/ApplicationDefinitionSourcesTests.cs rename to tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationDefinitionSourcesTests.cs diff --git a/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationEventStreamTests.cs b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationEventStreamTests.cs new file mode 100644 index 00000000..adfcf4d2 --- /dev/null +++ b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationEventStreamTests.cs @@ -0,0 +1,239 @@ +using System.Threading.Tasks.Dataflow; +using FluxFlow.Data; +using FluxFlow.Engine.Events; +using FluxFlow.Nodes; +using Shouldly; +using Xunit; + +namespace FluxFlow.Engine.Tests; + +public sealed class ApplicationEventStreamTests +{ + [Theory] + [InlineData(false)] + [InlineData(true)] + public async Task Arbitrary_event_payload_preserves_identity_and_context_without_report_registration(bool isError) + { + await using var stream = new ApplicationEventStream(new() { Application = "orders" }); + var target = new BufferBlock(); + using var link = stream.Events.LinkTo(target); + var headers = new Dictionary + { + [FlowEventHeaders.Type] = "custom.vendor-neutral.event", + [FlowEventHeaders.Workflow] = "Main", + [FlowEventHeaders.Component] = "Source", + [FlowEventHeaders.Source] = "Main.Source.Events", + ["custom.schema"] = "any-value" + }; + var correlation = CorrelationId.New(); + var causation = MessageId.New(); + var original = isError + ? FlowMessage.CreateError(new FlowError("custom.failure", "Failure", "custom", false), correlationId: correlation, headers: headers, causationId: causation) + : FlowMessage.Create(FlowValue.From(new { items = new[] { new { label = "custom", amount = 12 } } }), correlationId: correlation, headers: headers, causationId: causation); + + stream.Publish(original, "rev-7"); + var actual = await target.ReceiveAsync(TimeSpan.FromSeconds(5)); + + actual.MessageId.ShouldBe(original.MessageId); + actual.TraceId.ShouldBe(original.TraceId); + actual.Timestamp.ShouldBe(original.Timestamp); + actual.CorrelationId.ShouldBe(original.CorrelationId); + actual.CausationId.ShouldBe(original.CausationId); + actual.IsError.ShouldBe(isError); + actual.Headers[FlowEventHeaders.Application].ShouldBe("orders"); + actual.Headers[FlowEventHeaders.Revision].ShouldBe("rev-7"); + foreach (var pair in headers) actual.Headers[pair.Key].ShouldBe(pair.Value); + if (isError) actual.Error!.Code.ShouldBe("custom.failure"); + else actual.Value!.ToJsonElement().GetProperty("items")[0].GetProperty("amount").GetInt32().ShouldBe(12); + } + + [Fact] + public async Task Native_fanout_preserves_accepted_order_and_propagates_completion() + { + await using var stream = new ApplicationEventStream(new()); + var first = new BufferBlock(); + var second = new BufferBlock(); + using var firstLink = stream.Events.LinkTo(first, new() { PropagateCompletion = true }); + using var secondLink = stream.Events.LinkTo(second, new() { PropagateCompletion = true }); + for (var i = 0; i < 5; i++) stream.Publish(Event(i)); + stream.Complete(); + await stream.Events.Completion.WaitAsync(TimeSpan.FromSeconds(5)); + var firstRecords = Drain(first); + var secondRecords = Drain(second); + firstRecords.Select(Value).ShouldBe(new double[] { 0, 1, 2, 3, 4 }); + secondRecords.Select(message => message.MessageId).ShouldBe(firstRecords.Select(message => message.MessageId)); + await first.Completion.WaitAsync(TimeSpan.FromSeconds(5)); + await second.Completion.WaitAsync(TimeSpan.FromSeconds(5)); + } + + [Fact] + public async Task Standard_predicate_and_max_messages_select_without_affecting_other_consumers() + { + await using var stream = new ApplicationEventStream(new()); + var selected = new BufferBlock(); + var all = new BufferBlock(); + using var selectedLink = stream.Events.LinkTo(selected, new() { MaxMessages = 2 }, message => Value(message) > 5); + using var allLink = stream.Events.LinkTo(all); + foreach (var value in new[] { 1, 6, 2, 7, 8 }) stream.Publish(Event(value)); + stream.Complete(); + await stream.Events.Completion.WaitAsync(TimeSpan.FromSeconds(5)); + Drain(selected).Select(Value).ShouldBe(new double[] { 6, 7 }); + Drain(all).Select(Value).ShouldBe(new double[] { 1, 6, 2, 7, 8 }); + } + + [Fact] + public async Task Disposing_one_link_does_not_detach_other_consumers() + { + await using var stream = new ApplicationEventStream(new()); + var detached = new BufferBlock(); + var remaining = new BufferBlock(); + using var detachedLink = stream.Events.LinkTo(detached); + using var remainingLink = stream.Events.LinkTo(remaining); + stream.Publish(Event(1)); + Value(await detached.ReceiveAsync(TimeSpan.FromSeconds(5))).ShouldBe(1); + Value(await remaining.ReceiveAsync(TimeSpan.FromSeconds(5))).ShouldBe(1); + detachedLink.Dispose(); + stream.Publish(Event(2)); + stream.Complete(); + await stream.Events.Completion.WaitAsync(TimeSpan.FromSeconds(5)); + Drain(detached).ShouldBeEmpty(); + Value(Drain(remaining).Single()).ShouldBe(2); + } + + [Fact] + public async Task Native_source_fault_propagates_only_to_opted_in_targets() + { + var stream = new ApplicationEventStream(new()); + var optedIn = new BufferBlock(); + var independent = new BufferBlock(); + using var propagatedLink = stream.Events.LinkTo(optedIn, new() { PropagateCompletion = true }); + using var independentLink = stream.Events.LinkTo(independent); + stream.Events.Fault(new InvalidOperationException("source failed")); + var sourceFailure = await Should.ThrowAsync(async () => await stream.Events.Completion.WaitAsync(TimeSpan.FromSeconds(5))); + sourceFailure.GetBaseException().Message.ShouldBe("source failed"); + var targetFailure = await Should.ThrowAsync(async () => await optedIn.Completion.WaitAsync(TimeSpan.FromSeconds(5))); + targetFailure.GetBaseException().ShouldBeOfType().Message.ShouldBe("source failed"); + independent.Completion.IsCompleted.ShouldBeFalse(); + var disposalFailure = await Should.ThrowAsync(async () => await stream.DisposeAsync()); + disposalFailure.Message.ShouldBe("source failed"); + } + + [Fact] + public async Task Bounded_event_ingress_can_drop_without_blocking_the_publisher() + { + await using var stream = new ApplicationEventStream(new() { Capacity = 2 }); + using var gate = new GatedTarget(); + var observed = new BufferBlock(); + using var gatedLink = stream.Events.LinkTo(gate); + using var observedLink = stream.Events.LinkTo(observed); + stream.Publish(Event(0)); + await gate.Entered.Task.WaitAsync(TimeSpan.FromSeconds(5)); + try + { + await Task.Run(() => { for (var i = 1; i < 100; i++) stream.Publish(Event(i)); }) + .WaitAsync(TimeSpan.FromSeconds(5)); + } + finally { gate.Release.Set(); } + stream.Complete(); + await stream.Events.Completion.WaitAsync(TimeSpan.FromSeconds(5)); + var delivered = Drain(observed); + delivered.Count.ShouldBeGreaterThan(0); + delivered.Count.ShouldBeLessThan(100); + Value(delivered[0]).ShouldBe(0); + } + + [Fact] + public async Task Slow_latest_value_consumer_does_not_block_a_ready_consumer() + { + await using var stream = new ApplicationEventStream(new()); + var slow = new BufferBlock(new() { BoundedCapacity = 1 }); + var fast = new BufferBlock(); + using var slowLink = stream.Events.LinkTo(slow); + using var fastLink = stream.Events.LinkTo(fast); + for (var i = 1; i <= 8; i++) + { + stream.Publish(Event(i)); + Value(await fast.ReceiveAsync(TimeSpan.FromSeconds(5))).ShouldBe(i); + } + slow.Count.ShouldBe(1); + Value(await slow.ReceiveAsync(TimeSpan.FromSeconds(5))).ShouldBe(1); + Value(await slow.ReceiveAsync(TimeSpan.FromSeconds(5))).ShouldBe(8); + } + + [Fact] + public async Task Disposal_finishes_without_waiting_for_a_full_consumer() + { + var stream = new ApplicationEventStream(new() { Capacity = 2 }); + var slow = new BufferBlock(new() { BoundedCapacity = 1 }); + using var link = stream.Events.LinkTo(slow); + for (var i = 0; i < 20; i++) stream.Publish(Event(i)); + await stream.DisposeAsync().AsTask().WaitAsync(TimeSpan.FromSeconds(5)); + stream.Events.Completion.IsCompleted.ShouldBeTrue(); + await stream.DisposeAsync().AsTask().WaitAsync(TimeSpan.FromSeconds(5)); + } + + [Theory] + [InlineData(1)] + [InlineData(65536)] + public async Task Valid_capacity_boundaries_preserve_producer_context_when_no_application_context_is_configured(int capacity) + { + await using var stream = new ApplicationEventStream(new() { Capacity = capacity }); + var target = new BufferBlock(); + using var link = stream.Events.LinkTo(target); + var original = FlowMessage.Create(FlowValue.From("payload"), headers: new Dictionary + { + [FlowEventHeaders.Application] = "producer-app", + [FlowEventHeaders.Revision] = "producer-revision" + }); + stream.Publish(original); + var actual = await target.ReceiveAsync(TimeSpan.FromSeconds(5)); + actual.Headers[FlowEventHeaders.Application].ShouldBe("producer-app"); + actual.Headers[FlowEventHeaders.Revision].ShouldBe("producer-revision"); + actual.MessageId.ShouldBe(original.MessageId); + actual.Value!.Deserialize().ShouldBe("payload"); + } + + [Theory] + [InlineData(0)] + [InlineData(-1)] + [InlineData(65537)] + public void Event_capacity_must_be_positive_and_bounded(int capacity) + => Should.Throw(() => new ApplicationEventStream(new() { Capacity = capacity })); + + internal static FlowMessage Event(int value) => new FlowEvent + { + Name = "sample.observed", Kind = FlowEventKind.Domain, + Measurements = new Dictionary { ["value"] = value } + }.ToMessage(); + + private static double Value(FlowMessage message) => message.ToFlowEvent().Measurements["value"]; + private static List Drain(BufferBlock source) + { + var result = new List(); + while (source.TryReceive(out var message)) result.Add(message); + return result; + } + + private sealed class GatedTarget : ITargetBlock, IDisposable + { + private readonly TaskCompletionSource _completion = new(TaskCreationOptions.RunContinuationsAsynchronously); + public TaskCompletionSource Entered { get; } = new(TaskCreationOptions.RunContinuationsAsynchronously); + public ManualResetEventSlim Release { get; } = new(); + public Task Completion => _completion.Task; + public void Complete() => _completion.TrySetResult(); + public void Fault(Exception exception) => _completion.TrySetException(exception); + public DataflowMessageStatus OfferMessage(DataflowMessageHeader header, FlowMessage value, + ISourceBlock? source, bool consumeToAccept) + { + Entered.TrySetResult(); + if (!Release.Wait(TimeSpan.FromSeconds(5))) return DataflowMessageStatus.DecliningPermanently; + if (consumeToAccept) + { + source!.ConsumeMessage(header, this, out var consumed); + if (!consumed) return DataflowMessageStatus.NotAvailable; + } + return DataflowMessageStatus.Accepted; + } + public void Dispose() => Release.Set(); + } +} diff --git a/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationEventsTests.cs b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationEventsTests.cs new file mode 100644 index 00000000..0a6572d9 --- /dev/null +++ b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationEventsTests.cs @@ -0,0 +1,277 @@ +using System.Threading.Tasks.Dataflow; +using FluxFlow.Composition; +using FluxFlow.Composition.Addressing; +using FluxFlow.Composition.Model; +using FluxFlow.Data; +using FluxFlow.Engine.Ports; +using FluxFlow.Engine.Signals; +using FluxFlow.Nodes; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; +using Xunit; + +namespace FluxFlow.Engine.Tests; + +public sealed class ApplicationEventsTests +{ + [Theory] + [InlineData(false)] + [InlineData(true)] + public async Task Port_activity_diagnostic_producer_preserves_port_provenance_and_message_correlation(bool isInput) + { + await using var signals = new ApplicationRuntimeSignals(logger: null); + var diagnostics = new BufferBlock(); + using var link = signals.Diagnostics.LinkTo(diagnostics); + var publisher = new ApplicationPortEventPublisher(new Dictionary(), signals, _ => { }); + var address = ApplicationAddress.WorkflowPort("Orders", "Processor", isInput ? "Input" : "Output"); + var original = FlowMessage.Create("order", correlationId: CorrelationId.New()); + var timestamp = new DateTimeOffset(2026, 9, 5, 10, 0, 0, TimeSpan.Zero); + + publisher.ReportActivity(new ApplicationPortActivity(timestamp, + isInput ? ApplicationPortActivityKind.InputAccepted : ApplicationPortActivityKind.OutputEmitted, + address, null, original.CorrelationId, original.TraceId, original.MessageId)); + var diagnostic = await diagnostics.ReceiveAsync(TimeSpan.FromSeconds(5)); + + diagnostic.Headers[FlowEventHeaders.Source].ShouldBe(address.Value); + diagnostic.Headers[FlowEventHeaders.Workflow].ShouldBe("Orders"); + diagnostic.Headers[FlowEventHeaders.Component].ShouldBe("Processor"); + diagnostic.TraceId.ShouldBe(original.TraceId); + diagnostic.CorrelationId.ShouldBe(original.CorrelationId); + diagnostic.CausationId.ShouldBe(original.MessageId); + diagnostic.MessageId.ShouldNotBe(original.MessageId); + diagnostic.Timestamp.ShouldBe(timestamp); + diagnostic.ToFlowEvent().Name.ShouldBe(isInput ? ApplicationDiagnosticNames.InputAccepted : ApplicationDiagnosticNames.OutputEmitted); + } + + [Fact] + public async Task Linking_application_events_before_start_does_not_activate_components() + { + var activations = 0; + var services = new ServiceCollection(); + services.AddFluxFlow(Definition("initial"), options => options.StartWithHost = false) + .Advanced.AddDynamicComponent("event.initial", component => component + .UseFactory(_ => { activations++; return new EventNode(); }) + .HasOutput("Output", node => node.Output).HasEvents("Events", node => node.Events)); + await using var provider = services.BuildServiceProvider(); + var application = provider.GetRequiredService(); + var target = new BufferBlock(); + using var link = application.Events.LinkTo(target); + activations.ShouldBe(0); + application.State.ShouldBe(ApplicationState.Empty); + application.Current.ShouldBeNull(); + application.Events.Completion.IsCompleted.ShouldBeFalse(); + await application.StopAsync(); + application.Events.Completion.IsCompleted.ShouldBeTrue(); + } + + [Fact] + public async Task Stable_event_feed_preserves_custom_event_identity_across_changed_port_generations() + { + var nodes = new List(); + var services = new ServiceCollection(); + var builder = services.AddFluxFlow(Definition("initial"), options => + { + options.StartWithHost = false; + options.InitialRevisionId = "rev-1"; + options.Events = new() { Application = "orders" }; + }); + builder.Advanced.AddDynamicComponent("event.initial", component => component + .UseFactory(_ => CreateNode()).HasOutput("Output", node => node.Output).HasEvents("Events", node => node.Events)); + builder.Advanced.AddDynamicComponent("event.replacement", component => component + .UseFactory(_ => CreateNode()).HasOutput("ChangedOutput", node => node.Output).HasEvents("Events", node => node.Events)); + await using var provider = services.BuildServiceProvider(); + var application = provider.GetRequiredService(); + var feed = application.Events; + var received = new BufferBlock(); + using var link = feed.LinkTo(received, new DataflowLinkOptions(), IsSample); + (await application.StartAsync()).IsApplied.ShouldBeTrue(); + var first = CustomEvent("first"); + nodes[0].Emit(first).ShouldBeTrue(); + var before = await received.ReceiveAsync(TimeSpan.FromSeconds(5)); + (await application.ApplyAsync("rev-2", Definition("replacement"))).IsApplied.ShouldBeTrue(); + application.Events.ShouldBeSameAs(feed); + nodes.Count.ShouldBe(2); + var second = CustomEvent("second"); + nodes[1].Emit(second).ShouldBeTrue(); + var after = await received.ReceiveAsync(TimeSpan.FromSeconds(5)); + before.Headers[FlowEventHeaders.Revision].ShouldBe("rev-1"); + after.Headers[FlowEventHeaders.Revision].ShouldBe("rev-2"); + before.MessageId.ShouldBe(first.MessageId); + after.MessageId.ShouldBe(second.MessageId); + after.TraceId.ShouldBe(second.TraceId); + after.Headers[FlowEventHeaders.Application].ShouldBe("orders"); + after.Headers[FlowEventHeaders.Workflow].ShouldBe("Main"); + after.Headers[FlowEventHeaders.Component].ShouldBe("Source"); + after.Headers[FlowEventHeaders.Source].ShouldBe("Main.Source"); + after.Headers["custom.category"].ShouldBe("audit"); + after.Value!.ToJsonElement().GetProperty("details").GetProperty("label").GetString().ShouldBe("second"); + application.Current!.RevisionId.ShouldBe("rev-2"); + + EventNode CreateNode() { var node = new EventNode(); nodes.Add(node); return node; } + } + + [Fact] + public async Task Legacy_events_reach_native_component_activity_application_events_and_existing_activity() + { + var node = new EventNode(); + var instance = new ComponentInstance(node, events: node.Events); + var componentEvents = new BufferBlock(); + using var componentLink = instance.Activity.LinkTo(componentEvents); + var services = new ServiceCollection(); + services.AddFluxFlow(Definition("initial"), options => options.StartWithHost = false) + .Advanced.AddDynamicComponent("event.initial", component => component.UseInstanceFactory(_ => ValueTask.FromResult(instance))); + await using var provider = services.BuildServiceProvider(); + var application = provider.GetRequiredService(); + var events = new BufferBlock(); + using var eventLink = application.Events.LinkTo(events, new DataflowLinkOptions(), IsSample); + (await application.StartAsync()).IsApplied.ShouldBeTrue(); + var activity = new BufferBlock(); + using var activityLink = application.Ports.Activity.LinkTo(activity); + var first = CustomEvent("first"); + node.Emit(first).ShouldBeTrue(); + (await events.ReceiveAsync(TimeSpan.FromSeconds(5))).MessageId.ShouldBe(first.MessageId); + (await componentEvents.ReceiveAsync(TimeSpan.FromSeconds(5))).MessageId.ShouldBe(first.MessageId); + (await ReadSampleAsync()).MessageId.ShouldBe(first.MessageId); + componentLink.Dispose(); + var second = CustomEvent("second"); + node.Emit(second).ShouldBeTrue(); + (await events.ReceiveAsync(TimeSpan.FromSeconds(5))).MessageId.ShouldBe(second.MessageId); + (await ReadSampleAsync()).MessageId.ShouldBe(second.MessageId); + componentEvents.TryReceive(out _).ShouldBeFalse(); + application.State.ShouldBe(ApplicationState.Running); + + async Task ReadSampleAsync() + { + using var timeout = new CancellationTokenSource(TimeSpan.FromSeconds(5)); + while (true) + { + var message = await activity.ReceiveAsync(timeout.Token); + if (IsSample(message)) return message; + } + } + } + + [Fact] + public async Task Revision_events_are_live_before_any_runtime_generation_exists() + { + var services = new ServiceCollection(); + services.AddFluxFlow(new ApplicationDefinition(), options => + { + options.StartWithHost = false; + options.InitialRevisionId = "empty"; + }); + await using var provider = services.BuildServiceProvider(); + var application = provider.GetRequiredService(); + var target = new BufferBlock(); + using var link = application.Events.LinkTo(target); + (await application.StartAsync()).Status.ShouldBe(ApplicationUpdateStatus.Unchanged); + var proposed = await target.ReceiveAsync(TimeSpan.FromSeconds(5)); + var accepted = await target.ReceiveAsync(TimeSpan.FromSeconds(5)); + new[] { proposed, accepted }.ShouldAllBe(message => message.ToFlowEvent().Name == ApplicationSystemEventNames.RevisionChanged); + new[] { proposed, accepted }.ShouldAllBe(message => message.Headers[FlowEventHeaders.Revision] == "empty"); + proposed.Value!.ToJsonElement().GetProperty("details").GetProperty("phase").GetString().ShouldBe("Proposed"); + accepted.Value!.ToJsonElement().GetProperty("details").GetProperty("phase").GetString().ShouldBe("Accepted"); + accepted.MessageId.ShouldNotBe(proposed.MessageId); + } + + [Theory] + [InlineData(false)] + [InlineData(true)] + public async Task Startup_and_drain_events_are_observed_live_with_the_producing_revision(bool legacy) + { + var source = new ControlledEventSource(); + var services = new ServiceCollection(); + services.AddFluxFlow(Definition("initial"), options => + { + options.StartWithHost = false; + options.InitialRevisionId = "lifecycle"; + }).Advanced.AddDynamicComponent("event.initial", component => + { + if (legacy) + component.UseInstanceFactory(_ => ValueTask.FromResult(new ComponentInstance(source, events: source.Events))); + else + component.UseFactory(_ => source).HasEvents("Events", node => node.Events); + }); + await using var provider = services.BuildServiceProvider(); + var application = provider.GetRequiredService(); + var received = new BufferBlock(); + using var link = application.Events.LinkTo(received, new DataflowLinkOptions(), + message => message.Headers.GetValueOrDefault(FlowEventHeaders.Type)?.StartsWith("source.", StringComparison.Ordinal) == true); + try + { + var starting = application.StartAsync().AsTask(); + try + { + var preparation = await received.ReceiveAsync(TimeSpan.FromSeconds(5)); + preparation.ToFlowEvent().Name.ShouldBe("source.starting"); + preparation.Headers[FlowEventHeaders.Revision].ShouldBe("lifecycle"); + } + finally { source.ReleaseStart.TrySetResult(); } + (await starting.WaitAsync(TimeSpan.FromSeconds(5))).IsApplied.ShouldBeTrue(); + var stopping = application.StopAsync().AsTask(); + try + { + var draining = await received.ReceiveAsync(TimeSpan.FromSeconds(5)); + draining.ToFlowEvent().Name.ShouldBe("source.stopping"); + draining.Headers[FlowEventHeaders.Revision].ShouldBe("lifecycle"); + draining.Headers[FlowEventHeaders.Workflow].ShouldBe("Main"); + } + finally { source.ReleaseStop.TrySetResult(); } + await stopping.WaitAsync(TimeSpan.FromSeconds(5)); + var terminal = await received.ReceiveAsync(TimeSpan.FromSeconds(5)); + terminal.ToFlowEvent().Name.ShouldBe("source.completed"); + terminal.Headers[FlowEventHeaders.Revision].ShouldBe("lifecycle"); + terminal.Headers[FlowEventHeaders.Source].ShouldBe("Main.Source"); + application.Events.Completion.IsCompletedSuccessfully.ShouldBeTrue(); + application.State.ShouldBe(ApplicationState.Stopped); + } + finally { source.ReleaseStart.TrySetResult(); source.ReleaseStop.TrySetResult(); } + } + + private static bool IsSample(FlowMessage message) => message.Headers.GetValueOrDefault(FlowEventHeaders.Type) == "custom.sample"; + private static FlowMessage CustomEvent(string label) + { + var original = new FlowEvent { Name = "custom.sample", Kind = FlowEventKind.Audit, Details = FlowValue.From(new { label }) }.ToMessage(); + var headers = original.Headers.ToDictionary(pair => pair.Key, pair => pair.Value); + headers["custom.category"] = "audit"; + return FlowMessage.Restore(original.Value!, original.MessageId, original.TraceId, original.Timestamp, headers: headers); + } + private static ApplicationDefinition Definition(string kind) => ApplicationDefinitionJson.Deserialize($$""" + { "Resources": {}, "Workflows": { "Main": { "Source": { "Type": "event.{{kind}}" } } } } + """); + + private sealed class EventNode : FlowNode + { + public bool Emit(FlowMessage message) => EmitEvent(message); + protected override Task ProcessAsync(FlowMessage message) => Task.CompletedTask; + } + + private sealed class ControlledEventSource : IFlowSource + { + private readonly BroadcastBlock _events = new(static message => message); + private int _completed; + public ISourceBlock Events => _events; + public Task Completion => _events.Completion; + public TaskCompletionSource ReleaseStart { get; } = new(TaskCreationOptions.RunContinuationsAsynchronously); + public TaskCompletionSource ReleaseStop { get; } = new(TaskCreationOptions.RunContinuationsAsynchronously); + public async Task StartAsync(CancellationToken cancellationToken = default) + { + _events.Post(new FlowEvent { Name = "source.starting", Kind = FlowEventKind.Lifecycle }.ToMessage()); + await ReleaseStart.Task.WaitAsync(cancellationToken); + } + public void Complete() + { + if (Interlocked.Exchange(ref _completed, 1) != 0) return; + _events.Post(new FlowEvent { Name = "source.stopping", Kind = FlowEventKind.Lifecycle }.ToMessage()); + _ = FinishAsync(); + } + private async Task FinishAsync() + { + await ReleaseStop.Task; + _events.Post(new FlowEvent { Name = "source.completed", Kind = FlowEventKind.Lifecycle }.ToMessage()); + _events.Complete(); + } + public void Fault(Exception exception) => ((IDataflowBlock)_events).Fault(exception); + public async ValueTask DisposeAsync() { ReleaseStart.TrySetResult(); ReleaseStop.TrySetResult(); Complete(); await Completion; } + } +} diff --git a/tests/FluxFlow.Engine.Tests/ApplicationOutputCaptureTests.cs b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationOutputCaptureTests.cs similarity index 99% rename from tests/FluxFlow.Engine.Tests/ApplicationOutputCaptureTests.cs rename to tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationOutputCaptureTests.cs index 4911341b..5044ad41 100644 --- a/tests/FluxFlow.Engine.Tests/ApplicationOutputCaptureTests.cs +++ b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationOutputCaptureTests.cs @@ -292,9 +292,9 @@ public async Task Runtime_builder_resolves_capture_by_exact_output_address_and_p resolver.Resolutions.ShouldContain(new CaptureResolution(Output, typeof(string))); resolver.Resolutions.Count(resolution => resolution.Address == Output).ShouldBe(1); resolver.Resolutions.ShouldContain( - new CaptureResolution(ApplicationAddress.SystemEvents, typeof(ApplicationSystemEvent))); + new CaptureResolution(ApplicationAddress.SystemEvents, typeof(global::FluxFlow.Data.FlowValue))); resolver.Resolutions.ShouldContain( - new CaptureResolution(ApplicationAddress.SystemDiagnostics, typeof(ApplicationDiagnostic))); + new CaptureResolution(ApplicationAddress.SystemDiagnostics, typeof(global::FluxFlow.Data.FlowValue))); var source = new BufferBlock>(); using var attachment = runtime.AttachOutput(Output, source); diff --git a/tests/FluxFlow.Engine.Tests/ApplicationPortHandleTests.cs b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationPortHandleTests.cs similarity index 99% rename from tests/FluxFlow.Engine.Tests/ApplicationPortHandleTests.cs rename to tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationPortHandleTests.cs index 2d6ebff2..394f7b8f 100644 --- a/tests/FluxFlow.Engine.Tests/ApplicationPortHandleTests.cs +++ b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationPortHandleTests.cs @@ -321,6 +321,7 @@ private static void AssertHandleOverload( Type firstParameter) => methods.Count(method => method.Name == methodName && + method.IsGenericMethodDefinition && IsGenericParameter(method.GetParameters()[0].ParameterType, firstParameter)) .ShouldBe(1); diff --git a/tests/FluxFlow.Engine.Tests/ApplicationPortRuntimeTests.cs b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationPortRuntimeTests.cs similarity index 84% rename from tests/FluxFlow.Engine.Tests/ApplicationPortRuntimeTests.cs rename to tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationPortRuntimeTests.cs index 8d81050c..073c047d 100644 --- a/tests/FluxFlow.Engine.Tests/ApplicationPortRuntimeTests.cs +++ b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationPortRuntimeTests.cs @@ -1,4 +1,5 @@ using System.Threading.Tasks.Dataflow; +using System.Text.Json; using FluxFlow.Composition; using FluxFlow.Composition.Addressing; using FluxFlow.Composition.Links; @@ -343,8 +344,8 @@ public async Task Conditional_failure_isolated_from_healthy_sibling() using var secondRoute = runtime.Connect(links[1]); var source = new BufferBlock>(); using var sourceAttachment = runtime.AttachOutput(Output, source); - var diagnostics = new BufferBlock>(); - var events = new BufferBlock>(); + var diagnostics = new BufferBlock(); + var events = new BufferBlock(); using var diagnosticLink = runtime.Diagnostics.LinkTo(diagnostics); using var eventLink = runtime.SystemEvents.LinkTo(events); var message = Message("value"); @@ -359,16 +360,16 @@ public async Task Conditional_failure_isolated_from_healthy_sibling() rejection.MessageId.ShouldBe(message.MessageId); var diagnostic = await ReceiveUntilAsync( diagnostics, - message => message.Value.Name == ApplicationDiagnosticNames.PortRejected); + message => message.ToFlowEvent().Name == ApplicationDiagnosticNames.PortRejected); diagnostic.CorrelationId.ShouldBe(message.CorrelationId); diagnostic.TraceId.ShouldBe(message.TraceId); diagnostic.CausationId.ShouldBe(message.MessageId); - diagnostic.Value.Name.ShouldBe(ApplicationDiagnosticNames.PortRejected); + diagnostic.ToFlowEvent().Name.ShouldBe(ApplicationDiagnosticNames.PortRejected); var systemEvent = await events.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5)); systemEvent.CorrelationId.ShouldBe(message.CorrelationId); systemEvent.TraceId.ShouldBe(message.TraceId); systemEvent.CausationId.ShouldBe(message.MessageId); - systemEvent.Value.Name.ShouldBe(ApplicationSystemEventNames.LinkConditionFailed); + systemEvent.ToFlowEvent().Name.ShouldBe(ApplicationSystemEventNames.LinkConditionFailed); failing.TryReceive(out _).ShouldBeFalse(); source.Post(Message("next")).ShouldBeTrue(); @@ -433,6 +434,117 @@ await Should.ThrowAsync(async () => await slow.Completion.WaitAsync(TimeSpan.FromSeconds(5))); } + [Fact] + public Task Canonical_observation_overflow_faults_without_stopping_output_delivery() + => AssertCanonicalOutputObservationOverflowAsync(); + + [Fact] + public Task Converted_observation_overflow_faults_without_stopping_output_delivery() + => AssertCanonicalOutputObservationOverflowAsync(); + + private static async Task AssertCanonicalOutputObservationOverflowAsync() + { + await using var runtime = new ApplicationPortRuntimeBuilder() + .AddFlowValueOutput(Output) + .Build(); + var source = new BufferBlock(); + await using var builder = runtime.CreateRevision("observer-test").AttachFlowValueOutput(Output, source); + await using var revision = builder.Build(); + await using var lease = await revision.ActivateAsync(); + var result = await runtime.ObserveAsync(Output, capacity: 1); + result.Status.ShouldBe(PortObserveStatus.Started); + await using var observation = result.Observation!; + + var firstReceive = runtime.ReceiveAsync(Output); + source.Post(FlowMessage.Create(FlowValue.From("first"))).ShouldBeTrue(); + (await firstReceive.WaitAsync(TimeSpan.FromSeconds(5))).Message!.Value + .Deserialize().ShouldBe("first"); + // Prove the consumer buffer is full before sending the overflow message. + (await observation.Messages.OutputAvailableAsync().WaitAsync(TimeSpan.FromSeconds(5))) + .ShouldBeTrue(); + var overflow = FlowMessage.Create(FlowValue.From("overflow"), correlationId: CorrelationId.New()); + var secondReceive = runtime.ReceiveAsync(Output); + source.Post(overflow).ShouldBeTrue(); + (await secondReceive.WaitAsync(TimeSpan.FromSeconds(5))).Message!.MessageId + .ShouldBe(overflow.MessageId); + + var failure = await Should.ThrowAsync(async () => + await observation.Completion.WaitAsync(TimeSpan.FromSeconds(5))); + failure.Message.ShouldBe($"Observation of output port '{Output}' exceeded its capacity of 1."); + var rejection = await runtime.Rejections.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5)); + rejection.Reason.ShouldBe(ApplicationPortRejectionReason.ObservationOverflowed); + rejection.Port.ShouldBe(Output); + rejection.MessageId.ShouldBe(overflow.MessageId); + rejection.TraceId.ShouldBe(overflow.TraceId); + rejection.CorrelationId.ShouldBe(overflow.CorrelationId); + rejection.Exception.ShouldBeSameAs(failure); + + var afterReceive = runtime.ReceiveAsync(Output); + source.Post(FlowMessage.Create(FlowValue.From("after"))).ShouldBeTrue(); + (await afterReceive.WaitAsync(TimeSpan.FromSeconds(5))).Message!.Value + .Deserialize().ShouldBe("after"); + } + + [Theory] + [InlineData(false)] + [InlineData(true)] + public Task Canonical_observation_drains_and_completes_without_false_overflow(bool dispose) + => AssertCanonicalOutputObservationCompletionAsync(dispose); + + [Theory] + [InlineData(false)] + [InlineData(true)] + public Task Converted_observation_drains_and_completes_without_false_overflow(bool dispose) + => AssertCanonicalOutputObservationCompletionAsync(dispose); + + private static async Task AssertCanonicalOutputObservationCompletionAsync(bool dispose) + { + await using var runtime = new ApplicationPortRuntimeBuilder() + .AddFlowValueOutput(Output) + .Build(); + var source = new BufferBlock(); + await using var builder = runtime.CreateRevision("observer-lifecycle").AttachFlowValueOutput(Output, source); + await using var revision = builder.Build(); + await using var lease = await revision.ActivateAsync(); + var result = await runtime.ObserveAsync(Output, capacity: 1); + await using var observation = result.Observation!; + var message = FlowMessage.Create(FlowValue.From("queued")); + source.Post(message).ShouldBeTrue(); + (await observation.Messages.OutputAvailableAsync().WaitAsync(TimeSpan.FromSeconds(5))) + .ShouldBeTrue(); + + if (dispose) + { + await observation.DisposeAsync(); + await observation.DisposeAsync(); + } + else + { + runtime.Complete(); + } + + var received = await observation.Messages.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5)); + received.MessageId.ShouldBe(message.MessageId); + received.TraceId.ShouldBe(message.TraceId); + var payload = received.Value is FlowValue value ? value.Deserialize() : (string)(object)received.Value!; + payload.ShouldBe("queued"); + await observation.Completion.WaitAsync(TimeSpan.FromSeconds(5)); + observation.Completion.IsCompletedSuccessfully.ShouldBeTrue(); + + if (dispose) + { + var afterReceive = runtime.ReceiveAsync(Output); + source.Post(FlowMessage.Create(FlowValue.From("after-dispose"))).ShouldBeTrue(); + (await afterReceive.WaitAsync(TimeSpan.FromSeconds(5))).Message!.Value + .Deserialize().ShouldBe("after-dispose"); + } + + runtime.Complete(); + await runtime.Completion.WaitAsync(TimeSpan.FromSeconds(5)); + ((IReceivableSourceBlock)runtime.Rejections) + .TryReceive(out _).ShouldBeFalse(); + } + [Fact] public async Task Request_reply_registers_before_send_and_matches_trace_id() { @@ -627,7 +739,7 @@ await Should.ThrowAsync(async () => public async Task Revision_event_sink_publishes_a_reliable_system_event() { await using var runtime = new ApplicationPortRuntimeBuilder().Build(); - var events = new BufferBlock>(); + var events = new BufferBlock(); using var eventLink = runtime.SystemEvents.LinkTo(events); var timestamp = DateTimeOffset.UtcNow; var revisionEvent = new ApplicationRevisionEvent( @@ -647,12 +759,13 @@ public async Task Revision_event_sink_publishes_a_reliable_system_event() .ShouldBeTrue(); var message = await events.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5)); - message.Value.Timestamp.ShouldBe(timestamp); - message.Value.Name.ShouldBe(ApplicationSystemEventNames.RevisionChanged); - message.Value.Category.ShouldBe(ApplicationSystemEventCategory.Revision); - message.Value.Subject.ShouldBe("revision-7"); - message.Value.Error.ShouldBe(revisionEvent.Error); - var details = message.Value.Details!.Value; + var @event = message.ToFlowEvent(); + @event.Timestamp.ShouldBe(timestamp); + @event.Name.ShouldBe(ApplicationSystemEventNames.RevisionChanged); + @event.Dimensions["category"].ShouldBe("Revision"); + @event.Dimensions["subject"].ShouldBe("revision-7"); + @event.Attributes["error"].ShouldNotBeNull(); + var details = @event.Details.Deserialize(); details.GetProperty("sequence").GetInt64().ShouldBe(7); details.GetProperty("phase").GetString().ShouldBe("Activated"); details.GetProperty("resources").EnumerateArray().Single().GetString().ShouldBe("Resources.broker"); @@ -712,6 +825,21 @@ private static async Task EventuallyAsync(Func> condition) throw new TimeoutException("Condition was not reached before the test timeout."); } + private static async Task ReceiveUntilAsync( + ISourceBlock source, + Func predicate) + { + var timeout = DateTime.UtcNow + TimeSpan.FromSeconds(5); + while (DateTime.UtcNow < timeout) + { + var message = await source.ReceiveAsync().WaitAsync(timeout - DateTime.UtcNow); + if (predicate(message)) + return message; + } + + throw new TimeoutException("Expected message was not received before the test timeout."); + } + private static async Task> ReceiveUntilAsync( ISourceBlock> source, Func, bool> predicate) diff --git a/tests/FluxFlow.Engine.Tests/ApplicationResourceContractRuntimeTests.cs b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationResourceContractRuntimeTests.cs similarity index 100% rename from tests/FluxFlow.Engine.Tests/ApplicationResourceContractRuntimeTests.cs rename to tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationResourceContractRuntimeTests.cs diff --git a/tests/FluxFlow.Engine.Tests/ApplicationRevisionPlannerTests.cs b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationRevisionPlannerTests.cs similarity index 100% rename from tests/FluxFlow.Engine.Tests/ApplicationRevisionPlannerTests.cs rename to tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationRevisionPlannerTests.cs diff --git a/tests/FluxFlow.Engine.Tests/ApplicationRuntimeAssemblerTestServiceCollectionExtensions.cs b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationRuntimeAssemblerTestServiceCollectionExtensions.cs similarity index 100% rename from tests/FluxFlow.Engine.Tests/ApplicationRuntimeAssemblerTestServiceCollectionExtensions.cs rename to tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationRuntimeAssemblerTestServiceCollectionExtensions.cs diff --git a/tests/FluxFlow.Engine.Tests/ApplicationRuntimeAssemblerTests.cs b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationRuntimeAssemblerTests.cs similarity index 99% rename from tests/FluxFlow.Engine.Tests/ApplicationRuntimeAssemblerTests.cs rename to tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationRuntimeAssemblerTests.cs index 04ceae6c..df3971e5 100644 --- a/tests/FluxFlow.Engine.Tests/ApplicationRuntimeAssemblerTests.cs +++ b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationRuntimeAssemblerTests.cs @@ -1,6 +1,7 @@ using System.Runtime.ExceptionServices; using System.Runtime.CompilerServices; using System.Threading.Tasks.Dataflow; +using System.Text.Json; using FluxFlow.Composition; using FluxFlow.Composition.Addressing; using FluxFlow.Composition.Authoring; @@ -64,7 +65,7 @@ public async Task Canonical_json_builds_direct_ports_links_resources_and_revisio ports.CurrentRevision!.RevisionId.ShouldBe("initial"); var firstReceive = ports.ReceiveAsync(Output, TimeSpan.FromSeconds(5)); - var eventReceive = ports.ReceiveAsync( + var eventReceive = ports.ReceiveAsync( FirstDiagnostics, TimeSpan.FromSeconds(5)); (await ports.SendAsync(Input, FlowMessage.Create("value"))) @@ -74,8 +75,8 @@ public async Task Canonical_json_builds_direct_ports_links_resources_and_revisio first.Message!.Value.ShouldBe("one:one:value"); var componentEvent = await eventReceive; componentEvent.Status.ShouldBe(PortReceiveStatus.Received); - componentEvent.Message!.Value.ComponentAddress.ShouldBe("Orders.First"); - componentEvent.Message.Value.Name.ShouldBe("prefix.processed"); + componentEvent.Message!.Headers[FlowEventHeaders.Source].ShouldBe("Orders.First"); + componentEvent.Message.ToFlowEvent().Name.ShouldBe("prefix.processed"); componentEvent.Message.TraceId.IsEmpty.ShouldBeFalse(); var revised = await host.ApplyAsync("revision-2", Definition("two:")); @@ -918,7 +919,7 @@ private static void AddTestComponents(IServiceCollection services) component .UseFactory(static context => new RevisionEventNode( context.Services.GetRequiredService())) - .HasInput("Input", static node => node.Input) + .HasFlowValueInput("Input", static node => node.Input) .HasEvents("Events", static node => node.Events)) .AddDynamicComponent("test.identity-string", component => component @@ -1694,11 +1695,12 @@ public enum AdvancedPortMismatch } private sealed class RevisionEventNode(RevisionEventTracker tracker) - : FlowNode + : FlowNode { - protected override Task ProcessAsync(FlowMessage message) + protected override Task ProcessAsync(FlowMessage message) { - tracker.Add(message.Value.Details!.Value.GetProperty("phase").GetString()!); + tracker.Add(message.ToFlowEvent().Details.Deserialize() + .GetProperty("phase").GetString()!); return Task.CompletedTask; } } diff --git a/tests/FluxFlow.Engine.Tests/ApplicationRuntimeConcurrencyTests.cs b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationRuntimeConcurrencyTests.cs similarity index 100% rename from tests/FluxFlow.Engine.Tests/ApplicationRuntimeConcurrencyTests.cs rename to tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationRuntimeConcurrencyTests.cs diff --git a/tests/FluxFlow.Engine.Tests/ApplicationRuntimeSignalsTests.cs b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationRuntimeSignalsTests.cs similarity index 84% rename from tests/FluxFlow.Engine.Tests/ApplicationRuntimeSignalsTests.cs rename to tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationRuntimeSignalsTests.cs index 3d5160f8..439d0116 100644 --- a/tests/FluxFlow.Engine.Tests/ApplicationRuntimeSignalsTests.cs +++ b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/ApplicationRuntimeSignalsTests.cs @@ -37,54 +37,45 @@ public void Signal_payload_json_contracts_are_stable() "link.condition.failed", "Condition failed.", "link"); - var systemEvent = new ApplicationSystemEvent + var systemEvent = ApplicationSignalMessage.Create(new FlowEvent { Timestamp = timestamp, Name = ApplicationSystemEventNames.LinkConditionFailed, - Category = ApplicationSystemEventCategory.Link, - Subject = "Main.Source.Output", - Error = error, - Details = JsonSerializer.SerializeToElement(new + Kind = FlowEventKind.Lifecycle, + Level = FlowEventLevel.Error, + Dimensions = new Dictionary(StringComparer.Ordinal) { - port = "Main.Source.Output" - }) - }; - var diagnostic = new ApplicationDiagnostic + ["category"] = "Link", + ["subject"] = "Main.Source.Output" + }, + Attributes = new Dictionary(StringComparer.Ordinal) { ["error"] = error }, + Details = FlowValue.From(new { port = "Main.Source.Output" }) + }); + var diagnostic = ApplicationSignalMessage.Create(new FlowEvent { Timestamp = timestamp, Name = ApplicationDiagnosticNames.RequestCompleted, - Kind = ApplicationDiagnosticKind.Timing, - Level = ApplicationDiagnosticLevel.Information, - Subject = "Main.Source.Output", + Kind = FlowEventKind.Diagnostic, + Level = FlowEventLevel.Information, Message = "Request completed.", - Duration = TimeSpan.FromMilliseconds(125), - Measurement = 125, - Unit = "ms", - Error = error, - Attributes = new Dictionary(StringComparer.Ordinal) + Dimensions = new Dictionary(StringComparer.Ordinal) { + ["kind"] = "Timing", + ["subject"] = "Main.Source.Output", + ["unit"] = "ms", ["status"] = "received" - } - }; + }, + Measurements = new Dictionary(StringComparer.Ordinal) { ["value"] = 125 }, + Details = FlowValue.From(error) + }); - JsonSerializer.Serialize(systemEvent).ShouldBe( - "{\"Timestamp\":\"2026-07-17T01:02:03+00:00\"," + - "\"Name\":\"flow.link.condition.failed\",\"Category\":3," + - "\"Subject\":\"Main.Source.Output\",\"Error\":{" + - "\"code\":\"link.condition.failed\",\"message\":\"Condition failed.\"," + - "\"category\":\"link\",\"isTransient\":false," + - "\"details\":null}," + - "\"Details\":{\"port\":\"Main.Source.Output\"}}"); - JsonSerializer.Serialize(diagnostic).ShouldBe( - "{\"Timestamp\":\"2026-07-17T01:02:03+00:00\"," + - "\"Name\":\"flow.port.request.completed\",\"Kind\":4,\"Level\":2," + - "\"Subject\":\"Main.Source.Output\",\"Message\":\"Request completed.\"," + - "\"Duration\":\"00:00:00.1250000\",\"Measurement\":125," + - "\"Unit\":\"ms\",\"Error\":{" + - "\"code\":\"link.condition.failed\",\"message\":\"Condition failed.\"," + - "\"category\":\"link\",\"isTransient\":false," + - "\"details\":null}," + - "\"Attributes\":{\"status\":\"received\"}}"); + systemEvent.Headers[FlowEventHeaders.Type].ShouldBe(ApplicationSystemEventNames.LinkConditionFailed); + systemEvent.ToFlowEvent().Dimensions["category"].ShouldBe("Link"); + systemEvent.ToFlowEvent().Details.Deserialize() + .GetProperty("port").GetString().ShouldBe("Main.Source.Output"); + diagnostic.Headers[FlowEventHeaders.Kind].ShouldBe("diagnostic"); + diagnostic.ToFlowEvent().Dimensions["kind"].ShouldBe("Timing"); + diagnostic.ToFlowEvent().Measurements["value"].ShouldBe(125d); } [Fact] @@ -94,17 +85,17 @@ public async Task Builder_registers_reserved_system_outputs_with_exact_compiler_ var eventPort = runtime.Ports.Single(port => port.Address == ApplicationAddress.SystemEvents); eventPort.Direction.ShouldBe(ApplicationPortDirection.Output); - eventPort.PayloadType.ShouldBe(typeof(ApplicationSystemEvent)); + eventPort.PayloadType.ShouldBe(typeof(FlowValue)); eventPort.Capacity.ShouldBe(ApplicationPortRuntimeBuilder.DefaultSystemOutputCapacity); var diagnosticPort = runtime.Ports.Single(port => port.Address == ApplicationAddress.SystemDiagnostics); - diagnosticPort.PayloadType.ShouldBe(typeof(ApplicationDiagnostic)); + diagnosticPort.PayloadType.ShouldBe(typeof(FlowValue)); ApplicationPortRuntimeBuilder.SystemOutputs.ShouldContain(metadata => metadata.Address == ApplicationAddress.SystemEvents && - metadata.MessageType == typeof(ApplicationSystemEvent)); + metadata.MessageType == typeof(FlowValue)); ApplicationPortRuntimeBuilder.SystemOutputs.ShouldContain(metadata => metadata.Address == ApplicationAddress.SystemDiagnostics && - metadata.MessageType == typeof(ApplicationDiagnostic)); + metadata.MessageType == typeof(FlowValue)); Should.Throw(() => new ApplicationPortRuntimeBuilder() .AddOutput(ApplicationAddress.SystemEvents)); } @@ -113,7 +104,7 @@ public async Task Builder_registers_reserved_system_outputs_with_exact_compiler_ public async Task System_event_publication_is_ordered_and_backpressures_when_full() { await using var runtime = new ApplicationPortRuntimeBuilder().Build(); - var slow = new PostponedTarget>(); + var slow = new PostponedTarget(); using var link = runtime.SystemEvents.LinkTo(slow); (await runtime.PublishSystemEventAsync(EventMessage("event-0"))) @@ -131,14 +122,14 @@ public async Task System_event_publication_is_ordered_and_backpressures_when_ful slow.AcceptPostponed(); (await blocked.WaitAsync(TimeSpan.FromSeconds(5))).IsAccepted.ShouldBeTrue(); - slow.Accepted.Single().Value.Name.ShouldBe("event-0"); + slow.Accepted.Single().ToFlowEvent().Name.ShouldBe("event-0"); } [Fact] public async Task Diagnostics_reject_overflow_promptly_and_preserve_accepted_order() { await using var runtime = new ApplicationPortRuntimeBuilder().Build(); - var slow = new PostponedTarget>(); + var slow = new PostponedTarget(); using var slowLink = runtime.Diagnostics.LinkTo(slow); runtime.TryPublishDiagnostic(DiagnosticMessage("diagnostic-0")).ShouldBeTrue(); @@ -148,11 +139,11 @@ public async Task Diagnostics_reject_overflow_promptly_and_preserve_accepted_ord runtime.TryPublishDiagnostic(DiagnosticMessage("overflow")).ShouldBeFalse(); slow.AcceptPostponed(); - slow.Accepted.Single().Value.Name.ShouldBe("diagnostic-0"); + slow.Accepted.Single().ToFlowEvent().Name.ShouldBe("diagnostic-0"); slowLink.Dispose(); await using var orderedRuntime = new ApplicationPortRuntimeBuilder().Build(); - var ordered = new BufferBlock>(); + var ordered = new BufferBlock(); using var orderedLink = orderedRuntime.Diagnostics.LinkTo(ordered); var names = new[] { "ordered-1", "ordered-2", "ordered-3" }; foreach (var name in names) @@ -160,7 +151,7 @@ public async Task Diagnostics_reject_overflow_promptly_and_preserve_accepted_ord var received = new List(); foreach (var _ in names) - received.Add((await ordered.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5))).Value.Name); + received.Add((await ordered.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5))).ToFlowEvent().Name); received.ShouldBe(names); } @@ -168,20 +159,21 @@ public async Task Diagnostics_reject_overflow_promptly_and_preserve_accepted_ord public async Task System_events_flow_through_canonical_links_without_stealing_host_subscriptions() { await using var runtime = new ApplicationPortRuntimeBuilder() - .AddInput(Input) + .AddFlowValueInput(Input) .Build(); - var sink = new BufferBlock>(); + var sink = new BufferBlock(); await using var sinkAttachment = await runtime.AttachInputAsync(Input, sink); using var route = runtime.Connect(CompileSystemEventLink()); - var hostReceive = runtime.ReceiveAsync( + var hostReceive = runtime.ReceiveAsync( ApplicationAddress.SystemEvents, TimeSpan.FromSeconds(5)); var message = EventMessage("workflow-event"); (await runtime.PublishSystemEventAsync(message)).IsAccepted.ShouldBeTrue(); - (await hostReceive).Message!.ShouldBeSameAs(message); - (await sink.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5))).ShouldBeSameAs(message); + (await hostReceive).Message!.ToFlowEvent().Name.ShouldBe("workflow-event"); + (await sink.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5))).ToFlowEvent().Name + .ShouldBe("workflow-event"); } [Fact] @@ -196,7 +188,7 @@ public async Task Link_condition_failure_emits_a_trace_correlated_system_event_a using var route = runtime.Connect(CompileFailingLink()); var source = new BufferBlock>(); using var sourceAttachment = runtime.AttachOutput(Output, source); - var receive = runtime.ReceiveAsync( + var receive = runtime.ReceiveAsync( ApplicationAddress.SystemEvents, TimeSpan.FromSeconds(5)); var message = FlowMessage.Create("payload"); @@ -204,9 +196,10 @@ public async Task Link_condition_failure_emits_a_trace_correlated_system_event_a source.Post(message).ShouldBeTrue(); var systemEvent = (await receive).Message!; - systemEvent.Value.Name.ShouldBe(ApplicationSystemEventNames.LinkConditionFailed); - systemEvent.Value.Category.ShouldBe(ApplicationSystemEventCategory.Link); - systemEvent.Value.Error.ShouldNotBeNull(); + var projected = systemEvent.ToFlowEvent(); + projected.Name.ShouldBe(ApplicationSystemEventNames.LinkConditionFailed); + projected.Dimensions["category"].ShouldBe("Link"); + projected.Attributes["error"].ShouldNotBeNull(); systemEvent.TraceId.ShouldBe(message.TraceId); systemEvent.CausationId.ShouldBe(message.MessageId); runtime.Status.State.ShouldBe(ApplicationRuntimeState.Active); @@ -233,7 +226,7 @@ public async Task Code_predicate_exception_is_route_local_reports_endpoints_and_ using var healthyRoute = runtime.Connect(links.Single(static link => !link.IsConditional)); var source = new BufferBlock>(); using var sourceAttachment = runtime.AttachOutput(Output, source); - var eventReceive = runtime.ReceiveAsync( + var eventReceive = runtime.ReceiveAsync( ApplicationAddress.SystemEvents, TimeSpan.FromSeconds(5)); var first = FlowMessage.Create("first"); @@ -243,12 +236,14 @@ public async Task Code_predicate_exception_is_route_local_reports_endpoints_and_ (await healthySink.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5))) .ShouldBeSameAs(first); var systemEvent = (await eventReceive).Message!; - systemEvent.Value.Name.ShouldBe(ApplicationSystemEventNames.LinkConditionFailed); - systemEvent.Value.Subject.ShouldBe(Output.Value); - systemEvent.Value.Error!.Message.ShouldBe(distinctive.Message); - systemEvent.Value.Error.Details!.Value.GetProperty("port").GetString() + var projected = systemEvent.ToFlowEvent(); + projected.Name.ShouldBe(ApplicationSystemEventNames.LinkConditionFailed); + projected.Dimensions["subject"].ShouldBe(Output.Value); + var projectedError = FlowValue.From(projected.Attributes["error"]).Deserialize()!; + projectedError.Message.ShouldBe(distinctive.Message); + projectedError.Details!.Value.GetProperty("port").GetString() .ShouldBe(Output.Value); - systemEvent.Value.Error.Details.Value.GetProperty("relatedPort").GetString() + projectedError.Details.Value.GetProperty("relatedPort").GetString() .ShouldBe(Input.Value); systemEvent.TraceId.ShouldBe(first.TraceId); systemEvent.CausationId.ShouldBe(first.MessageId); @@ -308,7 +303,7 @@ public async Task Source_fault_emits_component_event_and_only_makes_that_output_ .Build(); var source = new BufferBlock>(); using var sourceAttachment = runtime.AttachOutput(Output, source); - var receive = runtime.ReceiveAsync( + var receive = runtime.ReceiveAsync( ApplicationAddress.SystemEvents, TimeSpan.FromSeconds(5)); @@ -316,8 +311,9 @@ public async Task Source_fault_emits_component_event_and_only_makes_that_output_ await Should.ThrowAsync(async () => await source.Completion); var systemEvent = (await receive).Message!; - systemEvent.Value.Name.ShouldBe(ApplicationSystemEventNames.ComponentFaulted); - systemEvent.Value.Category.ShouldBe(ApplicationSystemEventCategory.Component); + systemEvent.ToFlowEvent().Name.ShouldBe(ApplicationSystemEventNames.ComponentFaulted); + systemEvent.ToFlowEvent().Dimensions["category"] + .ShouldBe("Component"); await EventuallyAsync(() => runtime.Status.Ports .Single(port => port.Address == Output) .Availability == ApplicationPortAvailability.Unavailable); @@ -332,7 +328,7 @@ public async Task Idle_input_component_fault_becomes_unavailable_without_faultin .Build(); var target = new BufferBlock>(); await using var attachment = await runtime.AttachInputAsync(Input, target); - var receive = runtime.ReceiveAsync( + var receive = runtime.ReceiveAsync( ApplicationAddress.SystemEvents, TimeSpan.FromSeconds(5)); @@ -340,8 +336,9 @@ public async Task Idle_input_component_fault_becomes_unavailable_without_faultin await Should.ThrowAsync(async () => await target.Completion); var systemEvent = (await receive).Message!; - systemEvent.Value.Name.ShouldBe(ApplicationSystemEventNames.ComponentFaulted); - systemEvent.Value.Category.ShouldBe(ApplicationSystemEventCategory.Component); + systemEvent.ToFlowEvent().Name.ShouldBe(ApplicationSystemEventNames.ComponentFaulted); + systemEvent.ToFlowEvent().Dimensions["category"] + .ShouldBe("Component"); runtime.Status.Ports.Single(port => port.Address == Input) .Availability.ShouldBe(ApplicationPortAvailability.Unavailable); runtime.Status.State.ShouldBe(ApplicationRuntimeState.Active); @@ -368,13 +365,13 @@ public async Task Status_snapshots_track_port_availability_and_terminal_state() .Availability.ShouldBe(ApplicationPortAvailability.Available); runtime.Status.Ports.Single(port => port.Address == Output) .Availability.ShouldBe(ApplicationPortAvailability.Available); - var lifecycle = runtime.ReceiveAsync( + var lifecycle = runtime.ReceiveAsync( ApplicationAddress.SystemEvents, TimeSpan.FromSeconds(5)); runtime.Complete(); runtime.Status.State.ShouldBe(ApplicationRuntimeState.Completing); - (await lifecycle).Message!.Value.Name.ShouldBe( + (await lifecycle).Message!.ToFlowEvent().Name.ShouldBe( ApplicationSystemEventNames.RuntimeCompleting); await runtime.Completion.WaitAsync(TimeSpan.FromSeconds(5)); @@ -395,7 +392,7 @@ public async Task Port_activity_and_request_timing_are_emitted_as_trace_correlat var processor = new ActionBlock>(request => responses.Post(request.With("response"))); await using var inputAttachment = await runtime.AttachInputAsync(Input, processor); - var diagnostics = new BufferBlock>(); + var diagnostics = new BufferBlock(); using var diagnosticsLink = runtime.Diagnostics.LinkTo(diagnostics); var request = FlowMessage.Create("request"); @@ -406,21 +403,21 @@ public async Task Port_activity_and_request_timing_are_emitted_as_trace_correlat TimeSpan.FromSeconds(5)); result.Status.ShouldBe(PortRequestStatus.Received); - var received = new List>(); - while (received.Select(message => message.Value.Name).Distinct().Count() < 3) + var received = new List(); + while (received.Select(message => message.ToFlowEvent().Name).Distinct().Count() < 3) { received.Add(await diagnostics.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5))); } received.ShouldContain(message => - message.Value.Name == ApplicationDiagnosticNames.InputAccepted && + message.ToFlowEvent().Name == ApplicationDiagnosticNames.InputAccepted && message.TraceId == request.TraceId); received.ShouldContain(message => - message.Value.Name == ApplicationDiagnosticNames.OutputEmitted && + message.ToFlowEvent().Name == ApplicationDiagnosticNames.OutputEmitted && message.TraceId == request.TraceId); received.ShouldContain(message => - message.Value.Name == ApplicationDiagnosticNames.RequestCompleted && - message.Value.Duration > TimeSpan.Zero && + message.ToFlowEvent().Name == ApplicationDiagnosticNames.RequestCompleted && + message.ToFlowEvent().Measurements["duration.ms"] > 0d && message.TraceId == request.TraceId); } @@ -428,9 +425,9 @@ public async Task Port_activity_and_request_timing_are_emitted_as_trace_correlat public async Task Diagnostic_system_link_rejection_is_reported_once_without_recursive_diagnostics() { await using var runtime = new ApplicationPortRuntimeBuilder() - .AddInput(Input, capacity: 1) + .AddFlowValueInput(Input, capacity: 1) .Build(); - var target = new PostponedTarget>(); + var target = new PostponedTarget(); await using var targetAttachment = await runtime.AttachInputAsync(Input, target); using var route = runtime.Connect(CompileSystemDiagnosticLink()); var recordedRejections = new BufferBlock(); @@ -494,7 +491,7 @@ public async Task Accepted_diagnostics_integrate_with_logging_activities_metrics .Build(); var message = DiagnosticMessage( "custom.timing", - ApplicationDiagnosticKind.Timing, + "Timing", measurement: 12.5); runtime.TryPublishDiagnostic(message).ShouldBeTrue(); @@ -529,7 +526,7 @@ public async Task Signal_publication_honors_cancellation_completion_and_subscrib { await using var runtime = new ApplicationPortRuntimeBuilder().Build(); using var failedLink = runtime.SystemEvents.LinkTo( - new ThrowingTarget>()); + new ThrowingTarget()); using var canceled = new CancellationTokenSource(); canceled.Cancel(); @@ -551,7 +548,7 @@ public async Task Throwing_subscriber_completion_is_isolated_from_runtime_comple { await using var runtime = new ApplicationPortRuntimeBuilder().Build(); using var failedLink = runtime.SystemEvents.LinkTo( - new ThrowingCompletionTarget>(), + new ThrowingCompletionTarget(), new DataflowLinkOptions { PropagateCompletion = true }); runtime.Complete(); @@ -560,28 +557,38 @@ public async Task Throwing_subscriber_completion_is_isolated_from_runtime_comple runtime.Status.State.ShouldBe(ApplicationRuntimeState.Completed); } - private static FlowMessage EventMessage(string name) - => FlowMessage.Create(new ApplicationSystemEvent + private static FlowMessage EventMessage(string name) + => ApplicationSignalMessage.Create(new FlowEvent { Timestamp = DateTimeOffset.UtcNow, Name = name, - Category = ApplicationSystemEventCategory.Lifecycle, - Subject = "test" + Kind = FlowEventKind.Lifecycle, + Dimensions = new Dictionary(StringComparer.Ordinal) + { + ["category"] = "Lifecycle", + ["subject"] = "test" + } }); - private static FlowMessage DiagnosticMessage( + private static FlowMessage DiagnosticMessage( string name, - ApplicationDiagnosticKind kind = ApplicationDiagnosticKind.Log, + string kind = "Log", double? measurement = null) - => FlowMessage.Create(new ApplicationDiagnostic + => ApplicationSignalMessage.Create(new FlowEvent { Timestamp = DateTimeOffset.UtcNow, Name = name, - Kind = kind, - Level = ApplicationDiagnosticLevel.Information, + Kind = FlowEventKind.Diagnostic, + Level = FlowEventLevel.Information, Message = name, - Measurement = measurement, - Unit = measurement is null ? null : "ms" + Dimensions = new Dictionary(StringComparer.Ordinal) + { + ["kind"] = kind, + ["unit"] = measurement is null ? null : "ms" + }, + Measurements = measurement is null + ? new Dictionary(StringComparer.Ordinal) + : new Dictionary(StringComparer.Ordinal) { ["value"] = measurement.Value } }); private static CompiledApplicationLink CompileSystemEventLink() @@ -605,7 +612,7 @@ private static CompiledApplicationLink CompileSystemEventLink() new ComponentDescriptor( "sink", UnusedFactory, - inputs: [ComponentPorts.Metadata("Input")]) + inputs: [ComponentPorts.Metadata("Input")]) ]); var result = new ApplicationLinkCompiler( registry, @@ -700,7 +707,7 @@ private static CompiledApplicationLink CompileSystemDiagnosticLink() new ComponentDescriptor( "sink", UnusedFactory, - inputs: [ComponentPorts.Metadata("Input")]) + inputs: [ComponentPorts.Metadata("Input")]) ]); var result = new ApplicationLinkCompiler( registry, diff --git a/tests/FluxFlow.Engine.Tests/CompositionServiceProviderSnapshotTests.cs b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/CompositionServiceProviderSnapshotTests.cs similarity index 100% rename from tests/FluxFlow.Engine.Tests/CompositionServiceProviderSnapshotTests.cs rename to tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/CompositionServiceProviderSnapshotTests.cs diff --git a/tests/FluxFlow.Engine.Tests/FluxFlow.Engine.Tests.csproj b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/FluxFlow.Engine.Tests.csproj similarity index 83% rename from tests/FluxFlow.Engine.Tests/FluxFlow.Engine.Tests.csproj rename to tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/FluxFlow.Engine.Tests.csproj index 1f74994c..d4dbe95f 100644 --- a/tests/FluxFlow.Engine.Tests/FluxFlow.Engine.Tests.csproj +++ b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/FluxFlow.Engine.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,7 +6,7 @@ - + diff --git a/tests/FluxFlow.Engine.Tests/FluxFlowApplicationRegistrationTests.cs b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/FluxFlowApplicationRegistrationTests.cs similarity index 100% rename from tests/FluxFlow.Engine.Tests/FluxFlowApplicationRegistrationTests.cs rename to tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/FluxFlowApplicationRegistrationTests.cs diff --git a/tests/FluxFlow.Engine.Tests/FluxFlowApplicationTests.cs b/tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/FluxFlowApplicationTests.cs similarity index 100% rename from tests/FluxFlow.Engine.Tests/FluxFlowApplicationTests.cs rename to tests/Unit/Engine/Runtime/FluxFlow.Engine.Tests/FluxFlowApplicationTests.cs diff --git a/tests/FluxFlow.Release.Tests/BespokeClockInterfaceTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/BespokeClockInterfaceTests.cs similarity index 81% rename from tests/FluxFlow.Release.Tests/BespokeClockInterfaceTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/BespokeClockInterfaceTests.cs index 104b7ada..72d94c60 100644 --- a/tests/FluxFlow.Release.Tests/BespokeClockInterfaceTests.cs +++ b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/BespokeClockInterfaceTests.cs @@ -16,8 +16,11 @@ public void Source_components_do_not_declare_bespoke_clock_interfaces() var src = Path.Combine(root, "src"); var scanRoots = Directory - .EnumerateDirectories(src, "FluxFlow.Components.*", SearchOption.TopDirectoryOnly) - .Append(Path.Combine(src, "FluxFlow.Engine")) + .EnumerateDirectories( + Path.Combine(src, "Components"), + "FluxFlow.Components.*", + SearchOption.AllDirectories) + .Append(Path.Combine(src, "Engine", "Runtime", "FluxFlow.Engine")) .Where(Directory.Exists); var offenders = scanRoots diff --git a/tests/FluxFlow.Release.Tests/CanonicalCleanupLedgerTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/CanonicalCleanupLedgerTests.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/CanonicalCleanupLedgerTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/CanonicalCleanupLedgerTests.cs diff --git a/tests/FluxFlow.Release.Tests/CodeFirstApplicationAuthoringConventionTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/CodeFirstApplicationAuthoringConventionTests.cs similarity index 99% rename from tests/FluxFlow.Release.Tests/CodeFirstApplicationAuthoringConventionTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/CodeFirstApplicationAuthoringConventionTests.cs index 194f614d..1d5cff71 100644 --- a/tests/FluxFlow.Release.Tests/CodeFirstApplicationAuthoringConventionTests.cs +++ b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/CodeFirstApplicationAuthoringConventionTests.cs @@ -61,8 +61,7 @@ public void Executable_resource_typed_port_and_advanced_registration_surfaces_ar var root = ReleaseTestPaths.FindRepositoryRoot(); var applicationPorts = File.ReadAllText(Path.Combine( root, - "src", - "FluxFlow.Engine", + "src", "Engine", "Runtime", "FluxFlow.Engine", "ApplicationPorts.cs")); applicationPorts.ShouldContain("InputPortHandle input"); applicationPorts.ShouldContain("SignalInputPortHandle input"); @@ -277,7 +276,7 @@ public void Designer_source_uses_only_the_explicit_contract_wrapper_without_grap var root = ReleaseTestPaths.FindRepositoryRoot(); var designerRoots = new[] { - Path.Combine(root, "src", "FluxFlow.Components.Designer"), + Path.Combine(root, "src", "Components", "Designer", "FluxFlow.Components.Designer"), Path.Combine(root, "src", "FluxFlow.Designer"), Path.Combine(root, "src", "FluxFlow.Designer.Abstractions") }; diff --git a/tests/FluxFlow.Release.Tests/ComponentCompositionMetadataConventionTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ComponentCompositionMetadataConventionTests.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/ComponentCompositionMetadataConventionTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ComponentCompositionMetadataConventionTests.cs diff --git a/tests/FluxFlow.Release.Tests/ComponentFamilyAuthoringConventionTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ComponentFamilyAuthoringConventionTests.cs similarity index 98% rename from tests/FluxFlow.Release.Tests/ComponentFamilyAuthoringConventionTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ComponentFamilyAuthoringConventionTests.cs index 702ca9f3..b3a9e5d0 100644 --- a/tests/FluxFlow.Release.Tests/ComponentFamilyAuthoringConventionTests.cs +++ b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ComponentFamilyAuthoringConventionTests.cs @@ -204,7 +204,7 @@ public void Explicit_19_family_matrix_exposes_44_complete_contracts_with_exact_d events.ShouldNotBeNull( $"{contractContainer.Name}.{propertyName} handle must expose explicit Events."); var eventsProperty = events!; - eventsProperty.PropertyType.ShouldBe(typeof(OutputPortHandle)); + eventsProperty.PropertyType.ShouldBe(typeof(OutputPortHandle)); eventsProperty.GetMethod!.IsPublic.ShouldBeTrue(); eventsProperty.SetMethod.ShouldBeNull(); var contract = property.GetValue(null) @@ -214,7 +214,7 @@ public void Explicit_19_family_matrix_exposes_44_complete_contracts_with_exact_d completeContract.Type.ShouldBe(completeContract.Type.Trim()); completeContract.Descriptor.Type.ShouldBe(completeContract.Type); completeContract.Descriptor.Outputs["Events"].MessageType - .ShouldBe(typeof(ComponentEvent)); + .ShouldBe(typeof(global::FluxFlow.Data.FlowValue)); completeContract.Descriptor.Outputs["Events"].Kind .ShouldBe(ComponentPortKind.Message); completeContract.Descriptor.Inputs.Values.ShouldAllBe(static port => @@ -267,7 +267,7 @@ public void All_19_family_package_readmes_explain_code_first_descriptor_ownershi var nonNullMqttAssemblyName = mqttAssemblyName!; var mqttReadme = resolved.Single(item => item.AssemblyName == nonNullMqttAssemblyName).Readme; Path.GetRelativePath(root, mqttReadme).Replace('\\', '/').ShouldBe( - $"src/Mqtt/{nonNullMqttAssemblyName}/README.md"); + $"src/Components/Mqtt/{nonNullMqttAssemblyName}/README.md"); foreach (var family in resolved) { diff --git a/tests/FluxFlow.Release.Tests/ComponentFamilyRegistrationMatrixTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ComponentFamilyRegistrationMatrixTests.cs similarity index 91% rename from tests/FluxFlow.Release.Tests/ComponentFamilyRegistrationMatrixTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ComponentFamilyRegistrationMatrixTests.cs index ffc20b30..f29af7ca 100644 --- a/tests/FluxFlow.Release.Tests/ComponentFamilyRegistrationMatrixTests.cs +++ b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ComponentFamilyRegistrationMatrixTests.cs @@ -20,6 +20,7 @@ using FluxFlow.Components.Timers.Composition; using FluxFlow.Components.Validation.Composition; using FluxFlow.Composition; +using FluxFlow.Data; using FluxFlow.Nodes; using Microsoft.Extensions.DependencyInjection; using Shouldly; @@ -216,6 +217,72 @@ public void Explicit_family_matrix_registers_all_44_declarations_idempotently() allTypes.Distinct(StringComparer.Ordinal).Count().ShouldBe(44); } + [Fact] + public void Explicit_family_matrix_exposes_only_flow_value_normal_data_ports() + { + var normalDataPorts = new List<(string Family, string Component, ComponentPortMetadata Port)>(); + + foreach (var family in Families) + { + var services = new ServiceCollection(); + family.Register(services); + + foreach (var descriptor in ReadDescriptors(services)) + { + normalDataPorts.AddRange(descriptor.Inputs.Values + .Where(static port => port.Kind == ComponentPortKind.Message) + .Select(port => (family.Name, descriptor.Type, port))); + normalDataPorts.AddRange(descriptor.Outputs.Values + .Where(static port => + port.Kind == ComponentPortKind.Message && + port.MessageType != typeof(global::FluxFlow.Data.FlowValue)) + .Select(port => (family.Name, descriptor.Type, port))); + } + } + + normalDataPorts.ShouldNotBeEmpty(); + foreach (var (family, component, port) in normalDataPorts) + { + port.MessageType.ShouldBe( + typeof(FlowValue), + $"{family} '{component}.{port.Name}' must expose FlowValue at the runtime-authored workflow boundary."); + } + } + + [Fact] + public void Explicit_family_matrix_publishes_shapes_for_every_flow_value_input() + { + var shapedInputs = new List<(string Family, string Component, PortDesignMetadata Port)>(); + + foreach (var family in Families) + { + var services = new ServiceCollection(); + family.Register(services); + using var provider = services.BuildServiceProvider(); + var designCatalog = provider.GetRequiredService(); + + foreach (var component in designCatalog.All) + { + foreach (var port in component.Ports.Where(static port => + port.Direction == PortDirection.Input && + port.Kind == ComponentPortKind.Message && + port.MessageType == typeof(FlowValue))) + { + port.InputShape.ShouldNotBeNull( + $"{family.Name} '{component.Type.Value}.{port.Name.Value}' must publish its accepted FlowValue shape."); + port.InputShape.Description.ShouldNotBeNullOrWhiteSpace(); + shapedInputs.Add((family.Name, component.Type.Value, port)); + } + + component.Ports + .Where(static port => port.Direction == PortDirection.Output) + .ShouldAllBe(static port => port.InputShape == null); + } + } + + shapedInputs.ShouldNotBeEmpty(); + } + [Fact] public void Explicit_family_matrix_keeps_all_44_explicit_event_outputs() { @@ -232,7 +299,7 @@ public void Explicit_family_matrix_keeps_all_44_explicit_event_outputs() { descriptor.Outputs.TryGetValue("Events", out var events).ShouldBeTrue( $"{family.Name} '{descriptor.Type}' must explicitly retain its established Events output."); - events.ShouldNotBeNull().MessageType.ShouldBe(typeof(ComponentEvent)); + events.ShouldNotBeNull().MessageType.ShouldBe(typeof(global::FluxFlow.Data.FlowValue)); events.Kind.ShouldBe(ComponentPortKind.Message); designCatalog.TryGet(new ComponentType(descriptor.Type), out var metadata) @@ -240,8 +307,8 @@ public void Explicit_family_matrix_keeps_all_44_explicit_event_outputs() var designedEvents = metadata.ShouldNotBeNull().Ports .Single(port => port.Name.Value == "Events"); designedEvents.Direction.ShouldBe(PortDirection.Output); - designedEvents.MessageType.ShouldBe(typeof(ComponentEvent)); - designedEvents.ValueType?.Value.ShouldBe(nameof(ComponentEvent)); + designedEvents.MessageType.ShouldBe(typeof(global::FluxFlow.Data.FlowValue)); + designedEvents.ValueType?.Value.ShouldBe(nameof(global::FluxFlow.Data.FlowValue)); eventOutputs.Add((family.Name, descriptor.Type)); } } @@ -514,12 +581,16 @@ public void Component_family_package_boundaries_match_flat_registration_ownershi var compositionProject = Path.Combine( sourceRoot, + "Core", + "Application", "FluxFlow.Composition", "FluxFlow.Composition.csproj"); ProjectReferences(compositionProject).ShouldNotContain("FluxFlow.Components.Designer"); var designerProject = Path.Combine( sourceRoot, + "Components", + "Designer", "FluxFlow.Components.Designer", "FluxFlow.Components.Designer.csproj"); ProjectReferences(designerProject).ShouldContain("FluxFlow.Composition"); @@ -527,8 +598,8 @@ public void Component_family_package_boundaries_match_flat_registration_ownershi } [Theory] - [InlineData(@"..\..\src\FluxFlow.Components.Designer\FluxFlow.Components.Designer.csproj")] - [InlineData("../../src/FluxFlow.Components.Designer/FluxFlow.Components.Designer.csproj")] + [InlineData(@"..\..\src\Components\Designer\FluxFlow.Components.Designer\FluxFlow.Components.Designer.csproj")] + [InlineData("../../src/Components/Designer/FluxFlow.Components.Designer/FluxFlow.Components.Designer.csproj")] public void Project_reference_name_is_separator_neutral(string include) => ProjectReferenceName(include).ShouldBe("FluxFlow.Components.Designer"); @@ -597,8 +668,8 @@ private static void AssertFinalPresentationMatchesDescriptor( var events = metadata.Ports.Single(port => string.Equals(port.Name.Value, "Events", StringComparison.Ordinal)); events.Direction.ShouldBe(PortDirection.Output); - events.MessageType.ShouldBe(typeof(ComponentEvent)); - events.ValueType?.Value.ShouldBe(nameof(ComponentEvent)); + events.MessageType.ShouldBe(typeof(global::FluxFlow.Data.FlowValue)); + events.ValueType?.Value.ShouldBe(nameof(global::FluxFlow.Data.FlowValue)); events.Group?.Value.ShouldBe("Diagnostics"); } diff --git a/tests/FluxFlow.Release.Tests/ComponentPackageBoundaryTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ComponentPackageBoundaryTests.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/ComponentPackageBoundaryTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ComponentPackageBoundaryTests.cs diff --git a/tests/FluxFlow.Release.Tests/DocumentationBoundaryTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/DocumentationBoundaryTests.cs similarity index 98% rename from tests/FluxFlow.Release.Tests/DocumentationBoundaryTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/DocumentationBoundaryTests.cs index 2cb2a6bc..4369ac04 100644 --- a/tests/FluxFlow.Release.Tests/DocumentationBoundaryTests.cs +++ b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/DocumentationBoundaryTests.cs @@ -15,7 +15,7 @@ public void Code_first_docs_keep_normal_contracts_resources_ports_and_fluent_on_ Path.Combine(root, "docs", "04-package-authoring.md"), Path.Combine(root, "docs", "39-typed-code-first-authoring.md"), Path.Combine(root, "docs", "40-unified-component-contracts.md"), - Path.Combine(root, "src", "FluxFlow.Engine", "README.md") + Path.Combine(root, "src", "Engine", "Runtime", "FluxFlow.Engine", "README.md") }; var normal = string.Join( Environment.NewLine, @@ -29,7 +29,7 @@ public void Code_first_docs_keep_normal_contracts_resources_ports_and_fluent_on_ normal.Contains("AddRuntimeComponent(", StringComparison.Ordinal).ShouldBeFalse(); var fluent = File.ReadAllText( - Path.Combine(root, "src", "FluxFlow.Fluent", "README.md")); + Path.Combine(root, "src", "Authoring", "FluxFlow.Fluent", "README.md")); fluent.Contains("ApplicationDefinition", StringComparison.Ordinal).ShouldBeTrue(); fluent.Contains("FluxFlowApplication", StringComparison.Ordinal).ShouldBeTrue(); fluent.Contains("ApplicationRuntime", StringComparison.Ordinal).ShouldBeFalse(); @@ -359,7 +359,7 @@ public void Engine_docs_keep_unified_application_as_the_only_runtime_model() { var root = ReleaseTestPaths.FindRepositoryRoot(); var readme = File.ReadAllText( - Path.Combine(root, "src", "FluxFlow.Engine", "README.md")); + Path.Combine(root, "src", "Engine", "Runtime", "FluxFlow.Engine", "README.md")); var defaultSection = readme[..Math.Min(readme.Length, 2_400)]; defaultSection.Contains("FluxFlowApplication", StringComparison.Ordinal) diff --git a/tests/FluxFlow.Release.Tests/DurabilityPackageVersionTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/DurabilityPackageVersionTests.cs similarity index 51% rename from tests/FluxFlow.Release.Tests/DurabilityPackageVersionTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/DurabilityPackageVersionTests.cs index 3f79c555..b5e5edc9 100644 --- a/tests/FluxFlow.Release.Tests/DurabilityPackageVersionTests.cs +++ b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/DurabilityPackageVersionTests.cs @@ -8,12 +8,12 @@ public sealed class DurabilityPackageVersionTests { public static TheoryData ExpectedVersions => new() { - { "src/FluxFlow.Engine.DurableInput/FluxFlow.Engine.DurableInput.csproj", "2.0.0-rc.1" }, - { "src/FluxFlow.Engine.DurableInput.SqlFile/FluxFlow.Engine.DurableInput.SqlFile.csproj", "2.0.0-rc.1" }, - { "src/FluxFlow.Engine.DurableInput.TSql/FluxFlow.Engine.DurableInput.TSql.csproj", "2.0.0-rc.1" }, - { "src/FluxFlow.Engine.DurableOutput/FluxFlow.Engine.DurableOutput.csproj", "4.0.0-rc.1" }, - { "src/FluxFlow.Engine.DurableOutput.SqlFile/FluxFlow.Engine.DurableOutput.SqlFile.csproj", "4.0.0-rc.1" }, - { "src/FluxFlow.Engine.DurableOutput.TSql/FluxFlow.Engine.DurableOutput.TSql.csproj", "3.0.0-rc.1" } + { "src/Engine/DurableInput/FluxFlow.Engine.DurableInput/FluxFlow.Engine.DurableInput.csproj", "3.0.0-rc.2" }, + { "src/Engine/DurableInput/FluxFlow.Engine.DurableInput.SqlFile/FluxFlow.Engine.DurableInput.SqlFile.csproj", "3.0.0-rc.2" }, + { "src/Engine/DurableInput/FluxFlow.Engine.DurableInput.TSql/FluxFlow.Engine.DurableInput.TSql.csproj", "3.0.0-rc.2" }, + { "src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput/FluxFlow.Engine.DurableOutput.csproj", "5.0.0-rc.2" }, + { "src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.SqlFile/FluxFlow.Engine.DurableOutput.SqlFile.csproj", "5.0.0-rc.2" }, + { "src/Engine/DurableOutput/FluxFlow.Engine.DurableOutput.TSql/FluxFlow.Engine.DurableOutput.TSql.csproj", "4.0.0-rc.2" } }; [Theory] diff --git a/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/FluxFlow.Release.Tests.csproj b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/FluxFlow.Release.Tests.csproj new file mode 100644 index 00000000..cc433af4 --- /dev/null +++ b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/FluxFlow.Release.Tests.csproj @@ -0,0 +1,42 @@ + + + + net10.0 + false + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/FluxFlow.Release.Tests/HealthReadinessConventionTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/HealthReadinessConventionTests.cs similarity index 95% rename from tests/FluxFlow.Release.Tests/HealthReadinessConventionTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/HealthReadinessConventionTests.cs index c2523a71..657e05c4 100644 --- a/tests/FluxFlow.Release.Tests/HealthReadinessConventionTests.cs +++ b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/HealthReadinessConventionTests.cs @@ -6,7 +6,10 @@ namespace FluxFlow.Release.Tests; public sealed class HealthReadinessConventionTests { - private const string ProjectDirectory = "FluxFlow.Engine.HealthChecks"; + private static readonly string ProjectDirectory = Path.Combine( + "Engine", + "Health", + "FluxFlow.Engine.HealthChecks"); [Fact] public void Health_integration_package_is_optional_standard_only_and_manifested() @@ -23,11 +26,11 @@ public void Health_integration_package_is_optional_standard_only_and_manifested( ReadProperty(project, "PackageId").ShouldBe("FluxFlow.Engine.HealthChecks"); ReadProperty(project, "AssemblyName").ShouldBe("FluxFlow.Engine.HealthChecks"); ReadProperty(project, "RootNamespace").ShouldBe("FluxFlow.Engine.HealthChecks"); - ReadProperty(project, "Version").ShouldBe("1.0.0-rc.1"); + ReadProperty(project, "Version").ShouldBe("2.0.0-rc.2"); ReadIncludes(project, "PackageReference") .ShouldBe(new[] { "Microsoft.Extensions.Diagnostics.HealthChecks" }); ReadIncludes(project, "ProjectReference") - .ShouldBe(new[] { @"..\FluxFlow.Engine\FluxFlow.Engine.csproj" }); + .ShouldBe(new[] { @"..\..\Runtime\FluxFlow.Engine\FluxFlow.Engine.csproj" }); project.Descendants().ShouldNotContain(static element => element.Name.LocalName == "FrameworkReference"); @@ -36,9 +39,9 @@ public void Health_integration_package_is_optional_standard_only_and_manifested( candidate.Alias == "engine-healthchecks"); entry.TagPrefix.ShouldBe("engine-healthchecks"); entry.PackageId.ShouldBe("FluxFlow.Engine.HealthChecks"); - entry.Project.ShouldBe("src/FluxFlow.Engine.HealthChecks/FluxFlow.Engine.HealthChecks.csproj"); + entry.Project.ShouldBe("src/Engine/Health/FluxFlow.Engine.HealthChecks/FluxFlow.Engine.HealthChecks.csproj"); entry.NotesName.ShouldBe("FluxFlow.Engine.HealthChecks"); - entry.BinaryCompatibilityBaseline.ShouldBeNull(); + entry.BinaryCompatibilityBaseline.ShouldBe("1.0.0-rc.1"); manifest.Count(static candidate => candidate.PackageId == "FluxFlow.Engine.HealthChecks").ShouldBe(1); } diff --git a/tests/FluxFlow.Release.Tests/LinkOwnershipBoundaryTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/LinkOwnershipBoundaryTests.cs similarity index 80% rename from tests/FluxFlow.Release.Tests/LinkOwnershipBoundaryTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/LinkOwnershipBoundaryTests.cs index 8c8474e8..dd43ea4f 100644 --- a/tests/FluxFlow.Release.Tests/LinkOwnershipBoundaryTests.cs +++ b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/LinkOwnershipBoundaryTests.cs @@ -11,8 +11,7 @@ public void Composition_has_no_production_friend_access_for_designer_or_engine() var root = ReleaseTestPaths.FindRepositoryRoot(); var project = File.ReadAllText(Path.Combine( root, - "src", - "FluxFlow.Composition", + "src", "Core", "Application", "FluxFlow.Composition", "FluxFlow.Composition.csproj")); project.ShouldNotContain("InternalsVisibleTo Include=\"FluxFlow.Components.Designer\""); @@ -23,22 +22,20 @@ public void Composition_has_no_production_friend_access_for_designer_or_engine() public void Designer_and_engine_use_owned_public_boundaries() { var root = ReleaseTestPaths.FindRepositoryRoot(); - var designer = ReadSources(Path.Combine(root, "src", "FluxFlow.Components.Designer")); - var engine = ReadSources(Path.Combine(root, "src", "FluxFlow.Engine")); + var designer = ReadSources(Path.Combine(root, "src", "Components", "Designer", "FluxFlow.Components.Designer")); + var engine = ReadSources(Path.Combine(root, "src", "Engine", "Runtime", "FluxFlow.Engine")); designer.ShouldNotContain("ApplicationLinkDeclarationParser"); designer.ShouldNotContain("CanonicalApplicationProperties"); engine.ShouldNotContain("CanonicalApplicationProperties"); File.Exists(Path.Combine( root, - "src", - "FluxFlow.Composition", + "src", "Core", "Application", "FluxFlow.Composition", "Configuration", "ConfigurationJsonReader.cs")).ShouldBeFalse(); File.Exists(Path.Combine( root, - "src", - "FluxFlow.Engine", + "src", "Engine", "Runtime", "FluxFlow.Engine", "Internal", "ConfigurationJsonReader.cs")).ShouldBeTrue(); } diff --git a/tests/FluxFlow.Release.Tests/MqttPortableTransportConventionTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/MqttPortableTransportConventionTests.cs similarity index 94% rename from tests/FluxFlow.Release.Tests/MqttPortableTransportConventionTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/MqttPortableTransportConventionTests.cs index f0d05bc5..b1aff00a 100644 --- a/tests/FluxFlow.Release.Tests/MqttPortableTransportConventionTests.cs +++ b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/MqttPortableTransportConventionTests.cs @@ -10,11 +10,10 @@ public sealed class MqttPortableTransportConventionTests public void Portable_mqtt_transport_contract_has_no_provider_reflection_or_browser_policy() { var root = ReleaseTestPaths.FindRepositoryRoot(); - var core = Path.Combine(root, "src", "Mqtt", "FluxFlow.Components.Mqtt"); + var core = Path.Combine(root, "src", "Components", "Mqtt", "FluxFlow.Components.Mqtt"); var composition = Path.Combine( root, - "src", - "Mqtt", + "src", "Components", "Mqtt", "FluxFlow.Components.Mqtt.Composition"); var enumSource = File.ReadAllText(Path.Combine( core, @@ -136,7 +135,7 @@ public void Portable_mqtt_transport_contract_has_no_provider_reflection_or_brows public void Pulse_websocket_transport_dependency_is_exact_adapter_local_and_uses_raw_client() { var root = ReleaseTestPaths.FindRepositoryRoot(); - var mqttRoot = Path.Combine(root, "src", "Mqtt"); + var mqttRoot = Path.Combine(root, "src", "Components", "Mqtt"); var centralPackages = XDocument.Load(Path.Combine(root, "Directory.Packages.props")); var webSocketVersions = centralPackages .Descendants("PackageVersion") @@ -160,18 +159,17 @@ public void Pulse_websocket_transport_dependency_is_exact_adapter_local_and_uses .ToArray(); webSocketReferences.ShouldBe([ Path.Combine( - "src", - "Mqtt", + "src", "Components", "Mqtt", "FluxFlow.Components.Mqtt.PulseMqtt", "FluxFlow.Components.Mqtt.PulseMqtt.csproj") ]); var expectedVersions = new Dictionary(StringComparer.Ordinal) { - ["FluxFlow.Components.Mqtt"] = "7.1.0", - ["FluxFlow.Components.Mqtt.Composition"] = "7.1.0-rc.1", - ["FluxFlow.Components.Mqtt.MqttNet"] = "3.1.0", - ["FluxFlow.Components.Mqtt.PulseMqtt"] = "4.1.0" + ["FluxFlow.Components.Mqtt"] = "8.0.0-rc.1", + ["FluxFlow.Components.Mqtt.Composition"] = "8.0.0-rc.1", + ["FluxFlow.Components.Mqtt.MqttNet"] = "4.0.0-rc.1", + ["FluxFlow.Components.Mqtt.PulseMqtt"] = "5.0.0-rc.1" }; foreach (var (projectName, expectedVersion) in expectedVersions) { diff --git a/tests/FluxFlow.Release.Tests/NodeDataBoundaryTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/NodeDataBoundaryTests.cs similarity index 94% rename from tests/FluxFlow.Release.Tests/NodeDataBoundaryTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/NodeDataBoundaryTests.cs index 076f9b49..dc572e87 100644 --- a/tests/FluxFlow.Release.Tests/NodeDataBoundaryTests.cs +++ b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/NodeDataBoundaryTests.cs @@ -15,7 +15,7 @@ public void Nodes_owns_the_transport_neutral_data_namespace_without_a_compatibil File.Exists(Path.Combine(root, "src", "FluxFlow.Data", "FluxFlow.Data.csproj")) .ShouldBeFalse("the retired package must not remain as a forwarding project."); - var projectDirectory = Path.Combine(root, "src", "FluxFlow.Nodes"); + var projectDirectory = Path.Combine(root, "src", "Core", "Foundation", "FluxFlow.Nodes"); var dataDirectory = Path.Combine(projectDirectory, "Data"); Directory.Exists(dataDirectory).ShouldBeTrue(); var source = string.Join( diff --git a/tests/FluxFlow.Release.Tests/PackageArchiveInspectScriptTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageArchiveInspectScriptTests.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/PackageArchiveInspectScriptTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageArchiveInspectScriptTests.cs diff --git a/tests/FluxFlow.Release.Tests/PackageBinaryCompatPreflightScriptTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageBinaryCompatPreflightScriptTests.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/PackageBinaryCompatPreflightScriptTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageBinaryCompatPreflightScriptTests.cs diff --git a/tests/FluxFlow.Release.Tests/PackageBinaryCompatibilityPolicyTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageBinaryCompatibilityPolicyTests.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/PackageBinaryCompatibilityPolicyTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageBinaryCompatibilityPolicyTests.cs diff --git a/tests/FluxFlow.Release.Tests/PackageConsumerAcceptanceScriptTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageConsumerAcceptanceScriptTests.cs similarity index 99% rename from tests/FluxFlow.Release.Tests/PackageConsumerAcceptanceScriptTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageConsumerAcceptanceScriptTests.cs index d2512748..b9f03cf6 100644 --- a/tests/FluxFlow.Release.Tests/PackageConsumerAcceptanceScriptTests.cs +++ b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageConsumerAcceptanceScriptTests.cs @@ -144,7 +144,7 @@ public void Acceptance_fixture_exercises_independent_json_complete_code_first_an source.ShouldContain("ComponentContract.Create("); source.ShouldContain("class UppercaseComponentHandle(ComponentHandle definition)"); source.ShouldContain(": AuthoredComponentHandle(definition)"); - source.ShouldContain("OutputPortHandle Events"); + source.ShouldContain("OutputPortHandle Events"); source.ShouldNotContain("ComponentAuthoringContract"); source.ShouldNotContain(".AddRuntimeComponent("); diff --git a/tests/FluxFlow.Release.Tests/PackageConsumerSmokeScriptTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageConsumerSmokeScriptTests.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/PackageConsumerSmokeScriptTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageConsumerSmokeScriptTests.cs diff --git a/tests/FluxFlow.Release.Tests/PackageFeedVerifyScriptTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageFeedVerifyScriptTests.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/PackageFeedVerifyScriptTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageFeedVerifyScriptTests.cs diff --git a/tests/FluxFlow.Release.Tests/PackageListScriptTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageListScriptTests.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/PackageListScriptTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageListScriptTests.cs diff --git a/tests/FluxFlow.Release.Tests/PackageManifest.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageManifest.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/PackageManifest.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageManifest.cs diff --git a/tests/FluxFlow.Release.Tests/PackageManifestTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageManifestTests.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/PackageManifestTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageManifestTests.cs diff --git a/tests/FluxFlow.Release.Tests/PackageProjectConventionTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageProjectConventionTests.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/PackageProjectConventionTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageProjectConventionTests.cs diff --git a/tests/FluxFlow.Release.Tests/PackagePublishWorkflowTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackagePublishWorkflowTests.cs similarity index 68% rename from tests/FluxFlow.Release.Tests/PackagePublishWorkflowTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackagePublishWorkflowTests.cs index 235e67ce..f480ffd7 100644 --- a/tests/FluxFlow.Release.Tests/PackagePublishWorkflowTests.cs +++ b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackagePublishWorkflowTests.cs @@ -1,3 +1,4 @@ +using System.Text.RegularExpressions; using Shouldly; using Xunit; @@ -5,6 +6,73 @@ namespace FluxFlow.Release.Tests; public sealed class PackagePublishWorkflowTests { + [Fact] + public void Publish_workflow_uses_explicit_suites_before_provider_and_publication_gates() + { + var workflow = NormalizeLineEndings(ReadWorkflow()); + var previousIndex = RequiredIndexOf(workflow, "- name: Build"); + var providerIndex = RequiredIndexOf(workflow, "- name: Validate durable input provider"); + var commands = Regex.Matches(workflow, + @"(?m)^\s+run:\s+\./eng/test\.ps1 -Suite (?\w+) -Configuration Release -NoBuild\s*$"); + + commands.Select(match => match.Groups["suite"].Value) + .ShouldBe(["Unit", "Acceptance", "Integration"]); + foreach (Match command in commands) + { + command.Index.ShouldBeGreaterThan(previousIndex); + command.Index.ShouldBeLessThan(providerIndex); + var start = workflow.LastIndexOf("- name:", command.Index, StringComparison.Ordinal); + var step = workflow[start..(command.Index + command.Length)]; + step.ShouldContain("shell: pwsh"); + step.ShouldNotContain("continue-on-error"); + step.ShouldNotContain("if:"); + previousIndex = command.Index; + } + + workflow.ShouldNotContain("dotnet test FluxFlow.sln"); + workflow.ShouldNotContain("-Suite Smoke"); + workflow.ShouldNotContain("-Suite All"); + } + + [Fact] + public void Publish_workflow_invoked_repository_scripts_exist() + { + var root = ReleaseTestPaths.FindRepositoryRoot(); + var commands = Regex.Matches( + ReadWorkflow(), + @"(?m)^\s*(?:run:\s*)?\./(?[A-Za-z0-9_./-]+\.ps1)(?=\s|$)"); + + commands.Count.ShouldBeGreaterThan(0, "Expected repository script invocations in the workflow."); + foreach (Match command in commands) + { + var relativePath = command.Groups["path"].Value; + File.Exists(Path.Combine(root, relativePath)).ShouldBeTrue( + $"Publishing invokes missing repository script '{relativePath}'."); + } + } + + [Theory] + [InlineData("Validate durable input provider", "FluxFlow.Engine.DurableInput.TSql.IntegrationTests.csproj")] + [InlineData("Validate durable output provider", "FluxFlow.Engine.DurableOutput.TSql.IntegrationTests.csproj")] + public void Publish_workflow_provider_steps_use_the_matching_runner(string stepName, string projectName) + { + var workflow = NormalizeLineEndings(ReadWorkflow()); + var marker = $"- name: {stepName}"; + CountOccurrences(workflow, marker).ShouldBe(1); + var start = RequiredIndexOf(workflow, marker); + var end = workflow.IndexOf("\n - name:", start + marker.Length, StringComparison.Ordinal); + var step = end < 0 ? workflow[start..] : workflow[start..end]; + step.ShouldContain("shell: pwsh"); + var command = Regex.Match(step, + @"(?m)^\s+run:\s+\./(?[^\s]+/run-integration\.ps1)\s+-AcceptLicense\s*$"); + command.Success.ShouldBeTrue($"{stepName} must invoke its runner with explicit license acceptance."); + + var runner = Path.Combine(ReleaseTestPaths.FindRepositoryRoot(), command.Groups["path"].Value); + File.Exists(runner).ShouldBeTrue($"{stepName} invokes missing runner '{runner}'."); + var project = Path.Combine(Path.GetDirectoryName(runner)!, projectName); + File.Exists(project).ShouldBeTrue($"{stepName} must use the runner beside '{projectName}'."); + } + [Fact] public void Publish_workflow_orders_build_compatibility_integrity_and_publication_gates() { diff --git a/tests/FluxFlow.Release.Tests/PackageReleaseAvailabilityScriptTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageReleaseAvailabilityScriptTests.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/PackageReleaseAvailabilityScriptTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageReleaseAvailabilityScriptTests.cs diff --git a/tests/FluxFlow.Release.Tests/PackageReleaseDryRunScriptTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageReleaseDryRunScriptTests.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/PackageReleaseDryRunScriptTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageReleaseDryRunScriptTests.cs diff --git a/tests/FluxFlow.Release.Tests/PackageReleasePlanScriptTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageReleasePlanScriptTests.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/PackageReleasePlanScriptTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageReleasePlanScriptTests.cs diff --git a/tests/FluxFlow.Release.Tests/PackageReleasePreflightScriptTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageReleasePreflightScriptTests.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/PackageReleasePreflightScriptTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageReleasePreflightScriptTests.cs diff --git a/tests/FluxFlow.Release.Tests/PackageReleaseTagScriptTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageReleaseTagScriptTests.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/PackageReleaseTagScriptTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageReleaseTagScriptTests.cs diff --git a/tests/FluxFlow.Release.Tests/PerformanceHardeningConventionTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PerformanceHardeningConventionTests.cs similarity index 94% rename from tests/FluxFlow.Release.Tests/PerformanceHardeningConventionTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PerformanceHardeningConventionTests.cs index 7c86e6a7..ce683c3c 100644 --- a/tests/FluxFlow.Release.Tests/PerformanceHardeningConventionTests.cs +++ b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PerformanceHardeningConventionTests.cs @@ -100,8 +100,7 @@ public void Unconditional_route_skips_the_only_condition_context_allocation() var root = ReleaseTestPaths.FindRepositoryRoot(); var source = File.ReadAllText(Path.Combine( root, - "src", - "FluxFlow.Engine", + "src", "Engine", "Runtime", "FluxFlow.Engine", "Ports", "ApplicationOutputPort.cs")); const string guard = "if (!link.IsConditional)"; @@ -125,8 +124,7 @@ public void Diagnostic_attribute_publisher_uses_fixed_arity_builders_without_lin var root = ReleaseTestPaths.FindRepositoryRoot(); var source = File.ReadAllText(Path.Combine( root, - "src", - "FluxFlow.Engine", + "src", "Engine", "Runtime", "FluxFlow.Engine", "Ports", "ApplicationPortEventPublisher.cs")); @@ -135,9 +133,9 @@ public void Diagnostic_attribute_publisher_uses_fixed_arity_builders_without_lin source.ShouldNotContain(".ToDictionary("); CountOccurrences( source, - "private static Dictionary CreateAttributes(").ShouldBe(2); - source.ShouldContain("new Dictionary(2, StringComparer.Ordinal)"); - source.ShouldContain("new Dictionary(3, StringComparer.Ordinal)"); + "private static Dictionary CreateAttributes(").ShouldBe(2); + source.ShouldContain("new Dictionary(2, StringComparer.Ordinal)"); + source.ShouldContain("new Dictionary(3, StringComparer.Ordinal)"); CountOccurrences(source, "private static JsonElement CreateDetails(").ShouldBe(2); source.ShouldContain("AddAttribute(attributes, first);"); source.ShouldContain("AddAttribute(attributes, second);"); diff --git a/tests/FluxFlow.Release.Tests/PublicApiBaselineTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PublicApiBaselineTests.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/PublicApiBaselineTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PublicApiBaselineTests.cs diff --git a/tests/FluxFlow.Release.Tests/ReleaseOperatorNoteTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ReleaseOperatorNoteTests.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/ReleaseOperatorNoteTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ReleaseOperatorNoteTests.cs diff --git a/tests/FluxFlow.Release.Tests/ReleaseProcessCollection.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ReleaseProcessCollection.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/ReleaseProcessCollection.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ReleaseProcessCollection.cs diff --git a/tests/FluxFlow.Release.Tests/ReleaseScriptRunner.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ReleaseScriptRunner.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/ReleaseScriptRunner.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ReleaseScriptRunner.cs diff --git a/tests/FluxFlow.Release.Tests/ReleaseScriptTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ReleaseScriptTests.cs similarity index 97% rename from tests/FluxFlow.Release.Tests/ReleaseScriptTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ReleaseScriptTests.cs index 5d4cfe13..7b3862fb 100644 --- a/tests/FluxFlow.Release.Tests/ReleaseScriptTests.cs +++ b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ReleaseScriptTests.cs @@ -139,7 +139,8 @@ public async Task Get_release_notes_writes_current_package_section_only() File.Exists(outputPath).ShouldBeTrue(); var notes = File.ReadAllText(outputPath); - notes.ShouldContain("Moves `FlowContent`, `FlowContentJsonConverter`, and `FlowError`"); + notes.ShouldContain("Gives input shapes structural equality"); + notes.ShouldNotContain("Carries component-owned input shapes"); notes.ShouldNotContain("## "); } finally diff --git a/tests/FluxFlow.Release.Tests/ReleaseTestPaths.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ReleaseTestPaths.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/ReleaseTestPaths.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ReleaseTestPaths.cs diff --git a/tests/FluxFlow.Release.Tests/ReleaseTestProcess.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ReleaseTestProcess.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/ReleaseTestProcess.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ReleaseTestProcess.cs diff --git a/tests/FluxFlow.Release.Tests/ReleaseTestProcessTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ReleaseTestProcessTests.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/ReleaseTestProcessTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/ReleaseTestProcessTests.cs diff --git a/tests/FluxFlow.Release.Tests/SampleDocumentationTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/SampleDocumentationTests.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/SampleDocumentationTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/SampleDocumentationTests.cs diff --git a/tests/FluxFlow.Release.Tests/StandaloneCompositionBoundaryTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/StandaloneCompositionBoundaryTests.cs similarity index 100% rename from tests/FluxFlow.Release.Tests/StandaloneCompositionBoundaryTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/StandaloneCompositionBoundaryTests.cs diff --git a/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/TestLayoutConventionTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/TestLayoutConventionTests.cs new file mode 100644 index 00000000..c51d5c22 --- /dev/null +++ b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/TestLayoutConventionTests.cs @@ -0,0 +1,79 @@ +using Shouldly; +using Xunit; + +namespace FluxFlow.Release.Tests; + +public sealed class TestLayoutConventionTests +{ + [Fact] + public void Test_projects_follow_the_declared_four_kind_layout() + { + var repositoryRoot = FindRepositoryRoot(); + var testsRoot = Path.Combine(repositoryRoot, "tests"); + var expectedRoots = new[] { "Acceptance", "Integration", "Smoke", "Support", "Unit" }; + Directory.GetDirectories(testsRoot) + .Select(static path => Path.GetFileName(path)!) + .OrderBy(static name => name, StringComparer.Ordinal) + .ShouldBe(expectedRoots); + + var projects = Directory.GetFiles(testsRoot, "*.csproj", SearchOption.AllDirectories); + projects.ShouldNotBeEmpty(); + foreach (var project in projects) + { + var relativePath = Path.GetRelativePath(testsRoot, project); + var segments = relativePath.Split(Path.DirectorySeparatorChar); + segments.Length.ShouldBeGreaterThanOrEqualTo(3, relativePath); + var projectName = Path.GetFileNameWithoutExtension(project); + projectName.ShouldBe(Path.GetFileName(Path.GetDirectoryName(project)), relativePath); + + switch (segments[0]) + { + case "Unit": + projectName.EndsWith(".Tests", StringComparison.Ordinal).ShouldBeTrue(relativePath); + break; + case "Integration": + projectName.EndsWith("IntegrationTests", StringComparison.Ordinal).ShouldBeTrue(relativePath); + break; + case "Acceptance": + projectName.EndsWith(".Acceptance.Tests", StringComparison.Ordinal).ShouldBeTrue(relativePath); + break; + case "Smoke": + projectName.EndsWith("SmokeTests", StringComparison.Ordinal).ShouldBeTrue(relativePath); + break; + case "Support": + projectName.ShouldBe("FluxFlow.Testing", relativePath); + break; + default: + throw new ShouldAssertException($"Unexpected test root in {relativePath}."); + } + } + } + + [Fact] + public void Solution_contains_every_test_project_at_its_physical_path() + { + var repositoryRoot = FindRepositoryRoot(); + var testsRoot = Path.Combine(repositoryRoot, "tests"); + var solution = File.ReadAllText(Path.Combine(repositoryRoot, "FluxFlow.sln")); + + foreach (var project in Directory.GetFiles(testsRoot, "*.csproj", SearchOption.AllDirectories)) + { + var relativePath = Path.GetRelativePath(repositoryRoot, project) + .Replace(Path.DirectorySeparatorChar, '\\'); + solution.ShouldContain($"\"{relativePath}\""); + } + } + + private static string FindRepositoryRoot() + { + for (var directory = new DirectoryInfo(AppContext.BaseDirectory); + directory is not null; + directory = directory.Parent) + { + if (File.Exists(Path.Combine(directory.FullName, "FluxFlow.sln"))) + return directory.FullName; + } + + throw new DirectoryNotFoundException("Could not locate the repository root."); + } +} diff --git a/tests/FluxFlow.Release.Tests/TypedComponentAuthoringConventionTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/TypedComponentAuthoringConventionTests.cs similarity index 71% rename from tests/FluxFlow.Release.Tests/TypedComponentAuthoringConventionTests.cs rename to tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/TypedComponentAuthoringConventionTests.cs index 79c80fa2..5a2fd06b 100644 --- a/tests/FluxFlow.Release.Tests/TypedComponentAuthoringConventionTests.cs +++ b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/TypedComponentAuthoringConventionTests.cs @@ -8,48 +8,48 @@ public sealed class TypedComponentAuthoringConventionTests { private static readonly string[] FamilyRegistrationSources = [ - "src/FluxFlow.Components.Assertions.Composition/AssertionsServiceCollectionExtensions.cs", - "src/FluxFlow.Components.Expectations.Composition/ExpectationsServiceCollectionExtensions.cs", - "src/FluxFlow.Components.FileSystem.Composition/FileSystemServiceCollectionExtensions.cs", - "src/FluxFlow.Components.Http.Composition/HttpServiceCollectionExtensions.cs", - "src/FluxFlow.Components.Mapping.Composition/MappingServiceCollectionExtensions.cs", - "src/FluxFlow.Components.Metrics.Composition/MetricsServiceCollectionExtensions.cs", - "src/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttServiceCollectionExtensions.cs", - "src/FluxFlow.Components.Observability.Composition/ObservabilityServiceCollectionExtensions.cs", - "src/FluxFlow.Components.Payloads.Composition/PayloadsServiceCollectionExtensions.cs", - "src/FluxFlow.Components.Projections.Composition/ProjectionsServiceCollectionExtensions.cs", - "src/FluxFlow.Components.Resilience.Composition/ResilienceServiceCollectionExtensions.cs", - "src/FluxFlow.Components.Routing.Composition/RoutingServiceCollectionExtensions.cs", - "src/FluxFlow.Components.Serialization.Composition/SerializationServiceCollectionExtensions.cs", - "src/FluxFlow.Components.Sessions.Composition/SessionsServiceCollectionExtensions.cs", - "src/FluxFlow.Components.Sources.Composition/SourcesServiceCollectionExtensions.cs", - "src/FluxFlow.Components.State.Composition/StateServiceCollectionExtensions.cs", - "src/FluxFlow.Components.Storage.Composition/StorageServiceCollectionExtensions.cs", - "src/FluxFlow.Components.Timers.Composition/TimersServiceCollectionExtensions.cs", - "src/FluxFlow.Components.Validation.Composition/ValidationServiceCollectionExtensions.cs" + "src/Components/Assertions/FluxFlow.Components.Assertions.Composition/AssertionsServiceCollectionExtensions.cs", + "src/Components/Expectations/FluxFlow.Components.Expectations.Composition/ExpectationsServiceCollectionExtensions.cs", + "src/Components/FileSystem/FluxFlow.Components.FileSystem.Composition/FileSystemServiceCollectionExtensions.cs", + "src/Components/Http/FluxFlow.Components.Http.Composition/HttpServiceCollectionExtensions.cs", + "src/Components/Mapping/FluxFlow.Components.Mapping.Composition/MappingServiceCollectionExtensions.cs", + "src/Components/Metrics/FluxFlow.Components.Metrics.Composition/MetricsServiceCollectionExtensions.cs", + "src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/MqttServiceCollectionExtensions.cs", + "src/Components/Observability/FluxFlow.Components.Observability.Composition/ObservabilityServiceCollectionExtensions.cs", + "src/Components/Payloads/FluxFlow.Components.Payloads.Composition/PayloadsServiceCollectionExtensions.cs", + "src/Components/Projections/FluxFlow.Components.Projections.Composition/ProjectionsServiceCollectionExtensions.cs", + "src/Components/Resilience/FluxFlow.Components.Resilience.Composition/ResilienceServiceCollectionExtensions.cs", + "src/Components/Routing/FluxFlow.Components.Routing.Composition/RoutingServiceCollectionExtensions.cs", + "src/Components/Serialization/FluxFlow.Components.Serialization.Composition/SerializationServiceCollectionExtensions.cs", + "src/Components/Sessions/FluxFlow.Components.Sessions.Composition/SessionsServiceCollectionExtensions.cs", + "src/Components/Sources/FluxFlow.Components.Sources.Composition/SourcesServiceCollectionExtensions.cs", + "src/Components/State/FluxFlow.Components.State.Composition/StateServiceCollectionExtensions.cs", + "src/Components/Storage/FluxFlow.Components.Storage.Composition/StorageServiceCollectionExtensions.cs", + "src/Components/Timers/FluxFlow.Components.Timers.Composition/TimersServiceCollectionExtensions.cs", + "src/Components/Validation/FluxFlow.Components.Validation.Composition/ValidationServiceCollectionExtensions.cs" ]; private static readonly string[] FamilyAuthoringSources = [ - "src/FluxFlow.Components.Assertions.Composition/AssertionsAuthoringExtensions.cs", - "src/FluxFlow.Components.Expectations.Composition/ExpectationsAuthoringExtensions.cs", - "src/FluxFlow.Components.FileSystem.Composition/FileSystemAuthoringExtensions.cs", - "src/FluxFlow.Components.Http.Composition/HttpAuthoringExtensions.cs", - "src/FluxFlow.Components.Mapping.Composition/MappingAuthoringExtensions.cs", - "src/FluxFlow.Components.Metrics.Composition/MetricsAuthoringExtensions.cs", - "src/Mqtt/FluxFlow.Components.Mqtt.Composition/Authoring/MqttApplicationAuthoringExtensions.cs", - "src/FluxFlow.Components.Observability.Composition/ObservabilityAuthoringExtensions.cs", - "src/FluxFlow.Components.Payloads.Composition/PayloadsAuthoringExtensions.cs", - "src/FluxFlow.Components.Projections.Composition/ProjectionsAuthoringExtensions.cs", - "src/FluxFlow.Components.Resilience.Composition/ResilienceAuthoringExtensions.cs", - "src/FluxFlow.Components.Routing.Composition/RoutingAuthoringExtensions.cs", - "src/FluxFlow.Components.Serialization.Composition/SerializationAuthoringExtensions.cs", - "src/FluxFlow.Components.Sessions.Composition/SessionsAuthoringExtensions.cs", - "src/FluxFlow.Components.Sources.Composition/SourcesAuthoringExtensions.cs", - "src/FluxFlow.Components.State.Composition/StateAuthoringExtensions.cs", - "src/FluxFlow.Components.Storage.Composition/StorageAuthoringExtensions.cs", - "src/FluxFlow.Components.Timers.Composition/TimersAuthoringExtensions.cs", - "src/FluxFlow.Components.Validation.Composition/ValidationAuthoringExtensions.cs" + "src/Components/Assertions/FluxFlow.Components.Assertions.Composition/AssertionsAuthoringExtensions.cs", + "src/Components/Expectations/FluxFlow.Components.Expectations.Composition/ExpectationsAuthoringExtensions.cs", + "src/Components/FileSystem/FluxFlow.Components.FileSystem.Composition/FileSystemAuthoringExtensions.cs", + "src/Components/Http/FluxFlow.Components.Http.Composition/HttpAuthoringExtensions.cs", + "src/Components/Mapping/FluxFlow.Components.Mapping.Composition/MappingAuthoringExtensions.cs", + "src/Components/Metrics/FluxFlow.Components.Metrics.Composition/MetricsAuthoringExtensions.cs", + "src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/Authoring/MqttApplicationAuthoringExtensions.cs", + "src/Components/Observability/FluxFlow.Components.Observability.Composition/ObservabilityAuthoringExtensions.cs", + "src/Components/Payloads/FluxFlow.Components.Payloads.Composition/PayloadsAuthoringExtensions.cs", + "src/Components/Projections/FluxFlow.Components.Projections.Composition/ProjectionsAuthoringExtensions.cs", + "src/Components/Resilience/FluxFlow.Components.Resilience.Composition/ResilienceAuthoringExtensions.cs", + "src/Components/Routing/FluxFlow.Components.Routing.Composition/RoutingAuthoringExtensions.cs", + "src/Components/Serialization/FluxFlow.Components.Serialization.Composition/SerializationAuthoringExtensions.cs", + "src/Components/Sessions/FluxFlow.Components.Sessions.Composition/SessionsAuthoringExtensions.cs", + "src/Components/Sources/FluxFlow.Components.Sources.Composition/SourcesAuthoringExtensions.cs", + "src/Components/State/FluxFlow.Components.State.Composition/StateAuthoringExtensions.cs", + "src/Components/Storage/FluxFlow.Components.Storage.Composition/StorageAuthoringExtensions.cs", + "src/Components/Timers/FluxFlow.Components.Timers.Composition/TimersAuthoringExtensions.cs", + "src/Components/Validation/FluxFlow.Components.Validation.Composition/ValidationAuthoringExtensions.cs" ]; private static readonly AuthoringScope[] SampleAndAcceptanceScopes = @@ -166,7 +166,7 @@ public void Mqtt_declares_four_executable_resource_contracts_and_only_configurat var root = ReleaseTestPaths.FindRepositoryRoot(); var authoring = ReadSource( root, - "src/Mqtt/FluxFlow.Components.Mqtt.Composition/Authoring/MqttApplicationAuthoringExtensions.cs"); + "src/Components/Mqtt/FluxFlow.Components.Mqtt.Composition/Authoring/MqttApplicationAuthoringExtensions.cs"); var sample = ReadSource( root, "samples/FluxFlow.MqttCompositionSample/Program.cs"); @@ -204,9 +204,9 @@ public void Code_first_resource_execution_uses_definition_owned_contracts_withou Environment.NewLine, new[] { - "src/FluxFlow.Composition/Authoring/ApplicationResourceContract.cs", - "src/FluxFlow.Composition/Authoring/ApplicationDefinitionBuilder.cs", - "src/FluxFlow.Engine/Hosting/ApplicationRuntimeResourceSnapshotFactory.cs" + "src/Core/Application/FluxFlow.Composition/Authoring/ApplicationResourceContract.cs", + "src/Core/Application/FluxFlow.Composition/Authoring/ApplicationDefinitionBuilder.cs", + "src/Engine/Runtime/FluxFlow.Engine/Hosting/ApplicationRuntimeResourceSnapshotFactory.cs" }.Select(path => ReadSource(root, path))); source.ShouldContain("ApplicationResourceContracts", Case.Sensitive); @@ -227,8 +227,8 @@ public void Fluent_sources_compile_to_the_canonical_definition_and_application_w Environment.NewLine, new[] { - "src/FluxFlow.Fluent/FlowGraph.cs", - "src/FluxFlow.Fluent/FlowGraphBuilder.cs" + "src/Authoring/FluxFlow.Fluent/FlowGraph.cs", + "src/Authoring/FluxFlow.Fluent/FlowGraphBuilder.cs" }.Select(path => ReadSource(root, path))); source.ShouldContain("ApplicationDefinitionBuilder _application = new()", Case.Sensitive); diff --git a/tests/Unit/Samples/FluxFlow.ComponentPackageTemplate.Tests/FluxFlow.ComponentPackageTemplate.Tests.csproj b/tests/Unit/Samples/FluxFlow.ComponentPackageTemplate.Tests/FluxFlow.ComponentPackageTemplate.Tests.csproj new file mode 100644 index 00000000..b4a9b550 --- /dev/null +++ b/tests/Unit/Samples/FluxFlow.ComponentPackageTemplate.Tests/FluxFlow.ComponentPackageTemplate.Tests.csproj @@ -0,0 +1,23 @@ + + + + net10.0 + false + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + diff --git a/tests/FluxFlow.ComponentPackageTemplate.Tests/ManualTimeProvider.cs b/tests/Unit/Samples/FluxFlow.ComponentPackageTemplate.Tests/ManualTimeProvider.cs similarity index 100% rename from tests/FluxFlow.ComponentPackageTemplate.Tests/ManualTimeProvider.cs rename to tests/Unit/Samples/FluxFlow.ComponentPackageTemplate.Tests/ManualTimeProvider.cs diff --git a/tests/FluxFlow.ComponentPackageTemplate.Tests/TemplateEnrichNodeTests.cs b/tests/Unit/Samples/FluxFlow.ComponentPackageTemplate.Tests/TemplateEnrichNodeTests.cs similarity index 95% rename from tests/FluxFlow.ComponentPackageTemplate.Tests/TemplateEnrichNodeTests.cs rename to tests/Unit/Samples/FluxFlow.ComponentPackageTemplate.Tests/TemplateEnrichNodeTests.cs index 0b8bd493..46b729f0 100644 --- a/tests/FluxFlow.ComponentPackageTemplate.Tests/TemplateEnrichNodeTests.cs +++ b/tests/Unit/Samples/FluxFlow.ComponentPackageTemplate.Tests/TemplateEnrichNodeTests.cs @@ -66,9 +66,9 @@ public async Task EmitsSucceededDiagnostic() await node.Input.SendAsync(message); var diagnostic = await events.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); - diagnostic.Name.ShouldBe(TemplateEnrichNode.Succeeded); + diagnostic.ToFlowEvent().Name.ShouldBe(TemplateEnrichNode.Succeeded); diagnostic.CorrelationId.ShouldBe(message.CorrelationId); - diagnostic.Attributes["id"].ShouldBe("A-100"); + diagnostic.ToFlowEvent().Attributes["id"].ShouldBe("A-100"); } [Fact] diff --git a/tests/FluxFlow.DesignerHost.Tests/DesignerHostCatalogTests.cs b/tests/Unit/Samples/FluxFlow.DesignerHost.Tests/DesignerHostCatalogTests.cs similarity index 87% rename from tests/FluxFlow.DesignerHost.Tests/DesignerHostCatalogTests.cs rename to tests/Unit/Samples/FluxFlow.DesignerHost.Tests/DesignerHostCatalogTests.cs index 20d59666..b7848fbd 100644 --- a/tests/FluxFlow.DesignerHost.Tests/DesignerHostCatalogTests.cs +++ b/tests/Unit/Samples/FluxFlow.DesignerHost.Tests/DesignerHostCatalogTests.cs @@ -1,7 +1,9 @@ +using System.Text.Json; using FluxFlow.Components.Designer; using FluxFlow.Components.Designer.Contracts; using FluxFlow.Components.Timers.Composition; using FluxFlow.Composition; +using FluxFlow.Data; using FluxFlow.Testing; using Shouldly; using Xunit; @@ -345,6 +347,53 @@ public void Timers_provider_projects_palette_inspector_and_clock_prompt() clockPrompt.PickerKind.ShouldBe(ResourceDesignMetadataAttributeValues.Clock); } + [Fact] + public void Palette_input_shape_survives_host_json_round_trip_and_undescribed_ports_remain_null() + { + var catalog = CreateHostCatalog(new ComponentDesignMetadata + { + Type = new ComponentType("sample.request"), + Ports = + [ + new PortDesignMetadata + { + Name = new ComponentPortName("Input"), + Direction = PortDirection.Input, + MessageType = typeof(FlowValue), + InputShape = new FlowValueShape("Request or empty", [JsonValueKind.Object, JsonValueKind.Null], ["target"]) + }, + new PortDesignMetadata + { + Name = new ComponentPortName("Other"), + Direction = PortDirection.Input, + Order = 1 + }, + new PortDesignMetadata + { + Name = new ComponentPortName("Output"), + Direction = PortDirection.Output + } + ] + }); + var item = catalog.CreatePaletteItems().ShouldHaveSingleItem(); + var input = item.Inputs.Single(port => port.Name == "Input"); + + var shape = input.InputShape.ShouldNotBeNull(); + shape.Description.ShouldBe("Request or empty"); + shape.AcceptedKinds.ShouldBe(["Object", "Null"]); + shape.RequiredProperties.ShouldBe(["target"]); + item.Inputs.Single(port => port.Name == "Other").InputShape.ShouldBeNull(); + item.Outputs.ShouldHaveSingleItem().InputShape.ShouldBeNull(); + + var restored = JsonSerializer.Deserialize(JsonSerializer.Serialize(input)).ShouldNotBeNull(); + restored.Name.ShouldBe("Input"); + restored.Kind.ShouldBe(PortKind.Input); + var restoredShape = restored.InputShape.ShouldNotBeNull(); + restoredShape.Description.ShouldBe(shape.Description); + restoredShape.AcceptedKinds.ShouldBe(shape.AcceptedKinds); + restoredShape.RequiredProperties.ShouldBe(shape.RequiredProperties); + } + private static DesignerHostCatalog CreateHostCatalog(params ComponentDesignMetadata[] metadata) => new(new ComponentDesignMetadataCatalog(metadata)); diff --git a/tests/FluxFlow.DesignerHost.Tests/FluxFlow.DesignerHost.Tests.csproj b/tests/Unit/Samples/FluxFlow.DesignerHost.Tests/FluxFlow.DesignerHost.Tests.csproj similarity index 62% rename from tests/FluxFlow.DesignerHost.Tests/FluxFlow.DesignerHost.Tests.csproj rename to tests/Unit/Samples/FluxFlow.DesignerHost.Tests/FluxFlow.DesignerHost.Tests.csproj index 98cb7218..1feb128b 100644 --- a/tests/FluxFlow.DesignerHost.Tests/FluxFlow.DesignerHost.Tests.csproj +++ b/tests/Unit/Samples/FluxFlow.DesignerHost.Tests/FluxFlow.DesignerHost.Tests.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,9 +6,9 @@ - - - + + + diff --git a/tests/FluxFlow.DesignerHost.Tests/ValidationMessageMapperTests.cs b/tests/Unit/Samples/FluxFlow.DesignerHost.Tests/ValidationMessageMapperTests.cs similarity index 100% rename from tests/FluxFlow.DesignerHost.Tests/ValidationMessageMapperTests.cs rename to tests/Unit/Samples/FluxFlow.DesignerHost.Tests/ValidationMessageMapperTests.cs diff --git a/tests/FluxFlow.Components.Http.Tests/FluxFlow.Components.Http.Tests.csproj b/tests/Unit/Samples/FluxFlow.ReportingSample.Tests/FluxFlow.ReportingSample.Tests.csproj similarity index 72% rename from tests/FluxFlow.Components.Http.Tests/FluxFlow.Components.Http.Tests.csproj rename to tests/Unit/Samples/FluxFlow.ReportingSample.Tests/FluxFlow.ReportingSample.Tests.csproj index 803f5ec0..becf5e9a 100644 --- a/tests/FluxFlow.Components.Http.Tests/FluxFlow.Components.Http.Tests.csproj +++ b/tests/Unit/Samples/FluxFlow.ReportingSample.Tests/FluxFlow.ReportingSample.Tests.csproj @@ -1,16 +1,10 @@ - net10.0 false - - - - - - + @@ -19,5 +13,4 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - diff --git a/tests/Unit/Samples/FluxFlow.ReportingSample.Tests/ReportArchiveTests.cs b/tests/Unit/Samples/FluxFlow.ReportingSample.Tests/ReportArchiveTests.cs new file mode 100644 index 00000000..88d33ed1 --- /dev/null +++ b/tests/Unit/Samples/FluxFlow.ReportingSample.Tests/ReportArchiveTests.cs @@ -0,0 +1,513 @@ +using System.Globalization; +using System.Text.Json; +using FluxFlow.Nodes; +using Shouldly; +using Xunit; + +namespace FluxFlow.ReportingSample.Tests; + +[Trait("Category", "Integration")] +public sealed class ReportArchiveTests : IDisposable +{ + private static readonly DateTimeOffset EventTime = new(2026, 9, 4, 10, 0, 0, TimeSpan.Zero); + private readonly string _directory = Directory.CreateTempSubdirectory("report-archive-tests-").FullName; + private readonly Guid _streamId = Guid.NewGuid(); + + [Fact] + public async Task Reopened_archive_preserves_aggregation_and_idempotent_replay() + { + var archive = new ReportArchive(_directory); + var first = Event(1, "order.accepted"); + (await archive.AppendAsync(first)).ShouldBeTrue(); + await archive.AppendAsync(Event(2, "order.failed")); + await archive.AppendAsync(Event(3, "order.accepted")); + var capture = Capture(0, 3); + await archive.SaveCaptureAsync(capture); + + var reopened = new ReportArchive(_directory); + (await reopened.AppendAsync(first)).ShouldBeFalse(); + var report = await reopened.QueryAsync(capture.Id, new(), "all.v1"); + + report.Count.ShouldBe(3); + report.CountsByEventType.Keys.ShouldBe(["order.accepted", "order.failed"]); + report.CountsByEventType["order.accepted"].ShouldBe(2); + report.CountsByEventType["order.failed"].ShouldBe(1); + report.Completeness.ShouldBe("CompleteWithinReportingBoundary"); + report.AggregationVersion.ShouldBe("event-count.v1"); + report.Capture.Start.Sequence.ShouldBe(0); + report.Capture.End.Sequence.ShouldBe(3); + Directory.GetFiles(_directory, "*.pending", SearchOption.AllDirectories).ShouldBeEmpty(); + } + + [Fact] + public async Task Conflicting_duplicate_does_not_replace_original() + { + var archive = new ReportArchive(_directory); + await archive.AppendAsync(Event(1, "original")); + await Should.ThrowAsync(() => archive.AppendAsync(Event(1, "replacement"))); + var capture = Capture(0, 1); + await archive.SaveCaptureAsync(capture); + + var report = await archive.QueryAsync(capture.Id, new(), "all.v1"); + + report.Count.ShouldBe(1); + report.CountsByEventType.Keys.ShouldBe(["original"]); + report.CountsByEventType.ContainsKey("replacement").ShouldBeFalse(); + } + + [Fact] + public async Task Missing_records_are_incomplete_even_when_filter_matches_nothing() + { + var archive = new ReportArchive(_directory); + await archive.AppendAsync(Event(1)); + await archive.AppendAsync(Event(3)); + var capture = Capture(0, 3); + await archive.SaveCaptureAsync(capture); + + var report = await archive.QueryAsync(capture.Id, TypeFilter("absent"), "absent.v1"); + + report.Count.ShouldBe(0); + report.CountsByEventType.ShouldBeEmpty(); + report.Completeness.ShouldBe("Incomplete"); + } + + [Theory] + [InlineData(1, 0)] + [InlineData(0, 1)] + [InlineData(2, 3)] + public async Task Loss_metadata_marks_fully_persisted_capture_incomplete(long dropped, long rejected) + { + var archive = new ReportArchive(_directory); + await archive.AppendAsync(Event(1)); + var capture = Capture(0, 1) with { Dropped = dropped, RejectedEvents = rejected }; + await archive.SaveCaptureAsync(capture); + + var report = await archive.QueryAsync(capture.Id, new(), "all.v1"); + + report.Count.ShouldBe(1); + report.Completeness.ShouldBe("Incomplete"); + report.Capture.Dropped.ShouldBe(dropped); + report.Capture.RejectedEvents.ShouldBe(rejected); + } + + [Fact] + public async Task Frozen_capture_excludes_start_and_future_sequences_including_late_event_time() + { + var archive = new ReportArchive(_directory); + await archive.AppendAsync(Event(1, "before")); + await archive.AppendAsync(Event(2, "inside")); + var capture = Capture(1, 2); + await archive.SaveCaptureAsync(capture); + var before = await archive.QueryAsync(capture.Id, new(), "all.v1"); + + await archive.AppendAsync(Event(3, "late", EventTime.AddDays(-1))); + var after = await archive.QueryAsync(capture.Id, new(), "all.v1"); + + before.Count.ShouldBe(1); + after.Count.ShouldBe(1); + after.CountsByEventType.Keys.ShouldBe(["inside"]); + after.Completeness.ShouldBe("CompleteWithinReportingBoundary"); + after.Capture.End.Sequence.ShouldBe(2); + } + + [Fact] + public async Task Serialized_filter_reuses_utc_half_open_bounds_for_live_and_historical_records() + { + var archive = new ReportArchive(_directory); + var records = new[] + { + Event(1, "order.accepted", EventTime.AddTicks(-1)), + Event(2, "order.accepted", EventTime), + Event(3, "order.failed", EventTime.AddMinutes(30)), + Event(4, "order.accepted", EventTime.AddHours(1).AddTicks(-1)), + Event(5, "order.accepted", EventTime.AddHours(1)) + }; + foreach (var record in records) await archive.AppendAsync(record); + var capture = Capture(0, 5); + await archive.SaveCaptureAsync(capture); + var definition = TypeFilter("order.accepted") with + { + FromInclusive = EventTime.ToOffset(TimeSpan.FromHours(2)), + ToExclusive = EventTime.AddHours(1).ToOffset(TimeSpan.FromHours(-4)) + }; + var portable = JsonSerializer.Deserialize(JsonSerializer.Serialize(definition))!; + + var live = portable.Compile(); + records.Where(live.IsMatch).Select(record => record.Cursor.Sequence).ShouldBe([2L, 4L]); + var report = await archive.QueryAsync(capture.Id, portable, "orders.v2"); + var storedFilter = JsonSerializer.Deserialize(report.FilterJson)!.Compile(); + + report.Count.ShouldBe(2); + report.CountsByEventType.Keys.ShouldBe(["order.accepted"]); + report.CountsByEventType["order.accepted"].ShouldBe(2); + report.FilterVersion.ShouldBe("orders.v2"); + report.Completeness.ShouldBe("CompleteWithinReportingBoundary"); + records.Where(storedFilter.IsMatch).Select(record => record.Cursor.Sequence).ShouldBe([2L, 4L]); + } + + [Theory] + [InlineData("empty-id")] + [InlineData("empty-stream")] + [InlineData("different-stream")] + [InlineData("negative-start")] + [InlineData("reversed-range")] + [InlineData("negative-dropped")] + [InlineData("negative-rejected")] + public async Task Invalid_capture_is_rejected_without_persisting_metadata(string invalidPart) + { + var archive = new ReportArchive(_directory); + var capture = Capture(1, 2); + capture = invalidPart switch + { + "empty-id" => capture with { Id = Guid.Empty }, + "empty-stream" => capture with { Start = new(Guid.Empty, 1), End = new(Guid.Empty, 2) }, + "different-stream" => capture with { End = new(Guid.NewGuid(), 2) }, + "negative-start" => capture with { Start = new(_streamId, -1) }, + "reversed-range" => capture with { End = new(_streamId, 0) }, + "negative-dropped" => capture with { Dropped = -1 }, + "negative-rejected" => capture with { RejectedEvents = -1 }, + _ => throw new ArgumentOutOfRangeException(nameof(invalidPart)) + }; + + await Should.ThrowAsync(() => archive.SaveCaptureAsync(capture)); + + Directory.GetFiles(_directory, "*", SearchOption.AllDirectories).ShouldBeEmpty(); + } + + [Fact] + public async Task Cancelled_writes_leave_no_records_or_pending_files() + { + var archive = new ReportArchive(_directory); + using var cancellation = new CancellationTokenSource(); + cancellation.Cancel(); + + await Should.ThrowAsync(() => archive.AppendAsync(Event(1), cancellation.Token)); + await Should.ThrowAsync(() => archive.SaveCaptureAsync(Capture(0, 1), cancellation.Token)); + + Directory.GetFiles(_directory, "*", SearchOption.AllDirectories).ShouldBeEmpty(); + } + + [Fact] + public async Task Oversized_records_are_rejected_before_persistence() + { + var archive = new ReportArchive(_directory); + var record = Event(1) with { Message = new FlowEvent { Name = "large", Message = new string('x', 1024 * 1024) }.ToMessage() }; + + await Should.ThrowAsync(() => archive.AppendAsync(record)); + + Directory.GetFiles(_directory, "*", SearchOption.AllDirectories).ShouldBeEmpty(); + } + + [Fact] + public async Task Oversized_archive_file_is_rejected_on_read() + { + var archive = new ReportArchive(_directory); + await archive.AppendAsync(Event(1)); + var capture = Capture(0, 1); + await archive.SaveCaptureAsync(capture); + await File.WriteAllTextAsync(RecordPath(1), new string(' ', 1024 * 1024 + 1)); + + var exception = await Should.ThrowAsync(() => archive.QueryAsync(capture.Id, new(), "all.v1")); + + exception.Message.ShouldContain("size limit"); + } + + [Fact] + public async Task Group_limit_allows_256_types_and_rejects_the_next() + { + var archive = new ReportArchive(_directory); + for (var sequence = 1; sequence <= 257; sequence++) + await archive.AppendAsync(Event(sequence, $"type.{sequence:D3}")); + var allowed = Capture(0, 256); + var exceeded = Capture(0, 257); + await archive.SaveCaptureAsync(allowed); + await archive.SaveCaptureAsync(exceeded); + + var report = await archive.QueryAsync(allowed.Id, new(), "all.v1"); + report.Count.ShouldBe(256); + report.CountsByEventType.Count.ShouldBe(256); + report.CountsByEventType["type.256"].ShouldBe(1); + await Should.ThrowAsync(() => archive.QueryAsync(exceeded.Id, new(), "all.v1")); + var narrowed = await archive.QueryAsync(exceeded.Id, TypeFilter("type.257"), "one.v1"); + narrowed.Count.ShouldBe(1); + narrowed.CountsByEventType.Keys.ShouldBe(["type.257"]); + narrowed.Completeness.ShouldBe("CompleteWithinReportingBoundary"); + } + + [Theory] + [InlineData(true)] + [InlineData(false)] + public async Task Archived_cursor_must_match_its_location(bool changeStream) + { + var archive = new ReportArchive(_directory); + var record = Event(1); + await archive.AppendAsync(record); + var capture = Capture(0, 1); + await archive.SaveCaptureAsync(capture); + var changed = record with { Cursor = changeStream ? new(Guid.NewGuid(), 1) : new(_streamId, 2) }; + await File.WriteAllTextAsync(RecordPath(1), JsonSerializer.Serialize(changed)); + + var exception = await Should.ThrowAsync(() => archive.QueryAsync(capture.Id, new(), "all.v1")); + + exception.Message.ShouldContain("identity"); + } + + [Fact] + public async Task Existing_capture_cannot_be_overwritten() + { + var archive = new ReportArchive(_directory); + var capture = Capture(0, 2); + await archive.SaveCaptureAsync(capture); + + await Should.ThrowAsync(() => archive.SaveCaptureAsync(capture with { End = new(_streamId, 10) })); + + (await archive.ReadCaptureAsync(capture.Id)).End.Sequence.ShouldBe(2); + Directory.GetFiles(_directory, "*.pending", SearchOption.AllDirectories).ShouldBeEmpty(); + } + + [Fact] + public async Task Concurrent_identical_appends_commit_exactly_once() + { + var archive = new ReportArchive(_directory); + var record = Event(1); + + var results = await Task.WhenAll(Enumerable.Range(0, 8).Select(_ => archive.AppendAsync(record))); + + results.Count(committed => committed).ShouldBe(1); + Directory.GetFiles(_directory, "*.json", SearchOption.AllDirectories).Length.ShouldBe(1); + Directory.GetFiles(_directory, "*.pending", SearchOption.AllDirectories).ShouldBeEmpty(); + } + + [Theory] + [InlineData(true, 1)] + [InlineData(false, 0)] + [InlineData(false, -1)] + public async Task Invalid_event_cursor_is_rejected_without_writing(bool emptyStream, long sequence) + { + var archive = new ReportArchive(_directory); + var record = Event(1) with { Cursor = new(emptyStream ? Guid.Empty : _streamId, sequence) }; + + await Should.ThrowAsync(() => archive.AppendAsync(record)); + + Directory.GetFiles(_directory, "*", SearchOption.AllDirectories).ShouldBeEmpty(); + } + + [Theory] + [InlineData(0, "CompleteWithinReportingBoundary")] + [InlineData(1, "Incomplete")] + public async Task Capture_without_a_stream_directory_reports_continuity_explicitly(long end, string completeness) + { + var archive = new ReportArchive(_directory); + var capture = Capture(0, end); + await archive.SaveCaptureAsync(capture); + + var report = await archive.QueryAsync(capture.Id, new(), "all.v1"); + + report.Count.ShouldBe(0); + report.CountsByEventType.ShouldBeEmpty(); + report.Completeness.ShouldBe(completeness); + } + + [Fact] + public async Task Capture_identity_must_match_its_requested_file() + { + var archive = new ReportArchive(_directory); + var capture = Capture(0, 1); + await archive.SaveCaptureAsync(capture); + var path = Path.Combine(_directory, capture.Id.ToString("N") + ".capture.json"); + await File.WriteAllTextAsync(path, JsonSerializer.Serialize(capture with { Id = Guid.NewGuid() })); + + var exception = await Should.ThrowAsync(() => archive.ReadCaptureAsync(capture.Id)); + + exception.Message.ShouldContain("identity"); + } + + [Fact] + public async Task Cancelled_query_does_not_return_a_partial_report() + { + var archive = new ReportArchive(_directory); + await archive.AppendAsync(Event(1)); + var capture = Capture(0, 1); + await archive.SaveCaptureAsync(capture); + using var cancellation = new CancellationTokenSource(); + cancellation.Cancel(); + + await Should.ThrowAsync(() => archive.QueryAsync(capture.Id, new(), "all.v1", cancellation.Token)); + + (await archive.QueryAsync(capture.Id, new(), "all.v1")).Count.ShouldBe(1); + } + + [Theory] + [InlineData(4, "CompleteWithinReportingBoundary")] + [InlineData(5, "Incomplete")] + public async Task Consumer_report_combines_custom_selection_with_portable_filter_and_preserves_capture_completeness( + long captureEnd, string completeness) + { + var archive = new ReportArchive(_directory); + var records = new[] + { + Measurement(1, "warehouse.fulfilled", 8, 3) with { Application = "north" }, + Measurement(2, "warehouse.fulfilled", 8, 3) with { Application = "south" }, + Measurement(3, "warehouse.fulfilled", 2, 3) with { Application = "north" }, + Measurement(4, "warehouse.received", 20, 3) with { Application = "north" } + }; + foreach (var record in records) await archive.AppendAsync(record); + var capture = Capture(0, captureEnd); + await archive.SaveCaptureAsync(capture); + var filter = new ApplicationReportFilter + { + Conditions = [new() { Path = "@application", Value = JsonSerializer.SerializeToElement("north") }] + }; + + var report = await archive.QueryAsync(capture.Id, new FulfilmentReport(), filter, "north.v2"); + var unscoped = await archive.QueryAsync(capture.Id, filter, "north.v2"); + + report.Count.ShouldBe(1); + report.CountsByEventType.Keys.ShouldBe(["warehouse.fulfilled"]); + report.CountsByEventType["warehouse.fulfilled"].ShouldBe(1); + unscoped.Count.ShouldBe(3); + report.ReportType.ShouldBe("warehouse.fulfilled"); + report.ReportCategory.ShouldBe("fulfilment"); + report.ReportVersion.ShouldBe(3); + report.FilterVersion.ShouldBe("north.v2"); + report.Capture.End.Sequence.ShouldBe(captureEnd); + report.Completeness.ShouldBe(completeness); + unscoped.Completeness.ShouldBe(completeness); + } + + [Fact] + public async Task Quantity_report_live_selection_and_static_generation_use_the_same_schema_and_filter() + { + var archive = new ReportArchive(_directory); + var quantity = new QuantityReport(archive); + var records = new[] + { + Measurement(1, "sample.measurement", 10), + Measurement(2, "sample.measurement", 2), + Measurement(3, "sample.measurement", 30, 2), + Measurement(4, "other.measurement", 40) + }; + foreach (var record in records) await archive.AppendAsync(record); + var capture = Capture(0, 4); + await archive.SaveCaptureAsync(capture); + var filter = new ApplicationReportFilter + { + Conditions = [new() + { + Path = "/measurements/value", Comparison = ApplicationReportComparison.GreaterThanOrEqual, + Value = JsonSerializer.SerializeToElement(10) + }] + }; + var compiled = filter.Compile(); + + records.Where(quantity.Includes).Select(record => record.Cursor.Sequence).ShouldBe([1L, 2L]); + records.Where(record => quantity.Includes(record) && compiled.IsMatch(record)) + .Select(record => record.Cursor.Sequence).ShouldBe([1L]); + var report = await quantity.GenerateAsync(capture.Id, filter); + + report.Count.ShouldBe(1); + report.CountsByEventType.Keys.ShouldBe(["sample.measurement"]); + report.CountsByEventType["sample.measurement"].ShouldBe(1); + report.ReportType.ShouldBe("sample.measurement"); + report.ReportCategory.ShouldBe("measurements"); + report.ReportVersion.ShouldBe(1); + report.FilterVersion.ShouldBe("quantity.v1"); + report.Completeness.ShouldBe("CompleteWithinReportingBoundary"); + quantity.Descriptor.Fields.Single().Path.ShouldBe("/measurements/value"); + quantity.Descriptor.Fields.Single().Unit.ShouldBe("items"); + } + + [Fact] + public async Task Unscoped_archive_query_keeps_report_metadata_absent() + { + var archive = new ReportArchive(_directory); + await archive.AppendAsync(Measurement(1, "sample.measurement", 12)); + await archive.AppendAsync(Event(2, "unrelated")); + var capture = Capture(0, 2); + await archive.SaveCaptureAsync(capture); + + var report = await archive.QueryAsync(capture.Id, new(), "all.v1"); + + report.Count.ShouldBe(2); + report.CountsByEventType.Keys.ShouldBe(["sample.measurement", "unrelated"]); + report.ReportType.ShouldBeNull(); + report.ReportCategory.ShouldBeNull(); + report.ReportVersion.ShouldBeNull(); + report.Completeness.ShouldBe("CompleteWithinReportingBoundary"); + } + + [Fact] + public async Task Contiguous_archive_does_not_claim_completeness_when_source_completeness_is_unknown() + { + var archive = new ReportArchive(_directory); + await archive.AppendAsync(Event(1)); + await archive.AppendAsync(Event(2)); + var capture = new ReportCapture + { + Id = Guid.NewGuid(), Start = new(_streamId, 0), End = new(_streamId, 2), + Dropped = 0, RejectedEvents = 0 + }; + await archive.SaveCaptureAsync(capture); + + var report = await new ReportArchive(_directory).QueryAsync(capture.Id, new(), "all.v1"); + + report.Count.ShouldBe(2); + report.CountsByEventType["sample.event"].ShouldBe(2); + report.Capture.SourceCompletenessKnown.ShouldBeFalse(); + report.Capture.Dropped.ShouldBe(0); + report.Capture.RejectedEvents.ShouldBe(0); + report.Completeness.ShouldBe("Incomplete"); + } + + private sealed class FulfilmentReport : IApplicationReport + { + public ApplicationReportDescriptor Descriptor { get; } = new() + { + Type = "warehouse.fulfilled", Category = "fulfilment", Version = 3, + Description = "Fulfilled batches with at least five items" + }; + + public bool Includes(ApplicationReportEvent record) + => record.SchemaVersion == Descriptor.Version && + record.Message.Headers.GetValueOrDefault(FlowEventHeaders.Type) == Descriptor.Type && + record.Message.Value is { } value && + value.ToJsonElement().GetProperty("measurements").GetProperty("value").GetDecimal() >= 5; + } + + private ApplicationReportEvent Measurement(long sequence, string type, double value, int schemaVersion = 1) + => Event(sequence, type) with + { + SchemaVersion = schemaVersion, + Message = new FlowEvent + { + Name = type, Timestamp = EventTime, + Measurements = new Dictionary { ["value"] = value } + }.ToMessage() + }; + + private ApplicationReportEvent Event(long sequence, string type = "sample.event", DateTimeOffset? time = null) => new() + { + Cursor = new(_streamId, sequence), + ObservedAt = EventTime.AddMinutes(10), + Application = "sample-application", + RevisionId = "revision-1", + Phase = ApplicationReportPhase.Active, + Message = new FlowEvent { Name = type, Timestamp = time ?? EventTime }.ToMessage() + }; + + private ReportCapture Capture(long start, long end) => new() + { + Id = Guid.NewGuid(), Start = new(_streamId, start), End = new(_streamId, end), Dropped = 0, RejectedEvents = 0, + SourceCompletenessKnown = true + }; + + private static ApplicationReportFilter TypeFilter(string type) => new() + { + Conditions = [new() { Path = "/type", Value = JsonSerializer.SerializeToElement(type) }] + }; + + private string RecordPath(long sequence) => Path.Combine(_directory, _streamId.ToString("N"), + sequence.ToString("D20", CultureInfo.InvariantCulture) + ".json"); + + public void Dispose() => Directory.Delete(_directory, recursive: true); +} diff --git a/tests/Unit/Samples/FluxFlow.ReportingSample.Tests/ReportingCatalogTests.cs b/tests/Unit/Samples/FluxFlow.ReportingSample.Tests/ReportingCatalogTests.cs new file mode 100644 index 00000000..572aa95d --- /dev/null +++ b/tests/Unit/Samples/FluxFlow.ReportingSample.Tests/ReportingCatalogTests.cs @@ -0,0 +1,146 @@ +using FluxFlow.Nodes; +using Microsoft.Extensions.DependencyInjection; +using System.Threading.Tasks.Dataflow; +using Shouldly; +using Xunit; + +namespace FluxFlow.ReportingSample.Tests; + +public sealed class ReportingCatalogTests +{ + [Fact] + public void Catalog_discovers_arbitrary_reports_and_freezes_custom_metadata() + { + var fields = new List { Counter("process") }; + var report = new TestReport(new() { Type = "orders.total", Category = "business", Description = "Orders", Fields = fields }); + var custom = new List + { + report, + new TestReport(new() { Type = "inventory.total", Description = "Inventory" }) + }; + var catalog = new ApplicationReportCatalog(custom); + fields.Clear(); + custom.Clear(); + + var result = catalog.Descriptors.Single(d => d.Type == "orders.total"); + result.Fields.Single().ResetScope.ShouldBe("process"); + result.Fields.Single().Unit.ShouldBe("messages"); + result.Category.ShouldBe("business"); + catalog.Reports.Single(item => item.Descriptor.Type == "orders.total").ShouldBeSameAs(report); + catalog.Descriptors.Select(d => d.Type).ShouldBe(["inventory.total", "orders.total"]); + catalog.Descriptors.Count.ShouldBe(2); + } + + [Fact] + public void Catalog_allows_new_versions_but_rejects_duplicate_identity_and_field_paths() + { + var descriptor = new ApplicationReportDescriptor { Type = "orders.total", Description = "Orders", Fields = [Counter("process")] }; + Catalog(descriptor, descriptor with { Version = 2 }).Descriptors.Count(d => d.Type == descriptor.Type).ShouldBe(2); + Should.Throw(() => Catalog(descriptor, descriptor)); + Should.Throw(() => Catalog(descriptor with { Version = 0 })); + Should.Throw(() => Catalog(descriptor with { Fields = [Counter("process"), Counter("process")] })); + } + + [Theory] + [InlineData(null, ApplicationReportFieldKind.Number)] + [InlineData("", ApplicationReportFieldKind.Number)] + [InlineData("process", ApplicationReportFieldKind.String)] + public void Cumulative_measurements_require_numeric_fields_and_reset_scope(string? resetScope, ApplicationReportFieldKind kind) + => Should.Throw(() => Catalog(new ApplicationReportDescriptor + { Type = "orders.total", Description = "Orders", Fields = [Counter(resetScope) with { Kind = kind }] })); + + [Fact] + public void Comparison_discovery_exposes_only_operations_supported_by_field_kind() + { + var catalog = new ApplicationReportCatalog(); + catalog.GetComparisons(ApplicationReportFieldKind.Number).ShouldContain(ApplicationReportComparison.GreaterThan); + catalog.GetComparisons(ApplicationReportFieldKind.Number).ShouldNotContain(ApplicationReportComparison.Contains); + catalog.GetComparisons(ApplicationReportFieldKind.String).ShouldContain(ApplicationReportComparison.StartsWith); + catalog.GetComparisons(ApplicationReportFieldKind.Boolean).ShouldNotContain(ApplicationReportComparison.GreaterThan); + catalog.GetComparisons(ApplicationReportFieldKind.Object).ShouldBe(new[] + { ApplicationReportComparison.Exists, ApplicationReportComparison.Missing, ApplicationReportComparison.IsNull }); + } + + [Fact] + public void Common_fields_discover_envelope_and_event_fields_with_usable_types() + { + var catalog = new ApplicationReportCatalog(); + catalog.CommonFields.Select(field => field.Path).ShouldBe(new[] + { + "/type", "/kind", "/level", "/timestamp", "@application", "@revision", "@schemaVersion", + "@phase", "@source", "@workflow", "@component", "@traceId" + }); + catalog.CommonFields.Single(field => field.Path == "@schemaVersion").Kind.ShouldBe(ApplicationReportFieldKind.Number); + catalog.CommonFields.Single(field => field.Path == "/timestamp").Kind.ShouldBe(ApplicationReportFieldKind.Timestamp); + catalog.CommonFields.Single(field => field.Path == "@revision").Kind.ShouldBe(ApplicationReportFieldKind.String); + foreach (var field in catalog.CommonFields) + Should.NotThrow(() => ReportingFilterTests.Filter(field.Path, ApplicationReportComparison.Exists).Compile()); + } + + [Fact] + public async Task Report_registration_exposes_same_singleton_and_plain_interface_registration_extends_catalog() + { + var services = new ServiceCollection(); + services.AddApplicationReport(); + services.AddSingleton(); + services.AddSingleton(); + await using var provider = services.BuildServiceProvider(); + var report = provider.GetRequiredService(); + var all = provider.GetServices().ToArray(); + all.OfType().Single().ShouldBeSameAs(report); + var catalog = provider.GetRequiredService(); + catalog.Reports.Single(r => r.Descriptor.Type == "custom.orders").ShouldBeSameAs(report); + catalog.Descriptors.Single(d => d.Type == "custom.orders").Category.ShouldBe("business"); + catalog.Descriptors.Single(d => d.Type == "custom.audit").Category.ShouldBe("audit"); + catalog.Descriptors.Select(descriptor => descriptor.Type).ShouldBe(["custom.audit", "custom.orders"]); + var record = ReportingFilterTests.Record("{}") with { Message = Measurement(10) }; + report.Includes(record).ShouldBeTrue(); + report.Includes(record with { Message = Measurement(1) }).ShouldBeFalse(); + var source = new BufferBlock(); + var selected = new BufferBlock(); + using var link = source.LinkTo(selected, new DataflowLinkOptions(), report.Includes); + using var discard = source.LinkTo(DataflowBlock.NullTarget()); + source.Post(record with { Message = Measurement(1) }).ShouldBeTrue(); + source.Post(record).ShouldBeTrue(); + source.Complete(); + await source.Completion.WaitAsync(TimeSpan.FromSeconds(5)); + selected.Count.ShouldBe(1); + (await selected.ReceiveAsync(TimeSpan.FromSeconds(5))).Message.ToFlowEvent().Measurements["value"].ShouldBe(10); + } + + private static FlowMessage Measurement(double value) => new FlowEvent + { + Name = "order.measured", Measurements = new Dictionary { ["value"] = value } + }.ToMessage(); + + private static ApplicationReportCatalog Catalog(params ApplicationReportDescriptor[] descriptors) + => new(descriptors.Select(descriptor => new TestReport(descriptor))); + + private sealed class TestReport(ApplicationReportDescriptor descriptor) : IApplicationReport + { + public ApplicationReportDescriptor Descriptor => descriptor; + public bool Includes(ApplicationReportEvent record) => record.Message.ToFlowEvent().Name == descriptor.Type; + } + + public sealed class CustomOrderReport : IApplicationReport + { + private readonly CompiledApplicationReportFilter _filter = ReportingFilterTests.Filter( + "/measurements/value", ApplicationReportComparison.GreaterThan, "5").Compile(); + public ApplicationReportDescriptor Descriptor { get; } = new() + { Type = "custom.orders", Category = "business", Description = "Custom order totals" }; + public bool Includes(ApplicationReportEvent record) => _filter.IsMatch(record); + } + + public sealed class CustomAuditReport : IApplicationReport + { + public ApplicationReportDescriptor Descriptor { get; } = new() + { Type = "custom.audit", Category = "audit", Description = "Custom audit records" }; + public bool Includes(ApplicationReportEvent record) => record.Message.ToFlowEvent().Name == "audit.recorded"; + } + + private static ApplicationReportFieldDescriptor Counter(string? resetScope) => new() + { + Path = "/measurements/count", Description = "Message count", Unit = "messages", + Kind = ApplicationReportFieldKind.Number, Measurement = ApplicationReportMeasurementKind.Cumulative, ResetScope = resetScope + }; +} diff --git a/tests/Unit/Samples/FluxFlow.ReportingSample.Tests/ReportingFilterTests.cs b/tests/Unit/Samples/FluxFlow.ReportingSample.Tests/ReportingFilterTests.cs new file mode 100644 index 00000000..b5131b63 --- /dev/null +++ b/tests/Unit/Samples/FluxFlow.ReportingSample.Tests/ReportingFilterTests.cs @@ -0,0 +1,191 @@ +using System.Text.Json; +using FluxFlow.Data; +using FluxFlow.Nodes; +using Shouldly; +using Xunit; + +namespace FluxFlow.ReportingSample.Tests; + +public sealed class ReportingFilterTests +{ + [Theory] + [InlineData("/a~1b/~0key", ApplicationReportComparison.Equal, "12", true)] + [InlineData("/a~1b/~0key", ApplicationReportComparison.Equal, "\"12\"", false)] + [InlineData("/a~1b/~0key", ApplicationReportComparison.GreaterThan, "12", false)] + [InlineData("/a~1b/~0key", ApplicationReportComparison.GreaterThan, "11", true)] + [InlineData("/a~1b/~0key", ApplicationReportComparison.GreaterThanOrEqual, "12", true)] + [InlineData("/a~1b/~0key", ApplicationReportComparison.GreaterThanOrEqual, "13", false)] + [InlineData("/a~1b/~0key", ApplicationReportComparison.LessThan, "13", true)] + [InlineData("/a~1b/~0key", ApplicationReportComparison.LessThan, "12", false)] + [InlineData("/a~1b/~0key", ApplicationReportComparison.LessThanOrEqual, "11", false)] + [InlineData("/a~1b/~0key", ApplicationReportComparison.LessThanOrEqual, "12", true)] + [InlineData("/label", ApplicationReportComparison.Contains, "\"Ab\"", true)] + [InlineData("/label", ApplicationReportComparison.Contains, "\"ab\"", false)] + [InlineData("/label", ApplicationReportComparison.StartsWith, "\"Ab\"", true)] + [InlineData("/label", ApplicationReportComparison.StartsWith, "\"bc\"", false)] + [InlineData("/flag", ApplicationReportComparison.Equal, "true", true)] + [InlineData("/flag", ApplicationReportComparison.NotEqual, "false", true)] + [InlineData("/flag", ApplicationReportComparison.NotEqual, "1", false)] + [InlineData("/Label", ApplicationReportComparison.Equal, "\"Abc\"", false)] + public void Scalar_filters_are_type_strict_ordinal_and_decode_pointer_segments( + string path, ApplicationReportComparison comparison, string expected, bool matches) + { + var filter = Filter(path, comparison, expected).Compile(); + filter.IsMatch(Record("""{"a/b":{"~key":12},"label":"Abc","flag":true}""")).ShouldBe(matches); + } + + [Theory] + [InlineData("/absent", ApplicationReportComparison.Missing, true)] + [InlineData("/absent", ApplicationReportComparison.Exists, false)] + [InlineData("/absent", ApplicationReportComparison.IsNull, false)] + [InlineData("/absent", ApplicationReportComparison.NotEqual, false)] + [InlineData("/value", ApplicationReportComparison.Missing, false)] + [InlineData("/value", ApplicationReportComparison.Exists, true)] + [InlineData("/value", ApplicationReportComparison.IsNull, true)] + [InlineData("/value", ApplicationReportComparison.Equal, true)] + public void Missing_and_explicit_null_have_distinct_semantics( + string path, ApplicationReportComparison comparison, bool expected) + => Filter(path, comparison, "null").Compile().IsMatch(Record("""{"value":null}""")).ShouldBe(expected); + + [Theory] + [InlineData("/items/0/a~1b", ApplicationReportComparison.Equal, "\"first\"", true)] + [InlineData("/items/1/a~1b", ApplicationReportComparison.Equal, "\"second\"", true)] + [InlineData("/items/0/a~1b", ApplicationReportComparison.Equal, "\"second\"", false)] + [InlineData("/items/2/a~1b", ApplicationReportComparison.Missing, null, true)] + [InlineData("/items/-1", ApplicationReportComparison.Missing, null, true)] + [InlineData("/items/01", ApplicationReportComparison.Missing, null, true)] + [InlineData("/items/99999999999999999", ApplicationReportComparison.Missing, null, true)] + public void Json_pointer_array_indices_follow_order_and_do_not_coerce_invalid_indices( + string path, ApplicationReportComparison comparison, string? value, bool expected) + => Filter(path, comparison, value).Compile().IsMatch(Record("""{"items":[{"a/b":"first"},{"a/b":"second"}]}""")).ShouldBe(expected); + + [Fact] + public void Nested_groups_and_half_open_message_time_window_survive_serialization() + { + var start = new DateTimeOffset(2026, 9, 4, 10, 0, 0, TimeSpan.Zero); + var filter = new ApplicationReportFilter + { + FromInclusive = start, + ToExclusive = start.AddHours(1), + All = [Filter("/value", ApplicationReportComparison.GreaterThan, "5")], + Any = [Filter("/kind", ApplicationReportComparison.Equal, "\"a\""), + Filter("/kind", ApplicationReportComparison.Equal, "\"b\"")] + }; + var restored = JsonSerializer.Deserialize(JsonSerializer.Serialize(filter))!.Compile(); + + restored.IsMatch(Record("""{"value":6,"kind":"b"}""", start)).ShouldBeTrue(); + restored.IsMatch(Record("""{"value":6,"kind":"a"}""", start.AddHours(1))).ShouldBeFalse(); + restored.IsMatch(Record("""{"value":6,"kind":"a"}""", start.AddTicks(-1))).ShouldBeFalse(); + restored.IsMatch(Record("""{"value":5,"kind":"a"}""", start)).ShouldBeFalse(); + restored.IsMatch(Record("""{"value":6,"kind":"c"}""", start)).ShouldBeFalse(); + } + + [Fact] + public void Envelope_fields_filter_provenance_without_parsing_message_text() + { + var record = Record("{}") with + { + Application = "app", RevisionId = "rev-2", Phase = ApplicationReportPhase.Draining, + Message = FlowMessage.Create(FlowValue.Null, headers: new Dictionary + { + [FlowEventHeaders.Workflow] = "orders", [FlowEventHeaders.Component] = "source", + [FlowEventHeaders.Source] = "orders.source.Events" + }) + }; + var filter = new ApplicationReportFilter + { + All = [Filter("@application", ApplicationReportComparison.Equal, "\"app\""), + Filter("@revision", ApplicationReportComparison.Equal, "\"rev-2\""), + Filter("@phase", ApplicationReportComparison.Equal, "\"Draining\""), + Filter("@workflow", ApplicationReportComparison.Equal, "\"orders\""), + Filter("@component", ApplicationReportComparison.Equal, "\"source\""), + Filter("@source", ApplicationReportComparison.StartsWith, "\"orders.\"")] + }.Compile(); + filter.IsMatch(record).ShouldBeTrue(); + filter.IsMatch(record with { RevisionId = "rev-1" }).ShouldBeFalse(); + } + + [Fact] + public void Compiled_filter_clones_scalar_values_and_mutable_groups() + { + using var document = JsonDocument.Parse("12"); + var conditions = new List + { + new() { Path = "/value", Value = document.RootElement } + }; + var children = new List { new() { Conditions = conditions } }; + var compiled = new ApplicationReportFilter { All = children }.Compile(); + conditions.Clear(); + children.Clear(); + document.Dispose(); + + compiled.IsMatch(Record("""{"value":12}""")).ShouldBeTrue(); + compiled.IsMatch(Record("""{"value":13}""")).ShouldBeFalse(); + } + + [Fact] + public void Error_envelope_has_missing_event_data_but_remains_filterable_by_provenance() + { + var record = Record("{}") with + { + Application = "orders", + Message = FlowMessage.CreateError(new FlowError("failed", "Failure", "test", false)) + }; + Filter("/type", ApplicationReportComparison.Missing).Compile().IsMatch(record).ShouldBeTrue(); + Filter("/type", ApplicationReportComparison.IsNull).Compile().IsMatch(record).ShouldBeFalse(); + Filter("@application", ApplicationReportComparison.Equal, "\"orders\"").Compile().IsMatch(record).ShouldBeTrue(); + } + + [Theory] + [InlineData("relative", ApplicationReportComparison.Exists, null)] + [InlineData("/bad~2escape", ApplicationReportComparison.Exists, null)] + [InlineData("@unknown", ApplicationReportComparison.Exists, null)] + [InlineData("/value", ApplicationReportComparison.Equal, "{}")] + [InlineData("/value", ApplicationReportComparison.Contains, "2")] + [InlineData("/value", ApplicationReportComparison.LessThan, "\"2\"")] + [InlineData("/value", ApplicationReportComparison.Equal, "1e100")] + [InlineData("/value", (ApplicationReportComparison)999, "2")] + public void Invalid_conditions_fail_during_compilation(string path, ApplicationReportComparison comparison, string? value) + => Should.Throw(() => Filter(path, comparison, value).Compile()); + + [Fact] + public void Invalid_windows_and_unbounded_filter_graphs_are_rejected() + { + var now = DateTimeOffset.UtcNow; + Should.Throw(() => new ApplicationReportFilter { FromInclusive = now, ToExclusive = now }.Compile()); + var deep = new ApplicationReportFilter(); + for (var i = 0; i < 8; i++) deep = new ApplicationReportFilter { All = [deep] }; + deep.Compile().IsMatch(Record("{}")).ShouldBeTrue(); + deep = new ApplicationReportFilter { All = [deep] }; + Should.Throw(() => deep.Compile()); + var cyclic = new List(); + var root = new ApplicationReportFilter { Any = cyclic }; + cyclic.Add(root); + Should.Throw(() => root.Compile()); + new ApplicationReportFilter + { + Conditions = Enumerable.Range(0, 63).Select(_ => new ApplicationReportCondition + { Path = "/value", Comparison = ApplicationReportComparison.Exists }).ToArray() + }.Compile().IsMatch(Record("""{"value":1}""")).ShouldBeTrue(); + Should.Throw(() => new ApplicationReportFilter + { + Conditions = Enumerable.Range(0, 64).Select(_ => new ApplicationReportCondition + { Path = "/value", Comparison = ApplicationReportComparison.Exists }).ToArray() + }.Compile()); + } + + internal static ApplicationReportFilter Filter(string path, ApplicationReportComparison comparison, string? value = null) + => new() { Conditions = [new ApplicationReportCondition + { Path = path, Comparison = comparison, Value = value is null ? null : JsonSerializer.Deserialize(value) }] }; + + internal static ApplicationReportEvent Record(string json, DateTimeOffset? timestamp = null) + { + var initial = FlowMessage.Create(FlowValue.FromJson(JsonSerializer.Deserialize(json))); + return new ApplicationReportEvent + { + Cursor = new ApplicationReportCursor(Guid.NewGuid(), 1), + ObservedAt = new DateTimeOffset(2030, 1, 1, 0, 0, 0, TimeSpan.Zero), + Message = timestamp is null ? initial : FlowMessage.Restore(initial.Value!, initial.MessageId, initial.TraceId, timestamp.Value) + }; + } +}