🐛 Fix _has_acceptance_criteria false-negative on ### sub-headings (closes #83) - #85
Merged
Merged
Conversation
…oses #83) The next-heading regex `\n#{2,}\s+` matched any heading at level 2 or deeper, so a `###` sub-heading inside an `## Acceptance Criteria` section truncated the search range before any `- [ ]` items, returning False. Detect the AC heading level from the match and stop only at headings of the same level or higher (fewer #s). This handles both `## Acceptance Criteria` with `###` sub-headings and `### Acceptance Criteria` with `####` sub-headings, while still terminating at sibling sections. Bump version 0.2.6 -> 0.2.7.
The previous commit bumped pyproject.toml but did not regenerate the lock file, leaving it at 0.2.6.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_has_acceptance_criteriareturnedFalsefor valid AC sections that contain###sub-headings (a structure encouraged byPREPARE_SYSTEM_PROMPT.md).\n#{2,}\s+matched any heading at level 2 or deeper, so a###sub-heading inside an## Acceptance Criteriasection truncated the search range before any- [ ]items.##,###, ...) and stop only at headings of the same level or higher. The simpler fix proposed in the issue (r"\n#{1,2}\s+") would have broken the existing### Acceptance Criteriacase where a sibling### Othershould terminate the section.Test plan
TestHasAcceptanceCriteriacovering the bug and the level-aware termination behaviouruv run pytest— 182 passeduv run poe check— ruff cleanuv run poe typecheck— pyright clean