Skip to content

Validate CI environment JSON objects before accessing their fields #856

Closed

Description

@LunaStev

Problem

tools.ci.common.main parses WAVE_RELEASE_INPUTS and immediately calls .items() without checking its JSON type. A valid JSON array, string or null produces a Python traceback instead of a configuration error. WAVE_CI_MATRIX also coerces falsy non-objects to an empty object before its type check.

Starting point: environment decoding.

Reproduction

Executed at 7a8361d5c10ec3e66fc9fe4a5801622afb6bf631 on Linux amd64 with Python 3.14:

WAVE_RELEASE_INPUTS='[]' python3 -m tools.ci.test --target linux-amd64 --report-json /tmp/wave-invalid-config.json

Observed: exit 1 and AttributeError: 'list' object has no attribute 'items' at the inputs.items() expression. No build or provisioning stage ran.

Scope

Validate both environment values as JSON objects before runner/stage work. Reuse the existing CI configuration error/exit-2 convention. Keep omitted values and explicit empty objects supported. Difficulty: easy.

Completion criteria

  • Arrays, strings, numbers, booleans and null fail with an actionable configuration error, without a traceback.
  • Missing variables and {} remain valid; malformed JSON is still rejected.
  • Focused tests assert no commands/provisioning occur for invalid inputs, including falsy non-objects.

Activity

  1. added
    bug
    good first issue
    on Oct 5, 2026
  2. added 2 commits that reference this issue on Oct 21, 2026
    f7e48cc
    d2f5896
  3. added a commit that references this issue on Oct 21, 2026
    42b65e4
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

    buggood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions