Skip to content

variant_match is person-only in er-compile — an account config that declares it publishes, then fails every run #662

Closed

Description

@athvin

er-compile emits the person variants column for every entity type, so an account config that declares variant_match compiles, passes config_check, publishes, and then fails every run.

The mechanism

rust/crates/er-compile/src/lib.rs:400 (and again at :1146) hardcodes:

array_length(list_intersect("name_variants_l", "name_variants_r")) >= 1

company_variants appears nowhere in the crate. But entities/acct_int_std_record/entity.yaml declares company_variants, not name_variants — the person column does not exist on an account standardized record.

The failure

Adding variant_match to an account config's company_name_norm levels and resolving produces, at the match stage:

materializing __dedupe__predict: Binder Error: Values list "l" does not have a column named "name_variants"
LINE 15:     "l"."name_variants" AS "name_variants_l",

Note the committed acct_model_v1.json does carry a "company_variants intersection >= 1" level — but that JSON is hand-authored, so the hand-written model and the compiler disagree about which column backs the same level.

Why it matters

This is the third instance of one shape: accepted at config time, fatal at run time. tf: true with no sibling exact level was the same thing (#616), and it was fixed by refusing it in config_check. A tenant can publish this config successfully and every subsequent run dies.

Fix

Two parts, and the first is worth doing immediately:

  1. Refuse it in rust/crates/er-server/src/config_check.rs — variant_match on a non-person config is unsatisfiable today, so publish should say so in a sentence, the way the tf: true refusal does.
  2. Then teach the compiler the column — resolve the variants column from config.entity_type (name_variants for person, company_variants for account) so the level becomes usable rather than merely refused.

Reproducing

fixtures/static/acct_10/config.yaml carries a comment at the comparisons block recording exactly this. Put variant_match back into its company_name_norm levels and run cargo test -p er-cli --test main acct_ with DEDUPE_E2E_DUCKLAKE=1.

Activity

  1. self-assigned this
    on Nov 8, 2026
  2. athvin commented on Nov 8, 2026

    @athvin
    OwnerAuthor

    Claimed by codex session 01a1b861-d8a0-7400-8aae-17fdde0059ec on Mac at 2026-11-08T06:30:49Z — draft PR #843 is the claim; closing it releases the ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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