Skip to content

ci: rebalance test shards 4→6 to cut wall-clock - #279

Merged
rbuergi merged 1 commit into
mainfrom
ci/rebalance-shards
Jul 5, 2026
Merged

rbuergi merged 1 commit into
mainfrom
ci/rebalance-shards

Conversation

@rbuergi

@rbuergi rbuergi commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

What

Raises SHARD_TOTAL 4 → 6 in dotnet-test.yml (matrix + env).

Why

From a real run: the 45 test projects split across 4 shards left shard 0 at 24m while shard 1 ran 10m — the whole run waits on the outlier (wall-clock ≈ build ~10m + slowest shard ≈ 34m). Spreading the ~38 light projects over 6 shards instead of 4 moves the extra light projects off the long-pole shard.

The existing heavy/light dual-counter balancing is preserved: at 6 shards the 7 heavies still spread ≤2/shard, the 3 ALC-heaviest (AI/FutuRe/Orleans) still land on distinct shards, and only one shard doubles up (Acme+Orleans). Tests stay serial within a shard (maxParallelThreads:1 — required for correctness), so more shards is the right lever.

The collector job fans in via testResults-shard* glob + needs: test, so it adapts to 6 shards with no change.

🤖 Generated with Claude Code
EOF

The 45 test projects were split across 4 shards; shard 0 ran 24m while shard 1 ran
10m — everyone waited on the outlier. Raising SHARD_TOTAL 4→6 spreads the ~38 light
projects over 6 shards instead of 4 (the extra light projects that padded shard 0 move
off it), while the heavy/light dual-counter still keeps the 3 ALC-heaviest
(AI/FutuRe/Orleans) on distinct shards and only one shard doubles up (Acme+Orleans).
Wall-clock ≈ build (~10m) + slowest shard, so cutting the long pole cuts the run.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces CI wall-clock time for the .NET test workflow by increasing the number of parallel test shards, improving distribution of light test projects while preserving the existing heavy/light weighted sharding strategy.

Changes:

  • Increased the test job matrix from 4 shards to 6 shards (shard: [0..5]).
  • Updated SHARD_TOTAL from 4 to 6 so the bash sharding logic assigns projects across 6 runners.
  • Updated inline workflow comments/diagram to reflect the new shard count and rationale.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Test Results (shard 2)

696 tests   - 416   694 ✅  - 417   1m 48s ⏱️ - 4m 48s
  9 suites  -   5     2 💤 +  1 
  9 files    -   5     0 ❌ ±  0 

Results for commit 3c02d31. ± Comparison against base commit c3d15ed.

This pull request removes 463 and adds 47 tests. Note that renamed tests count towards both.
MeshWeaver.Connection.SignalR.Test.SignalRMultiRemoteSelectionTest ‑ A_single_unkeyed_remote_serves_every_target
MeshWeaver.Connection.SignalR.Test.SignalRMultiRemoteSelectionTest ‑ A_target_owned_by_no_connected_remote_selects_none
MeshWeaver.Connection.SignalR.Test.SignalRMultiRemoteSelectionTest ‑ A_target_that_is_a_remote_itself_selects_it
MeshWeaver.Connection.SignalR.Test.SignalRMultiRemoteSelectionTest ‑ Each_target_routes_to_its_owning_remote
MeshWeaver.Connection.SignalR.Test.SignalRMultiRemoteSelectionTest ‑ No_remotes_or_null_target_selects_none
MeshWeaver.Connection.SignalR.Test.SignalRMultiRemoteSelectionTest ‑ Runtime_added_connections_select_by_owning_remote
MeshWeaver.ContentCollections.Test.ContentCollectionWriteIngestTest ‑ SaveFileAsync_ingests_the_article_without_the_watcher
MeshWeaver.ContentCollections.Test.ContentServiceDelegationTest ‑ ContentService_ShouldDelegateToParent
MeshWeaver.ContentCollections.Test.DocxConversionTest ‑ ContentAutocomplete_ExactMatch_Gets_Highest_Priority
MeshWeaver.ContentCollections.Test.DocxConversionTest ‑ ContentAutocomplete_Filters_And_Scores_By_Query
…
MeshWeaver.ContentCollections.Indexing.PostgreSql.Test.PostgreSqlChunkedContentVectorStoreTests ‑ Provision_Replace_GetHash_Search_AndReplaceAgain_NoDupes
MeshWeaver.ContentCollections.Indexing.PostgreSql.Test.PostgreSqlChunkedContentVectorStoreTests ‑ ReplaceWithEmptySet_ClearsHash_AndRemovesChunks
MeshWeaver.ContentCollections.Indexing.PostgreSql.Test.PostgreSqlContentChunkSchemaTests ‑ SchemaScript_DeclaresBothTables_HnswIndex_VectorWidth_AndHashGate
MeshWeaver.ContentCollections.Indexing.PostgreSql.Test.PostgreSqlContentChunkSchemaTests ‑ SchemaScript_ParameterisesTheVectorDimension
MeshWeaver.Hosting.Sqlite.Test.MemexInstanceBootstrapTest ‑ Instances_are_nodes_and_read_back_via_GetQuery
MeshWeaver.Hosting.Sqlite.Test.SqliteEventLogStoreTest ‑ Append_is_idempotent_by_path_kind_version
MeshWeaver.Hosting.Sqlite.Test.SqliteEventLogStoreTest ‑ ReadFrom_and_cursor_roundtrip
MeshWeaver.Hosting.Sqlite.Test.SqliteMonolithMeshTest ‑ Create_read_and_query_a_node_through_a_monolith_mesh_on_sqlite
MeshWeaver.Hosting.Sqlite.Test.SqliteQueryTests ‑ Query_nodeType_filters_by_type
MeshWeaver.Hosting.Sqlite.Test.SqliteQueryTests ‑ Query_scope_children_returns_only_direct_children
…

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Test Results (shard 3)

788 tests   - 951   788 ✅  - 950   3m 25s ⏱️ - 3m 31s
 10 suites  -   4     0 💤  -   1 
 10 files    -   4     0 ❌ ±  0 

Results for commit 3c02d31. ± Comparison against base commit c3d15ed.

This pull request removes 1067 and adds 116 tests. Note that renamed tests count towards both.
MeshWeaver.ContentCollections.Indexing.Graph.Test.ChatClientSummarizerTest ‑ BuildPrompt_TruncatesLongText
MeshWeaver.ContentCollections.Indexing.Graph.Test.ChatClientSummarizerTest ‑ Summarize_ReturnsModelText_AndPromptCarriesFileNameAndText
MeshWeaver.ContentCollections.Indexing.Graph.Test.ChatClientSummarizerTest ‑ Summarize_RoutesThroughHttpIoPool
MeshWeaver.ContentCollections.Indexing.Graph.Test.ContentChunkAutocompleteProviderTest ‑ Prefix_IsDocument
MeshWeaver.ContentCollections.Indexing.Graph.Test.ContentChunkAutocompleteProviderTest ‑ Query_DedupesByFile_OneCompletionPerFileKeepingBestChunk
MeshWeaver.ContentCollections.Indexing.Graph.Test.ContentChunkAutocompleteProviderTest ‑ Query_EmptyScope_ReturnsEmptySnapshot
MeshWeaver.ContentCollections.Indexing.Graph.Test.ContentChunkAutocompleteProviderTest ‑ Query_EmptyText_ReturnsEmptySnapshot
MeshWeaver.ContentCollections.Indexing.Graph.Test.ContentChunkAutocompleteProviderTest ‑ Query_ResolvesHitToDocumentNodeOfNearestFile
MeshWeaver.ContentCollections.Indexing.Graph.Test.ContentIndexingPipelineTest ‑ ReindexAll_IndexesEveryFile_UnchangedRerunSkipped
MeshWeaver.ContentCollections.Indexing.Graph.Test.ContentIndexingPipelineTest ‑ Upload_FiresIndexingActivity_WritesDocumentAndChunks
…
MeshWeaver.ContentCollections.Indexing.Test.ChunkNavigationStoreTest ‑ GetChunkCount_EqualsNumberOfChunks
MeshWeaver.ContentCollections.Indexing.Test.ChunkNavigationStoreTest ‑ GetChunkCount_UnknownFile_IsZero
MeshWeaver.ContentCollections.Indexing.Test.ChunkNavigationStoreTest ‑ GetChunk_OutOfRange_ReturnsNull
MeshWeaver.ContentCollections.Indexing.Test.ChunkNavigationStoreTest ‑ GetChunk_ReturnsChunkAtIndex
MeshWeaver.ContentCollections.Indexing.Test.ChunkNavigationStoreTest ‑ GetChunk_UnknownFile_ReturnsNull
MeshWeaver.ContentCollections.Indexing.Test.ContentChunkSearchTest ‑ Grammar_EmptyText_ReturnsHint_NoHits
MeshWeaver.ContentCollections.Indexing.Test.ContentChunkSearchTest ‑ Grammar_NamespaceFromDefault_WhenNoNamespaceToken
MeshWeaver.ContentCollections.Indexing.Test.ContentChunkSearchTest ‑ Grammar_NamespaceTokenWins_OverDefault
MeshWeaver.ContentCollections.Indexing.Test.ContentChunkSearchTest ‑ Grammar_NoNamespaceAndNoDefault_ReturnsHint_NoHits
MeshWeaver.ContentCollections.Indexing.Test.ContentChunkSearchTest ‑ Grammar_NoScope_DefaultsToSubtree
…

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Test Results (shard 1)

