Skip to content

fix(ci): run an unmapped ordinary shard instead of escalating every pr - #2217

Closed
ooples wants to merge 1 commit into
masterfrom
fix/ci-map-shard-churn
Closed

ooples wants to merge 1 commit into
masterfrom
fix/ci-map-shard-churn

Conversation

@ooples

@ooples ooples commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Problem

Every pull request has run the full matrix (209 shards) since #2173 merged, with:

the shard map ... could not be trusted - running the full matrix
(The map is missing ordinary workload 'Sweep - ParameterCountContractTests 0/8'; auxiliary rollout cannot repair that.)

Complete-CiMapWorkloads threw whenever the manifest named an ordinary shard the certified map had never measured. Selection caught the throw and escalated the whole PR. The nightly certification replays through the same function, so the map could not catch up either. The manifest grew 116 → 161 → 164 → 209 between 09-15 and 09-17.

Measured over 71 PR runs since 09-08: 13 reduced, and 7 of those were canary/proof branches. Since 09-16, every PR that reached a decision escalated.

Change

An unmeasured workload of any kind now joins alwaysRun: it runs on every selection until a map includes it, and no coverage is invented for it. Auxiliary workloads were already handled this way, and Select-Shards.ps1 already had Add-UnmappedShardsAsAlwaysRun for the same purpose. The throw pre-empted it. Malformed kinds and map shards the manifest no longer has are still rejected.

Evidence (production data, not fixtures)

The selector was replayed inside each PR's GitHub merge ref, using that tree's own test-shards.yml and the certified map CI uses today (run 35047041346, 116 shards). Arms were master's tools/TestImpact versus this branch's.

PR master this branch
#2214 (2 files) escalated, 209 99 (96 unmapped + 3)
#2204 (1 file) escalated, 209 97 (96 + 1)
#2100 (5 files) escalated, 209 98 (96 + 2)
#2174 (18 files) escalated, 209 126 (96 + 30)
#2185 escalated, 209 escalated: adds a test project no map shard executes (correct)
#2183 escalated, 209 escalated: generator change + new test project (correct)

The master arm reproduces the production message exactly. Test-CiWorkloads.ps1 fails on master's CiWorkloadKinds.ps1 and passes here. Select-Shards -SelfTest, Test-TestImpactEndToEnd, Test-CiImpactWorkflow, Test-CiPolicyImpact, Test-AuxiliaryInventory, Test-AuxiliaryEvidence and Test-CiGateModes pass locally.

Not fixed here

The 96 always-run shards are the cost of a map that predates them. They leave only when a map is certified on the current manifest. The nightly harvest still rejects any coverage run whose shard list differs from master's (used a different shard manifest), so one test-shards.yml edit during the ~24-hour dispatch-and-harvest window delays the map another day. A follow-up PR makes the harvest accept per-shard-unchanged coverage.

This PR changes selection tooling, so its own run escalates to the full matrix by design.

🤖 Generated with Claude Code

Complete-CiMapWorkloads threw when the manifest named an ordinary shard the
certified map had never measured. Selection caught that and ran the full
matrix, so every pull request escalated from the moment a shard was added
until a new map was certified - and certification replays through the same
function, so the map could not catch up. The manifest grew 116 -> 209
between 2026-09-15 and 09-17 and no pull request reduced.

An unmeasured workload now joins alwaysRun, exactly as auxiliary workloads
already did: it runs on every selection until a map includes it, and no
coverage is invented for it. Malformed kinds and shards the manifest no
longer has are still rejected.

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

vercel Bot commented Sep 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
aidotnet_website Ready Ready Preview Sep 17, 2026 2:35pm UTC
aidotnet-playground-api Ready Ready Preview Sep 17, 2026 2:35pm UTC

@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 37 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: aabd3eba-b43e-434f-9db8-f24cca477d6b

📥 Commits

Reviewing files that changed from the base of the PR and between 3774a82 and 0c5b861.

📒 Files selected for processing (3)
  • tools/TestImpact/CiWorkloadKinds.ps1
  • tools/TestImpact/Select-Shards.ps1
  • tools/TestImpact/Test-CiWorkloads.ps1

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

Comment @coderabbitai help to get the list of available commands.

@ooples

ooples commented Sep 17, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #2220, which contains this commit (0c5b861) plus the harvest fix it needs. Closing to free the shared runner queue.

@ooples ooples closed this Sep 17, 2026

This branch was successfully deployed

2 active deployments
Preview – aidotnet-playground-api 0c5b8613 Deployed Sep 17, 2026 by vercel[bot]
Preview – aidotnet_website 0c5b8613 Deployed Sep 17, 2026 by vercel[bot]
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