Commit generated JSON-schema conformance policies + auto-update infra#285
Commit generated JSON-schema conformance policies + auto-update infra#285lmolkova wants to merge 3 commits into
Conversation
Add a `make generate-conformance-policies` target that emits the committed policies/_schemas.rego from the pinned semconv GenAI registry (via jq), so the schema policies are versioned instead of regenerated at test-run time. _setup_weaver.policies_dir() now returns the committed directory. Add the auto-conformance-policies workflow to regenerate and push the policies on Renovate branches when versions.env pins are bumped (Renovate's postUpgradeTasks don't run on hosted Renovate). Assisted-by: Claude Opus 4.8
Pull request dashboard statusStatus last refreshed: 2026-07-25 16:47:12 UTC.
This automated status or its linked feedback items may be incorrect. If something looks wrong, please report it with the result you expected. If you believe this pull request is incorrectly routed as waiting on the author, comment |
There was a problem hiding this comment.
Pull request overview
This PR shifts GenAI conformance JSON-schema advice policies from being generated at conformance test runtime to being committed and reproducible via a make generate-conformance-policies target, with automation to regenerate and push updated policies on Renovate branches when versions.env pins change.
Changes:
- Update
SEMCONV_GENAI_REFpin and adjust Renovate configuration to track the semconv-genai repo viagit-refsdigest updates. - Stop generating
policies/_schemas.regoat runtime; commit it and add a Makefile target to regenerate it from the provisioned semconv registry cache. - Add an auto-regeneration GitHub Actions workflow for Renovate branches and update policy documentation/comments and
.gitignoreaccordingly.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
versions.env |
Bumps the pinned semconv-genai commit SHA and adjusts the Renovate annotation. |
util/opentelemetry-test-util-genai/src/opentelemetry/test_util_genai/_setup_weaver.py |
Removes runtime schema generation; policies_dir() now points at committed policies. |
policies/genai_content_validation.rego |
Updates comments to reflect committed _schemas.rego generation via make. |
policies/_schemas.rego |
New committed, generated Rego constants containing inlined semconv JSON schemas. |
Makefile |
Adds generate-conformance-policies to regenerate policies/_schemas.rego from the cached registry using jq. |
.gitignore |
Stops ignoring policies/_schemas.rego since it is now committed. |
.github/workflows/auto-conformance-policies.yml |
Adds workflow to regenerate policies on Renovate branches and push the result back. |
.github/renovate.json5 |
Updates custom manager logic to treat SEMCONV_GENAI_REF as a git-refs digest pin (branch as currentValue, SHA as currentDigest). |
- Gate the `apply` job on a `generate` job output so it skips entirely (rather than failing on a missing artifact) when no policy changes were produced. - Pass `name: patch` to download-artifact so the patch extracts to runner.temp/patch instead of a per-artifact subdirectory. Assisted-by: Claude Opus 4.8
There was a problem hiding this comment.
this won't be necessary with next weaver release open-telemetry/weaver#1539, will address in a follow up
| - name: Configure CLA-approved git bot | ||
| run: .github/scripts/use-cla-approved-github-bot.sh |
| git add -N --ignore-removal policies | ||
| git diff > patch |
Add a
make generate-conformance-policiestarget that emits the committed policies/_schemas.rego from the pinned semconv GenAI registry, so the schema policies are versioned instead of regenerated at test-run time.Add the auto-conformance-policies workflow to regenerate and push the policies on Renovate branches when versions.env pins are bumped.
This lays down ground to generate span validation rego with weaver