Persist and resume model-free task validation - #2221
Merged
Conversation
rasdani
marked this pull request as ready for review
August 6, 2026 04:17
ApprovabilityVerdict: Needs human review This PR introduces a new persistence and resume feature for task validation, adding significant new functionality including file I/O operations, new CLI arguments, and workflow changes. The scope and complexity of the new capability warrants human review. You can customize Macroscope's approvability policy. Learn more. |
mikasenghaas
approved these changes
Aug 6, 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.
Summary
-o/--output-dir--resume RUN_DIRconfig replay and canonical resume selection: retain completed valid/invalid tasks; rerun missing, error, timeout, malformed, or torn records without duplicate final rowstask_key, count target/result multiplicity by key, and usedistributeto assign owed work across content-identical taskstask_key,distribute, andsplit_resumeinto sharedcli/resume.py; keep eval episode loading and validate result-row loading in their respective callers--only-goldand--only-setupmodes while preserving fresh per-check runtimes and teardownValidation
uv run pytest tests/ -m 'not e2e'— 910 passed, 67 deselecteduv run ruff check --fix .uv run ruff format --check .uv run ty check verifiersuv run pre-commit run --all-filesLive e2e note
The earlier full
uv run pytest tests/attempt reached 857 passing tests before the live e2e tail failed on expired/unauthorized model and Prime credentials and a missing Modal extra; it was stopped after the shared failure cause was established.Note
Medium Risk
Validate’s default behavior now always creates on-disk output and resume rewrites
results.jsonl; mistakes in row canonicalization could drop or duplicate work, though the logic mirrors proven eval resume patterns.Overview
Validate now writes durable run artifacts (
config.toml, incrementalresults.jsonl,summary.json,validate.log) under a defaultoutputs/<taskset>--validate/<uuid>path or-o/--output-dir, and supports--resume <dir>that replays the saved config and only re-runs tasks that are missing or ended in error/timeout (valid/invalid finals are kept). Task identity and owed-work spreading match eval: content hashes via sharedtask_keyanddistribute.Eval is refactored to import
task_key,distribute, andsplit_resumefrom newverifiers/v1/cli/resume.pyinstead ofcli/eval/resume.py; eval-specific episode loading stays incli/eval/resume.py.split_resumenow takes the CLI name for clearer usage errors.ValidateConfiggains runuuid,output_dir, and internalresumefields. The validate runner plans work from resume state, persists each finished task under a lock (with shielded writes), updates the live dashboard from kept rows, and prints the final summary on success; interrupt exits 130 with a pointer to partial results.Reviewed by Cursor Bugbot for commit 717a550. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add persist and resume support to the
validateCLI commandvalidatecommand now writes per-task results toresults.jsonland asummary.jsonincrementally as each task completes, using an output directory derived from the taskset name and a per-run UUID or an explicit-o <output-dir>flag.--resume <output-dir>flag reloads the prior run config and skips tasks that already have terminal outcomes, computing remaining work via content-based task keys (SHA-256 of sorted JSON).task_key,distribute,split_resume) are extracted from the eval CLI into a shared resume.py module and reused by bothevalandvalidate.KeyboardInterrupt, the CLI exits with code 130 and prints the partial results directory.validatenow always writes output files to disk; runs that previously produced no on-disk artifacts will now create a structured output directory.Macroscope summarized 717a550.