Repository navigation
chore: Mark woven docs linguist-generated - #418
Merged
Merged
Conversation
docs/*.md and README.md are woven from docs/src/*.src.md and README.src.md by scripts/weave.swift, which CI verifies with --check. Marking them linguist-generated in .gitattributes lets GitHub collapse the generated output in PR diffs and exclude it from language statistics so reviewers focus on the sources. Conformance baselines, interop/RESULTS.md, and Tests/MCPTests/Generated stay unmarked: the baselines and interop results are what reviews check, and no CI job reruns the fixture generators in Tests/MCPTests/Generated. CLAUDE.md documents the rule and exclusions for future generators. Co-authored-by: Jean-Matthieu Schaffhauser <jeanmatthieu@apple.com> Assisted-by: Claude Assisted-by: Gemini
akhilcb
approved these changes
Dec 5, 2026
varun06
approved these changes
Dec 5, 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.
Summary
A docs change lands twice in a PR diff: in its
docs/src/*.src.mdsource (or theExamples/Snippets/region it includes) and in the wovendocs/*.md/README.md. The woven half needs no manual review becauseswift scripts/weave.swift --checkproves it matches in CI. Marking itlinguist-generatedin.gitattributesmakes GitHub collapse it in PR diffs and exclude it from language statistics./docs/*.mdand root/README.md(anchored sodocs/src/*.src.mdand hand-written READMEs underconformance/,interop/,.agents/, andExamples/stay visible).conformance/baseline*.ymlandinterop/RESULTS.md— changes there are the point of a review.Tests/MCPTests/Generated/**— holds expected test results (FrontmatterCorpus.swift,ServerCardExamples.swift), and no CI job reruns its generators (scripts/frontmatter-corpus.mjs,scripts/server-card-examples.mjs).CLAUDE.md: documents that.gitattributesmarks woven docslinguist-generated, that new generators add their output there only when CI proves it matches its source, and that output reviewers need to see stays unmarked.Evidence
.gitattributes;git check-attr linguist-generatedreportsunspecifiedfor all files.git ls-files -z | xargs -0 git check-attr linguist-generated | grep -v ': unspecified$'reportstruefor exactly the 10 wovendocs/*.mdfiles and rootREADME.md(11 files total).docs/src/*.src.md,README.src.md,conformance/README.md,interop/README.md,interop/RESULTS.md,.agents/README.md,Examples/foundation-models/README.md,conformance/baseline.yml, andTests/MCPTests/Generated/*all reportunspecified.swift scripts/weave.swift --checkandswift buildpass.Merge Danger
Door: two-way (revert the commit).
Blast Radius: GitHub diff rendering and Linguist stats for PRs in this repository; no SDK code, build, or user impact.
AI assistance: written with Claude and Gemini at the authors' request, for human review before merge.