Skip to content

Persist goal lifecycle, one provider session, and fenced control state #2006

Closed

Description

@integry

Architecture correction

This completed foundation was subsequently simplified by #2063 / PR #2070. The authoritative goal domain is one selected coding-agent native /goal session. Any original node/dependency/hierarchy requirements in this issue are superseded and must not remain in the product schema or API.

Part of #2003 and #2002.

Durable foundation

Persist in SQLite:

  • Goal identity, ownership, repository, objective, host lifecycle/recovery state, immutable selected agent, requested/effective model, policy preferences, timestamps, optimistic version, and terminal reason.
  • Exactly one provider session per goal, with provider thread/session identity, native status, goal-scoped runtime/worktree identity, recovery metadata, and fenced lease generation.
  • Append-only trusted lifecycle/domain events with monotonic per-goal sequence.
  • Ordered corrective messages with delivery/acknowledgement state.
  • Auditable state/model transitions and pause intervals for elapsed/active/paused accounting.

Do not persist a goal plan, epic/sub-epic/issue node hierarchy, dependencies, or a merge scheduler. Provider plan/todo/output/usage replay is added by #2008.

Lifecycle and concurrency

  • Explicit queued/running/pausing/paused/recovering/completing/completed/failed/cancelled host states.
  • Pause is nonterminal; cancellation remains distinct.
  • Atomic fenced controller leases; stale epochs cannot commit trusted state.
  • Idempotent mutations and optimistic conflicts.
  • Requested model remains separate from effective model until provider acknowledgement.
  • Redis is never the source of truth.

API foundation

Ownership-checked create/list/detail, pause/resume/cancel/model/message/event endpoints validate repository access and real goal-capable catalog entries without exposing credentials, paths, mounts, or another user's resources.

Creation records one native goal request. It does not enter a ProPR planning phase or create controller work nodes. Automatic merge is not a goal policy; the final epic PR remains draft/unmerged.

Acceptance retained after correction

  • Fresh migration and rollback, ownership, repository/catalog validation, pagination, idempotency, lifecycle/model conflicts, pause accounting, and two-controller lease races.
  • Empty Redis/service restart reconstructs the same goal/session summary from SQL.
  • Shared contracts expose nullable provider-native status/plan projection, never a controller hierarchy.
  • Existing one-shot task/planner/issue APIs remain compatible outside goal execution.

Activity

  1. added
    enhancement
    base-2003-epic-goal-control-plane
    on Aug 31, 2026
  2. propr-dev commented on Aug 31, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using claude agent with claude-opus-4-8 model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: claude
    • Model: claude-opus-4-8
    • Branch: 2006/claude-opus-4-8-persist-goals-hierarchy-l-20260831-0012-tky
    • Base Branch: 2003-epic-goal-control-plane
    • Worktree: issue-2006-20260831-0012-claude-opus-4-8-tky

    🔍 Track Task Execution

  3. added a commit that references this issue on Aug 31, 2026
  4. integry commented on Sep 1, 2026

    @integry
    OwnerAuthor

    Completed by #2018, squash-merged as e0f9ae3 after full CI, two independent exact-head audits, and final Codex/Sol review.

  5. changed the title [-]Persist goals, hierarchy, lifecycle, and fenced controller leases[/-] [+]Persist goal lifecycle, one provider session, and fenced control state[/+] on Sep 2, 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

    AIAI-donebase-2003-epic-goal-control-planeenhancementllm-codex-gpt56-solpropr-plannedultrafix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions