Plan: Exchange partner architecture + Gateway-derived interface mocks (epic &79)

Status: In progress — phases 0–1 (catalog, ADR-045, this plan) landed 2026-08-22; the 29 children are T5 (after the backlog burn-down) and child 29 is blocked on partner connectivity (T4)
Epic: &79
Contract: ADR-045
Children: #1531–#1559 — the acceptance criteria are the issue bodies (Status step 1)

Context

canopy’s partner surfaces are stubs and fabricated-data adapters. Epic &79’s investigation produced two fused evidence bases — the source-derived interface catalog and the 7.4 INT design-document review — establishing that wire-faithful mocking is achievable for most of the estate. Reproducible from the pinned review artifact: 44 of 51 documented packages carry at least one operation with a full field-level layout, and 107 of 168 operations enumerate their reason/disposition code values.

ADR-045 records the architecture this plan implements: three layers (canonical contracts / grant-checked aggregation + routing / per-partner wire connectors) with canopy-exchange as a blind broker — recipient public keys only, every durable or returned evidence object a signed, recipient-sealed HPKE envelope it cannot decrypt.

Outcome: partner integrations that are real code against real formats, tested end-to-end against a devstack simulator, so a live deployment is credentials
endpoints + the transport-hardening gate — never a re-modeling.

Evidence provenance (pinned)

Connector children derive their wire facts from these artifacts. The vendor-derived inputs are not in this repository; they are archived locally and hash-verified by the generator at run time (fail-closed; --allow-unpinned to regenerate from different inputs).

Artifact

sha256

Source sweep round 1 (gateway-inventory-round1.json)

d252cf0240c09109f346a22a67159a71c0f4c16676352eebcad6ea9e1bf44440

Source sweep round 2 (gateway-inventory-round2.json)

ab830d66c21d6aac35c44a55fdff24ecf55150115a4ee9eecd358c1bbab6e813

7.4 INT design-doc review (interface-docs-review.json, 51 packages / 168 operations)

bfd400b21b74cb560c440f1ee341295c1b52116798738251737113246d704229

Catalog generator (docs/tools/gen-gateway-catalog.py, in-repo)

regenerate: see the header comment; census self-check must exit 0

Gateway worker-portal checkout

commit e222bd1026b4a5857295522636ed63957a2e9492

Gateway customer-portal checkout

commit 3e4932825ae3e32e6b9af4c09682b61c0a643dcc

Divergence adjudication. Design docs win on semantics and code values; Gateway source wins on wire bytes and names; where both are internally inconsistent, the connector implements the source XSD/BeanIO literal and the simulator asserts it. Record the adjudication in the connector’s module docs.

Sanitization rule for fixtures and code tables. Interface FACTS only — field names, layouts, code values, cadences, ack semantics. Never: credentials, concrete hostnames/IPs, MFT or filesystem paths, personal names/emails/phone numbers, or the identity of secret-bearing vendor files. Fixtures use injected synthetic namespaces and endpoints; each checked-in code table records its provenance (package + document) in a header comment. Auth is modelled by shape (OFX signon block, WS-Security token, hub token) with fake devstack-only credentials.

Design

See ADR-045 for the normative architecture: the three layers, the envelope protocol (HPKE seal + Ed25519 sign, authenticated header), the two independent registries (grants — legal; keys — crypto, never authorizing), the three exchange functions (live query facade, batch relay, origin-durable command routing), program-local matching via the persons identity projection
match tokens, the opt-in per-program response cache for metered sources, the operational-only bus events, and the transit-capability compliance gate.

Non-goals recorded here so children do not re-litigate them: signed/versioned deployment-config manifests (compiled legal maxima carry the invariant); SFTP/SSH transfer-auth fidelity in the simulator (the shared volume tests parser and protocol fidelity only — a documented limit); performance and backpressure suites before real connectivity exists.

Scope by phase

  • Phase 0 (done) — land the interface catalog + generator + publishability gate.

  • Phase 1 (MR !1188, merged 2026-08-22) — ADR-045, this plan, GitLab restructure.

  • Phase 2 — foundations — envelope protocol, compliance transit gate, L1 contracts, L2 registry + live-query facade, persons identity projection, batch-relay core, recipient-ingest kit, scheduler, simulator scaffold, command-routing core.

  • Phase 3 — SNAP-first dialects and cutovers — GDOL, SDX, BENDEX, SVES/SOLQ, SAVE, then the SNAP cutover and the verification rip-out.

  • Phase 4 — remaining estate — ingress layer, eDRS, NDNH/New Hire, Work Number, NAC/PARIS, EBT commands + EBTAS dialect, incarceration, dedup policy, catalog enrichment, observability baseline.

Children

