Skip to content

Accept build number zero and empty migration lists in repository checks #32

Closed

Description

@tdejager

During a correctness pass with Astra we found the following issue:


Author's preface above. Issue details below written by Astra (AI assistant) on 2026-10-09.

Two valid values are rejected by rs check because it tests truthiness rather than presence/type:

  • new-distro writes build_number: 0, but check() reports that the distro has no build number.
  • A distro can pin a conda-forge version with conda_forge_migrations: [], but the check requires the migration list to be nonempty.

I verified that Vinca preserves a zero build number unchanged. The rest follows directly from the validation conditions; I did not create a real new distro during the audit. The current four distros pass rs check.

Code: tools/maintenance.py, tools/maintenance.py and tools/maintenance.py.

Suggested change

Validate a nonnegative integer build number and the presence/types of the pinning fields. An empty list is a valid migration list when no migrations apply.

Acceptance criteria

  • A new distro with build number zero passes this validation.
  • An explicit pinning version with an empty migration list passes.
  • Missing build numbers, negative/invalid values and genuinely inconsistent pinning fields still fail with useful messages.
  • Regression tests cover these boundaries.
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