Repository navigation
3.x.x: give the PRISM PostgreSQL CI shards 45 minutes and balance them by measured duration (#647) - #648
Merged
Conversation
…m by measured duration (#647) Round-robin over the sorted target list put the qbit-prism-server lib (~5.5 min), compact_runtime_scale (~4 min, debug plus the optimized ignored run) and live_regtest (~11.5 min) on the same shard on every run since they are four apart in the list. That shard ran 25-30 min of tests and was cancelled at the job's 30-minute cap on slower runners, while the other three ran 7-16 min. The shard runner now assigns targets longest first, each to the shard with the least estimated time so far. The estimates are the measured durations of the five heavy targets from the 2026-10-01 shard logs and 20 s for every other target (their mean). Replaying those logs, the four shards come to 14.8, 16.8, 16.6 and 17.7 min of tests instead of 14.9, 29.2, 13.7 and 8.5. Each target still runs on exactly one shard, with its ignored selection on the same shard, so the gate-manifest proof is unchanged. Each shard's job summary now lists every command's duration, which is the data for the next re-measure. The job's cap goes to 45 minutes as an interim margin until the job summaries confirm the balance. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Oct 1, 2026
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.
Closes #647.
@Anatolie, as the CI-lane owner: please take a look.
Problem
Since 17:54Z on 2026-10-01, a
Rust PRISM PostgreSQL and multi-instance contractsshard has been cancelled at its 30-minutetimeout-minutescap on every3.x.xpush and on several PR runs. No test failed. Each cancellation also failsProve every Rust PRISM gated test executedandLint, compile, and test, so the base is red and merges are blocked.3.x.xpush, 369029255733.x.xpush, 369030324393.x.xpush, 36905260160live_regtest, inorphan_disposition_migrationstratum_protocollive_regtest weighted_recipients_tests::real_weighted_recipients_pay_exact_pplns_outputs_through_fanout_spendwas silent for more than 3m46s; the same test took 58.5 s on the previous head, where shard 2 finished in 25 minThat weighted-recipients test passed in 5 of the 7 runs since then, in about 60 s. So this is runner variance against a tight cap, not a deterministic hang from #642.
Why one shard is always slow. The per-command times in the shard logs of runs 36895086515, 36898476468, 36903032439 and 36905260160 show it.
scripts/run_rust_test_shard.pyassigned the sorted target list round-robin. The three heaviest targets, theqbit-prism-serverlib tests (~5.5 min),compact_runtime_scale(~4 min, with its optimized--ignoredrun) andlive_regtest(~11.5 min), sit a multiple of four apart in that list. They have landed on the same shard in every run, which spends 25–30 min in tests, while the other three spend 7–16 min. Times include each target's build.Change
live_regtest700 s, the server lib 330 s,candidate_storm_restart270 s,compact_runtime_scale240 s,ledger_postgres210 s) and 20 s for every other target, which is their mean. Each shard still runs its targets in sorted order.--ignoredselection stays with it, and new targets still join automatically.prism-integration-proofchecks the union of the manifests as before.timeout-minutesgoes from 30 to 45 for this job only, as an interim margin with a comment naming 3.x.x: PRISM PostgreSQL CI shards are cancelled at their 30-minute cap on slow runners (shards 0 and 2, three times on 2026-10-01) #647. It can come back down once the job summaries confirm the balance. No other job's timeout changes: none showed this pattern in the logs.docs/prism-integration-test-gate.mdnow describes the balancing instead of round-robin.Tests
python3 -m unittest tests.test_run_rust_test_shard: 7 OK. Two of them are new:test_heavy_targets_spread_across_shards_and_loads_stay_balanced: the four heaviest targets land on four different shards, every target lands on exactly one shard, and no shard's estimate exceeds the heaviest target plus one light one. It fails against the old round-robin.test_job_summary_records_each_command_duration_even_on_failure: a header and one row per command run, including the failing one, and nothing for--dry-run.python3 scripts/run_rust_test_shard.py --helpworks.--dry-runfor shards 0–3 against the real workspace gives 18, 37, 39 and 35 commands. That is 129, the 125 targets plus the 4 ignored selections, with no duplicates. Each heavy target is on its own shard exceptcompact_runtime_scaleandledger_postgres, which share shard 3.python3 -c 'import yaml; yaml.safe_load(open(".github/workflows/ci.yml"))': parses.scripts/check_gate_env_reads.py,check_toolchain_pin.py,check_prism_settings.py,check_deleted_test_map.py,check_version_skew.pyandcheck_e2e_scenarios.py: ok.tests.test_check_deleted_test_map,test_check_gate_manifest,test_check_e2e_scenarios,test_check_gate_env_reads,test_prism_container_hardening,test_install_prism_qbit,test_qbit_image_runtime_smoke,test_check_toolchain_pin,test_check_version_skewandtest_prism_load_bridge: all OK.Not run here and why
Merge notes
scripts/run_rust_test_shard.pyis a snapshot. When a shard drifts toward the cap, re-measure from the job summaries.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.