|
18 | 18 | workflow_dispatch: |
19 | 19 | inputs: |
20 | 20 | runs: |
21 | | - description: 'Number of seeded interleavings to sweep' |
| 21 | + description: 'Number of seeded interleavings to sweep (at most 20000)' |
22 | 22 | required: false |
23 | 23 | default: '5000' |
24 | 24 | seed-start: |
25 | | - description: 'First seed in the sweep' |
| 25 | + description: 'First seed in the sweep (default: run number x 20000, a fresh range each run)' |
26 | 26 | required: false |
27 | | - default: '0' |
| 27 | + default: '' |
28 | 28 |
|
29 | 29 | permissions: |
30 | 30 | contents: read |
|
39 | 39 | runs-on: blacksmith-4vcpu-ubuntu-2404 |
40 | 40 | timeout-minutes: 20 |
41 | 41 | env: |
42 | | - TORTURE_RUNS: ${{ github.event.inputs.runs || '5000' }} |
43 | | - TORTURE_SEED_START: ${{ github.event.inputs.seed-start || '0' }} |
| 42 | + # Job-level env would override a value written to GITHUB_ENV, so the step below sets both values. |
| 43 | + RUNS_INPUT: ${{ github.event.inputs.runs || '5000' }} |
| 44 | + SEED_START_INPUT: ${{ github.event.inputs.seed-start }} |
| 45 | + # Each run owns the seed range [run_number * stride, run_number * stride + runs). |
| 46 | + SEED_STRIDE: '20000' |
44 | 47 | # Standard scheduled-lane artifact envelope (#1430) built via the shared |
45 | 48 | # scripts/lib/lane-envelope.ts (commit, tool/configHash, seed range, result); |
46 | 49 | # the seed sweep rides in the typed data payload. Emitted by the test and |
|
53 | 56 | - name: Setup toolchain |
54 | 57 | uses: ./.github/actions/setup-node-pnpm |
55 | 58 |
|
| 59 | + # A seed fully determines execution order, so a fixed range only re-proves old seeds. |
| 60 | + # Without an explicit start, each run sweeps its own disjoint range. |
| 61 | + - name: Choose the seed range |
| 62 | + run: | |
| 63 | + digits='^[0-9]+$' |
| 64 | + if [[ ! "$RUNS_INPUT" =~ $digits ]] || (( 10#$RUNS_INPUT < 1 || 10#$RUNS_INPUT > SEED_STRIDE )); then |
| 65 | + echo "::error::runs must be an integer from 1 to $SEED_STRIDE" |
| 66 | + exit 1 |
| 67 | + fi |
| 68 | + if [[ -n "$SEED_START_INPUT" && ! "$SEED_START_INPUT" =~ $digits ]]; then |
| 69 | + echo "::error::seed-start must be a non-negative integer" |
| 70 | + exit 1 |
| 71 | + fi |
| 72 | + seed_start="${SEED_START_INPUT:-$((GITHUB_RUN_NUMBER * SEED_STRIDE))}" |
| 73 | + echo "TORTURE_RUNS=$((10#$RUNS_INPUT))" >> "$GITHUB_ENV" |
| 74 | + echo "TORTURE_SEED_START=$((10#$seed_start))" >> "$GITHUB_ENV" |
| 75 | +
|
56 | 76 | - name: Run concurrency torture sweep |
57 | 77 | uses: ./.github/actions/run-gate |
58 | 78 | with: { gate: concurrency-torture } |
|
0 commit comments