Repository navigation
ci: fail when generated examples are out of date (#11) - #23
Merged
Merged
Conversation
added 2 commits
October 9, 2026 23:31
Clarify that protoc and the prost/tonic/prost-serde plugin versions in the generate job must match AGENTS.md, the Makefile and Dockerfile.factory, as the issue asks.
Temporary commit to show the generate job failing on stale examples; reverted in the next commit.
Contributor
Author
|
🔍 Verified the demonstration: run https://github.com/stablekernel/protoc-gen-rust-mcp/actions/runs/38004952691 (commit d868b88, a hand edit to |
erikist
marked this pull request as ready for review
October 9, 2026 23:38
2 tasks
Contributor
Author
|
🤖 Factory (dispatched 2026-10-09T23:38:40Z): Reviewed the one open point from
No other open review bodies, inline comments, or failing checks were reported. Checks on the current head (
No open questions from my side. This PR should be ready for the maintainer's merge as noted in their comment. |
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.
Closes #11
Summary
The
generatejob (added in #16, confirmed by a maintainer comment on thisissue) already runs
make generateand fails withgit diff --exit-code -- examples/src/genplus an::error::annotationwhen the committed generated examples are stale. This PR finishes what was
still open per the issue and the maintainer's follow-up comment:
.github/workflows/build.yml's comments:protoc29.3 must matchAGENTS.md, theMakefileandDockerfile.factory, and theprotoc-gen-prost/protoc-gen-tonic/protoc-gen-prost-serdeversions(0.5.0/0.5.0/0.4.0) must match the same three places, mirroring the Go
repo's wording for its own toolchain pin.
::error::examples/src/gen is out of date; run 'make generate' and commit the result.message was already in place and is unchanged.No application code changed;
.github/workflows/build.ymlis the only filetouched (issue #11 explicitly asks for this).
Demonstrated failure
d868b88hand-edited
examples/src/gen/examples/v1/examples.v1.rsby appending acomment, to simulate a stale/hand-edited generated file.
generatejob failed as expected, with the::error::annotation:https://github.com/stablekernel/protoc-gen-rust-mcp/actions/runs/38004952691/job/114071485991
(full run: https://github.com/stablekernel/protoc-gen-rust-mcp/actions/runs/38004952691)
81c5e9areverts the hand-edit. The next CI run on this branch is green again:
https://github.com/stablekernel/protoc-gen-rust-mcp/actions/runs/38005177579
Test evidence
Run from the repo root:
Also ran
make generatelocally (protoc 29.3, protoc-gen-prost/tonic 0.5.0,protoc-gen-prost-serde 0.4.0, all already on PATH in the factory image) and
confirmed
git status --porcelain -- examples/src/genis empty, i.e. thecommitted examples are current.
CI on this branch (after the revert): "test", "generate" and all three
"build" jobs pass — see
https://github.com/stablekernel/protoc-gen-rust-mcp/actions/runs/38005177579.
Self-review: ran the
reviewersubagent once against this diff and theissue's acceptance criteria. It flagged that the PR body initially left the
"Demonstrated failure" section as a placeholder instead of linking the
actual failing run — fixed by filling in the links above.
Notes for reviewers
The bulk of the
generatejob's behavior (installing protoc/plugins,running
make generate, diffing, the::error::message) was alreadyimplemented in feat: scaffold the Cargo workspace, plugin skeleton, example crate and CI (#3) #16; this PR only adds the explicit version
cross-reference the issue asked for and the demonstrated failing/reverted
run.
The issue's parenthetical "(
cargo install --locked, cached)" is notaddressed here: the plugin install step is uncached, same as before this
branch. That's a pre-existing characteristic of the job from feat: scaffold the Cargo workspace, plugin skeleton, example crate and CI (#3) #16, not
something this narrower follow-up (per the maintainer's scoping comment)
changes. Happy to file a separate follow-up issue for caching if a
reviewer wants it tracked.
Only
.github/workflows/build.ymlchanged, as the issue requires.Factory-authored