Fail CI when generated tool wrappers are out of sync with their .json specs#512
Conversation
0427b12 to
3dc81b5
Compare
|
So: you want the contributors to commit the generated files? Then we have to fix two things:
|
The docs are wrong. Those generated files were never regenerated unless you ran the |
|
Would be quite fancy, if the CI's generated tool wrappers get committed automagically. Like: CI re-generates tools -> CI commits (the new ones) -> pushes to the PR. So, it would always fit and nothing to forget about. |
I'd prefer a manual check that the generated file makes sense. |
Maybe this was a manual step done by Matthias before a release.. But running by contributors and check in CI/CD is more convenient :) |
|
Missing the update here: Line 56 in c99b238 meaning: align to the agents/conventions.md
|
… specs Add VerifyGeneratedTools to CI so that editing a tool wrapper's .json spec without regenerating and committing its .Generated.cs output fails the build. Make the generated header's source URL independent of the local git remote so the check doesn't fail depending on who runs it, and regenerate all tool wrappers with the canonical repo URL. Update AGENTS.md, docs/agents/conventions.md, and CONTRIBUTING.md to reflect that generated tool wrapper output must now be committed alongside its .json spec. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
e9ff4b8 to
0294cce
Compare
Problem
GenerateToolsregenerates the.Generated.cstool wrappers from their.jsonspecs, but it's a manual target with no CI enforcement. A contributor can edit a tool's.jsonspec without regenerating its wrapper, merge silently, and ship stale wrapper code in the next release.Outcome
Adds a
VerifyGeneratedToolstarget that regenerates the tool wrappers from a known-clean checkout and asserts the working copy stays clean afterward, failing the build if regeneration produces a diff. Wires it into theubuntu-latestrequired PR gate ahead ofTestandPack, so drift between a.jsonspec and its generated wrapper is caught before merge instead of shipping in the next release.Includes the regenerated
.fallout/build.schema.jsonand.github/workflows/ubuntu-latest.yml(both generated frombuild/Build.CI.GitHubActions.cs/ the target list — not hand-edited).