Skip to content

Docs: data-model transaction catalogue omits task abandon and task land #62

Description

@dichovsky

The transaction catalogue in docs/design/data-model.md:399-411 introduces itself as "Each row below is one database transaction: either all of its effects happen, or none do", then lists join, direct send, broadcast, receive, task create, task start, task submit, task approve, task requeue, prune, and launch-teardown reap.

Two Task transactions are missing:

  • task abandon (src/store/tasks.ts:641-697) — CAS the Task to revision +1, set status = 'abandoned' and abandoned_at, clear lease_owner_id/lease_expires_at/review_summary and the worktree_path/worktree_branch/worktree_base_ref trio, append the abandoned Task Event carrying the reason, and notify creator, assignee, and reviewer (the assignee's notification being the clear_safe Sign-off, ADR-0016).
  • task land (src/store/tasks.ts:715-751) — clear the worktree trio and send the assignee the clear_safe Sign-off. Worth a row precisely because it is the one entry that breaks the table's pattern: it is not a status transition, status stays completed, it appends no Task Event, and its CAS predicate is worktree_path matching the row just read rather than the revision bump every other Task row uses (src/store/tasks.ts:715-729 docstring). An archived assignee is skipped.

Both are single BEGIN IMMEDIATE transactions like their neighbours, so the table's stated scope covers them.

Impact: the catalogue is the document's enumeration of atomic units, and a reader auditing which operations are all-or-nothing gets an incomplete answer for the two terminal Task operations. The land omission also hides the one place where the CAS predicate is not the revision, which is the detail a reader most needs when reasoning about concurrent task land calls.

Acceptance: docs/design/data-model.md's transaction catalogue has a task abandon row and a task land row, each stating its atomic effects in the table's existing terse style, with land's non-transition nature and its worktree_path CAS predicate visible.

Found while implementing #29, which is scoped to that issue's three passages (prune scope, the 2 -> 3 migration narrative, and abandon/land actor authority in the Tasks invariants) and does not cover this table.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions