[Merged] Repowise #5359: Include hotspot files in the generation plan
A mismatch between the plan and generation
Repowise generates documentation for developers and AI tools from a code repository. Issue #5359 reported that the initialization plan could omit Git hotspot files: generation would create pages for them, but the preview count did not include them. Cost estimates based on that count could therefore be inaccurate.
The two paths supplied different information to the same page selector. Actual generation had access to Git metadata, while planning did not pass it through. A file with no symbols that was not an entry point might otherwise be excluded, but its hotspot flag could cause generation to select it.
Give the plan the same inputs
The fix adds an optional git_meta_map parameter to generation planning and passes the available Git metadata at both initialization call sites. Callers without metadata retain the existing None default. The change does not introduce a new hotspot rule; it gives planning and generation consistent selection inputs.
The regression test covers both hotspot and default cases, comparing actual file pages with the plan count. Before the fix, the hotspot reproduction generated two pages while the plan counted one. After passing the metadata through, the focused tests passed.
Validation and upstream review
The focused hotspot and cost-estimator tests passed 18 tests, and a related generation regression recheck passed 32 tests after parser dependencies were installed. The full Linux unit suite did not complete: a worker exited early after 24,710 passed, 20 skipped, and 3 failures, leaving the rest unrun. We investigated the failures against the environment and baseline, but cannot claim that the full suite passed.
A maintainer approved and merged PR #5388 on November 13, 2026, closing the related issue. In the review, the maintainer confirmed that including hotspots in the plan helps frequently changed files get pages first. AI assisted with most of this contribution, which also provided a practical introduction to Repowise's code analysis and documentation generation.