feat/metadata-schema-validation #165

Merged
unkinben merged 4 commits from feat/metadata-schema-validation into master 2026-05-17 12:34:33 +10:00
Owner
No description provided.
unkinben added 4 commits 2026-05-17 11:58:55 +10:00
Adds schema/metadata.json (JSON Schema draft-07) as the authoritative
schema for all rpms/*/metadata.yaml files.  Key constraints:

- additionalProperties: false at both the top level and builds items,
  so unknown fields are rejected outright
- name allows dots (fixes neovim-glibc-2.17)
- github is optional (fixes claude-code, which has no GitHub repo)
- repository enum includes fedora/42, fedora/43, fedora/44
- dist_tag boolean field documented in schema

Pre-commit hook (check-jsonschema 0.37.2) runs against every file
matching ^rpms/[^/]+/metadata\.yaml$ on every commit.

Also fixes rpms/claude-code/metadata.yaml: removes the unknown
claude_ai field and normalises field order.
- pyproject.toml with pytest>=8 in [dependency-groups.dev] so
  uv run --group dev pytest resolves without a global install
- tests/__init__.py and tests/conftest.py skeleton referencing issue #162
- pre-commit local hook runs pytest tests/ on Python file changes;
  exit code 5 (no tests collected) is treated as success so commits
  are not blocked while the test suite is being built out
test: validate all metadata.yaml files against schema in pytest
ci/woodpecker/pr/build-fedora43 Pipeline was successful
ci/woodpecker/pr/build-fedora42 Pipeline was successful
ci/woodpecker/pr/build-fedora44 Pipeline was successful
ci/woodpecker/pr/build-almalinux9 Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline failed
ci/woodpecker/pr/build-almalinux8 Pipeline was successful
c683858261
unkinben force-pushed feat/metadata-schema-validation from c683858261 to db5a829429 2026-05-17 12:32:54 +10:00 Compare
unkinben merged commit 539a63e0a1 into master 2026-05-17 12:34:33 +10:00
unkinben deleted branch feat/metadata-schema-validation 2026-05-17 12:34:34 +10:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/rpmbuilder#165