Skip to content

Phase 44: data foundations — Horse.bornAt (KI-008), unpositioned odontogram findings, customer-upserted event (KI-017)#254

Merged
RJK134 merged 7 commits into
mainfrom
feature/44-data-foundations
Jun 12, 2026
Merged

Phase 44: data foundations — Horse.bornAt (KI-008), unpositioned odontogram findings, customer-upserted event (KI-017)#254
RJK134 merged 7 commits into
mainfrom
feature/44-data-foundations

Conversation

@RJK134

@RJK134 RJK134 commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Phase 44 — Data foundations small-batch (KI-008, §23 deferral, KI-017) + n8n workflow 13

Overnight multi-agent build authorised by Freddie (2026-06-12). Four small, independent items:

  1. KI-008 — Horse.bornAt: additive nullable DateTime (migration 20260612210000_phase44_horse_born_at, no backfill). Vetup importer now persists the animal DOB (including the real Né(e) le header alias) into bornAt while leaving the legacy derived age behaviour untouched; horse detail shows DOB + age derived from bornAt with stored-age fallback; the data-quality "missing birth date" check is now bornAt-aware. Importer covered with/without DOB on both ETL paths.
  2. Odontogram (§23 Phase 39 deferral): findings with non-Triadan / off-chart / null tooth IDs render in an "Unpositioned findings" list under the chart instead of being silently dropped.
  3. KI-017 — customer-upserted: customer create/update routes now emit the n8n event exactly like the two existing emits (fire-and-forget via emitN8nEvent, env-gated, failure-tolerant). Producer side closed; consumer workflow 10 stays inactive (BLOCKED-ON-VETUP-API). KI-017 updated to producer-done/consumer-blocked.
  4. n8n workflow 13 (rider commit, requested by Freddie tonight): n8n/13-gmail-imap-intake.json — import-ready Gmail IMAP → /api/webhooks/email intake (3 nodes, ships inactive, placeholder credentials, field mapping verified against email-intake.service.ts).

Verification

Gates all green on the final tree: lint ✓ typecheck ✓ prisma validate ✓ build ✓, tests 2,621 → 2,652 (+31). Deferred with notes: KI-009 phone normalisation (≤3 rows, manual data fix), vaccination-schedule recalculation from bornAt (enabled by this, not built).

Suggested merge order tonight: this first → Phase 43 (#253) → Phase 41 → Phase 42 (#252). All four PRs append to BUILD_PLAN.md/KNOWN_ISSUES.md in separate final commits — I'll rebase the remaining branches after each merge. Final merge with Richard / Freddie as always.

https://claude.ai/code/session_01VzJJTUcvzZgS9jN8aap9iv


Generated by Claude Code

claude added 7 commits June 12, 2026 19:41
…, real Né(e) le header alias, bornAt-aware data-quality check, DOB + derived age on horse detail
…t/null tooth-id findings in an Unpositioned findings list instead of dropping them
…pdate routes — fire-and-forget via emitN8nEvent; workflow 10 consumer stays inactive (BLOCKED-ON-VETUP-API)
…mail → /api/webhooks/email

Three-node import-ready export: Gmail IMAP trigger (UNSEEN + mark-as-read,
attachments off), keep-only-set mapping to the email-intake Zod schema
(empty-string optionals, ISO 8601 receivedAt), Header-Auth POST with 3x5s
retry. Ships inactive; credentials filled at import. Setup checklist in
node notes.

https://claude.ai/code/session_01VzJJTUcvzZgS9jN8aap9iv

@RJK134 RJK134 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed

@RJK134 RJK134 merged commit daed458 into main Jun 12, 2026
9 checks passed
@RJK134 RJK134 deleted the feature/44-data-foundations branch June 12, 2026 23:06
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.

2 participants