Skip to content

Derived index: a worktrees table mirroring #97's per-lane inventory (path, branch, lifecycle, owning lane, writer liveness, dirty/unpushed, last seen) and lanes --index --worktrees — so the next account sees every open worktree in one query #161

Description

@brettheap

Follow-up to Amendment 14 act 2 (#160) and to #97's lifecycle inventory, on Brett Heap's word of 2026-10-05 ("file both issues"), closing the "later word" Amendment 14 clause (e) left open for worktree inventories.

What lands

A worktrees table in the derived index, source inventory:<Workstation>, mirroring each lane's #97 sidecar inventory — never a parser of the indexer's own and never the disk walked directly:

column from
workstation, lane (canonical name), owner (legacy / managed / unknown via managed-projection) the sidecar's lane
path (workstation-local), branch (or detached + sha), base (merge-base sha with main at last sync) the inventory record
lifecycle (RUNNING / SWAPPING / SWAPPED / INDETERMINATE), generation, operation #97's lane-state
writer_live (bool), last_seen_utc, last_commit (sha + subject), dirty_count, unpushed_count the handoff sweep / lane-reconcile at last sync
pr (number, state) where the branch has one gh at sync, best effort, nullable
provenance (sidecar generation), indexed_utc the sync

Rows leave when the inventory no longer has them (a tree removed at landing; a sweep's disposition). Upserts keyed by (source, lane, path), versioned by digest; provenance only forward, as every other source.

Reads

  • lanes --index --worktrees [<lane>|--all] — every open worktree with owner, branch, lifecycle, dirty/unpushed, last seen; the first thing a resuming account looks at.
  • lane-reconcile --index is NOT added: reconciliation reads the sidecar and the disk (Amendment 14 clause (b): no act reads the index). The sweep act (its own issue) reads the sources too; this table is the cross-workstation view, so Raven sees Eagle's leftovers.

Tests

The same promise as #160's: offline no-read (the inventory writers and lane-reconcile byte-identical with the index unreachable), poisoned index (wrong worktree rows change no act's answer), wiped-index reconcile, replay, the seam (owner column), fallback (read: sources).

Refs #160, #97, brettheap/new-workstation#48 (Amendment 14 clause (e), "a later word's").

Lane: openRepoTools-3

🤖 Generated with Claude Code

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions