Skip to content

TaskBlocker plumbing — model + cycle prevention + cascade-on-trash + computed cleared #236

@capo-the-ai-bot

Description

@capo-the-ai-bot

Parent: #181 (domain-modelling synthesis). See docs/proposals/blockers-and-contexts.md.

Status

Out of v1. Removed from Phase 1 milestone. The design below is captured; building it waits for more lived-experience signal — either the user hitting the use case in actual workflow, or external feedback that clarifies the right shape. Not blocked on engineering; blocked on requirements clarity.

When picked up, revisit the design against whatever new signal exists. The shape below is the starting point, not the locked-in answer.

Designed shape

v1-style plumbing for TaskBlocker — Task A blocks Task B until A is done.

  • TaskBlocker entity: Task → Task FK pair (blocking_task_id, blocked_task_id).
  • Cleared semantics is a live predicate, NOT a stored event:
    • cleared = blocking_task.done_at IS NOT NULL
    • Re-engages automatically if blocking task is un-done (done_at cleared).
    • No cleared_at column.
  • Cycle prevention: enforced at create-time. Reject "A blocks B" if a path "B blocks ... blocks A" already exists. (Direct cycle and transitive — both rejected.)
  • Cascade on trash:
    • When a blocking Task transitions to trashed, every dependent Task gets flagged for re-clarification (NOT auto-cleared — outcome may also be destined for trash; user decides per dependent).
    • Cascade does NOT fire on `someday` transition (outcome still wanted, dependents stay blocked as-is).
    • Cascade fires only on `trashed`.

Open questions to resolve before building

  • Blocker-vs-Project framing. TaskBlocker chains can substitute for a Project entity. Until the user has dogfooded enough to settle which framing is right, the UX shape is uncertain — and the model should follow the UX, not the other way around.
  • What's the consumer? Plumbing without a UX surface is dead weight. Need to know the surfacing story (status row chip? dependency graph view? something else?) before committing to schema.
  • Re-clarification cascade integration. If/when this lands after Re-clarification surface — last_clarified_at predicate + Daily Planning review step #237 ships, cascade-on-trash needs to feed last_clarified_at on dependents — coordinate the wiring.

Out of scope (this issue)

  • Backfill from legacy `blocked_by_todo_id` field — already removed in migration 0012.
  • UI for visualising the dependency graph.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions