Skip to content

The cache normaliser's exit code is discarded, so a conflict cannot fail anything #706

Description

@realmarcin

All three justfile recipes that run scripts/normalize_cache_names.py throw its exit code away:

uv run linkml-reference-validator validate data {{FILE}} ...
code=$?
PYTHONPATH=src uv run python scripts/normalize_cache_names.py
exit $code

Preserving the validator's code is deliberate and right — normalising must not turn a failing validation green. But the normaliser exits 1 for a real condition: [conflict], meaning both DOI_x.md and doi_x.md exist as distinct files with different content. That can only happen on a case-sensitive filesystem, i.e. Linux and CI, not on the macOS machine where this was written and tested.

Today a conflict prints one line into a long log and changes nothing. Two fetches of the same reference disagree, one of them is unreachable, and no exit code anywhere reflects it.

This is a policy call rather than an obvious bug, which is why it is filed rather than fixed: validate-references is explicitly not a CI gate (see CLAUDE.md), so making it fail on a conflict may just be noise in a recipe people run locally. The alternatives are to surface conflicts through just qc instead, or to have the recipe print a loud trailing summary rather than change its exit code.

Found reviewing PR #702.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions