Skip to content

feat(maintenance): derived maintenance report + coverage (task 1.5)#64

Merged
silversurfer562 merged 3 commits into
mainfrom
claude/doc-automation-p1-report
Jun 15, 2026
Merged

feat(maintenance): derived maintenance report + coverage (task 1.5)#64
silversurfer562 merged 3 commits into
mainfrom
claude/doc-automation-p1-report

Conversation

@silversurfer562

Copy link
Copy Markdown
Member

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() in maintenance_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/hybrid are listed (the protected pages); auto is summarized and omitted unless --all.
  • New CLI command attune-author maintenance-report [--all]. Deliberately separate from status so status output stays stable for attune-ai's parser (constraint C2). This is the report task 4.1 will use to triage which pages to flip off auto.

Coverage (closes the #63 codecov gap)

  • maintenance_contract.py now at 100% — added tests for the previously-uncovered defensive branches (unbalanced regenerated fences, field-carry no-ops, unreadable page).
  • Added an end-to-end generator test proving a hybrid region survives regeneration even under --overwrite (the contract holds through the real generator, not just in unit tests).

Example

## Maintenance report

24 page(s) — 22 auto, 1 manual, 1 hybrid

### manual (1)
- templates/auth/task.md

### hybrid (1)
- templates/cli/concept.md

(22 auto page(s) omitted; pass --all to list them)

Local: tests/test_maintenance_contract.py 35 passed; full suite green (one unrelated local-only .env auth-test failure, passes in CI).

Spec task 1.5 ✅. Remaining Phase 1: 1.6 (status-format check), 1.7 (release).

🤖 Generated with Claude Code

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

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

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>
…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>
@silversurfer562 silversurfer562 merged commit d8662e3 into main Jun 15, 2026
13 checks passed
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