Skip to content

check_cards: an audit of {}, null or one without repositories gets no AUDIT row, and the cards are blamed #257

Description

@realmarcin

From the round-5 review of #212 (follows #250).

Where: scripts/fleet/check_cards.py: main(), check() and audit_entries().

Three malformed audits produce no AUDIT row:

  • JSON null: reaches check() as audit=None, which means "no audit supplied".
  • {}: is falsy, so if audit: skips the pin time and never reports it missing.
  • An object without repositories: defaults to [], which switches WRONG off for every Mech.

Failure scenario: grown sites then read STALE, and the closing line sends the reader to a full refresh. #250 and the docs promise AUDIT for a missing or malformed audit. Without repositories, a mistyped card passes as "grew".

Fix:

  • main() reports a non-object audit as audit_error;
  • check() tests audit is not None;
  • audit_entries() requires repositories.

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