Skip to content

chore: Mark woven docs linguist-generated - #418

Merged
jeanmatthieu merged 1 commit into
rel/1.0.0from
chore/linguist-generated
Dec 5, 2026
Merged

jeanmatthieu merged 1 commit into
rel/1.0.0from
chore/linguist-generated

Conversation

@jeanmatthieu

Copy link
Copy Markdown
Contributor

Summary

A docs change lands twice in a PR diff: in its docs/src/*.src.md source (or the Examples/Snippets/ region it includes) and in the woven docs/*.md / README.md. The woven half needs no manual review because swift scripts/weave.swift --check proves it matches in CI. Marking it linguist-generated in .gitattributes makes GitHub collapse it in PR diffs and exclude it from language statistics.

/docs/*.md linguist-generated=true
/README.md linguist-generated=true
  • Marked: the 10 woven guides in /docs/*.md and root /README.md (anchored so docs/src/*.src.md and hand-written READMEs under conformance/, interop/, .agents/, and Examples/ stay visible).
  • Left unmarked:
    • conformance/baseline*.yml and interop/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 .gitattributes marks woven docs linguist-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

  • Before: no .gitattributes; git check-attr linguist-generated reports unspecified for all files.
  • After:
    • git ls-files -z | xargs -0 git check-attr linguist-generated | grep -v ': unspecified$' reports true for exactly the 10 woven docs/*.md files and root README.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, and Tests/MCPTests/Generated/* all report unspecified.
    • swift scripts/weave.swift --check and swift build pass.

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.

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
@jeanmatthieu
jeanmatthieu requested a review from a team as a code owner December 5, 2026 18:01
@jeanmatthieu
jeanmatthieu merged commit 719f896 into rel/1.0.0 Dec 5, 2026
14 checks passed
@jeanmatthieu
jeanmatthieu deleted the chore/linguist-generated branch December 5, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants