Skip to content

fix(ci): reject malformed release metadata identities - #1047

Merged
LunaStev merged 1 commit into
wavefnd:masterfrom
erenbati:fix/release-metadata-types-1000
Oct 25, 2026
Merged

LunaStev merged 1 commit into
wavefnd:masterfrom
erenbati:fix/release-metadata-types-1000

Conversation

@erenbati

Copy link
Copy Markdown
Contributor

Closes #1000

Summary

  • Reject non-object and malformed JSON metadata with the offending metadata filename.
  • Check the exact types of release identity fields before comparisons or target normalization, including refusing boolean and floating-point schema_version values.
  • Validate nested paths and external_prerequisites values and produce filename/field-specific ValueError diagnostics.
  • Retain all existing release identity, checksum, target, artifact-contract and std-revision checks.

Motivation

Malformed release metadata previously raised unhelpful AttributeError exceptions for JSON lists or wrongly typed target fields. Some numerically comparable values such as true could also pass the schema-version equality check. The publication gate must reject these inputs deterministically, without permitting publication.

Target and compatibility impact

Python release/CI tooling only. No changes to Wave language syntax, targets, ABIs, package schema, or accepted valid metadata.

Validation

  • TDD: new malformed-root/field regression cases failed before the fix (12 failures and 6 errors) and pass after.
  • python -m unittest tools.test_ci.MetadataTests tools.test_release_publish tools.test_release_final -q: 27 tests, OK (2 POSIX-only tests skipped on Windows).
  • python -m py_compile tools/ci/release.py tools/test_ci.py: passed (native Windows Python 3.12).
  • git diff --check: passed.
  • New publish-gate test asserts invalid metadata stops before any external release command is called.
  • Additional full tools.test_ci run on this sparse Windows checkout: 32/37 passed, 3 errors and 2 failures. Three errors were missing std/ and tests/cases/cases.toml files due to the intentionally sparse clone; the two failures concern Windows-specific Unicode and file-alias behavior in unrelated Runner tests. These are not claimed as passing; upstream CI is needed for the complete suite.

Checklist

  • Commits include a DCO Signed-off-by line.
  • Tests cover new behavior and the publication gate.
  • Invalid metadata errors include actionable filename/field information.
  • No changes to compiler / standard-library license boundaries.

AI assistance

AI assistance was used to inspect the existing validation code and help prepare regression tests and the patch. The contributor is responsible for reviewing and validating this contribution.

@LunaStev
LunaStev merged commit 75f28c3 into wavefnd:master Oct 25, 2026
98 of 100 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validate release metadata object and field types before reading identity fields

2 participants