Skip to content

No gate keeps the network palette in sync with InteractionTypeEnum #271

Description

@realmarcin

Found reviewing #268.

PR #268 consolidates the nine interaction colors into a single interaction_legend list in src/communitymech/templates/community.html that drives both the legend and the script's interactionColors map. That removes the drift between those two copies, but nothing ties the list to the schema.

If a curator adds a tenth value to InteractionTypeEnum in src/communitymech/schema/communitymech.yaml, the template will not fail. The new type silently renders as a grey "Other" swatch in the legend and a grey rectangle in the diagram, on every affected page, with no error anywhere in just qc. Silent degradation to grey is exactly the failure mode that is hardest to notice in generated output, because the pages still build and still look plausible.

This is the same class of gap that PR #208/#209 closed for enum meaning: groundings, and the fix should follow that precedent: a no-network test in the validate-strict pytest step that parses the palette out of the template and asserts it covers InteractionTypeEnum exactly — no missing values and no stale ones.

Fixed in #268 by tests/test_network_palette.py, which also pins the minimum CVD separation from #269 so the palette cannot quietly regress.

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