* fix(#1070): recognize "Complete ✓" terminal status in planned-phase transition LLM phase executors (e.g. OpenCode) may write `Status: Complete ✓` into STATE.md when finishing a phase. `state planned-phase` then failed to advance the Status field on both the frontmatter `**Status:**` line and the Current Position `Status:` line, because `Complete ✓` matched neither KNOWN_TEMPLATE_DEFAULTS['Status'] nor any KNOWN_STATUS_PATTERNS entry — so it was preserved as an executor-authored value and the state machine stayed stuck on the prior phase. Add a narrow, fully-anchored pattern `/^Complete\s*[✓✔✅☑]?\s*$/i` to KNOWN_STATUS_PATTERNS so a bare `Complete` / `Complete ✓` terminal marker yields to the next phase's `Ready to execute`. Both Status writers consult this array, so the single addition fixes both paths. Caveat-bearing statuses like `Complete but needs manual QA` are not matched and remain preserved. Regression cases added to tests/state.test.cjs (planned-phase block) exercising both code paths plus the preservation guarantee. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs(#1070): add changeset for planned-phase Complete-status fix Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -190,6 +190,14 @@ export const KNOWN_STATUS_PATTERNS: RegExp[] = [
|
||||
/^Phase\s+\d+\s+complete/i,
|
||||
/^Verifying Phase\s+\d+/i,
|
||||
/^Phase complete/i,
|
||||
// #1070: LLM executors (e.g. OpenCode) may write "Complete ✓" or bare "Complete"
|
||||
// when finishing a phase. Only bare terminal markers yield to the next phase's
|
||||
// "Ready to execute" during planned-phase. The pattern is anchored at both ends
|
||||
// so that statuses with trailing prose (e.g. "Complete but needs manual QA",
|
||||
// "Complete — ready for verification") are NOT matched and are preserved as
|
||||
// executor-authored values. Only exact forms like "Complete", "Complete ✓",
|
||||
// "Complete✓", or "Complete ☑ " (trailing whitespace) match.
|
||||
/^Complete\s*[✓✔✅☑]?\s*$/i,
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user