Problem
Lane state derives only from emitted events. The trust model makes deterministic sources ground truth, but working-tree state and base-branch advance are invisible, and an abnormally ended session (no session.ended hook fired) persists indefinitely.
Context
Proposed solution
First implementation of the server-side adapter pattern: poll repositories discovered from lane data (git -C), surfacing checked-out branch, working-tree dirty state, and ahead/behind against the base branch — behind > 0 is base-branch advance. Includes the worktree-existence backstop: a lane whose cwd no longer exists closes as worktree-gone.
Observations enter derivation as server-side enrichment merged at snapshot time, not as transition events: git state is re-probeable ground truth, so persisting it would cache what a probe answers, and session files carry only session-attributed events. The adapter is a read-only observer — it never fetches or otherwise mutates a repository; base-branch advance is measured against the local remote-tracking ref, which worktrees share.
Acceptance criteria
Must have
Problem
Lane state derives only from emitted events. The trust model makes deterministic sources ground truth, but working-tree state and base-branch advance are invisible, and an abnormally ended session (no
session.endedhook fired) persists indefinitely.Context
cwd+stat) is the designed backstop for abnormal session ends.Proposed solution
First implementation of the server-side adapter pattern: poll repositories discovered from lane data (
git -C), surfacing checked-out branch, working-tree dirty state, and ahead/behind against the base branch — behind > 0 is base-branch advance. Includes the worktree-existence backstop: a lane whosecwdno longer exists closes asworktree-gone.Observations enter derivation as server-side enrichment merged at snapshot time, not as transition events: git state is re-probeable ground truth, so persisting it would cache what a probe answers, and session files carry only session-attributed events. The adapter is a read-only observer — it never fetches or otherwise mutates a repository; base-branch advance is measured against the local remote-tracking ref, which worktrees share.
Acceptance criteria
Must have
worktree-gone.