Fix: exclude - [x] done items from plain-bullet outstanding count #10

Merged
coding-agent-marvin8 merged 0 commits from refs/pull/10/head into main 2026-06-27 08:38:05 +00:00
coding-agent-marvin8 commented 2026-05-19 10:14:26 +00:00 (Migrated from codeberg.org)

Summary

  • _parse_heading_section in api.py now subtracts - [x]/- [X] items from the outstanding count when parsing plain-bullet files (e.g. security-audit.md).
  • A section where every bullet is done is suppressed, matching the behaviour of all-done checklist sections.
  • IntentHeading.open_count=None contract is preserved; total_count now reflects open-only bullet count.
  • Two new tests added to test_api.py.
  • docs/usage/intent-files.md and Specifications.md updated to document that prose paragraphs, blockquotes, sub-headings, and indented bullets are silently ignored by the parser — authors may use them freely for context and notes.

Root cause

_PLAIN_BULLET_RE = re.compile(r"^- .+") matches - [x] done item as well as plain bullets, so marking an audit item as - [x] had no effect on the rendered count.

Test plan

  • uv run tryke test — 109 passed
  • uv run nox — all 8 sessions green
## Summary - `_parse_heading_section` in `api.py` now subtracts `- [x]`/`- [X]` items from the outstanding count when parsing plain-bullet files (e.g. `security-audit.md`). - A section where every bullet is done is suppressed, matching the behaviour of all-done checklist sections. - `IntentHeading.open_count=None` contract is preserved; `total_count` now reflects open-only bullet count. - Two new tests added to `test_api.py`. - `docs/usage/intent-files.md` and `Specifications.md` updated to document that prose paragraphs, blockquotes, sub-headings, and indented bullets are silently ignored by the parser — authors may use them freely for context and notes. ## Root cause `_PLAIN_BULLET_RE = re.compile(r"^- .+")` matches `- [x] done item` as well as plain bullets, so marking an audit item as `- [x]` had no effect on the rendered count. ## Test plan - [x] `uv run tryke test` — 109 passed - [x] `uv run nox` — all 8 sessions green
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
marvin8/yilan!10
No description provided.