Skip to content

rust: canonicalize CLI dictionary CSV before seeding and fingerprinting #983

Closed

Description

@athvin

Evidence

The CLI loads lexicon and ignore-word CSV rows with raw split_once(',') and passes those pairs to seeding and run fingerprinting. The server writer canonicalizes and rejects control characters first. Thus equivalent case/whitespace inputs can produce different CLI fingerprints; embedded U+001E/U+001F can make distinct rows share the delimiter-based hash preimage. Malformed rows can also be silently skipped. Source.

Change

Parse, validate, and canonicalize CLI dictionary rows through the er-std helpers before seeding or fingerprinting. Preserve the established canonical hash for valid rows. This is separate from the header-row loader issue in #856.

Done when

  • CLI and server paths produce the same canonical rows and fingerprint for equivalent case/whitespace inputs.
  • Malformed rows and U+001E/U+001F separator characters fail with a file/row error.
  • Distinct accepted rows cannot collide through the delimiter preimage.
  • Existing valid dictionary fixtures retain their expected results.

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