Skip to content

Add check_readme_steps_sync cases for section bounds, ordering, and matching rules - #156

Merged
dmccoystephenson merged 1 commit into
mainfrom
feature/readme-steps-sync-cases
Oct 12, 2026
Merged

dmccoystephenson merged 1 commit into
mainfrom
feature/readme-steps-sync-cases

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

  • Six fixture cases are added to CheckReadmeStepsSyncTests in tests/test_check_docs.py, so that check_readme_steps_sync gets the same edge-case coverage check_placeholders received in Add check_placeholders cases for conditionals, section bounds, and trimming #155:
    • numbered items after the next ## heading are not counted (section bound)
    • a ## What it does section at end of file is still read (the \Z branch)
    • out-of-order README items still pass. This documents current behavior: both lists are sorted before comparison, so ordering is not enforced
    • a duplicated README number is reported ([1, 1] vs [1])
    • numbered items without a bold ** lead are not counted
    • a ### N - heading with a hyphen instead of an em dash is not counted as a Step. This also documents current behavior
  • Each failure case checks the number lists inside the error message, not only the error count, so a check that fires for the wrong reason is still caught.
  • These are characterization tests only. Production code is unchanged and no bug was found.

No tracking issue: the gap was found during triage (Stage B unit-test expansion).

Skipped backlog: every other open issue was deferred this cycle:

Research grounding

RESEARCH.md §3: regression guards and characterization tests help an agent tell real fixes apart from coincidental patches. No template change is made.

Test plan

  • python3 scripts/check_docs.py printed "Doc consistency check passed."
  • python3 -m unittest discover -s tests -v ran 25 tests, all OK (19 before this change)
  • No /create-dev-loop run is needed because neither create-dev-loop.md nor the template changed.

This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).

🤖 Generated with Claude Code


drafted by Claude on behalf of Daniel Stephenson

…atching rules

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dmccoystephenson

Copy link
Copy Markdown
Member Author

Self-review rubric:

  • Scope: PASS. Only tests/test_check_docs.py was modified (+45/-0), and all of it is new CheckReadmeStepsSyncTests cases.
  • Tests-new: PASS. No new production functions were added. The six cases exercise the existing check_readme_steps_sync.
  • Tests-fix: N/A. No bug fix is included: production code is unchanged and these are characterization tests.
  • Sibling structure: PASS. The cases follow the existing class pattern: inline fixture strings, check_docs.errors = [] reset in setUp(), and assertions on message content.
  • Sibling renames: N/A. Nothing was renamed.
  • Docs: PASS. The Phase 7 table was checked and no doc describes these edge cases. The module docstring about the setUp() reset still holds.
  • Issue resolution: N/A. No Closes #N; the gap was found during triage.
  • CI: PASS. doc-consistency is green on the PR head, and locally 25 tests ran OK.
  • Placeholder parity / README Step parity / fence escaping / phase numbering / version comments: N/A. create-dev-loop.md and README.md were not touched.
  • Research grounding: PASS. RESEARCH.md §3 is cited; no finding is shipped, so no Implementations entry is needed.
  • No back-ported specifics / gardener interface / retrofit note: N/A. Steps and template are unchanged.
  • Behavioral validation: N/A. No template or Step change.

Judgment call flagged: test_order_is_not_enforced and test_step_heading_without_em_dash_is_not_counted lock in permissive current behavior. If ordering or heading strictness is ever wanted, those tests will need deliberate updates. That is intentional for characterization tests.

Do-not-auto-merge check: no protected path is matched. Only tests/test_check_docs.py changed, with no deletions.

This review comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

@dmccoystephenson
dmccoystephenson merged commit b8029fe into main Oct 12, 2026
1 check passed
@dmccoystephenson
dmccoystephenson deleted the feature/readme-steps-sync-cases branch October 12, 2026 08:21
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