Skip to content

Core test suite is flaking under parallel shards — two unrelated tests failed docs-only PRs within an hour #834

Description

@rbuergi

Observation (2026-08-06)

Two docs-only PRs — changes that cannot touch runtime behaviour — went red on two different, unrelated tests within the same hour:

PR Change Failing test Symptom
#829 skills, .gitignore, Helm chart, one doc node DynamicGraphFileSystemPersistenceTest.FileSystem_Organizations_GetsHubConfiguration_FromCompiledAssembly (shard 2) Expected the observable to emit a value within 10s, but it did not
#832 one new markdown doc node CrossPartitionRealUserQueryTests.UnpinnedStructuredQuery_AsSystem_EmitsInitial (shard 5) Expected collection to contain an item matching the predicate because System sees every partition's rows

Both passed on re-run of the failed shard (#829 went 16/16 and merged).

Why this matters more than the individual tests

A flaky suite on docs PRs trains everyone to re-run red rather than read it — which is exactly how a real red gets waved through. It also costs a full shard re-run (several minutes) per occurrence, and it makes --auto merges stall unpredictably.

Two concrete leads

  1. Timeout budgets that assume an idle machine. FileSystem_Organizations_…FromCompiledAssembly performs a real on-demand Roslyn compile, and the assertion waits 10s while the test itself declares [Fact(Timeout = 20000)] — the inner wait is half the budget the author intended, so shard contention alone can fail it. Worth auditing Should().Emit() default waits in tests that compile or boot a mesh, and aligning them with the test's declared timeout rather than raising either arbitrarily.
  2. First-emission races in cross-partition queries. UnpinnedStructuredQuery_AsSystem_EmitsInitial asserts on the initial frame of a synced query. If the assertion can observe a partial first frame under load, that is a product-relevant race, not just a test bug — worth confirming the query gates its first emission until every sub-query has produced its Initial.

Lead 2 deserves a look before being written off as flake: "the first frame was incomplete under load" is the kind of thing that also bites a real page.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions