Originally created by: 5dive-bot
action_leases reaches an existing boardFollow-up to [#731], which merged as 105a266. The table it added never appears on a live board.
_tasks_db_needs_migrate (DIVE-2808) is a skip gate: a store already stamped with the current
_TASKS_SCHEMA_EPOCH never enters _tasks_db_migrate again. [#731] added a one-shot migration block
and did not bump the epoch. The comment above that constant describes this exact outcome in advance:
a new one-shot block added WITHOUT a bump runs on fresh stores only. It ships green on every harness
(they all start from an empty dir and take the canonical schema) and reaches no existing board,
which is the one population it was written for.
So [#731]'s inner gate was right — action_leases is gated on its own absence, which is what
DIVE-2512 asks for — and an outer gate skipped the whole function before that inner gate could be
consulted. Two gates, and I checked the wrong one.
Why the harness did not catch it. tests/durable_action_unit.sh drove _tasks_db_migrate
directly. Nothing on a box does that; a box calls tasks_db_init, which consults the skip gate
first. So the harness measured the half of the path that was already correct. This is
[[repairing-a-vacuous-arm-migrates-the-blind-spot]] in a new place: the fixture was realistic in its
data (an initialised store with the table dropped) and unrealistic in its entry point.
_TASKS_SCHEMA_EPOCH: 3525-1 → INST8-1.tasks_db_init, the entry point a box actually uses, on a store carrying$_TASKS_SCHEMA_EPOCH != '3525-1'), so a rebase that quietlyGround truth on a copy of this host's real board (2311 tasks, 9367 lifecycle events), driven
through tasks_db_init, not through the migration function:
| before | after | |
|---|---|---|
schema_epoch |
3525-1 |
INST8-1 |
action_leases table |
absent | present |
| lease rows | — | 1 |
tasks count |
2311 | 2311 |
and on that same real-board copy, the first durable_claim returned rc 0 and an immediate second
claim of the same action returned rc 4 — the double-fire refused on a real board rather than a
fixture.
Harnesses on this branch, bundle built: durable_action_unit 50/0 ·
tasks_db_restore_guard_unit 56/0 (the epoch-sensitive one) · ledger_unit 19/0 ·
deploy_unit 34/0 · broker_surface_unit 52/0 · corpus_tier_budget_unit 165/0 ·
schema_sync_unit rc 0.
Also worth recording, because it cost me a false alarm: ledger_unit reads 16 passed / 1 failed
without a built bundle and 19/0 with one — its three delivery-funnel arms do not skip, they fail
(INST-4's verifier flagged the same thing). Build before you grade it.
🤖 Generated with Claude Code
Ticket changed by: lodar