Skip to content

fix(phase,sync): H2 heading support in _req_count and YAML-mode MD fallback (REQ-358, REQ-359)#191

Merged
tbitcs merged 1 commit into
developfrom
fix/req-358-359-phase-sync
May 30, 2026
Merged

fix(phase,sync): H2 heading support in _req_count and YAML-mode MD fallback (REQ-358, REQ-359)#191
tbitcs merged 1 commit into
developfrom
fix/req-358-359-phase-sync

Conversation

@tbitcs
Copy link
Copy Markdown
Contributor

@tbitcs tbitcs commented May 30, 2026

Summary

Implements REQ-358 and REQ-359: two targeted fixes for phase readiness checks and sync YAML-mode fallback.

REQ-359: _req_count H2 heading support (phase.py)

Widens the first regex in _req_count from ^###\s+REQ- to ^#{2,3}\s+REQ- so that H2-style requirement headings (## REQ-BE-001: Title) are counted alongside H3 headings.

REQ-358: Markdown fallback in YAML sync mode (sync.py)

In
un_sync() YAML-first mode, when no YAML requirement files exist but REQUIREMENTS.md contains >=5 REQ-* references, the function now falls back to Markdown parsing rather than silently producing an empty state. Same fallback applies to test cases via TESTS.md.

Tests

Added ests/test_req_358_359.py with 5 tests covering H2/H3 heading counting, YAML-mode markdown fallback, and no-fallback when YAML exists.

Conversation: https://app.warp.dev/conversation/b2962fe2-fde9-449b-9e70-d4e97ded5d13
Run: https://oz.warp.dev/runs/019e76b9-669d-7de8-95c8-4a10a9581475

This PR was generated with Oz.

…llback

REQ-359: Widen _req_count regex from ^###\s+REQ- to ^#{2,3}\s+REQ- so
H2-style requirement headings (## REQ-BE-001) are counted alongside H3.

REQ-358: In run_sync() YAML-first mode, fall back to parsing
REQUIREMENTS.md when no YAML requirement files exist but the Markdown
file contains >=5 REQ-* references. Also falls back for tests.

Co-Authored-By: Oz <[email protected]>
@tbitcs tbitcs merged commit 6236c8c into develop May 30, 2026
16 of 17 checks passed
@tbitcs tbitcs deleted the fix/req-358-359-phase-sync branch May 30, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant