Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4145 +/- ##
===========================================
+ Coverage 50.63% 88.16% +37.52%
===========================================
Files 258 274 +16
Lines 14955 16393 +1438
Branches 2399 2689 +290
===========================================
+ Hits 7573 14453 +6880
+ Misses 6751 1271 -5480
- Partials 631 669 +38 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anth-volk
force-pushed
the
shard-pull-request-tests
branch
from
October 30, 2026 16:41
02e9925 to
e2e3640
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4144
Stacked on #4140.
Summary
Pull requests run the test suite in the same six shards as the release run, and check that each test ran in exactly one.
pr.yml'stestjob has the samestrategyaspush.yml'srelease-tests: a matrix ofshard_index1 to 6 withfail-fast: false. Its step still runsmake test, withPYTEST_ADDOPTS: -p tests.release_test_shard_pluginand the threeRELEASE_TEST_SHARD_*variables set asrun_release_tests.shsets them. Each shard uploads the tests it collected and ran as the artifactrelease-test-shard-<n>, with the same upload step as the release run.check-test-shards(new job) has the same steps ascheck-release-test-shards: it downloads the six reports and runspython -m scripts.release_test_shards check-coverage --shard-count 6. "CI complete" needs it. It has no condition of its own, so when a shard fails, or on a stacked pull request above the lowest one, it is skipped and "CI complete" fails.pr.ymljob must enforce a registered rule, soapi.quality.tests-passnow namescheck-test-shardstoo, and says each test runs in exactly one shard.docs/generated/rules.mdis regenerated.docs/engineering/skills/testing.mddescribes the pull request shards.The job runs
make testrather thanrun_release_tests.shbecause 34 rules inrules/registry.tomlnamepr.yml'stestjob with the invocationmake test, which the registry check looks for in the job's commands. The script's other work, removing deployment settings, has nothing to remove here: the pull request job sets none of them.Expected effect
Testtook 27.7 minutes. In release run 41063091599, the release shards took 2.9 to 5.3 minutes each.Environment variables
No new secrets or variables. The step's new variables are literals, or come from the matrix and
runner.temp. The job's secrets are unchanged, and each shard gets them the same way the single job did:POLICYENGINE_DB_PASSWORD,CODECOV_TOKEN,GCP_WORKLOAD_IDENTITY_PROVIDER,GCP_DEPLOY_SERVICE_ACCOUNT.OPENAI_API_KEY,PE_UK_PRIVATE_HF_READ_TOKEN(asHUGGING_FACE_TOKEN),POLICYENGINE_GITHUB_MICRODATA_AUTH_TOKEN.OLD_SIMULATION_GATEWAY_URL, set for the whole workflow.check-test-shardsreads no secrets.Unverified until this pull request's CI runs
This pull request sits above #4140, so its CI skips every job and "CI complete" fails by design until #4140 merges and this one is rebased.
check-test-shardspasses.Testing
test_pull_requests_run_the_tests_in_the_release_runs_shardsandtest_ci_complete_needs_every_pull_request_test_to_have_run_onceintests/unit/test_release_test_shards.pyboth failed:pr.yml'stestjob had no matrix, and there was nocheck-test-shardsjob.python scripts/run_quality_guards.py: every guard passed.python -m scripts.rules renderproduced thedocs/generated/rules.mdchange included here.ruff format --checkandruff checkon the changed test files, with the ruff versionuv.lockpins (0.15.12): clean.actionlint .github/workflows/pr.yml: clean.🤖 Generated with Claude Code