Skip to content

Re-evaluate tag NFC normalization strategy (post-v1) #112

Open

Description

@utof

Context

The April 2026 library/stack audit consolidated path handling onto
camino + (Windows-only) dunce, dropping unicode-normalization
from path code. One usage survives: crates/core/src/tag.rs uses
unicode_normalization::UnicodeNormalization::nfc to canonicalize
user-typed tag names.

Keeping unicode-normalization in the workspace for a single call
site is a minor dep tax. Two questions to resolve post-v1:

  1. Is NFC normalization of tag names actually required for correctness
    in perima's use? Tags are user-typed strings that cross the UI
    boundary; an NFC-vs-NFD discrepancy would manifest as "same visible
    tag produces two DB rows." Does SQLite's collation or tokenizer
    already handle this for our queries, making the in-Rust NFC step
    redundant?

  2. If NFC is required, is unicode-normalization still the right
    implementation, or has ICU4X (icu_normalizer) matured enough to
    justify the heavier dep in exchange for more complete Unicode
    support?

Why this is deferred

Changing tag normalization risks existing stored tags that were NFC-
normalized under the current implementation. A migration path + a
data audit on real perima installations is required before swapping.

Acceptance criteria

  • Investigate SQLite collation behavior for tag names.
  • Decide whether in-Rust NFC is load-bearing or redundant.
  • If load-bearing, evaluate alternatives (icu_normalizer, inline
    small NFC table, accept the unicode-normalization dep long-term).
  • Produce a migration plan if the decision changes stored-tag bytes.

Labels

post-v1 — not urgent pre-v1.
needs-research — the right answer depends on ICU4X maturity + real
user data.
library-audit-followup — surfaced by the 2026-04-20 library audit
path-consolidation work.

Activity

  1. added
    status/needs-research
    on Apr 20, 2026
  2. added this to the post-v1 milestone on May 2, 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

    status/needs-research

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions