* test(#3864): smart-entry classify must match the verif* status stem (failing first) * fix(#3864): classify() matches the verif* status stem, aligning with normalizeStateStatus "verified"/"verification" contain no "verify" substring, so the exact-word branch never matched: a STATE.md declaring status: verified fell through to situation "unknown" (or idle-stranded on a clean tree with unpushed commits — differently wrong, which made it look intermittent). state-document's normalizeStateStatus already matches any verif* stem; the classifier now uses the same stem, so the two owners agree on the invariant. verify_failed is tested earlier in classify(), so failed verification still wins. Negative controls (completed/executing/planning/paused) unchanged and pinned. * test(#3864): review fold-in — the real handler-written verification status pinned both ways 'Phase complete — ready for verification' (state-document.cts's own Status default) carries the verif stem but names completion: at 5/5 it must stay complete (isComplete beats the stem), mid-project it must route to verify-pending (pre-fix it fell through to unknown/idle- stranded — a real behavior change beyond the literal verified repro, sanctioned by the issue's own verification→verify-pending table). * chore(#3864): changeset fragment (pr number backfilled after PR creation) * chore(#3864): backfill changeset PR number (4052) --------- Co-authored-by: sim <sim@local>
This commit is contained in:
@@ -599,7 +599,13 @@ export function classify(s: SmartEntrySignals): Situation {
|
||||
if (isComplete(s)) return 'complete';
|
||||
if (/\bplanning|planned\b/i.test(s.status)) return 'planning';
|
||||
if (/\bexecut(e|ing)|active|in.progress|building\b/i.test(s.status)) return 'executing';
|
||||
if (/\bverify|review|needs.review|pending.review\b/i.test(s.status)) return 'verify-pending';
|
||||
// #3864: `verif` (not `verify`) — the same stem state-document's
|
||||
// normalizeStateStatus matches. "verified" and "verification" contain no
|
||||
// "verify" substring, so the exact word left them falling through to
|
||||
// `unknown` (or idle-stranded on a clean unpushed tree — differently
|
||||
// wrong). verify_failed is tested above, so a failed verification still
|
||||
// wins over this branch.
|
||||
if (/\bverif|review|needs.review|pending.review\b/i.test(s.status)) return 'verify-pending';
|
||||
if (isIdleStranded(s)) return 'idle-stranded';
|
||||
return 'unknown';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user