Skip to content

ci: update TUnit to 1.90.5, enable adaptive parallelism and drop load-only test throttles - #2807

Merged
thomhurst merged 8 commits into
mainfrom
ci/tunit-adaptive-parallelism
Dec 5, 2026
Merged

thomhurst merged 8 commits into
mainfrom
ci/tunit-adaptive-parallelism

Conversation

@thomhurst

@thomhurst thomhurst commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

TUnit 1.90.5 measurements before the streaming limiter was restored

Adaptive parallelism was enabled on both versions. Only the TUnit package versions changed in the measured pair. All measured workflows passed.

CI took 30m48s on 1.90.4 and 31m03s on 1.90.5. Selected test steps totalled 1,749 and 1,697 seconds. Control · Trial

Upstream feedback

TUnit 1.90.4 follow-up

An earlier revision updated TUnit from 1.90.2 to 1.90.4 to test the adaptive scheduling changes in thomhurst/TUnit#7938 on this repository’s CI.

Both workflows passed. Whole CI took 15m46s on 1.90.2 and 16m57s on 1.90.4. Summed across the unit, integration, analyzer, component, smoke, and StackExchange compatibility test steps, the times were 1,877 and 1,847 seconds (1.6% lower). The wall time includes runner queues and non-test jobs. Adaptive parallelism was enabled on both versions. Only the TUnit package pins changed. One paired run gives an initial estimate. More runs would establish its repeatability.

Control · 1.90.4 · Upstream feedback

Summary

  • Update TUnit from 1.87.12 to 1.90.5.
  • Turn on TUnit's experimental adaptive parallelism for every test process in ci.yml, through the workflow-level TUNIT_ADAPTIVE_PARALLELISM: 1 environment variable.
  • Remove broad test throttles. Keep serialization for shared state and targeted limits for deadline-sensitive workloads.
    • Removed:
      • all [ParallelLimiter<TimingSensitive>] (52), <DockerHeavy> (27), <ChildProcessProbes> (8) and <ContainerTopology> (1), with their classes
      • the ClientCacheHits, "signalr-integration" and IsolatedProbe keys
      • about 70 bare [NotInParallel]
    • Narrowed: about 30 class-level attributes moved onto only the methods that need them. 3 became keyed.
    • Kept:
      • a limit of two in the Sentinel routing regression workflow
      • an assembly-wide ceiling of two streaming tests per process, including adaptive runs
      • in-process allocation tests (no-GC regions)
      • RespireMetrics.Configure and RespireTracing tests
      • unfiltered meter, activity and event listeners
      • IsOperationEnabled assertions
      • static response pools and ClusterSlotMutationClock
      • Console.SetError, GIT_* environment variables and Hangfire's static RedisUtils
      • keyed groups for CLIENT PAUSE, slot resharding, cluster primary restarts, INFO commandstats, commandlog thresholds, cluster SUBSCRIBE and FT.DROPINDEX
    • About 1,023 tests ran serialised before; about 692 do now.

If a test fails only with adaptive parallelism on, rerun it with --maximum-parallel-tests set to the highest limit in that process's summary line.

Earlier CI timing on TUnit 1.90.2

Three rounds, each running this branch (adaptive), a fixed-limit control of the same code, and main (1.87.12, all throttles) at the same time. Test steps summed over all jobs, in seconds:

Round 1 Round 2 Round 3
main 3099 2790 3099
Fixed, throttles removed 2268 2223 one job failed
Adaptive (this PR) 2143 one job failed 2254
  • 25% less test time, all from removing throttles. Complete runs average 2996 s on main, 2245 s fixed and 2198 s adaptive.
  • Adaptive and fixed are equal within noise.

Largest per-job changes, in seconds (main → this PR):

  • StackExchange compatibility: about 500 → 285
  • Integration RESP3: about 405 → 215
  • Component tests: about 147 → 95
  • Smoke tests: about 118 → 75

Known flakes seen once

Neither failure shows shared state. Each happened once in 6 throttle-free runs:

  • ConcurrentResponseBarriersAllocateNothingAfterInitialization (adaptive run): the no-GC region ended early. The test still runs alone under [NotInParallel], so leftover background work from earlier tests is the likely cause.
  • ClusterBackplaneTests.ClusterRoutesBroadcastMembershipAndClientResults(True, True) (fixed-limit run): HTTP 500 on the SignalR long-polling connect. It uses its own key prefix on the shared cluster.

Validation

At 901d9b7, the streaming test project built for net10.0 and net11.0 with zero warnings. All 412 tests in the documented regression selection passed on net10.0 in fixed mode and on net11.0 in adaptive mode. TUnit reported that the streaming assembly limit stayed at two throughout the adaptive run. The Sentinel regression workflow matches the base version.

