Skip to content

A YAML parse failure now gates under a message telling the curator to look for a missing taxon #320

Description

@realmarcin

Found reviewing PR #316.

UNREADABLE is error-severity, so an unparseable record now exits 3 and fails the build. Two problems with how that is presented, plus one latent trigger:

1. The wording points at the wrong thing. The workflow reports it under the heading "Network integrity: broken references", and the gate step prints "Something in a record names a taxon or interaction that does not exist." For a YAML parse failure that is misleading.

2. The step comment is now factually wrong. .github/workflows/network-quality.yml still says "A malformed community YAML produces the last [crash]". Verified: one malformed file among good ones exits 3 (errors), not 2. Only every file failing raises the RuntimeError that yields exit 2.

3. Latent trigger. data.get("taxonomy", []) and data.get("ecological_interactions", []) are not None-safe, unlike the ported dangling detectors which correctly use ... or []. A record with a bare ecological_interactions: key — valid YAML and a plausible stub — raises 'NoneType' object is not iterable, becomes UNREADABLE, and gates. No current record does this.

Fix: or [] on both lookups; give UNREADABLE its own wording in the summary and gate step; correct the comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions