Skip to content

Prune Trial Harness caches and completed Experiment repositories - #1361

Merged
JacobStephens2 merged 2 commits into
mainfrom
issue-1360
Oct 26, 2026
Merged

JacobStephens2 merged 2 commits into
mainfrom
issue-1360

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

Trial session ends → remove Harness caches; retain native transcripts and Session evidence
grading + all rechecks complete → remove every attempt's repository/
paused/interrupted or waiting on rechecks → retain repositories
pruning fails → warning only

The outer runner also handles older Arms and failed sessions. Reopening a completed Experiment retries repository cleanup. The guide and hand-written site pages describe retention.

Closes #1360

Evidence

  • Before: the final-Verdict regression failed because an attempt retained repository/; the session-outcome regression failed because .codex/cache/ remained.
    After: both regressions pass; all 19 Trial execution tests and 84 Experiment CLI tests passed (1 subprocess helper ignored).
  • Before: the Spec review's exact command, cargo test --bin thirdshift evals::experiment::execution::tests::ended_muse_trial_drops_model_catalog_cache -- --exact --nocapture, failed with ended Muse Trial retained its model catalog cache.
    After: the same command passes, preserving the sibling native transcript. The regression is retained.
  • cargo check passed. CLI coverage checks retained Session contents, interruption/resume without replaying finished Trials, borderline rechecks, warning-only failures and cleanup retry.
  • Final /usr/bin/time -p scripts/affected-tests main passed: 3,092 Rust tests (69 skipped) and 50 site tests. Total wall time was 1,876.48 seconds, including browser checks and compilation. The selected cargo nextest run reported 1,711.525 seconds of execution plus 1m 35s of compilation.

Merge Danger

Door: one-way

Completed attempt repository copies are deleted. Rolling back the code cannot restore those copies; Session evidence, reports, packets and Scores remain.

Blast Radius: Experiments

Test seams

  • Trial Execution through its completion callback and retained attempt files, using a scripted Arm process.
  • thirdshift experiment, experiments [--session] and recheck through the CLI and retained Experiment files, using fake Harnesses.

Review coverage

Independent Standards and Spec reviews used git diff main...HEAD. Standards: 0 findings. Spec: 1 finding, reproduced and fixed (Muse's cached model catalog). Both reviewers read all 13 changed files, including the generated HTML and the correction. Unread changed files: none. Generated-output exclusions: none.

Unaddressed findings

  • Standards: none.
  • Spec: none.
  • Security: none. Guidance-mode review of the new deletion code (src/evals/experiment/retention.rs plus its three call sites): symlink-redirect probes showed remove_dir_all removes only the link and never the target (leaf dir-link, leaf file-link, inner links), cache ancestors are checked with symlink_metadata, non-dir entries are skipped, and prune-too-early guards (Completed, no pending rechecks, not waiting_on_rechecks) are covered by the retention/recheck suites. No introduced finding to fix, so none is unaddressed.

Built with codex codex-cli 0.164.0 · gpt-6.1-sol · xhigh

Security review outcome

No unaddressed introduced findings.

@JacobStephens2
JacobStephens2 merged commit 4c780ad into main Oct 26, 2026
18 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1360 branch October 26, 2026 06:04
@JacobStephens2 JacobStephens2 mentioned this pull request Oct 26, 2026
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.

Experiments keep every Trial's repository copy and Harness cache after the Verdict

1 participant