Repository navigation
fix(runctx): one dictionary reader for the CLI, the run and the resolve probe (#856) - #1363
Merged
Merged
Conversation
…ve probe (#856) The dispatcher's runctx loader seeded the CSV header row as a pair (variant_a,variant_b / word,dictionary) into the temp relation and the run fingerprint. The resolve probe skipped the header but did not trim. The CLI had a third, strict reader. One uploaded file was therefore hashed three ways. er_cli::parse_dictionary_csv is now the one reader: header skipped, fields trimmed and canonicalized, rows sorted and de-duplicated. read_dictionary_file wraps it with absence as an empty dictionary. runctx refuses a malformed file instead of seeding a partial one, and the probe returns the error. Consequence: lexicon_hash and ignore_words_hash change once for every tenant that has the file, so each pays one promoted full rebuild on its next run. Both hashes change in this one release. Co-Authored-By: Claude Opus 5.5 <[email protected]>
athvin
temporarily deployed
to
marketing-preview
November 28, 2026 23:22 — with
GitHub Actions
Inactive
7 tasks done
This branch was previously deployed
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 #856
What
One reader for lexicon and ignore-words CSVs,
er_cli::parse_dictionary_csv, shared by the CLI, the dispatcher's work order (runctx) and the resolve probe. It skips the header row, trims and canonicalizes fields, and sorts and de-duplicates rows. An absent file is an empty dictionary; a malformed file now refuses the run instead of seeding a partial one.Why
The runctx loader seeded the header row (
variant_a,variant_b/word,dictionary) as a pair into the temp relation and the run fingerprint. The probe skipped the header but didn't trim. The CLI had a third, strict reader. So one uploaded file hashed three ways.Proof
make checkexit 0. Newer-cli/tests/dictionary_csv.rs(4 tests: header, padding/order/duplicates, malformed row, absent file). Real-Postgres run ofpg_lexicon pg_ignore_words pg_launch_proof pg_drain_dispatcher pg_dispatch: 5 passed. er-server lib: 298 passed.Risk & rollback
One-time promoted full rebuild per tenant that has a lexicon or ignore-words file:
lexicon_hashandignore_words_hashboth change in this release, so the drift guard sees a dictionary change once. Shipping both together means one rebuild per tenant, not two. A tenant whose stored file is malformed (writers validate, so none expected) now gets a refused run naming the row. Rollback:git revert <merge-sha>(which re-triggers the same one-time rebuild).Post-merge ledger
Closed by: agent · session
Claude Code:24d16c2e-fec6-49d8-9797-060338df4848onbrians-MacBook-Pro· 2026-11-28T23:55:58Zmainis green with this change on it — the merge SHA, and the runthat proves it. A later head SHA with this commit as an ancestor counts;
a cancelled run with zero jobs does not: — 4e2bed4; its own rust 46201302719 and frontend 46201302739 were cancelled by the next merge's concurrency group; rust 46201368511 + frontend 46201368505 on 1567d0b (which contains 4e2bed4) success
imagesbuilt, or correctly never ran because nothing that goes intoan image changed: — success, run 46201302704 (er-cli and er-server changed)
deployconverged — proved by a line the running process emitted, notby the image digest and not by the workflow conclusion: — run 46201606129 success; the shared reader runs at the next run's work-order resolve, and no customer tenant is live, so the one-time promoted rebuild costs nothing today
deploy,drift,kind's nightly leg) is green, or knowingly red for a reason that is notthis change: — infra, devcontainer success on 4e2bed4
Donethrough the automation rather than byhand, and the issue closed: — runctx lexicon/ignore-words loader seeds the CSV header row #856 CLOSED by fix(runctx): one dictionary reader for the CLI, the run and the resolve probe (#856) #1363 via automation
(a skill, a reference, memory) — or nothing new was learned: — the reader is er_cli::parse_dictionary_csv / read_dictionary_file; every new consumer of a lexicon or ignore-words file should call it
Specific to this change
Context — plan, discoveries, measurements, files
Plan
Discoveries
Measurements
Files
The GET lexicon/ignore-words handlers keep their lenient display readers; they hash nothing.
🤖 Generated with Claude Code