Skip to content

feat(match): cross-field comparison groups (#796) - #824

Merged
athvin merged 2 commits into
mainfrom
issue/796-cross-field-groups
Nov 8, 2026
Merged

athvin merged 2 commits into
mainfrom
issue/796-cross-field-groups

Conversation

@athvin

@athvin athvin commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

Closes #796

🚧 Claimed by an agent session — 2026-11-07T23:50:58Z, codex session 01a1b861-d8a0-7400-8aae-17fdde0059ec on brians-MacBook-Pro.
The claim is this open draft PR: closing it releases the ticket.

Post-merge is part of this pull request. The ledger below records whether
the follow-up work actually happened. /land-pr closes it.

What

Adds comparison_groups: to the tenant config (S6): a named set of attributes compared as a pool, so mobile on record A compares against home_phone on record B. Each group compiles to one pooled comparison (levels OR'd over the attribute cross-product) plus one blocking rule, so cross-field agreement both generates the candidate and scores it.

Why

Spec unit 1.9 (parent epic #513). Today every comparison is column-to-same-column, so the CRM-common case of one phone in mobile and the same phone in home_phone scores as disagreement on two fields — actively pushing a true duplicate below threshold.

Proof

make check; gated DuckDB behaviour tests in er-compile/tests/cross_field_groups.rs (pair with phone only in mobile vs only in home_phone scores above threshold); reproduces_committed_model and the std-hashes goldens unchanged (no-group configs compile byte-identically).

Risk & rollback

Matcher-semantics change, opt-in only: a config with no comparison_groups block compiles byte-identically and hashes identically. Rollback: git revert <merge-sha>; a tenant who declared a group re-publishes without it.

Post-merge ledger

Closed by: agent · codex session 01a1b861-d8a0-7400-8aae-17fdde0059ec on brians-MacBook-Pro · 2026-11-08T00:55:00Z

  • main is green with this change on it — merge SHA c46623c3 (verified tip of
    origin/main); on that SHA: rust success (run 42430864100), frontend 42430864051,
    infra 42430864086, devcontainer 42430864088 — all success.
  • images built — run 42430864048 success (rust/ changed, so an image build
    was due, and it ran).
  • deploy converged — run 42431285574: smoke against the new colour before
    cutover got er-api-preview /readyz -> 200 and er-web-preview /api/healthz -> 200
    ("the blue colour serves through its own Services"), then deployment "web-api-blue" successfully rolled out and traffic is on blue. (A kubectl/CloudWatch read for a
    pod-log line was unavailable from this session — read-only profile lacks exec auth and
    the log group is not Standard class — so the evidence is the smoke the new pods served.)
  • the push-only surface no pull request can pre-test (deploy, drift,
    kind's nightly leg) is green, or knowingly red for a reason that is not
    this change: deploy green (above); drift last green 2026-11-07T06:01Z and this change touches nothing under infra/; kind nightly last green 2026-11-07T06:44Z. Knowingly red for a reason that is not this change: the scheduled Agentic Maintenance gh-aw run fired on this SHA and its maintenance jobs failed with zero steps run — the documented fail-closed gh-aw condition, not product code.
  • the board card reached Done through the automation — issue feat(match): cross-field comparison groups — compare mobile on A against home_phone on B #796 CLOSED
    (COMPLETED) on merge, card reads Done.
  • follow-ups — config studio: teach the AI explainer the comparison_groups block #828: teach the config-studio AI explainer the
    comparison_groups block (EXPLAINABLE_BLOCKS + prompt wording).
  • what was learned is written down — comparison_groups section added to
    .claude/skills/er-matching/references/config-to-model.md in this PR, including the
    discovery that the engine needed nothing new (input columns are parsed from level SQL).

Specific to this change

Context — plan, discoveries, measurements, files

Plan

Discoveries

Measurements

Files

…g, compile to pooled comparison + blocking rule (#796)
@athvin
athvin marked this pull request as ready for review November 8, 2026 00:39
@athvin
athvin merged commit c46623c into main Nov 8, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(match): cross-field comparison groups — compare mobile on A against home_phone on B

2 participants