Skip to content

Add VIN + email-to-title recipes (0.2.0) - #21

Merged
andrewjordan3 merged 1 commit into
mainfrom
feat/vin-and-email-recipes
Jul 24, 2026
Merged

Add VIN + email-to-title recipes (0.2.0)#21
andrewjordan3 merged 1 commit into
mainfrom
feat/vin-and-email-recipes

Conversation

@andrewjordan3

Copy link
Copy Markdown
Owner

What

Two new expression-first recipes for the fleet data-mart handoff:

  • UPPERCASE_CODE_NORMALIZE — canonical identifier/VIN form (NFKC + whitespace-canonicalize + uppercase + nullify ?). Verified byte-equal to SQL UPPER(TRIM(vin)) on clean input, so a VIN cleaned here joins exactly to one cleaned elsewhere.
  • EMAIL_TO_TITLE_NAME — title-cased display name from an email local part, modeled on the BigQuery report expression. Docstring honestly documents the two cosmetic divergences from INITCAP (intra-word capitals, digit-adjacency) instead of claiming byte parity.

Plus the four atoms these needed (to_uppercase, separators_to_space, extract_email_local_part_strict, DEFAULT_PLACEHOLDER_SENTINELS), reusing existing atoms wherever they fit.

Verified

ruff clean, mypy clean, 945 tests pass. Built and adversary-reviewed; the adversary's finding (a false "exactly reproduces INITCAP" claim) is fixed with an honest docstring + digit-adjacent regression tests.

🤖 Generated with Claude Code

Two expression-first recipes plus the atoms they needed:

- UPPERCASE_CODE_NORMALIZE: NFKC -> whitespace-canonicalize -> uppercase ->
  nullify the '?' placeholder. The canonical form for identifier codes (VIN);
  agrees byte-for-byte with SQL UPPER(TRIM(vin)) on clean input.
- EMAIL_TO_TITLE_NAME: strict local-part extract -> [._-]+ to space -> titlecase.
  A title-cased display name from an email, modeled on the BigQuery report; the
  docstring documents the two cosmetic divergences from INITCAP (mcdonald and
  digit-adjacency) rather than claiming byte parity.

New atoms: to_uppercase (case), separators_to_space (substitution),
extract_email_local_part_strict (names), DEFAULT_PLACEHOLDER_SENTINELS (missing).
Existing atoms reused where they fit. ruff + mypy + 945 tests green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NGY3PA5SKv8f9mKWAo91xF
@andrewjordan3
andrewjordan3 merged commit 04c3780 into main Jul 24, 2026
@andrewjordan3
andrewjordan3 deleted the feat/vin-and-email-recipes branch July 24, 2026 18:36
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.

1 participant