Skip to content

feat(schema): learn sender-specific mappings#40

Merged
xt0n1-t3ch merged 1 commit into
mainfrom
feat/epic-34-schema-mapping
Jun 15, 2026
Merged

feat(schema): learn sender-specific mappings#40
xt0n1-t3ch merged 1 commit into
mainfrom
feat/epic-34-schema-mapping

Conversation

@xt0n1-t3ch

Copy link
Copy Markdown
Owner

Summary

Closes #34.

Implements hybrid auto schema mapping for sender-specific bordereaux: static canonical aliases for cold start, learned EF overrides keyed by sender/domain after analyst correction, visible mapping evidence in Review, and normalized mapped values.

What changed

  • Added schemaMappings to document details plus mapping corrections on review decisions.
  • Added EF persistence for per-document mapping evidence and learned sender/domain mapping rules.
  • Added a scoped schema mapper with precedence: learned override -> static alias -> bounded fuzzy match -> low-confidence unmapped row.
  • Applied mapped table values into canonical fields when extraction is missing/low-confidence, with normalization for money, percent, currency, dates, and simple codes.
  • Added Review UI Schema mapping panel with source header, canonical target, confidence/source, normalized value, sender key, and correction staging.
  • Updated extraction contract, docs, and test index.

Testing

  • dotnet build Reva.slnx -warnaserror -> passed, 0 warnings.
  • dotnet format Reva.slnx --verify-no-changes -> passed.
  • dotnet test Reva.slnx -> passed, 28 unit + 14 integration.
  • dotnet build tests/Reva.E2E/Reva.E2E.csproj -> passed, 0 warnings.
  • pwsh tests/Reva.E2E/bin/Debug/net10.0/playwright.ps1 install chromium -> passed.
  • dotnet test tests/Reva.E2E/Reva.E2E.csproj --no-build -> passed, 3 e2e.
  • Browser proof at http://localhost:5187: uploaded a sender .eml, verified Schema mapping panel, corrected GWP -> Claims, saved, saw Corrected 99% + Claims marked Reviewed, console errors [].

@xt0n1-t3ch xt0n1-t3ch merged commit a7924ce into main Jun 15, 2026
2 checks passed
@xt0n1-t3ch xt0n1-t3ch deleted the feat/epic-34-schema-mapping branch June 15, 2026 00:47
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.

Epic 8 — Auto schema mapping to a canonical layout (the differentiator)

1 participant