weiqingy opened a new pull request, #969: URL: https://github.com/apache/flink-agents/pull/969
Linked issue: #968 ### Purpose of change The `flink-agents-dev` skill ships a copy of `docs/yaml-schema.json` at `dev/agent-skills/flink-agents-dev/assets/yaml-schema.json`, and records the blob SHA it was taken from in `assets/yaml-contracts.yaml`. Nothing regenerates either one, and the two existing schema checks (`test_specs.py`, `SchemaParityTest`) stop at `docs/yaml-schema.json`, so re-exporting the schema leaves both stale with no failing test. The stale copy teaches agents a schema the repository no longer has. The stale `blob_sha` is the quieter half: `SKILL.md` and `references/local-development.md` both instruct agents to trust the bundled schema only when it describes the same revision as the checkout, and that comparison is decided by exactly this value. `tools/check-skill-schema.py` asserts the bundled copy and the recorded SHA both match `docs/yaml-schema.json`. It runs from the existing `lint` job next to `Check AGENTS.md freshness`, and is regex-only and stdlib-only for the same reason `check-agents-md.py` is: that job has no Python environment beyond the interpreter. The versioned schemas beside it (`assets/yaml-schemas/release-0.3.0.json`) pin released refs and are expected to differ, so only the unversioned `main` contract is checked. `docs/content/docs/development/yaml.md` documents the regeneration command, so it now also says to refresh the bundled copy. Without that, following the documented steps literally leaves CI red. ### Tests No unit test. The check is itself the test, so it was verified by mutation instead: each pin was desynced independently and the check confirmed red, then restored. | Mutation | Expected | Result | |---|---|---| | unmodified tree | green | green | | `docs/yaml-schema.json` edited, both copies left behind | red, 2 failures | red, both reported | | bundled copy edited alone | red, 1 failure | red | | `blob_sha` edited alone | red, 1 failure | red | | `main` contract loses its `blob_sha`, `0.3.0` keeps one | red, must not read the sibling SHA | red, `'main' contract has no blob_sha` | | bundled copy deleted | red | red, names the missing path | | `release-0.3.0.json` edited | green, out of scope | green | The fifth row is why the manifest is read with a bounded match rather than a document-wide search for `blob_sha`. An unbounded search falls through to the `0.3.0` contract's SHA and the guard passes on a manifest that has lost the value it is supposed to check. Also run locally: `tools/check-license.sh` (RAT passed), `python3 tools/check-agents-md.py`. ### API No public API change. New file is a repository tooling script. ### Documentation - [ ] `doc-needed` - [ ] `doc-not-needed` - [x] `doc-included` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
