Repository navigation
feat(match): ignore-words dictionary reaching comparison (#799) - #853
Merged
Merged
Conversation
…in the explanation
3 tasks
The spec's second dictionary type (stop words), mirroring the synonym
lexicon's whole path:
- er-config: TransformRule::IgnoreWords { dictionary } rendering a
whitespace-token filter; seeded per run via the er_ignore_words() temp
macro (a flat dictionary‖chr(31)‖word literal list — DuckDB's binder
rejects subqueries in lambdas, ruling out the lexicon's correlated-
subquery shape)
- er-cli: seed_ignore_words (relation + macro), --ignore-words on
standardize/run-all, Dictionaries grouping for resolve_record probes
- er-versions: runs.ignore_words_hash joins the run fingerprint (6th
field); drift forces a promoted full rebuild, exactly like a lexicon
edit. Legacy NULL rows drift once, same as the lexicon's introduction
- er-server: GET/PUT /v1/orgs/{org}/datasets/{ds}/ignore-words (Viewer+
read of the packaged legal-suffix default, Steward+ write with
canonicalise+validate, run_all_full skip_ingest apply job)
- er-standardize: the Account stg arm now consumes transforms at all —
it silently ignored them, which this feature made observable
- Golden: 'Acme Pty' vs 'Acme' co-cluster exactly when legal_suffixes
carries pty (outside company_name_norm's hard-coded list)
Closes #799
athvin
marked this pull request as ready for review
November 8, 2026 13:51
This was referenced Nov 9, 2026
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #799
What
Adds the spec's second dictionary type: a per-org ignore-words dictionary
(
word, dictionaryrows), reaching comparison exactly the way the synonymlexicon does — per-org file (
ER_IGNORE_WORDS_PATH), GET/PUT API, seeded perrun, consumed by a new
ignore_wordstransform at standardize time, andfingerprinted into the run ledger (
runs.ignore_words_hash) so a dictionaryedit promotes the next incremental run to a full one.
Also fixes what the feature exposed: the Account standardize arm never
consumed
transformsat all — a tenant config declaring one on an accountcorpus was silently ignored.
Why
Acme IncvsAcme LLCshould agree under a tenant-editable dictionary. Zeromatches for
ignore_wordsorstopwordexisted in the tree — the only suffixhandling was a hard-coded list inside
company_name_normthat no tenant canedit.
Proof
make check,make frontendboth green. DuckLake e2e golden(
acct_e2e::ignore_words_dictionary_decides_an_account_pair): "Acme Pty" vs"Acme" —
ptydeliberately outsidecompany_name_norm's hard-coded list —co-cluster exactly when
legal_suffixescarries it, and the standardizedcompany_name_normdiffers without it (the account comparison set iscompany_name: [exact, null]alone, so the dictionary is decisive on bothsides).
pg_ignore_words.rscovers GET/PUT (canonicalise+dedupe, bothvalidation refusals, the enqueued
run_all_full). Box 3 (explanation namesthe preprocessing) is deferred to spec unit 1.22 per the ticket's own escape
hatch — reasoning recorded in an issue comment on #799.
Risk & rollback
Additive: a new transform op (configs that don't declare it render
byte-identically — asserted by every pre-existing std golden passing), a new
nullable
runscolumn reconciled at boot, a new endpoint. Legacyignore_words_hash = NULLrows drift once into one promoted full rebuild, thesame shape as the lexicon's introduction.
git revert <merge-sha>.Post-merge ledger
Closed by: agent · codex session
01a1b861-d8a0-7400-8aae-17fdde0059econbrians-MacBook-Pro· 2026-11-08T14:15:00Zmainis green with this change on it — merge SHA44f2e2e4; runs on that SHA allsuccess: rust 42487756749, frontend 42487756744, infra 42487756727, devcontainer 42487756741imagesbuilt — run 42487756768successon the merge SHAdeployconverged — run 42488145009; smoke lineser-api-preview /readyz -> 200,er-web-preview /api/healthz -> 200,the blue colour serves through its own Servicesdeploy,drift,kind's nightly leg) is green, or knowingly red for a reason that is not this change:deploygreen with the smoke lines above;driftandkind's nightly leg are schedule-triggered rather than push-triggered, and nothing push-only is redDonethrough the automation rather than by hand, and the issue closed: feat(match): ignore-words dictionary, and preprocessing visible in the explanation #799 is CLOSED and the card readsDone(read back from the board after the merge)map_extractwraps its values), the account stg arm silently droppedtransforms, and the lakerunsDDL lives iner-schema's S5 registrySpecific to this change
Context — plan, discoveries, measurements, files
Plan
er-config:TransformRule::IgnoreWords { dictionary }rendered byapply_sqlas a token-wise filter. Case-insensitive match, survivorsverbatim, NULL-propagating. Configs without the op are byte-identical.
er-std:ignore_wordspure module — directedcanonical_row(noorientation swap, unlike the lexicon) +
ignore_words_hashreusing thelexicon's separators.
er-cli:seed_ignore_words(relation + macro, empty-safe both ways),PipelineInputs.ignore_words,Dictionariesgrouping forresolve_record,--ignore-wordsoner standardize/run-all.entities/run: nullableignore_words_hashcolumn +create/startandread/latest_fingerprintstatements; regenerated (incl. theer-schemaS5 registry + its golden, which is where the lake
runsDDL actuallycomes from).
er-versions: sixthRunFingerprintfield +ignore_words_changerebuild reason.er-server:runctxloadsER_IGNORE_WORDS_PATH; the dispatcher seedsit; the resolve probe re-seeds it (same dictionaries as the corpus);
GET/PUT
/v1/orgs/{org}/datasets/{ds}/ignore-wordsmirroring thelexicon API (Viewer+ read of the packaged legal-suffix default, Steward+
canonicalise + validate + write +
run_all_fullskip-ingest apply job)./api/orgs/[org]/datasets/[ds]/ignore-wordsroute mirroring thelexicon's (viewer GET, steward PUT, zod shape check).
ptyoutside the hard-coded suffix list —see Proof. Box 3: deferred to 1.22, recorded on feat(match): ignore-words dictionary, and preprocessing visible in the explanation #799.
the CSV header row — pre-existing lexicon bug this feature inherits).
Discoveries
company_name_normALREADY strips one trailing legal suffix from ahard-coded list — the ticket's literal
Acme Inc/Acme LLCexample agreestoday. The gap is the tenant-editable dictionary, so the golden uses a word
outside the hard-coded list (a golden that passes without the dictionary
proves nothing).
rules out the lexicon's correlated-subquery shape for a token filter, and
map_extract/element_aton amap(varchar, varchar[])returnvarchar[][]besides. The transform therefore readser_ignore_words(), a temp macro the seeder creates from the same rows: aflat
varchar[]ofdictionary ‖ chr(31) ‖ wordentries (the hash's unitseparator; the write path refuses control chars, so the encoding cannot
collide). The seeded relation stays as the inspectable record, matching the
lexicon's shape.
stgarm never calledtransformed()— account configs'transformswere silently dropped. Fixed here (empty-transform SQL isbyte-identical; every pre-existing acct std golden passes unchanged).
runctx's shared CSV loader does not skip the header row the PUT endpointswrite, so a bogus header pair is seeded and hashed — pre-existing for the
lexicon, inherited by ignore-words. Fixing it changes
lexicon_hashforevery tenant (a promoted rebuild each), so it is its own ticket: runctx lexicon/ignore-words loader seeds the CSV header row #856.
runstable is created fromer_schema::model's S5 registry, notthe
er-entitiesDDL file — theregistry_matches_entitiesgatebyte-compares the two, and
model_registry_golden.jsonpins the renderedDDL.
Files
rust/crates/er-config/src/lib.rs— the op, the renderer, both constsrust/crates/er-std/src/ignore_words.rs— pure core + hashrust/crates/er-cli/src/lib.rs,cli.rs— seeder,Dictionaries, flagsrust/crates/er-standardize/src/lib.rs— account arm consumes transformsentities/run/*,rust/crates/er-entities/*,rust/crates/er-schema/*—the
ignore_words_hashcolumn, three waysrust/crates/er-versions/src/lib.rs— sixth fingerprint fieldrust/crates/er-server/{lib,runctx,dags/tasks}.rs— API, loader, seedingfrontend/src/app/api/orgs/[org]/datasets/[ds]/ignore-words/route.ts— BFFacct_e2e.rsgolden,pg_ignore_words.rs, render-shape unit tests