Skip to content

feat(config): add reusable named replacement dictionaries (#522) - #1052

Merged
athvin merged 5 commits into
mainfrom
issue/522-named-replacements
Nov 9, 2026
Merged

athvin merged 5 commits into
mainfrom
issue/522-named-replacements

Conversation

@athvin

@athvin athvin commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Closes #522

🚧 Claimed by an agent session — 2026-11-09T13:57:06.205291+00:00, session Codex:01a1be1b-0c92-7703-a4c2-25cb2c999baa on Mac-28.lan.
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

Add reusable named directed replacement dictionaries to the versioned configuration, reference them from preprocessing rules, and manage both in Config studio.

Why

#1047 completed ignore-word management, but #522 still lacks a reusable replacement registry. Inline exact-value maps do not cover that requirement.

Proof

make check, make check-e2e, make frontend, make frontend-audit and the real PostgreSQL frontend driver tier pass. Named mappings are exercised in real DuckDB, DuckLake and Postgres; 662 browser cases pass (133 existing skips), and Linux comparison/Config studio axe pass (67, 2 existing mobile skips). One unchanged Safari checkbox test failed in the first full run and passed in both subsequent full runs without assertion changes.

Rebased onto 06bc5f0d after the gates finished and peer infrastructure PRs landed. Rust/frontend/entity trees are byte-identical to the tested tree; make skills-check passes on the refreshed base. Five independent house reviews (backend/frontend instrumentation and reuse, plus execution placement) found no candidates. The reviewed production diff remains byte-identical across the rebase; all 15 live required contexts and all four detect jobs passed on 462048f4; the refreshed branch merged after checking that main still matched its base.

Risk & rollback

Dictionary contents affect the configuration hash and require a full rebuild. Existing configuration publication permissions and workflow remain authoritative. Revert the published configuration to undo an edit; revert the code merge to remove the feature after removing its new config fields.

Post-merge ledger

Closed by: Codex · session 01a1be1b-0c92-7703-a4c2-25cb2c999baa on Mac-28.lan · 2026-11-09T15:42:54.892297+00:00 — ledger reconciled with the dev runtime-read item explicitly blocked.

  • main is green with this change on it — merged f7fb8b4c2bf3fb72180e5c9a9b3dc40a5bb43001 at 15:12:15Z; ancestry and the landed named-registry code verified. Rust 42642270239, frontend 42642270203, infra 42642270207 and devcontainer 42642270236 succeeded. The 30-minute watch completed at 15:42:17Z with no new main-workflow failure. Public availability exceptions are recorded below.
  • images — 42642270269 built both web and API images for f7fb8b4c.
  • deploy converged — runtime gap resolved at 2026-11-09T22:22:21Z using the independently recorded evidence in PR #1062’s post-merge ledger. Its deploy 42706442649 names 0a208d9c8c6cd8e9275ec4e6da7bc1fd4e0145ae, verified locally to descend from this PR’s merge f7fb8b4c2bf3fb72180e5c9a9b3dc40a5bb43001. The peer verified the production API’s er-server listening line at 21:52:51.130164Z and dev startup at 21:55:09.394202Z, with both live pods at zero restarts; its ledger records live selectors/replicas and explains dev’s replacement as node eviction of the same ReplicaSet. This is attributed peer runtime evidence, not an inference from workflow success or a fresh AWS read by this session.
  • the push-only surface no pull request can pre-test — images and deploy succeeded on this merge. Latest drift 42637742835, kind 42575735163 and frontend experiments 42577832750 succeeded; no new nightly run failed during the watch. The pre-existing dev runner-isolation failure is tracked by Restore dev Kubernetes schema validation for runner-isolation acceptance #1058. The recurring public readiness symptom is tracked separately in Investigate transient public 503 during production blue/green cutover #1043.
  • the board card — E6 — Dictionaries and preprocessing #522 is CLOSED and Product Roadmap reports Done. Its closing event names PullRequest feat(config): add reusable named replacement dictionaries (#522) #1052; no manual status edit. The parent acceptance checklist now links both delivered dictionary slices.
  • follow-ups — deferred — Investigate transient public 503 during production blue/green cutover #1043 owns the recurring public 503/readiness investigation. It predates this PR and now contains the exact two observations during this deployment; runtime read limitations remain explicitly blocked above.
  • what was learned is written down — the configuration reference documents directed, case-sensitive, simultaneous replacements, literal-space word mode, validation limits and full-rebuild semantics; SQL-analysis references document the narrow planning rewrite and upstream stub. E6 — Dictionaries and preprocessing #522 now records executable delivered acceptance; Investigate transient public 503 during production blue/green cutover #1043 retains the observed public availability exceptions.

Specific to this change

  • Public availability observations — the independent watch recorded HTTP 503 at 15:18:50Z and 15:20:56Z, with surrounding healthy samples and correlated probe timeouts; Investigate transient public 503 during production blue/green cutover #1043 records details and the earlier 09:30Z occurrence. The diff changes no readiness endpoint or deployment/routing configuration. This is a recurrence of the known symptom, not proof of its root cause or uninterrupted availability. Four fresh checks at 15:32:19–15:32:35Z returned HTTP 200 and ready=true; the subsequent status-only watch collected 57 additional HTTP 200/ready=true samples from 2026-11-09T15:32:49.280775+00:00 through 2026-11-09T15:42:15.235794+00:00, with no failed sample. Sampling does not prove uninterrupted availability between requests.
Context — plan, discoveries, measurements, files

Plan

  1. Extend er-config::Config with an optional, canonically ordered named replacement registry, omitted when empty so existing config hashes remain unchanged. Add an additive named_dictionary transform referencing a name with explicit whole-value or whole-word matching. Matching is case-sensitive, directed and non-recursive within one dictionary; unmatched and NULL values pass through.
  2. Validate names, mapping values, bounded sizes and references before publication/run. Reject missing dictionaries and invalid word-mode keys. Reuse the existing escaped CASE renderer for replacements; resolve references from the same configuration in person and account standardization. No mutable external file or new table is needed: the registry travels with the versioned config and participates in its fingerprint.
  3. Add plan-vector coverage for both entity types/modes and engine regressions proving a named street-type list changes standardized values and that the absent registry preserves existing behavior. Pin quoted literals, empty dictionaries, reuse on multiple fields, missing-reference refusal and hash/rebuild behavior.
  4. Extend Config studio's structured document adapter and add a bounded dictionary/rule editor. Preserve unrelated preprocessing rules and YAML blocks; retain draft edits after failures; clear state when dataset changes. Viewers can inspect; existing config administrators create/publish changes through the current BFF/config-version API. Display full-rebuild and queued-application semantics.
  5. Exercise the real publish validation/tier path, frontend unit/component/functional cases, Config studio accessibility and Linux visual baselines. Run make check, make check-e2e, make frontend, make frontend-audit and applicable generation gates. Record exact scope and usage in repository design references.
  6. House review completed with no findings, exact-head CI passed, and feat(config): add reusable named replacement dictionaries (#522) #1052 merged. Main/image/deploy workflow watch completed; E6 — Dictionaries and preprocessing #522 closed automatically and its acceptance checklist was reconciled. The ledger retains one explicitly blocked item for fresh independent dev startup-log evidence.

Discoveries

The current standardizer already renders inline dictionary CASE expressions from config transforms. Config studio already owns draft/publish/rebuild actions, so named mappings can reuse that versioned boundary rather than introduce a second persistence path. The existing ignore-word editor remains a distinct stop-word capability.

The SQL analyzer lacked array_to_string. The required upstream change landed in athvin/feather-flow#1, tagged er-entity-v0.1.5 at 2a643bc55528; this PR updates the dependency with cargo add. Its new test first failed on the missing function, then the complete ff-analysis test suite and strict Clippy passed. Planning retains the token input and strips only the literal-only generated lambda; real DuckDB tests execute the original SQL.

Existing transforms changes were absent from tier C. Both transformations and the new registry now queue training plus full rebuild, independently verified through the real Postgres router. No new public route, mutable dictionary store, or cloud mutation is introduced.

Commit audit

Final branch commits after refreshing twice over peer infrastructure changes:

  • 4bbc49f64d76a76a79819016fce6125472e8a147 — visible claim for E6 — Dictionaries and preprocessing #522.
  • 695ce2d4a14a8c5863d53fc6c47cc2d2a29e8bc0 — implementation and regression coverage.
  • 10f03f357eb3b32a7a9fe4bf51c750da830ad8d0 — faithful frontend mock tier-C classification.
  • 63907cf46703920a3e9d31716b99647b87108e86 — precise failed-read copy.
  • 462048f4cda197c063c1c77d8bef418a9ac3b94a — planner support reference.
  • Squash merge f7fb8b4c2bf3fb72180e5c9a9b3dc40a5bb43001.

Upstream feather-flow#1: b85437f3894cd8a93684e450299995ae958b4c48 adds the planner stub and negative/positive regression; ff7ac3dfb2b752030763561002341d7e1a115b2f repairs the adjacent function documentation; merge 2a643bc55528a15985e4208404af15bcadf54cda, tagged er-entity-v0.1.5.

Measurements

Files

@athvin
athvin force-pushed the issue/522-named-replacements branch from 042ebc4 to 462048f Compare November 9, 2026 15:02
@athvin
athvin merged commit f7fb8b4 into main Nov 9, 2026
47 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.

E6 — Dictionaries and preprocessing

2 participants