Skip to content

Tracking: Lifecycle Manager + Session Manager lane #3

@harshitsinghbhandari

Description

@harshitsinghbhandari

Tracking issue for the Lifecycle Manager (LCM) + Session Manager (SM) lane of the backend rewrite (Go daemon).

Goal

A deterministic supervisor for agent sessions on the OBSERVE → DECIDE → ACT loop:

  • LCM — a synchronous reducer. Observers push raw facts; it runs a pure decision, persists, and fires reactions. Never polls.
  • SM — the explicit-mutation plumbing: spawn / kill / restore / cleanup. Reports outcomes to the LCM; never derives state itself.

Approach: contract-first, single integration branch

feat/lcm-sm-contracts is the lane integration branch: every sub-PR branches off it and merges into it; the whole lane lands on main as one unit once complete.

PR sequence — implementation COMPLETE ✅

All implemented behind fakes; gofmt/build/vet/test -race green across domain, decide, lifecycle, session.

Integration phase — carried-forward items (must address as real adapters land)

Open contract questions (from #2) — for integration partners

  • SCM facts — does SCMFacts match what the poller can cheaply produce? (adil)
  • PersistenceLifecycleStore + LifecyclePatch boundary; lock vs ExpectedRevision. (Tom)
  • API — is SessionManager + the Session read-model OpenAPI-friendly? (aditi)

Key invariants (carried from the existing AO)

  • Persist canonical state; derive the display status on read (single producer = the SM).
  • One authority for death — only the decide pipeline (via detecting) writes terminal states from inferred signals, plus the SM's explicit-kill path via OnKillRequested.
  • Failed probe ≠ dead; PR facts dominate soft session states once a PR exists; worktree-remove safety on teardown.

Owner: @harshitsinghbhandari (+ coding-agents lane on Runtime/Agent/Workspace)

Metadata

Metadata

Labels

coreCore Functionalitylcm-smLifecycle + Session Manager lane

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions