This is the build plan for this decision record, bite by bite, as it was grilled and built. It’s copied from our repository unedited, apart from customer, partner and bank names, which read [redacted]. It was written for the people and agents building the product, so expect internal shorthand, and the mistakes are left in.
ADR-835 — Implementation Plan
Findings for the ADR
- F1 — the mirror is a cascaded system command, not an event consumer. Decision 4 says a
consumer “of those events” calls the processor after commit. Domain events are not published as
messages here; the precedent is a handler returning its events plus an outgoing message. So
every status, controls and reissue handler cascades
MirrorCardToProcessorCommand(CardId)(ISystemCommand, keycards.mirror-card-to-processor), andMirrorCardToProcessorHandlerreads the card’s current state and tells the processor. Same behaviour, same key; the ADR’sCardProcessorMirrorHandleris that handler under the command’s name. It is the ADR’s call. - F2 — the operations menu needs an availability read. Decision 12 puts the verbs in
DispatchedOperations.ForCard; a viewer reads availability through a per-host endpoint (/api/counterparties/{id}/operations). This plan addsGET /api/cards/{id}/operationsundercards.view-card, as the counterparty endpoint does. The ADR names no read for it. - F3 — the vocabulary command replaces the whole list. Decision 2 names one
AmendCardTypesCommand; the counterparty vocabulary has add, edit and delete per row. This plan keeps the one command carrying every row, as the single-document settings page pattern does, and the validator checks every key. It is the ADR’s call. - F4 — withdrawn at the plan grill (see F16).
- F6 — withdrawn at the plan grill; F15 is the rule.
- F7 — withdrawn at the plan grill (see F12).
- F8 — commands, queries and events live in the feature project, not Contracts.
CardTypeis a settings row inLedgerTM.Cards, so a query returning it cannot sit in Contracts (Dependency Rule). Ids, values, the summary documents andICardByTokenReaderare Contracts; every command, query and event is underLedgerTM.Cards(F13). - F9 —
CardCreationRequestgains the card id and the credential life (additive change to ADR-820’s type): Decision 3’s idempotency reference and Decision 2’s credential life have no other way to reach the processor. The simulator’s hard-coded three-year life reads the request. - F10 —
CardProcessorException(Code, Message)inLedgerTM.Contracts/Cardsis the processor’s refusal the issue handler turns intoCARD_PROCESSOR_REFUSED. A supporting type. - F12 — the ADR-820 provisioning door changes (plan grill point 2): the decider only decides;
the door’s handler cascades
AddCardDeviceCredentialCommandafter it commits anApprovedreceipt, so an approval that misses the budget records nothing.DecideCardTokenProvisioning.csjoins the files touched. The seam itself returnsCardTokenProvisioningAnswer(Decision, Reason)(point 11), two days after it shipped with two readers; F7 is withdrawn. - F13 — events live in
LedgerTM.Cards/Domain/Card.Events.csasDomainEvents with aMessageIdentityand a row each insrc/LedgerTM.Hosting/event-identity.tsv(point 4). The oracle is the same feature project, so nothing outside Cards reads them; F8’s “events in Contracts” is withdrawn. - F14 — a device credential always has its token.
ApproverequiresDeviceTokenReference; a request without one is answeredDeclinewith reasonDeviceTokenMissing, so no tokenless credential exists and removal is by token (point 5). The ADR’s late-binding paragraph goes. - F15 — step-up matching keys on the device token, same trading date (point 1): the second
request is approved only when it names the device token an earlier
StepUpreceipt on this tenant’s trading date named. Verifying the holder (the OTP) is the portal ADR’s; the ADR’s Consequences say so. - F16 — the vocabulary refuses a removal or re-key that strands cards
(
CARD_TYPE_IN_USE, point 15); fundable account types areAccountTypeIds and travel countries areIsoCountryCodes (point 8); F4 is withdrawn. - F18 — refusal statuses, as the host already maps them (phase B, every author): a
validator refusal is a 400 with FluentValidation’s errors body, a
DomainExceptionfrom a handler or the aggregate is a 422{ code, message }. Format checks (embossed name, display name, first-credential kind, key patterns, ceilings, travel window) are validators and answer 400; lookups and guards (type unknown, cap, funding, status, processor refusal, not removable) are the handler’s and answer 422. Every refusal body carries its code. - F19 — one status table (phase B, bites 3, 4, 6): the aggregate’s guards and the
operations menu are the same table, Decision 12’s, and a unit test proves they agree.
Report lost or stolen is offered at
Orderedtoo (plastic lost in the post). - F20 — the processor is not told the travel window in this ADR: its stand-in may decline a traveller we would allow. Recorded in the ADR’s Consequences; the oracle answers first.
- F21 —
IsoCountryCodehas no JSON converter and would deserialise to its default on every wire and document; bite 1 adds one (additive change to a Contracts value). - F17 — eight feature projects in the footprint because Contracts, the permission catalog,
the feature catalog, seeding, the test projects and the UI are touched by any slice that adds a
command; the domain change sits in
LedgerTM.CardsandLedgerTM.Operationsalone. - F11 — the funding-rule check is bite 2’s, because issue validates the rule; bite 4 reuses
it for
SetCardFundingRule. The bite descriptions say so; the criteria are unchanged. - F5 — what the test suites need that the ADR does not declare:
StubCardProcessor(Testing.Infrastructure, ADR-820) gains a call log and aRefuseCreationswitch for the processor-refuses scenario, and the context’s facet can be repointed to kindPaymentologyfor one test;CardsComponentContextgainsIssueVirtualCardAsyncandIssuePlasticCardAsynchelpers so later bites’ tests do not restate the issue body. This ADR’s component tests run against the stub (kindPaymentology, tenant-keyed call log), because the simulator stores every cardActiveand records no plastic order, so nothing about the mirror is observable on it; the sample-card seed test alone runs the real simulator onza-retail.
Files touched
Bite 1 — contract types, the card type vocabulary, its page
src/LedgerTM.Contracts/Cards/CardIds.cs—CardId(generated,UrnForof a guid),CardTypeId(SlugForof the key)src/LedgerTM.Contracts/Countries/IsoCountryCode.cs— JSON converter (F21)src/LedgerTM.Contracts/Cards/CardValues.cs— new;CardholderReference,CardFundingRule,CardFundingShape,DeviceProvisioningRule,CardTravelWindow,CardRevealKind,CardRevealSessionsrc/LedgerTM.Contracts/Cards/CardCredential.cs—CardControlsreshaped:InStoreAllowed,AbroadAllowed→InStoreAbroadAllowed,DailyCeiling,MonthlyCeilingsrc/LedgerTM.Contracts/Cards/CardTokenProvisioning.cs—DeviceTokenReferenceon the requestsrc/LedgerTM.Contracts/Cards/ICardProcessor.cs—RequestRevealAsync;CardCreationRequestgainsReferenceandCredentialLifeYears(F9)src/LedgerTM.Contracts/Cards/CardProcessorException.cs— new (F10)src/LedgerTM.Contracts/Cards/CardSummary.cs— new;CardSummary,CardCredentialSummary,CardByToken,ICardByTokenReadersrc/LedgerTM.Contracts/Cards/ICardTokenProvisioningDecider.cs— returnsCardTokenProvisioningAnswer(F12)src/LedgerTM.Contracts/Cards/CardAuthorisation.cs—CardDeclineReasongainsDeviceTokenMissing,DeviceTokensNotAllowed,UnknownTokensrc/LedgerTM.Cards/Domain/Card.Events.cs— new; the fourteen events (F13)src/LedgerTM.Hosting/event-identity.tsv— fourteen rowscards.card-…src/LedgerTM.Cards/Application/Doors/DecideCardTokenProvisioning.cs— reads the answer’s reason into the receipt; cascadesAddCardDeviceCredentialCommandafter anApprovedreceipt (F12)src/LedgerTM.Cards/Domain/CardTypesSettings.cs— new;CardTypesSettings,CardTypesrc/LedgerTM.Cards/Application/Settings/AmendCardTypes.cs— new;AmendCardTypesCommand, handler,CardTypesSettingsValidator(VocabularyKey.Pattern, one row per key, a plastic or virtual kind, at least one fundable type, life 1–5 years, cap at least one,CARD_TYPE_IN_USEwhen a removed or re-keyed row still has cards)src/LedgerTM.Cards/Application/Queries/GetCardTypes.cs— new;GetCardTypesQuery,GET /api/settings/card-types(F8)src/LedgerTM.Cards/Application/Processor/PaymentologyProcessor.cs—abroadreadsInStoreAbroadAllowed;RequestRevealAsync(bite 5 fills it)src/LedgerTM.Cards/Application/Processor/PaymentologyOutboundMapper.cs— the five switches and three ceilingssrc/LedgerTM.Cards/Application/Processor/PaymentologyInboundMapper.cs— mapsdeviceTokenReferencewhen presentsrc/LedgerTM.Cards/Application/Processor/PaymentologyBodies.cs—PaymentologyProvisioningBody.DeviceTokenReferencesrc/LedgerTM.Cards/Simulation/SimulatorCard.cs,PaymentologySimulator.cs— the reshaped controls; the credential life read from the request; a second creation under the same reference answers the first card (F9)src/LedgerTM.Infrastructure.Contracts/AccessControl/PermissionCatalog.cs—cards.amend-card-types,cards.view-card-typessrc/LedgerTM.Infrastructure.Contracts/Features/FeatureCatalog.cs— the two keys undercards.issuingsrc/LedgerTM.Seeding.Provisioning/tenant-templates/packages/retail-bank/CardTypesSettings.yaml— new; rowsdebitandvirtual-debitsrc/LedgerTM.Seeding.Provisioning/PackageImporter.cs— the settings document keyed by its filenamesrc/ui-apps/bank/src/features/entity-types/card-types.tsx— new; the vocabulary page (StandardTable, one form)src/ui-apps/bank/src/features/settings/settings-class-map.ts—"card-types": "CardTypesSettings"src/ui-apps/bank/src/features/settings/category-taxonomy.ts— the entry under reference data,requiresFeature: cards.issuingsrc/ui-apps/bank/src/app.tsx— routesettings/card-typessrc/ui-apps/bank/src/lib/api.ts— the command and the readdocs/guide/features/card-types.md— new;feature: cards.issuing,attach: [route:/settings/card-types]LedgerTM.Tests.Unit/Cards/PaymentologyOutboundMapperTests.cs,PaymentologyInboundMapperTests.cs— the reshaped controls, the device tokenLedgerTM.Tests.Component/Cards/CardTypesSettingsTests.cs— newLedgerTM.Tests.Component/Cards/CardsComponentFixture.cs— seeds the three card type rows for the test tenant
Bite 2 — the aggregate, issue, activate, close, the read side, four-eyes
src/LedgerTM.Cards/Domain/Card.cs— new;EventSourcedAggregate,Issue,Activate,Close, publicApplys, status guardssrc/LedgerTM.Cards/Application/Commands/IssueCard.cs— new; command, validator (format only: embossed name, display name, first-credential kind, controls, free text), handler doing every lookup in its tenant-scoped session (type, cap, funding rule — a validator’s session is untenanted under a seed step, ADR-719), refusing a re-sent id before the processor is called, carrying[AggregateHandler]soEventMetadataMiddlewarestamps the act, runningCardFundingRuleCheck, callingICardProcessor.CreateCardAsyncthenIssue,OrderPlasticAsyncfor plastic,POST /api/cardsanswering{ id }src/LedgerTM.Cards/Domain/CardFundingRuleCheck.cs— new (F11); the four refusals throughIHeldAccountsReader,IAccountReferenceProviderand the type row, in the order held → currency → type → shapesrc/LedgerTM.Cards/Application/Commands/MirrorCardToProcessor.cs— new; the system command and its handler (F1)src/LedgerTM.Cards/Application/Commands/ActivateCard.cs,CloseCard.cs— new; command and handler each,POST /api/cards/{id}/activateand/close, cascadingMirrorCardToProcessorCommandsrc/LedgerTM.Cards/Application/Projections/CardSummaryProjection.cs— new; inline, one document per cardsrc/LedgerTM.Cards/Application/Projections/CardByTokenProjection.cs— new; inline, one document per credential tokensrc/LedgerTM.Cards/Application/Queries/CardByTokenReader.cs— new;ICardByTokenReadersrc/LedgerTM.Cards/Application/Queries/ListCards.cs,GetCard.cs— new; the queries andGET /api/counterparties/{id}/cards,GET /api/cards/{id};Expiredcomputed against the trading date at readsrc/LedgerTM.Cards/Application/Authorisations/CardApproverViewReader.cs— new;DocumentApproverViewReader<CardSummary, CardId>, andCardasSelfHoldingAggregate("Card")src/LedgerTM.Cards/Bootstrapper.cs— the aggregate, the two projections, the reader, the holder, the view reader, the keyed processor already theresrc/LedgerTM.Infrastructure.Contracts/AccessControl/PermissionCatalog.cs—cards.issue-card,cards.activate-card,cards.close-card,cards.view-cards,cards.view-card,// system-internal:cards.mirror-card-to-processorsrc/LedgerTM.Infrastructure.Contracts/Features/FeatureCatalog.cs— the keys undercards.issuingsrc/LedgerTM.Cards/Bootstrapper.cs—VocabularyEventLabelResolver("card_type", slugDerived: true)and a card label resolver, for the id-resolution half ofReviewabilityTestsLedgerTM.Testing.Infrastructure/Cards/StubCardProcessor.cs— every verb implemented, tenant-keyed call log,RefuseCreation,RefuseReissue,NextExpiry, credentials minted with expiry = trading date + life, deduplicated by the request’s reference (F5)LedgerTM.Tests.Component/Cards/CardsComponentFixture.cs—UseStubProcessorAsync,IssueVirtualCardAsync,IssuePlasticCardAsync,ActivateAsync, a demo customer with two ZAR call deposits, a USD call deposit and a ZAR fixed deposit, another customer with a ZAR call deposit, the three card type rows, a revealer actor group (F5)LedgerTM.Tests.Component/Cards/IssueCardTests.cs— newLedgerTM.Tests.Architecturebaselines —ReviewabilityTests/HolderCoverageTestsneed no line: the reader and holder register
Bite 3 — the lifecycle verbs and the mirror
src/LedgerTM.Cards/Domain/Card.cs—Suspend,Reinstate,ReportLostOrStolen,Reissue; credential expiry readsrc/LedgerTM.Cards/Application/Commands/SuspendCard.cs,ReinstateCard.cs,ReportCardLostOrStolen.cs,ReissueCard.cs— new;/suspend,/reinstate,/report-lost-or-stolen,/reissue; the reissue handler callsReissueAsync(andOrderPlasticAsyncfor plastic) beforeReissuesrc/LedgerTM.Cards/Application/Projections/CardSummaryProjection.cs,CardByTokenProjection.cs— the four events; a closed token leaves the indexsrc/LedgerTM.Infrastructure.Contracts/AccessControl/PermissionCatalog.cs— the four keyssrc/LedgerTM.Infrastructure.Contracts/Features/FeatureCatalog.cs— undercards.issuingsrc/LedgerTM.Cards/Application/Commands/MirrorCardToProcessor.cs— closes at the processor every token the card has closedLedgerTM.Tests.Component/Cards/CardLifecycleTests.cs— new
Bite 4 — controls, travel window, rename, the funding rule
src/LedgerTM.Cards/Domain/Card.cs—SetControls,SetTravelWindow,Rename,SetFundingRulesrc/LedgerTM.Cards/Application/Commands/SetCardControls.cs,SetCardTravelWindow.cs,RenameCard.cs,SetCardFundingRule.cs— new;/controls,/travel-window,/rename,/funding-rule; controls cascades the mirror; funding reusesCardFundingRuleChecksrc/LedgerTM.Cards/Application/Projections/CardSummaryProjection.cs— the four eventssrc/LedgerTM.Infrastructure.Contracts/AccessControl/PermissionCatalog.cs— the four keyssrc/LedgerTM.Infrastructure.Contracts/Features/FeatureCatalog.cs— undercards.issuingLedgerTM.Tests.Component/Cards/CardControlsAndFundingTests.cs— new
Bite 5 — the provisioning decider, device credentials, reveal
src/LedgerTM.Cards/Application/Doors/CardTokenProvisioningDecider.cs— new; implementsICardTokenProvisioningDecider, reads the card and the receipts throughIDocumentStoreand the current tenant, answers with a reason, writes and publishes nothingsrc/LedgerTM.Cards/Application/Commands/AddCardDeviceCredential.cs,RemoveCardCredential.cs— new;/credentials/remove; remove cascades the mirror, which closes the token at the processorsrc/LedgerTM.Cards/Domain/Card.cs—AddDeviceCredential,RemoveCredentialsrc/LedgerTM.Cards/Application/Projections/CardByTokenProjection.cs— binds a device token when the event carries onesrc/LedgerTM.Cards/Application/Commands/RevealCard.cs— new;RevealCardCommand(INotFourEyesGated),POST /api/cards/{id}/reveal, emitsCardDetailsRevealed, answers the sessionsrc/LedgerTM.Api/…/CardNumberRedaction.cs(the F-1572 request-record redaction) — the reveal response’shostedViewis redacted at capturesrc/LedgerTM.Cards/Application/Processor/PaymentologyProcessor.cs—RequestRevealAsync(cards/{token}/reveal, assumed like the rest of the Companion surface)src/LedgerTM.Cards/Simulation/PaymentologySimulator.cs—RequestRevealAsyncanswers a simulator address with placeholders and an expiry ten minutes outsrc/LedgerTM.Cards/Bootstrapper.cs— the decider replaces the “none registered” default for this projectLedgerTM.Testing.Infrastructure/Cards/ScriptedDeciders.cs,LedgerTM.Testing.Infrastructure/TestingEnvironment.cs— the scripted provisioning decider becomes a decorator over the real one: the script when set for the tenant, else the inner deciderLedgerTM.Tests.Component/Cards/CardTokenProvisioningDoorTests.cs— the scripted deciders answerCardTokenProvisioningAnswer;without_a_decider…becomesan_unknown_token_is_declined_with_its_reason(F12)LedgerTM.Testing.Infrastructure/Cards/StubCardProcessor.cs—RequestRevealAsyncsrc/LedgerTM.Infrastructure.Contracts/AccessControl/PermissionCatalog.cs—cards.remove-card-credential,cards.reveal-card,// system-internal:cards.add-card-device-credentialsrc/LedgerTM.Infrastructure.Contracts/Features/FeatureCatalog.cs— undercards.issuing; no template role grantscards.reveal-cardLedgerTM.Tests.Component/Cards/CardDeviceCredentialTests.cs,CardRevealTests.cs— new
Bite 6 — the UI, the guide, the sample card, the probe
src/LedgerTM.Operations/DispatchedOperations.cs—ForCard, including remove-credential and revealsrc/LedgerTM.Cards/LedgerTM.Cards.csproj— project reference toLedgerTM.Operationssrc/LedgerTM.Cards/Application/Operations/CardOperationAvailabilityEndpoint.cs— new;GET /api/cards/{id}/operations(F2), the feature filter asCostCentreOperationAvailabilityEndpointapplies itLedgerTM.Tests.Architecture/FeatureProviderSeamTests.cs— allowlist entry for the endpointsrc/ui-apps/bank/src/features/cards/card-viewer.tsx— new; Details, Controls, Travel, Funding, Credentials panels, operations menu, Reveal actionsrc/ui-apps/bank/src/features/cards/card-issue-dialog.tsx,card-operation-dialogs.tsx,hooks/cards.ts— newsrc/ui-apps/bank/src/features/counterparties/persons/panels/person-cards-panel.tsx— new; the list and Issue cardsrc/ui-apps/bank/src/features/counterparties/shared/panel-registry.tsx— thecardspanel,requiresFeature: cards.issuingsrc/ui-apps/bank/src/app.tsx— routecards/:idunderFeatureRoute feature="cards.issuing"src/ui-apps/bank/src/lib/api.ts— the commands and readssrc/ui-apps/bank/src/__tests__/standard-table-rowhref-guard.test.ts— the new tables listeddocs/guide/features/cards.md— new;feature: cards.issuing,attach: [route:/cards/{id}, panel:cards]docs/guide/features/card-processor.md— cross-reference to cardssrc/LedgerTM.Seeding.ZaRetail.Samples/Steps/SampleData/SeedSampleCards.cs— new; simulation phase, afterSeedSimulationCardProcessor; skips when the tenant has no processor connection or the demo customer no call deposit; a second run issues nothingLedgerTM.Tests.Unit/Cards/CardOperationGuardParityTests.cs— new;DispatchedOperations.ForCard’s statuses equal the aggregate’s guards (F19)src/LedgerTM.Seeding.ZaRetail.Samples/Bootstrapper.cs— the stepsrc/ui-apps/bank/ui-review/adr-uat/flows/adr-835-server-probe.ts— new; issues a virtual and a plastic card, suspends, sets controls and a travel window, provisions a device, prints ids per scenarioLedgerTM.Tests.Component/Seeding/SampleCardsSeedTests.cs— new;SeedingComponentContext, finds the demo customer by the roster anchor’s namesrc/ui-apps/shared/src/generated/api-types.ts,permissions.generated.ts— regenerated (every bite with a new key or endpoint)
Prior art
Re-checked 2026-10-01 after the grill: no new candidate for any declared name. Two supporting
names the signatures needed, both plan-level: CardCredentialSummary (the credential as the
summary shows it, with Expired and Closed) and MirrorCardToProcessorCommand (F1). The
full table lives in the ADR.
Interfaces
// src/LedgerTM.Contracts/Cards/CardIds.cs
public readonly record struct CardId(string Value) : IStrongId<CardId>
{ public static CardId Generate() => new(StrongId.UrnFor<CardId>(Guid.NewGuid().ToString())); }
public readonly record struct CardTypeId(string Value) : IStrongId<CardTypeId>
{ public static CardTypeId FromKey(string key) => new(StrongId.SlugFor<CardTypeId>(key)); }
// src/LedgerTM.Contracts/Cards/CardValues.cs
public sealed record CardholderReference(string EmbossedName, CounterpartyId? Counterparty);
public sealed record CardFundingRule(IReadOnlyList<AccountId> Accounts);
public enum CardFundingShape { OrderedList, SingleAccount }
public enum DeviceProvisioningRule { Approve, StepUp }
public sealed record CardTravelWindow(DateOnly From, DateOnly To, IReadOnlyList<IsoCountryCode> Countries); // LedgerTM.Contracts.Countries
public enum CardRevealKind { CardDetails, Pin }
public sealed record CardRevealSession(Uri HostedView, DateTimeOffset ExpiresAt);
// src/LedgerTM.Contracts/Cards/CardCredential.cs — changed (ADR-835 D6)
public sealed record CardControls(
bool OnlineAllowed, bool InStoreAllowed, bool InStoreAbroadAllowed, bool AtmAllowed, bool ContactlessAllowed,
decimal? PerTransactionCeiling, decimal? DailyCeiling, decimal? MonthlyCeiling);
// src/LedgerTM.Contracts/Cards/CardTokenProvisioning.cs — changed (ADR-835 D7)
public sealed record CardTokenProvisioningRequest(
CardTokenProvisioningId Id, string ProcessorReference, CardTokenReference Token, string WalletProvider, string DeviceDescription,
DateTimeOffset RequestedAt, CardTokenReference? DeviceTokenReference = null);
// src/LedgerTM.Contracts/Cards/ICardTokenProvisioningDecider.cs — changed (F12)
public sealed record CardTokenProvisioningAnswer(CardTokenProvisioningDecision Decision, CardDeclineReason? Reason);
public interface ICardTokenProvisioningDecider { Task<CardTokenProvisioningAnswer> DecideAsync(CardTokenProvisioningRequest request, CancellationToken ct); }
// CardDeclineReason gains DeviceTokenMissing, DeviceTokensNotAllowed, UnknownToken.
// src/LedgerTM.Contracts/Cards/ICardProcessor.cs — changed (ADR-835 D8, F9)
Task<CardRevealSession> RequestRevealAsync(CardTokenReference token, CardRevealKind kind, CancellationToken ct = default);
public sealed record CardCreationRequest(CounterpartyId Holder, string EmbossedName, CardCredentialKind Kind, CardControls Controls,
CardId Reference, int CredentialLifeYears); // Reference is the processor's idempotency key where it takes one
// src/LedgerTM.Contracts/Cards/CardProcessorException.cs (F10)
public sealed class CardProcessorException(string code, string message) : Exception(message) { public string Code { get; } = code; }
// src/LedgerTM.Cards/Domain/Card.Events.cs — each `: DomainEvent` with [MessageIdentity("cards.<kebab-name>")] and a row in event-identity.tsv;
// frozen once shipped; On is the tenant's trading date
[MessageIdentity("cards.card-issued")] public record CardIssued(CardId Id, CounterpartyId Owner, CardholderReference Cardholder, CardTypeId Type,
CurrencyId BillingCurrency, string DisplayName, CardCredential Credential, CardControls Controls, CardFundingRule FundingRule, CardStatus Status, DateOnly On) : DomainEvent;
[MessageIdentity("cards.card-activated")] public record CardActivated(CardId Id, DateOnly On) : DomainEvent;
[MessageIdentity("cards.card-suspended")] public record CardSuspended(CardId Id, string Reason, DateOnly On) : DomainEvent;
[MessageIdentity("cards.card-reinstated")] public record CardReinstated(CardId Id, DateOnly On) : DomainEvent;
[MessageIdentity("cards.card-reported-lost-or-stolen")] public record CardReportedLostOrStolen(CardId Id, string Reason, DateOnly On) : DomainEvent;
[MessageIdentity("cards.card-reissued")] public record CardReissued(CardId Id, CardReissueKind Kind, CardCredential Credential, IReadOnlyList<CardTokenReference> ClosedTokens, CardStatus Status, DateOnly On) : DomainEvent;
[MessageIdentity("cards.card-closed")] public record CardClosed(CardId Id, string Reason, DateOnly On) : DomainEvent;
[MessageIdentity("cards.card-renamed")] public record CardRenamed(CardId Id, string DisplayName, DateOnly On) : DomainEvent;
[MessageIdentity("cards.card-controls-set")] public record CardControlsSet(CardId Id, CardControls Controls, DateOnly On) : DomainEvent;
[MessageIdentity("cards.card-travel-window-set")] public record CardTravelWindowSet(CardId Id, CardTravelWindow? Window, DateOnly On) : DomainEvent;
[MessageIdentity("cards.card-funding-rule-set")] public record CardFundingRuleSet(CardId Id, CardFundingRule FundingRule, DateOnly On) : DomainEvent;
[MessageIdentity("cards.card-device-credential-added")] public record CardDeviceCredentialAdded(CardId Id, CardTokenReference DeviceToken, string WalletProvider, string DeviceDescription, DateOnly On) : DomainEvent;
[MessageIdentity("cards.card-credential-removed")] public record CardCredentialRemoved(CardId Id, CardTokenReference Token, string Reason, DateOnly On) : DomainEvent;
[MessageIdentity("cards.card-details-revealed")] public record CardDetailsRevealed(CardId Id, CardRevealKind Kind, DateOnly On) : DomainEvent; // never the address
// src/LedgerTM.Cards/Application/Commands/*.cs (F8) — every Target is ("Card", Id.Value) except IssueCard's; POST /api/cards answers { id }, 200
[PermissionKey("cards.issue-card")]
public record IssueCardCommand(CardId Id, CounterpartyId Owner, CardholderReference Cardholder, CardTypeId Type, CurrencyId BillingCurrency,
string DisplayName, CardCredentialKind FirstCredential, CardControls? Controls, CardFundingRule FundingRule) : ICommand
{ public AuthorisationTarget Target => new("Counterparty", Owner.Value); }
// Validator refusals (400, format only): CARD_EMBOSSED_NAME_INVALID (1–26 chars of A–Z, space, hyphen, apostrophe, full stop after upper-casing;
// never empty), CARD_FIRST_CREDENTIAL_NOT_ALLOWED (a device token as first credential), CARD_DISPLAY_NAME_TOO_LONG (60; empty or
// whitespace defaults to the type's label), CARD_CONTROLS_INVALID (as for SetCardControls), CARD_TEXT_HOLDS_A_CARD_NUMBER (a display name
// or reason carrying thirteen or more digits, separators ignored). Handler refusals (422, DomainException, before the processor is
// called): CARD_ALREADY_ISSUED (the id already has a stream), CARD_TYPE_UNKNOWN, CARD_FIRST_CREDENTIAL_NOT_ALLOWED (a kind the type
// lacks), CARD_ACTIVE_CAP_REACHED (Ordered, Active and Suspended cards of the type and owner count), CARD_CARDHOLDER_MUST_BE_OWNER (a
// cardholder counterparty other than the owner on a type that forbids it; none means the owner), the funding codes CARD_FUNDING_RULE_EMPTY,
// CARD_FUNDING_RULE_DUPLICATE, CARD_FUNDING_ACCOUNT_NOT_HELD (an unknown id counts as not held), CARD_FUNDING_CURRENCY_MISMATCH,
// CARD_FUNDING_TYPE_NOT_FUNDABLE, CARD_FUNDING_SHAPE_SINGLE_ACCOUNT — each check over the whole list before the next, each naming the
// account id and, for currency, the account's currency — and CARD_PROCESSOR_REFUSED (the processor's code and message). A validator
// refusal is 400 with FluentValidation's errors body; a DomainException is 422 { code, message } (CustomExceptionHandler).
[PermissionKey("cards.activate-card")] public record ActivateCardCommand(CardId Id) : ICommand { … }
[PermissionKey("cards.suspend-card")] public record SuspendCardCommand(CardId Id, string Reason) : ICommand, INotFourEyesGated { … } // protective: delay is the risk
[PermissionKey("cards.reinstate-card")] public record ReinstateCardCommand(CardId Id) : ICommand { … }
[PermissionKey("cards.report-card-lost-or-stolen")] public record ReportCardLostOrStolenCommand(CardId Id, string Reason) : ICommand, INotFourEyesGated { … }
[PermissionKey("cards.reissue-card")] public record ReissueCardCommand(CardId Id, CardReissueKind Kind) : ICommand { … }
[PermissionKey("cards.close-card")] public record CloseCardCommand(CardId Id, string Reason) : ICommand { … }
[PermissionKey("cards.rename-card")] public record RenameCardCommand(CardId Id, string DisplayName) : ICommand { … }
[PermissionKey("cards.set-card-controls")] public record SetCardControlsCommand(CardId Id, CardControls Controls) : ICommand { … }
[PermissionKey("cards.set-card-travel-window")] public record SetCardTravelWindowCommand(CardId Id, CardTravelWindow? Window) : ICommand { … }
[PermissionKey("cards.set-card-funding-rule")] public record SetCardFundingRuleCommand(CardId Id, CardFundingRule FundingRule) : ICommand { … }
[PermissionKey("cards.remove-card-credential")] public record RemoveCardCredentialCommand(CardId Id, CardTokenReference Token, string Reason) : ICommand { … } // cascades the mirror
[PermissionKey("cards.reveal-card")] public record RevealCardCommand(CardId Id, CardRevealKind Kind) : ICommand, INotFourEyesGated { … } // POST /api/cards/{id}/reveal → CardRevealSession; CardDetailsRevealed on the stream; statuses per the status table (Ordered, Active)
// Routes: POST /api/cards/{id}/activate | suspend | reinstate | report-lost-or-stolen | reissue | close | rename | controls |
// travel-window | funding-rule | credentials/remove | reveal; each takes its whole command as the body, the id in both; 2xx on success;
// an unknown id is 404. CARD_CONTROLS_INVALID (400): a negative ceiling, or a ceiling below one declared earlier in the order
// per-transaction ≤ daily ≤ monthly, gaps skipped; zero and equal ceilings are allowed; the day is the tenant's trading date, the month its
// calendar month. CARD_TRAVEL_WINDOW_INVALID (400): from after to, to before today's trading date, an empty country list, a country that
// is not alpha-2; a window already begun is fine. Rename to empty or whitespace reads back the type's label; a reason or display name
// with thirteen or more digits is CARD_TEXT_HOLDS_A_CARD_NUMBER. The status table (F19) — the aggregate's guards and DispatchedOperations.ForCard are one table:
// activate: Ordered · suspend: Active · reinstate: Suspended · report-lost-or-stolen: Ordered, Active, Suspended
// reissue NewNumber: Active, Suspended, LostOrStolen · reissue SameNumberNewExpiry: Active (a plastic card stays Active and its plastic is ordered)
// close: every status but Closed · rename, set-controls, set-travel-window, set-funding-rule: Ordered, Active, Suspended
// remove-credential: Active, Suspended · reveal: Ordered, Active
// Anything else is CARD_STATUS_FORBIDS (422; the message names the status in enum casing and the verb), refused before the processor is
// called, so a refused reissue mints nothing. After a NewNumber reissue from Active or LostOrStolen a plastic card is Ordered and a
// virtual card Active; a Suspended card stays Suspended whatever its kind (a new number does not end a review), and a plastic one still has
// its plastic ordered. Close leaves the card's tokens in the index: the oracle resolves them and declines on status, never as unknown.
// The embossing line is ASCII A–Z: an accented letter is refused, not folded.
// CARD_CREDENTIAL_NOT_REMOVABLE (422): not a device credential, or not this card's. Removing a closed device credential is a no-op; adding
// the same open device token twice is a no-op; a removed device token that provisions again is a new credential. Lifecycle, controls, reissue and remove handlers
// return DequeueEvents() plus an outgoing MirrorCardToProcessorCommand(Id); the mirror tells every open token the current status and
// controls, and calls CloseAsync for every token the card has closed. A NewNumber reissue closes the device tokens with the old number.
[PermissionKey("cards.add-card-device-credential")] // system-internal: cascaded by the provisioning door after it commits an Approved receipt (F12)
public record AddCardDeviceCredentialCommand(CardId Id, CardTokenReference DeviceToken, string WalletProvider, string DeviceDescription) : ICommand, ISystemCommand { … }
[PermissionKey("cards.mirror-card-to-processor")] // system-internal: cascaded after commit (F1)
public record MirrorCardToProcessorCommand(CardId Id) : ICommand, ISystemCommand { … }
// src/LedgerTM.Cards/Domain/CardTypesSettings.cs — the vocabulary (ADR-422, slug-derived)
public class CardTypesSettings : Settings { public List<CardType> Types { get; set; } = []; }
public sealed class CardType
{
public CardTypeId Id { get => VocabularyKey.Pattern.IsMatch(Key ?? "") ? CardTypeId.FromKey(Key) : default; init { } } // a bad key is the validator's, never a throw
public string Key { get; set; } = "";
public string Label { get; set; } = "";
public List<CardCredentialKind> CredentialKinds { get; set; } = [];
public CardControls DefaultControls { get; set; } = new(true, true, false, true, true, null, null, null);
public CardFundingShape FundingShape { get; set; }
public List<AccountTypeId> FundableAccountTypes { get; set; } = []; // typed, as PropertyType.AllowedAccountTypes (F16)
public bool CardholderMayDifferFromOwner { get; set; }
public DeviceProvisioningRule DeviceProvisioning { get; set; } = DeviceProvisioningRule.StepUp;
public int CredentialLifeYears { get; set; } = 3;
public int? MaxActivePerOwner { get; set; }
}
// src/LedgerTM.Cards/Application/Settings/AmendCardTypes.cs — POST /api/settings/card-types
[PermissionKey("cards.amend-card-types")]
public record AmendCardTypesCommand(IReadOnlyList<CardType> Types) : ISettingsCommand<CardTypesSettings>;
// Validator (400, every row's faults in one answer): CARD_TYPE_KEY_INVALID (VocabularyKey.Pattern, no trimming), CARD_TYPE_KEY_DUPLICATE,
// CARD_TYPE_NO_CREDENTIAL_KIND, CARD_TYPE_NO_FIRST_CREDENTIAL_KIND (device token only), CARD_TYPE_NO_FUNDABLE_TYPE, CARD_TYPE_LIFE_OUT_OF_RANGE
// (1–5 inclusive), CARD_TYPE_CAP_BELOW_ONE. Handler (422): CARD_TYPE_IN_USE. Reviewable through SettingsApproverViewReader, as every settings command.
// src/LedgerTM.Cards/Application/Queries/*.cs (F8)
[PermissionKey("cards.view-card-types")] public record GetCardTypesQuery : IQuery<IReadOnlyList<CardType>>; // GET /api/settings/card-types
[PermissionKey("cards.view-cards")] public record ListCardsQuery(CounterpartyId Owner) : IQuery<IReadOnlyList<CardSummary>>; // GET /api/counterparties/{id}/cards
[PermissionKey("cards.view-card")] public record GetCardQuery(CardId Id) : IQuery<CardSummary?>; // GET /api/cards/{id}
// GET /api/cards/{id}/operations — [RequiresPermission("cards.view-card")], the engine's verdicts over DispatchedOperations.ForCard (F2)
// src/LedgerTM.Contracts/Cards/CardSummary.cs — inline documents, tenant-scoped
// A device credential shows the card's primary BIN, last four and expiry. Expiry is stored; "expired" is the reader's comparison with
// the trading date (the oracle's and the UI's), never a stored flag.
public sealed record CardCredentialSummary(CardTokenReference Token, CardCredentialKind Kind, string Bin, string LastFour, CardExpiry Expiry,
bool Closed, string? WalletProvider, string? DeviceDescription);
public sealed class CardSummary
{
public CardId Id { get; set; } public CounterpartyId Owner { get; set; } public CardholderReference Cardholder { get; set; } = null!;
public CardTypeId Type { get; set; } public CurrencyId BillingCurrency { get; set; } public string DisplayName { get; set; } = "";
public CardStatus Status { get; set; } public List<CardCredentialSummary> Credentials { get; set; } = [];
public CardControls Controls { get; set; } = null!; public CardTravelWindow? TravelWindow { get; set; }
public CardFundingRule FundingRule { get; set; } = null!; public DateOnly IssuedOn { get; set; } public DateOnly? ClosedOn { get; set; }
}
public sealed class CardByToken { public string Id { get; set; } = ""; /* the token urn */ public CardId CardId { get; set; } }
public interface ICardByTokenReader { Task<CardId?> FindAsync(CardTokenReference token, CancellationToken ct = default); }
// src/LedgerTM.Cards/Domain/Card.cs — EventSourcedAggregate; verbs Issue, Activate, Suspend, Reinstate, ReportLostOrStolen, Reissue, Close,
// Rename, SetControls, SetTravelWindow, SetFundingRule, AddDeviceCredential, RemoveCredential; every Apply public; SelfHoldingAggregate("Card").
// src/LedgerTM.Cards/Application/Authorisations/CardApproverViewReader.cs
public sealed class CardApproverViewReader() : DocumentApproverViewReader<CardSummary, CardId>("Card", typeof(CardTokenReference));
// src/LedgerTM.Cards/Application/Doors/CardTokenProvisioningDecider.cs — implements ICardTokenProvisioningDecider (ADR-820)
// Decline(UnknownToken): no card for the token. Decline(CardNotActive): status != Active. Decline(DeviceTokensNotAllowed): the type lacks
// DeviceToken. Decline(DeviceTokenMissing): the request names no device token (F14). StepUp: the type says StepUp and no receipt on this
// tenant's trading date, later than the token's last removal from this card, already answered StepUp for this device token (F15). Approve: otherwise. StepUp and Approve carry no reason; a
// decline's reason is on the receipt, the wire reply stays ADR-820's bare decision. Reads the card and the receipts through IDocumentStore
// under ICurrentUser.TenantId; writes and publishes nothing — the door cascades the credential command after its Approved receipt
// commits, and only when the token resolves to a card, so a scripted Approve for an unknown token cascades nothing (F12).
// Wire: the Paymentology provisioning body gains `deviceTokenReference` (raw reference); the first request names it too.
// src/LedgerTM.Operations/DispatchedOperations.cs
public static IReadOnlyList<OperationDefinition> ForCard { get; } // activate, suspend, reinstate, report-lost-or-stolen, reissue, close, rename,
// set-controls, set-travel-window, set-funding-rule, remove-credential, reveal — statuses per ADR-835 D12
// LedgerTM.Testing.Infrastructure/Cards/StubCardProcessor.cs (F5) — kind Paymentology; every verb answers; tenant-keyed
public sealed class StubCardProcessor : ICardProcessor
{
public void RefuseCreation(string tenantSlug, bool refuse = true); // CreateCardAsync throws CardProcessorException("PROCESSOR_SAYS_NO", "…")
public void RefuseReissue(string tenantSlug, bool refuse = true); // ReissueAsync likewise
public IReadOnlyList<StubCardProcessorCall> Calls(string tenantSlug);
public void NextExpiry(string tenantSlug, CardExpiry expiry); // the next credential minted (created or reissued) for the tenant carries this expiry
// credentials: BIN 400000, last four from a per-tenant sequence, expiry = trading date + CredentialLifeYears unless overridden;
// reveal: https://stub.invalid/reveal/{guid}, expiring ten minutes after the tenant's clock
}
public sealed record StubCardProcessorCall(string Method, CardTokenReference? Token, object? Argument); // Method = nameof(ICardProcessor.SetStatusAsync) etc.
// LedgerTM.Testing.Infrastructure/Cards/ScriptedDeciders.cs — the provisioning half decorates the real decider: script when set, else inner.
// LedgerTM.Tests.Component/Cards/CardsComponentFixture.cs (F5) — seeded per test tenant in InitializeAsync
// card types (CardholderMayDifferFromOwner false on all): debit (Plastic, DeviceToken; OrderedList; CallDeposit; cap 1; StepUp; 3y),
// virtual-debit (Virtual, DeviceToken; OrderedList; CallDeposit; no cap; StepUp; 3y), single-account (Virtual; SingleAccount; CallDeposit);
// a revealer actor group holding cards.reveal-card
protected Task UseStubProcessorAsync(); // facet kind Paymentology, the shipped host's stub
protected Task<CardSummary> IssueVirtualCardAsync(CounterpartyId owner, params AccountId[] funding); // virtual-debit, Active
protected Task<CardSummary> IssuePlasticCardAsync(CounterpartyId owner, params AccountId[] funding); // debit, Ordered
protected Task<CardSummary> ActivateAsync(CardId id);
protected HttpClient ClientAsRevealer();
protected CounterpartyId DemoCustomer { get; } protected AccountId ZarCallDeposit { get; } protected AccountId SecondZarCallDeposit { get; }
protected AccountId UsdCallDeposit { get; } protected AccountId ZarFixedDeposit { get; } // held, not fundable
protected CounterpartyId OtherCustomer { get; } protected AccountId OtherZarCallDeposit { get; }
Bites
| Bite | Description | Acceptance criterion | Status |
|---|---|---|---|
| 1 | Contract types: CardId, CardTypeId, the values, the events, the command and query records, ICardByTokenReader, CardSummary, CardByToken, the three changes to ADR-820’s types; CardTypesSettings with its validator, AmendCardTypesCommand, GetCardTypesQuery, the template rows for retail-bank, the settings page |
A card type is a vocabulary row with a derived id | Pending |
| 2 | The Card aggregate with Issue, Activate, Close; IssueCardCommand running the funding-rule check and calling the processor first; the mirror command; the two inline read models; ListCardsQuery, GetCardQuery; the approver view reader, holder and label resolvers; keys and feature binding for this bite |
A virtual card is issued active and a plastic card is issued ordered; Issuing a card is refused when the processor refuses; A plastic card is activated and a card is closed, and the processor hears both | Pending |
| 3 | Suspend, Reinstate, ReportLostOrStolen, Reissue; every status handler cascading the mirror, which tells the current status |
A suspended card is reinstated and the processor hears both; A card reported lost is reissued with a new number; An expired credential leaves the card active; Two mirrors after a suspension and a reinstatement leave the processor on Active | Pending |
| 4 | SetCardControls, SetCardTravelWindow, RenameCard, SetCardFundingRule reusing bite 2’s rule check; the mirror of controls |
A funding rule may name only accounts the owner holds, in the billing currency; A single-account card type refuses a list of two | Pending |
| 5 | CardTokenProvisioningDecider answering with a reason, the door cascading AddCardDeviceCredentialCommand, RemoveCardCredentialCommand; RequestRevealAsync on the adapter and the simulator, RevealCardCommand |
A first device steps up and the second request adds the credential; A lost phone’s credential is removed and closed at the processor; A reveal is the processor’s hosted view and never a number | Pending |
| 6 | The cards panel on the counterparty viewer, the card viewer with DispatchedOperations.ForCard driving its operations menu, the guide articles, SeedSampleCards on the simulation tenant, the probe |
The demo customer has one active virtual card on a fresh simulation tenant; A card’s operations menu offers only the verbs its status allows | Pending |
Scenarios
Feature: A card is a record of its own under the customer, and the processor is told what we decided
# Bite 1
Scenario: A card type is a vocabulary row with a derived id
Given the za-retail tenant's card types hold a row keyed debit with funding shape ordered list and fundable type CallDeposit
When an operator adds a row keyed "Travel Card"
Then the add is refused naming the key
And adding a row keyed travel-card is accepted and reads back with an id derived from that key
# Seen at: route:/settings/card-types
# Bite 2
Scenario: A virtual card is issued active and a plastic card is issued ordered
Given the demo customer holds a call deposit in ZAR and the tenant's processor is a stub that records every call
When an operator issues a virtual debit card to the customer funded from the call deposit
Then the card reads back Active with the display name given, one virtual credential showing a BIN, a last four and an expiry, and never sixteen digits
And the token the processor returned resolves to that card
When an operator issues a plastic debit card to the same customer
Then the second card reads back Ordered and the processor was asked to order plastic
And the customer's card list shows both
And issuing a second card of the plastic type, which caps at one card per owner, is refused naming the cap
# Seen at: route:/cards/{id}
# Bite 2
Scenario: Issuing a card is refused when the processor refuses
Given the tenant's processor is a stub told to refuse creation
When an operator issues a card
Then the issue is refused naming the processor's code
And the customer's card list is empty and no card exists under the id the request carried
# Seen at: none
# Bite 2
Scenario: A plastic card is activated and a card is closed, and the processor hears both
Given an ordered plastic card and an active virtual card, on the stub processor
When an operator activates the plastic card and closes the virtual card
Then the plastic card reads back Active and the virtual card Closed
And the processor was told Active for the plastic card's token and asked to close the virtual card's token
And every later command on the closed card is refused naming its status
# Seen at: route:/cards/{id}
# Bite 3
Scenario: A suspended card is reinstated and the processor hears both
Given an active virtual card on the stub processor
When an operator suspends it and then reinstates it
Then the card reads back Active with both changes in its history
And the processor was told Suspended and then Active, in that order
# Seen at: route:/cards/{id}
# Bite 3
Scenario: A card reported lost is reissued with a new number
Given an active plastic card on the stub processor
When the card is reported lost or stolen
Then it reads back LostOrStolen and the processor was told LostOrStolen
And suspending it is refused, and reissuing it with the same number is refused, and the processor was asked nothing for either
When an operator reissues it with a new number
Then it reads back Ordered with a new credential, its first credential closed, and the processor was asked to order plastic again and to close the old token
And the old token no longer resolves to the card and the new one does
# Seen at: route:/cards/{id}
# Bite 3
Scenario: An expired credential leaves the card active
Given the stub processor will mint the next credential with an expiry last month
When a virtual card is issued
Then the card reads back Active and its credential's expiry is before today's trading date
And suspending and reinstating it are accepted as for any active card
# Seen at: route:/cards/{id}
# Bite 3
Scenario: Two mirrors after a suspension and a reinstatement leave the processor on Active
Given an active virtual card on the stub processor
When the card is suspended, then reinstated, and the card's mirror to the processor is delivered once more afterwards
Then the processor's last word for the card's token is Active
# Seen at: none
# Bite 4
Scenario: A funding rule may name only accounts the owner holds, in the billing currency
Given an active debit card in ZAR on the stub processor, whose owner holds a ZAR call deposit and a USD call deposit, and another customer holds a ZAR call deposit
When an operator sets the funding rule to the owner's ZAR call deposit then the other customer's call deposit
Then the change is refused naming the account the owner does not hold
When an operator sets the funding rule to the owner's USD call deposit
Then the change is refused naming the currency
When an operator sets the funding rule to the owner's ZAR call deposit alone
Then the card reads back with that rule
And setting controls to online off, in-store abroad off, a per-transaction ceiling of 2,000.00 and a daily ceiling of 5,000.00 reads back and the processor was told
And setting a travel window of 10 to 24 October 2026 for GB and FR reads back, and clearing it reads back empty
And renaming the card reads back and the processor received no call for it
# Seen at: route:/cards/{id}
# Bite 4
Scenario: A single-account card type refuses a list of two
Given a card type whose funding shape is single account
When an operator sets a card of that type's funding rule to two accounts the owner holds
Then the change is refused naming the shape
# Seen at: none
# Bite 5
Scenario: A first device steps up and the second request adds the credential
Given an active virtual card whose type steps up a first device
When the processor asks whether the card may be provisioned to a first device, naming the device token it will mint
Then the reply is StepUp and the card has no device credential
When the processor asks again under a new provisioning reference for the same device token
Then the reply is Approve
And the card reads back with a device credential naming the wallet provider, the device and that token
And the device token resolves to the card
And asking to provision a suspended card is answered Decline naming the card as not active, where the active card was approved
And a request naming no device token is answered Decline naming the missing token
# Seen at: route:/cards/{id}
# Bite 5
Scenario: A lost phone's credential is removed and closed at the processor
Given an active virtual card with a device credential, on the stub processor
When an operator removes the device credential for a lost phone
Then the card reads back with the device credential closed and its primary credential untouched
And the device token no longer resolves to the card
And the processor was asked to close the device token
And removing the primary credential is refused
# Seen at: route:/cards/{id}
# Bite 5
Scenario: A reveal is the processor's hosted view and never a number
Given an active virtual card and a member of a group holding the reveal key, and a member without it
When the holder requests a reveal of the card's details, and then of its PIN
Then each answer is a hosted-view address with an expiry after the tenant's clock
And the card's history records both reveals, by kind and date, and never the address
And neither answer, the card's summary nor the processor's record of the card holds a run of thirteen or more digits
And the member without the key is refused
And a reveal of a closed card is refused
# Seen at: route:/cards/{id}
# Bite 6
Scenario: The demo customer has one active virtual card on a fresh simulation tenant
Given a freshly provisioned za-retail tenant with simulation enabled
When the sample data has been seeded
Then the demo customer's card list shows one active virtual debit card funded from their call deposit
And the card was issued through the same command an operator uses
# Seen at: route:/cards/{id}
# Bite 6
Scenario: A card's operations menu offers only the verbs its status allows
Given an ordered plastic card and a suspended virtual card
When an operator reads each card's available operations
Then the ordered card offers activate and close but not suspend
And the suspended card offers reinstate, report lost or stolen and close but not activate or suspend
# Seen at: route:/cards/{id}
Scenario → test
| Scenario | Bite | Project | Class | Method | Probe |
|---|---|---|---|---|---|
| A card type is a vocabulary row with a derived id | 1 | LedgerTM.Tests.Component |
CardTypesSettingsTests |
a_card_type_key_is_kebab_case_and_its_id_derives_from_it |
adr-835-server-probe.ts |
| A virtual card is issued active and a plastic card is issued ordered | 2 | LedgerTM.Tests.Component |
IssueCardTests |
a_virtual_card_is_active_on_issue_and_a_plastic_card_is_ordered |
adr-835-server-probe.ts |
| Issuing a card is refused when the processor refuses | 2 | LedgerTM.Tests.Component |
IssueCardTests |
a_processor_refusal_refuses_the_issue_and_leaves_no_card |
— refusal, nothing to look at |
| A plastic card is activated and a card is closed, and the processor hears both | 2 | LedgerTM.Tests.Component |
IssueCardTests |
activating_and_closing_reach_the_processor_and_a_closed_card_refuses_everything |
adr-835-server-probe.ts |
| A suspended card is reinstated and the processor hears both | 3 | LedgerTM.Tests.Component |
CardLifecycleTests |
a_suspended_card_is_reinstated_and_the_processor_hears_both |
adr-835-server-probe.ts |
| A card reported lost is reissued with a new number | 3 | LedgerTM.Tests.Component |
CardLifecycleTests |
a_lost_card_is_reissued_with_a_new_number_and_the_old_token_leaves_the_index |
adr-835-server-probe.ts |
| An expired credential leaves the card active | 3 | LedgerTM.Tests.Component |
CardLifecycleTests |
an_expired_credential_leaves_the_card_active |
adr-835-server-probe.ts |
| Two mirrors after a suspension and a reinstatement leave the processor on Active | 3 | LedgerTM.Tests.Component |
CardLifecycleTests |
a_second_mirror_after_reinstatement_tells_the_processor_active |
— a stub’s call log, no surface |
| A funding rule may name only accounts the owner holds, in the billing currency | 4 | LedgerTM.Tests.Component |
CardControlsAndFundingTests |
a_funding_rule_names_only_held_accounts_in_the_billing_currency |
adr-835-server-probe.ts |
| A single-account card type refuses a list of two | 4 | LedgerTM.Tests.Component |
CardControlsAndFundingTests |
a_single_account_type_refuses_two_funding_accounts |
— refusal, nothing to look at |
| A first device steps up and the second request adds the credential | 5 | LedgerTM.Tests.Component |
CardDeviceCredentialTests |
a_first_device_steps_up_and_the_second_request_adds_the_credential |
adr-835-server-probe.ts |
| A lost phone’s credential is removed and closed at the processor | 5 | LedgerTM.Tests.Component |
CardDeviceCredentialTests |
removing_a_device_credential_closes_it_at_the_processor |
adr-835-server-probe.ts |
| A reveal is the processor’s hosted view and never a number | 5 | LedgerTM.Tests.Component |
CardRevealTests |
a_reveal_is_a_hosted_view_address_and_never_a_number |
adr-835-server-probe.ts |
| The demo customer has one active virtual card on a fresh simulation tenant | 6 | LedgerTM.Tests.Component |
SampleCardsSeedTests |
the_demo_customer_has_one_active_virtual_card_after_seeding |
adr-835-server-probe.ts |
| A card’s operations menu offers only the verbs its status allows | 6 | LedgerTM.Tests.Component |
CardOperationsTests |
the_operations_offered_follow_the_cards_status |
adr-835-server-probe.ts |
UI-surface sweep
Swept src/ui-apps/bank and src/ui-apps/shared for cards., CardControls, ListCards,
GetCard, CardSummary, /cards/, card-types, AbroadAllowed: no hits outside ADR-820’s
card-processor files and the generated unions (cards in positions-cards.tsx,
staged-change-list.tsx and matrix-shape.ts is the position-card and approval-card sense,
unrelated). What this ADR adds or changes:
src/ui-apps/shared/src/generated/permissions.generated.ts— gains the seventeencards.*keys of Decision 10 (regenerated)src/ui-apps/shared/src/generated/api-types.ts— the commands, queries, documents;CardControlsreshaped (regenerated;AbroadAllowedhas no UI reader today)src/ui-apps/bank/src/app.tsx— routescards/:idandsettings/card-types, both underFeatureRoute feature="cards.issuing"src/ui-apps/bank/src/features/cards/*— new; the viewer, the issue dialog, the operation dialogs, the hookssrc/ui-apps/bank/src/features/counterparties/persons/panels/person-cards-panel.tsx— new;panel-registry.tsxgains the entrysrc/ui-apps/bank/src/features/entity-types/card-types.tsx— new;settings-class-map.tsandcategory-taxonomy.tsgain one entry eachsrc/ui-apps/bank/src/lib/api.ts— the commands and reads
No existing UI surface is deleted, renamed or repointed.
Footprint
Feature projects touched: 8 — LedgerTM.Cards, LedgerTM.Contracts, LedgerTM.Hosting, LedgerTM.Infrastructure.Contracts, LedgerTM.Operations, LedgerTM.Seeding.Provisioning, LedgerTM.Seeding.ZaRetail.Samples, ui-apps
LedgerTM.Cards— 29 changed, 0 newLedgerTM.Contracts— 9 changed, 0 newLedgerTM.Hosting— 1 changed, 0 newLedgerTM.Infrastructure.Contracts— 2 changed, 0 newLedgerTM.Operations— 1 changed, 0 newLedgerTM.Seeding.Provisioning— 2 changed, 0 newLedgerTM.Seeding.ZaRetail.Samples— 2 changed, 0 newui-apps— 12 changed, 0 new Files: 96 named, 84 code, 1 config
Contracts types: 74 named, 63 changed by this ADR
ICommand— fan-in 38, referenced (LedgerTM.Accounts, LedgerTM.Attachments, LedgerTM.Audit, LedgerTM.Authorisation, LedgerTM.BankStatements, LedgerTM.Books, LedgerTM.Cards, LedgerTM.ClientChannel, LedgerTM.Collections, LedgerTM.Compliance, LedgerTM.Contracts, LedgerTM.Correspondence, LedgerTM.Counterparties, LedgerTM.Currencies, LedgerTM.DayEnd, LedgerTM.DocumentTemplates, LedgerTM.Identifications, LedgerTM.Import, LedgerTM.Infrastructure, LedgerTM.Infrastructure.Contracts, LedgerTM.Limits, LedgerTM.Metering, LedgerTM.OperatingEntities, LedgerTM.Payments, LedgerTM.Pricing, LedgerTM.[redacted], LedgerTM.Regulatory, LedgerTM.Securities, LedgerTM.Seeding.[redacted].Conversion, LedgerTM.ServiceEnrolment, LedgerTM.Signing, LedgerTM.Statements, LedgerTM.Structures, LedgerTM.Suspense, LedgerTM.Tasks, LedgerTM.Tax, LedgerTM.Warehouse, ui-apps)CounterpartyId— fan-in 36, referenced (LedgerTM.Accounts, LedgerTM.Audit, LedgerTM.Books, LedgerTM.Cards, LedgerTM.ClientChannel, LedgerTM.Collections, LedgerTM.Compliance, LedgerTM.Contracts, LedgerTM.Correspondence, LedgerTM.Counterparties, LedgerTM.DocumentTemplates, LedgerTM.Hosting, LedgerTM.Identifications, LedgerTM.Infrastructure, LedgerTM.Infrastructure.Contracts, LedgerTM.Limits, LedgerTM.Metering, LedgerTM.OperatingEntities, LedgerTM.Operations, LedgerTM.Payments, LedgerTM.[redacted], LedgerTM.Regulatory, LedgerTM.Securities, LedgerTM.Seeding.Corporate.Samples, LedgerTM.Seeding.[redacted].Conversion, LedgerTM.Seeding.[redacted].Samples, LedgerTM.Seeding.ZaRetail.Samples, LedgerTM.ServiceEnrolment, LedgerTM.Signing, LedgerTM.Statements, LedgerTM.Suspense, LedgerTM.Tasks, LedgerTM.Tax, LedgerTM.Warehouse, _creditplus, ui-apps)CurrencyId— fan-in 34, referenced (LedgerTM.Accounts, LedgerTM.Audit, LedgerTM.Authorisation, LedgerTM.BankStatements, LedgerTM.Books, LedgerTM.Cards, LedgerTM.ClientChannel, LedgerTM.Collections, LedgerTM.Contracts, LedgerTM.Correspondence, LedgerTM.Countries, LedgerTM.Currencies, LedgerTM.DocumentTemplates, LedgerTM.Hosting, LedgerTM.Infrastructure, LedgerTM.Limits, LedgerTM.Metering, LedgerTM.OperatingEntities, LedgerTM.Payments, LedgerTM.Pricing, LedgerTM.[redacted], LedgerTM.Regulatory, LedgerTM.Securities, LedgerTM.Seeding.Corporate.Samples, LedgerTM.Seeding.Provisioning, LedgerTM.Seeding.[redacted].Conversion, LedgerTM.Seeding.[redacted].Samples, LedgerTM.Seeding.ZaRetail.Samples, LedgerTM.Statements, LedgerTM.Suspense, LedgerTM.Tax, LedgerTM.Warehouse, _creditplus, ui-apps)AccountId— fan-in 31, referenced (LedgerTM.Accounts, LedgerTM.Audit, LedgerTM.BankStatements, LedgerTM.Books, LedgerTM.ClientChannel, LedgerTM.Collections, LedgerTM.Compliance, LedgerTM.Contracts, LedgerTM.DocumentTemplates, LedgerTM.Hosting, LedgerTM.Import, LedgerTM.Infrastructure.Contracts, LedgerTM.Limits, LedgerTM.Payments, LedgerTM.Pricing, LedgerTM.[redacted], LedgerTM.Regulatory, LedgerTM.Securities, LedgerTM.Seeding.Corporate.Samples, LedgerTM.Seeding.[redacted].Conversion, LedgerTM.Seeding.[redacted].Samples, LedgerTM.Seeding.ZaRetail.Samples, LedgerTM.ServiceEnrolment, LedgerTM.Signing, LedgerTM.Statements, LedgerTM.Suspense, LedgerTM.Tasks, LedgerTM.Tax, LedgerTM.Warehouse, _creditplus, ui-apps)ISystemCommand— fan-in 30, referenced (LedgerTM.Accounts, LedgerTM.BankStatements, LedgerTM.Books, LedgerTM.Cards, LedgerTM.ClientChannel, LedgerTM.Collections, LedgerTM.Compliance, LedgerTM.Contracts, LedgerTM.Correspondence, LedgerTM.Counterparties, LedgerTM.DayEnd, LedgerTM.Identifications, LedgerTM.Identity, LedgerTM.Import, LedgerTM.Infrastructure, LedgerTM.Infrastructure.Contracts, LedgerTM.Limits, LedgerTM.Metering, LedgerTM.OperatingEntities, LedgerTM.Payments, LedgerTM.Pricing, LedgerTM.Regulatory, LedgerTM.Scheduling, LedgerTM.Seeding.[redacted].Conversion, LedgerTM.ServiceEnrolment, LedgerTM.Statements, LedgerTM.Suspense, LedgerTM.Tasks, LedgerTM.Tax, LedgerTM.Warehouse)IApproverViewReader— fan-in 28, referenced (LedgerTM.Accounts, LedgerTM.Attachments, LedgerTM.Authorisation, LedgerTM.BankStatements, LedgerTM.Books, LedgerTM.ClientChannel, LedgerTM.Collections, LedgerTM.Compliance, LedgerTM.Contracts, LedgerTM.Correspondence, LedgerTM.Counterparties, LedgerTM.DocumentTemplates, LedgerTM.Identifications, LedgerTM.Infrastructure, LedgerTM.Infrastructure.Contracts, LedgerTM.Limits, LedgerTM.Metering, LedgerTM.OperatingEntities, LedgerTM.Payments, LedgerTM.Pricing, LedgerTM.Regulatory, LedgerTM.Securities, LedgerTM.ServiceEnrolment, LedgerTM.Statements, LedgerTM.Structures, LedgerTM.Suspense, LedgerTM.Tasks, LedgerTM.Tax)SelfHoldingAggregate— fan-in 23, referenced (LedgerTM.Accounts, LedgerTM.Authorisation, LedgerTM.BankStatements, LedgerTM.Books, LedgerTM.ClientChannel, LedgerTM.Collections, LedgerTM.Compliance, LedgerTM.Correspondence, LedgerTM.Counterparties, LedgerTM.DocumentTemplates, LedgerTM.Infrastructure, LedgerTM.Infrastructure.Contracts, LedgerTM.Metering, LedgerTM.OperatingEntities, LedgerTM.Payments, LedgerTM.Pricing, LedgerTM.Regulatory, LedgerTM.Securities, LedgerTM.ServiceEnrolment, LedgerTM.Statements, LedgerTM.Structures, LedgerTM.Tasks, LedgerTM.Tax)AccountTypeId— fan-in 22, referenced (LedgerTM.Accounts, LedgerTM.Audit, LedgerTM.BankStatements, LedgerTM.Books, LedgerTM.Collections, LedgerTM.Contracts, LedgerTM.DocumentTemplates, LedgerTM.Operations, LedgerTM.Payments, LedgerTM.Pricing, LedgerTM.[redacted], LedgerTM.Regulatory, LedgerTM.Seeding.Corporate.Samples, LedgerTM.Seeding.Provisioning, LedgerTM.Seeding.[redacted].Conversion, LedgerTM.Seeding.[redacted].Samples, LedgerTM.Seeding.ZaRetail.Samples, LedgerTM.Statements, LedgerTM.Suspense, LedgerTM.Warehouse, _creditplus, ui-apps)IAccountReferenceProvider— fan-in 13, referenced (LedgerTM.Accounts, LedgerTM.BankStatements, LedgerTM.Books, LedgerTM.ClientChannel, LedgerTM.Collections, LedgerTM.Contracts, LedgerTM.DocumentTemplates, LedgerTM.Hosting, LedgerTM.Payments, LedgerTM.Pricing, LedgerTM.ServiceEnrolment, LedgerTM.Statements, LedgerTM.Suspense)ICapabilityProvider— fan-in 4, referenced (LedgerTM.Cards, LedgerTM.Hosting, LedgerTM.Infrastructure, LedgerTM.Infrastructure.Contracts)IHeldAccountsReader— fan-in 3, referenced (LedgerTM.Accounts, LedgerTM.Contracts, LedgerTM.DocumentTemplates)CardControls— fan-in 2, changed (LedgerTM.Cards, LedgerTM.Contracts)CardCreationRequest— fan-in 2, changed (LedgerTM.Cards, LedgerTM.Contracts)CardCredential— fan-in 2, changed (LedgerTM.Cards, LedgerTM.Contracts)CardDeclineReason— fan-in 2, changed (LedgerTM.Cards, LedgerTM.Contracts)CardReissueKind— fan-in 2, changed (LedgerTM.Cards, LedgerTM.Contracts)CardStatus— fan-in 2, changed (LedgerTM.Cards, LedgerTM.Contracts)CardTokenProvisioningRequest— fan-in 2, changed (LedgerTM.Cards, LedgerTM.Contracts)CardTokenReference— fan-in 2, changed (LedgerTM.Cards, LedgerTM.Contracts)ICardProcessor— fan-in 2, changed (LedgerTM.Cards, LedgerTM.Contracts)ICardTokenProvisioningDecider— fan-in 2, changed (LedgerTM.Cards, LedgerTM.Contracts)ActivateCardCommand— fan-in 0, changedAddCardDeviceCredentialCommand— fan-in 0, changedAmendCardTypesCommand— fan-in 0, changedCardActivated— fan-in 0, changedCardApproverViewReader— fan-in 0, changedCardByToken— fan-in 0, changedCardClosed— fan-in 0, changedCardControlsSet— fan-in 0, changedCardCredentialRemoved— fan-in 0, changedCardCredentialSummary— fan-in 0, changedCardDetailsRevealed— fan-in 0, changedCardDeviceCredentialAdded— fan-in 0, changedCardFundingRule— fan-in 0, changedCardFundingRuleSet— fan-in 0, changedCardFundingShape— fan-in 0, changedCardId— fan-in 0, changedCardIssued— fan-in 0, changedCardProcessorException— fan-in 0, changedCardReinstated— fan-in 0, changedCardReissued— fan-in 0, changedCardRenamed— fan-in 0, changedCardReportedLostOrStolen— fan-in 0, changedCardRevealKind— fan-in 0, changedCardRevealSession— fan-in 0, changedCardSummary— fan-in 0, changedCardSuspended— fan-in 0, changedCardTokenProvisioningAnswer— fan-in 0, changedCardTravelWindow— fan-in 0, changedCardTravelWindowSet— fan-in 0, changedCardType— fan-in 0, changedCardTypeId— fan-in 0, changedCardTypesSettings— fan-in 0, changedCardholderReference— fan-in 0, changedCloseCardCommand— fan-in 0, changedDeviceProvisioningRule— fan-in 0, changedGetCardQuery— fan-in 0, changedGetCardTypesQuery— fan-in 0, changedICardByTokenReader— fan-in 0, changedIssueCardCommand— fan-in 0, changedListCardsQuery— fan-in 0, changedMirrorCardToProcessorCommand— fan-in 0, changedReinstateCardCommand— fan-in 0, changedReissueCardCommand— fan-in 0, changedRemoveCardCredentialCommand— fan-in 0, changedRenameCardCommand— fan-in 0, changedReportCardLostOrStolenCommand— fan-in 0, changedRevealCardCommand— fan-in 0, changedSetCardControlsCommand— fan-in 0, changedSetCardFundingRuleCommand— fan-in 0, changedSetCardTravelWindowCommand— fan-in 0, changedStubCardProcessor— fan-in 0, changedStubCardProcessorCall— fan-in 0, changedSuspendCardCommand— fan-in 0, changed
Files reading each changed type: 63 types
ActivateCardCommand— 0 filesAddCardDeviceCredentialCommand— 0 filesAmendCardTypesCommand— 0 filesCardActivated— 0 filesCardApproverViewReader— 0 filesCardByToken— 0 filesCardClosed— 0 filesCardControls— 9 filesLedgerTM.Testing.Infrastructure/Cards/StubCardProcessor.csLedgerTM.Tests.Architecture/contracts-shared-surface-baseline.txtsrc/LedgerTM.Cards/Application/Processor/CardProcessorClient.cssrc/LedgerTM.Cards/Application/Processor/PaymentologyProcessor.cssrc/LedgerTM.Cards/Simulation/PaymentologySimulator.cssrc/LedgerTM.Cards/Simulation/SimulateCommands.cssrc/LedgerTM.Cards/Simulation/SimulatorCard.cssrc/LedgerTM.Contracts/Cards/CardCredential.cssrc/LedgerTM.Contracts/Cards/ICardProcessor.cs
CardControlsSet— 0 filesCardCreationRequest— 7 filesLedgerTM.Testing.Infrastructure/Cards/StubCardProcessor.csLedgerTM.Tests.Architecture/contracts-shared-surface-baseline.txtsrc/LedgerTM.Cards/Application/Processor/CardProcessorClient.cssrc/LedgerTM.Cards/Application/Processor/PaymentologyProcessor.cssrc/LedgerTM.Cards/Simulation/PaymentologySimulator.cssrc/LedgerTM.Cards/Simulation/SimulateCommands.cssrc/LedgerTM.Contracts/Cards/ICardProcessor.cs
CardCredential— 16 filesLedgerTM.Testing.Infrastructure/Cards/StubCardProcessor.csLedgerTM.Tests.Architecture/CardVocabularyTests.csLedgerTM.Tests.Architecture/NoPrimaryAccountNumberTests.csLedgerTM.Tests.Architecture/contracts-shared-surface-baseline.txtLedgerTM.Tests.Component/Cards/CardClearingTests.csLedgerTM.Tests.Component/Cards/CardProcessorClientTests.csLedgerTM.Tests.Component/Cards/CardProcessorReceiptsTests.csLedgerTM.Tests.Unit/Cards/PaymentologyOutboundMapperTests.cssrc/LedgerTM.Cards/Application/Processor/CardProcessorClient.cssrc/LedgerTM.Cards/Application/Processor/PaymentologyOutboundMapper.cssrc/LedgerTM.Cards/Application/Processor/PaymentologyProcessor.cssrc/LedgerTM.Cards/Simulation/PaymentologySimulator.cssrc/LedgerTM.Cards/Simulation/SimulateCommands.cssrc/LedgerTM.Cards/Simulation/SimulatorCard.cssrc/LedgerTM.Contracts/Cards/CardCredential.cssrc/LedgerTM.Contracts/Cards/ICardProcessor.cs
CardCredentialRemoved— 0 filesCardCredentialSummary— 0 filesCardDeclineReason— 12 filesLedgerTM.Tests.Architecture/contracts-shared-surface-baseline.txtLedgerTM.Tests.Component/Cards/CardAuthorisationDoorTests.csLedgerTM.Tests.Component/Cards/CardClearingTests.csLedgerTM.Tests.Component/Cards/CardProcessorReceiptsTests.csLedgerTM.Tests.Component/Cards/CardTokenProvisioningDoorTests.csLedgerTM.Tests.Unit/Cards/PaymentologyOutboundMapperTests.cssrc/LedgerTM.Cards/Application/Doors/DecideCardAuthorisation.cssrc/LedgerTM.Cards/Application/Doors/DecideCardTokenProvisioning.cssrc/LedgerTM.Cards/Application/Processor/PaymentologyOutboundMapper.cssrc/LedgerTM.Cards/Application/Queries/ListCardProcessorReceipts.cssrc/LedgerTM.Contracts/Cards/CardAuthorisation.cssrc/LedgerTM.Contracts/Cards/CardReceipts.cs
CardDetailsRevealed— 0 filesCardDeviceCredentialAdded— 0 filesCardFundingRule— 0 filesCardFundingRuleSet— 0 filesCardFundingShape— 0 filesCardId— 0 filesCardIssued— 0 filesCardProcessorException— 0 filesCardReinstated— 0 filesCardReissueKind— 7 filesLedgerTM.Testing.Infrastructure/Cards/StubCardProcessor.csLedgerTM.Tests.Architecture/contracts-shared-surface-baseline.txtsrc/LedgerTM.Cards/Application/Processor/CardProcessorClient.cssrc/LedgerTM.Cards/Application/Processor/PaymentologyProcessor.cssrc/LedgerTM.Cards/Simulation/PaymentologySimulator.cssrc/LedgerTM.Contracts/Cards/CardCredential.cssrc/LedgerTM.Contracts/Cards/ICardProcessor.cs
CardReissued— 0 filesCardRenamed— 0 filesCardReportedLostOrStolen— 0 filesCardRevealKind— 0 filesCardRevealSession— 0 filesCardStatus— 8 filesLedgerTM.Testing.Infrastructure/Cards/StubCardProcessor.csLedgerTM.Tests.Architecture/contracts-shared-surface-baseline.txtsrc/LedgerTM.Cards/Application/Processor/CardProcessorClient.cssrc/LedgerTM.Cards/Application/Processor/PaymentologyProcessor.cssrc/LedgerTM.Cards/Simulation/PaymentologySimulator.cssrc/LedgerTM.Cards/Simulation/SimulatorCard.cssrc/LedgerTM.Contracts/Cards/CardCredential.cssrc/LedgerTM.Contracts/Cards/ICardProcessor.cs
CardSummary— 0 filesCardSuspended— 0 filesCardTokenProvisioningAnswer— 0 filesCardTokenProvisioningRequest— 10 filesLedgerTM.Testing.Infrastructure/Cards/ScriptedDeciders.csLedgerTM.Tests.Architecture/contracts-shared-surface-baseline.txtLedgerTM.Tests.Component/Cards/CardProcessorReceiptsTests.csLedgerTM.Tests.Component/Cards/CardTokenProvisioningDoorTests.cssrc/LedgerTM.Cards/Application/Doors/DecideCardTokenProvisioning.cssrc/LedgerTM.Cards/Application/Processor/IInboundMapper.cssrc/LedgerTM.Cards/Application/Processor/PaymentologyInboundMapper.cssrc/LedgerTM.Contracts/Cards/CardReceipts.cssrc/LedgerTM.Contracts/Cards/CardTokenProvisioning.cssrc/LedgerTM.Contracts/Cards/ICardTokenProvisioningDecider.cs
CardTokenReference— 22 filesLedgerTM.Testing.Infrastructure/Cards/StubCardProcessor.csLedgerTM.Tests.Architecture/contracts-shared-surface-baseline.txtLedgerTM.Tests.Component/Cards/CardClearingTests.csLedgerTM.Tests.Component/Cards/CardProcessorClientTests.csLedgerTM.Tests.Component/Cards/CardTokenProvisioningDoorTests.csLedgerTM.Tests.Unit/Cards/PaymentologyClearingMapperTests.csLedgerTM.Tests.Unit/Cards/PaymentologyInboundMapperTests.cssrc/LedgerTM.Cards/Application/Processor/CardProcessorClient.cssrc/LedgerTM.Cards/Application/Processor/PaymentologyClearingMapper.cssrc/LedgerTM.Cards/Application/Processor/PaymentologyInboundMapper.cssrc/LedgerTM.Cards/Application/Processor/PaymentologyOutboundMapper.cssrc/LedgerTM.Cards/Application/Processor/PaymentologyProcessor.cssrc/LedgerTM.Cards/Simulation/PaymentologySimulator.cssrc/LedgerTM.Cards/Simulation/SimulateCommands.cssrc/LedgerTM.Cards/Simulation/SimulatorAuthorisation.cssrc/LedgerTM.Cards/Simulation/SimulatorCard.cssrc/LedgerTM.Contracts/Cards/CardAuthorisation.cssrc/LedgerTM.Contracts/Cards/CardClearing.cssrc/LedgerTM.Contracts/Cards/CardCredential.cssrc/LedgerTM.Contracts/Cards/CardIds.cssrc/LedgerTM.Contracts/Cards/CardTokenProvisioning.cssrc/LedgerTM.Contracts/Cards/ICardProcessor.cs
CardTravelWindow— 0 filesCardTravelWindowSet— 0 filesCardType— 0 filesCardTypeId— 0 filesCardTypesSettings— 0 filesCardholderReference— 0 filesCloseCardCommand— 0 filesDeviceProvisioningRule— 0 filesGetCardQuery— 0 filesGetCardTypesQuery— 0 filesICardByTokenReader— 0 filesICardProcessor— 9 filesLedgerTM.Testing.Infrastructure/Cards/StubCardProcessor.csLedgerTM.Testing.Infrastructure/TestingEnvironment.csLedgerTM.Tests.Architecture/CardVocabularyTests.csLedgerTM.Tests.Architecture/contracts-shared-surface-baseline.txtsrc/LedgerTM.Cards/Application/Processor/CardProcessorClient.cssrc/LedgerTM.Cards/Application/Processor/PaymentologyProcessor.cssrc/LedgerTM.Cards/Bootstrapper.cssrc/LedgerTM.Cards/Simulation/PaymentologySimulator.cssrc/LedgerTM.Contracts/Cards/ICardProcessor.cs
ICardTokenProvisioningDecider— 5 filesLedgerTM.Testing.Infrastructure/Cards/ScriptedDeciders.csLedgerTM.Testing.Infrastructure/TestingEnvironment.csLedgerTM.Tests.Architecture/contracts-shared-surface-baseline.txtsrc/LedgerTM.Cards/Application/Doors/DecideCardTokenProvisioning.cssrc/LedgerTM.Contracts/Cards/ICardTokenProvisioningDecider.cs
IssueCardCommand— 0 filesListCardsQuery— 0 filesMirrorCardToProcessorCommand— 0 filesReinstateCardCommand— 0 filesReissueCardCommand— 0 filesRemoveCardCredentialCommand— 0 filesRenameCardCommand— 0 filesReportCardLostOrStolenCommand— 0 filesRevealCardCommand— 0 filesSetCardControlsCommand— 0 filesSetCardFundingRuleCommand— 0 filesSetCardTravelWindowCommand— 0 filesStubCardProcessor— 3 filesLedgerTM.Testing.Infrastructure/Cards/StubCardProcessor.csLedgerTM.Testing.Infrastructure/TestingEnvironment.csLedgerTM.Tests.Component/Cards/CardClearingTests.cs
StubCardProcessorCall— 0 filesSuspendCardCommand— 0 files Implementations of changed types: 4ICardProcessor— 3:CardProcessorClient(src/LedgerTM.Cards/Application/Processor/CardProcessorClient.cs),PaymentologyProcessor(src/LedgerTM.Cards/Application/Processor/PaymentologyProcessor.cs),StubCardProcessor(LedgerTM.Testing.Infrastructure/Cards/StubCardProcessor.cs)ICardTokenProvisioningDecider— 1:ScriptedDeciders(LedgerTM.Testing.Infrastructure/Cards/ScriptedDeciders.cs) Files reading a touched file by path: 7LedgerTM.Operations—LedgerTM.Tests.Architecture/LayerDependencyTests.cs,LedgerTM.Tests.Architecture/LedgerTM.Tests.Architecture.csproj,LedgerTM.Tests.Architecture/string-vocabulary-references.txt,LedgerTM.Tests.Component/Books/CostCentreOperationAvailabilityTests.cs,LedgerTM.Tests.Component/LedgerTM.Tests.Component.csproj,LedgerTM.Tests.Component/Seeding/PackageImporterFolderTests.cs,LedgerTM.Tests.Unit/Accounts/Yaml/OperationDefinitionYamlConverterTests.cs,LedgerTM.Tests.Unit/Accounts/Yaml/WorkflowStepYamlConverterTests.cs,LedgerTM.Tests.Unit/Configuration/SettingsValidatorCompositionTests.cs,LedgerTM.Tests.Unit/Counterparties/CounterpartyOperationPhoneTests.cs,LedgerTM.Tests.Unit/Counterparties/CounterpartyTypeLoaderTests.cs,LedgerTM.Tests.Unit/Counterparties/OperationPropertyCoverageValidatorTests.cs,LedgerTM.Tests.Unit/Counterparties/PropertyKindBindingAddressTests.cs,LedgerTM.Tests.Unit/Counterparties/PropertyKindBindingEmailTests.cs,LedgerTM.Tests.Unit/Counterparties/PropertyKindBindingPhoneTests.cs,LedgerTM.Tests.Unit/LedgerTM.Tests.Unit.csproj,LedgerTM.Tests.Unit/OperatingEntities/OperationPropertyCoverageValidatorTests.cs,LedgerTM.Tests.Unit/Operations/DispatchedOperationGroupingTests.cs,LedgerTM.Tests.Unit/Operations/OperationBindingCoverageTests.cs,LedgerTM.Tests.Unit/Operations/OperationCoverageTests.cs,LedgerTM.Tests.Unit/Operations/OperationEngineTests.cs,LedgerTM.Tests.Unit/Operations/OperationValueDatingValidatorTests.cs,LedgerTM.Tests.Unit/Operations/PropertyKindBindingTests.cs,LedgerTM.Tests.Unit/Operations/SectionGroupDerivationTests.cs,LedgerTM.Tests.Unit/Operations/TenantTemplateOperationsRoundTripTests.cs,LedgerTM.Tests.Unit/Operations/TenantTemplateValueDatingDeclarationTests.cs,LedgerTM.Tests.Unit/Properties/DatedPropertyEditsTests.cs,LedgerTM.Tests.Unit/Properties/PropertyRoleResolverTests.cs,LedgerTM.Tests.Unit/Regulatory/DepositInsuranceConfigurationTests.cs,LedgerTM.Tests.Unit/Seeding/SoleTraderCompositionTests.cs,LedgerTM.Tests.Unit/Structures/OperationPropertyCoverageValidatorTests.cs,scripts/adr/symbol-location-baseline.txt,src/LedgerTM.Accounts/AccountRoles/Domain/AccountRole.cs,src/LedgerTM.Accounts/Application/AccountPropertyRoleResolver.cs,src/LedgerTM.Accounts/Application/Commands/ActivateAccount.cs,src/LedgerTM.Accounts/Application/Commands/InstructionSettlementStep.cs,src/LedgerTM.Accounts/Application/DayEnd/CollectionAccountResolver.cs,src/LedgerTM.Accounts/Application/DayEnd/NoticeExpiryStep.cs,src/LedgerTM.Accounts/Application/FixedDepositRollover.cs,src/LedgerTM.Accounts/Application/Integrations/CreditDisbursementOnPaymentInstructionRaised.cs,src/LedgerTM.Accounts/Application/Integrations/CreditDisbursementOnTransactionPosted.cs,src/LedgerTM.Accounts/Application/Operations/AccountGuardContextBuilder.cs,src/LedgerTM.Accounts/Application/Operations/AccountOperationResolver.cs,src/LedgerTM.Accounts/Application/Operations/OperationAvailabilityEndpoint.cs,src/LedgerTM.Accounts/Application/Operations/OperationInterpreter.cs,src/LedgerTM.Accounts/Application/Projections/ScheduledAccountTransferReadModel.cs,src/LedgerTM.Accounts/Application/Services/InstalmentLegsBuilder.cs,src/LedgerTM.Accounts/Application/Services/ProjectedCashFlowScheduleBuilder.cs,src/LedgerTM.Accounts/Application/Settings/AccountTypesSettingsValidator.cs,src/LedgerTM.Accounts/Application/Settings/CollectionAndDisbursementPropertyValidator.cs,src/LedgerTM.Accounts/Application/Settings/GetAccountTypes.cs,src/LedgerTM.Accounts/Domain/Account.Properties.cs,src/LedgerTM.Accounts/Domain/InstalmentCollectionMethodResolver.cs,src/LedgerTM.Accounts/Domain/SettlementNominationResolver.cs,src/LedgerTM.Accounts/LedgerTM.Accounts.csproj,src/LedgerTM.Accounts/Yaml/AccountTypeLoader.cs,src/LedgerTM.Accounts/Yaml/AccountTypeWriter.cs,src/LedgerTM.Books/Application/Operations/CostCentreOperationAvailabilityEndpoint.cs,src/LedgerTM.Books/LedgerTM.Books.csproj,src/LedgerTM.Counterparties/Application/Api/Counterparty/CounterpartyEndpoints.cs,src/LedgerTM.Counterparties/Application/Api/PropertyKindSchema.cs,src/LedgerTM.Counterparties/Application/Operations/ExecuteCounterpartyOperationEndpoint.cs,src/LedgerTM.Counterparties/Application/Operations/OperationAvailabilityEndpoint.cs,src/LedgerTM.Counterparties/Application/Projections/CounterpartySearchProjection.cs,src/LedgerTM.Counterparties/Application/Projections/CounterpartySummaryProjection.cs,src/LedgerTM.Counterparties/Application/Settings/CounterpartyTypesSettingsValidator.cs,src/LedgerTM.Counterparties/Application/Settings/PropertyTypeLookupValidator.cs,src/LedgerTM.Counterparties/Domain/Counterparty.cs,src/LedgerTM.Counterparties/LedgerTM.Counterparties.csproj,src/LedgerTM.Counterparties/Relationships/Application/Api/RelationshipsEndpoints.cs,src/LedgerTM.Counterparties/Relationships/Application/Commands/EstablishRelationship.cs,src/LedgerTM.Counterparties/Relationships/Domain/Relationship.cs,src/LedgerTM.Counterparties/Roles/Application/Commands/CounterpartyRolesEndpoints.cs,src/LedgerTM.Counterparties/Yaml/CounterpartyTypeLoader.cs,src/LedgerTM.Counterparties/Yaml/CounterpartyTypeWriter.cs,src/LedgerTM.DayEnd/LedgerTM.DayEnd.csproj,src/LedgerTM.OperatingEntities/Application/Operations/ExecuteOperatingEntityOperationEndpoint.cs,src/LedgerTM.OperatingEntities/Application/Operations/ExecuteOrganisationalUnitOperationEndpoint.cs,src/LedgerTM.OperatingEntities/Application/Operations/OperationAvailabilityEndpoint.cs,src/LedgerTM.OperatingEntities/Application/Operations/OrganisationalUnitOperationAvailabilityEndpoint.cs,src/LedgerTM.OperatingEntities/Application/Settings/OperatingEntityTypeValidator.cs,src/LedgerTM.OperatingEntities/Application/Settings/PropertyTypeLookupValidator.cs,src/LedgerTM.OperatingEntities/Domain/OperatingEntity.cs,src/LedgerTM.OperatingEntities/LedgerTM.OperatingEntities.csproj,src/LedgerTM.OperatingEntities/Yaml/OperatingEntityTypeLoader.cs,src/LedgerTM.OperatingEntities/Yaml/OperatingEntityTypeWriter.cs,src/LedgerTM.OperatingEntities/Yaml/OrganisationalUnitTypeLoader.cs,src/LedgerTM.OperatingEntities/Yaml/OrganisationalUnitTypeWriter.cs,src/LedgerTM.Operations/Binding/PropertyKindBinding.cs,src/LedgerTM.Operations/DispatchedOperations.cs,src/LedgerTM.Operations/LedgerTM.Operations.csproj,src/LedgerTM.Operations/OperationEngine.cs,src/LedgerTM.Operations/OperationExpressions.cs,src/LedgerTM.Operations/OperationValueDatingValidator.cs,src/LedgerTM.Operations/OperationVerdict.cs,src/LedgerTM.Operations/Properties/DatedPropertyEdits.cs,src/LedgerTM.Operations/Properties/PropertyRoleResolver.cs,src/LedgerTM.Operations/Properties/PropertyRoleValidator.cs,src/LedgerTM.Operations/ResolvedOperation.cs,src/LedgerTM.Operations/SectionGroupDerivation.cs,src/LedgerTM.Operations/Yaml/DocumentTypeIdYamlConverter.cs,src/LedgerTM.Operations/Yaml/NumberingSchemeIdYamlConverter.cs,src/LedgerTM.Operations/Yaml/OperationDefinitionYamlConverter.cs,src/LedgerTM.Operations/Yaml/WorkflowStepYamlConverter.cs,src/LedgerTM.Seeding.Provisioning/LedgerTM.Seeding.Provisioning.csproj,src/LedgerTM.Seeding.Provisioning/PackageImporter.cs,src/LedgerTM.Structures/Application/Operations/ExecuteStructureOperationEndpoint.cs,src/LedgerTM.Structures/Application/Operations/StructureOperationAvailabilityEndpoint.cs,src/LedgerTM.Structures/Application/Settings/StructureLookupReferenceValidator.cs,src/LedgerTM.Structures/Application/Settings/StructureTypeSettingsValidator.cs,src/LedgerTM.Structures/Domain/Structure.cs,src/LedgerTM.Structures/LedgerTM.Structures.csproj,src/LedgerTM.Structures/Yaml/StructureTypeLoader.cs,src/LedgerTM.Structures/Yaml/StructureTypeWriter.csLedgerTM.Testing.Infrastructure/TestingEnvironment.cs—LedgerTM.Tests.Component/Import/TransactionsImportComponentContext.csLedgerTM.Tests.Architecture—LedgerTM.Tests.Architecture/AccountTranslatorCoverageTests.cs,LedgerTM.Tests.Architecture/AggregateConventionsTests.cs,LedgerTM.Tests.Architecture/AggregateLoadingTests.cs,LedgerTM.Tests.Architecture/ApprovalRuleActions.cs,LedgerTM.Tests.Architecture/ApprovalRuleCoverageReportTests.cs,LedgerTM.Tests.Architecture/AssemblyScanner.cs,LedgerTM.Tests.Architecture/AssemblyScannerTests.cs,LedgerTM.Tests.Architecture/BootstrapperLifetimeTests.cs,LedgerTM.Tests.Architecture/CardVocabularyTests.cs,LedgerTM.Tests.Architecture/CascadedMoneyMoveTests.cs,LedgerTM.Tests.Architecture/CecilWalk.CallGraph.cs,LedgerTM.Tests.Architecture/CecilWalk.cs,LedgerTM.Tests.Architecture/CecilWalkTests.cs,LedgerTM.Tests.Architecture/ChannelCatalogTests.cs,LedgerTM.Tests.Architecture/ChannelConfinementTests.cs,LedgerTM.Tests.Architecture/ChannelNarrowingReadTests.cs,LedgerTM.Tests.Architecture/CommandConventionsTests.cs,LedgerTM.Tests.Architecture/ContractsClassificationPinTests.cs,LedgerTM.Tests.Architecture/ContractsSharedSurfaceTests.cs,LedgerTM.Tests.Architecture/CountryPostalCodeDriftTests.cs,LedgerTM.Tests.Architecture/DatedPropertyReadConventionsTests.cs,LedgerTM.Tests.Architecture/DenormalisedReferenceReadTests.cs,LedgerTM.Tests.Architecture/DisplayNameLiteralTests.cs,LedgerTM.Tests.Architecture/DraftCreationIsNotCountersignedTests.cs,LedgerTM.Tests.Architecture/DuplicateTypeNameTests.cs,LedgerTM.Tests.Architecture/EligibleActionCatalogTests.cs,LedgerTM.Tests.Architecture/EndpointConventionsTests.cs,LedgerTM.Tests.Architecture/EvaluationContextConstructionSiteTests.cs,LedgerTM.Tests.Architecture/EventIdentityManifestBijectionTests.cs,LedgerTM.Tests.Architecture/EventIdentityMessageIdentityTests.cs,LedgerTM.Tests.Architecture/ExternallyAuthenticatedCommandTests.cs,LedgerTM.Tests.Architecture/FeatureCatalogTests.cs,LedgerTM.Tests.Architecture/FeatureProviderSeamTests.cs,LedgerTM.Tests.Architecture/FeatureSurfaceCoverageReportTests.cs,LedgerTM.Tests.Architecture/Fixtures/CascadedMoneyMove/PlantedSplitHandler.cs,LedgerTM.Tests.Architecture/Fixtures/GuardParity/PlantedApplyPathParityAppliers.cs,LedgerTM.Tests.Architecture/Fixtures/GuardParity/PlantedGuardAppliers.cs,LedgerTM.Tests.Architecture/Fixtures/GuardParity/PlantedGuardParityAppliers.cs,LedgerTM.Tests.Architecture/Fixtures/LensParticipation/PlantedAppliers.cs,LedgerTM.Tests.Architecture/ForwardedEventSingleHandlerTests.cs,LedgerTM.Tests.Architecture/GuideCoverageReportTests.cs,LedgerTM.Tests.Architecture/HandlerConventionsTests.cs,LedgerTM.Tests.Architecture/HandlerDiscoveryReportTests.cs,LedgerTM.Tests.Architecture/HandlerDiscoveryShapeTests.cs,LedgerTM.Tests.Architecture/HandlerDiscoveryWalker.cs,LedgerTM.Tests.Architecture/HolderCoverageTests.cs,LedgerTM.Tests.Architecture/HttpEndpointTests.cs,LedgerTM.Tests.Architecture/IdConventionsTests.cs,LedgerTM.Tests.Architecture/IdentificationFourEyesTests.cs,LedgerTM.Tests.Architecture/IdentityFrameScopeTests.cs,LedgerTM.Tests.Architecture/IntegrationEventRootTests.cs,LedgerTM.Tests.Architecture/IntegrationTriggerRootTests.cs,LedgerTM.Tests.Architecture/LayerDependencyTests.cs,LedgerTM.Tests.Architecture/LoadedAssemblyDerivationTests.cs,LedgerTM.Tests.Architecture/MarkerBindingTests.cs,LedgerTM.Tests.Architecture/MarkerClassificationTests.cs,LedgerTM.Tests.Architecture/MartenTenancyTests.cs,LedgerTM.Tests.Architecture/MessageRoutingCatalogTests.cs,LedgerTM.Tests.Architecture/MiddlewareRegistrationTests.cs,LedgerTM.Tests.Architecture/MigrationIsolationTests.cs,LedgerTM.Tests.Architecture/NoPrimaryAccountNumberTests.cs,LedgerTM.Tests.Architecture/OperatingEntityRegistrationGateSiteTests.cs,LedgerTM.Tests.Architecture/OwnedReadModelReaderTests.cs,LedgerTM.Tests.Architecture/PackageConformanceTests.cs,LedgerTM.Tests.Architecture/PermissionCatalogTests.cs,LedgerTM.Tests.Architecture/PermissionCheckConfinementTests.cs,LedgerTM.Tests.Architecture/PermissionKeyLiteralTests.cs,LedgerTM.Tests.Architecture/PlatformStoreTests.cs,LedgerTM.Tests.Architecture/PresetTemplates.cs,LedgerTM.Tests.Architecture/Pricing/DatedLookupDefaultTests.cs,LedgerTM.Tests.Architecture/PrimaryAccountNumberWalker.cs,LedgerTM.Tests.Architecture/ProductPackageNamesNoCountryTests.cs,LedgerTM.Tests.Architecture/QueryRawEventDataOnlyBanTests.cs,LedgerTM.Tests.Architecture/RawSqlTenancyTests.cs,LedgerTM.Tests.Architecture/RecordedChangeTransactionTests.cs,LedgerTM.Tests.Architecture/RegulatoryLimitEnforcementSiteTests.cs,LedgerTM.Tests.Architecture/ReplaySafetyTests.cs,LedgerTM.Tests.Architecture/ResolvedRateReadConventionsTests.cs,LedgerTM.Tests.Architecture/RetiredEnvironmentKeyTests.cs,LedgerTM.Tests.Architecture/ReturnValueCensusTests.cs,LedgerTM.Tests.Architecture/ReviewabilityTests.IdResolution.cs,LedgerTM.Tests.Architecture/ReviewabilityTests.NewSliceTemplate.cs,LedgerTM.Tests.Architecture/ReviewabilityTests.ProjectorCoverage.cs,LedgerTM.Tests.Architecture/ReviewabilityTests.ReaderRegistrations.cs,LedgerTM.Tests.Architecture/ReviewabilityTests.Sweep.cs,LedgerTM.Tests.Architecture/ReviewabilityTests.cs,LedgerTM.Tests.Architecture/SampleStepsNameNoCountryTests.cs,LedgerTM.Tests.Architecture/SeededApprovalRuleActionTests.cs,LedgerTM.Tests.Architecture/SeededVocabularyKeyConformanceTests.cs,LedgerTM.Tests.Architecture/SessionAcquisitionConfinementTests.cs,LedgerTM.Tests.Architecture/SettingsCommandConventionsTests.cs,LedgerTM.Tests.Architecture/StaticStateDisciplineTests.cs,LedgerTM.Tests.Architecture/StoredCopyRefreshTests.cs,LedgerTM.Tests.Architecture/StoredShapeFidelityTests.cs,LedgerTM.Tests.Architecture/StoredShapeGateTests.cs,LedgerTM.Tests.Architecture/StoredShapeOwnershipTests.cs,LedgerTM.Tests.Architecture/StreamApplierGuardParityTests.ApplyPathParity.cs,LedgerTM.Tests.Architecture/StreamApplierGuardParityTests.Criterion.cs,LedgerTM.Tests.Architecture/StreamApplierGuardParityTests.GuardParity.cs,LedgerTM.Tests.Architecture/StreamApplierGuardParityTests.RefusalGraph.cs,LedgerTM.Tests.Architecture/StreamApplierGuardParityTests.Walk.cs,LedgerTM.Tests.Architecture/StreamApplierGuardParityTests.cs,LedgerTM.Tests.Architecture/StringVocabularyReferenceTests.cs,LedgerTM.Tests.Architecture/StrongIdConstructionTests.cs,LedgerTM.Tests.Architecture/StudioCountersignSeamTests.cs,LedgerTM.Tests.Architecture/TaxResidencyFourEyesTests.cs,LedgerTM.Tests.Architecture/TenantModuleReferenceTests.cs,LedgerTM.Tests.Architecture/TenantSettingsFolderTests.cs,LedgerTM.Tests.Architecture/TestWaitDisciplineTests.cs,LedgerTM.Tests.Architecture/TransactionPostedConstructionSiteTests.cs,LedgerTM.Tests.Architecture/UnitOfWorkTests.cs,LedgerTM.Tests.Architecture/ValueDatedEventConventionTests.cs,LedgerTM.Tests.Architecture/Violations.cs,LedgerTM.Tests.Architecture/VocabularyKeyPatternCoverageTests.cs,LedgerTM.Tests.Architecture/VocabularyReferenceTypingTests.cs,LedgerTM.Tests.Architecture/VocabularyRegistry.cs,LedgerTM.Tests.Architecture/VocabularyRowIdTests.cs,LedgerTM.Tests.Architecture/WellKnownNumberingSchemeSeedTests.cs,LedgerTM.Tests.Architecture/string-vocabulary-references.txt,LedgerTM.Tests.Component/Authorisation/DerivedApplierTests.cs,LedgerTM.Tests.Component/Authorisation/RegisteredReaderTests.cs,scripts/adr/prior_art.py,scripts/gate-run.test.sh,scripts/ltm-land.sh,src/ui-apps/bank/ui-review/adr-uat/matrix-adr-263.jsonVocabularyKey.Pattern—LedgerTM.Tests.Architecture/SeededVocabularyKeyConformanceTests.cs,LedgerTM.Tests.Architecture/VocabularyKeyPatternCoverageTests.cs,LedgerTM.Tests.Component/Collections/CollectionsVocabularyKeyTests.cs,LedgerTM.Tests.Component/Compliance/ComplianceRegimeProvisioningTests.cs,LedgerTM.Tests.Component/Compliance/ComplianceRegimeSettingsTests.cs,LedgerTM.Tests.Component/Compliance/ThresholdRuleSettingsTests.cs,LedgerTM.Tests.Component/Connectivity/InstitutionConnectionProvisioningTests.cs,LedgerTM.Tests.Component/Connectivity/InstitutionConnectionSettingsTests.cs,LedgerTM.Tests.Component/Correspondence/CorrespondenceTypeTests.cs,LedgerTM.Tests.Component/Correspondence/SmsGatewayTests.cs,LedgerTM.Tests.Component/Correspondence/WhatsAppGatewayTests.cs,LedgerTM.Tests.Component/MarketData/FeedSettingsTests.cs,LedgerTM.Tests.Component/MarketData/MarketDataProvisioningTests.cs,LedgerTM.Tests.Component/OperatingEntities/OrganisationalUnitTypeImportTests.cs,LedgerTM.Tests.Component/ServiceEnrolment/AddServiceTests.cs,LedgerTM.Tests.Component/Settings/NumberingSchemeSettingsTests.cs,LedgerTM.Tests.Component/Suspense/SuspensePurposeTests.cs,LedgerTM.Tests.Component/Suspense/SuspensePurposeUnhappyPathTests.cs,LedgerTM.Tests.Unit/Compliance/Clearances/ComplianceRegimeIdTests.cs,LedgerTM.Tests.Unit/Infrastructure/Configuration/VocabularyIdDerivationTests.cs,LedgerTM.Tests.Unit/Pricing/PriceTypeIdentityTests.cs,src/LedgerTM.Accounts/Domain/AccountTypeScopedIds.cs,src/LedgerTM.Accounts/Domain/RateStructureId.cs,src/LedgerTM.Collections/CollectionCases/Application/Settings/HoldStatuses/AddHoldStatus.cs,src/LedgerTM.Collections/CollectionCases/Application/Settings/HoldStatuses/EditHoldStatus.cs,src/LedgerTM.Collections/CollectionCases/Application/Settings/OutcomeCodes/AddOutcomeCode.cs,src/LedgerTM.Collections/CollectionCases/Application/Settings/OutcomeCodes/EditOutcomeCode.cs,src/LedgerTM.Compliance/Clearances/Application/Settings/AddComplianceRegime.cs,src/LedgerTM.Compliance/Clearances/Application/Settings/AddEvidenceDocumentType.cs,src/LedgerTM.Compliance/Clearances/Application/Settings/AddEvidenceRequirement.cs,src/LedgerTM.Compliance/Clearances/Application/Settings/AddThresholdRule.cs,src/LedgerTM.Compliance/Clearances/Application/Settings/EditComplianceRegime.cs,src/LedgerTM.Compliance/Clearances/Application/Settings/EditThresholdRule.cs,src/LedgerTM.Compliance/Clearances/Application/Settings/RemoveThresholdRule.cs,src/LedgerTM.Contracts/Accounts/AccountTypeScopedIds.cs,src/LedgerTM.Contracts/Pricing/PriceLists/PriceTypeId.cs,src/LedgerTM.Contracts/Warehouse/TimeBandProfileId.cs,src/LedgerTM.Correspondence/Application/Settings/CorrespondenceTypeCommands.cs,src/LedgerTM.Correspondence/Channels/Email/EmailGatewayCommands.cs,src/LedgerTM.Correspondence/Channels/Sms/SmsGatewayCommands.cs,src/LedgerTM.Correspondence/Channels/WhatsApp/WhatsAppGatewayCommands.cs,src/LedgerTM.DocumentTemplates/Application/Commands/AddSnippet.cs,src/LedgerTM.DocumentTemplates/Application/Settings/DocumentTypeCommands.cs,src/LedgerTM.DocumentTemplates/Application/Settings/TemplateAssetCommands.cs,src/LedgerTM.Infrastructure.Contracts/IStrongId.cs,src/LedgerTM.Infrastructure/Connectivity/Application/Settings/AddInstitutionConnection.cs,src/LedgerTM.Infrastructure/Number/Application/Settings/NumberingSchemeCommands.cs,src/LedgerTM.MarketData/Application/Settings/FeedLayoutRowValidator.cs,src/LedgerTM.Metering/Application/Settings/AddChargeableMetric.cs,src/LedgerTM.OperatingEntities/Application/Settings/CreateOrganisationalUnitType.cs,src/LedgerTM.OperatingEntities/Application/Settings/OrganisationalUnitTypeValidator.cs,src/LedgerTM.OperatingEntities/Application/Settings/UpdateOrganisationalUnitType.cs,src/LedgerTM.Payments/Submissions/Application/Settings/AddChannelParticipant.cs,src/LedgerTM.Pricing/PriceLists/Application/Settings/PriceTypes/AddPriceType.cs,src/LedgerTM.Pricing/PriceLists/Application/Settings/PriceTypes/EditPriceType.cs,src/LedgerTM.ServiceEnrolment/Application/Settings/AddService.cs,src/LedgerTM.Suspense/Application/Settings/SetSuspensePurposes.cs,src/ui-apps/bank/src/features/settings/forms/price-type-options.tscards.issuing—LedgerTM.Tests.Component/Cards/CardAuthorisationDoorTests.cs,LedgerTM.Tests.Component/Cards/CardClearingTests.cs,LedgerTM.Tests.Component/Cards/CardProcessorReceiptsTests.cs,LedgerTM.Tests.Component/Cards/CardProcessorSettingsTests.cs,src/LedgerTM.Cards/Application/DayEnd/CardClearingSteps.cs,src/LedgerTM.Infrastructure.Contracts/Features/FeatureCatalog.cs,src/LedgerTM.Seeding.Provisioning/tenant-templates/packages/retail-bank/FeatureSettings.yaml,src/ui-apps/bank/src/app.tsx,src/ui-apps/bank/src/features/settings/category-taxonomy.tspermissions.generated.ts—LedgerTM.Tests.Component/Books/ListUndeclaredPostingRulesTests.cs,src/ui-apps/shared/scripts/generate-permissions.mjssrc/ui-apps/bank/src/lib/api.ts—LedgerTM.Tests.Component/Books/CostCentreOperationAvailabilityTests.cs,src/LedgerTM.Accounts/Application/Queries/GetAccountDetail.cs
Domain events touched: 14 — CardActivated, CardClosed, CardControlsSet, CardCredentialRemoved, CardDetailsRevealed, CardDeviceCredentialAdded, CardFundingRuleSet, CardIssued, CardReinstated, CardReissued, CardRenamed, CardReportedLostOrStolen, CardSuspended, CardTravelWindowSet Aggregates touched: 0
Methods at CRAP 30+ in changed files: 0 (unit coverage, cached at main d0ec6de46)
Permission keys to add: 22 — activate-card, add-card-device-credential, amend-card-types, close-card, i, i-system, issue-card, reinstate-card, reissue-card, remove-card-credential, rename-card, report-card-lost-or-stolen, set-card-controls, set-card-funding-rule, set-card-travel-window, suspend-card, card-reveal-session, card-summary, get-card-query, get-card-types-query, list-cards-query, reveal-card
Warnings
- A domain event is touched — set
reseed: trueand say so in the plan. - 8 feature projects touched — say why this is not two ADRs.
At land: 108 files touched, 99 predicted, 36 unplanned. LedgerTM.Tests.Architecture/CardVocabularyTests.cs, LedgerTM.Tests.Architecture/MessageRoutingCatalogTests.cs, LedgerTM.Tests.Architecture/SessionAcquisitionConfinementTests.cs, LedgerTM.Tests.Architecture/ShapeGate/stored-shapes.tsv, LedgerTM.Tests.Architecture/TenantSettingsFolderTests.cs, LedgerTM.Tests.Architecture/contracts-shared-surface-baseline.txt, LedgerTM.Tests.Component/Cards/CardClearingTests.cs, LedgerTM.Tests.Component/Cards/CardOperationsTests.cs, LedgerTM.Tests.Unit/Cards/PaymentologyInboundMapperTests.cs, LedgerTM.Tests.Unit/Seeding/preset-snapshots.txt, src/LedgerTM.Api/Diagnostics/CardNumberRedaction.cs, src/LedgerTM.Cards/Application/Commands/CardHandling.cs, src/LedgerTM.Cards/Application/Commands/CloseCard.cs, src/LedgerTM.Cards/Application/Commands/ReinstateCard.cs, src/LedgerTM.Cards/Application/Commands/ReissueCard.cs, src/LedgerTM.Cards/Application/Commands/RemoveCardCredential.cs, src/LedgerTM.Cards/Application/Commands/RenameCard.cs, src/LedgerTM.Cards/Application/Commands/ReportCardLostOrStolen.cs, src/LedgerTM.Cards/Application/Commands/SetCardFundingRule.cs, src/LedgerTM.Cards/Application/Commands/SetCardTravelWindow.cs, src/LedgerTM.Cards/Application/Processor/CardProcessorCalls.cs, src/LedgerTM.Cards/Application/Processor/CardProcessorClient.cs, src/LedgerTM.Cards/Application/Queries/GetCard.cs, src/LedgerTM.Cards/Domain/CardRules.cs, src/LedgerTM.Cards/Simulation/SimulateCommands.cs, src/LedgerTM.Seeding.Provisioning/PackageModel.cs, src/LedgerTM.Seeding.Provisioning/tenant-templates/packages/investment-house/CounterpartyTypesSettings.yaml, src/LedgerTM.Seeding.Provisioning/tenant-templates/packages/microlender/CounterpartyTypesSettings.yaml, src/LedgerTM.Seeding.Provisioning/tenant-templates/packages/personal-lender/CounterpartyTypesSettings.yaml, src/LedgerTM.Seeding.Provisioning/tenant-templates/packages/retail-bank/CounterpartyTypesSettings.yaml, src/ui-apps/bank/src/__tests__/features/counterparties/shared/counterparty-rail-groups.test.ts, src/ui-apps/bank/src/features/cards/card-operation-dialogs.tsx, src/ui-apps/bank/src/features/cards/hooks/card-types.ts, src/ui-apps/bank/src/features/cards/hooks/cards.ts, src/ui-apps/bank/src/features/counterparties/shared/counterparty-viewer.tsx, tools/LedgerTM.ShapeSnapshot/SyntheticInstanceFactory.cs
Land batches
One land — the whole ADR. Reseed at the land (reseed: true: the card type rows, the
permission keys, the sample card). The oracle ADR and the current account ADR land after this
one, each in its own lane; those are dependencies between lands, not a reason to split this.
Notes
- Depends on ADR-820 (Shipped) only. Nothing waits on the oracle or the current account.
- Handlers do their lookups in their own tenant-scoped session, validators only format. A
validator’s
IQuerySessionis untenanted under a seed step (ADR-719), and the seed issues the sample card through the real command. - The processor is called inside the issue handler, before commit. A
CardProcessorExceptionrefuses the command with the processor’s reason; a timeout refuses too. The adapter passes theCardIdas the processor’s idempotency reference where the Companion surface takes one. - The mirror is a cascade (F1). Every status, controls and reissue handler returns its events
and an outgoing
MirrorCardToProcessorCommand; the handler readsCardSummaryat handling time and tells the processor the current status and controls, so out-of-order delivery converges. It never rolls the ledger back. - Funding-rule validation runs at issue and at every change, through
IHeldAccountsReader(what “held” means is ADR-327’s) andIAccountReferenceProvider(currency and type), against the card type row’s fundable types and shape. - The decider writes and publishes nothing (ADR-820 D5); the door cascades the
device-credential command only after its
Approvedreceipt commits, so an answer that misses the budget records nothing (F12). The shipped host’sScriptedDecidersanswers only when a script is set for the tenant; otherwise the real decider runs, so ADR-820’s door tests keep their scripts and this ADR’s tests use none. - Refusal statuses are the host’s: 400 for a validator, 422 for a
DomainException(F18). - The status table is one table (F19), proven by
CardOperationGuardParityTests. - Reveal is a command so the stream carries who revealed what and when; it is
INotFourEyesGatedbecause a session expires in minutes. The request record redacts the address. Suspend and Report lost or stolen areINotFourEyesGatedas protective acts; every other verb is eligible and the tenant’s rules decide. - No template role grants
cards.reveal-card; the reveal test grants it to a test member. The simulator’s hosted view is a simulator address with placeholders, never digits. CardControlsis reshaped, not versioned. The only stored copies are the simulator’s records on simulation tenants, wiped at reseed, and the processor facet holds none.NoPrimaryAccountNumberTestswalks every new type.- Reachability. Every endpoint and handler here is dispatched by its bite’s component test
over HTTP (activate and close in bite 2, remove-credential and reveal in bite 5, the
operations read in bite 6); the two system commands are dispatched by the bus inside those
tests; the seed step runs through
SampleCardsSeedTests. - The card viewer opens on Details (operator stance), with the operations menu read from
/api/cards/{id}/operations. - The UI half of the seed scenario (the cards panel, the viewer opening on Details) is the probe’s and UAT’s; the component test proves the list.
- The processor is not told the travel window (F20); its stand-in may decline what we would allow. The oracle answers first; the gap is the ADR’s.
- “Never a number” is a regex
\d{13,19}over the raw HTTP bodies of the card reads and the reveal, and over the stub’s and simulator’s records of the card. - The current account ADR later adds
CurrentAccountto the seeded debit type’s fundable types: a template edit plus a migration step for provisioned tenants.
Changed during the plan grill
Phase A (27 questions), the plan grill (15 points) and phase B (six authors), 2026-10-01. The ADR’s own section carries
the decision-level changes; what the plan changed on its own: tests run on a tenant-keyed stub
processor with a call log (the simulator shows nothing of the mirror); commands, queries and
events moved into LedgerTM.Cards; CardCreationRequest carries the card id and the credential
life; the mirror is a cascaded system command; the funding check is bite 2’s; the operations
endpoint, its project reference and its seam-test allowlist are listed; the feature-catalog path
corrected; NextExpiry on the stub; CardProcessorException added; F4, F6, F7 and F8 withdrawn
or corrected as F12–F17 say. Phase B: refusal statuses as the host maps them (F18), one status
table with a parity test (F19), the travel window not mirrored (F20), IsoCountryCode’s JSON
converter (F21), a re-sent issue refused before the processor is called, the free-text
card-number guard, duplicate funding entries refused, three more vocabulary refusals, the fixture’s
extra accounts, RefuseReissue, the seed’s skips, and the door cascading only for a known card.
Landing notes
(appended by /ltm-partition and by lanes)
- Decided: bite 1 declares every command, query, permission key and
DispatchedOperations.ForCard, and registers the card’s approver view reader, holder and label resolvers · rests on: ADR-692 (bite 1 creates the types later bites’ tests compile against) and PermissionCatalogTests/ReviewabilityTests failing a command with no key or reader · wrong if: a later bite’s commit adds acards.*catalog key. - Decided:
CardsComponentContextseeds the card customers for every cards test exceptCardClearingTests, which opts out · rests on: a day-end run walks every seeded account, and the clearing test asserts a run with no failed step · wrong if:CardClearingTests.a_file_not_yet_published_is_no_batch_and_is_fetched_on_a_later_rungoes red. - Decided: the authored
IssueCardTestsbuilds its Luhn-valid card numbers at run time ("4000" + "0000" + …), no assertion changed · rests on: ADR-820 D9’sNoPrimaryAccountNumberTestsscanning the cards fixtures, as ADR-820’s own tests do · wrong if:docs/adr/ADR-835-tests/bite-2.cs.txtis not replaced by the lane’s copy at land. - Decided: three new decline reasons map to ISO 8583 codes 14 (
UnknownToken), 58 (DeviceTokensNotAllowed) and 30 (DeviceTokenMissing) · rests on: the adapter’s every-reason table test (ADR-820) · wrong if: Paymentology’s provisioning reply needs a different code set. - Decided: the simulator’s provisioning names a deterministic device token per card and wallet unless the simulate command names one · rests on: Decision 7 (a request names the device token; a repeat the same day passes step-up) · wrong if: a simulated second request still steps up.
- Decided: the shape snapshot tool learns
IsoCountryCode(sample “ZA”), since its constructor refuses “sample” · rests on:StoredShapeGateTestsgatingCardTravelWindowSet· wrong if: the gate reports the event’s shape as ungated. - Decided: a card verb’s handler publishes
MirrorCardToProcessorCommandthrough the handler’s outboxedIMessageBusand returns its events, rather than returning(Events, OutgoingMessages)· rests on: F1 (a cascaded system command after commit) and ADR-780 D9 (the four-eyes gate derives an applier only from a handler returning events, and runs any other handler whole after an approved batch, mirror included) · wrong if: an approved four-eyes card verb leaves the processor untold. - Decided: the authored
IssueCardTests.ShouldBeRefusedAsyncasserts the body names its values only when it is given some · rests on: AwesomeAssertions throwing onContainAll()of nothing, which reddened eight refusals the scenario passes · wrong if: the bite-2 tests file is not replaced by the lane’s copy at land. - Decided:
MirrorCardToProcessorCommandis routed Durable · rests on: ADR-245 D7 and Decision 4 (a mirror failure retries and dead-letters, never lost) · wrong if:MessageRoutingCatalogTestsnames it. - Decided: a travel window ending before the trading date is refused by the aggregate (422), its shape by the validator (400) · rests on: F18 (lookups and dated rules are the handler’s; a validator’s session is untenanted under a seed step) · wrong if: the UI needs a 400 for a past window.
- Decided:
IsoCountryCode’s converter answers a malformed code with aJsonException, so the host answers 400 · rests on: F21 and the host reading a converter’s own exception as a server fault (500) · wrong if:a_malformed_country_over_the_wire_is_a_client_refusalgoes red. - Decided: step-up matches a StepUp receipt on today’s trading date for the same device token, without the “after the token’s last removal” clause · rests on: Decision 7, and receipts carrying the door’s clock while removals carry only a trading date, so no ordering between them exists to read · wrong if: a device removed and re-provisioned on one trading date approves without a fresh step-up and the operator wants one.
- Decided: the test host’s provisioning decider is the tenant’s script when one is set, else the card decider; ADR-820’s
without_a_decider…door test becomesan_unknown_token_is_declined_with_its_reason· rests on: F12 and the plan’s ScriptedDeciders note · wrong if: an ADR-820 door test that sets no script goes red. - Decided:
AddCardDeviceCredentialCommandHandlerstays off the reachability baseline: the provisioning door cascades it inCardDeviceCredentialTests, whichreach-lane.shcannot see by name · rests on: ADR-322 D2 (the gate records real dispatches) · wrong if: the land gate names it undispatched. - Decided: the Person type lists the
cardspanel in all four retail-family packages (retail-bank, investment-house, microlender, personal-lender), shown only wherecards.issuingis on · rests on: ADR-789 D8 (a row the packages share is identical in each) and Decision 11 · wrong if: a tenant without card issuing shows a Cards panel. - Decided: the card viewer draws its own verb buttons and dialogs from
/api/cards/{id}/operationsrather than joining the shared dispatched-dialog registry · rests on: Decision 12 (availability is the server’s) and every card dialog needing the card’s summary, which the registry’s id-only props do not carry · wrong if: the command palette must launch a card verb. - Decided: the probe issues, sets controls and a travel window, and suspends; device provisioning is left to the simulator · rests on: Decision 7 (only the processor’s connection may call the provisioning door) · wrong if: UAT needs the probe to show a device credential.