1 029 tests  +88   1 028 ✅ +267   3m 29s ⏱️ - 1m 1s
    8 suites  -  5       1 💤  - 179 
    8 files    -  5       0 ❌ ±  0 

Results for commit 3c02d31. ± Comparison against base commit c3d15ed.

This pull request removes 843 and adds 931 tests. Note that renamed tests count towards both.
MeshWeaver.BusinessRules.Test.FxConversionScopeTest ‑ Converts_via_cross_rate
MeshWeaver.BusinessRules.Test.ScopesTest ‑ RandomNumberIsCached
MeshWeaver.ContentCollections.Indexing.Test.ChunkNavigationStoreTest ‑ GetChunkCount_EqualsNumberOfChunks
MeshWeaver.ContentCollections.Indexing.Test.ChunkNavigationStoreTest ‑ GetChunkCount_UnknownFile_IsZero
MeshWeaver.ContentCollections.Indexing.Test.ChunkNavigationStoreTest ‑ GetChunk_OutOfRange_ReturnsNull
MeshWeaver.ContentCollections.Indexing.Test.ChunkNavigationStoreTest ‑ GetChunk_ReturnsChunkAtIndex
MeshWeaver.ContentCollections.Indexing.Test.ChunkNavigationStoreTest ‑ GetChunk_UnknownFile_ReturnsNull
MeshWeaver.ContentCollections.Indexing.Test.ContentChunkSearchTest ‑ Grammar_EmptyText_ReturnsHint_NoHits
MeshWeaver.ContentCollections.Indexing.Test.ContentChunkSearchTest ‑ Grammar_NamespaceFromDefault_WhenNoNamespaceToken
MeshWeaver.ContentCollections.Indexing.Test.ContentChunkSearchTest ‑ Grammar_NamespaceTokenWins_OverDefault
…
MeshWeaver.ContentCollections.Indexing.Graph.Test.ChatClientSummarizerTest ‑ BuildPrompt_TruncatesLongText
MeshWeaver.ContentCollections.Indexing.Graph.Test.ChatClientSummarizerTest ‑ Summarize_ReturnsModelText_AndPromptCarriesFileNameAndText
MeshWeaver.ContentCollections.Indexing.Graph.Test.ChatClientSummarizerTest ‑ Summarize_RoutesThroughHttpIoPool
MeshWeaver.ContentCollections.Indexing.Graph.Test.ContentChunkAutocompleteProviderTest ‑ Prefix_IsDocument
MeshWeaver.ContentCollections.Indexing.Graph.Test.ContentChunkAutocompleteProviderTest ‑ Query_DedupesByFile_OneCompletionPerFileKeepingBestChunk
MeshWeaver.ContentCollections.Indexing.Graph.Test.ContentChunkAutocompleteProviderTest ‑ Query_EmptyScope_ReturnsEmptySnapshot
MeshWeaver.ContentCollections.Indexing.Graph.Test.ContentChunkAutocompleteProviderTest ‑ Query_EmptyText_ReturnsEmptySnapshot
MeshWeaver.ContentCollections.Indexing.Graph.Test.ContentChunkAutocompleteProviderTest ‑ Query_ResolvesHitToDocumentNodeOfNearestFile
MeshWeaver.ContentCollections.Indexing.Graph.Test.ContentIndexingPipelineTest ‑ ReindexAll_IndexesEveryFile_UnchangedRerunSkipped
MeshWeaver.ContentCollections.Indexing.Graph.Test.ContentIndexingPipelineTest ‑ Upload_FiresIndexingActivity_WritesDocumentAndChunks
…
This pull request removes 180 skipped tests and adds 1 skipped test. Note that renamed tests count towards both.
MeshWeaver.Hosting.Monolith.Test.CircuitContextIsolationTest ‑ CircuitContext_DoesNotLeakAnotherUserAcrossAnAsyncLocalHop
MeshWeaver.Portal.E2E.BlazorVsNextCompareTest ‑ Compare_Blazor_Vs_Next_AcrossScreens
MeshWeaver.Portal.E2E.ChatAtAutocompleteTest ‑ TypingAt_SurfacesLocalPartitionNodes_AndSlashExpandsPartitions
MeshWeaver.Portal.E2E.ChatComposerRefocusTest ‑ Composer_AcceptsTyping_AfterClickingAwayAndBack
MeshWeaver.Portal.E2E.ChatComposerSwitchSelectionTest ‑ SlashCommands_OpenPicker_AndSelectionUpdatesStatusRow
MeshWeaver.Portal.E2E.ChatDelegationTest ‑ Coordinator_DelegatesToWorker_SubThreadSpawns_AndResultFlowsBack
MeshWeaver.Portal.E2E.ChatRepeatedlyNoVanishTest ‑ Chatting_FiveTimes_DoesNotVanishTheThread
MeshWeaver.Portal.E2E.ChatSurvivesSubmitTest ‑ SubmittingFirstMessage_KeepsTheChatVisible_NeverForceLoadsLogin
MeshWeaver.Portal.E2E.ClaudeCodeHarnessExecutesTest ‑ ClaudeCodeHarness_SubmitMessage_ExecutesRound_NoMcpConfigFailure
MeshWeaver.Portal.E2E.CollaborativeMarkdownE2ETests ‑ Change_Reject_DropsTheSuggestionAndLeavesTheDocument
…
MeshWeaver.Hosting.PostgreSql.Test.ConcurrentQueryDeadlockTests ‑ Query_ManyConcurrentBlockingSubscribers_AllComplete_NoDeadlock

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Test Results (shard 4)

   10 files     10 suites   4m 30s ⏱️
