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
fix(specs): _STATUS_VALUE_RE accepts both **Status**: and **Status:** (#57)
* fix(specs): _STATUS_VALUE_RE accepts both **Status**: and **Status:**
The regex previously only matched `**Status**:` (colon outside
asterisks). Real specs in this repo overwhelmingly use `**Status:**`
(colon inside) — a quick grep showed ~7 of 8 status lines in that
form. The dashboard's Status column and the MCP gui_get_spec_status
tool were silently returning None for those specs.
_STATUS_RE — old: r"^\s*\*\*Status\*\*:.*$"
— new: r"^\s*\*\*Status(?:\*\*:|:\*\*).*$"
_STATUS_VALUE_RE — old: r"\*\*Status\*\*:\s*(\S+)"
— new: r"\*\*Status(?:\*\*:|:\*\*)\s*(\S+)"
The alternation accepts either order of the closing asterisks and
colon. Malformed look-alikes (`**Status:`, `**Status: foo` without
closing asterisks, `**Statuss**: foo`, `## Status: foo`) still get
correctly rejected.
Tests:
- test_cowork_specs.py:
• test_status_regex_accepts_both_markdown_emphasis_styles
(4 parametrized happy paths covering both formats, the
dashed-phrase form, and indented lines)
• test_status_regex_rejects_malformed_lines (4 parametrized
negative cases)
- test_mcp_tools.py:
• test_get_spec_reads_colon_inside_status_format — covers the
MCP path, not just the FastAPI route
The PUT-status route's substitution still rewrites in the
`**Status**:` form; that's a separate normalization choice and
isn't changed here. Surfaced during PR #52's MCP Phase 2 work and
flagged via a follow-up chip; this closes the chip's intent.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* docs(living-docs): regenerate sidecar templates for status-regex fix
source_hash drift only — no narrative change.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
|`test_get_spec_reads_colon_inside_status_format()`| Confidence test for the loosened ``_STATUS_VALUE_RE`` — the common |`sidecar/tests/test_mcp_tools.py`|
0 commit comments