Skip to content

fix(golden): the 50k golden survives DuckDB 2.0's Unicode jaro_winkler, with an independent Splink twin (#1206) - #1421

Merged
athvin merged 1 commit into
mainfrom
fix/1206-historical-50k-golden
Nov 29, 2026
Merged

athvin merged 1 commit into
mainfrom
fix/1206-historical-50k-golden

Conversation

@athvin

@athvin athvin commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

Closes #1206

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

What

Makes the nightly scale golden (50k) green again, and keeps an independent Splink oracle beside it.

  • Bisected: passes at 964f14ba, fails at dba8b69f (build(duckdb): move the engine to DuckDB 2.0.1 (#1168) #1171, DuckDB 2.0.1) with CI's exact numbers.
  • Cause: DuckDB 2.0 made jaro_winkler_similarity count Unicode characters where 1.x counted bytes. All 32 drifted predictions pair xolomiès with colomiès: 0.926 → 0.917, across the surname's 0.92 level, which is a 1.3022-bit drop and exactly the drift. The new value is correct.
  • Golden: historical_50k is re-baselined from this engine by a new #[ignore] regenerate test. Its MANIFEST records the provenance.
  • Independent oracle: historical_50k_ascii folds every text column to ASCII and is generated by Splink. The engine must match it exactly.
  • Generator: fixtures/golden/gen_historical_50k_golden.py is the Splink generator, reconstructed and verified.

Why

#1206's done-when: bisect, then regenerate with provenance or fix the drift, and say why the change is acceptable. Python has no DuckDB 2.x, so Splink can't regenerate the oracle on the new engine. Re-baselining from our own engine alone would have quietly dropped the parity check, so the ASCII twin keeps it: on data where bytes and characters coincide, the engine still has to equal Splink exactly.

Proof

  • Reconstructed generator, Splink 5.0.0 on DuckDB 1.5.5: reproduces the committed golden exactly (prior, every m/u to 1e-9, predictions to 1e-8, every cluster). That needs EM with estimate_without_term_frequencies=True.
  • Its --ascii output vs dedupe-core on DuckDB 2.0.1: exact match. The unfolded control on the same build fails.
  • The final clustering is unchanged: 0 of 50,578 cluster assignments differ between the new engine golden and the Splink one.
  • All four scale tests pass locally with DEDUPE_SCALE_TESTS=1. cargo fmt --check, clippy -p dedupe-core --all-targets -D warnings and make skills-check are clean.
  • Deviation, stated: I didn't run a full local make check, because disk was at 98% from other sessions' builds and a cold rebuild risked it. CI runs the full gate on this PR, and the scale job only on schedule or dispatch, so I'll dispatch it after merge.

Risk & rollback

Test and fixture change only; no engine code. Rollback: git revert <merge-sha> (the nightly goes red again).

Post-merge ledger

Closed by: agent · session Claude Code:24d16c2e-fec6-49d8-9797-060338df4848 on brians-MacBook-Pro · 2026-11-29T08:43:01Z

  • main is green with this change on it — the merge SHA, and the run
    that proves it. A later head SHA with this commit as an ancestor counts;
    a cancelled run with zero jobs does not: — 7a8145b, rust 46242304135 + frontend 46242304082 success; the scale job dispatched on the branch (46238723844) passed in CI
  • images built, or correctly never ran because nothing that goes into
    an image changed: — success, run 46242304011
  • deploy converged — proved by a line the running process emitted, not
    by the image digest and not by the workflow conclusion: — run 46242537559 success; test and fixture change only
  • 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: — infra, devcontainer success on 7a8145b
  • the board card reached Done through the automation rather than by
    hand, and the issue closed: — scale golden (50k) fails deterministically on main since 03792063..ad38be23 (likely the DuckDB 2.0.1 bump) #1206 CLOSED by fix(golden): the 50k golden survives DuckDB 2.0's Unicode jaro_winkler, with an independent Splink twin (#1206) #1421 via automation
  • follow-ups are open for everything deferred here — numbers: — none; the generator is committed for the day Python ships DuckDB 2.x
  • what was learned is written down where the next session will find it
    (a skill, a reference, memory) — or nothing new was learned: — er-matching goldens-and-oracles.md records the episode and the ASCII-twin pattern

Specific to this change

Context — plan, discoveries, measurements, files

Plan

Discoveries

Measurements

Files

Fixtures added: about 3.3 MB for the ASCII twin. When Python ships DuckDB 2.x, run the generator without --ascii against it and historical_50k can be a Splink oracle again.

🤖 Generated with Claude Code

…r, with an independent Splink twin (#1206)

GOLDENS MOVED, and why. The 50k scale golden had failed every night
since DuckDB 2.0.1 (#1171). Bisected: it passes at 964f14b and fails at
dba8b69 with CI's exact numbers. All 32 drifted predictions pair
'xolomiès' with 'colomiès' and move by 1.3022 bits, which is the
surname's jaro_winkler >=0.92 vs >=0.88 gap. DuckDB 2.0 counts Unicode
characters where 1.x counted bytes (0.926 -> 0.917). The new value is
correct, and the EM m drift follows from the same pairs.

The old oracle was Splink 5.0.0 on DuckDB 1.5.5. Python has no DuckDB 2.x,
so it cannot be regenerated on the new engine. Instead:

- fixtures/golden/gen_historical_50k_golden.py is the generator,
  reconstructed and verified: it reproduces the committed Splink golden
  exactly (prior, every m/u, every prediction to 1e-8, every cluster).
  That needs EM with term frequencies off.
- historical_50k_ascii is its --ascii output: every text column folded
  to ASCII, where bytes and characters coincide. dedupe-core on DuckDB
  2.0.1 matches it exactly. That proves Unicode handling is the ONLY
  divergence from Splink.
- historical_50k is re-baselined from this engine by an #[ignore]
  regenerate test, so it keeps guarding the 237 non-ASCII rows. Its
  MANIFEST records the provenance. The final clustering is unchanged:
  0 of 50,578 cluster assignments differ from the Splink oracle.

The test is parameterised over the two cases; all four pass.
er-matching's goldens reference records the episode.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@athvin
athvin merged commit 7a8145b into main Nov 29, 2026
67 checks passed
@athvin
athvin temporarily deployed to marketing-preview November 29, 2026 08:22 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
marketing-preview — ea3bfd2f Deployed Nov 29, 2026 by athvin via remove closed PR previews #153
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.

scale golden (50k) fails deterministically on main since 03792063..ad38be23 (likely the DuckDB 2.0.1 bump)

2 participants