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 c59cd9c
Browse filesBrowse the repository at this point in the historyBrowse files
fix(pm): the hand-off battery pins the reader alone, not a read of the rulebook
A structural read of a governed file from a script is a census the gate
derivation classifies, so the self-test keeps to rows and strings.
Claude-Session: https://claude.ai/code/session_01ADHkmSUY4HbWjTHDfPyAYU
Co-authored-by: Claude <noreply@anthropic.com>
constHO_ROW=(line,id=4401,at='2026-10-27T13:01:00Z')=>({ id,created_at: at,body: `Seat note — the review tier was refused this round.\n\n${line}\n\nLabel kept.`});
t('⭐ the line names the CURRENT head ⇒ the review is triage\'s, with the reason, the time and the comment that handed it off',(()=>{constr=contractReviewHandoff([HO_ROW(HO_LINE())],HO_HEAD);returnr.state==='triage'&&r.head===HO_HEAD&&r.reason==='HTTP 429'&&r.handedAt==='2026-10-27T13:00Z'&&r.id===4401;})());
1936
1934
t('⭐ the head MOVED past the line ⇒ stale, naming the head the hand-off was for — a fresh line or the seat\'s own review',(()=>{constr=contractReviewHandoff([HO_ROW(HO_LINE())],'c260fddc'.padEnd(40,'0'));returnr.state==='stale'&&r.head===HO_HEAD;})());
1937
1935
t('⭐ NO hand-off line on any comment ⇒ absent, the seat\'s own review — a record, a seat note, a label mention change nothing',(()=>{constr=contractReviewHandoff([RECORD_ON_9AF9,{id: 4402,created_at: '2026-10-27T13:02:00Z',body: 'ACCEPT — `needs:contract-review` stays until the seat reviews.'}],HO_HEAD);returnr.state==='absent'&&r.read===2;})());
@@ -1944,7 +1942,6 @@ export async function selfTest() {
1944
1942
t('an unreadable NEWEST line makes the thread unreadable, naming the comment — never absent, never stale',(()=>{constr=contractReviewHandoff([HO_ROW(`${CONTRACT_REVIEW_HANDOFF_KEY}: triage — ${CONTRACT_REVIEW_TIER_NAME} unavailable (HTTP 429) · head ${HO_HEAD}`,4405)],HO_HEAD);returnr.state==='unreadable'&&r.gaps.length===1&&r.gaps[0].includes('4405');})());
1945
1943
t('a thread that is not an array, or a head too short to match, is a read that could not be made',contractReviewHandoff(null,HO_HEAD).state==='unreadable'&&contractReviewHandoff([],'abc').state==='unreadable'&&contractReviewHandoff([],HO_HEAD).state==='absent');
1946
1944
t('the key is ONE regex, built by the one key-line convention, and prose naming it mid-sentence is not the line',CONTRACT_REVIEW_HANDOFF_LINE.source===keyLineRegex(CONTRACT_REVIEW_HANDOFF_KEY).source&&readContractReviewHandoff(`the ${CONTRACT_REVIEW_HANDOFF_KEY}: line goes on the PR`).state==='missing'&&contractReviewHandoff([HO_ROW(`the ${CONTRACT_REVIEW_HANDOFF_KEY}: line goes on the PR`)],HO_HEAD).state==='absent');
1947
-
t('⭐ the rulebook spells the line this reader reads — key, target, the tier by NAME, `unavailable`, and `head` — on ONE line',RULES_TEXT.split(/\r?\n/).some((l)=>l.includes(`\`${CONTRACT_REVIEW_HANDOFF_KEY}: triage — ${CONTRACT_REVIEW_TIER_NAME} unavailable (`)&&l.includes(') · head ')));
1948
1945
t('⛔ no gate reads it: the queue guard\'s record reading is untouched — a hand-off line beside a record on this head still reads FOUND',(()=>{constr=locateReviewOfRecord(pairOf({prComments: [RECORD_ON_9AF9,HO_ROW(HO_LINE(HEAD_9AF9))]}));returnr.state==='found'&&r.id===3301;})());
1949
1946
1950
1947
// -- #18042: the copyable record TEMPLATE ----------------------------------
0 commit comments