CollabTodo is the most feature-complete domain in dafny-replay. It models a collaborative task management system with projects, ordered lists, tasks, tags, and soft delete. The domain is proved against the Multi-Project kernel, which extends Multi-Collaboration to support operations that span multiple projects—Documentation Index
Fetch the complete documentation index at: https://mintlify.com/metareflection/dafny-replay/llms.txt
Use this file to discover all available pages before exploring further.
MoveTaskTo, CopyTaskTo, and MoveListTo.
Domain model
The model covers four entity types plus soft-delete semantics. Lists are ordered by a sequence of list IDs; tasks belong to exactly one list; tags are scoped to their project.TodoMultiProjectDomain.dfy:
Key invariants
TheInv predicate enforces six structural properties:
- Exact partition — every non-deleted task exists in exactly one list; no task is orphaned or duplicated.
- Unique list names — list names are unique within a project (case-insensitive comparison).
- Unique task titles per list — task titles are unique within each list (case-insensitive).
- Membership constraints — task assignees must be project members; the owner is always a member; personal projects have exactly one member.
- Referential integrity — tags referenced by tasks must exist; all allocator IDs are fresh.
- Valid dates — all due dates represent valid calendar dates.
MultiInv. MultiStepPreservesInv proves this by chaining the per-project invariant preservation lemmas.
Cross-project operations
MoveTaskTo soft-deletes the task in the source project and recreates it in the destination list. CopyTaskTo leaves the source unchanged and adds a copy to the destination. MoveListTo deletes the list and all its tasks from the source and recreates them in the destination—clearing assignees and tags, which are project-scoped.
When a concurrent update deletes a task before a MoveTaskTo reaches the server, MultiRebase converts the operation to a NoOp for the source project, preventing errors.
Backend support
CollabTodo supports two backends:| Backend | Auth | Database | Realtime |
|---|---|---|---|
| Supabase | OAuth (managed) | Postgres + RLS | Built-in |
| Cloudflare | Custom JWT | D1 + Durable Objects | Workers |
MultiStep and writes results atomically; the realtime layer propagates updates to other clients.
Cross-project operations update two projects in a single database transaction. Realtime notifications for the two projects arrive separately, so clients may briefly see partial state until both arrive.
Running the app
Multi-Project kernel
The kernel that proves per-project invariants are preserved across cross-project operations.
Effect State Machine
Client-side orchestration: bounded retries, FIFO pending queue, no silent data loss.
Supabase backend
Managed auth, database-level RLS, and built-in realtime for CollabTodo.
Cloudflare backend
D1, Workers, and Durable Objects with application-level authorization.