Skip to content

rust: fail verification on unpaired SQL files and scan errors #967

Closed

Description

@athvin

Evidence

Statement discovery enumerates only .yaml files, so a standalone .sql file is invisible. It also drops directory-entry errors with filter_map(Result::ok); the entity catalog loader has the same fail-open scan pattern. Source.

Change

Check both halves of each declared SQL pair and propagate directory-entry failures in SQL and entity catalog discovery.

Done when

  • A standalone .sql or .yaml file fails verification with its path.
  • A directory-read error fails instead of silently reducing the catalog.
  • Valid paired statements still verify.

Additional fail-open scan

er-entity-cli/src/main.rs:227-230 uses filter_map(Result::ok) while reading Drizzle snapshot directory entries for ERD output. Propagate that error as part of this discovery cleanup, so an incomplete snapshot cannot silently shape the generated ERD.

Activity

  1. added
    code-cleanup
    on Nov 9, 2026
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

    code-cleanup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions