Originally created by: lodar
DIVE-3098 — DIVE-2832 requirement 2. Policy decided by olivia in
olivia/decisions/2026-08-09-graded-but-unmerged-is-terminal-for-the-verifier.md;
this is the build. Wiki: community/wiki/the-close-runs-before-the-pr-exists.md.
main's false-done sweep found two rows closed done with the work not on main:
DIVE-2645/#427 and DIVE-2743/#485. The prescribed remedy — bind delivery_ref before you
close — is unfollowable for that class: [#427]'s PR was created 12 minutes after the
close, [#485]'s ten seconds after. Nobody forgot anything in ten seconds. The close and
the PR-open are one motion and the close runs first, because the close is the half a goal
loop reads as finished. Verifiers were being pushed to a false done by the instruments.
"Has the verifier responded?" and "is the row finished?" are different questions. The goal
Stop hook and the rot-nudger both evaluated the second and reported the first. That is one
bug in two places, so it gets one predicate, written once in lib/tasks_db.sh and
interpolated — never retyped. A row the nudger exempts but the render still paints todo
is the original bug in different clothes.
_TASKS_TFV_SQL := graded_at IS NOT NULL
AND delivery_ref bound
AND graded_by <> maker_agent
AND status NOT IN ('done','cancelled')
Readers: task ls's render (both the compact and --all branches), the goal Stop hook
clause in _hb_loop_terminal_clause, _task_terminal_for_verifier, and the gap#2
rot-nudger's exclusion.
task verify --no-donegraded_at/graded_by. It must not key on result TEXT, because thetask deliver --result= writes that same column — a maker could otherwise buygraded_by is the actor, so a self-verifiedtask ls renders graded->merge:<maker> — not todo, not blocked, notin_progress, and it names who owes the merge. The verifier is deliberately not named:status stays open and the row closes only on merge, so doneOut of scope by the decision doc: the human-facing reporting breakdown (graded-and-waiting
/ ungraded / abandoned) is olivia's to enforce in what she sends, not a CLI change.
tests/graded_but_unmerged_terminal_unit.sh — 22 passed, 0 failed, 3.7s (core tier).
Mutation-graded; every mutation produces a distinct kill signature, so no arm is
passing for a reason other than the one it claims:
| mutation | result |
|---|---|
| predicate stubbed TRUE | 14/8 — incl. the positive control |
drop graded_at conjunct |
18/4 |
drop delivery_ref conjunct |
19/3 |
drop graded_by <> maker_agent |
20/2 |
| nudger exclusion removed | 21/1 |
| goal-hook clause removed | 20/2 |
verify stops stamping |
16/6 |
task ls render reverted |
21/1 |
| merge owner rendered as the verifier | 21/1 |
Acceptance (b) arranges its own cause — the nudge window genuinely elapses and a
positive-control row IS pinged in the same sweep, so the absence on the exempt row is
informative rather than an observation against a nudger that was never going to fire.
Demonstrated on real rows, on a copy of the 1701-row production task store (a copy so
an unmerged branch never writes the live board): DIVE-2829 (real maker dev, real PR [#527])
rendered todo before, was graded with the real task verify --no-done verb, and rendered
graded->merge:dev after — with status still todo. DIVE-2808, same shape but ungraded,
was the control and still gets the "you are the VERIFIER, go grade" clause. The additive
migration ran against that real store with all 1701 rows intact.
Regression: 22 affected harnesses green (task_core 61/0, heartbeat_goal_loop_terminal
51/0, heartbeat_stall_sweep 34/0, schema_sync, task_self_grade_writers 14/0,
verifier_gate_ack 27/0, …). tasks_db_restore_guard case 9 went 56/0 → 55/1 on its
literal column count and is updated to 75 in the second commit — that guard fired
correctly and updating it is the maintenance it exists to force. gate_route_delivery_unit
is red at 21/11 on HEAD~1 as well — pre-existing, not this change.
Bundle builds clean (./build.sh && bash -n 5dive).
Ticket changed by: lodar