Skip to content

Validate release metadata object and field types before reading identity fields #1000

Closed

Description

@LunaStev

Problem

With all expected archive/checksum filenames present, a metadata JSON value of [] raises AttributeError: list object has no attribute get instead of a package validation error. Other malformed field types need equally direct diagnostics.

Starting point: tools/ci/release.py:47.

Validation

Audited canonical Wave 540728c2eb6cc12f5c69c3fb3fdb96e07ba059a4 (0.0.1-alpha-dev), whose tree matches the local checkout. Validation: Executed verify_metadata() fixture with all nine archive/checksum identities and non-object metadata. Executed compiler probes use the matching checkout-built compiler and std on Linux amd64 (Rust 1.89.0 / LLVM 21.1.8). Source/header or mocked checks are not native execution on another OS.

Scope

Validate the metadata object and field types before identity operations. Keep exact source/version/digest/target/revision requirements intact.

Related: #828. These links do not claim those broader or completed scopes are unfinished.

Completion criteria

  • Reject array/null/scalar roots and wrongly typed identity fields with an actionable filename/field error.
  • Valid metadata still satisfies every existing publication identity check.
  • No malformed input can advance publication or weaken the gate.

This is a bounded, unassigned task with the starting point and focused checks above. Keep unrelated refactoring out of the change.

Activity

  1. added
    bug
    good first issue
    ci
    on Oct 24, 2026
  2. erenbati commented on Oct 25, 2026

    @erenbati
    Contributor

    I would like to work on this. I plan to add regression tests for non-object JSON metadata and wrongly typed identity fields, reject them with filename/field-specific ValueErrors, and keep the existing release identity and publication checks unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcigood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions