You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: fail when generated examples are out of date #11
Part of #2. CI should fail when the committed generated examples are stale, the counterpart of the generate job in Go's .github/workflows/build.yml at 9e072f9.
Do
Add a generate job to .github/workflows/build.yml:
install protoc 29.3 (e.g. arduino/setup-protoc@v3) and the pinned protoc-gen-prost 0.5.0, protoc-gen-tonic 0.5.0 and protoc-gen-prost-serde 0.4.0 (cargo install --locked, cached)
use the toolchain from rust-toolchain.toml
run make generate, then git diff --exit-code -- examples/. On failure, emit ::error::examples/src/gen is out of date; run 'make generate' and commit the result.
Pin versions explicitly in the workflow, with a comment saying they must match AGENTS.md, the Makefile and the factory image. In Go, drift in the generated output came from toolchain versions.
This issue asks you to change .github/workflows/**.
Acceptance criteria
The job passes on this PR.
Show it failing: push a commit that hand-edits a generated file, link the failing run in the PR, then revert the commit.
🔍 Note: #16 already added the generate job (make generate + git diff). What's left here: make sure the versions are pinned and cross-referenced as the issue says, the ::error:: message, and a demonstrated failing run.
Checks run locally: cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, cargo build --workspace, cargo test --workspace — all clean/passing. make generate confirmed the committed
examples are current. Full test evidence is in the PR body.
Activity
erikist commentedon Oct 9, 2026
🔍 Note: #16 already added the
generatejob (make generate + git diff). What's left here: make sure the versions are pinned and cross-referenced as the issue says, the::error::message, and a demonstrated failing run.erikist commentedon Oct 9, 2026
🤖 Factory: picked up by dispatcher; working on branch factory/11-ci-fail-when-generated-examples-are.
test: hand-edit generated file to demonstrate CI drift detection (#11)
Revert "test: hand-edit generated file to demonstrate CI drift detect…
erikist commentedon Oct 9, 2026
🤖 Factory: Opened PR #23 (#23).
The
generatejob's core behavior (from #16) was already in place; this PRcross-references the pinned
protoc/protoc-gen-prost/protoc-gen-tonic/protoc-gen-prost-serdeversions againstAGENTS.md, theMakefileandDockerfile.factoryin the workflow comments, and demonstrates the checkworking: a commit that hand-edited a generated file made the
generatejobfail with the
::error::message(https://github.com/stablekernel/protoc-gen-rust-mcp/actions/runs/38004952691),
then a revert commit brought CI back to green
(https://github.com/stablekernel/protoc-gen-rust-mcp/actions/runs/38005177579).
Checks run locally:
cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings,cargo build --workspace,cargo test --workspace— all clean/passing.make generateconfirmed the committedexamples are current. Full test evidence is in the PR body.
ci: fail when generated examples are out of date (#11) (#23)