Skip to content

Entity case-collation policy: case variants of an entity name split the slot #14

Description

@Wuesteon

Known limit pinned in WP11 (v0.2.2): "I work at Acme." and "i work at acme." resolve to different entities — upsert_entity matches name=? under SQLite BINARY collation — so they land in different (subject, predicate) slots and bypass BOTH restatement dedupe and contradiction resolution. Two co-valid "current" facts for the same real-world subject can result.

This needs a decision, not just code: case-insensitive lookup has real distinct-by-case counterexamples ("Polish"/"polish", "US"/"us"), NOCASE is ASCII-only, and any collation change touches every entity lookup.

  • Pinning test: tests/test_restatement_dedupe.py::test_entity_case_variant_splits_the_slot_known_limit (delete it and fold the variant into the trivial-variants test when fixed).
  • Natural home: the WP4+ entity surface work, or its own small lane-A packet.

Context: docs/superpowers/workpackets.md § WP11 (known limit) and § Open follow-ups.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions