Repository navigation
Description
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.
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
propr-dev commentedon Aug 31, 2026
🤖 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:
claudeclaude-opus-4-82006/claude-opus-4-8-persist-goals-hierarchy-l-20260831-0012-tky2003-epic-goal-control-planeissue-2006-20260831-0012-claude-opus-4-8-tky🔍 Track Task Execution
I've implemented the durable goal control plane for issue #2006. Here…
feat(ai): Implemented the PR #2016 follow-up without backend changes …
feat(goals): durable goal control-plane foundation (#2006)
integry commentedon Sep 1, 2026
Completed by #2018, squash-merged as e0f9ae3 after full CI, two independent exact-head audits, and final Codex/Sol review.
[-]Persist goals, hierarchy, lifecycle, and fenced controller leases[/-][+]Persist goal lifecycle, one provider session, and fenced control state[/+]