Skip to content

ops(004): the parallel seed run fits the runner's disk - #460

Merged
bartekus merged 2 commits into
mainfrom
ops/004-seeds-disk
Nov 3, 2026
Merged

bartekus merged 2 commits into
mainfrom
ops/004-seeds-disk

Conversation

@bartekus

@bartekus bartekus commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

On 2026-11-02 the merge queue dropped entries because runners ran out of disk. Two of the failures (#440, #446) came from the spec 029 seeds: seeds.py copied the warm target directory into the second worker's target and hit [Errno 122] Disk quota exceeded. The copy failing took the whole acceptance group down with it.

Change (crates/rustev-eval/mutation/seeds.py)

  • The warm target copy leaves out incremental directories. That state belongs to the workspace crates, which every worker rebuilds on its first seed anyway.
  • If a copy still fails, that worker and the ones after it are dropped and the run continues on fewer workers. Fewer workers is only slower. The summary line already reports the worker count.

Unchanged: the seeds, their anchors, the required categories, the verdict rules and the filters. Spec 004's implementation record has a line for the change.

Verification

  • make gate and scripts/check-authored-content.sh pass.
  • A local fault-injected run that forces the copy to fail is in progress; its result goes in a comment.
  • CI: this PR's run, then the merge queue's verify / acceptance (evaluation) and (cli-backends) jobs.

The warm target copy leaves out incremental state, and a copy that fails
drops that worker and the rest instead of failing the run. On 2026-11-02
"Disk quota exceeded" in this copy failed two merge-queue entries.
@bartekus

bartekus commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

Local fault-injected check: with shutil.copytree forced to raise [Errno 122] Disk quota exceeded on the warm-target copy, SEEDS_JOBS=2 seeds.py "spec 029" printed seeds: copying the warm target failed ([Errno 122] Disk quota exceeded); running on 1 worker(s) and then seeds: 8/8 detected (1 worker(s)), exit 0. Before this change the same failure ended the acceptance group.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

AI review (findings)

Reviewing the two changed files.

specs/004-evaluation-and-replay/spec.md: The implementation record entry is consistent with the code change and the governance rule that implementation records document completed work. No issue.

crates/rustev-eval/mutation/seeds.py: The logic change introduces a concrete defect in its cleanup path.

When shutil.copytree fails for worker i, the except-block removes only that worker's target dir and source dir, then calls break. Any workers beyond i in the original trees list were created earlier in the script (their source directories already exist on disk) but are never iterated after the break, so their source trees are never cleaned up.

The scenario driving this change is a disk-full condition. Leaving the un-attempted workers' source directories on the already-full disk directly contradicts the comment's stated intent ("drops that worker and the rest") and makes the space situation worse. A correct implementation would iterate the remaining entries before breaking (or after) and call shutil.rmtree on each un-attempted other_src.

Estimating the break at approximately line 818 in the new file based on the hunk offset (+802) plus the added lines preceding it.

{"head": "1453cfa37a519e151002c0485a33856374bd896a", "verdict": "findings", "findings": [{"path": "crates/rustev-eval/mutation/seeds.py", "line": 818, "summary": "On copytree failure the break exits the loop without cleaning up the source directories of un-attempted workers (trees[i+1:]), leaving them on the disk whose fullness triggered the failure."}]}

Subject: 9fca258...1453cfa, diff digest ca90b5811c5cf1b8e29d68c8493783d03659a7a8499a6c176d02c03ab8354498, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus had a problem deploying to statecraft-review-exception November 2, 2026 23:54 — with GitHub Actions Error
When the warm target copy fails, the trees of the failed worker and of every worker not yet attempted are removed before the run continues, instead of staying on the full disk until the run ends.
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

AI review (no-findings)

Reviewing the two changed files.

crates/rustev-eval/mutation/seeds.py

The new copy-with-fallback loop uses enumerate(trees[1:], start=1), so j indexes into the original trees list exactly (j=1 → trees[1], j=2 → trees[2], …). When the copy for trees[j] fails, trees[j:] covers the partially-written current tree plus all not-yet-attempted trees. kept at that point holds only successfully-copied trees, so trees = kept leaves a consistent reduced worker set. The n = len(trees) update lands before the queue/results block downstream. Logic is correct.

The error-string extraction e.args[0][0][2] is guarded by isinstance(e, shutil.Error) and e.args and e.args[0]; shutil.Error always stores (src, dst, error_string) triples, so index [2] is safe. Plain OSError falls through to str(e). shutil.Error is a subclass of OSError, so the single except OSError catches both forms. The ignore_errors=True on the cleanup rmtree calls handles both partially-created and never-created target directories cleanly.

specs/004-evaluation-and-replay/spec.md

The implementation-record entry accurately describes the change (incremental-state exclusion, disk-full fallback, which queue entries were affected). It does not alter any normative text or lifecycle fields.

No concrete defects found.

{"head": "004997aa3beee53d8c1a7df0318c77d7238f5cd1", "verdict": "no-findings", "findings": []}

Subject: 9fca258...004997a, diff digest bbbc124083c3c1beffa8144d93efccdab69854fe253443c174d85c267d305d75, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit ae717a1 Nov 3, 2026
56 of 60 checks passed
@bartekus
bartekus deleted the ops/004-seeds-disk branch November 3, 2026 03:41
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