feat(docgen): skip pure-data dirs, respect .gitignore (tracked-only), --max guard - #11
Merged
Conversation
… --max guard Three hardening fixes (ported from upstream's pbx-trader-lab-public so docgen is safe to point at large data-heavy repos). 1. NO-CODE skip: a dir whose every file is DATA (.json/.csv/.yaml/…) or PROSE/markup (.md/.rst/.html/…) — no code symbols to point at — is skipped by needsAnalysis (unless it's a trunk with documented children). .sql stays documentable. Saves thousands of pointless claude-p calls on repos with research-output trees (one downstream repo had 11.8k such dirs). 2. Respect .gitignore via tracked-files-only: selectFiles drops any file not in 'git ls-files' (memoized per root). Non-git repos fall back to filesystem-walk unchanged. 3. --max <n> CLI guard + a >200-dirs stderr warning when running --until-done without --changed/--max, so a runaway sweep can never silently fire thousands of claude calls. computeStatus also reports a 'skipped (no code)' bucket so an operator on a data-heavy repo doesn't see '12k uncovered' and panic. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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.
Three hardening fixes ported from upstream
pbx-trader-lab-publicso docgen is safe to point at large data-heavy repos.needsAnalysis— unless it's a trunk with documented children..sqlstays documentable. Saves thousands of pointlessclaude -pcalls on research-output trees.selectFileskeeps onlygit ls-filestracked paths (memoized per root). Non-git repos fall back to filesystem-walk unchanged.--max <n>CLI guard + a >200-dirs stderr warning when running--until-donewithout--changed/--max. Runaway safety net.computeStatusalso reports askipped (no code)bucket so a data-heavy repo doesn't look like it has 12k uncovered backlog.Suite: 61/61 green.
🤖 Generated with Claude Code