|
|
@@ -5759,6 +5759,22 @@ def bundle_goals(ctx):
|
|
|
check(state["completion_pending"] is True and len(review_family_in_open) == 1,
|
|
|
"the pending completion review renders ONCE — as the rich attention block")
|
|
|
fake.pending_block = None
|
|
|
+ # Stale-twin healing (live incident shape): a pre-dedupe run left BOTH
|
|
|
+ # a completion-kind and a review-kind row pending — the page must
|
|
|
+ # render ONE review all the way through, and the final verdict must
|
|
|
+ # answer BOTH rows (asserted after the arc's accept below).
|
|
|
+ conn = db()
|
|
|
+ conn.execute(
|
|
|
+ "insert into task_blocks (task_id, question, type, body, created_at)"
|
|
|
+ " values (?, 'Goal completion review (stale twin)', 'review',"
|
|
|
+ " '# Stale twin body', strftime('%s','now'))", (run_task,))
|
|
|
+ conn.commit()
|
|
|
+ conn.close()
|
|
|
+ state = goal_state(goal1)
|
|
|
+ stale_open = [b for b in state.get("open_blocks", [])
|
|
|
+ if b.get("is_completion_review")]
|
|
|
+ check(len(stale_open) == 1,
|
|
|
+ "a stale pre-dedupe twin renders NOTHING — one review only")
|
|
|
# Plan 15 C4: the completion-accept hard gate — the live probe
|
|
|
# flags still report repob's branch unpushed, so the operator's
|
|
|
# accept REFUSES with origin behind.
|
|
|
@@ -5796,6 +5812,14 @@ def bundle_goals(ctx):
|
|
|
check(wait_for(lambda: task_state(auth, run_task)["status"] == "done" or False,
|
|
|
timeout=30, what="goal run task closes") is not None,
|
|
|
"approving the completion closes the goal-run task done")
|
|
|
+ conn = db()
|
|
|
+ twins_left = conn.execute(
|
|
|
+ "select count(*) from task_blocks where task_id = ?"
|
|
|
+ " and answer is null and type in ('completion','review')",
|
|
|
+ (run_task,)).fetchone()[0]
|
|
|
+ conn.close()
|
|
|
+ check(twins_left == 0,
|
|
|
+ "the verdict answered every pending completion-family row (stale twin included)")
|
|
|
|
|
|
print("== plan 15 C3: the narrative derives from the recorded shape ==")
|
|
|
# Content equivalence with the old projection on this run's exact
|