1 321 tests 1 321 ✅ 0 💤 0 ❌
1 360 runs  1 360 ✅ 0 💤 0 ❌

Results for commit 3c02d31.

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Test Results (shard 5)

862 tests   682 ✅  4m 14s ⏱️
  9 suites  180 💤
  9 files      0 ❌

Results for commit 3c02d31.

@github-actions

github-actions Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 0)

 10 files   -   5   10 suites   - 5   4m 56s ⏱️ +38s
631 tests  - 913  631 ✅  - 912  0 💤  - 1  0 ❌ ±0 
631 runs   - 952  631 ✅  - 951  0 💤  - 1  0 ❌ ±0 

Results for commit 3c02d31. ± Comparison against base commit c3d15ed.

This pull request removes 1051 and adds 138 tests. Note that renamed tests count towards both.
MeshWeaver.Autocomplete.Test.AutocompleteDelegationDeadlockTest ‑ DelegatedAutocomplete_ConcurrentRequests_DoNotDeadlock
MeshWeaver.Autocomplete.Test.AutocompleteDelegationDeadlockTest ‑ DelegatedAutocomplete_FanOutAcrossPartitions_DoesNotDeadlock
MeshWeaver.Autocomplete.Test.AutocompleteDelegationDeadlockTest ‑ DelegatedAutocomplete_NonexistentTarget_DoesNotHang
MeshWeaver.Autocomplete.Test.AutocompleteDelegationDeadlockTest ‑ DelegatedAutocomplete_RelativeContextSelfDelegation_ResolvesQuickly
MeshWeaver.Autocomplete.Test.AutocompleteIconTests ‑ Autocomplete_BasePathWithPrefix_ReturnsIcons
MeshWeaver.Autocomplete.Test.AutocompleteIconTests ‑ Autocomplete_BasePathWithPrefix_SearchesWithinPath
MeshWeaver.Autocomplete.Test.AutocompleteIconTests ‑ Autocomplete_CaseInsensitive_MatchesLowerInput
MeshWeaver.Autocomplete.Test.AutocompleteIconTests ‑ Autocomplete_ContainsMatch_FindsBySubstring
MeshWeaver.Autocomplete.Test.AutocompleteIconTests ‑ Autocomplete_EmptyPrefix_ReturnsIconsWhereAvailable
MeshWeaver.Autocomplete.Test.AutocompleteIconTests ‑ Autocomplete_LimitIsRespected
…
MeshWeaver.Connection.SignalR.Test.SignalRMultiRemoteSelectionTest ‑ A_single_unkeyed_remote_serves_every_target
MeshWeaver.Connection.SignalR.Test.SignalRMultiRemoteSelectionTest ‑ A_target_owned_by_no_connected_remote_selects_none
MeshWeaver.Connection.SignalR.Test.SignalRMultiRemoteSelectionTest ‑ A_target_that_is_a_remote_itself_selects_it
MeshWeaver.Connection.SignalR.Test.SignalRMultiRemoteSelectionTest ‑ Each_target_routes_to_its_owning_remote
MeshWeaver.Connection.SignalR.Test.SignalRMultiRemoteSelectionTest ‑ No_remotes_or_null_target_selects_none
MeshWeaver.Connection.SignalR.Test.SignalRMultiRemoteSelectionTest ‑ Runtime_added_connections_select_by_owning_remote
MeshWeaver.Hosting.Grpc.Test.MeshGrpcLiveTest ‑ Round_trips_over_a_real_kestrel_grpc_endpoint
MeshWeaver.Hosting.Grpc.Test.MeshGrpcTransportTest ‑ Participant_request_round_trips_through_the_grpc_transport
MeshWeaver.Hosting.Grpc.Test.MeshGrpcTransportTest ‑ Trusted_endpoint_identity_semantics
MeshWeaver.Hosting.Grpc.Test.MeshGrpcTransportTest ‑ Unregistered_message_type_forwards_between_participants_as_raw_json
…

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

   56 files  ±0     56 suites  ±0   22m 25s ⏱️ +3s