Earlier validation before the limits were restored:

  • dotnet build -c Release succeeds.
  • Respire.Tests on net11.0 with adaptive mode on: 14,909 tests, 0 failed.
  • The Coordination fake-server wire tests pass: 54/54.
  • 9 CI runs as above.

Upstream report: thomhurst/TUnit#7915 (comment)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 202 files, which is 102 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This organization's CodeRabbit subscription is cancelled. Resubscribe in Billing to continue reviews beyond the free-tier limit.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 940d6dc4-8def-4167-9a6a-8bd0d686e150
Commits

Reviewing files that changed from the base of the PR and between a8c73fd and 901d9b7.

Files selected for processing: 202

  • .github/workflows/ci.yml
  • Directory.Packages.props
  • tests/Respire.Analyzers.Tests/StackExchangeMigrationTests.cs
  • tests/Respire.Aspire.Tests/RegistrationTests.cs
  • tests/Respire.Caching.Hybrid.Tests/RespireHybridCacheCoherenceTests.cs
  • tests/Respire.Caching.Hybrid.Tests/RespireHybridCacheTrackingFailureTests.cs
  • tests/Respire.Coordination.Tests/HashFieldLeaseWireTests.cs
  • tests/Respire.Coordination.Tests/RedisRateLimiterTests.cs
  • tests/Respire.Coordination.Tests/SemaphoreWireTests.cs
  • tests/Respire.Coordination.Tests/SharedFixtures.cs
  • tests/Respire.FusionCache.Tests/DistributedLockerClusterTests.cs
  • tests/Respire.FusionCache.Tests/DistributedLockerTests.cs
  • tests/Respire.HealthChecks.Tests/HealthProbeAbandonedTaskTests.cs
  • tests/Respire.IntegrationTests/AvailabilityZoneIntegrationTests.cs
  • tests/Respire.IntegrationTests/BlockingCancellationIntegrationTests.cs
  • tests/Respire.IntegrationTests/BroadcastClientCacheIntegrationTests.cs
  • tests/Respire.IntegrationTests/CacheAsideIntegrationTests.cs
  • tests/Respire.IntegrationTests/CacheMutationLayoutIntegrationTests.cs
  • tests/Respire.IntegrationTests/CacheStampedeIntegrationTests.cs
  • tests/Respire.IntegrationTests/ClientCacheScopeIntegrationTests.cs
  • tests/Respire.IntegrationTests/ClientSideCacheIntegrationTests.cs
  • tests/Respire.IntegrationTests/ClusterAdministrationIntegrationTests.cs
  • tests/Respire.IntegrationTests/ClusterAtomicMigrationIntegrationTests.cs
  • tests/Respire.IntegrationTests/ClusterInfoEpochIntegrationTests.cs
  • tests/Respire.IntegrationTests/ClusterMultiKeyIntegrationTests.cs
  • tests/Respire.IntegrationTests/ClusterReadFromIntegrationTests.cs
  • tests/Respire.IntegrationTests/ClusterScanIntegrationTests.cs
  • tests/Respire.IntegrationTests/ContainerFixtureIntegrationTests.cs
  • tests/Respire.IntegrationTests/CredentialProviderIntegrationTests.cs
  • tests/Respire.IntegrationTests/GeoPolygonIntegrationTests.cs
  • tests/Respire.IntegrationTests/HedgedReadIntegrationTests.cs
  • tests/Respire.IntegrationTests/NodeAddressMappingIntegrationTests.cs
  • tests/Respire.IntegrationTests/OptOutClientCacheIntegrationTests.cs
  • tests/Respire.IntegrationTests/ProbabilisticCacheIntegrationTests.cs
  • tests/Respire.IntegrationTests/ProxyIntegrationTests.cs
  • tests/Respire.IntegrationTests/ReadDedicatedIntegrationTests.cs
  • tests/Respire.IntegrationTests/ReplicaLatencyBandIntegrationTests.cs
  • tests/Respire.IntegrationTests/ReplicaReadRoutingIntegrationTests.cs
  • tests/Respire.IntegrationTests/ReplicaRedirectIntegrationTests.cs
  • tests/Respire.IntegrationTests/ScriptingEngineIntegrationTests.cs
  • tests/Respire.IntegrationTests/SearchIntegrationTests.cs
  • tests/Respire.IntegrationTests/SearchSpellCheckIntegrationTests.cs
  • tests/Respire.IntegrationTests/SearchSuggestionIntegrationTests.cs
  • tests/Respire.IntegrationTests/SearchSynonymIntegrationTests.cs
  • tests/Respire.IntegrationTests/SentinelClientIntegrationTests.cs
  • tests/Respire.IntegrationTests/SentinelFailoverIntegrationTests.cs
  • tests/Respire.IntegrationTests/StandaloneCommandRetryIntegrationTests.cs
  • tests/Respire.IntegrationTests/StandaloneUnitRetryIntegrationTests.cs
  • tests/Respire.IntegrationTests/TestConstraints.cs
  • tests/Respire.IntegrationTests/TimeSeriesIntegrationTests.cs
  • tests/Respire.IntegrationTests/TopologyCommandRetryIntegrationTests.cs
  • tests/Respire.IntegrationTests/TopologyUnitRetryIntegrationTests.cs
  • tests/Respire.IntegrationTests/TrackedReplicaRedirectIntegrationTests.cs
  • tests/Respire.IntegrationTests/ValkeyClusterScanIntegrationTests.cs
  • tests/Respire.IntegrationTests/ValkeySlotMigrationIntegrationTests.cs
  • tests/Respire.IntegrationTests/ValueCodecIntegrationTests.cs
  • tests/Respire.IntegrationTests/VectorSetIntegrationTests.cs
  • tests/Respire.Orleans.Acceptance.Tests/SiloScenarios.cs
  • tests/Respire.SignalR.Tests/BackplaneIntegrationTests.cs
  • tests/Respire.SignalR.Tests/ClusterBackplaneTests.cs
  • tests/Respire.SignalR.Tests/DeliveryGapTests.cs
  • tests/Respire.StackExchangeCompat.Tests/BatchWireTests.cs
  • tests/Respire.StackExchangeCompat.Tests/HangfireCommandsTests.cs
  • tests/Respire.StackExchangeCompat.Tests/OrleansCommandsTests.cs
  • tests/Respire.StackExchangeCompat.Tests/TransactionTests.cs
  • tests/Respire.StackExchangeCompat.Tests/Upstream/TimeExpirationAsyncTests.cs
  • tests/Respire.StackExchangeCompat.Tests/Upstream/TimeExpirationTests.cs
  • tests/Respire.Streaming.Tests/JobCheckpointIntegrationTests.cs
  • tests/Respire.Streaming.Tests/JobGroupControlIntegrationTests.cs
  • tests/Respire.Streaming.Tests/JobQueueEventIntegrationTests.cs
  • tests/Respire.Streaming.Tests/JobQueueTests.cs
  • tests/Respire.Streaming.Tests/JobSchedulingClusterTests.cs
  • tests/Respire.Streaming.Tests/README.md
  • tests/Respire.Streaming.Tests/RecurringJobClusterTests.cs
  • tests/Respire.Streaming.Tests/ReliableQueueSchedulingClusterTests.cs
  • tests/Respire.Streaming.Tests/ReliableTopicClusterTests.cs
  • tests/Respire.Streaming.Tests/StreamWorkerTelemetryTests.cs
  • tests/Respire.Streaming.Tests/TestConcurrency.cs
  • tests/Respire.Tests/AllocationMeasurementTests.cs
  • tests/Respire.Tests/ArgumentFormattingTests.cs
  • tests/Respire.Tests/CacheProducerOwnershipTests.cs
  • tests/Respire.Tests/CancellationTraceTests.cs
  • tests/Respire.Tests/ChildProcessProbes.cs
  • tests/Respire.Tests/CircuitTelemetryTests.cs
  • tests/Respire.Tests/CommandDurationTests.cs
  • tests/Respire.Tests/ConnectionMetricCleanupTests.cs
  • tests/Respire.Tests/ConnectionMetricTests.cs
  • tests/Respire.Tests/DeferredExecutionOwnershipTests.cs
  • tests/Respire.Tests/DispatchResponseObservationTests.cs
  • tests/Respire.Tests/ErrorMetricFoundationTests.cs
  • tests/Respire.Tests/ErrorMetricsReviewBoundaryTests.cs
  • tests/Respire.Tests/ErrorMetricsTests.cs
  • tests/Respire.Tests/ErrorObservationTests.cs
  • tests/Respire.Tests/FocusedTests.targets
  • tests/Respire.Tests/HashImportTests.cs
  • tests/Respire.Tests/MessageMetricsTests.cs
  • tests/Respire.Tests/MetricSelectionTests.cs
  • tests/Respire.Tests/ModuleClientExtensionsTests.cs
  • tests/Respire.Tests/NativeDispatchOwnershipTests.cs
  • tests/Respire.Tests/NativeResponseErrorTests.cs
  • tests/Respire.Tests/NativeResponseResetTests.cs
  • tests/Respire.Tests/Networking/AsyncFlushSignalTests.cs
  • tests/Respire.Tests/Networking/AvailabilityZoneRoutingTests.cs
  • tests/Respire.Tests/Networking/BackgroundCleanupFailureTests.cs
  • tests/Respire.Tests/Networking/BatchCommandRetryTests.cs
  • tests/Respire.Tests/Networking/BlockingCancellationTests.cs
  • tests/Respire.Tests/Networking/ClientSideCacheCoalescingTests.cs
  • tests/Respire.Tests/Networking/ClusterCircuitDispatchTests.cs
  • tests/Respire.Tests/Networking/ClusterDatabaseTests.cs
  • tests/Respire.Tests/Networking/ClusterMigrationCommandTests.cs
  • tests/Respire.Tests/Networking/ClusterNodeIdentityTests.cs
  • tests/Respire.Tests/Networking/ClusterNotificationRoutingTests.cs
  • tests/Respire.Tests/Networking/ClusterReadOnlyTests.cs
  • tests/Respire.Tests/Networking/ClusterReadyReplyTests.cs
  • tests/Respire.Tests/Networking/ClusterReadyResponseTests.cs
  • tests/Respire.Tests/Networking/ClusterReconnectBacklogTests.cs
  • tests/Respire.Tests/Networking/ClusterReconnectPolicyTests.cs
  • tests/Respire.Tests/Networking/ClusterRedirectEndpointTests.cs
  • tests/Respire.Tests/Networking/ClusterReplicaDiscoveryTests.cs
  • tests/Respire.Tests/Networking/ClusterReplicaRoutingAllocationTests.cs
  • tests/Respire.Tests/Networking/ClusterRetirementTests.cs
  • tests/Respire.Tests/Networking/ClusterRoutingSnapshotTests.cs
  • tests/Respire.Tests/Networking/ClusterScanCapabilityTests.cs
  • tests/Respire.Tests/Networking/ClusterScanTests.cs
  • tests/Respire.Tests/Networking/ClusterShardedPubSubTests.cs
  • tests/Respire.Tests/Networking/ClusterTests.cs
  • tests/Respire.Tests/Networking/ClusterTopologyRefreshTests.cs
  • tests/Respire.Tests/Networking/ClusterWatchedTransactionTests.cs
  • tests/Respire.Tests/Networking/CommandConversionTests.cs
  • tests/Respire.Tests/Networking/CompletionBufferRetentionTests.cs
  • tests/Respire.Tests/Networking/ConnectionLifetimeTests.cs
  • tests/Respire.Tests/Networking/ContinuationDispatchTests.cs
  • tests/Respire.Tests/Networking/CrossSlotExceptionTests.cs
  • tests/Respire.Tests/Networking/FailoverProbeErrorMetricsTests.cs
  • tests/Respire.Tests/Networking/GatheredSetTests.cs
  • tests/Respire.Tests/Networking/GatheredWriteWatchdogTests.cs
  • tests/Respire.Tests/Networking/GetStringDirectPathTests.cs
  • tests/Respire.Tests/Networking/HealthProbeResponseOwnershipTests.cs
  • tests/Respire.Tests/Networking/HedgedReadTests.cs
  • tests/Respire.Tests/Networking/ImmediateRetryStateTests.cs
  • tests/Respire.Tests/Networking/InterpolatedCommandHookTests.cs
  • tests/Respire.Tests/Networking/MaintenanceNotificationTests.cs
  • tests/Respire.Tests/Networking/NearestReadRoutingTests.cs
  • tests/Respire.Tests/Networking/NodeAddressMappingTests.cs
  • tests/Respire.Tests/Networking/PendingResponseLifetimeTests.cs
  • tests/Respire.Tests/Networking/PooledResponseSourceTests.cs
  • tests/Respire.Tests/Networking/ReadDedicatedRoutingTests.Disposal.cs
  • tests/Respire.Tests/Networking/ReadEndpointRoutingTests.cs
  • tests/Respire.Tests/Networking/ReceiveBufferTests.cs
  • tests/Respire.Tests/Networking/ReceiveDeadlineTests.cs
  • tests/Respire.Tests/Networking/ReceiveLoopStartupTests.cs
  • tests/Respire.Tests/Networking/ReplicaDispatchReviewTests.cs
  • tests/Respire.Tests/Networking/ReplicaRedirectEvictionTests.cs
  • tests/Respire.Tests/Networking/ReplicaRedirectTargetRecoveryTests.cs
  • tests/Respire.Tests/Networking/ReplicaRedirectTests.TrackedScripts.cs
  • tests/Respire.Tests/Networking/ReplicaRedirectTests.cs
  • tests/Respire.Tests/Networking/ResponseArrayPoolTests.cs
  • tests/Respire.Tests/Networking/ScriptingEngineTests.cs
  • tests/Respire.Tests/Networking/SentinelCircuitDispatchTests.cs
  • tests/Respire.Tests/Networking/SentinelIdentityTests.Allocation.cs
  • tests/Respire.Tests/Networking/SentinelIdentityTests.cs
  • tests/Respire.Tests/Networking/SentinelRoutingTests.Ready.cs
  • tests/Respire.Tests/Networking/SentinelRoutingTests.cs
  • tests/Respire.Tests/Networking/ServerClientCommandTests.cs
  • tests/Respire.Tests/Networking/SortedSetAlgebraErrorMetricsTests.cs
  • tests/Respire.Tests/Networking/StalledDeliveryTests.cs
  • tests/Respire.Tests/Networking/StandaloneBatchFlushTests.cs
  • tests/Respire.Tests/Networking/StandaloneCircuitAllocationTests.cs
  • tests/Respire.Tests/Networking/StandaloneCircuitDispatchTests.Queues.cs
  • tests/Respire.Tests/Networking/StandaloneCircuitDispatchTests.Telemetry.cs
  • tests/Respire.Tests/Networking/StandaloneCircuitDispatchTests.cs
  • tests/Respire.Tests/Networking/StandaloneCommandRetryTests.cs
  • tests/Respire.Tests/Networking/StandaloneReconnectBacklogTests.cs
  • tests/Respire.Tests/Networking/StandaloneReplicaReadyTests.cs
  • tests/Respire.Tests/Networking/StreamedSetTests.cs
  • tests/Respire.Tests/Networking/StreamingCommandHookTests.cs
  • tests/Respire.Tests/Networking/StringLcsIndexErrorMetricsTests.cs
  • tests/Respire.Tests/Networking/TopologyCommandRetryTests.Circuits.cs
  • tests/Respire.Tests/Networking/TopologyCommandRetryTests.Composition.cs
  • tests/Respire.Tests/Networking/TopologyCommandRetryTests.TrackedCluster.cs
  • tests/Respire.Tests/Networking/TopologyCommandRetryTests.Units.cs
  • tests/Respire.Tests/Networking/TopologyCommandRetryTests.cs
  • tests/Respire.Tests/Networking/TopologyExceptionEndpointTests.cs
  • tests/Respire.Tests/Networking/TransactionCommandRetryTests.cs
  • tests/Respire.Tests/Networking/TransactionDeadlineTests.cs
  • tests/Respire.Tests/Networking/TransportRetirementTests.cs
  • tests/Respire.Tests/Networking/UnitRetryLifetimeTests.Retirement.cs
  • tests/Respire.Tests/Networking/UnitRetryLifetimeTests.cs
  • tests/Respire.Tests/ObservationBookkeepingTests.cs
  • tests/Respire.Tests/PendingObservationBookkeepingTests.cs
  • tests/Respire.Tests/PhysicalExceptionEndpointTests.cs
  • tests/Respire.Tests/Protocol/AggregatePayloadTests.cs
  • tests/Respire.Tests/Protocol/AggregateStorageTests.cs
  • tests/Respire.Tests/Protocol/WriterInvariantTests.cs
  • tests/Respire.Tests/RawCommandCancellationAllocationTests.cs
  • tests/Respire.Tests/RedisMetricSchemaTests.cs
  • tests/Respire.Tests/Serialization/TypedSerializationAllocationTests.cs
  • tests/Respire.Tests/TelemetryTests.cs
  • tests/Respire.Tests/TestConstraints.cs
  • tests/Respire.Tests/TimingSensitive.cs
  • tests/Respire.Tests/TraceSelectionTests.cs
  • tests/Respire.Tests/TypedFacetObservationTests.cs

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

