Skip to content

fix(results): split mix partitions by a committed durations file - #152

Merged
calvin-archastro merged 1 commit into
mainfrom
feat/partition-timings-file
Oct 16, 2026
Merged

calvin-archastro merged 1 commit into
mainfrom
feat/partition-timings-file

Conversation

@calvin-archastro

Copy link
Copy Markdown
Contributor

Merge order: independent of #148; merge either first. #148's guide section "Balanced partitions" is updated to describe this file, so merge this before or with #148.

Fixes the open risk in #149 (T24 of test tracking): a shard that could not reach aster-srv fell back to Mix's split while the others balanced, so files ran on two shards or none.

What changes

before:  shard ──GET /durations──▶ aster-srv     (per shard, can fail alone)
after:   scheduled job: aster results durations ──▶ aster-durations.json ──▶ PR
         shard ──reads──▶ aster-durations.json   (same bytes on every shard)
  1. Shards read aster-durations.json at the workspace root, keyed by suite directory (services/platform). No network at run time; .aster/durations/ cache and commit-day lookup removed.
  2. aster results durations [--url] finds every MIX_TEST_PARTITION=K mix test --partitions N suite, fetches medians from GET /v1/test-results/durations, writes the file sorted and pretty (clean diffs). Any fetch failure leaves the file unchanged and exits 1.
  3. Fallbacks are uniform: no file, suite missing, malformed or newer-version file, ASTER_BALANCE_PARTITIONS=off → Mix's own split on every shard.
  4. Docs: server README explains the file and gives a weekly refresh workflow; spec T24 updated.

Verification

  • tests/test_results.rs::shards_split_by_the_committed_durations_file_without_a_server: real binary, fake mix on PATH and fake server. No file → Mix split; aster results durations writes the file (asserts the request targets); then both shards run disjoint file lists with no server configured.
  • Unit tests: file round trip, broken/newer file is an error, missing credentials, suite discovery, every fallback.
  • fmt, clippy -D warnings, rustdoc clean; workspace tests pass except dev_services::dynamic_port_bundles…, which fails locally on main too.

Rollout (firstlanding)

  1. Release aster, bump ASTER_VERSION.
  2. Run aster results durations once and commit aster-durations.json; add the scheduled refresh workflow.
  3. Until the file lands, shards keep Mix's split (no regression).

🤖 Generated with Claude Code

Each shard fetched durations from aster-srv while it ran and fell back to
Mix's split on any error, so one shard that could not reach the server
split differently from the rest and a file ran on two shards or none.
Shards now read aster-durations.json from the checkout, which every shard
of a commit shares, and `aster results durations` writes it from the
server's medians for every partitioned suite in the workspace, to be
committed on a schedule. Every fallback (no file, suite missing, broken
file, ASTER_BALANCE_PARTITIONS=off) now applies to all shards alike.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@calvin-archastro
calvin-archastro requested a review from a team October 15, 2026 20:35
@calvin-archastro
calvin-archastro merged commit d1fbc4e into main Oct 16, 2026
12 checks passed
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