Skip to content

Add resumable CC:Ladder runs (ladder run --resume)#118

Merged
john-b-yang merged 2 commits into
mainfrom
john/ladder-resume
Jul 9, 2026
Merged

Add resumable CC:Ladder runs (ladder run --resume)#118
john-b-yang merged 2 commits into
mainfrom
john/ladder-resume

Conversation

@john-b-yang

Copy link
Copy Markdown
Contributor

Resume an interrupted codeclash ladder run in place instead of restarting from rung 1.

Usage

  • uv run codeclash ladder run <config> --resume <interrupted-run-log-dir>

How it works

  • Reuses the interrupted run's log dir and push branch (dir name = branch name).
  • Scans per-rung metadata.json to find the first not-yet-cleared rung + the climber's codebase tag at the last cleared rung; skips cleared rungs and seeds from that tag via branch_init.
  • First resumed rung force-resets the branch (--force-with-lease) to discard the interrupted rung's partial pushes; later rungs fast-forward.
  • Clears the interrupted rung's partial dir so it re-runs cleanly.

Checks (fail fast)

  • Requires push: True (pushed branch + round tags are the codebase store).
  • Refuses if the run already finished (top-level metadata.json present) or ended on a clean loss / full clear.
  • --resume dir must contain a rung matching the config.

Notes

  • Zero new bookkeeping in normal runs — resume is derived entirely from artifacts already written (ladder_advancement.cleared, pushed round_tags, and the top-level summary as done-marker).
  • Touches 3 files: cli/ladder.py (flag), tournaments/ladder.py (resume logic), agents/player.py (force_push).
  • Scan logic verified across scenarios (interrupted-between-rungs, crashed-mid-rung, clean-loss, all-cleared, empty); not yet exercised end-to-end with Docker.

@john-b-yang john-b-yang merged commit 3fc2249 into main Jul 9, 2026
5 checks passed
@john-b-yang john-b-yang deleted the john/ladder-resume branch July 9, 2026 20:36
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