Each child is one MR; its acceptance criteria were filed as the issue body (#1531–#1559, Status step 1) and are not repeated here. Every child additionally satisfies the standing bar: SPDX headers, typed errors, no unwrap/expect/panic, quality budgets, cargo xtask validate, Antora doc updates in the implementing MR, and a CHANGELOG == Unreleased entry.

Universal criteria for connector/dialect children

Every dialect child (11–22, 24, 25) satisfies all of:

  1. Simulator personality implementing the partner’s documented wire dialect, selectable by source_id, serving deterministic fixtures keyed to seed personas.

  2. Exchange L3 connector: parser + builder, mapped to L1 kinds, registered with compiled legal maxima (classification, authority, maximum program set) and capabilities.

  3. Proptests are mandatory on every parser/builder (round-trip, malformed input, boundary widths, code-value coverage).

  4. Golden fixtures are source-derived bytes committed independently of the connector/simulator code; the connector must not be the fixture’s author.

  5. Cross-process integration test: connector ↔ simulator over the real transport (HTTP or file volume), asserting field-level fidelity and the documented code values.

  6. Negative paths: malformed payload, auth failure, timeout, partial file, unknown code value — each asserted, none silently swallowed.

  7. Hostile-input controls active: XXE disabled, size/record caps, filename path-traversal guards, checksum/control-total validation.

  8. Divergence adjudication recorded in module docs; sanitization rule honoured for all fixtures and tables.

Child index

# Child

1

Envelope protocol + key registry — HPKE (RFC 9180) seal + an ES256 detached JWS through canopy-signing, in canopy-crypto-shred; enrollment, rotation, known-answer tests; key-provisioning runbook

2

Compliance transit-capability gate — compliance/data-tenancy-authorisation.toml + xtask/src/cmd/compliance.rs; exchange rows added with enforcement live; the ADR-004 isolation map reconciled

3

L1 contracts crate (crates/canopy-contracts-exchange) — EvidenceQuery / EvidenceResult / Provenance, workflow and command contracts, typed newtypes

4

L2 grant registry + live-query facade — compiled legal maxima, blind per-program response cache, OpenAPI census, compose wiring for every program profile

5

persons identity projection + match tokens — audited full-identity endpoint (closes #1496); keyed-HMAC match tokens

6

Batch-relay core — parse → seal-per-recipient → enqueue → delete-file; sealed forensic quarantine; signed receipts; the crash fault matrix

7

Recipient-ingest kit — verify → decrypt → match → persist → audit → acknowledge in one transaction; canopy-snap adopts first

8

Scheduler — UTC cron per source, fenced DB lease, audited manual trigger, event-driven triggers

9

Partner-simulator scaffold — tools/canopy-partner-sim, development-mode only, watermarked, personalities keyed by source_id

10

Command-routing core — origin-durable commands, UUIDv7 ids, submitted → accepted / rejected / unknown → confirmed

11

GDOL wage/UBI dialect + connector

12

SSA SDX dialect + connector — 338-field fixed-width, three cadences; snap + medicaid ingest

13

SSA BENDEX dialect + connector + ingest adoption

14

SVES/SOLQ dialect + connector — consumption relocates program-side; canopy-eligibility’s pre-dispatch fetch deleted (ADR-034 debt retired)

15

SAVE workflow contract + dialect + connector

16

SNAP cutover — canopy-snap consumes exchange; services/canopy-snap/src/verification_client.rs deleted; waits for children 12 and 13

17

Verification rip-out — the internal ievs/save/ssa routes, the noop/scripted adapters and AdapterSelection deleted in one compilation-atomic MR

18

Partner ingress layer — authenticated inbound endpoints, replay protection, correlation to runs/commands

19

FNS eDRS workflow + dialect + connector

20

NDNH + GA New Hire dialects + connectors

21

Work Number dual personality — the OFX-era flavor and the REST/JSON successor

22

NAC + PARIS dialects + connectors

23

EBT commands on the command-routing core; canopy-enrollment keeps the issuance ledger

24

EBTAS file dialect — issuance file out, drawdown file in as a reconciliation signal; needs the ingress layer

25

Incarceration kind — GA DOC + SVES prisoner-match

26

Dedup/conflict policy across same-kind sources — blocks enabling any additional same-kind source

27

Catalog enrichment + coverage-gap completion

28

Observability + runbook baseline — blocks the first connector cutover (child 16)

29

Real-connectivity hardening (T4, partner-blocked) — mTLS, allowlists + SSRF controls, PGP-at-rest, rotation, HA scheduler; restricted connectors compile-gated on it

Dependency spine (encoded as GitLab blocked-by links at filing): children 1, 2, 3 → 4 → {5, 6, 7, 8, 9, 10} → dialect children → cutovers 16, 17. Child 28 blocks 16. Child 26 blocks enabling any second same-kind source. Children 23 and 24 need 10 and 18. Child 27 follows the catalog MR. Per-cutover deploy order: exchange + keys first, recipients enroll, then the caller flips (ADR-016 expand/contract for wire-shape changes).

Status

Step

Description

Status

0

Catalog page + generator + publishability gate landed (MR !1187, merge 8bf6e8c0)

Done (2026-08-22) — merged

1

ADR-045 + this plan + nav + CHANGELOG (MR !1188, merge eb312d60); GitLab restructure: children #1531–#1559 filed with acceptance criteria + blocked-by spine + epic links (read-back verified), epic &79 amended, #1527 closed with receipts. Tier ruling recorded: children are T5 New Features — implementation starts after the existing backlog burns down (#1559 is T4, connectivity-blocked)

Done (2026-08-22) — see epic &79

2

Foundations — children 1–10

Not started

3

SNAP-first dialects + cutovers — children 11–17

Not started

4

Remaining estate — children 18–28

Not started

5

Real-connectivity hardening — child 29

Blocked (partner connectivity does not exist; T4)

Verification

  • Phase 1 (MR !1188): cargo xtask docs plan-lint; cargo xtask check-docs; Antora build in the CI-pinned container (antora/antora:3.1.14 with the .gitlab-ci.yml extension pins) with no new diagnostics for the added pages; full pre-push battery. The tenancy matrix is deliberately untouched here — it changes in child 2, with the enforcement.

  • Per child: the issue’s criteria plus the universal bar; cargo xtask validate; for API-bearing children, cargo xtask api-docs drift-clean against a live service.

  • GitLab state: children exist with their acceptance criteria as the issue bodies, weights, milestone, labels, and real blocked-by links; epic &79’s task list carries actual IIDs; #1527 closed with both SHAs and a per-criterion checklist.

Edit this page · default