Repository navigation
D270 — pr-scope leaves out what .gitattributes marks linguist-generated (#497) - #500
Merged
Merged
Conversation
…ed (#497) The review budget knew generated files only by a fixed name pattern; a tool's output a project declares linguist-generated (cargo-about's licence notices) was counted. pr-scope now asks git check-attr for every changed path and leaves out those set or true; =false keeps a path counted. 05-workflow.md §4 says it. Agent-Session: napkinstack-os-77 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ads them check-attr read the working tree's .gitattributes while the numstat measures HEAD; it now reads --source HEAD (a git before 2.40 falls back to the working tree). Any value but false is generated, as Linguist reads it, so linguist-generated=1 is left out too. Agent-Session: napkinstack-os-77 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
napkinstack-admin
approved these changes
Nov 23, 2026
This was referenced Nov 23, 2026
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.
Workstream
D270, from #497. Its row is in
docs/governance/workstreams.md.What it changes
05-workflow.md§4 leaves generated files out of the review budget (P2), butpr-scoperecognised them only by a fixed name pattern. Downstream, a project commits the licence notices thatcargo-aboutwrites. P2 counted those 238 lines of HTML: the pull request came to 591/400 lines, against 353/400 without them. Every pull request that added a dependency merged asover-budgetfor that reason alone (four so far).Now
pr-scopealso leaves out every changed path that HEAD's.gitattributesmarkslinguist-generated. GitHub uses this convention to fold such files in its diffs, and the skeleton already applies it to the skills. The attribute is read the way GitHub reads it:falsemarks a path generated,linguist-generated=1included;=falseand-linguist-generatedkeep a path counted;git check-attr --source HEAD. A git older than 2.40 falls back to the working tree;core.quotepath=off).P2 stays a warning. Declaring a file generated takes a line in
.gitattributes, and a reviewer sees that line.Not taken: guessing generated files from their content or a header.
Left as they were:
--no-renameswould count a moved file twice, which would turn green results red.Fresh verifier
Findings fixed in the second commit:
linguist-generated=1, which GitHub treats as generated, was counted.What a project receives
The engine (
fitness/pr_scope.py) and05-workflow.md§4. Nothing that was green turns red. A budget inflated by declared generated files goes down.Definition of Done
=true, a bare attribute,=false,=1,-linguist-generated, and an uncommitted edit of.gitattributes.uv run bash platform/tests/run.shgreen, on a committed treeuv run nstack fitnessgreen🤖 Generated with Claude Code