Copy link
Copy Markdown
Contributor

The change is small and consistent with the repo guidelines. It makes two edits:

  • It bumps TUnit to 1.90.0 in the central Directory.Packages.props. No other file pins a TUnit version, and the test projects reference it unversioned.
  • It adds TUNIT_ADAPTIVE_PARALLELISM: 1 as a workflow-level env var in ci.yml, with a comment on how to reproduce a failure that only shows up with it on.

Rolling out to ci.yml only is a sensible way to measure the effect before touching other workflows. [ParallelLimiter<T>] caps and [NotInParallel] allocation tests are unaffected, and --maximum-parallel-tests still sets the starting limit.

Notes, none of them blocking:

  • The PR description says CI timing results will be added when the dispatch run finishes. Fill that in before marking the PR ready. Adaptive parallelism is experimental, so look for newly flaky integration tests that use Testcontainers (CPU and memory contention) as well as speed.
  • A workflow-level env var applies to every job in ci.yml. If one job turns out to be unstable, set TUNIT_ADAPTIVE_PARALLELISM: 0 in that job instead of removing the global setting.

I'm not leaving any findings.

@greptile-apps

greptile-apps Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5RetriggerView in Greptile

[Medium impact] The PR appears safe to merge; the previous streaming timeout-protection issue is fixed.

Summary

Updates TUnit to 1.90.5, enables adaptive parallelism in CI, and removes test throttles while keeping exclusions for shared state.

  • CI runs more independent tests together with adaptive scheduling.

Reviews (6) · Last reviewed commit: "test: restore streaming and Sentinel con..." · Reviewed by Greptile

1.90.1 reworks experimental adaptive parallelism (thomhurst/TUnit#7916). Re-measure CI with it.
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: CLEAR. I found no bugs. There is one description mismatch to fix, and I couldn't verify the TUnit 1.90.1 package.

The change is two edits:

  • Directory.Packages.props bumps TUnit.
  • ci.yml adds a workflow-level TUNIT_ADAPTIVE_PARALLELISM: 1, with a comment that says how to reproduce a failure that only shows up with it on.

Description and diff disagree on the version. The title and body say TUnit 1.90.0. The diff pins 1.90.1 at Directory.Packages.props:92. The validation and CI timing results may have been measured on 1.90.0. Either update the PR text to 1.90.1 or pin 1.90.0 so the measured build is the one that merges. I also couldn't check from here that 1.90.1 exists on NuGet. A missing version would fail restore on every job, so it needs a green CI run on the current head to confirm.

The timing evidence is thin.

  • It rests on a single candidate run, and the description already says single-job changes under about 10% are noise. Treat the -19% wall-clock figure as unconfirmed.
  • Analyzer Tests got slightly slower, and its limit dropped to 4 and 6 for part of the run. That is the one hint of a downside.
  • Only the networking unit shard changed its limit much.

Rollout scope.

  • A workflow-level env var applies to every job in ci.yml, including the Testcontainers integration jobs. Those are the likeliest to turn flaky if an experimental feature raises concurrency past what the runners can handle.
  • A more conservative option is to set the variable only on the networking unit shard, which is the only job that gained.
  • That would keep the benefit on the critical path and leave the CPU-bound jobs, where it did nothing, at the fixed limit. Setting TUNIT_ADAPTIVE_PARALLELISM: 0 per job later also works as an escape hatch.
  • Keeping it global is reasonable as a measurement step, since the PR explicitly limits the experiment to ci.yml. If it stays global, rerun the dispatch a couple of times and watch for new Testcontainers flakes before treating it as settled.

The change follows the repo guidelines: no changelog or design doc files are touched, and benchmark workflows are untouched. The earlier Claude and Greptile reviews raised no findings, and there are no inline review threads to check.

@thomhurst thomhurst changed the title ci: update TUnit to 1.90.0 and enable adaptive parallelism ci: update TUnit to 1.90.1 and enable adaptive parallelism Dec 1, 2026
thomhurst and others added 3 commits December 1, 2026 17:14
…tate

TUnit adaptive parallelism now decides concurrency. Throttles that only
protected load, CPU or wall-clock budgets are gone; throttles that guard
shared mutable state remain, as narrow as the state allows.

Removed (load/resource protection only):
- ParallelLimiter<TimingSensitive> (Respire.Tests, Coordination): all 52
  usages and both classes. Fake-server tests own their server and port.
- ParallelLimiter<DockerHeavy>: all 27 usages and the class. Each test
  starts its own container; RespireContainerFixture retries host-port
  collisions.
- ParallelLimiter<ChildProcessProbes> (8), NotInParallel(IsolatedProbe)
  and the ChildProcessProbes/TestConstraints files: the probes run in
  child processes.
- ParallelLimiter<ContainerTopology> and its class: dedicated Sentinel,
  and the fixture retries port collisions.
- [assembly: ParallelLimiter<StreamingTestParallelLimit>] (limit 2 for the
  whole Streaming assembly) and TestConcurrency.cs; README updated.
- NotInParallel(ClientCacheHits) x16: per-client hit counts, unique keys,
  dedicated fixture; the stated reason was load delaying tracking replies.
- NotInParallel("signalr-integration") x3, one ReshardingKey use
  (ClusterMultiKey moves no slots).
- Bare [NotInParallel] on tests that use their own fake server, pool,
  database, container or child process, filter listeners to their own
  port/exception, or cited thread-pool starvation, cold JIT or GC timing.
- --maximum-parallel-tests 2 in sentinel-routing-regressions.yml.

Narrowed:
- Class-level bare [NotInParallel] moved to only the methods that need it
  (ConnectionMetric, ConnectionMetricCleanup, ErrorMetricFoundation,
  ErrorObservation, RedisMetricSchema, BatchCommandRetry, ClusterReadyResponse,
  ImmediateRetryState, ReceiveBuffer, SentinelCircuitDispatch,
  StandaloneCommandRetry, TopologyCommandRetry, TransactionCommandRetry,
  StandaloneCircuitDispatch, StandaloneReplicaReady, UnitRetryLifetime,
  SE.Compat TransactionTests, and others).
- Bare to keyed: StandaloneCommandRetryIntegrationTests (CONFIG SET timeout
  on its own server), StreamWorkerTelemetry metric-only tests (filter by
  WorkerName), Aspire telemetry-disable cases (shared probe names).

Kept:
- Bare [NotInParallel] for process-global state: in-process allocation
  measurement (no-GC region, AGENTS.md), RespireMetrics/RespireTracing
  configuration, unfiltered Meter/Activity/EventListeners, tests asserting
  RespireTelemetry.IsOperationEnabled/IsEnabled, static response pools,
  ClusterSlotMutationClock static gate, Console.SetError, GIT_* env vars
  (StableVersionTagTests), Hangfire's static RedisUtils connection.
- Keyed: ClientPause, ReshardingKey (slot moves on shared cluster),
  ClusterKeyNotification (restarts a shared primary), CommandStatsKey,
  CommandLogKey, SharedClusterSubscriptions, SearchProfile/HybridRedisVersions
  (FT.DROPINDEX server bug on a shared server).
- RedisTestContainer's isolated-database pool and FakeRespServer's port gate
  (correctness, not concurrency caps).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Review of the current head

The TUnit bump and the TUNIT_ADAPTIVE_PARALLELISM change in ci.yml look fine on their own. The head now does much more than the title and description say, and the extra changes have no evidence behind them. The three earlier bot reviews (CLEAR) only saw the two-file version of this PR. I read the diff and grepped pr-head/. I did not build or run anything.

1. The description no longer matches the diff (needs fixing)

  • Version: the title says 1.90.1, the body says 1.90.0, and Directory.Packages.props pins 1.90.2. The validation and the CI timing run were measured on an earlier build.
  • Caps: the body says "[ParallelLimiter<T>] caps are unchanged". The diff deletes them:
    • TimingSensitive (limit 2), ChildProcessProbes and StreamingTestParallelLimit (limit 2) are deleted.
    • Every [ParallelLimiter<...>] use is removed. That includes the HashFieldLeaseWireTests, cluster and sentinel fake-server tests, and the streaming assembly-level limit.
  • Other changes: many [NotInParallel] attributes are removed or re-keyed, TestConstraints.IsolatedProbe is deleted, and --maximum-parallel-tests 2 is dropped from sentinel-routing-regressions.yml.
  • The deleted files carried comments explaining why they existed:
    • "short real-time deadlines".
    • "concurrent full slot maps can cause GC pauses longer than their recovery budgets".
    • The streaming limit's comment says the bound must be "independent of CPU count" because of shared Redis and Docker resources.
  • Adaptive parallelism cannot know about those deadlines. It only reacts to CPU, memory and throughput.
  • The PR title and description should describe what the PR does.

2. Removing the caps is a separate, riskier change (split it out)

  • The earlier timing evidence was gathered with the caps in place. Removing them can lift the critical-path shard's gain, or add flakiness, in ways that data does not show.
  • If both changes stay in one PR, the timing comparison cannot say which one caused the improvement or a regression.
  • Suggested approach: land the TUnit bump with adaptive parallelism and the caps unchanged, as described. Then remove the caps in a second PR that has its own CI runs and flake evidence. Alternatively, keep the caps and let adaptive parallelism raise the global limit only. For a measurement step, that is the more conservative design.
  • If the caps do go, replace the lost protection with something explicit. For example, keep one keyed [NotInParallel("timing")] group for the genuinely deadline-sensitive wire tests. Removing every guard at once will show up as intermittent failures that are hard to attribute.

3. sentinel-routing-regressions.yml is now unbounded (needs fixing)

  • Dropping --maximum-parallel-tests 2 leaves that workflow at TUnit's default of 2x the processor count. The adaptive env var is set only in ci.yml, so this workflow gets neither the old cap nor the adaptive controller.
  • The description says other workflows are unchanged. This one changed, and it runs the Testcontainers sentinel failover tests, which are timing-sensitive.
  • Either restore the flag or justify the removal with a run of that workflow.

4. Smaller points

  • Several [NotInParallel] attributes were removed in places like StackExchangeMigrationTests, ArgumentFormattingTests.SpanAndUtf8InterpolationAllocateNothing, and RespireHybridCacheTrackingFailureTests. Each one needs a reason it is now safe, such as running in a child process or not touching shared state. The annotated comments on the kept ones are good practice. The removed ones need equivalent justification in the description.
  • AGENTS.md says zero-allocation tests must be unkeyed [NotInParallel]. Check that ArgumentFormattingTests.SpanAndUtf8InterpolationAllocateNothing still meets that rule. It was unkeyed [NotInParallel] before, and the child-process probe may justify dropping it. If so, say so.
  • tests/Respire.Streaming.Tests/README.md was edited. Confirm that it and docs/ no longer refer to the deleted limit types.
  • The timing table is from one run and the description already calls it noise-prone. The head has changed since that run, so it needs re-measuring.

Verdict

Blocking until the PR text matches the head (version, caps, sentinel workflow) and the cap removal is either split out or backed by evidence from the current head. The core idea is sound. I found no leftover references to the deleted types in pr-head/, so a build break is unlikely.

Comment thread tests/Respire.Streaming.Tests/README.md Resolved
@thomhurst thomhurst changed the title ci: update TUnit to 1.90.1 and enable adaptive parallelism ci: update TUnit to 1.90.2, enable adaptive parallelism and drop load-only test throttles Dec 1, 2026
@thomhurst thomhurst changed the title ci: update TUnit to 1.90.2, enable adaptive parallelism and drop load-only test throttles ci: update TUnit to 1.90.5, enable adaptive parallelism and drop load-only test throttles Dec 5, 2026
@thomhurst

Copy link
Copy Markdown
Owner Author

Addressed the review of the throttle removals in 901d9b7 and the updated PR description.

  • The title and summary now identify TUnit 1.90.5. The timing sections identify which revisions were measured. The three-way comparison includes both fixed and adaptive runs after the broad throttles were removed, so the two effects can be considered separately. The recorded failures and incomplete runs remain visible.
  • Restored the two-test ceiling for the streaming assembly and the dedicated Sentinel regression workflow. The original streaming comparison recorded timeouts even with isolated databases. The README now explains that constraint. The Sentinel workflow matches the PR's base.
  • The three examples of removed serialization exercise independent state. StackExchangeMigrationTests creates a Roslyn workspace for each test. SpanAndUtf8InterpolationAllocateNothing measures allocations in a child process with WithoutConcurrentGc and a positive control. RespireHybridCacheTrackingFailureTests pauses its own Redis container and checks the ID of its own tracking task.

The earlier package comparison used the previous head. The PR's validation section records the focused checks for this revision.

@thomhurst

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-05T12:31:05.999690Z 901d9b7 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

I found nothing that needs action on head 901d9b7. I reviewed the diff and checked the head for leftovers. I did not build or run any tests.

  • Earlier finding addressed. Greptile's finding was that removing the streaming limit also removed it from local runs and test-full-net10.yml, where adaptive parallelism is off. The author restored the assembly-wide StreamingTestParallelLimit of two in 901d9b7, and the thread is resolved. README.md now describes the policy accurately, including that adaptive mode respects the ceiling.
  • No dangling references. TimingSensitive, DockerHeavy, ChildProcessProbes, ContainerTopology, ClientCacheHits, IsolatedProbe and "signalr-integration" no longer appear anywhere in pr-head. A grep for the first six names and the SignalR key found no matches, and a looser first grep only matched the unrelated RespireContainerTopology enum.
  • Opt-in scope. TUNIT_ADAPTIVE_PARALLELISM is set in ci.yml only. Local runs and test-full-net10.yml keep the default behaviour, which is what the restored streaming limit protects. The Sentinel regression workflow still passes --maximum-parallel-tests 2.
  • Narrowed serialization. The kept [NotInParallel] attributes have comments giving the shared-state reason: no-GC regions, process-wide RespireMetrics.Configure, unfiltered listeners, and filtered listeners moved onto a keyed group. That makes later removals easy to audit. Turning a bare [NotInParallel] into [NotInParallel(WorkerName)] is safe only for tests whose measurements are filtered by that name. The comments say these tests are filtered, and I didn't re-check each one.
  • Docs. README.md in the test project no longer carries the evidence narrative. The remaining issue link is in contributor-facing test docs, which AGENTS.md allows.

Suggestion (non-blocking): the PR description says known flakes were seen once. Consider filing issues for ConcurrentResponseBarriersAllocateNothingAfterInitialization and ClusterBackplaneTests.ClusterRoutesBroadcastMembershipAndClientResults(True, True), as AGENTS.md asks for problems noticed along the way, so they can be tracked if they recur.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 901d9b75c7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@thomhurst

Copy link
Copy Markdown
Owner Author

Filed both intermittent failures from the Claude review. #2823 records the no-GC region diagnostics from the adaptive networking run. #2824 records the SignalR HTTP 500 from the fixed-parallelism smoke run. Each issue links the failing job and identifies the tested commit.

@thomhurst
thomhurst marked this pull request as ready for review December 5, 2026 12:28
@thomhurst

thomhurst commented Dec 5, 2026 •

Copy link
Copy Markdown
Owner Author

Both reviewers cleared 901d9b75c. The PR is ready, but auto-merge remains blocked by #2821. The automatic Claude review ended in startup_failure before creating the required review check. The CI Passed job names that workflow as its sole failure. The manual review cleared the code but cannot satisfy the automatic check.

Once the maintainer resolves the Actions policy decision in #2821, restore the automatic review check, rerun the failed CI gate, and arm auto-merge on the reviewed head.

@thomhurst
thomhurst merged commit 34b9e73 into main Dec 5, 2026
75 of 76 checks passed

This branch was previously deployed

1 inactive deployment
Pull Requests — 901d9b75 Deployed Dec 5, 2026 by thomhurst via modularpipeline #6931
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant