You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0c9c1c5
Browse filesBrowse the repository at this point in the historyBrowse files
pm-dispatch(review): record-recognisers reads the Contract-review-hold line; check-owed-reviews lets a live hold hold trigger (b) and lists a hold at 24 hours
record-recognisers.mjs: readContractReviewHold reads the line (session,
head 7-40 hex by prefix, reason, until CONDITION; a missing fact or a fifth
part is unreadable and holds nothing); contractReviewHold reads the thread,
newest governs: live on the current head, stale once the head moved, its age
from the comment's created_at a reading (overdue at 24 hours), never a lapse.
Self-test: a hold-line battery of 19 cases, the template and its 24-hour
listing pinned verbatim in contract-review.md; floor 16 -> 17.
check-owed-reviews.mjs: the row carries a hold field; trigger (b) yields to a
live hold while (a) and (c) still fire; status stays one of four (WAIT for a
held head); a live hold 24 hours or older on a WAIT row is listed, in the row
and under the report, for the triage round record. Self-test: a hold battery
of 13 cases; floor 8 -> 9.
Claude-Session: https://claude.ai/code/session_01QSeKYmhU5KEj1nukYhp1Tg
Co-authored-by: Claude <noreply@anthropic.com>
'the live instance: two Tier H drafts with a hand-off on the current head list as TAKE under (a)': 4,
409
464
'the live read: every read through one reader; a failed read is INCOMPLETE, never clean': 6,
410
465
'the report: one line per owing PR, TAKE first, exit 0': 5,
466
+
'the hold: a live hold on this head holds (b) alone, (a) and (c) still fire; a new head clears it; at 24 hours it is listed, still WAIT': 13,
411
467
});
412
-
constSELF_TEST_BATTERY_FLOOR=8;
468
+
constSELF_TEST_BATTERY_FLOOR=9;
413
469
constUNATTRIBUTED_BATTERY='(no battery open)';
414
470
415
471
exportfunctionselfTest(){
@@ -553,6 +609,31 @@ export function selfTest() {
553
609
t('--json prints the rows as one JSON document, still exit 0',main(['--repo',DEFAULT_REPO,'--json','--now','2026-10-28T13:00:00Z'],{get: fake(routes),log: (l)=>jsonOut.push(l)})===EXIT_OK&&JSON.parse(jsonOut.join('\n')).rows[0].pr===27136);
554
610
t('a usage error exits 2 and prints the usage',main(['--bogus'],{get: fake({}),log: ()=>{},error: ()=>{}})===EXIT_USAGE);
555
611
612
+
battery('the hold: a live hold on this head holds (b) alone, (a) and (c) still fire; a new head clears it; at 24 hours it is listed, still WAIT');
613
+
// The lane's "not this head yet", posted as the lane posts it: signature, then the one line.
614
+
constLANE_SIG=`domain:ui#1 · os-bill · ${LANE}`;
615
+
constholdRow=(head,at,id=6472451890)=>({ id,created_at: at,body: `${LANE_SIG}\n\nContract-review-hold: \`${LANE}\` · head \`${head}\` · the stack still lands under it · until the last sibling PR merges`});
616
+
constripe='2026-10-28T11:59:00Z';// committed 61 minutes before NOW: (b) holds when nothing holds it
t('⭐ a live hold on the current head holds (b): a full round waited, no record, no claim ⇒ WAIT, not TAKE — and with no hold the same row is TAKE under (b)',held.status==='WAIT'&&held.trigger==='none yet'&&held.hold.state==='live'&&held.hold.holds==='(b) waited 61 min'&&row({headCommittedAt: ripe}).status==='TAKE'&&row({headCommittedAt: ripe}).trigger==='(b) waited 61 min',JSON.stringify(held.hold));
620
+
t('the row prints the hold: who holds, the comment, its age, the (b) it holds and until what',renderRow(held).includes(`hold live ${LANE} (6472451890, 0 h old, holds (b) waited 61 min) until the last sibling PR merges`),renderRow(held));
621
+
t('⛔ a hold on an EARLIER head holds nothing — the head moved, (b) fires ⇒ TAKE',(()=>{constr=row({headCommittedAt: ripe,comments: [holdRow(HEAD2,heldAt)]});returnr.hold.state==='stale'&&r.status==='TAKE'&&r.trigger==='(b) waited 61 min'&&r.hold.holds===null;})());
622
+
t('⭐ (a) still fires under a live hold — the label or a hand-off on this head is the holding lane ending its hold ⇒ TAKE',row({headCommittedAt: ripe,labels: [{name: WAITING_LABEL}],comments: [holdRow(HEAD,heldAt)]}).trigger==='(a) label'&&row({headCommittedAt: ripe,comments: [holdRow(HEAD,heldAt),handoff(HEAD,'2026-10-28T12:40:00Z')]}).trigger==='(a) hand-off');
623
+
t('(c) still fires under a live hold — a lane seat that is gone holds nothing',row({headCommittedAt: ripe,comments: [holdRow(HEAD,heldAt)]},[{lane: 'domain:ui',status: 'paused'}]).trigger==='(c) lane seat stood-down');
624
+
t('⛔ an unreadable hold holds nothing ⇒ (b) fires, and the row names the hold comment as unreadable',(()=>{constr=row({headCommittedAt: ripe,comments: [{id: 7701,created_at: heldAt,body: 'Contract-review-hold: soon'}]});returnr.hold.state==='unreadable'&&r.status==='TAKE'&&renderRow(r).includes('hold unreadable (7701)');})());
625
+
t('a hold changes neither a live claim (HELD) nor a record on this head (DONE)',row({headCommittedAt: ripe,comments: [holdRow(HEAD,heldAt),claimRow(TRIAGE,HEAD,'2026-10-28T12:18:56Z',`triage#1 · os-zhuang · ${TRIAGE}`)]}).status==='HELD'&&row({headCommittedAt: ripe,comments: [holdRow(HEAD,heldAt),recordRow(HEAD)]}).status==='DONE');
t('⭐ at 24 hours the hold reads overdue and STILL holds — the row stays WAIT, no fifth status — and the row is LISTED for the round record',aged.status==='WAIT'&&aged.hold.state==='live'&&aged.hold.overdue===true&&aged.hold.listed===true&&renderRow(aged).includes('⏳ HOLD 24 h old — list it in the triage round record'),renderRow(aged));
t('⭐ the report lists it under the rows: the PR, the holder, when it was posted, its age and the condition',report.some((l)=>l.startsWith('⏳ 1 hold(s) 24 h or older keep a PR waiting'))&&report.includes(` - #27136 held by ${LANE} since 2026-10-27T13:00:00Z (24 h old) until the last sibling PR merges`),report.join(' | '));
630
+
t('under 24 hours nothing is listed; an overdue hold on a DONE or HELD row is not listed — nothing waits on it',held.hold.listed===false&&!renderReport([held],{repo: DEFAULT_REPO,now: NOW,read: {pulls: 1,drafts: 1},gaps: []}).some((l)=>l.startsWith('⏳'))&&row({headCommittedAt: '2026-10-27T08:00:00Z',comments: [holdRow(HEAD,'2026-10-27T13:00:00Z'),recordRow(HEAD)]}).hold.listed===false&&row({headCommittedAt: '2026-10-27T08:00:00Z',comments: [holdRow(HEAD,'2026-10-27T13:00:00Z'),claimRow(TRIAGE,HEAD,'2026-10-28T12:18:56Z',`triage#1 · os-zhuang · ${TRIAGE}`)]}).hold.listed===false);
631
+
t('⛔ a live hold whose age cannot be timed is LISTED as unknown, never dropped as young',(()=>{constr=row({headCommittedAt: ripe,comments: [{id: 9,body: holdRow(HEAD,heldAt).body}]});returnr.status==='WAIT'&&r.hold.overdue===null&&r.hold.listed===true&&renderRow(r).includes('⏳ HOLD age unknown');})());
t('--json carries the hold on the row, live and listed, through the one live reader — the status still one of the four',(()=>{constr=JSON.parse(holdJson.join('\n')).rows[0];returnr.pr===27136&&r.status==='WAIT'&&r.hold.state==='live'&&r.hold.listed===true&&r.hold.session===LANE&&STATUS_ORDER.includes(r.status);})());
635
+
t('⛔ the status vocabulary stays exactly four, in order — a hold is the lane\'s own WAIT',STATUS_ORDER.join()==='TAKE,WAIT,HELD,DONE');
636
+
556
637
// Floor: the opened set equals the declared set, each battery at or above its pin.
557
638
constdeclared=Object.keys(SELF_TEST_BATTERIES);
558
639
if(declared.length<SELF_TEST_BATTERY_FLOOR)cases.push({name: `SELF_TEST_BATTERIES declares ${declared.length} batteries, below the pinned ${SELF_TEST_BATTERY_FLOOR}`,ok: false});
@@ -572,7 +653,8 @@ export function selfTest() {
572
653
`✓ check-owed-reviews self-test: ${cases.length} cases pass in ${declared.length} batteries (the owed face from paths, `
573
654
+'the Clause-② line and the label, drafts included; the record on this head, an earlier head, none, unjudged; '
574
655
+'the (a) / (b) / (c) triggers; claims holding and lapsing, the lane winning a tie; the two live drafts as TAKE; '
575
-
+'every read through one reader with failures as gaps; the report, exit 0).',
656
+
+'every read through one reader with failures as gaps; the report, exit 0; a lane\'s live hold holding (b) alone, '
657
+
+'cleared by a new head, listed at 24 hours and still WAIT).',
0 commit comments