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 b4c170a
Browse filesBrowse the repository at this point in the historyBrowse files
fix(pm): settle the decision-analysis tier-line gaps — the newest analysis governs, a Ruling-ref comment is a ruling, the sub-agent Analysed-by value
- decision-analysis.md: Analysed-by is one session id (a sub-agent's analysis
carries the session that dispatched and posts it, as Reviewed-by does); a
refused transcript means a sub-agent re-run at tier, never a relabel; the
newest analysis governs, and a changed recommendation refreshes the card-top
summary body first, the delta in a later minute.
- check-owed-reviews --decisions: a newer analysis with no line of the pair
supersedes the older carrier and reads missing; a comment whose first content
line is Ruling-ref: is a ruling after the carrier (stale). Self-test +5.
- label-write: usage and both --tier-evidence refusals name the decision
analysis beside the contract review record.
- ratchet: decision-analysis.md 5855 -> 6146 (+291) under ruling 7303021478.
Refs #38874
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CaUYMgihyBHZ33ewFC
@@ -633,6 +652,7 @@ export function renderDecisionRow(row) {
633
652
constwhere=row.carrier===null ? null : row.carrier.where==='body' ? 'line in the body' : `line on comment ${row.carrier.id}`;
634
653
constparts=[`#${row.card}${row.state}`];
635
654
if(row.state==='unjudged')parts.push('thread not read');
655
+
elseif(row.uncarried)parts.push(`newer analysis ${row.uncarried.where==='body' ? 'in the body' : `on comment ${row.uncarried.id}`} carries no Served-tier / Analysed-by line (supersedes the line ${row.uncarried.supersedes==='body' ? 'in the body' : `on comment ${row.uncarried.supersedes}`})`);
636
656
elseif(row.carrier===null)parts.push(row.analysis ? 'analysis carries no Served-tier / Analysed-by line' : 'no analysis found on the card');
constdropped=row.ignored>0||(row.bodyRead===false&&row.state!=='unjudged') ? ` (${row.bodyRead ? '' : 'body by an untrusted author not read; '}${row.ignored} comment(s) by an untrusted author not read)` : '';
if(gaps.length>0)lines.push('',`⚠️ sweep INCOMPLETE — ${gaps.length} read(s) failed; the rows above are not the whole answer:`, ...gaps.map((g)=>` - ${g}`));
654
674
lines.push(
655
675
'',
656
-
'`current` reads ruling comments, `Ruled:` records and the body\'s newest stamp; a body edit that writes no stamp is not seen (REST carries no body-edit time) — the premise re-check covers it.',
676
+
'`current` reads ruling comments (a first-line `Ruling-ref:` too), `Ruled:` records and the body\'s newest stamp; a body edit that writes no stamp is not seen (REST carries no body-edit time) — the premise re-check covers it.',
657
677
'Report-only: exit 0, nothing written. The rule is `references/decision-analysis.md` 〈落卡分析模板〉.',
'the report: one line per owing PR, TAKE first, exit 0': 5,
808
828
'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': 14,
809
829
// The decision box (`--decisions`): the analysis tier read by the record's own parser, its carrier, its currency.
810
-
'the decision box: each open needs-user-decision card\'s analysis tier on its newest carrier — at tier, below, missing, unjudged — whether it is still current, and what the seat does with it': 16,
830
+
'the decision box: each open needs-user-decision card\'s analysis tier on its newest carrier — at tier, below, missing, unjudged — whether it is still current, and what the seat does with it': 21,
811
831
});
812
832
constSELF_TEST_BATTERY_FLOOR=10;
813
833
constUNATTRIBUTED_BATTERY='(no battery open)';
@@ -1074,6 +1094,17 @@ export function selfTest() {
1074
1094
t('⭐ MISSING — an analysis with no line ⇒ re-run, and the row says the card does carry an analysis',r4.state==='missing'&&r4.carrier===null&&r4.analysis===true&&r4.act===DECISION_ACT_RERUN&&renderDecisionRow(r4).includes('analysis carries no Served-tier'));
1075
1095
t('…and a card with no analysis at all says so',renderDecisionRow(decisionAnalysisRow(card({body: `${DSIG}\nA plain question.`}),[])).includes('no analysis found on the card'));
1076
1096
t('⭐ the NEWEST carrier governs, both ways — an at-tier body under a TIER_DEFAULT delta is below tier, and the reverse is at tier',decisionAnalysisRow(card({body: analysisBody(AT)}),[delta(7301,'2026-11-30T09:00:00Z','TIER_DEFAULT')]).state==='below-tier'&&decisionAnalysisRow(card({body: analysisBody('TIER_DEFAULT')}),[delta(7301,'2026-11-30T09:00:00Z')]).state==='at-tier');
1097
+
// A later analysis with no line of the pair supersedes the older carrier (#38874 N-a): the newest ANALYSIS governs.
1098
+
constbare=(id,at)=>cmt(id,at,`${DSIG}\n## Re-analysis\n\nos-decision-facets\n- ① 项目长远合理性:changed.\n\nThis seat now recommends **B**.`);
t('⛔ a NEWER analysis with no line supersedes the at-tier carrier ⇒ missing, re-run; the row names both comments',r5.state==='missing'&&r5.carrier===null&&r5.act===DECISION_ACT_RERUN&&r5.uncarried?.id===7303&&r5.uncarried?.supersedes===7301&&renderDecisionRow(r5).includes('newer analysis on comment 7303')&&renderDecisionRow(r5).includes('line on comment 7301'),JSON.stringify(r5));
1101
+
t('…while a newer comment that is no analysis (a plain note) leaves the carrier governing',decisionAnalysisRow(card(),[delta(7301,'2026-11-30T09:00:00Z'),cmt(7304,'2026-11-30T11:00:00Z',`${DSIG}\nPremise re-checked: holds.`)]).act===DECISION_ACT_PRESENT);
1102
+
// A maintainer ruling recorded on its first content line as `Ruling-ref:` (#38874 N-b, e.g. a grade ruling).
t('⛔ a comment whose FIRST content line is `Ruling-ref:` after the carrier is a ruling ⇒ stale, and the reason says so',(()=>{constr=decisionAnalysisRow(card(),[delta(7301,'2026-11-30T09:00:00Z'),ref(7305,'2026-11-30T10:00:00Z','Ruling-ref: priority:p2 · 2026-11-30T09:59Z · a grade set by the maintainer.')]);returnr.current.state==='stale'&&r.current.reasons[0].includes('7305')&&r.current.reasons[0].includes('Ruling-ref')&&r.act===DECISION_ACT_RERUN;})());
1105
+
t('…while a claim that CITES a ruling on a later line is not one ⇒ still current',decisionAnalysisRow(card(),[delta(7301,'2026-11-30T09:00:00Z'),ref(7306,'2026-11-30T10:00:00Z','Claim: PM loop round 4\nRuling-ref: 7300000001')]).current.state==='current'&&isRulingRefComment(`${DSIG}\n**Ruling-ref:** 7303021478`)&&!isRulingRefComment('Claim: x\nRuling-ref: 1'));
1106
+
// The refresh order the rule states (#38874 N-c): body first, the delta in a LATER minute; the same minute reads stale.
1107
+
t('⭐ body refreshed first, delta posted in a later minute ⇒ current; the same minute ⇒ stale (stamps read to the minute, the safe direction)',decisionAnalysisRow(card({body: analysisBody(null,'Refreshed 2026-11-30T09:00Z.')}),[delta(7301,'2026-11-30T09:01:10Z')]).current.state==='current'&&decisionAnalysisRow(card({body: analysisBody(null,'Refreshed 2026-11-30T09:01Z.')}),[delta(7301,'2026-11-30T09:01:50Z')]).current.state==='stale');
1077
1108
t('⛔ the author binding: an at-tier delta by an untrusted author is never the carrier, and the drop is counted and printed',(()=>{constr=decisionAnalysisRow(card(),[delta(7301,'2026-11-30T09:00:00Z')].map((c)=>({ ...c,user: {login: 'drive-by'}})));returnr.state==='missing'&&r.ignored===1&&renderDecisionRow(r).includes('1 comment(s) by an untrusted author not read');})());
1078
1109
t('⛔ …and a body by an untrusted author is not read either',(()=>{constr=decisionAnalysisRow(card({body: analysisBody(AT),user: {login: 'drive-by'}}),[]);returnr.state==='missing'&&r.bodyRead===false&&renderDecisionRow(r).includes('body by an untrusted author not read');})());
1079
1110
t('⛔ a `## Contract review` record on the card is not an analysis\'s carrier',decisionAnalysisRow(card(),[recordRow(HEAD)]).state==='missing');
@@ -1112,7 +1143,7 @@ export function selfTest() {
1112
1143
+'the (a) / (b) / (c) triggers and the taker — the seat a hand-off names, an L2 seat on the delta of its own record, else the lane seat, never triage; claims holding and lapsing, the earliest live claim holding; the two live drafts as TAKE; '
1113
1144
+'every read through one reader with failures as gaps; the report, exit 0; a lane\'s live hold holding (b) alone, '
1114
1145
+'cleared by a new head, an unreadable hold line voiding nothing and printed, listed at 24 hours and still WAIT; '
1115
-
+'the decision box — each analysis\'s tier on its newest trusted carrier, at tier, below, missing or unjudged, stale after a ruling or a body written since, and present-as-it-stands only at tier and current).',
1146
+
+'the decision box — each analysis\'s tier on its newest trusted carrier, at tier, below, missing or unjudged, a newer analysis with no line reading missing, stale after a ruling (a first-line `Ruling-ref:` too) or a body written since, and present-as-it-stands only at tier and current).',
0 commit comments