← Tools

Finish-to-finish dependency

A finish-to-finish dependency (FF) is a task relationship where the blocked task cannot finish until its blocker finishes.

Unlike finish-to-start, the two tasks can run at the same time — the constraint is only on when they're allowed to end, not when they're allowed to begin. A typical case: writing a report and fact-checking it might both be in progress simultaneously, but fact-checking can't be marked done until the report itself is finished, since checking an incomplete draft doesn't close the loop. Kanbai's `task_dependencies` table stores this as `finish_to_finish`, one of the four kinds recognized by the schema's CHECK constraint alongside finish-to-start, start-to-start, and start-to-finish. As with every dependency kind, the same two-layer cycle guard applies — the app-level walk in `addDependency()` for a readable error, and the Postgres trigger `kanbai_reject_dependency_cycle` as the real guarantee that a raw insert can't smuggle a cycle in either. Finish-to-finish is the least commonly needed of the four kinds, but modeling it explicitly (instead of forcing it into a finish-to-start shape) keeps a plan's dependency graph an honest description of how the work actually has to happen.

See dependency-ordered task graphs in Kanbai's plan catalog →