Skip to content

fix(turn): project durable completion continuation in built-in CLI provider #3045

Description

@liubf21

Concrete gap

Current main already defines and validates the governed successor, active_goal, and no_followup completion outcomes. The loop controller also enforces successor lineage and fresh terminal-frontier evidence.

The remaining gap is narrower: loopx turn run-once's built-in completion_writeback calls complete_goal_todo(...) but always journals active_goal. It does not project the durable outcome that the Todo lifecycle actually wrote.

Proposed provider-only slice

  • derive the completion outcome from persisted Todo lifecycle state after complete_goal_todo, never from host result JSON;
  • project successor only for existing declared successor Todo ids, and no_followup only when existing Todo policy/authority has durably recorded it;
  • preserve the existing completion_turn_key replay fence and settlement ordering;
  • keep goal termination downstream: a fresh loop-controller decision remains required for terminal closure;
  • add focused CLI/recovery fixtures for successor/no-followup projection and idempotent replay.

Non-goals

  • no new result schema, Todo/event store, scheduler, or host-granted continuation authority;
  • no arbitrary successor creation from Host text;
  • no change to existing loop-controller continuation semantics.

Maintainer question

Is this provider-state projection a distinct, acceptable follow-up to #2882/#3024? If so, implementation will be limited to the built-in Turn CLI provider plus a pure durable-outcome projector and focused tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions