Action matrix: nightly shards cut by measured cost, a fresh baseline, and a determinism check (#1256)
* Action matrix: nightly shards cut by measured cost, heavy designs in slices, and a determinism check
The full matrix ran as four fixed quarters of the corpus and two of them hit the 60-minute
job limit. Now action_matrix_shard runs shard k of n (ACTION_MATRIX_SHARD=k/n), planned from
tests/action_matrix/costs.json: designs that take more than five minutes are split into slices,
and the pieces go largest first to the least loaded shard. The nightly runs 12 shards and uploads
each one's outcomes and timings; cargo xtask action-matrix --from DIR --bless records them in the
baseline and costs.json without running the matrix again. action_matrix_determinism runs a sample
twice and lists any action whose outcome changed.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Action matrix: costs measured on runners, 10 shards, determinism on the lighter designs
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Action matrix: baseline and costs from a full run on main, 16 shards, timeouts listed
The baseline is regenerated from the 10 shards' results of a full run on 01b1b705
(cargo xtask action-matrix --from DIR --bless): 8 new designs, 302 actions that pass now,
names that changed, and 40 actions that passed before and fail now, each listed in #1255
(22 fillets refused since #949, 4 hinge blends since #1101, 9 on the loft cut, 5 single).
costs.json now holds every design's measured time, and the nightly runs 16 shards of about
17 minutes. An action that passes in the baseline and times out is listed but not judged,
and stays passing when blessed: two runs of the same build differed only on 10 actions that
took 50-84 s against the 90 s limit.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Action matrix: slice heavy designs by a hash of each action's name
Slicing by index gave some slices only fillets on oracle 41 (28 slices, a multiple of the
actions per edge), three times the planned time; two shards ran past their limit.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
16c49c3e86
commit
c159a3e277
6 files changed
+2487
-1936
No files matched your search
+18
-6
@@ -9,11 +9,21 @@ The test is [`apps/solidcraft-cli/tests/action_matrix.rs`](../apps/solidcraft-cl
|
||||
## Running it
|
||||
|
||||
- **Every CI run** (pull requests too) checks a fixed sample, one action in 40 by a stable hash of
|
||||
its name, on every design except the seven slowest to build (`action_matrix_sample`, under a
|
||||
minute).
|
||||
- **Nightly** (and by hand, Run workflow), the "Action matrix" job runs the whole matrix in four
|
||||
parts (`action_matrix_full_1` to `_4`).
|
||||
- **Locally**: `cargo xtask action-matrix` runs it whole (about 22 minutes with six designs at a time on a 16-core machine). Add `--bless` to
|
||||
its name, on every design except the slowest to build (the `SLOW` list, and any design that
|
||||
takes more than 8 s to load in costs.json; `action_matrix_sample`, a few minutes).
|
||||
- **Nightly** (and by hand, Run workflow), the "Action matrix" jobs run the whole matrix in 16
|
||||
shards (`action_matrix_shard` with `ACTION_MATRIX_SHARD=k/16`) of about equal cost, cut by
|
||||
[`tests/action_matrix/costs.json`](../tests/action_matrix/costs.json): what each design took on a
|
||||
runner. A design that takes more than ten minutes is split into slices (actions by a hash of their name, each
|
||||
slice loading the design again), and the pieces go largest first to the shard with the least
|
||||
work. A design not in costs.json yet counts as two minutes. Each shard uploads its outcomes and
|
||||
timings (artifact `action-matrix-k`); with all sixteen in one folder,
|
||||
`cargo xtask action-matrix --from DIR --bless` writes the baseline and costs.json from them
|
||||
without running anything. `ACTION_MATRIX_SHARD=k/n ACTION_MATRIX_SHARD_LIST=1` prints the plan.
|
||||
- **Determinism** (nightly, "Action matrix determinism"): `action_matrix_determinism` runs one
|
||||
action in 8 of every design that takes at most five minutes twice on one runner and lists every action whose outcome changed; it fails when a
|
||||
family of pieces passes a different number of times.
|
||||
- **Locally**: `cargo xtask action-matrix` runs it whole (a few hours on one machine now; the nightly shards' artifacts and `--from` are quicker). Add `--bless` to
|
||||
rewrite the baseline after a fix (newly passing actions are listed when you don't), and
|
||||
`--results FILE` to keep every outcome with its message and the command that was sent.
|
||||
`ACTION_MATRIX_FILTER=oracle/23` runs only the designs whose name contains it;
|
||||
@@ -28,7 +38,9 @@ The test is [`apps/solidcraft-cli/tests/action_matrix.rs`](../apps/solidcraft-cl
|
||||
(from `apps/solidcraft-cli`).
|
||||
|
||||
Each design runs in its own process, so an action that hangs (90 s without a result) or aborts is
|
||||
recorded as `timeout` or `crash` and the rest of the design still runs. Loading a design, before
|
||||
recorded as `timeout` or `crash` and the rest of the design still runs. An action that passes in the baseline and
|
||||
times out is listed but not judged (and stays passing when blessed): the slowest actions take 40 to
|
||||
80 s on a busy runner and land either side of the limit from night to night. Loading a design, before
|
||||
its first action, may take up to 300 s (the largest take several times longer on a loaded CI
|
||||
runner than here). None did in this run.
|
||||
|
||||
|
||||
Reference in new issue
Block a user