Skip to content

F2: continue a task after a scope pause (reconcile the prefix, validate the rest) #88

Closed

Description

@mchwang

Follow-up to #68 (F2b). After an item changes files outside its plan item, the task pauses in needs amendment with a checkpoint. plan-format.md ("After each run") says what happens next: "After a person approves a revised plan and continuation, reconcile the executed prefix with the audited current head and validate remaining operations from that actual checkpoint; never silently authorize the extra file or erase its original scope finding."

#68 does not build this. Once a task has a scope checkpoint, ItemExecutor.runTask refuses to run any further items; it fails closed. Reviews of #68 showed that a partial continuation gate goes wrong in several ways, which this slice must design for:

  1. An approval becomes unusable once later work has used it up.
    • Approval is bound to one revision and one snapshot (approveContinuation requires the current snapshot to equal the checkpoint's).
    • After a continued item commits, a new snapshot exists. If the plan is then revised again, the old approval no longer matches, and a new approval is refused.
    • Needed: decide when a checkpoint counts as consumed.
  2. The continued items must be validated from the checkpoint.
    • fromItem must be the next item after the checkpoint's executed prefix, and its depends_on items must be done.
    • Otherwise a later item can run without the ones it depends on.
  3. The first continued item must start from the audited head.
  4. The checkpoint must record the audited actual tree.
  5. Re-running completed items.
    • A run without fromItem, after items completed in an earlier run, re-runs them on top of their own commits.
    • Needed: decide how a run finds its starting point.

🤖 Generated with Claude Code

Activity

  1. mchwang commented on Sep 30, 2026

    @mchwang
    ContributorAuthor

    From the round-6 review of #68: runTask trusts fromItem on any task, not only after a pause. On a fresh task, runTask({ fromItem: 'P2' }) runs P2 without P1, although P2 depends_on P1. A scope pause in that run then records P1 in the checkpoint's completedItems, although it never ran. The run's starting point (item 5 here) should validate that every item before fromItem completed at the current head, and completedItems should list only items that actually ran.

  2. mchwang commented on Oct 1, 2026

    @mchwang
    ContributorAuthor

    From the round-23 review of #68: a run that stops because the runner's only writable slot is taken by another task (No free runner slot) leaves the task running with no attempt. A plain re-run then starts again at P1, re-running items that already committed. The run's starting point (item 5) should handle this as well: continue from the first item without a completed attempt at the current head.

  3. mchwang commented on Oct 20, 2026

    @mchwang
    ContributorAuthor

    Done in #134 (merged 2026-10-06): continuation reconciles the amended suffix at the runner-audited checkpoint, needs approval bound to revision and snapshot, keeps approval ancestry across committed continuation items, and refuses to skip completed work. Recorded in docs/architecture.md, lane F row.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions