feat: phase a2 - inbound vertical slice (inbox, routing, maps, apply, gateway intake, app home) #6

Merged
KofTwentyTwo merged 2 commits from feature/phase-a2-inbound into develop 2026-10-14 12:09:22 +00:00
KofTwentyTwo commented 2026-10-14 02:24:12 +00:00 (Migrated from github.com)

Summary

Phase (a), part 2. Stacked on #5 (the diff shows a1 too until #5 merges).

  • Inbox and worker: InboundSink intake (encrypted payload first, edi_inbox PENDING, unique per transport/external id, sha256 duplicates), scheduled worker with compare-and-set claims, stale-claim reclaim, backoff 1m/5m/15m/1h/6h, dead letter with an exception and QAlerts.raise.
  • Processing: interchange split, envelope findings and TA1, routing by ISA identities and usage, duplicate handling per onDuplicate, per-ST transactions with validation errors, 997/999 per agreement queued as edi_outbound_message (sending is phase b) with allocated control numbers, inbound 997/999/TA1 reconciliation (edi.ack.overdue resolve, edi.ack.rejected raise), timeline events, exceptions with occurrence counts. No payload values for PHI documents.
  • Maps: edi_map, edi_map_rule, edi_map_sample; EDI and QQQ paths; DATE, TIME, DATETIME, DECIMAL, QUALIFIER, CODE, UNIT, CONSTANT, CONCAT, SPLIT, SUBSTRING, TRIM, UPPER, LOOKUP plus a host transform registry (docs/MAPS.md); sample 850 maps.
  • Apply: Insert/UpdateAction with associations as the host-supplied service session, enforcement on, upsert by match keys; failures roll back that ST and open APPLY exceptions.
  • qbit-file-gateway: consumer edi against a stand-in of the agreed api (STAND-IN(core=QRun-IO/qbit-file-gateway, removeBy=qbit-file-gateway 0.1.0-RC.1)).
  • Object storage: optional ObjectStoragePayloadStore using only qbit-object-storage 0.1.0-RC.2's api package (G1).
  • App: edi app, nav Activity (Documents, Interchanges, Exceptions) and Setup (Partners, Agreements, Transports, Certificates, Guides, Code Lists, Maps); typed-widget home (no HTML).
  • Record actions (Review/Result): Reprocess, Preview Map, Assign/Ignore/Mark Resolved, Create Partner Override, Activate Guide, Activate Map; full-name permissions.
  • Contingent possible values for every partner-scoped FK pair, one test per pair plus live possible-value searches.

RC.5 adaptations are listed at the end of DESIGN.md (dotted alert type names, UTC timestamps, table-level links in typed TABLE widgets, storage-only preview download alias).

Not yet: screenshots (the demo server lands with phase b), live S3 and a deployed gateway.

Test plan

  • ./mvnw verify: 106 tests, Checkstyle, JaCoCo (92.6% instructions, 98% classes)
  • End-to-end gateway 850 to applied order + 997; invalid doc, unknown partner, partner mismatch, duplicates; retries and dead letter; ack reconciliation; permission-denied apply; preview writes nothing; home renders real counts
  • CircleCI test_only

🤖 Generated with Claude Code

## Summary Phase (a), part 2. **Stacked on #5** (the diff shows a1 too until #5 merges). - **Inbox and worker:** `InboundSink` intake (encrypted payload first, `edi_inbox` PENDING, unique per transport/external id, sha256 duplicates), scheduled worker with compare-and-set claims, stale-claim reclaim, backoff 1m/5m/15m/1h/6h, dead letter with an exception and `QAlerts.raise`. - **Processing:** interchange split, envelope findings and TA1, routing by ISA identities and usage, duplicate handling per `onDuplicate`, per-ST transactions with validation errors, 997/999 per agreement queued as `edi_outbound_message` (sending is phase b) with allocated control numbers, inbound 997/999/TA1 reconciliation (`edi.ack.overdue` resolve, `edi.ack.rejected` raise), timeline events, exceptions with occurrence counts. No payload values for PHI documents. - **Maps:** `edi_map`, `edi_map_rule`, `edi_map_sample`; EDI and QQQ paths; DATE, TIME, DATETIME, DECIMAL, QUALIFIER, CODE, UNIT, CONSTANT, CONCAT, SPLIT, SUBSTRING, TRIM, UPPER, LOOKUP plus a host transform registry (`docs/MAPS.md`); sample 850 maps. - **Apply:** Insert/UpdateAction with associations as the host-supplied service session, enforcement on, upsert by match keys; failures roll back that ST and open APPLY exceptions. - **qbit-file-gateway:** consumer `edi` against a stand-in of the agreed api (`STAND-IN(core=QRun-IO/qbit-file-gateway, removeBy=qbit-file-gateway 0.1.0-RC.1)`). - **Object storage:** optional `ObjectStoragePayloadStore` using only `qbit-object-storage` 0.1.0-RC.2's `api` package (G1). - **App:** `edi` app, nav Activity (Documents, Interchanges, Exceptions) and Setup (Partners, Agreements, Transports, Certificates, Guides, Code Lists, Maps); typed-widget home (no HTML). - **Record actions** (Review/Result): Reprocess, Preview Map, Assign/Ignore/Mark Resolved, Create Partner Override, Activate Guide, Activate Map; full-name permissions. - **Contingent possible values** for every partner-scoped FK pair, one test per pair plus live possible-value searches. RC.5 adaptations are listed at the end of DESIGN.md (dotted alert type names, UTC timestamps, table-level links in typed TABLE widgets, storage-only preview download alias). Not yet: screenshots (the demo server lands with phase b), live S3 and a deployed gateway. ## Test plan - [x] `./mvnw verify`: 106 tests, Checkstyle, JaCoCo (92.6% instructions, 98% classes) - [x] End-to-end gateway 850 to applied order + 997; invalid doc, unknown partner, partner mismatch, duplicates; retries and dead letter; ack reconciliation; permission-denied apply; preview writes nothing; home renders real counts - [ ] CircleCI `test_only` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.