Skip to content

Action budget, slice 3b: resume from a checkpoint on re-dispatch (or say why not) #1706

Open
0 of 2 issues completed

Description

@don-petry

Story

As a maintainer re-dispatching an issue after a timeout,
I want the new pass to resume from the checkpoint branch rather than starting from zero,
so that a timeout costs the remaining work, not all of it.

Split from #1660 (slice 3a), which delivers the checkpoint push itself. Blocked by #1660 — there is nothing to resume from until checkpoints exist.

Scope

Given a marked, incomplete checkpoint branch left by a timed-out pass (#1660), a re-dispatch of the same issue either resumes from it or states explicitly that it is starting clean and why. Silently ignoring an existing checkpoint is the failure this closes.

Acceptance Criteria

  1. On dispatch, the run detects an existing checkpoint branch for the same issue (the marker convention Action budget, slice 3a: checkpoint-push partial work before the budget expires #1660 establishes — reuse it, do not invent a second one).
  2. When resuming is safe, the pass starts from the checkpoint branch and its opening notice says so, naming the branch and the checkpoint commit.
  3. When resuming is not safe, the run starts clean and says why, in the issue notice — never silently. At minimum, treat these as unsafe: the checkpoint's base has diverged from the target branch; the checkpoint fails a structural sanity check; or the issue body changed materially since the checkpoint.
  4. A resumed pass is still subject to every completion gate — resuming must not inherit "already addressed" state. In particular it must not allow review-thread resolution on the strength of the earlier partial pass (dev-lead resolves review threads without addressing them — unfixed findings merge through the thread-resolution gate #1621/[#1621 S1] Harness-only thread resolution: remove the model's resolveReviewThread path #1691: resolution is harness-only and gated on a complete pass).
  5. Stale checkpoints are bounded: a checkpoint older than a configurable age is not resumed, and is reported as skipped with its age.
  6. Fail safe — any inability to evaluate the checkpoint results in a clean start with a stated reason, never a silent resume of unknown state.
  7. Tests: resume from a valid checkpoint; refuse a diverged one; refuse an over-age one; a clean start when none exists; and the resolution gate stays closed for a resumed pass.

Tasks / Subtasks

Dev Notes

References


Split 2026-09-13: this is now a tracking parent

The single pass timed out at the 2700s action budget (run 34473748744, 2026-09-10). Following this issue's own Dev Notes, it is split along the safe seam: detection plus clean-start-with-reason first, actual resume second.

Do not implement from this parent. It closes when both slices land.

Activity

  1. don-petry commented on Sep 10, 2026

    @don-petry
    CollaboratorAuthor

    [Retracted 2026-09-10 — superseded] This completion claim was published before the work was durable. The run subsequently ended without landing anything on main (reason=timeout, run=34473748744), so it produced nothing. The claim is struck in place (not deleted) per this repo's dated-correction convention; see the needs-human escalation on this issue for status.

    Dev-Lead Implementation Plan [RETRACTED]

    Issue: #1706 — Action budget, slice 3b: resume from a checkpoint on re-dispatch (or say why not)

    Scope

    On dispatch, dev-lead-fix-issue.sh detects an existing checkpoint branch (the #1660 checkpoint(dev-lead): INCOMPLETE — marker), evaluates it for safety (base divergence, structural sanity, issue-body drift, age), and either resumes from it with a stated notice or starts clean with a stated reason — never silently — while keeping every completion gate intact.

    Implementation Checklist

    • scripts/lib/checkpoint-resume.sh (new) — PURE helpers: checkpoint_body_fingerprint, checkpoint_humanize_age, checkpoint_decide (verdict+reason from gathered facts). Fail-safe: any unknown fact → clean start.
    • scripts/dev-lead-fix-issue.sh — source the lib; add CHECKPOINT_MAX_AGE_HOURS/DEV_LEAD_TARGET_BRANCH config; record an issue-body-SHA256 trailer on the checkpoint commit in checkpoint_push_partial_work (reuses the same Action budget, slice 3a: checkpoint-push partial work before the budget expires #1660 checkpoint commit — no second marker); add impure find_checkpoint_branch + maybe_resume_from_checkpoint + resume/clean-start notices; branch to resume-vs-fresh in main() before branch creation.
    • Completion gates not inherited: resumed pass keeps pre_engine_sha at the checkpoint HEAD so a durable completion claim / PR only appears after a fresh pass adds work; checkpoint opens no PR and posts no completion claim.

    Tests to Write (tests/dev-lead/unit/)

    • test_checkpoint_resume.bats (new) — pure-lib unit tests: fingerprint stability, age humanize, checkpoint_decide for resume / diverged / stale / sanity-fail / body-drift / body-unknown.
    • test_fix_issue.bats — integration cases: resume from a valid checkpoint (notice names branch+commit); refuse a diverged checkpoint (clean start + reason); refuse an over-age checkpoint (reason names age); clean start when none exists (silent, no notice); resolution gate stays closed for a resumed pass (no status=completed inherited from the partial pass).

    Test Command

    bats tests/dev-lead/unit/ and bash .dev-lead/scripts/dev-lead-lint.sh

  2. don-petry commented on Sep 10, 2026

    @don-petry
    CollaboratorAuthor

    Dev-Lead: cannot implement issue #1706 — needs human attention

    A stage timed out (exit 124) while implementing this issue. A timeout is treated as a first-class, non-retryable condition — retrying with the same budget would just time out again — so this escalates for human review on the first occurrence instead of wasting a same-budget retry.

    This hit the max action budget. Split this issue into smaller, independently-implementable pieces, or raise vars.ACTION_TIMEOUT_SEC, then re-apply the dev-lead label.

    Note: the engine had produced changes before the timeout. They were on branch dev-lead/issue-1706-20260910-1154 on the runner and were not pushed, so they are not recoverable from this run (the runner is ephemeral). The redacted session snippet below shows what it attempted — treat it as context, not restorable output. Re-apply dev-lead after splitting the issue or raising the budget to regenerate the work.

  3. removed
    dev-leadFor dev-lead agent pickup
    dev-lead:needs-humandev-lead could not complete this issue; needs human attention
    on Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions