Plan: The Medicaid referral — an application is referred to the medical-assistance agency, and the agency calls back

Status

Done (2026-12-04) — a submitted Medicaid application is referred to the jurisdiction’s medical-assistance system and holds the system’s reference as its receipt; the system later calls craig-exchange’s mutual-TLS return listener with its decision, and the worker’s page shows the receipt and the latest outcome with the interface that reported it. Georgia’s IES is the first such partner, and the reunification journey walks both legs against Georgia’s simulator.

Closes: #3193.
Epic: &124. Relates to: #3187 (the programme; rules R1 to R6 are in plans/archive/lifecycle-journeys.adoc), #3172 (rows M3, X1, X2 and the inbound rulings in note 4348189699), #3192 (the person index this is keyed on), #1822 (the real bind, still blocked), ADR-075, ADR-089, ADR-090. Tree: written against main at 89990a282.
Rulings (maintainer, 2026-11-29, #3172): a return’s wire is the jurisdiction’s (SOAP for Georgia); a caller is authenticated by mutual TLS, one client certificate per caller, registered against a partner in craig-security, and may use only its own operations; the listener lives inside craig-exchange’s three layers, with no new service.
Rulings (maintainer, 2026-12-03, plan mode): the Medicaid id the partner reports lives only on the application’s partner report, sealed at rest; a client certificate must both chain to an issuer the deployment configures and be registered and approved in craig-security; certificates get their own authorization type, on which an admin does everything, the auditor role reads and lists, craig-exchange’s service identity reads, and all else is denied.

Erratum (2026-12-03): D3’s trigger.rs items land later than step 1, since StageKind maps both ways to OutboundStageKind (step 3): the two kind variants with step 3, the application view and AckVerdict::Receipt with step 4; step 1 states a referral leg as its own trait (ReferralLeg, referral.rs), which step 4 holds as a TriggerLeg.

Erratum (2026-12-03): two of D9’s kit checks are named without and, which the fn-name-and lint refuses in a function that is not a test: the referral record check is two, a_referral_carries_the_identifier and a_referral_carries_the_application, and the unread-record check is an_unreadable_record_is_counted_not_fatal.

Erratum (2026-12-04): in D11, beside the two catalog strings it names, the section’s introduction (cases-medicaid-intro) changes for the same reason, and a row retracted after the system took it reads cases-medicaid-delivery-retracted-received and keeps its receipt, since "it will not be sent" would be false of it (a_retracted_application_that_was_received_says_so).

Erratum (2026-12-04): in D4’s first bullet the application’s facts ride the stage (OutboundStage::application) and the child’s identifier a new principal field carrying its kind (OutboundPrincipal::identifier); in D5 a receipt that names no application is answered unknown.

Erratum (2026-12-04): the legs interface, unchanged since 1.0, cannot name the stage kind the first erratum moved to step 3, so conversions towards it are fallible (boundary::NotCarried), a module’s leg is not asked about such a stage, and a partner set that states a triggered-send leg of an application fails validation (PartnerSetError::ApplicationLeg).

Erratum (2026-12-04): in D4 a 409 from craig-cases ends the referral’s record under receipt-conflict and leaves its admission resolved, because the substrate walks back to held only the admission of a failed resolve, never a record’s (the test is a_second_reference_for_one_application_ends_the_referral); and a receipt craig-cases answers withdrawn settles the record with the marker {"receipt":"withdrawn"}.

Erratum (2026-12-04): in D7 a run judges the agreement with store::agreements::dsa_verdict, as a collection run does, since require_active_dsa takes a request’s state; every refusal of a caller (the certificate, the interface, the agreement, the consent, the leg) is one bare 403; a call that decodes to a report of another kind than a referral’s is refused whole (a_return_holding_a_report_no_return_carries_is_refused_whole); and the registry states are held here by a_certificate_the_registry_does_not_admit_is_refused (craig-security answers each state alike, and its own suite holds each) and an_expired_certificate_is_refused_at_the_handshake.

Erratum (2026-12-04): D8’s craig_test_lib::returns_slot and the devstack’s return consent land with step 6, because a consent for an interface with no return leg refuses boot and no layer the devstack runs holds one until Georgia’s does; step 5 ships the certificate one-shot, the volume, the listener’s settings and the mock server’s caller routes with no interface consented, and tests the whole return in process (the_partners_simulator_calls_in_and_learns_each_outcome).

Erratum (2026-12-04): of step 6. Georgia’s referral leg refuses to assemble a first or last name over thirty characters, the width of IES’s name fields, so such a referral ends payload-invalid and is not sent; the devstack suite names its own children for that reason, and what a worker learns when a referral ends without a receipt is #3228. No coverage-signature entry was ever added for this plan’s routes, so step 6 deleted none.

Erratum (2026-12-04): at the close, four things. The journey’s two further tests build their child through the API (givenMedicaidApplication) and assert on the page; the worker’s own submit on the page is the main walk’s. The corpus row is core.exchange.partner-return, with four oracles; its slice names the application as a detail of case, since the scenario registry’s entities are a closed list. tests/e2e/lib/returns-fixture.ts and craig_test_lib::returns_slot share one label and one caller-name prefix, so each clears a registration the other left live; D8 and D11 said nothing of a claim that never reached its own revocation. Georgia’s scenario row georgia.exchange.ies-medicaid-referral binds no test at the commit this repository pins, since the tests it would bind land with this step; Georgia binds it afterwards and the pin that takes it is #3229. Issues filed for what Scope left out and what the work exposed: #3221 (the eligibility inquiry), #3222 (telling the partner of a retraction), #3223 (a page for certificates), #3224 (the program id as a person identifier), #3225 (a schedule for the devstack simulators' calls), #3226 (axum-server), #3227 (refused partner calls: detection and a limit), #3228; the real IES wire and its answer to a duplicate referral stay with #1822.

Context

A worker records a child’s Initial Medicaid Application in craig-cases (services/craig-cases/migrations/20261017120000_medicaid_applications.sql), which requires an open custody episode and a live identifier of the bundle’s medicaid_application_identifier_kind (Georgia: empi). Nothing is sent: the page reads "Recorded; not yet sent to" the jurisdiction’s system (cases-medicaid-delivery-pending, services/craig-web/locales/en/web.ftl), no trigger names the event, and the table has no column for anything a partner reports. Georgia’s craig-partner-ies models one request with one synchronous answer; the audit (#3172, M3, X2) found a referral answered only by an application number, and a status the partner delivers later by calling a service CRAIG hosts. No partner can call CRAIG today (state-machines.adoc: "no partner-inbound message machine"). The programme calls that leg a return (R4), and this plan builds its door. Its pull-shaped twin exists: a collection run (services/craig-exchange/src/collections/mod.rs) fetches a partner’s document, takes product records (PartnerReport, crates/craig-exchange-contracts/src/collection.rs) from the partner’s code, hands each to the service that owns the fact and keeps ids and counts only.

Scope

In: everything under Design, D1 to D11.

Out, each filed as an issue at the close: the eligibility inquiry (#3172 X1); telling the partner of a retraction; a craig-web page for registering certificates (the API and the CLI are in); the Medicaid id as a person identifier; a scheduled caller in the devstack; the real IES wire and its answer to a duplicate referral (#1822); moving axum-server to its 0.9 line.

Design

D1. Two legs

The referral is a triggered send (ADR-075): case.medicaid_application_submitted is admitted, one record is sent, and the partner’s answer carries its reference for the application (a receipt), which craig-exchange hands to craig-cases. The outcome is a return: the partner calls craig-exchange’s listener, the partner module decodes the call into product records, and craig-exchange hands each to craig-cases and answers the module’s acknowledgement.

D2. Module contract 1.2: three additions

crates/craig-partner-host/wit/craig-partner.wit becomes craig:partner@1.2.0. No published interface changes; each addition is a new interface in an optional world, bound only when the component exports it, as partner-set-person-index is (crates/craig-partner-host/src/runtime.rs, get_export_index).

  • referral-legs (world partner-set-referral-legs): specs (each leg’s interface and leg token); assemble (interface, leg, context) answering the record as JSON or legs’ `assembly-refusal; classify (interface, leg, legs’ `sent-record, the response) answering accepted(receipt), rejected(option<u16>), mismatch or malformed. The context carries the application (id, submitted-on, the citizenship-status and prior-medical-assistance tokens, the legal admin unit), the child as legs’ `principal-view (its identifier is the one the bundle names), the episode as legs’ `custody-view, the case number and the correlation id. The existing legs has no field for the application’s facts, and its records and enums are published.

  • returns (world partner-set-returns): specs (interface, leg, the largest body the leg reads); decode (interface, leg, content type, body bytes) answering the reports and a count of records it did not read, or a refusal (malformed, too-large); acknowledge (interface, leg, and either each report’s outcome, one of applied, replayed, unknown, withdrawn, failed, or a refusal: decode’s, or the host’s busy) answering a status, a content type and body bytes. All three are pure: the host does the TLS and the HTTP and gives them no transport, as it gives a leg’s rules none (a_return_leg_reaches_no_partner, beside a_leg_reaches_no_partner).

  • callers (world simulator-set-callers): due(kind) answers the calls the simulated partner would make now (leg, content type, body); answered(kind, leg, status, body) gives it each call’s answer. The host binds a new simulator-set-core (today’s simulator-set) and this world when it is there; simulator-set and partner-set, the worlds the SDK builds, gain the new exports.

A module built for 1.0 or 1.1 loads unchanged and provides none (a_module_built_for_1_1_provides_no_return, on a fixture built from a frozen copy of the 1.1 file; the_published_copy_is_version_1_1; no_published_interface_changed; every_pinned_layers_modules_load). The manifest states contract = "1.2", and a_newer_minor_refuses_boot holds as before. The SDK (crates/craig-partner-sdk/src/guest/partner_set.rs, guest/simulators.rs) defaults all three to none. PartnerSet (crates/craig-state-bundle/src/types.rs) gains referral_legs and returns, validated as legs are: a pair once, each interface with an adapter.

D3. The product’s records

In crates/craig-exchange-contracts:

  • collection.rs: PartnerReport gains MedicaidReferral(MedicaidReferralReport): the identifier kind and value the partner keys the person on, the partner’s reference for the application, and when stated its case reference, the program id it assigned, a ReferralStatus (pending, approved, denied, closed) and the date it reports. Each text is 1 to 64 printable ASCII bytes; a field over its cap is Malformed (no_report_field_exceeds_its_cap). PartnerReport::person_id becomes subject, answering Person(id) or Reference; a collection run counts a Reference report as unattributable.

  • returns.rs (new): trait ReturnLeg with interface, leg, max_bytes, decode and acknowledge over Collected, ReturnRefusal and Acknowledgement; synchronous and pure, so object-safe with no erased form.

  • trigger.rs: LegEntity::MedicaidApplication and StageKind::MedicaidApplication; RecordContext gains the optional application view; AckVerdict::Receipt(ReferralReceipt) (the partner’s reference), which the host hands to the owner and of which it keeps nothing.

D4. The referral on the trigger substrate

  • craig-cases answers the application as an outbound stage: OutboundStageKind::MedicaidApplication (crates/craig-cases-contracts/src/outbound_principals.rs), assembled in a new services/craig-cases/src/api/outbound_assembly/medicaid_application.rs beside custody.rs. The stage is the application (submitted or retracted); its one principal is the child, with the live identifier of the bundle’s kind and the application’s facts. Its two reads, GET /v1/cases/medicaid-applications/{id}/outbound-principals and …/{person_id}, sit beside custody’s (services/craig-cases/src/api/outbound_principals/custody.rs), admit craig-exchange alone (a_human_and_another_service_are_refused_the_application_reads) and are audited as every such read is (case.person_pii_exported, purpose outbound_principals). The open-stages listing (services/craig-cases/src/api/outbound_stages.rs) answers, for the new kind, the submitted applications that hold no receipt.

  • craig-exchange: CATALOGUE (services/craig-exchange/src/triggers/events.rs) gains case.medicaid_application_submitted, keyed on its application_id, once. A referral leg is held as a TriggerLeg whose spec the host fixes (entity and stage the application, admit-new, stage scope, opens its stage) and whose admits asks only that the child carries the identifier, so admission, the holds, resolve, record, settlement and release serve it unchanged (services/craig-exchange/src/triggers/: dispatch.rs, legs.rs, cases_reads.rs, views.rs). A retracted application admits nobody (a_retracted_application_is_not_referred), and the operator’s catch-up walk refers an application no event admitted (the_catch_up_walk_refers_a_submitted_application_no_event_admitted).

  • On AckVerdict::Receipt the record job posts the receipt to craig-cases (D5) before it settles, and stores the marker {"receipt":"applied"} as the transaction’s response. A post that fails leaves the job failed and retryable under the class receipt-unapplied; the retry sends the same record under the same correlation id (a_receipt_that_was_not_applied_is_sent_again_under_one_identity). A 409 from craig-cases holds the admission for an operator under receipt-conflict (a_second_reference_for_one_application_holds_the_referral).

D5. What craig-cases stores

A new insert-only table medicaid_application_reports: the application, the reporting interface, the kind (receipt or outcome), the partner’s reference and case reference, the program id as ciphertext bound to the row (sealed as citizenship_status is, services/craig-cases/src/api/encryption/medicaid_application.rs), the status token, the reported date, when it was received and craig-exchange’s transaction id. A trigger refuses an UPDATE or DELETE, as the demographic ledger’s does (a_stored_report_is_not_updated_or_deleted), and a unique index holds one receipt per application.

One service-only route, POST /v1/cases/medicaid-applications/partner-reports, admits the service caller craig-exchange alone, as craig-placement’s partner-report write does (services/craig-placement/src/api/education_partner_reports.rs, refuse_unless_exchange). A receipt names the application by id. An outcome names a person by identifier: the route finds the person holding that live identifier, then that person’s application whose receipt came from the same interface with the same reference, and compares and stores under a lock on that application. It answers applied (201); replayed (200: the report equals the application’s latest of its kind from that interface); unknown (200, nothing stored: no such person, or no receipt with that reference from that interface); or withdrawn (200, nothing stored: the application is retracted). A second receipt with another reference is a 409. Each stored report publishes case.medicaid_application_report_received with ids, the kind and the interface. MedicaidApplication (crates/craig-cases-contracts/src/medicaid_applications.rs) gains its reports, read under the application’s own authorization.

D6. The certificate registry, in craig-security

  • The table. partner_client_certificates: the partner, the SHA-256 fingerprint of the certificate’s DER, its subject and validity as parsed, a label, and a status pending, approved or revoked, with who and when.

  • The routes, after services/craig-security/src/api/signer_keys.rs: register (a PEM of one certificate, pending), approve, revoke and list under /v1/security/partners/{id}/client-certificates; and the service-only GET /v1/security/client-certificates/by-fingerprint/{sha256}, which admits craig-exchange’s identity alone and answers the partner and certificate ids only for an approved certificate of an active partner inside its validity, 404 otherwise. Registration refuses a body that is not one certificate, a CA certificate, an expired one and a fingerprint already live (registration_refuses_each_unusable_certificate). Each act publishes a security.partner.client_certificate_* event. The CLI gains craig partner cert register|approve|revoke|list (services/craig-cli/src/cmd/partner.rs).

  • The authorization type. ResourceType::PartnerClientCertificate (partner_client_certificate, crates/craig-authz/src/types.rs, whose pinned count moves from 61 to 62) with the AuditResource of the same token. <jurisdiction>-authz-partner_client_certificate.json lands in craig-config-georgia and craig-config-texas with the ruled rows, briefed to each repository’s agent as #3188’s file was; step 2 moves both pins in config-sources.lock, and crates/craig-authz/tests/default_rulesets/partner_client_certificate.rs asserts the rule on both layers.

  • The parser. Of the three X.509 readers in the lockfile, x509-parser 0.18.1 (its newest release) is used, after its current documentation is read: RustCrypto’s x509-cert is locked at 0.2.5 with 0.3.1 its newest, so a direct use adds a second generation, and rustls-webpki validates a chain but offers the subject only as DER and no validity dates. ADR-091 records the choice.

D7. The listener and a return run, in craig-exchange

  • Settings (crates/craig-common/src/settings.rs): CRAIG_EXCHANGERETURNSPORT, TLS_CERT_FILE, TLS_KEY_FILE, CLIENT_CA_FILE, and a fourth InterfaceConsents group, CRAIG_EXCHANGERETURNS<INTERFACE>ENABLED, default off, checked by ExchangeRegistries::check_consents. With no interface enabled no listener is bound (no_listener_is_bound_when_no_interface_consents). An enabled interface with no return leg, no port, an unreadable file or an empty issuer bundle refuses boot.

  • TLS: a rustls::ServerConfig on the aws-lc-rs provider (ADR-084) whose client verifier is rustls’s WebPkiClientVerifier over the issuer bundle, client authentication required. It is served with axum-server as craig-intake serves TLS (services/craig-intake/src/main.rs), through an acceptor wrapping its RustlsAcceptor that reads the connection’s peer certificates after the handshake and gives the request the leaf, the shape of that crate’s rustls_session example; the raw stream beneath TLS carries the write-idle bound craig-intake’s WriteIdleAcceptor gives its own, and a call is cut at ninety seconds. axum-server joins the workspace dependencies at the 0.8 line craig-intake uses (the lockfile’s 0.8.0), with that as its commented reason. A changed file takes effect at restart.

  • Routes: POST /returns/{interface}/{leg} and nothing else, and the API port gains no return route. The caller carries no token: the certificate is its whole identity, and craig-exchange reaches craig-security and craig-cases on its own service token, as a collection run does.

  • A run is a collection run’s steps with the fetch replaced by the call. (1) The certificate’s fingerprint is looked up in craig-security on every call, nothing cached; a miss is answered 403 and a lookup that fails 503. (2) The run resolves the active partner row with that interface’s adapter_kind whose caller_partner_id is the looked-up partner (a new nullable column on exchange_partners, set through the partner API, unique with the kind; a value naming no security partner matches no caller), then its agreement (require_active_dsa, services/craig-exchange/src/api/partner_gates.rs), the consent and the leg. A caller with no such row is answered 403, the same answer for an interface that does not exist and for one that is another caller’s. (3) The body, capped at the leg’s max_bytes and at 1 MiB, is decoded by the leg. A call that decodes to more than 500 reports is refused whole as too-large: nothing is posted, and the leg acknowledges the refusal (a_call_with_more_reports_than_a_run_takes_is_refused_whole). (4) Each report is posted to craig-cases with a three-second budget; three failures in a row, or sixty seconds in all, end the posting, and the rest are counted failed (a_run_past_its_deadline_counts_the_rest_failed). (5) One exchange_transactions row (direction inbound, origin return, the counts; its id is minted when the run starts and travels with each report) and one exchange.return_completed event are written in one transaction, and the leg’s acknowledge builds the answer.

  • One run per interface holds an advisory lock; a second call meanwhile is acknowledged busy. A call refused after the handshake publishes exchange.return_refused with the fingerprint, the interface token and the class (a_refused_call_is_recorded_with_its_fingerprint_and_class). Logs and metrics carry ids, classes and counts.

D8. The devstack: certificates and the mock server as a caller

  • craig-mock-server pki --out <dir> (rcgen on aws-lc-rs, as craig-intake’s self-signed feature) writes a development CA, the listener’s certificate and one client certificate per simulator kind that exports callers. A one-shot compose service writes them to a returns-pki volume that craig-exchange and the mock server mount read-only, as the partner-sim volume is shared. The keys exist only in that volume.

  • tools/craig-mock-server/src/sim.rs gains POST /_sim/partners/{kind}/run (R3’s "run the partner’s scheduled work now"): it asks due, posts each call to the listener with that kind’s certificate, passes each answer to answered and answers a summary; and GET /_sim/partners/{kind}/caller-certificate, the public PEM. Nothing in the devstack runs on a timer.

  • craig_test_lib::returns_slot installs a security partner, registers and approves the simulator’s certificate, and installs the partner row bound to it with an agreement, beside person_index_slot; its tests run one at a time (nextest group returns-partner-slot).

D9. The reference partner and the kit

The Testonia registry (crates/craig-partner-testonia-registry) gains a referral leg and a return leg over a JSON wire, and its simulator a caller. craig-partner-test-harness gains referral_leg (the record carries the application and the identifier; an accepted answer yields its receipt, a rejected one none) and return_leg (a well-formed call decodes to its reports; a malformed call and a body over the leg’s cap are refused; an unreadable record is counted and the rest decode; the acknowledgement names each report’s outcome), each check shown by the kit’s own tests to fail on a leg built with the matching flaw. tools/craig-fuzz gains the new boundary types in module_boundary and a target return_decode over the reference partner’s leg.

D10. Georgia’s layer

Briefed to Georgia’s agent and landed in craig-config-georgia, built against this repository’s main after step 5. Step 6 pins that commit and sets, in docker-compose.yml, the two consents for ies and the listener.

  • craig-partner-ies is re-aimed (#3172 M3). Its referral leg builds the crate’s referral record from the context and reads the answer’s application number as the receipt; a field the context does not offer is left out and listed in the crate’s documentation. Its return leg referral_status reads the SOAP call (client id, application number, case number, Medicaid id, status) with an XML parser and maps the status to the product’s; a record with a status it does not know is counted unread.

  • A simulator replaces the mock (R1 to R3): it holds each referral under the client id, answers the application number, and decides approved unless PUT /partner/ies/_sim/people/{person_id}/outcome said otherwise, with a Medicaid id minted from a v5 digest of the person id. due answers one call with every referral whose outcome was not yet acknowledged. REJECT_FOR_TEST is deleted.

  • The manifest states contract 1.2; bundle/outbound_triggers.toml gains the row for the event, ies, referral; the scenarios gain georgia.exchange.ies-medicaid-referral.

D11. The worker’s page and the journey

services/craig-web/src/routes/cases/custody/medicaid.rs and _medicaid_applications.html show, per application, the receipt (the partner’s reference and when it was received) and the latest outcome (status, case reference, program id) with the interface that reported it and its date. The two catalog strings that say "not yet sent" (cases-medicaid-delivery-pending, cases-medicaid-flash-submitted) say instead that no receipt has arrived, which is true whether or not a jurisdiction refers. In tests/e2e/specs/journey-lifecycle-reunification.spec.ts, once custody opens the worker submits the application; the simulator holds the referral and the page shows the receipt; the test runs the partner’s scheduled work (tests/e2e/lib/partner-sim.ts) and the page shows the approved outcome with its source. Two more tests: a denied outcome; and, with the certificate revoked, the partner’s call is refused and nothing changes. A new tests/e2e/lib/returns-fixture.ts registers and approves the simulator’s certificate and binds the partner row. The corpus gains its row in compliance/scenario-inventory/exchange.toml.

Steps

Each step is one MR with its tests, docs and changelog fragment. Steps 2 and 3 depend on no other step.

  1. The decision record, contract 1.2, the product’s records, the reference partner and the kit (D2, D3, D9).

  2. The certificate registry, with the two configuration repositories' ruleset files and their pins (D6).

  3. craig-cases: the outbound stage and the partner reports (D4 first bullet, D5).

  4. The referral trigger (D4), tested in process on the reference partner.

  5. The listener, the return run, the devstack’s certificates and the caller (D7, D8), tested in process over real TLS on loopback with the reference partner.

  6. Georgia’s layer, then this repository’s pin (D10), with the devstack suites for both legs.

  7. The worker’s page (D11).

  8. The journey and the close (D11).

The devstack runs Georgia’s layer, which provides neither leg before step 6. A route that so earns no success signature when it lands is entered in xtask/baselines/coverage-signatures.toml by hand with a dated last_exception, as #3192’s routes were, and the entry is deleted at step 6.

Risks

  • A caller is served with no certificate, with one from an issuer outside the bundle, or with one that chains but is unregistered, pending, revoked or expired, or whose partner is not active — fail-open. Mitigation: a_caller_without_a_certificate_is_refused_at_the_handshake, a_certificate_from_an_unknown_issuer_is_refused_at_the_handshake, one test for each of the five registry states, and a_certificate_revoked_between_two_calls_is_refused_on_the_second.

  • Someone other than an admin registers, approves or revokes a certificate, or a service other than craig-exchange reads the lookup — fail-open. Mitigation: the default_rulesets test on both layers, and a_service_other_than_exchange_is_refused_the_lookup.

  • A caller reaches an operation that is not its own, a return is served on another route or port, or one is applied with no agreement or no consent — fail-open. Mitigation: a_caller_may_use_only_its_own_interfaces_legs, the_listener_serves_no_other_route, the_api_port_serves_no_return, a_return_without_an_agreement_is_refused, a_return_without_consent_is_refused, a_consent_for_an_interface_with_no_return_leg_refuses_boot.

  • A partner reports on a child it was not told about or on a retracted application, or a caller other than craig-exchange writes a report — fail-open. Mitigation: an_outcome_with_no_matching_receipt_is_unknown_and_stores_nothing, an_outcome_under_another_interfaces_reference_is_unknown, an_outcome_for_a_retracted_application_is_withdrawn, a_human_and_another_service_are_refused.

  • A value a partner reported rests in craig-exchange, or the program id is stored in the clear — silent. Mitigation: no_reported_value_rests_in_exchange (after a referral and a return, no craig-exchange table holds the reference, the case reference, the program id or the identifier value); the_program_id_is_sealed_at_rest.

  • An outcome is applied twice, or two calls for one interface interleave — silent. Mitigation: a_repeated_outcome_is_a_replay, two_identical_outcomes_at_once_store_one and a_second_call_during_a_run_is_acknowledged_busy (concurrency).

  • An outcome arrives before its receipt was applied and is answered unknown — silent. Mitigation: the run’s row and event carry the unknown count, the acknowledgement names the report, and both simulators send it again (an_outcome_answered_unknown_is_due_again).

  • A referral reaches the partner twice: with different bytes under one identity, or as a duplicate the real partner answers with a second application — silent. Mitigation: the substrate’s pinned source and a_receipt_that_was_not_applied_is_sent_again_under_one_identity; the simulator answers a repeated correlation id with the first reference, and the real answer, not knowable before #1822, is named in an issue at the close.

  • A hostile or oversized body exhausts the listener, or craig-cases or craig-security hangs or refuses during a call — fail-closed (a refusal, a 503, or the reports acknowledged as failed; nothing is stored). Mitigation: the body cap, the module’s fuel and memory limits, a_body_over_the_cap_is_refused_before_it_is_decoded, the return_decode fuzz target, the hung and refused legs of each service, and the deadline test.

  • A module built for 1.1 stops loading, or the listener’s settings are wrong — fail-closed at boot. Mitigation: a_module_built_for_1_1_provides_no_return, every_pinned_layers_modules_load, and one test for each of D7’s four boot refusals.

Tests

  • Contract (wire): the kit’s referral_leg and return_leg checks on the reference partner, natively and on its built module; Georgia’s goldens for its record, call and acknowledgement; the route contracts of D5 and D6.

  • Boot, security and fault: the contract-version tests of D2 and the tests named under Risks and in D4 and D7.

  • Concurrency: two_identical_outcomes_at_once_store_one, a_second_call_during_a_run_is_acknowledged_busy.

  • Property and fuzz: return_decode; module_boundary; a property test that decode answers for any bytes.

  • Regression and journey: the trigger and collection suites pass unchanged; the three tests of D11.

Delivery

  • Decision record: ADR-091, the partner return: the listener, the certificate rule, and what rests where.

  • Canonical page: partner-crates.adoc gains "A return". Also touched: security.adoc, deployment-guide.adoc, configuration-reference.adoc, devstack.adoc, testing-reference.adoc, state-machines.adoc, shared-crates.adoc, the three services' data-model-*.adoc and API pages.

  • CHANGELOG entry: one changelog.d/3193.<slug>.<type>.adoc fragment per step.

  • The close: step 8’s MR closes #3193. This page is archived with its Status; notes go on #3193, #3187, #3172 and #1822; the issues named under Scope are filed, with any gap the journey exposed.

Edit this page · latest