feat(maintenance): derived maintenance report + coverage (task 1.5)#64
Merged
Conversation
Adds an auditing view over the maintenance contract and closes the patch-coverage gaps from the Phase 1 PR (#63). - maintenance_contract.py: scan_maintenance() walks the corpus and resolves each page's mode; format_maintenance_report() groups by mode (manual/hybrid listed; auto omitted unless --all). Module at 100%. - cli.py: new 'attune-author maintenance-report [--all]' command. Kept separate from 'status' so the status output stays stable for attune-ai's parser (constraint C2). - Tests: scanner/formatter/CLI coverage, plus the previously-uncovered defensive branches (unbalanced regenerated fences, field carry no-ops, unreadable page) and an end-to-end generator test proving a hybrid region survives regeneration even under --overwrite. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
format_maintenance_report now renders page paths via as_posix() so the report is identical across OSes (Windows was emitting backslashes, breaking the cross-platform CI matrix). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
7a8ce8f to
4d41f3e
Compare
…k 1.6) (#65) attune-ai's dashboard parses 'attune-author status' to find stale help features. Confirmed the output format is unchanged and add a contract guard mirroring attune-ai's _parse_status_output, so a future format drift fails attune-author CI rather than silently breaking the dashboard (constraint C2). No production change needed. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Merged
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.
Phase 1, task 1.5 — the maintenance report
Builds on the merged Phase 1 contract (#63). Adds an auditing view over the contract and closes the patch-coverage gaps from #63.
What it adds
scan_maintenance()/format_maintenance_report()inmaintenance_contract.py— walk the help corpus, resolve each page's mode from frontmatter (the source of truth), and render a report grouped by mode.manual/hybridare listed (the protected pages);autois summarized and omitted unless--all.attune-author maintenance-report [--all]. Deliberately separate fromstatussostatusoutput stays stable for attune-ai's parser (constraint C2). This is the report task 4.1 will use to triage which pages to flip offauto.Coverage (closes the #63 codecov gap)
maintenance_contract.pynow at 100% — added tests for the previously-uncovered defensive branches (unbalanced regenerated fences, field-carry no-ops, unreadable page).hybridregion survives regeneration even under--overwrite(the contract holds through the real generator, not just in unit tests).Example
Local:
tests/test_maintenance_contract.py35 passed; full suite green (one unrelated local-only.envauth-test failure, passes in CI).Spec task 1.5 ✅. Remaining Phase 1: 1.6 (status-format check), 1.7 (release).
🤖 Generated with Claude Code