Skip to content

Conversation

rwjblue-glean
Copy link
Contributor

@rwjblue-glean rwjblue-glean commented Jun 26, 2025

Motivation and Context

In this project the README.md is generated by running make inside internal/readme/. The goal of this is to ensure that the code snippets that are used within the README.md are kept in sync with the current state of the repo. In order to do this, we use weave to combine the code snippets from standalone files into the final top level README.md file.

Unfortunately, at the moment, it's extremely easy for folks to just update the README.md to fix / tweak various prose or code snippets which leaves things in a bad state. In that scenario the next "re-generation" would clobber any of the tweaks that were made manually to the top level README.md.

Fixes #48

How Has This Been Tested?

Local testing of the script.

Breaking Changes

N/A -- This is a CI only change.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Internal update (not consumer facing -- e.g. CI only)

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

With these changes, any proposed PRs that edit either the top level README.md or internal/readme/README.src.md in such a way that the two files are no longer in sync (after re-running weave) will have a failing CI job that instructs folks to run make in the internal/readme/ directory. PRs that do not touch internal/readme/** or README.md in the project root will have no additional CI job.

Additionally, I've added a section to the CONTRIBUTING.md that explains how to make changes to the README.md.

@rwjblue-glean rwjblue-glean force-pushed the rwjblue/protect-readme-generation branch from 18ba343 to ca105ae Compare June 26, 2025 15:45
@findleyr findleyr self-requested a review June 26, 2025 16:06
Copy link
Contributor

@findleyr findleyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@findleyr findleyr merged commit 9f6dd5c into modelcontextprotocol:main Jun 26, 2025
3 checks passed
@rwjblue-glean rwjblue-glean deleted the rwjblue/protect-readme-generation branch June 26, 2025 16:45
@jba jba mentioned this pull request Jul 1, 2025
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.

README.md Generation Issue
2 participants