feat: phase g - EDIFACT #13

Merged
KofTwentyTwo merged 2 commits from feature/phase-g-edifact into develop 2026-10-14 13:59:27 +00:00
KofTwentyTwo commented 2026-10-14 13:50:14 +00:00 (Migrated from github.com)

Summary

Phase (g) of docs/DESIGN.md: EDIFACT.

  • Envelopes: reader and writer for UNA, UNB/UNZ, optional UNG/UNE, UNH/UNT (syntax 3 and 4), release-character escaping, envelope findings (UNT count and reference, UNE/UNZ counts and references).
  • Routing and control: UNB identities on edi_identity, EDIFACT agreements, interchange (UNB05) and message (UNH01) references through the control-number allocator, duplicate detection on sender, recipient, reference and test indicator. The inbox worker detects EDIFACT vs X12 and handles mixed payloads.
  • Standard-neutral pipeline: an EdiDocument abstraction lets the guide validator, mapper and preview handle both standards with minimal churn to the X12 classes.
  • Guides (in-house baselines, D96A and D01B): ORDERS, ORDRSP, DESADV, INVOIC, CONTRL; docs/GUIDE-FORMAT.md covers segment groups and composites.
  • CONTRL: built at the agreement's ack level (UCI, UCM, UCS/UCD) and reconciled inbound (overdue resolve, rejection raises edi.ack.rejected + REJECTED_ACK). APERAK deferred.
  • Maps: ORDERS in; ORDRSP, DESADV, INVOIC out.
  • Demo: Lindqvist Retail AB with ORDERS in, the three responses out and CONTRL both ways.

Merged develop in (phases c and e); HealthcareValidation now takes EdiDocument. Existing databases need three new agreement columns (README).

Test plan

  • ./mvnw verify after merging develop: all tests pass, Checkstyle, JaCoCo gate
  • UNA and non-default separators with escaping; envelope findings; exact CONTRL; inbound CONTRL reconciliation; ORDERS end to end; ORDRSP/DESADV/INVOIC built, validated and parsed back; mixed X12 + EDIFACT inbox; duplicate interchange
  • CircleCI test_only

🤖 Generated with Claude Code

## Summary Phase (g) of `docs/DESIGN.md`: EDIFACT. - **Envelopes:** reader and writer for UNA, UNB/UNZ, optional UNG/UNE, UNH/UNT (syntax 3 and 4), release-character escaping, envelope findings (UNT count and reference, UNE/UNZ counts and references). - **Routing and control:** UNB identities on `edi_identity`, EDIFACT agreements, interchange (UNB05) and message (UNH01) references through the control-number allocator, duplicate detection on sender, recipient, reference and test indicator. The inbox worker detects EDIFACT vs X12 and handles mixed payloads. - **Standard-neutral pipeline:** an `EdiDocument` abstraction lets the guide validator, mapper and preview handle both standards with minimal churn to the X12 classes. - **Guides** (in-house baselines, D96A and D01B): ORDERS, ORDRSP, DESADV, INVOIC, CONTRL; `docs/GUIDE-FORMAT.md` covers segment groups and composites. - **CONTRL:** built at the agreement's ack level (UCI, UCM, UCS/UCD) and reconciled inbound (overdue resolve, rejection raises `edi.ack.rejected` + REJECTED_ACK). APERAK deferred. - **Maps:** ORDERS in; ORDRSP, DESADV, INVOIC out. - **Demo:** Lindqvist Retail AB with ORDERS in, the three responses out and CONTRL both ways. Merged develop in (phases c and e); `HealthcareValidation` now takes `EdiDocument`. Existing databases need three new agreement columns (README). ## Test plan - [x] `./mvnw verify` after merging develop: all tests pass, Checkstyle, JaCoCo gate - [x] UNA and non-default separators with escaping; envelope findings; exact CONTRL; inbound CONTRL reconciliation; ORDERS end to end; ORDRSP/DESADV/INVOIC built, validated and parsed back; mixed X12 + EDIFACT inbox; duplicate interchange - [ ] CircleCI `test_only` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.