verify-task-tombstones
БесплатноБез исполняемых скриптовНе проверенModel-checks, with TLA+ and TLC, where one task id lives on the web app (tasks, archivedTasks, deletedTasks, and the server) and every move between them…
от vscarpenter★ 41 звезда на GitHubОб этом скилле
Verify task tombstones
A TLA+ model of one task id on the web app lives in docs/formal/task-tombstones/. It follows the task's row in tasks, archivedTasks, and deletedTasks, the server's copy, and the sync queue. TLC checks every order of your actions, another device's edits and deletes, realtime events, and each step of a sync. A pass covers the model, not the whole app, so read "Bounds and what's left out" before you trust one.
The property: a task id lives in one place on this device, moves only when you act or a newer edit beats your delete, and is never gone from every side unless you deleted it.
The harm when it breaks: a task you deleted comes back, a task you kept disappears from every device, or one task shows in your matrix and in Trash at once.
The rules
Each rule is an INVARIANT in TaskTombstones.tla.
| Rule | What the app promises | The harm when it breaks |
|---|---|---|
OneTable |
A task id is in at most one of tasks, archivedTasks, and deletedTasks (rule 1 of ADR 0013 and ADR 0015). |
The task shows in two places, and a later restore overwrites your edits or fails on a duplicate key. |
NoComeback |
A server copy no newer than the Trash or archive row never brings the task back. Resurrect on sight may, but only for a delete that never reached the server. | A task you deleted or archived reappears in your matrix. |
NewerEditWins |
A server copy edited after you deleted or archived the task takes it out of Trash or the archive (rule 2). | Another device's later edit is stranded in your Trash or archive. |
ServerStaysDeleted |
Once your delete or archive has removed the server copy, nothing this device pushes puts it back while the task is still in Trash or the archive here. | A task you deleted comes back on your other devices. |
NoLoss |
A task you didn't delete or archive is in your matrix, archive, or Trash, or on the server. | A task you kept, restored, or imported vanishes everywhere with no Trash copy. |
NoComeback, NewerEditWins, and ServerStaysDeleted judge one step at a time, through ghost variables the step sets. They judge only steps that start with the task in one table, so a two-table state is reported once, by OneTable. TypeOK keeps each variable in its range. It guards the model, not the app.
The findings
None is open in the model. The model found seven on 2026-11-08, and each was replayed on the real writers. Six are configs that undo the fix and must keep failing.
| Finding | Fixed by | Replay | Breaks |
|---|---|---|---|
| 1. An import writes an id into a second table | 6446d47: applyTasks and applyArchivedTasks check all three tables |
Broken-importWritesSecondTable |
OneTable |
| 2. Undo leaves the archive row | bringBackInTransaction in lib/task-tables.ts |
Broken-undoKeepsArchive |
OneTable |
| 3. Reinstate checks only the archive | isStoredInTransaction in lib/task-tables.ts |
Broken-reinstateChecksOnlyArchive |
OneTable |
| 4. A queued edit re-creates a deleted task | claimQueuedWrite in lib/sync/queued-write.ts |
Broken-pushSendsStaleWrite |
ServerStaysDeleted |
| 5. A queued delete removes a restored task everywhere | claimQueuedWrite |
Broken-pushSendsStaleDelete |
NoLoss |
| 6. Writers act on a session read before their transaction | 1ef6553 (#735): they read sync_config inside it |
Broken-configReadEarly, Broken-configReadEarlyLoss |
NoComeback, NoLoss |
| 7. Undo fails while signed in (outside the model) | #714: the transaction scope is async | tests/data/tasks/restore-signed-in.test.ts |
tests/data/one-table-exploration.test.ts checks OneTable on the real writers, so drift in this model can't hide a break of that rule.
Run the check
bash docs/formal/task-tombstones/check.sh
It runs 13 configs through scripts/tlc.sh, which pins TLC 1.7.4 by hash and needs Java 11 or later. The first run downloads the jar. CI runs it on every PR, in the required test job. It prints one line per config and exits 0 only when every line says ok.
TaskTombstones.cfg is the code as it is, and every rule must hold. Each Broken-*.cfg sets the Variant constant to remove one guard the code has, so each rule has been seen to fail.
Read every result, pass or fail, with the pstack /statechart skill. On a break, it tells TLC's shortest path as steps in plain words. Give it view.mjs as the view, and send its output to a scratch folder outside the repo. The model is far over the chart's state budget, so the chart draws only the bug paths. For a passing config, it lists no path and draws no chart. Then name what you checked instead.
When a change touches this code
- See what changed. Diff the covered files from the sync commit (below):
git diff dd32e08c -- lib/archive.ts lib/trash.ts lib/use-auto-archive.ts lib/tasks/crud lib/tasks/import-export.ts lib/sync components/sync/use-sync-auth-dialog.ts. Then look for new writers:
Установить verify-task-tombstones в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл verify-task-tombstones?
Model-checks, with TLA+ and TLC, where one task id lives on the web app (tasks, archivedTasks, deletedTasks, and the server) and every move between them, local or from sync, so a change can't put a task in two tables, bring a deleted task back, strand a newer edit in Trash, or lose a task you kept. Use when a change touches lib/archive.ts, lib/trash.ts, lib/use-auto-archive.ts, lib/tasks/crud/delete.ts, restore.ts, or helpers.ts (runTaskSyncTransaction), lib/tasks/import-export.ts (importTasks, applyTasks, applyArchivedTasks, applyTrashedTasks), lib/sync/pb-pull.ts (applyRemoteRecords, applyPreparedRecord, reconcileDeletedTasks), lib/sync/pb-sync-engine.ts (applyRemoteChange, applyRemoteDeletion, fullSync), lib/sync/pb-push.ts (pushSingleItem, isStaleDelete), lib/sync/queue.ts (classifyRemoteDeletion, getPending, populateFromExistingTasks), lib/sync/resurrect-on-sight.ts, lib/sync/resurrect-ids.ts, lib/sync/pb-sync-helpers.ts (isRemoteNewerThanArchive), lib/sync/config/disable.ts, or components/sync/use-sync-auth-dialog.ts (persistSyncConfig). Also use when adding any writer to tasks, archivedTasks, or deletedTasks.
Как установить скилл verify-task-tombstones?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл verify-task-tombstones запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic