feat(generation): folder-specific documentation floors (#633) - #2040
Open
sloemo01 wants to merge 3 commits into
Open
feat(generation): folder-specific documentation floors (#633)#2040sloemo01 wants to merge 3 commits into
sloemo01 wants to merge 3 commits into
Conversation
) --folder-coverage 'src/core=1.0' promises every code file under src/core gets a file page whatever its importance score; 'src/legacy=0.5' promises half. A floor, not a cap: pinned files union into the selection additively and never displace global picks, so the cost table stays truthful. - GenerationConfig.folder_coverage ((glob, pct), ...) + parser validating 'GLOB=PCT' strings and (glob, pct) pairs - select_pages: _score_code_files split from the global cap so files below the cutoff are pinnable; _folder_coverage_pins takes ceil(pct*n) top-scored files per glob and unions them (dedup, additive) - from_repo_config reads folder_coverage from .repowise/config.yaml - init --folder-coverage flag (repeatable), saved to config.yaml alongside max_file_pages; both generation phases + the cost estimator pick it up via the shared select_pages path (no estimate drift) - Docs: CLI reference + CONFIG.md Tests: 7 selector-floor tests, 3 CLI wiring tests, cost-estimator pin test. Sabotage-verified: the pin tests fail on the pre-fix selector.
- folder_coverage.py: unused Mapping import - test_init_folder_coverage.py: unused Path import, unused captured var, redundant Path import
sloemo01
force-pushed
the
feat/folder-coverage
branch
from
August 31, 2026 19:42
ace8da9 to
780b3d4
Compare
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.
What
Fixes #633, per the shape Raghav scoped in the thread.
--folder-coverage 'src/core=1.0'promises every code file undersrc/coregets a file page whatever its importance score;'src/legacy=0.5'promises half. A floor, not a cap — the pinned files union into the selection additively, so the cost table stays truthful about what the user asked for.Root cause
The global file-page cap ranked every code file and cut at the threshold, so a low-importance file in a folder the user explicitly cares about could never get a page — there was no way to pin a folder's coverage.
Changes
folder_coveragein.repowise/config.yaml("GLOB=PCT"strings) + a repeatable CLI flag; survives every update.select_pages— scoring split from the global cap (_score_code_files) so files below the cutoff are pinnable;_folder_coverage_pinstakesceil(pct * n)highest-scored files per glob and unions them (dedup, additive, mirroring the tour-landmark force-include)._is_code_fileset the global budget ranks.build_generation_plansharesselect_pages, so the init cost table reflects pins automatically (tested).Tests
Note:
test_plugin_contentis red on main itself (v0.47.0 release bug, unrelated to this PR).