Skip to content

[feature] Drive one saved goal phase through the coding and verification loop #287

Closed

Description

@AetherAI3

Problem

/goal start sets goal/phase status and redraws the plan. It does not submit phase work to the coding loop. /goal complete manually marks every task complete. Users therefore have a “running” goal without a run or evidence-backed progress.

Evidence: src/commands/goals.ts and src/core/goals.ts. Keep manual plan management available, but label it separately from actual execution.

Proposed outcome

Add an explicit “run this phase” action that binds a saved goal and active phase to the existing host-executed coding loop. Use accepted scope, phase criteria, notes, workspace, model, and check command. Persist the actual session/turn identity and outcome; show working, blocked, verification pending, failed, and complete accurately.

Constraints and alternatives

First deliver one phase per invocation; do not build an unbounded background mission engine. Reuse existing permissions, worktrees, deadlines, checkpoints, resume, and host verification.

A model done frame or a manual checkbox cannot certify tests. A failed/unavailable/stale check leaves the phase unresolved with a concrete reason. Publication remains a separate ship action. Resuming revalidates workspace/rules/current changes and does not replay completed tools. Pause/cancel affects the real run.

Acceptance

  • An accepted phase launches a real coding fixture in the selected workspace and records its session/turn and resulting diff/check receipts.
  • Host verification passing the accepted criteria completes that phase; failed, skipped, unknown, or stale evidence does not.
  • Cancellation, auth refusal, missing tools, and interruption leave a recoverable checkpoint and truthful goal state.
  • Restart/resume reconciles the recorded run; concurrent consoles cannot start the same phase twice.
  • Next-phase execution requires a distinct explicit action in this first slice; manual completion is labeled manual.

Priority: P1. Reuse #286, #283, and #285 where available; #275 is a prerequisite for truthful result reporting. Source reviewed at ca4180d (0.4.0 candidate). This ticket is an implementation spec; live service qualification remains separate.

Activity

  1. added
    enhancement
    on Oct 6, 2026
  2. AetherAI3 commented on Oct 6, 2026

    @AetherAI3
    OwnerAuthor

    Implemented and merged in #299 (merge commit 64d75af).

    Evidence against the acceptance criteria:

    • /goal run [id] submits exactly one accepted phase to the existing host coding loop in the selected workspace. It persists the attempt, actual session and turn IDs, model, tree before and after, touched files, host check result, and tree-bound verification receipt. The real host fixture creates a file with write_file and passes the accepted check.
    • A phase becomes host-verified complete only when that run's check passed, its receipt still matches the current tree, and the accepted criteria are provable by the check. Red, skipped, unknown, stale, unrelated, and free-form criteria remain failed or verification pending. The next phase needs another explicit /goal run.
    • Auth or tool refusal, missing check, cancellation, and interruption retain a checkpoint with a truthful reason. /goal run resume reconciles a finished session without replaying its tools and rejects a changed workspace. An exclusive phase lease prevents two consoles from starting the same phase. Pause and cancel signal the actual run.
    • /goal start and /goal complete are labeled manual; manual completion does not certify tests. Publishing is reserved for a separate ship action.

    Verification: npm run build, npm run docs:check, and git diff --check passed. The affected regression suite passed 91/91 after rebasing on current main; the focused goal-run suite passed 15/15 after the final concurrency fixes.

    GitHub's CI and CodeQL jobs failed before executing any steps and produced no logs (CI run 37487705196; CodeQL run 37487705224). The merge used the repository's admin path on the basis of the local evidence above. Live hosted-service qualification remains separate, as specified in this issue.

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

    enhancementspecux

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions