|
@@ -5925,22 +5925,24 @@ def bundle_goals(ctx):
|
|
|
check(state["completion_pending"] is True and len(review_family_in_open) == 1,
|
|
check(state["completion_pending"] is True and len(review_family_in_open) == 1,
|
|
|
"the pending completion review renders ONCE — as the rich attention block")
|
|
"the pending completion review renders ONCE — as the rich attention block")
|
|
|
fake.pending_block = None
|
|
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).
|
|
|
|
|
|
|
+ # Raise-side single-row invariant (the render guard and the
|
|
|
|
|
+ # twin-answer sweep are gone — fresh DBs cannot hold pre-dedupe
|
|
|
|
|
+ # twins, and 4884259's raise-side cross-dedupe keeps it that way):
|
|
|
|
|
+ # a REDELIVERED review-kind completion push adopts the same pending
|
|
|
|
|
+ # row instead of stacking a twin.
|
|
|
|
|
+ fake.push_results("blocked", block={
|
|
|
|
|
+ "question": "Goal completion review", "type": "review",
|
|
|
|
|
+ "body": "# Completion v2\n\nThe flange ships, with docs.",
|
|
|
|
|
+ "options": None})
|
|
|
|
|
+ fake.pending_block = None
|
|
|
conn = db()
|
|
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()
|
|
|
|
|
|
|
+ rows = 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()
|
|
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")
|
|
|
|
|
|
|
+ check(rows == 1,
|
|
|
|
|
+ "a redelivered review-kind push adopts the pending row (raise-side single-row invariant)")
|
|
|
# Plan 15 C4: the completion-accept hard gate — the live probe
|
|
# Plan 15 C4: the completion-accept hard gate — the live probe
|
|
|
# flags still report repob's branch unpushed, so the operator's
|
|
# flags still report repob's branch unpushed, so the operator's
|
|
|
# accept REFUSES with origin behind.
|
|
# accept REFUSES with origin behind.
|
|
@@ -5993,7 +5995,7 @@ def bundle_goals(ctx):
|
|
|
(run_task,)).fetchone()[0]
|
|
(run_task,)).fetchone()[0]
|
|
|
conn.close()
|
|
conn.close()
|
|
|
check(twins_left == 0,
|
|
check(twins_left == 0,
|
|
|
- "the verdict answered every pending completion-family row (stale twin included)")
|
|
|
|
|
|
|
+ "the verdict answered the pending completion-family row (single-row invariant)")
|
|
|
|
|
|
|
|
print("== plan 15 C3: the narrative derives from the recorded shape ==")
|
|
print("== plan 15 C3: the narrative derives from the recorded shape ==")
|
|
|
# Content equivalence with the old projection on this run's exact
|
|
# Content equivalence with the old projection on this run's exact
|