perf: measure grpc fanout and recovery bounds

This commit is contained in:
Joseph Doherty
2026-11-17 22:01:27 -05:00
parent 29fec57fac
commit 4cf3acb1c5
14 changed files with 3444 additions and 0 deletions
@@ -0,0 +1,833 @@
{
"schema_version": 1,
"description": "Required focused deterministic evidence BEFORE P11 timing; source selectors are obligations, never execution claims. Missing source, zero discovery, skipped/failed rows or candidate drift fail the packet.",
"obligations": [
{
"id": "authority-isolation",
"description": "Same origin remains isolated across pinned targets and principals; metadata overlap requires exact authority and provenance. Fixture negative-classification evidence is distinct from actual D06/D14 wire proof.",
"tests": [
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataMetadataRenewalCacheCapacityTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataMetadataRenewalCacheTests.Browse_refuses_cross_serving_replacement_of_a_healthy_or_different_placement"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataMetadataRenewalCacheCapacityTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataMetadataRenewalCacheTests.Browse_replaces_an_expired_identical_placement_but_refuses_a_third_charged_serving"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataMetadataRenewalCacheCapacityTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataMetadataRenewalCacheTests.Only_the_same_expired_overlap_can_add_a_recovery_pin_without_a_new_cache_entry"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataMetadataRenewalCacheCapacityTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataMetadataRenewalCacheTests.Invalid_recovery_pair_never_adds_a_pin_or_charge"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataMetadataRenewalCacheCapacityTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataMetadataRenewalCacheTests.Two_pinned_retired_proofs_cannot_admit_a_third_physical_entry"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProjectedPageGenerationWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Reauthorizing_a_page_rejects_incompatible_or_retired_children_and_failed_authority"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataFixtureMutationRevisionTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataFixtureMutationRevisionTests.Key_only_preserves_narrow_mapping_placement_and_every_entity_field"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataFixtureMutationRevisionTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataFixtureMutationRevisionTests.Configuration_mutation_still_inherits_connection_placement_and_advances_revisions"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataFixtureMutationRevisionTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataFixtureMutationRevisionTests.Credential_only_actions_preserve_connection_mapping_and_export_revisions"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataFixtureMutationRevisionTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataFixtureMutationRevisionTests.Expiry_with_only_its_expiry_parameter_preserves_placement_revisions"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataFixtureMutationRevisionTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataFixtureMutationRevisionTests.Real_and_mixed_configuration_mutations_still_advance_every_selected_revision"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataFixtureMutationRevisionTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataFixtureMutationRevisionTests.Missing_or_unrecognized_key_action_never_classifies_as_credential_only"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataMetadataRenewalCacheTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataMetadataRenewalCacheTests.Overlap_is_one_charged_predecessor_and_never_extends_its_original_lease"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataMetadataRenewalCacheTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataMetadataRenewalCacheTests.Changed_authority_or_provenance_cannot_bridge_existing_evidence"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataMetadataRenewalContinuityWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Unknown_route_provenance_does_not_create_a_proactive_overlap"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProbeFailureClassifierTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProbeFailureClassifierTests.Exact_authenticated_target_ineligibility_is_distinct_from_unknown_failure"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProbeFailureClassifierTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProbeFailureClassifierTests.Transport_tls_rpc_backoff_and_unknown_messages_never_prove_target_ineligibility"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProbeFailureClassifierTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProbeFailureClassifierTests.Chains_are_limited_to_eight_frames_and_truncation_is_not_accepted_as_target_proof"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProbeFailureClassifierTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProbeFailureClassifierTests.Security_material_absence_and_unknown_phase_are_fixed_codes"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProbeFailureClassifierTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProbeFailureClassifierTests.Missing_read_on_exact_ready_pinned_primary_accepts_only_explicit_wrapped_permission_denied"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProbeFailureClassifierTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProbeFailureClassifierTests.Read_denial_rejects_transport_tls_target_backoff_wrong_rpc_and_incomplete_chains"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProbeFailureClassifierTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProbeFailureClassifierTests.Read_denial_requires_missing_negotiated_read_and_exact_source_primary_configuration"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProbeFailureClassifierTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProbeFailureClassifierTests.Wrapped_read_denial_cannot_pass_during_another_operation_phase"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProbeFailureClassifierTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProbeFailureClassifierTests.Retired_ca_accepts_known_rpc_status_only_with_exact_typed_transport_tls_chain"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProbeFailureClassifierTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProbeFailureClassifierTests.Retired_ca_rejects_generic_rpc_errors_wrong_phase_unknown_frames_and_truncation"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataWorkloadAccountingTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataWorkloadAccountingTests.Logical_sharing_counts_preserve_principal_and_pinned_target_boundaries"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataDemandSharingTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataDemandSharingTests.Ref_counts_are_shared_only_within_the_full_upstream_authority_key"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests/GrpcDataSdkBrowseWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests.GrpcDataSdkBrowseWireTests.Parent_browse_and_translate_enforce_each_anchor_grant_with_legacy_acl_disabled"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProjectedStreamReconnectWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Subscribe_only_sdk_caller_renews_exact_node_without_browse_read_or_extra_subscription"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataDeployedWriteDeadlineTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Deployed_sdk_write_honors_default_and_explicit_short_connection_deadlines"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Host.Tests/DataConnections/GrpcDataBundleCommitObserverTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Host.Tests/ZB.MOM.WW.OtOpcUa.Host.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Host.Tests.DataConnections.GrpcDataBundleCommitObserverTests.Scope_only_observation_waits_for_pending_retirement_completion"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Host.Tests/DataConnections/GrpcDataBundleCommitObserverTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Host.Tests/ZB.MOM.WW.OtOpcUa.Host.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Host.Tests.DataConnections.GrpcDataBundleCommitObserverTests.Scope_observation_waits_for_interrupted_bundle_notice_and_import_retry"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Host.Tests/DataConnections/GrpcDataBundleCommitObserverTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Host.Tests/ZB.MOM.WW.OtOpcUa.Host.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Host.Tests.DataConnections.GrpcDataBundleCommitObserverTests.Observer_requires_both_committed_versions_and_never_reads_the_secret_payload"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/DataConnections/GrpcDataSampleFidelityTlsWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Host.IntegrationTests.DataConnections.GrpcDataSampleFidelityTlsWireTests.Production_tls_read_preserves_one_controlled_samples_independent_timestamps_status_value_and_version"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkSampleFidelityWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Sdk_mapped_read_preserves_one_controlled_samples_independent_timestamps_quality_value_and_version"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests/GrpcDataSdkBrowseWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests.GrpcDataSdkBrowseWireTests.BrowseNext_is_session_bound_and_rechecks_page_authority_before_each_child"
}
]
},
{
"id": "producer-array-reuse",
"description": "Immutable producer ownership copies single and batch mutable payloads before caller reuse.",
"tests": [
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSampleOwnershipTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataSampleOwnershipTests.Single_callback_copies_bytes_before_the_producer_reuses_them"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSampleOwnershipTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataSampleOwnershipTests.Batch_callback_copies_the_collection_and_each_mutable_array"
}
]
},
{
"id": "ingress-saturation",
"description": "Bounded ingress and unary write admission refuse before owned copy, preserve physical ownership until completion, enforce the original write deadline, and invalidate old Good source data on overflow.",
"tests": [
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataIngressOverflowTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataIngressOverflowTests.Admission_rejects_before_copy_and_synchronously_invalidates_previously_good_cache"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataIngressOverflowTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataIngressOverflowTests.Dirty_table_exhaustion_invalidates_partition_and_resets_existing_consumers"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataIngressOverflowTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataIngressOverflowTests.In_flight_copy_cannot_restore_readiness_after_an_overflow_fence"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProjectedWriteAdmissionTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProjectedAccessTests.Full_write_quota_rejects_large_array_without_encoding_and_restores_capacity_after_completion"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProjectedWriteAdmissionTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProjectedAccessTests.Oversized_array_is_rejected_without_encoding_or_dispatch"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataIngressMailboxAdmissionTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataIngressMailboxAdmissionTests.Loss_signal_during_value_current_validation_cannot_restore_old_good_sample"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataIngressMailboxAdmissionTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataIngressMailboxAdmissionTests.Overlapping_same_source_commit_fails_closed_before_newer_value_can_overtake"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataIngressMailboxAdmissionTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataIngressMailboxAdmissionTests.In_flight_commit_finishing_after_disposal_releases_transferred_sample_and_source_pin"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataIngressMailboxAdmissionTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataIngressMailboxAdmissionTests.Finite_control_backlog_cannot_starve_an_unrelated_admitted_value"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataIngressMailboxAdmissionTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataIngressMailboxAdmissionTests.Producer_commits_while_cache_gate_is_held_and_auto_drain_preserves_complete_observation"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataIngressMailboxRaceTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataIngressMailboxRaceTests.Queued_reserved_value_cannot_cross_a_later_source_fence"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataIngressMailboxRaceTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataIngressMailboxRaceTests.Mailbox_keeps_original_receipt_age_and_releases_owned_bytes"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataIngressMailboxRaceTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataIngressMailboxRaceTests.Late_commit_after_disposal_rejects_without_taking_payload_and_releases_charge_once"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataWriteAdmissionTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataWriteAdmissionTests.Slow_route_resolution_cannot_extend_the_original_write_deadline"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataWriteAdmissionTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataWriteAdmissionTests.Batch_preflight_time_counts_against_the_write_deadline"
}
]
},
{
"id": "revocation-during-encoding",
"description": "Revocation while the actual protobuf encoder is blocked fences body handoff and drains ownership charges.",
"tests": [
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataAdversarialRecoveryTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataAdversarialRecoveryTests.Revocation_while_protobuf_values_are_encoding_fences_handoff_and_drains_charges"
}
]
},
{
"id": "reconnect-storm-after-active-loss",
"description": "Concurrent clients reconnect after active loss, obtain fresh snapshots and drain old streams; retry backoff resets only after a proven healthy baseline.",
"tests": [
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataMetadataRenewalContinuityWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Accepted_bad_complete_baselines_do_not_reset_reconnect_backoff"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataMetadataRenewalRetryTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProjectedAccessTests.Accepted_healthy_complete_baseline_resets_retry_backoff_for_each_new_outage"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/DataConnections/GrpcDataReconnectStormWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Host.IntegrationTests.DataConnections.GrpcDataReconnectStormWireTests.Concurrent_reconnects_after_active_loss_get_new_snapshots_and_drain_old_streams"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProjectedRetryJitterTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProjectedAccessTests.Concurrent_cohort_retries_use_independently_sampled_delays"
}
]
},
{
"id": "source-readiness-invalidation",
"description": "Quiet steady interests and late serialized values cannot preserve readiness after invalidation; compatible metadata handoff preserves independently valid source and sample evidence, including SDK-normalized Bad values without borrowing another acquisition's proof.",
"tests": [
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataExpiredOverlapFailoverWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Expired_overlap_after_stream_loss_cannot_block_same_item_new_primary_recovery"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataExpiredOverlapFailoverWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Two_cadences_release_expired_overlap_without_borrowing_witnesses_during_failover"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataExpiredOverlapFailoverWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.New_primary_renews_same_monitored_item_after_a_prior_mapped_read"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProjectedPageGenerationWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Key_only_generation_change_reauthorizes_the_whole_page_after_one_active_child_renews"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkItemDiagnosticsTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Fixture_sdk_item_diagnostics_report_live_suppressed_and_retired_states"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkItemDiagnosticsTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Fixture_sdk_item_diagnostics_bound_results_and_do_not_serialize_item_objects"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSuppressedTombstoneWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Tombstoning_a_suppressed_projected_item_retires_health_and_demand_before_client_delete"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataMetadataRenewalContinuityWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Snapshot_request_during_held_renewal_remove_is_coalesced_without_a_second_remove"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataMetadataRenewalPredecessorWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Live_predecessor_cadence_publishes_ordinary_delta_after_peer_adopts_next_authority"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkBadQualityEvidenceTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Bad_source_snapshot_retains_matching_evidence_at_the_sdk_notification_boundary"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkBadQualityEvidenceTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Bad_null_sdk_notification_cannot_borrow_unproven_sample_evidence"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkBadQualityEvidenceTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Single_bad_null_sample_without_source_timestamp_keeps_original_witness"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataMetadataRenewalContinuityWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Bad_source_quality_is_preserved_during_complete_metadata_handoff"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataMetadataRenewalContinuityWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Missing_successor_snapshot_cannot_be_replaced_by_a_later_ordinary_delta"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataMetadataRenewalPublisherTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataMetadataRenewalPublisherTests.Pre_admission_expired_predecessor_never_retires_a_proven_successor"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataMetadataRenewalPublisherTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataMetadataRenewalPublisherTests.Only_an_explicitly_retired_predecessor_may_be_dropped_without_retiring_the_live_route"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataMetadataRenewalContinuityWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Two_sdk_cadences_renew_before_expiry_without_reviving_old_notification_evidence"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataMetadataRenewalContinuityWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Cache_commit_followed_by_sdk_rejection_retries_with_the_actual_committed_proof"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkSourceLossTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Failed_first_sdk_item_construction_removes_new_fanout_and_component_reference"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSuppressedItemRecoveryWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Suppressed_sdk_item_receives_fresh_snapshot_after_held_metadata_renewal_without_another_revalidation"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkSourceLossTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Disabled_sdk_item_does_not_keep_a_ghost_loss_control"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkSourceLossTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Failed_sdk_item_construction_releases_candidate_and_fanout_ownership"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkSourceLossTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Retiring_an_sdk_item_removes_its_health_entry_before_timer_or_demand_reuse"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkSourceLossTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Throwing_current_authority_sanitizes_a_loss_notification"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkSourceLossTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Partial_sdk_queue_drain_retains_a_pending_loss_control_once"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkSourceLossTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Sdk_item_reports_source_loss_then_recovers_on_a_new_complete_baseline"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkSourceLossTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Sdk_item_reports_stale_silent_source_without_closing_a_live_stream"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkSourceLossTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Sdk_item_does_not_report_source_loss_while_an_exact_proven_peer_remains"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkSourceLossTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Queued_sdk_loss_status_cannot_override_a_recovered_baseline"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkSourceLossTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Replayed_sdk_loss_status_never_reveals_data_after_authority_is_suspended"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkSourceLossTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Dequeued_old_loss_is_suppressed_when_a_new_baseline_wins_before_delivery"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSnapshotTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataSnapshotTests.Steady_interest_detects_quiet_source_invalidation_after_snapshot_disposal"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataTransportPublicationTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataTransportPublicationTests.Late_transport_serialization_revalidates_source_without_a_catalog_change"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataFederatedBrowseTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataFederatedBrowseTests.Empty_complete_page_expires_with_its_authority_lease"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataStreamFreshnessWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Grpc_stream_snapshot_reaches_an_sdk_monitored_item_with_finite_age"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataStreamFreshnessWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Grpc_quiet_renewal_does_not_rejuvenate_expired_sample_and_new_version_recovers"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataStreamFreshnessWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Subscribe_only_export_delivers_fresh_sdk_value_while_read_is_denied"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProjectedAccessTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProjectedAccessTests.Decoder_observation_time_is_not_replaced_by_later_pump_time"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProjectedStreamReconnectWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Existing_sdk_monitored_item_recovers_after_upstream_stream_ends"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProjectedStreamReconnectWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Existing_sdk_monitored_item_renews_expired_metadata_without_another_client_browse"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProjectedStreamReconnectWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Quiet_live_stream_renews_expired_metadata_without_client_browse_or_forced_close"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProjectedStreamReconnectWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Existing_sdk_item_stays_denied_during_deployment_and_recovers_after_compatible_authority_returns"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProjectedStreamReconnectWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Metadata_retry_recovers_after_cache_commit_loses_the_sdk_guard_race"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataFramedLifecycleWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Framed_grpc_new_primary_rebinds_same_subscribe_only_sdk_item_and_rejects_old_republish"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataFramedLifecycleWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Framed_grpc_pinned_sdk_item_never_substitutes_healthy_other_node_and_old_republish_is_denied"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataCrossCadenceProofWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Lost_cadence_retains_only_original_freshness_while_another_cadence_covers_the_source"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataDeployedFreshnessWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Deployed_framed_grpc_challenge_delivers_finite_age_to_sdk_monitored_item"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataDeployedFreshnessWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Deployed_framed_grpc_challenge_respects_batch_limit_and_scope_revocation"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataDeployedFreshnessWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Deployed_scope_does_not_advertise_challenges_for_unsupported_stream"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSecondaryWriteBackoffTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataSecondaryWriteBackoffTests.Rejected_secondary_write_does_not_back_off_immediate_replica_read"
}
]
},
{
"id": "catch-up-memory",
"description": "Snapshot catch-up overflow resets explicitly; cancellation, steady transition and global admission release and bound retained payload.",
"tests": [
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSnapshotTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataSnapshotTests.Catch_up_overflow_resets_snapshot_instead_of_silently_losing_deltas"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSnapshotTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataSnapshotTests.Cancellation_and_deadline_actively_release_all_snapshot_resources"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSnapshotTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataSnapshotTests.Snapshot_admission_is_global_and_rejects_before_retaining_more_payload"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataWorkloadAccountingTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataWorkloadAccountingTests.Snapshot_disposal_releases_snapshot_charge_while_steady_interest_remains_owned"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/VirtualTags/GrpcDataProjectedMuxLifetimeTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.VirtualTags.GrpcDataProjectedMuxLifetimeTests.Unregister_then_terminate_releases_delivered_quota_and_allows_new_subscriber"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataFreshnessHistoryTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataFreshnessHistoryTests.More_than_1024_challenges_release_history_and_reused_sequences_are_rejected"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataFederatedBrowseTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataFederatedBrowseTests.Exact_renewal_allows_one_pinned_predecessor_for_a_one_node_mapping"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProjectedReconnectLifetimeTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProjectedAccessTests.Pending_second_open_cannot_preserve_or_revive_the_last_proven_source_era"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProjectedReconnectLifetimeTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProjectedAccessTests.Removing_last_source_handle_closes_its_coverage_even_when_cohort_has_another_source"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProjectedReconnectLifetimeTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProjectedAccessTests.New_cadence_accepts_equal_version_baseline_when_cached_evidence_has_expired"
}
]
},
{
"id": "concurrent-browse",
"description": "Concurrent identical browse waiters share bounded origin work and cancelled work remains charged until physical completion.",
"tests": [
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataFederatedBrowseTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataFederatedBrowseTests.Concurrent_identical_browse_waiters_share_one_bounded_origin_fetch"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataFederatedBrowseTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataFederatedBrowseTests.Cancelled_queued_fetches_remain_bounded_until_physical_work_finishes"
}
]
},
{
"id": "quiet-hot-fairness",
"description": "Hot source traversal and a hot writer cannot strand other work or principals.",
"tests": [
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataDeliveryFairnessTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataDeliveryFairnessTests.Changing_hot_source_during_traversal_does_not_restart_or_starve_other_work"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataDeliveryFairnessTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataDeliveryFairnessTests.A_waiting_principal_gets_the_next_physical_writer_slot_before_a_hot_stream_reacquires_it"
}
]
},
{
"id": "stalled-writer-snapshot",
"description": "Frozen snapshots and unary freshness retain original monotonic evidence across delays; missing renewal snapshot completion expires its old attempt, and ignored cancellation retains physical capacity until completion.",
"tests": [
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataMetadataRenewalContinuityWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Acknowledged_renewal_without_snapshot_end_expires_and_releases_its_old_attempt"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataMetadataRenewalContinuityWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Ignored_metadata_cancellation_keeps_physical_quota_until_the_rpc_actually_finishes"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkRenewalEvidenceTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Same_acquisition_successor_refreshes_only_health_evidence_not_queued_or_republished_proof"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkTimestampEvidenceTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Sdk_older_duplicate_cannot_consume_newer_timestamp_evidence"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkTimestampEvidenceTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Sdk_uses_unique_source_timestamp_to_select_coalesced_value_evidence"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkTimestampEvidenceTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Sdk_rejects_ambiguous_evidence_when_source_timestamp_was_not_requested"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataSdkTimestampEvidenceTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Sdk_rejects_ambiguous_evidence_when_origin_source_timestamps_are_absent"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataComposedBrowseWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Actual_sdk_monitored_item_recovers_from_an_older_snapshot_using_the_quiet_current_cadence"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataStreamOrderingTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataStreamOrderingTests.Snapshot_larger_than_queue_finishes_frozen_values_before_a_racing_delta"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataStreamOrderingTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataStreamOrderingTests.A_write_ignoring_cancellation_retains_frame_and_capacity_until_its_actual_completion"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProjectedAccessTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProjectedAccessTests.Snapshot_waiting_for_end_cannot_publish_after_its_freshness_expires"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataFreshnessChallengeTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataFreshnessChallengeTests.Challenge_does_not_relabel_a_value_whose_age_was_already_captured"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataFreshnessChallengeTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataFreshnessChallengeTests.Revoked_authority_cannot_obtain_a_challenge_snapshot"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataFreshnessBatchWireTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConfiguredDiscoveryWireTests.Multi_batch_challenge_preserves_versions_and_serializes_overlapping_snapshots"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProjectedReconnectLifetimeTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProjectedAccessTests.Reconnect_waits_for_uncancellable_physical_dispose_and_cancelled_demand_never_reopens"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProjectedReconnectLifetimeTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProjectedAccessTests.Revoked_mapping_during_retry_does_not_reopen_or_revive_old_evidence"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProjectedReadFreshnessTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProjectedAccessTests.Delayed_unary_result_cannot_reanchor_an_expired_sample"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataProjectedReadFreshnessTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataProjectedAccessTests.Unstamped_unary_result_uses_conservative_pre_call_anchor"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataConnectionClientTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataConnectionClientTests.Unary_read_carries_its_local_age_observation_but_never_serializes_it"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataStreamOrderingTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataStreamOrderingTests.Dirty_aliases_wait_when_snapshot_controls_leave_only_two_outbound_slots"
}
]
},
{
"id": "legacy-physical-sharing",
"description": "The real DriverHost merges legacy and grpc reference sets, and accounting remains charged through physical apply/removal acknowledgements.",
"tests": [
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/Drivers/GrpcDataDriverHostDemandTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.Drivers.GrpcDataDriverHostDemandTests.Real_host_merges_legacy_refs_then_restores_them_after_last_grpc_interest"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataWorkloadAccountingTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataWorkloadAccountingTests.Applied_physical_count_waits_for_ack_and_remains_until_cleanup_ack"
}
]
},
{
"id": "consumer-role-continuity",
"description": "Only continuously eligible Hot roles retain routes; detached metadata proofs survive borrower release but never revive after role or owner loss, and Hot proof reads remain valid during unrelated dispatch-fence contention.",
"tests": [
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Host.Tests/DataConnections/GrpcDataRuntimeRegistrationTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Host.Tests/ZB.MOM.WW.OtOpcUa.Host.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Host.Tests.DataConnections.GrpcDataRuntimeRegistrationTests.Healthy_origin_catalog_stays_ready_while_another_thread_holds_the_dispatch_fence"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataHotRouteContinuityTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataHotRouteContinuityTests.Hot_eligible_role_transitions_preserve_the_existing_route_but_epoch_aba_invalidates_it"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataHotRouteContinuityTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataHotRouteContinuityTests.Host_effective_non_hot_mode_drains_even_when_artifact_is_hot"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataHotRouteContinuityTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataHotRouteContinuityTests.Retained_metadata_guard_survives_borrower_disposal_but_not_unobserved_epoch_loss"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataHotRouteContinuityTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataHotRouteContinuityTests.Non_hot_retained_metadata_does_not_revive_after_missed_ineligible_transition"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataHotRouteContinuityTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataHotRouteContinuityTests.Read_epoch_is_stable_between_known_roles_and_changes_on_unknown_and_owner_replacement"
},
{
"source": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataHotRouteContinuityTests.cs",
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"selector": "ZB.MOM.WW.OtOpcUa.Runtime.Tests.DataConnections.GrpcDataHotRouteContinuityTests.Hot_retained_guard_reads_role_without_waiting_for_dispatch_fence"
}
]
}
]
}
@@ -0,0 +1,240 @@
#!/usr/bin/env python3
"""Run only the exact deterministic selectors required before P11 measurement.
A registry entry declares an obligation, not a pass. Missing source/selection,
failed or skipped theory rows, stale inputs and altered TRX all fail closed.
This runner never runs a solution command or starts Docker/fixtures.
"""
import argparse
from datetime import datetime, timezone
import hashlib
import importlib.util
import json
import os
from pathlib import Path
import re
import subprocess
import sys
import time
import xml.etree.ElementTree as ET
HERE = Path(__file__).resolve().parent
ROOT = HERE.parents[2]
REGISTRY = HERE / 'p11-adversarial-evidence.json'
REQUIRED = {'authority-isolation', 'producer-array-reuse', 'ingress-saturation', 'revocation-during-encoding',
'reconnect-storm-after-active-loss', 'source-readiness-invalidation', 'catch-up-memory', 'concurrent-browse',
'quiet-hot-fairness', 'stalled-writer-snapshot', 'legacy-physical-sharing', 'consumer-role-continuity'}
spec = importlib.util.spec_from_file_location('p11_unit_environment', HERE / 'run-unit-phase.py')
phase = importlib.util.module_from_spec(spec)
spec.loader.exec_module(phase)
class AdversarialError(RuntimeError):
pass
def digest(path):
return hashlib.sha256(Path(path).read_bytes()).hexdigest()
def private_json(path, value):
fd = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600)
with os.fdopen(fd, 'w') as stream:
json.dump(value, stream, indent=2)
stream.write('\n')
def registry(path=REGISTRY, root=ROOT):
document = json.loads(Path(path).read_text())
rows = document.get('obligations')
if document.get('schema_version') != 1 or not isinstance(rows, list) or len(rows) != len(REQUIRED) or {row.get('id') for row in rows} != REQUIRED:
raise AdversarialError('every required adversarial obligation must be registered exactly once')
for row in rows:
if not isinstance(row.get('description'), str) or not row['description'] or not isinstance(row.get('tests'), list) or not row['tests']:
raise AdversarialError('each obligation needs exact test selectors and a description')
for case in row['tests']:
if set(case) != {'source', 'project', 'selector'} or not re.fullmatch(r'[A-Za-z_]\w*(?:\.[A-Za-z_]\w*){2,}', case['selector']):
raise AdversarialError('only exact fully qualified method selectors are permitted')
for name, suffix in (('source', '.cs'), ('project', '.csproj')):
relative = Path(case[name])
if relative.is_absolute() or '..' in relative.parts or not case[name].startswith('tests/') or relative.suffix != suffix:
raise AdversarialError('test inputs must be exact repository-relative source/project paths')
return document
def source_gaps(document, root=ROOT):
missing = []
for obligation in document['obligations']:
for case in obligation['tests']:
source, project = root / case['source'], root / case['project']
cls, method = case['selector'].rsplit('.', 2)[-2:]
if not source.is_file() or not project.is_file() or not re.search(r'\bclass\s+' + re.escape(cls) + r'\b', source.read_text()) or not re.search(r'\b' + re.escape(method) + r'\s*\(', source.read_text()):
missing.append({'obligation': obligation['id'], **case, 'reason': 'required exact test source/project/method is absent'})
return missing
def input_identity(root=ROOT):
result = subprocess.run(['git', 'ls-files', '--cached', '--others', '--exclude-standard', '-z'], cwd=root, capture_output=True, check=True)
names = sorted(set(filter(None, result.stdout.decode().split('\0'))))
files = {}
for name in names:
path = root / name
included = name.startswith(('src/', 'tests/')) or name.startswith('scripts/validation/grpc-data/') or name == 'scripts/ci/ci.runsettings' or '/' not in name and path.suffix in {'.json', '.props', '.targets', '.rsp', '.slnx', '.config'}
if included and path.is_file() and not path.is_symlink() and path.suffix in {'.cs', '.csproj', '.props', '.targets', '.rsp', '.slnx', '.json', '.config', '.runsettings', '.py', '.sh', '.proto', '.razor', '.css', '.js', '.resx'}:
files[name] = digest(path)
if not files:
raise AdversarialError('candidate input inventory is empty')
combined = hashlib.sha256(json.dumps(files, sort_keys=True, separators=(',', ':')).encode()).hexdigest()
import rig
return {'input_sha256': combined, 'files': files, 'runtime_source_tree_hash': rig.source_tree_hash()}
def selector_filter(cases):
return '|'.join('FullyQualifiedName=' + selector for selector in sorted({case['selector'] for case in cases}))
def commands(project, cases, directory):
base = ['dotnet', 'test', project, '-c', 'Release', '-m:1', '-p:TestTfmsInParallel=false', '--settings', 'scripts/ci/ci.runsettings', '--filter', selector_filter(cases)]
return base + ['--list-tests'], base + ['--no-build', '--logger', 'trx', '--results-directory', str(directory)]
def result_rows(directory):
rows = []
directory = Path(directory)
for path in ([directory] if directory.is_file() else sorted(directory.rglob('*.trx'))):
tree = ET.parse(path).getroot()
methods = {}
for definition in tree.findall('.//{*}UnitTest'):
method = definition.find('{*}TestMethod')
if method is not None:
methods[definition.get('id')] = method.get('className', '').split(',')[0] + '.' + method.get('name', '')
for result in tree.findall('{*}Results/{*}UnitTestResult'):
selector = methods.get(result.get('testId'))
if not selector or selector.endswith('.'):
raise AdversarialError('TRX row has no exact method identity')
message = result.find('.//{*}Message')
rows.append({'selector': selector, 'test': result.get('testName') or selector, 'outcome': result.get('outcome'),
'reason': message.text if message is not None else None, 'trx': str(path.resolve()), 'trx_sha256': digest(path)})
return rows
def reconcile(document, discovered, rows, root=ROOT):
obligations = []
required_selectors = {case['selector'] for item in document['obligations'] for case in item['tests']}
unexpected = [row for row in rows if row['selector'] not in required_selectors]
for item in document['obligations']:
evidence = []
for case in item['tests']:
selected = [row for row in rows if row['selector'] == case['selector']]
names = discovered.get(case['selector'], [])
# Discovery owns concrete theory names; all discovered rows must run.
passed = bool(names) and len(selected) == len(names) and {row['test'] for row in selected} == set(names) and all(row['outcome'] == 'Passed' for row in selected)
evidence.append({**case, 'source_sha256': digest(root / case['source']) if (root / case['source']).is_file() else None,
'discovered': names, 'result_count': len(selected), 'results': selected, 'passed': passed})
obligations.append({'id': item['id'], 'description': item['description'], 'tests': evidence, 'passed': all(case['passed'] for case in evidence)})
gaps = source_gaps(document, root)
return {'obligations': obligations, 'source_gaps': gaps, 'unexpected_results': unexpected,
'executed': sum(row['outcome'] != 'NotExecuted' for row in rows), 'skipped': sum(row['outcome'] == 'NotExecuted' for row in rows),
'passed': not gaps and not unexpected and all(item['passed'] for item in obligations)}
def checked_packet(path, registry_path=REGISTRY):
"""Independently re-read current inputs and TRXs; never trust a passed bit."""
path = Path(path).resolve()
if not path.is_file() or path.is_symlink() or os.name != 'nt' and path.stat().st_mode & 0o077:
raise AdversarialError('restricted passing adversarial packet is required before performance sampling')
packet = json.loads(path.read_text())
document = registry(registry_path)
if packet.get('schema_version') != 1 or packet.get('passed') is not True or packet.get('registry_sha256') != digest(registry_path) or packet.get('identity') != input_identity():
raise AdversarialError('adversarial packet is incomplete or belongs to another candidate')
discovered = packet.get('discovery')
selectors = {case['selector'] for item in document['obligations'] for case in item['tests']}
if not isinstance(discovered, dict) or set(discovered) != selectors or any(not isinstance(names, list) or not names or len(set(names)) != len(names) or any(name.split('(', 1)[0] != selector for name in names) for selector, names in discovered.items()):
raise AdversarialError('adversarial packet discovery is missing')
projects = {case['project'] for item in document['obligations'] for case in item['tests']}
expected_exits = {str(index) + '-' + label for index in range(len(projects)) for label in ('discovery', 'test')}
exits = packet.get('command_exit_codes')
if not isinstance(exits, dict) or set(exits) != expected_exits or any(type(value) is not int or value != 0 for value in exits.values()):
raise AdversarialError('adversarial packet command completion evidence is missing or failed')
rows = []
files = packet.get('trx_files')
if not isinstance(files, dict) or not files:
raise AdversarialError('adversarial packet needs actual TRX evidence')
for name, sha in files.items():
trx = Path(name)
if not trx.is_absolute() or not trx.resolve().is_relative_to(path.parent) or trx.is_symlink() or not trx.is_file() or digest(trx) != sha:
raise AdversarialError('adversarial TRX is missing, changed or outside the packet')
rows.extend(result_rows(trx))
# A new result beside frozen files is not silently omitted from reconciliation.
if {str(trx.resolve()) for trx in path.parent.rglob('*.trx')} != set(files):
raise AdversarialError('adversarial TRX inventory changed')
actual_files = {row['trx']: row['trx_sha256'] for row in rows}
if actual_files != files:
raise AdversarialError('adversarial TRX inventory changed')
report = reconcile(document, discovered, rows)
if not report['passed'] or report['executed'] < 1 or report['skipped'] or any(packet.get('command_exit_codes', {}).values()):
raise AdversarialError('required adversarial cases did not all execute and pass')
return {'path': str(path), 'sha256': digest(path), 'input_sha256': packet['identity']['input_sha256'],
'runtime_source_tree_hash': packet['identity']['runtime_source_tree_hash'], 'executed': report['executed'],
'obligations': [row['id'] for row in report['obligations']], 'passed': True}
def run(run_id, registry_path=REGISTRY):
import rig
from processes import run_process
if not rig._RUN_PATTERN.fullmatch(run_id):
raise AdversarialError('safe unique run id required')
os.umask(0o077)
directory = ROOT / 'artifacts/grpc-data/runs' / run_id / 'adversarial-evidence'
directory.mkdir(parents=True, mode=0o700, exist_ok=False)
document = registry(registry_path)
identity = input_identity()
grouped = {}
for item in document['obligations']:
for case in item['tests']:
if not any(gap['selector'] == case['selector'] for gap in source_gaps(document)):
grouped.setdefault(case['project'], {})[case['selector']] = case
discovered = {}; rows = []; exits = {}
started = time.monotonic()
for index, (project, cases) in enumerate(sorted(grouped.items())):
target = directory / str(index); target.mkdir(mode=0o700)
discover, execute = commands(project, cases.values(), target / 'trx')
for label, command in (('discovery', discover), ('test', execute)):
private_json(target / (label + '.command.json'), command)
result = run_process(command, timeout=1800, cwd=ROOT, environment=phase.unit_environment(), max_output_bytes=32 * 1024 * 1024)
for suffix, value in (('stdout', result.stdout), ('stderr', result.stderr)):
fd = os.open(target / (label + '.' + suffix + '.log'), os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600)
with os.fdopen(fd, 'w') as stream: stream.write(value)
exits[str(index) + '-' + label] = result.returncode or int(result.timed_out or result.truncated)
if label == 'discovery':
names = phase.discover_names(result.stdout)
for selector in cases:
discovered[selector] = [name for name in names if name.split('(', 1)[0] == selector]
if exits[str(index) + '-' + label] or any(not discovered[name] for name in cases):
break
rows.extend(result_rows(target / 'trx'))
report = reconcile(document, discovered, rows)
report.update(schema_version=1, run_id=run_id, identity=identity, registry_sha256=digest(registry_path),
discovery=discovered, command_exit_codes=exits, duration_seconds=time.monotonic() - started,
completed_at_utc=datetime.now(timezone.utc).isoformat(), trx_files={row['trx']: row['trx_sha256'] for row in rows})
report['passed'] = report['passed'] and not any(exits.values()) and identity == input_identity()
private_json(directory / 'packet.json', report)
return directory / 'packet.json', report
def main(argv=None):
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--run-id', required=True)
parser.add_argument('--registry', type=Path, default=REGISTRY)
args = parser.parse_args(argv)
try:
path, report = run(args.run_id, args.registry)
print(json.dumps({'packet': str(path), 'passed': report['passed'], 'executed': report['executed'], 'missing_source': len(report['source_gaps'])}))
return 0 if report['passed'] else 1
except Exception as error:
print('P11 adversarial gate failed: ' + type(error).__name__ + '; inspect restricted evidence', file=sys.stderr)
return 2
if __name__ == '__main__':
raise SystemExit(main())
@@ -0,0 +1,134 @@
import copy
import importlib.util
import json
import os
from pathlib import Path
import sys
import tempfile
import unittest
from unittest.mock import patch
HERE = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(HERE))
spec = importlib.util.spec_from_file_location('p11_adversarial_tests', HERE / 'run-p11-adversarial.py')
gate = importlib.util.module_from_spec(spec)
spec.loader.exec_module(gate)
class P11AdversarialTests(unittest.TestCase):
def fixture(self, root):
project = 'tests/Example/Example.Tests.csproj'
source = 'tests/Example/Cases.cs'
(root / source).parent.mkdir(parents=True)
(root / source).write_text('namespace Example; class Cases { public void Case() {} }')
(root / project).write_text('<Project/>')
case = {'source': source, 'project': project, 'selector': 'Example.Cases.Case'}
return {'schema_version': 1, 'obligations': [{'id': 'test-obligation', 'description': 'Actual deterministic assertion', 'tests': [case]}]}
def trx(self, root, outcome='Passed', name='Example.Cases.Case', suffix=''):
path = root / ('results' + suffix + '.trx')
path.write_text(f'<TestRun><TestDefinitions><UnitTest id="1"><TestMethod className="Example.Cases" name="Case"/></UnitTest></TestDefinitions><Results><UnitTestResult testId="1" testName="{name}" outcome="{outcome}"><Output><ErrorInfo><Message>reason</Message></ErrorInfo></Output></UnitTestResult></Results></TestRun>')
return path
def test_registry_covers_every_obligation_with_exact_methods_and_source_paths(self):
document = gate.registry()
self.assertEqual(gate.REQUIRED, {row['id'] for row in document['obligations']})
for obligation in document['obligations']:
self.assertTrue(obligation['tests'])
for case in obligation['tests']:
self.assertNotIn('~', case['selector'])
self.assertTrue(case['project'].endswith('.csproj'))
def test_only_exact_selected_projects_methods_are_executed(self):
cases = [{'selector': 'Example.Cases.First'}, {'selector': 'Example.Cases.Second'}]
discovery, execute = gate.commands('tests/Example/Example.Tests.csproj', cases, '/private/trx')
self.assertEqual(execute[:3], ['dotnet', 'test', 'tests/Example/Example.Tests.csproj'])
expression = execute[execute.index('--filter') + 1]
self.assertEqual(expression, 'FullyQualifiedName=Example.Cases.First|FullyQualifiedName=Example.Cases.Second')
self.assertNotIn('Category', expression)
self.assertNotIn('--no-build', discovery)
self.assertIn('--no-build', execute)
def test_consumer_role_continuity_registers_all_exact_methods(self):
obligation = next(row for row in gate.registry()['obligations'] if row['id'] == 'consumer-role-continuity')
methods = {case['selector'].rsplit('.', 1)[-1] for case in obligation['tests']}
self.assertEqual(methods, {
'Hot_eligible_role_transitions_preserve_the_existing_route_but_epoch_aba_invalidates_it',
'Host_effective_non_hot_mode_drains_even_when_artifact_is_hot',
'Retained_metadata_guard_survives_borrower_disposal_but_not_unobserved_epoch_loss',
'Non_hot_retained_metadata_does_not_revive_after_missed_ineligible_transition',
'Read_epoch_is_stable_between_known_roles_and_changes_on_unknown_and_owner_replacement',
'Hot_retained_guard_reads_role_without_waiting_for_dispatch_fence',
'Healthy_origin_catalog_stays_ready_while_another_thread_holds_the_dispatch_fence',
})
def test_actual_passes_need_nonzero_discovery_and_all_theory_rows(self):
with tempfile.TemporaryDirectory() as folder:
root = Path(folder); document = self.fixture(root)
self.trx(root, name='Example.Cases.Case(value: 1)')
rows = gate.result_rows(root)
discovery = {'Example.Cases.Case': ['Example.Cases.Case(value: 1)']}
self.assertTrue(gate.reconcile(document, discovery, rows, root)['passed'])
discovery['Example.Cases.Case'].append('Example.Cases.Case(value: 2)')
self.assertFalse(gate.reconcile(document, discovery, rows, root)['passed'])
self.assertFalse(gate.reconcile(document, {}, rows, root)['passed'])
self.assertFalse(gate.reconcile(document, discovery, [], root)['passed'])
def test_skipped_failed_and_missing_source_never_become_synthetic_passes(self):
for outcome in ('NotExecuted', 'Failed', 'Inconclusive'):
with self.subTest(outcome=outcome), tempfile.TemporaryDirectory() as folder:
root = Path(folder); document = self.fixture(root); self.trx(root, outcome)
report = gate.reconcile(document, {'Example.Cases.Case': ['Example.Cases.Case']}, gate.result_rows(root), root)
self.assertFalse(report['passed'])
with tempfile.TemporaryDirectory() as folder:
root = Path(folder); document = self.fixture(root); self.trx(root)
(root / document['obligations'][0]['tests'][0]['source']).unlink()
report = gate.reconcile(document, {'Example.Cases.Case': ['Example.Cases.Case']}, gate.result_rows(root), root)
self.assertFalse(report['passed'])
self.assertEqual(len(report['source_gaps']), 1)
def test_unexpected_method_is_a_failure(self):
with tempfile.TemporaryDirectory() as folder:
root = Path(folder); document = self.fixture(root); self.trx(root)
rows = gate.result_rows(root)
rows.append({**rows[0], 'selector': 'Example.Cases.Other'})
self.assertFalse(gate.reconcile(document, {'Example.Cases.Case': ['Example.Cases.Case']}, rows, root)['passed'])
def test_packet_rechecks_real_trx_hash_and_candidate_not_just_passed_bit(self):
with tempfile.TemporaryDirectory() as folder:
root = Path(folder); document = self.fixture(root); trx = self.trx(root)
registry = root / 'registry.json'; registry.write_text(json.dumps(document))
packet = root / 'packet.json'
identity = {'input_sha256': 'same-candidate', 'runtime_source_tree_hash': 'runtime', 'files': {}}
payload = {'schema_version': 1, 'passed': True, 'registry_sha256': gate.digest(registry), 'identity': identity,
'discovery': {'Example.Cases.Case': ['Example.Cases.Case']}, 'command_exit_codes': {'0-discovery': 0, '0-test': 0},
'trx_files': {str(trx.resolve()): gate.digest(trx)}}
gate.private_json(packet, payload)
real_reconcile = gate.reconcile
with patch.object(gate, 'registry', return_value=document), patch.object(gate, 'input_identity', return_value=identity), patch.object(gate, 'reconcile', side_effect=lambda d, n, r: real_reconcile(d, n, r, root)):
self.assertTrue(gate.checked_packet(packet, registry)['passed'])
self.trx(root, 'NotExecuted')
with self.assertRaises(gate.AdversarialError): gate.checked_packet(packet, registry)
payload['trx_files'][str(trx.resolve())] = gate.digest(trx)
packet.write_text(json.dumps(payload))
with self.assertRaises(gate.AdversarialError): gate.checked_packet(packet, registry)
self.trx(root)
payload['trx_files'][str(trx.resolve())] = gate.digest(trx)
payload['identity'] = {'input_sha256': 'old-candidate'}
packet.write_text(json.dumps(payload))
with self.assertRaises(gate.AdversarialError): gate.checked_packet(packet, registry)
def test_invalid_registry_patterns_or_missing_obligations_fail(self):
document = gate.registry()
with tempfile.TemporaryDirectory() as folder:
path = Path(folder) / 'registry.json'
for mutate in ('pattern', 'missing'):
modified = copy.deepcopy(document)
if mutate == 'pattern': modified['obligations'][0]['tests'][0]['selector'] += '*'
else: modified['obligations'].pop()
path.write_text(json.dumps(modified))
with self.assertRaises(gate.AdversarialError): gate.registry(path)
if __name__ == '__main__':
unittest.main()
@@ -0,0 +1,361 @@
import copy
from contextlib import contextmanager, nullcontext
import importlib.util
import json
from pathlib import Path
import sys
import tempfile
from types import SimpleNamespace
import unittest
from unittest.mock import Mock, call, patch
HERE = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(HERE))
import workload
class WorkloadResultsTests(unittest.TestCase):
def setUp(self):
self.document = json.loads((HERE / 'workload-profiles.json').read_text())
self.profile = copy.deepcopy(self.document['profiles'][0])
def observations(self):
process = {'workingSet64': 100, 'managedBytes': 80, 'totalProcessorMilliseconds': 10}
diagnostics = {'connectionId': 'consumer-source', 'revision': 1, 'scopeVersion': 1, 'artifactRevision': 'fixture', 'accountingInstanceId': 'owner-one',
'compactFrameCount': 0, 'fallbackFrameCount': 0, 'serializedValueFrameBytes': 0}
return {'profile': workload.probe_options(self.profile, {'raw': 'modbus/plc/scalar', 'uns': 'area/line/plc/scalar'}),
'elapsedSeconds': 2,
'clients': [{'client': 0, 'failure': None, 'acknowledged': 1, 'snapshots': 1, 'rejected': 0, 'unreadySamples': 0, 'controls': {'SnapshotEnd': 1},
'items': [{'id': 'r0', 'sourceId': 'scalar', 'realm': 'Raw', 'samples': 3, 'typedValueBytes': 24, 'changesAfterMidpoint': 1, 'hotTailMilliseconds': 100,
'firstSnapshotMilliseconds': 100, 'requireChanges': True, 'changes': 2}]}],
'processBefore': process, 'processAfter': {**process, 'totalProcessorMilliseconds': 110},
'diagnosticsBefore': {'connections': [diagnostics]},
'diagnosticsAfter': {'connections': [{**diagnostics, 'compactFrameCount': 2, 'serializedValueFrameBytes': 100}]},
'bytesDefinition': 'typed value protobuf only'}
def summarize(self, observation=None):
return workload.summarize_measurement(observation or self.observations(), self.profile,
{'read_total': 12}, {'read_total': 22}, 2)
def test_catalog_has_real_smoke_steady_fanout_recovery_and_payload_profiles(self):
workload.validate_profiles(self.document)
self.assertEqual({'smoke', 'steady', 'fan-out', 'recovery'}, {row['group'] for row in self.document['profiles']})
typed = next(row for row in self.document['profiles'] if row['id'] == 'typed-payloads')
options = workload.probe_options(typed, {'raw': 'modbus/plc/scalar', 'uns': 'area/line/plc/scalar'})
self.assertEqual([('UInt16', -1), ('Array', 1), ('String', -1)], [(item['expectedKind'], item['expectedRank']) for item in options['sources']])
self.assertEqual('modbus/plc/vector', options['sources'][1]['rawPath'])
def test_measures_actual_acks_counters_and_elapsed_time(self):
measured = self.summarize()
self.assertEqual(1, measured['acknowledged_registrations'])
self.assertEqual(1.5, measured['delivered_samples_per_second'])
self.assertEqual(8, measured['typed_value_bytes_per_sample'])
self.assertEqual(5, measured['device_read_requests_per_second'])
self.assertAlmostEqual(.05, measured['caller_process_cpu_core_equivalents'])
self.assertEqual(2, measured['compact_value_frames'])
self.assertEqual(100 / 3, measured['serialized_value_frame_bytes_per_sample'])
self.assertNotIn('capacity', measured)
self.assertIn('not inferred', measured['leak_verdict'])
def test_missing_or_null_accounting_does_not_mean_zero(self):
valid = [{'activeStreams': 0, 'activeCalls': 0, 'registrationCount': 0}]
self.assertTrue(workload.connections_drained(valid))
for rows in (None, [], [{}], [{**valid[0], 'registrationCount': None}], [{**valid[0], 'activeCalls': 1}]):
with self.subTest(rows=rows):
self.assertFalse(workload.connections_drained(rows))
def test_refuses_inferred_admission_missing_snapshot_or_hot_starvation(self):
for field, value in [('acknowledged', 0), ('snapshots', 0), ('rejected', 1), ('unreadySamples', 1), ('failure', 'Unavailable')]:
observed = self.observations()
observed['clients'][0][field] = value
with self.subTest(field=field), self.assertRaises(workload.WorkloadError):
self.summarize(observed)
observed = self.observations()
observed['clients'][0]['items'][0]['changes'] = 0
with self.assertRaises(workload.WorkloadError):
self.summarize(observed)
def test_rejects_wrong_measured_configuration_and_missing_memory(self):
observed = self.observations()
observed['profile']['clients'] = 2
with self.assertRaises(workload.WorkloadError):
self.summarize(observed)
observed = self.observations()
observed['processAfter']['workingSet64'] = None
with self.assertRaises(workload.WorkloadError):
self.summarize(observed)
def test_rejects_fake_unbounded_or_ambiguous_dimensions(self):
for field, value in [('clients', True), ('clients', 65), ('source_hz', float('nan')),
('sources', ['not-a-fixture-source']), ('workers', 10), ('slow_clients', 2),
('hub_partitions', True), ('hub_partitions', 17), ('compact_batches', 1)]:
document = copy.deepcopy(self.document)
document['profiles'][0][field] = value
with self.subTest(field=field), self.assertRaises(workload.WorkloadError):
workload.validate_profiles(document)
def test_rejects_duplicate_profile_ids_and_instantaneous_settle(self):
document = copy.deepcopy(self.document)
document['profiles'][1]['id'] = document['profiles'][0]['id']
with self.assertRaises(workload.WorkloadError):
workload.validate_profiles(document)
document = copy.deepcopy(self.document)
document['accounting']['consecutive_drained_observations'] = 1
with self.assertRaises(workload.WorkloadError):
workload.validate_profiles(document)
def test_counter_reset_cannot_be_a_rate(self):
observed = self.observations()
observed['processAfter']['totalProcessorMilliseconds'] = 0
with self.assertRaises(workload.WorkloadError):
self.summarize(observed)
def test_actual_origin_counts_remain_separate_and_cleanup_requires_all_owners(self):
demand = dict.fromkeys(('logicalInterests', 'sharingGroups', 'registryInterests', 'trackedDrivers',
'desiredPhysicalReferences', 'appliedPhysicalReferences', 'retiringDrivers'), 0)
hub = {'snapshotItems': 0, 'interestItems': 0, 'retainedBytes': 256, 'maximumRetainedBytes': 1024}
observed = {'originAccounting': {'workload': {'demand': demand, 'hub': hub,
'reservedDrivers': 1, 'maximumReservedDrivers': 4}}}
self.assertTrue(workload.origin_drained(observed))
for value in (0, 2, True, 1.0, None):
other = copy.deepcopy(observed)
other['originAccounting']['workload']['reservedDrivers'] = value
with self.subTest(reserved_drivers=value):
self.assertFalse(workload.origin_drained(other))
for category, fields in (('demand', demand), ('hub', ('snapshotItems', 'interestItems'))):
for field in fields:
other = copy.deepcopy(observed)
other['originAccounting']['workload'][category][field] = 1
with self.subTest(category=category, field=field):
self.assertFalse(workload.origin_drained(other))
held = copy.deepcopy(observed)
held['originAccounting']['workload']['demand']['appliedPhysicalReferences'] = 1
held['originAccounting']['workload']['demand']['logicalInterests'] = 8
self.assertFalse(workload.origin_drained(held))
measured = workload.validate_origin_samples([held])
self.assertEqual(1, measured['maximum_applied_physical_references'])
self.assertEqual(8, measured['maximum_logical_interests'])
with self.assertRaises(workload.WorkloadError):
workload.validate_origin_samples([observed])
held['originAccounting']['workload']['hub']['retainedBytes'] = 1025
with self.assertRaises(workload.WorkloadError):
workload.validate_origin_samples([held])
def test_origin_settle_requires_consecutive_accounting_from_the_exact_deployed_source(self):
runner = object.__new__(workload.WorkloadRunner)
peers = ('source-1', 'source-2')
runner.manifest = {'nodes': {node: {'node_id': node + ':4053', 'cluster_id': 'SOURCE'} for node in peers},
'deployment': {'id': '7a4154db-48d5-4250-ad10-53e890dda436', 'revision_hash': 'revision'}}
demand = dict.fromkeys(('logicalInterests', 'sharingGroups', 'registryInterests', 'trackedDrivers',
'desiredPhysicalReferences', 'appliedPhysicalReferences', 'retiringDrivers'), 0)
drained = {'self': 'akka.tcp://otopcua@source-1:4053', 'deploymentId': '7a4154db48d54250ad1053e890dda436', 'artifactRevision': 'revision',
'members': [{'host': node, 'port': 4053, 'status': 'Up'} for node in peers],
'originAccounting': {'workload': {'demand': demand, 'hub': {'snapshotItems': 0, 'interestItems': 0},
'reservedDrivers': 1}}}
held = copy.deepcopy(drained)
held['originAccounting']['workload']['demand']['retiringDrivers'] = 1
observations = [drained, held, drained, drained, drained]
runner.probe = Mock(side_effect=observations)
with patch.object(workload.time, 'sleep'):
self.assertEqual(runner.settle_origin('source-1', self.document['accounting']), observations)
self.assertEqual(runner.probe.call_args_list, [call('source-1', 'topology', timeout=5)] * len(observations))
for field, value in (('self', 'akka.tcp://otopcua@source-2:4053'), ('deploymentId', 'stale'), ('artifactRevision', 'stale'),
('members', drained['members'][:1]), ('members', [drained['members'][0], {'host': 'foreign', 'port': 4053, 'status': 'Up'}])):
runner.probe = Mock(return_value={**drained, field: value})
with self.subTest(field=field, value=value), self.assertRaisesRegex(workload.WorkloadError, 'identity'):
runner.settle_origin('source-1', self.document['accounting'])
def test_partition_variant_requires_actual_origin_partition_count(self):
demand = dict.fromkeys(('logicalInterests', 'sharingGroups', 'registryInterests', 'desiredPhysicalReferences', 'appliedPhysicalReferences'), 1)
observed = {'originAccounting': {'workload': {'demand': demand, 'hub': {'retainedBytes': 16, 'maximumRetainedBytes': 1024, 'partitionCount': 4},
'reservedDrivers': 1, 'maximumReservedDrivers': 4}}}
workload.validate_origin_samples([observed], 4)
with self.assertRaises(workload.WorkloadError):
workload.validate_origin_samples([observed], 1)
del observed['originAccounting']['workload']['hub']['partitionCount']
with self.assertRaises(workload.WorkloadError):
workload.validate_origin_samples([observed], 4)
def test_encoding_requires_actual_accepted_frames_and_stable_accounting_owner(self):
for field, value in [('compactFrameCount', 0), ('fallbackFrameCount', 1), ('serializedValueFrameBytes', None), ('revision', 2), ('accountingInstanceId', 'owner-two')]:
observed = self.observations()
observed['diagnosticsAfter']['connections'][0][field] = value
with self.subTest(field=field), self.assertRaises(workload.WorkloadError):
self.summarize(observed)
self.profile['compact_batches'] = False
observed = self.observations()
observed['diagnosticsAfter']['connections'][0].update(compactFrameCount=0, fallbackFrameCount=2)
self.assertEqual(2, self.summarize(observed)['fallback_value_frames'])
def test_controlled_matrix_changes_exactly_one_real_dimension(self):
workload.validate_profiles(self.document)
self.assertEqual({'hub_partitions', 'compact_batches'}, {row['dimension'] for row in self.document['comparisons']})
document = copy.deepcopy(self.document)
variant = next(profile for profile in document['profiles'] if profile['id'] == document['comparisons'][0]['variant'])
variant['clients'] += 1
with self.assertRaises(workload.WorkloadError):
workload.validate_profiles(document)
document = copy.deepcopy(self.document)
document['profiles'][0].update(clients=2, overlap=False)
with self.assertRaises(workload.WorkloadError):
workload.validate_profiles(document)
document = copy.deepcopy(self.document)
document['profiles'][0]['sources'].append('counter')
with self.assertRaises(workload.WorkloadError):
workload.validate_profiles(document)
def test_comparison_reports_observed_ratios_and_incomplete_selection(self):
comparison = self.document['comparisons'][0]
metrics = {'delivered_samples_per_second': 2, 'caller_process_cpu_core_equivalents': 0,
'device_read_requests_per_second': 1, 'typed_value_bytes_per_sample': 8,
'serialized_value_frame_bytes_per_sample': 100}
rows = [{'id': comparison['baseline'], 'passed': True, 'measurements': metrics},
{'id': comparison['variant'], 'passed': True, 'measurements': {**metrics, 'delivered_samples_per_second': 3}}]
report = workload.summarize_comparisons(self.document, rows)
self.assertEqual('measured', report[0]['status'])
self.assertEqual(1.5, report[0]['measurements']['delivered_samples_per_second']['variant_to_baseline'])
self.assertIsNone(report[0]['measurements']['caller_process_cpu_core_equivalents']['variant_to_baseline'])
self.assertEqual('not-selected', report[1]['status'])
rows[1]['passed'] = False
self.assertEqual('failed', workload.summarize_comparisons(self.document, rows)[0]['status'])
def test_bounded_admission_counts_accepted_handles_separately_from_rejected_clients(self):
self.profile.update(clients=2, admission_limit=1)
observed = self.observations()
observed['clients'].append({'client': 1, 'rejectedBeforeStream': True, 'failure': None, 'acknowledged': 0})
measured = self.summarize(observed)
self.assertEqual(1, measured['acknowledged_registrations'])
self.assertEqual(1, measured['clients_rejected_before_stream'])
observed['clients'][1]['acknowledged'] = 1
with self.assertRaises(workload.WorkloadError):
self.summarize(observed)
def sharing_observations(self, profile, accepted=None):
views = [(source, realm) for source in profile['sources'] for realm in ('Raw', 'Uns')[:profile['views_per_source']]]
clients = []
for client in range(profile['clients']):
if accepted is not None and client not in accepted:
clients.append({'client': client, 'rejectedBeforeStream': True, 'acknowledged': 0})
continue
items = []
for index in range(profile['registrations_per_client']):
slot = index if profile['overlap'] else client * profile['registrations_per_client'] + index
source, realm = views[slot % len(views)]
items.append({'id': 'r' + str(index), 'sourceId': source, 'realm': realm})
clients.append({'client': client, 'items': items, 'acknowledged': len(items)})
return {'clients': clients}
def sharing_samples(self, expected):
return [{'originAccounting': {'workload': {'capturedAtUtc': '2026-11-17T10:00:0' + str(index) + 'Z',
'demand': {'logicalInterests': expected['logical_interests'], 'registryInterests': expected['registry_interests'],
'sharingGroups': expected['sharing_groups'], 'desiredPhysicalReferences': expected['physical_references'],
'appliedPhysicalReferences': expected['physical_references'], 'trackedDrivers': 1, 'retiringDrivers': 0},
'hub': {'retainedBytes': 256, 'maximumRetainedBytes': 1024, 'partitionCount': 4},
'reservedDrivers': 1, 'maximumReservedDrivers': 4}}} for index in range(3)]
def test_sharing_derives_unique_sources_authority_proofs_and_actual_logical_admission(self):
profile = next(item for item in self.document['profiles'] if item['id'] == 'fan-out')
expected = workload.sharing_expectation(profile, self.sharing_observations(profile))
self.assertEqual(64, expected['logical_interests'])
self.assertEqual(4, expected['sharing_groups'])
self.assertEqual(2, expected['physical_references'])
self.assertFalse(expected['legacy_scope']['included_in_observed_demand_owner'])
self.assertEqual(7, expected['legacy_scope']['expected_legacy_grpc_reference_union'])
samples = self.sharing_samples(expected)
measured = workload.validate_origin_samples(samples, 4, expected)
self.assertEqual(3, measured['consecutive_steady_observations'])
self.assertEqual(expected, measured['sharing_expectation'])
def test_one_physical_reference_per_registration_cannot_pass_overlap_experiment(self):
profile = next(item for item in self.document['profiles'] if item['id'] == 'fan-out')
expected = workload.sharing_expectation(profile, self.sharing_observations(profile))
samples = self.sharing_samples(expected)
samples[1]['originAccounting']['workload']['demand']['appliedPhysicalReferences'] = expected['logical_interests']
with self.assertRaises(workload.WorkloadError): workload.validate_origin_samples(samples, 4, expected)
def test_single_good_snapshot_or_replayed_observation_does_not_establish_sharing(self):
expected = workload.sharing_expectation(self.profile, self.observations())
samples = self.sharing_samples(expected)
with self.assertRaises(workload.WorkloadError): workload.validate_origin_samples(samples[:1], 4, expected)
with self.assertRaises(workload.WorkloadError): workload.validate_origin_samples([samples[0]] * 3, 4, expected)
samples[1]['originAccounting']['workload']['demand']['appliedPhysicalReferences'] = 0
with self.assertRaises(workload.WorkloadError): workload.validate_origin_samples(samples, 4, expected)
def test_nonoverlap_and_bounded_admission_count_only_actual_admitted_source_views(self):
profile = next(item for item in self.document['profiles'] if item['id'] == 'interval-deadband')
observed = self.sharing_observations(profile)
expected = workload.sharing_expectation(profile, observed)
self.assertEqual((4, 4, 2), (expected['logical_interests'], expected['sharing_groups'], expected['physical_references']))
observed['clients'][1]['items'][0]['realm'] = 'Uns'
with self.assertRaises(workload.WorkloadError): workload.sharing_expectation(profile, observed)
profile = next(item for item in self.document['profiles'] if item['id'] == 'bounded-admission')
expected = workload.sharing_expectation(profile, self.sharing_observations(profile, accepted={2}))
self.assertEqual((1, 1, 1), (expected['logical_interests'], expected['sharing_groups'], expected['physical_references']))
def test_missing_or_stale_adversarial_packet_blocks_before_hardware_or_timing(self):
instance = workload.WorkloadRunner.__new__(workload.WorkloadRunner)
instance.rig = SimpleNamespace(folder=Path('/private/rig'))
instance.manifest = {'source_tree_hash': 'current'}
instance.hardware = Mock()
with patch.object(workload, 'adversarial_preflight', side_effect=workload.WorkloadError('missing')):
with self.assertRaises(workload.WorkloadError): instance.run_workloads(self.document)
with patch.object(workload, 'adversarial_preflight', return_value={'runtime_source_tree_hash': 'stale'}):
with self.assertRaises(workload.WorkloadError): instance.run_workloads(self.document)
instance.hardware.assert_not_called()
with tempfile.TemporaryDirectory() as folder:
with self.assertRaises(workload.WorkloadError): workload.adversarial_preflight(Path(folder) / 'missing-packet.json')
def test_recovery_prepares_the_recreated_callers_raw_leaf_before_faulting(self):
for browse_ready in (True, False):
with self.subTest(browse_ready=browse_ready), tempfile.TemporaryDirectory() as folder:
events = Mock()
runner = object.__new__(workload.WorkloadRunner)
previous_manifest = {'source_tree_hash': 'current', 'consumer': 'consumer-2'}
refreshed_manifest = {**previous_manifest, 'run_id': 'test', 'consumer': 'consumer-1', 'source': 'source-1'}
runner.manifest = previous_manifest
runner.rig = SimpleNamespace(folder=Path(folder), load=Mock(return_value=refreshed_manifest),
seed_helper=Mock(), hub_partitions=lambda _: nullcontext())
@contextmanager
def compact_batches(enabled):
events.recreate_consumers(enabled)
yield
runner.rig.compact_batches = compact_batches
runner.primary = lambda pair: runner.manifest[pair]
runner.hardware = Mock()
runner.save = Mock()
runner.baseline = events.baseline
runner.probe = events.probe
runner.wait_connection_ready = events.wait_connection_ready
runner.cli = events.cli
runner.changing = events.changing
runner.changing.return_value = nullcontext()
runner.live_cli_fault = events.live_cli_fault
runner.wait_pair_topology = events.wait_pair_topology
runner.settle = events.settle
runner.settle.side_effect = workload.WorkloadError('stop after recovery preflight')
if not browse_ready:
runner.cli.side_effect = workload.ScenarioError('projected leaf missing from Browse')
with patch.object(workload, 'adversarial_preflight', return_value={'runtime_source_tree_hash': 'current'}):
report = runner.run_workloads(self.document, selected=['recovery'])
expected = [call.recreate_consumers(True), call.probe('consumer-1', 'read'),
call.probe('consumer-1', 'metadata'), call.wait_connection_ready('consumer-1', 'raw'),
call.cli('browse', 'consumer-1', 'raw', recursive=True)]
if browse_ready:
expected.extend([call.changing(), call.live_cli_fault('consumer-1', 'source-1', require_gap=True),
call.wait_pair_topology('source'),
call.settle('consumer-1', self.document['accounting'])])
self.assertEqual(expected + [call.baseline()], events.mock_calls)
row = report['rows'][0]
self.assertEqual(row['failure'], 'WorkloadError: stop after recovery preflight' if browse_ready
else 'ScenarioError: projected leaf missing from Browse')
self.assertTrue(row['restored'])
self.assertFalse(row['passed'])
if __name__ == '__main__':
unittest.main()
@@ -611,6 +611,51 @@
]
}
],
"P11": [
{
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"filter": "(Feature=GrpcData&Phase=P11)|FullyQualifiedName~.GrpcDataStreamOrderingTests.|FullyQualifiedName~.GrpcDataDeliveryFairnessTests.|FullyQualifiedName~.GrpcDataRecoveryAdmissionTests.|FullyQualifiedName~.GrpcDataProjectedAccessTests.|FullyQualifiedName~.GrpcDataConnectionClientTests.",
"new_classes": [
"GrpcDataWorkloadAccountingTests"
],
"existing_classes": [
"GrpcDataProjectedAccessTests",
"GrpcDataStreamOrderingTests",
"GrpcDataDeliveryFairnessTests",
"GrpcDataRecoveryAdmissionTests",
"GrpcDataConnectionClientTests"
]
},
{
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests.csproj",
"filter": "(Feature=GrpcData&Phase=P11)|FullyQualifiedName~.GrpcDataSdkProjectionTests.",
"new_classes": [
"GrpcDataSdkSampleEvidenceTests"
],
"existing_classes": [
"GrpcDataSdkProjectionTests"
]
},
{
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Host.Tests/ZB.MOM.WW.OtOpcUa.Host.Tests.csproj",
"filter": "FullyQualifiedName~.GrpcDataProjectionRoutingTests.|FullyQualifiedName~.GrpcDataCompactNegotiationTests.|FullyQualifiedName~.GrpcDataRuntimeRegistrationTests.",
"new_classes": [
"GrpcDataCompactNegotiationTests"
],
"existing_classes": [
"GrpcDataProjectionRoutingTests",
"GrpcDataRuntimeRegistrationTests"
]
},
{
"project": "tests/Core/ZB.MOM.WW.OtOpcUa.Commons.Tests/ZB.MOM.WW.OtOpcUa.Commons.Tests.csproj",
"filter": "FullyQualifiedName~.GrpcDataCompactCodecTests.",
"new_classes": [],
"existing_classes": [
"GrpcDataCompactCodecTests"
]
}
],
"P10": [
{
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Host.Tests/ZB.MOM.WW.OtOpcUa.Host.Tests.csproj",
@@ -0,0 +1,261 @@
{
"schema_version": 1,
"description": "Small measured fixture experiments, not advertised capacity. Limits are experiment safety bounds, not throughput promises.",
"accounting": {
"settle_seconds": 15,
"consecutive_drained_observations": 3,
"sample_interval_seconds": 0.5
},
"profiles": [
{
"id": "smoke",
"group": "smoke",
"sources": [
"scalar"
],
"clients": 1,
"registrations_per_client": 1,
"views_per_source": 1,
"duration_seconds": 6,
"sampling_ms": 100,
"publishing_ms": 100,
"source_hz": 2,
"deadband": null,
"slow_clients": 0,
"slow_client_ms": 0,
"browse_burst": 0,
"browse_workers": 1,
"overlap": true,
"hub_partitions": 4,
"compact_batches": true
},
{
"id": "steady",
"group": "steady",
"sources": [
"scalar",
"counter",
"array0",
"array1",
"array2"
],
"clients": 2,
"registrations_per_client": 10,
"views_per_source": 2,
"duration_seconds": 12,
"sampling_ms": 100,
"publishing_ms": 200,
"source_hz": 4,
"deadband": null,
"slow_clients": 0,
"slow_client_ms": 0,
"browse_burst": 8,
"browse_workers": 2,
"overlap": true,
"hub_partitions": 4,
"compact_batches": true
},
{
"id": "typed-payloads",
"group": "steady",
"sources": [
"scalar",
"vector",
"text"
],
"clients": 2,
"registrations_per_client": 6,
"views_per_source": 2,
"duration_seconds": 12,
"sampling_ms": 100,
"publishing_ms": 200,
"source_hz": 4,
"deadband": null,
"slow_clients": 0,
"slow_client_ms": 0,
"browse_burst": 8,
"browse_workers": 2,
"overlap": true,
"hub_partitions": 1,
"compact_batches": true
},
{
"id": "fan-out",
"group": "fan-out",
"sources": [
"scalar",
"counter"
],
"clients": 8,
"registrations_per_client": 8,
"views_per_source": 2,
"duration_seconds": 12,
"sampling_ms": 100,
"publishing_ms": 100,
"source_hz": 4,
"deadband": null,
"slow_clients": 1,
"slow_client_ms": 750,
"browse_burst": 32,
"browse_workers": 4,
"overlap": true,
"hub_partitions": 4,
"compact_batches": true
},
{
"id": "quiet-hot-fairness",
"group": "fan-out",
"sources": [
"scalar",
"array0"
],
"clients": 4,
"registrations_per_client": 4,
"views_per_source": 2,
"duration_seconds": 12,
"sampling_ms": 100,
"publishing_ms": 100,
"source_hz": 8,
"deadband": null,
"slow_clients": 1,
"slow_client_ms": 1000,
"browse_burst": 32,
"browse_workers": 4,
"overlap": true,
"hub_partitions": 4,
"compact_batches": true
},
{
"id": "interval-deadband",
"group": "steady",
"sources": [
"scalar",
"counter"
],
"clients": 2,
"registrations_per_client": 2,
"views_per_source": 2,
"duration_seconds": 12,
"sampling_ms": 250,
"publishing_ms": 500,
"source_hz": 4,
"deadband": 2,
"slow_clients": 0,
"slow_client_ms": 0,
"browse_burst": 0,
"browse_workers": 1,
"overlap": false,
"hub_partitions": 4,
"compact_batches": true
},
{
"id": "recovery",
"group": "recovery",
"sources": [
"scalar",
"counter"
],
"clients": 2,
"registrations_per_client": 4,
"views_per_source": 2,
"duration_seconds": 8,
"sampling_ms": 100,
"publishing_ms": 100,
"source_hz": 4,
"deadband": null,
"slow_clients": 0,
"slow_client_ms": 0,
"browse_burst": 8,
"browse_workers": 2,
"overlap": true,
"recovery_preflight": true,
"hub_partitions": 4,
"compact_batches": true
},
{
"id": "bounded-admission",
"group": "steady",
"sources": [
"scalar"
],
"clients": 4,
"registrations_per_client": 1,
"views_per_source": 1,
"duration_seconds": 6,
"sampling_ms": 100,
"publishing_ms": 100,
"source_hz": 2,
"deadband": null,
"slow_clients": 0,
"slow_client_ms": 0,
"browse_burst": 0,
"browse_workers": 1,
"overlap": true,
"admission_limit": 1,
"hub_partitions": 4,
"compact_batches": true
},
{
"id": "typed-partitions-4",
"group": "steady",
"sources": [
"scalar",
"vector",
"text"
],
"clients": 2,
"registrations_per_client": 6,
"views_per_source": 2,
"duration_seconds": 12,
"sampling_ms": 100,
"publishing_ms": 200,
"source_hz": 4,
"deadband": null,
"slow_clients": 0,
"slow_client_ms": 0,
"browse_burst": 8,
"browse_workers": 2,
"overlap": true,
"hub_partitions": 4,
"compact_batches": true
},
{
"id": "typed-fallback",
"group": "steady",
"sources": [
"scalar",
"vector",
"text"
],
"clients": 2,
"registrations_per_client": 6,
"views_per_source": 2,
"duration_seconds": 12,
"sampling_ms": 100,
"publishing_ms": 200,
"source_hz": 4,
"deadband": null,
"slow_clients": 0,
"slow_client_ms": 0,
"browse_burst": 8,
"browse_workers": 2,
"overlap": true,
"hub_partitions": 1,
"compact_batches": false
}
],
"comparisons": [
{
"id": "partition-count",
"baseline": "typed-payloads",
"variant": "typed-partitions-4",
"dimension": "hub_partitions"
},
{
"id": "encoding",
"baseline": "typed-payloads",
"variant": "typed-fallback",
"dimension": "compact_batches"
}
]
}
+571
View File
@@ -0,0 +1,571 @@
#!/usr/bin/env python3
"""Measured, bounded workloads against an already deployed run-owned LocalRig.
No capacity claim is inferred from profile input. Cardinalities come from actual
acknowledgements, rates from elapsed monotonic time and fixture counters, and
memory from the operating system/runtime. Missing accounting stays unavailable.
"""
import argparse
from contextlib import contextmanager
import hashlib
import importlib.util
import json
import math
from pathlib import Path
import platform
import threading
import time
import rig
from scenarios import ScenarioError, ScenarioRunner, restricted_json, fixture_browse_root
class WorkloadError(RuntimeError):
pass
def adversarial_preflight(path):
"""Required deterministic evidence is reconciled before any timing starts."""
spec = importlib.util.spec_from_file_location('p11_adversarial_gate', Path(__file__).with_name('run-p11-adversarial.py'))
gate = importlib.util.module_from_spec(spec)
spec.loader.exec_module(gate)
try:
return gate.checked_packet(path)
except (gate.AdversarialError, OSError, ValueError, KeyError) as error:
raise WorkloadError('passing current-candidate P11 adversarial packet required before measurement') from error
def sharing_expectation(profile, observations):
"""Count actual admitted source/view cohorts using the probe's exact indexing.
All selected clients use one principal, Cluster/Primary target and one cadence.
Raw and UNS have distinct export proofs, so registry cohorts remain separate;
physical references are deduplicated by driver/source across those proofs.
The observed demand owner excludes legacy poll-group references. The seeded
driver already has all seven legacy sources at200ms; their union stays seven.
The real-host legacy merge is a separate mandatory adversarial selector.
"""
views = [(source, realm) for source in profile['sources'] for realm in ('Raw', 'Uns')[:profile['views_per_source']]]
cohorts = set(); sources = set(); logical = 0
for client in observations['clients']:
if client.get('rejectedBeforeStream') is True:
continue
items = {item['id']: item for item in client['items']}
for index in range(profile['registrations_per_client']):
slot = index if profile['overlap'] else client['client'] * profile['registrations_per_client'] + index
expected = views[slot % len(views)]
item = items.get('r' + str(index), {})
if (item.get('sourceId'), item.get('realm')) != expected:
raise WorkloadError('observed source/view registration does not match sharing experiment')
logical += 1; sources.add(expected[0]); cohorts.add(expected)
if not logical or logical != sum(client.get('acknowledged', 0) for client in observations['clients']):
raise WorkloadError('sharing expectation requires actual acknowledged registrations')
return {'logical_interests': logical, 'registry_interests': logical, 'sharing_groups': len(cohorts),
'physical_references': len(sources), 'driver_count': 1,
'source_ids': sorted(sources), 'source_export_cohorts': sorted(cohorts),
'principal': 'fixture-consumer', 'target': 'Cluster:SOURCE:Primary',
'sampling_ms': profile['sampling_ms'], 'publishing_ms': profile['publishing_ms'], 'deadband': profile['deadband'],
'legacy_scope': {'included_in_observed_demand_owner': False, 'seeded_legacy_unique_references': 7,
'seeded_legacy_sampling_ms': 200, 'expected_legacy_grpc_reference_union': 7,
'merge_evidence_obligation': 'legacy-physical-sharing'}}
_FIELDS = {"id", "group", "sources", "clients", "registrations_per_client", "views_per_source", "duration_seconds",
"sampling_ms", "publishing_ms", "source_hz", "deadband", "slow_clients", "slow_client_ms", "browse_burst",
"browse_workers", "overlap", "hub_partitions", "compact_batches", "recovery_preflight", "admission_limit"}
_SOURCES = {"scalar", "counter", "array0", "array1", "array2", "vector", "text"}
# The seed's deployed 200 ms poll group keeps one acknowledged physical reservation.
_RESIDENT_ORIGIN_DRIVERS = ("source-modbus",)
def finite(value, low, high):
return type(value) in (int, float) and math.isfinite(value) and low <= value <= high
def validate_profiles(document):
if not isinstance(document, dict) or document.get("schema_version") != 1:
raise WorkloadError("unsupported workload schema")
profiles = document.get("profiles")
if not isinstance(profiles, list) or not 1 <= len(profiles) <= 64:
raise WorkloadError("bounded nonempty profiles required")
seen = set()
for profile in profiles:
if not isinstance(profile, dict) or set(profile) - _FIELDS or _FIELDS - {"recovery_preflight", "admission_limit"} - set(profile):
raise WorkloadError("unknown or missing profile field")
identity = profile["id"]
if not isinstance(identity, str) or not rig._RUN_PATTERN.fullmatch(identity) or identity in seen:
raise WorkloadError("safe unique profile id required")
seen.add(identity)
if profile["group"] not in {"smoke", "steady", "fan-out", "recovery"}:
raise WorkloadError("unknown workload group")
sources = profile["sources"]
if (not isinstance(sources, list) or not sources or any(not isinstance(source, str) or source not in _SOURCES for source in sources)
or len(set(sources)) != len(sources)):
raise WorkloadError("profile requires known actual fixture sources")
for name, low, high in (("clients", 1, 64), ("registrations_per_client", 1, 256), ("views_per_source", 1, 2),
("duration_seconds", 2, 90), ("sampling_ms", 0, 10000), ("publishing_ms", 0, 10000),
("slow_clients", 0, 64), ("slow_client_ms", 0, 5000), ("browse_burst", 0, 1024), ("browse_workers", 1, 32),
("hub_partitions", 1, 16)):
if type(profile[name]) is not int or not low <= profile[name] <= high:
raise WorkloadError("profile integer outside bounded experiment range")
if (profile["clients"] * profile["registrations_per_client"] > 4096
or profile["slow_clients"] > profile["clients"] or not finite(profile["source_hz"], .1, 20)
or type(profile["overlap"]) is not bool or type(profile["compact_batches"]) is not bool
or type(profile.get("recovery_preflight", False)) is not bool
or profile["registrations_per_client"] * (1 if profile["overlap"] else profile["clients"]) < len(sources) * profile["views_per_source"]
or (not profile["overlap"] and profile["clients"] * profile["registrations_per_client"] > len(sources) * profile["views_per_source"])
or (profile["deadband"] is not None and not finite(profile["deadband"], 0, 65535))):
raise WorkloadError("invalid workload dimensions")
if "admission_limit" in profile and (type(profile["admission_limit"]) is not int or not 1 <= profile["admission_limit"] < profile["clients"]):
raise WorkloadError("admission experiment must exceed its independent configured stream bound")
accounting = document.get("accounting", {})
if (set(accounting) != {"settle_seconds", "consecutive_drained_observations", "sample_interval_seconds"}
or not finite(accounting["settle_seconds"], 1, 120)
or type(accounting["consecutive_drained_observations"]) is not int
or not 2 <= accounting["consecutive_drained_observations"] <= 10
or not finite(accounting["sample_interval_seconds"], .1, 5)):
raise WorkloadError("explicit bounded physical-drain accounting required")
comparisons = document.get("comparisons", [])
if not isinstance(comparisons, list) or len(comparisons) > 32:
raise WorkloadError("bounded controlled comparisons required")
by_id = {profile["id"]: profile for profile in profiles}
comparison_ids = set()
for comparison in comparisons:
if (not isinstance(comparison, dict) or set(comparison) != {"id", "baseline", "variant", "dimension"}
or not isinstance(comparison["id"], str) or not rig._RUN_PATTERN.fullmatch(comparison["id"])
or comparison["id"] in comparison_ids or comparison["baseline"] not in by_id or comparison["variant"] not in by_id
or comparison["dimension"] not in {"hub_partitions", "compact_batches"}):
raise WorkloadError("invalid controlled comparison")
comparison_ids.add(comparison["id"])
left, right = by_id[comparison["baseline"]], by_id[comparison["variant"]]
if {key for key in left.keys() | right.keys() if left.get(key) != right.get(key)} != {"id", comparison["dimension"]}:
raise WorkloadError("comparison must change exactly one measured dimension")
return document
def probe_options(profile, origin_paths):
sources = []
for name in profile["sources"]:
sources.append({"id": name, "rawPath": origin_paths["raw"].rsplit("/", 1)[0] + "/" + name,
"unsPath": origin_paths["uns"].rsplit("/", 1)[0] + "/" + name,
"expectedKind": {"vector": "Array", "text": "String"}.get(name, "UInt16"), "expectedRank": 1 if name == "vector" else -1,
"requireChanges": name in {"scalar", "counter", "vector", "text"}})
return {"profileId": profile["id"], "sources": sources, "clients": profile["clients"],
"registrationsPerClient": profile["registrations_per_client"], "viewsPerSource": profile["views_per_source"],
"durationSeconds": profile["duration_seconds"], "samplingMilliseconds": profile["sampling_ms"],
"publishingMilliseconds": profile["publishing_ms"], "deadband": profile["deadband"],
"slowClientCount": profile["slow_clients"], "slowClientMilliseconds": profile["slow_client_ms"],
"browseBurst": profile["browse_burst"], "browseWorkers": profile["browse_workers"], "overlap": profile["overlap"],
"requireAllAdmitted": "admission_limit" not in profile,
"hubPartitions": profile["hub_partitions"], "compactBatches": profile["compact_batches"]}
def connections_drained(rows):
"""Null/missing activity counters cannot prove retirement."""
return isinstance(rows, list) and bool(rows) and all(isinstance(row, dict) and all(
type(row.get(field)) is int and row[field] == 0 for field in ("activeStreams", "activeCalls", "registrationCount")) for row in rows)
def origin_drained(observation):
origin = observation.get("originAccounting") if isinstance(observation, dict) else None
accounting = origin.get("workload") if isinstance(origin, dict) else None
if not isinstance(accounting, dict):
return False
demand, hub = accounting.get("demand"), accounting.get("hub")
return (isinstance(demand, dict) and isinstance(hub, dict)
and all(type(demand.get(field)) is int and demand[field] == 0 for field in
("logicalInterests", "sharingGroups", "registryInterests", "trackedDrivers", "desiredPhysicalReferences", "appliedPhysicalReferences", "retiringDrivers"))
and type(accounting.get("reservedDrivers")) is int and accounting["reservedDrivers"] == len(_RESIDENT_ORIGIN_DRIVERS)
and all(type(hub.get(field)) is int and hub[field] == 0 for field in ("snapshotItems", "interestItems")))
def validate_origin_samples(samples, expected_partitions=None, sharing=None, consecutive=3):
if not samples:
raise WorkloadError("actual origin accounting samples missing")
maximum_applied = 0
stable = longest_stable = 0
timestamps = set()
for sample in samples:
accounting = sample.get("originAccounting", {}).get("workload")
if not isinstance(accounting, dict):
raise WorkloadError("origin owner accounting unavailable")
demand, hub = accounting.get("demand", {}), accounting.get("hub", {})
fields = ("logicalInterests", "sharingGroups", "registryInterests", "desiredPhysicalReferences", "appliedPhysicalReferences")
if (any(type(demand.get(field)) is not int or demand[field] < 0 for field in fields)
or (expected_partitions is not None and (type(hub.get("partitionCount")) is not int or hub["partitionCount"] != expected_partitions))
or not finite(hub.get("retainedBytes"), 0, 2**63) or not finite(hub.get("maximumRetainedBytes"), 1, 2**63)
or hub["retainedBytes"] > hub["maximumRetainedBytes"]
or not finite(accounting.get("reservedDrivers"), 0, 2**31)
or not finite(accounting.get("maximumReservedDrivers"), 1, 2**31)
or accounting["reservedDrivers"] > accounting["maximumReservedDrivers"]):
raise WorkloadError("origin bounded resource invariant failed")
maximum_applied = max(maximum_applied, demand["appliedPhysicalReferences"])
if sharing is not None:
limits = {'logicalInterests': sharing['logical_interests'], 'registryInterests': sharing['registry_interests'],
'sharingGroups': sharing['sharing_groups'], 'desiredPhysicalReferences': sharing['physical_references'],
'appliedPhysicalReferences': sharing['physical_references']}
if any(demand[key] > limit for key, limit in limits.items()):
raise WorkloadError('physical sharing/cardinality exceeds unique admitted source or authority cohorts')
captured = accounting.get('capturedAtUtc')
if not isinstance(captured, str) or not captured or captured in timestamps:
raise WorkloadError('sharing requires distinct actual origin accounting observations')
timestamps.add(captured)
settled = all(demand[key] == limit for key, limit in limits.items()) and demand.get('trackedDrivers') == sharing['driver_count'] and demand.get('retiringDrivers') == 0
stable = stable + 1 if settled else 0
longest_stable = max(longest_stable, stable)
if maximum_applied < 1:
raise WorkloadError("no actual acknowledged physical acquisition observed")
if sharing is not None and longest_stable < consecutive:
raise WorkloadError('sharing cardinality never reached consecutive acknowledged steady observations')
return {"maximum_applied_physical_references": maximum_applied,
"maximum_logical_interests": max(row["originAccounting"]["workload"]["demand"]["logicalInterests"] for row in samples),
"maximum_retained_bytes": max(row["originAccounting"]["workload"]["hub"]["retainedBytes"] for row in samples),
"sharing_expectation": sharing, "consecutive_steady_observations": longest_stable}
def summarize_comparisons(document, rows):
"""Compare measured runs without treating a ratio as a capacity guarantee."""
by_id = {row["id"]: row for row in rows}
results = []
for comparison in document.get("comparisons", []):
result = dict(comparison)
left, right = by_id.get(comparison["baseline"]), by_id.get(comparison["variant"])
result["status"] = "not-selected" if left is None or right is None else "measured" if left["passed"] and right["passed"] else "failed"
if result["status"] == "measured":
fields = ("delivered_samples_per_second", "caller_process_cpu_core_equivalents", "device_read_requests_per_second", "typed_value_bytes_per_sample", "serialized_value_frame_bytes_per_sample")
result["measurements"] = {field: {"baseline": left["measurements"][field], "variant": right["measurements"][field],
"variant_to_baseline": right["measurements"][field] / left["measurements"][field] if left["measurements"][field] else None} for field in fields}
results.append(result)
return results
def summarize_measurement(observations, profile, ledger_before, ledger_after, elapsed_seconds):
"""Reconcile real probe evidence independently of its passed bit."""
if not finite(elapsed_seconds, .001, 300) or not isinstance(observations, dict):
raise WorkloadError("invalid measurement duration")
expected = probe_options(profile, {"raw": "modbus/plc/scalar", "uns": "area/line/plc/scalar"})
echo = observations.get("profile")
if not isinstance(echo, dict) or any(echo.get(key) != value for key, value in expected.items()):
raise WorkloadError("probe did not measure the requested dimensions")
clients = observations.get("clients")
if not isinstance(clients, list) or len(clients) != profile["clients"] or {client.get("client") for client in clients} != set(range(profile["clients"])):
raise WorkloadError("client measurement coverage incomplete")
measured_elapsed = observations.get("elapsedSeconds")
if not finite(measured_elapsed, .001, 120):
raise WorkloadError("actual stream sampling window missing")
samples = byte_count = registrations = 0
rejected_clients = 0
for client in clients:
if "admission_limit" in profile and client.get("rejectedBeforeStream") is True:
if client.get("failure") is not None or client.get("acknowledged") != 0:
raise WorkloadError("admission rejection has inconsistent evidence")
rejected_clients += 1
continue
count = profile["registrations_per_client"]
if (client.get("failure") is not None or client.get("acknowledged") != count or client.get("snapshots") != count
or client.get("rejected") != 0 or client.get("unreadySamples") != 0
or not isinstance(client.get("items"), list) or len(client["items"]) != count
or {item.get("id") for item in client["items"]} != {"r" + str(index) for index in range(count)}
or client.get("controls", {}).get("SnapshotEnd", 0) < 1):
raise WorkloadError("registration admission/initialization mismatch")
registrations += client["acknowledged"]
for item in client["items"]:
if (type(item.get("samples")) is not int or item["samples"] < 1
or type(item.get("typedValueBytes")) is not int or item["typedValueBytes"] < 1
or not finite(item.get("firstSnapshotMilliseconds"), 0, 120000)
or item.get("sourceId") not in profile["sources"]
or (item.get("sourceId") in {"scalar", "counter", "vector", "text"} and (type(item.get("changes")) is not int or item["changes"] < 1))
or (item.get("sourceId") in {"scalar", "counter", "vector", "text"} and client["client"] >= profile["slow_clients"]
and (type(item.get("changesAfterMidpoint")) is not int or item["changesAfterMidpoint"] < 1
or not finite(item.get("hotTailMilliseconds"), 0, 5000)))):
raise WorkloadError("per-registration progress evidence missing")
samples += item["samples"]
byte_count += item["typedValueBytes"]
if "admission_limit" in profile and (rejected_clients < 1 or registrations < 1 or
registrations > profile["admission_limit"] * profile["registrations_per_client"]):
raise WorkloadError("independent configured admission bound not observed")
before, after = observations.get("processBefore"), observations.get("processAfter")
if not isinstance(before, dict) or not isinstance(after, dict):
raise WorkloadError("actual process measurements missing")
for row in (before, after):
if any(not finite(row.get(field), 0, 2**63) for field in ("workingSet64", "managedBytes", "totalProcessorMilliseconds")):
raise WorkloadError("actual memory/CPU counters unavailable")
cpu_ms = after["totalProcessorMilliseconds"] - before["totalProcessorMilliseconds"]
source_reads = ledger_after.get("read_total", -1) - ledger_before.get("read_total", -1)
if cpu_ms < 0 or source_reads < 0:
raise WorkloadError("measurement counter reset")
encoding = encoding_measurement(observations, profile)
return {"acknowledged_registrations": registrations, "delivered_samples": samples,
"clients_rejected_before_stream": rejected_clients,
"stream_sampling_seconds": measured_elapsed, "fixture_counter_window_seconds": elapsed_seconds,
"delivered_samples_per_second": samples / measured_elapsed,
"typed_value_bytes": byte_count, "typed_value_bytes_per_sample": byte_count / samples,
"device_read_requests": source_reads, "device_read_requests_per_second": source_reads / elapsed_seconds,
"caller_process_cpu_core_equivalents": cpu_ms / (measured_elapsed * 1000),
"working_set_change_bytes": after["workingSet64"] - before["workingSet64"],
"managed_change_bytes": after["managedBytes"] - before["managedBytes"],
**encoding, "serialized_value_frame_bytes_per_sample": encoding["serialized_value_frame_bytes"] / samples,
"source_rate_definition": "actual fixture Modbus read requests; requests may batch multiple registers",
"bytes_definition": observations.get("bytesDefinition"),
"leak_verdict": "not inferred from instantaneous GC/working-set differences"}
def encoding_measurement(observations, profile):
counters = ("compactFrameCount", "fallbackFrameCount", "serializedValueFrameBytes")
snapshots = []
for key in ("diagnosticsBefore", "diagnosticsAfter"):
diagnostics = observations.get(key)
rows = diagnostics.get("connections") if isinstance(diagnostics, dict) else None
if not isinstance(rows, list):
raise WorkloadError("actual encoding accounting missing")
matches = [row for row in rows if isinstance(row, dict) and row.get("connectionId") == "consumer-source"]
if len(matches) != 1 or any(type(matches[0].get(field)) is not int or matches[0][field] < 0 for field in counters):
raise WorkloadError("actual encoding accounting missing")
snapshots.append(matches[0])
before, after = snapshots
if any(before.get(field) != after.get(field) or before.get(field) is None for field in ("revision", "scopeVersion", "artifactRevision", "accountingInstanceId")):
raise WorkloadError("encoding accounting owner changed")
delta = {field: after[field] - before[field] for field in counters}
expected = "compactFrameCount" if profile["compact_batches"] else "fallbackFrameCount"
unexpected = "fallbackFrameCount" if profile["compact_batches"] else "compactFrameCount"
if any(value < 0 for value in delta.values()) or delta[expected] < 1 or delta[unexpected] != 0 or delta["serializedValueFrameBytes"] < 1:
raise WorkloadError("requested encoding not observed on accepted value frames")
return {"compact_value_frames": delta["compactFrameCount"], "fallback_value_frames": delta["fallbackFrameCount"],
"serialized_value_frame_bytes": delta["serializedValueFrameBytes"],
"wire_bytes_definition": "accepted serialized protobuf value frames; excludes HTTP/2 and TLS overhead"}
class WorkloadRunner(ScenarioRunner):
@contextmanager
def origin_samples(self, origin, samples):
done = threading.Event()
failures = []
def sample():
try:
while not done.is_set():
samples.append(self.probe(origin, "topology", timeout=5))
done.wait(.5)
except Exception as error:
failures.append(type(error).__name__)
worker = threading.Thread(target=sample, daemon=True)
worker.start()
try:
yield
finally:
done.set()
worker.join(timeout=7)
if worker.is_alive() or failures:
raise WorkloadError("actual origin accounting sampler failed to retire")
@contextmanager
def source_updates(self, profile):
done = threading.Event()
failures = []
initial_values = self.device()["writable"]
initial = initial_values["20"]
touched_addresses = ([20] if "scalar" in profile["sources"] else []) + ([24, 25, 26] if "vector" in profile["sources"] else []) + ([40] if "text" in profile["sources"] else [])
updates = []
def update():
value = initial
try:
while not done.wait(1 / profile["source_hz"]):
value = (value + max(1, int(profile["deadband"] or 0) + 1)) % 65536
if "counter" in profile["sources"]:
self.device("advance", steps=max(1, int(profile["deadband"] or 0) + 1))
if "scalar" in profile["sources"]:
self.device("set", address=20, value=value)
if "vector" in profile["sources"]:
for offset in range(3):
self.device("set", address=24 + offset, value=(value + offset) % 65536)
if "text" in profile["sources"]:
self.device("set", address=40, value=((65 + value % 26) << 8) | 66)
updates.append(time.monotonic())
except Exception as error:
failures.append(type(error).__name__)
worker = threading.Thread(target=update, daemon=True)
worker.start()
try:
yield updates
if failures:
raise WorkloadError("actual fixture producer failed")
finally:
done.set()
worker.join(timeout=6)
if worker.is_alive():
raise WorkloadError("fixture producer did not retire")
for address in touched_addresses:
self.device("set", address=address, value=initial_values[str(address)])
def settle(self, caller, accounting):
deadline = time.monotonic() + accounting["settle_seconds"]
consecutive = 0
rows = []
while time.monotonic() < deadline:
observations = self.probe(caller, "topology", timeout=5)
rows.append(observations)
consecutive = consecutive + 1 if connections_drained(observations.get("connections")) else 0
if consecutive >= accounting["consecutive_drained_observations"]:
return rows
time.sleep(accounting["sample_interval_seconds"])
raise WorkloadError("physical streams/calls/registrations did not settle")
def settle_origin(self, origin, accounting):
expected_members = {self.node_id(node) for node, metadata in self.manifest["nodes"].items() if metadata["cluster_id"] == "SOURCE"}
expected_node = self.node_id(origin)
deployment = self.manifest["deployment"]
if len(expected_members) != 2 or expected_node not in expected_members or not deployment.get("id") or not deployment.get("revision_hash"):
raise WorkloadError("origin drain requires the deployed SOURCE pair identity")
# The manifest uses a canonical UUID and the runtime artifact uses compact hexadecimal.
expected_deployment_id = deployment["id"].replace("-", "")
deadline = time.monotonic() + accounting["settle_seconds"]
consecutive = 0
rows = []
while time.monotonic() < deadline:
observed = self.probe(origin, "topology", timeout=5)
members = observed.get("members")
if (observed.get("self") != f"akka.tcp://otopcua@{expected_node}"
or observed.get("deploymentId") != expected_deployment_id
or observed.get("artifactRevision") != deployment["revision_hash"]
or not isinstance(members, list) or len(members) != len(expected_members)
or {f"{member.get('host')}:{member.get('port')}" for member in members
if isinstance(member, dict) and member.get("status") == "Up"} != expected_members):
raise WorkloadError("origin accounting identity does not match the deployed SOURCE pair")
rows.append(observed)
consecutive = consecutive + 1 if origin_drained(observed) else 0
if consecutive >= accounting["consecutive_drained_observations"]:
return rows
time.sleep(accounting["sample_interval_seconds"])
raise WorkloadError("origin demand and hub items did not drain to zero with exactly one resident reservation")
def hardware(self):
info = json.loads(self.rig.compose("version", "--format", "json"))
docker = json.loads(rig.run_command([*self.rig.docker, "info", "--format", "{{json .}}"], environment=self.rig.environment))
resources = [row for row in self.rig.inspect_resources() if row["kind"] == "container"]
containers = []
for resource in resources:
inspect = json.loads(rig.run_command([*self.rig.docker, "container", "inspect", resource["id"]], environment=self.rig.environment))[0]
host = inspect.get("HostConfig", {})
containers.append({"id": resource["id"], "service": resource["labels"].get("com.docker.compose.service"),
"image_id": inspect.get("Image"), "limits": {key: host.get(key) for key in
("Memory", "MemorySwap", "NanoCpus", "CpuQuota", "CpuPeriod", "CpusetCpus")}})
return {"host_architecture": platform.machine(), "host_platform": platform.platform(), "compose": info,
"docker": {key: docker.get(key) for key in ("Architecture", "OSType", "NCPU", "MemTotal", "KernelVersion", "ServerVersion")},
"containers": containers, "tls": "TLS 1.2/1.3 with run-owned CA and exact DNS SAN verification",
"compression": "no explicit gRPC compression configured", "encoding": "explicit compact opt-in/opt-out; actual accepted wire frame counters measured",
"serialization_ceilings": ["DriverHostActor driver calls and SDK NodeManager operations retain their production serialization gates"],
"unavailable_breakdowns": ["CPU per actor/partition", "retained/pool/cache bytes unless exposed by actual owner counters"]}
def run_workloads(self, document, selected=None, adversarial_packet=None):
document = validate_profiles(document)
profiles = [profile for profile in document["profiles"] if selected is None or profile["id"] in selected or profile["group"] in selected]
if not profiles or (selected and set(selected) - {value for profile in document["profiles"] for value in (profile["id"], profile["group"])}):
raise WorkloadError("unknown or empty workload selection")
adversarial_path = adversarial_packet or self.rig.folder / 'adversarial-evidence' / 'packet.json'
adversarial = adversarial_preflight(adversarial_path)
if adversarial['runtime_source_tree_hash'] != self.manifest.get('source_tree_hash'):
raise WorkloadError('adversarial packet and deployed rig belong to different candidates')
self.folder = self.rig.folder / "workload-evidence"
self.folder.mkdir(mode=0o700, exist_ok=True)
self.active = "P11"
self.deadline = time.monotonic() + 120
self.save("hardware.json", self.hardware())
self.rig.seed_helper("snapshot")
rows = []
for profile in profiles:
self.active = "P11-" + profile["id"]
self.deadline = time.monotonic() + 480
started = time.monotonic()
error = None
restored = False
row = {"id": profile["id"], "configuration": profile}
try:
with self.rig.hub_partitions(profile["hub_partitions"]), self.rig.compact_batches(profile["compact_batches"]):
self.manifest = self.rig.load()
caller = self.primary("consumer")
origin = self.primary("source")
if "admission_limit" in profile:
baseline = restricted_json((self.rig.folder / "seed" / "baseline.json").resolve())
connection = next(item for item in baseline["Connections"] if item["DataConnectionId"] == "consumer-source")
connection["MaxStreams"] = profile["admission_limit"]
self.mutate(upsert_connection=connection)
# Deterministic correctness runs before timed sampling.
self.probe(caller, "read")
self.probe(caller, "metadata")
if profile.get("recovery_preflight"):
self.prepare_positive_projection(caller, "raw")
with self.changing():
self.live_cli_fault(caller, self.primary("source"), require_gap=True)
self.wait_pair_topology("source")
origin = self.primary("source")
row["drained_before"] = self.settle(caller, document["accounting"])
row["origin_drained_before"] = self.settle_origin(origin, document["accounting"])
ledger_before = self.device()
measured_start = time.monotonic()
row["origin_samples"] = []
with self.origin_samples(origin, row["origin_samples"]), self.source_updates(profile) as updates:
observed = self.probe(caller, "workload", timeout=profile["duration_seconds"] + 20,
workload=probe_options(profile, self.manifest["fixture"]["origin_paths"]),
workloadUnsNamespaceUri=self.manifest["fixture"]["namespace_uris"]["uns"],
workloadBrowseRoots={realm: fixture_browse_root(self.manifest["fixture"], realm) for realm in ("raw", "uns")})
elapsed = time.monotonic() - measured_start
ledger_after = self.device()
row["measurements"] = summarize_measurement(observed, profile, ledger_before, ledger_after, elapsed)
row["measurements"]["actual_producer_ticks"] = len(updates)
row["measurements"]["origin"] = validate_origin_samples(row["origin_samples"], profile["hub_partitions"],
sharing_expectation(profile, observed), document['accounting']['consecutive_drained_observations'])
row["observations"] = observed
row["drained_after"] = self.settle(caller, document["accounting"])
row["origin_drained_after"] = self.settle_origin(origin, document["accounting"])
except Exception as failure:
error = type(failure).__name__ + (": " + str(failure) if isinstance(failure, (WorkloadError, ScenarioError)) else "")
finally:
try:
self.manifest = self.rig.load()
self.baseline()
restored = True
except Exception as failure:
error = (error + "; " if error else "") + "restoration " + type(failure).__name__
row.update(passed=error is None, failure=error, restored=restored, duration_seconds=time.monotonic() - started)
rows.append(row)
self.save("workload-results.json", {"schema_version": 1, "rows": rows, "complete": len(rows) == len(profiles), "passed": False})
adversarial_error = None
try:
if adversarial_preflight(adversarial_path) != adversarial:
raise WorkloadError('adversarial evidence changed during measurement')
except WorkloadError as failure:
adversarial_error = str(failure)
report = {"schema_version": 1, "run_id": self.manifest["run_id"], "source_revision": self.manifest.get("source_revision"),
"passed": adversarial_error is None and all(row["passed"] and row["restored"] for row in rows), "complete": True, "rows": rows,
"adversarial_evidence": adversarial, "adversarial_evidence_error": adversarial_error,
"capacity_claim": None, "comparisons": summarize_comparisons(document, rows),
"origin_drain_expectation": {"seeded_resident_driver_ids": list(_RESIDENT_ORIGIN_DRIVERS),
"reserved_driver_count": len(_RESIDENT_ORIGIN_DRIVERS), "workload_demand_and_hub_items": 0},
"coverage_limits": ["array0/1/2 names are UInt16 scalars; vector is the actual array payload and text is the string payload",
"Hub partition count is configured and observed; it is not an independent runtime worker-count setting",
"Deterministic prerequisites are linked by the required candidate-matched adversarial packet; workload measurements do not extrapolate capacity"]}
self.save("workload-results.json", report)
self.save("index.json", {"files": [{"path": path.name, "sha256": hashlib.sha256(path.read_bytes()).hexdigest(), "bytes": path.stat().st_size}
for path in sorted(self.folder.iterdir()) if path.is_file() and path.name != "index.json"]})
return report
def main(argv=None):
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--run-id", required=True)
parser.add_argument("--profiles", type=Path, default=Path(__file__).with_name("workload-profiles.json"))
parser.add_argument("--select", action="append", help="profile id or group; repeatable")
parser.add_argument("--manifest", type=Path)
parser.add_argument("--adversarial-packet", type=Path, help="restricted passing current-candidate packet; defaults to this rig's adversarial-evidence/packet.json")
args = parser.parse_args(argv)
try:
document = validate_profiles(json.loads(args.profiles.read_text()))
report = WorkloadRunner(args.run_id, manifest_path=args.manifest).run_workloads(document, args.select, args.adversarial_packet)
print(json.dumps({"passed": report["passed"], "profiles": [row["id"] for row in report["rows"]]}))
return 0 if report["passed"] else 1
except Exception as error:
print("grpc-data workload: " + type(error).__name__ + "; restricted diagnostics retained")
return 2
if __name__ == "__main__":
raise SystemExit(main())