Skip to content

ci: enforce README and crate docs stay in sync#93

Draft
mxinden wants to merge 2 commits into
mozilla:mainfrom
mxinden-bot:claude/ci-rdme-check
Draft

ci: enforce README and crate docs stay in sync#93
mxinden wants to merge 2 commits into
mozilla:mainfrom
mxinden-bot:claude/ci-rdme-check

Conversation

@mxinden

@mxinden mxinden commented May 28, 2026

Copy link
Copy Markdown
Member

Add a rdme job that runs cargo rdme --check so the README, which is generated from the crate-level docs in src/lib.rs (delimited by the existing markers), fails CI when it drifts from the source. Without this, public API changes that touch the usage example in the doc comment land with a stale README that won't compile if a user copies it.

Copilot AI review requested due to automatic review settings May 28, 2026 12:31
@mxinden mxinden requested a review from KershawChang as a code owner May 28, 2026 12:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a CI job that runs cargo rdme --check so the generated README.md cannot drift from the crate-level documentation in src/lib.rs (delimited by the existing <!-- cargo-rdme start/end --> markers verified in the repo).

Changes:

  • New rdme job in the Rust workflow that checks out the repo (with persist-credentials: false), installs cargo-rdme via the pinned mozilla/actions/rust action, and runs cargo rdme --check.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Clean addition. The rdme job follows existing CI patterns (pinned actions, persist-credentials: false, consistent mozilla/actions/rust version at v1.1.5). Running on all trigger events is the right call — README drift should be caught everywhere, not just on PRs.

@larseggert

Copy link
Copy Markdown
Collaborator

neqo uses cargo-readme - is cargo-rdme a better choice for neqo, too? Should this live in mozilla/actions?

@mxinden

mxinden commented May 28, 2026

Copy link
Copy Markdown
Member Author

Will look into it. Thanks @larseggert.


Any idea why the other workflows aren't running here? Note that this is an external contributor (mxinden-bot).

@larseggert

Copy link
Copy Markdown
Collaborator

Two things: GitHub is currently flaky (again...) and also the semver check was busted. Can you rebase this PR and see if all checks trigger? (I don't have the rights it seems.)

@mxinden mxinden marked this pull request as draft May 28, 2026 19:06
claude added 2 commits June 1, 2026 14:47
Add a rdme job that runs `cargo rdme --check` so the README, which is
generated from the crate-level docs in src/lib.rs (delimited by the
existing <!-- cargo-rdme start/end --> markers), fails CI when it
drifts from the source. Without this, public API changes that touch
the usage example in the doc comment land with a stale README that
won't compile if a user copies it.
Brings all mozilla/actions references in line with the rest of the
workflow (rustfmt, clippy, machete, mutants-pr, actionlint are already
at v1.1.5). The v1.1.4 semver workflow was busted; upgrading should
unblock PR checks.

https://claude.ai/code/session_015XGyTTzgTPGxYVCfkfguVK
@mxinden-bot mxinden-bot force-pushed the claude/ci-rdme-check branch from fa95acd to 9aad48f Compare June 1, 2026 14:49
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.06%. Comparing base (a45e934) to head (9aad48f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #93   +/-   ##
=======================================
  Coverage   97.06%   97.06%           
=======================================
  Files           2        2           
  Lines         784      784           
  Branches      784      784           
=======================================
  Hits          761      761           
  Misses         21       21           
  Partials        2        2           
Flag Coverage Δ
linux 97.06% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mxinden-bot mxinden-bot force-pushed the claude/ci-rdme-check branch from 9aad48f to 357a5ff Compare June 1, 2026 15:04
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.

5 participants