5 327 tests  - 9  5 144 ✅  - 9  183 💤 ±0  0 ❌ ±0 
5 366 runs   - 9  5 183 ✅  - 9  183 💤 ±0  0 ❌ ±0 

Results for commit 3c02d31. ± Comparison against base commit c3d15ed.

This pull request removes 9 tests.
MeshWeaver.Hosting.Monolith.Test.CompileLeafStabilityTest ‑ Kickoff_FreshNodeTypes_AllSettle_NoStall
MeshWeaver.Persistence.Test.FileSystemObservableQueryTests ‑ ObserveQuery_CRUDWithMultipleSubscribers_AllReceiveNotifications
MeshWeaver.Persistence.Test.FileSystemObservableQueryTests ‑ ObserveQuery_DisposalStopsNotifications
MeshWeaver.Persistence.Test.FileSystemObservableQueryTests ‑ ObserveQuery_FullCRUDCycle_EmitsCorrectNotifications
MeshWeaver.Persistence.Test.FileSystemObservableQueryTests ‑ ObserveQuery_MoveNode_EmitsDeleteAndCreate
MeshWeaver.Persistence.Test.FileSystemObservableQueryTests ‑ ObserveQuery_Read_EmitsInitialResults
MeshWeaver.Persistence.Test.FileSystemObservableQueryTests ‑ ObserveQuery_ScopeChildren_OnlyNotifiesDirectChildren
MeshWeaver.Persistence.Test.FileSystemObservableQueryTests ‑ ObserveQuery_ScopeExact_OnlyNotifiesExactPath
MeshWeaver.Persistence.Test.FileSystemObservableQueryTests ‑ ObserveQuery_Update_EmitsUpdatedNotification

♻️ This comment has been updated with latest results.

@rbuergi
rbuergi merged commit 3786e1e into main Jul 5, 2026
22 of 24 checks passed
@rbuergi
rbuergi deleted the ci/rebalance-shards branch August 5, 2026 10:44
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.

2 participants