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-836 — Implementation Plan
Findings for the ADR
- F1 — the facility’s available is the current account ADR’s. No retail type integrates a facility, so a facility reader here has no user and no test (plan grill point 12). The availability reader returns the standard positions after claims and reductions; the current account ADR adds the facility with its first real one. Limits is not touched. The ADR’s Decision 4 says so.
- F2 — the posting is configuration on the account type, as every external source is.
ExternalSourceDispatcherruns the account type’sexternalIntegrationsentry, which names an operation on the type. SoCardPurchaseandCardRefundare two more entries (cardPurchase,cardRefund) naming two operations with apostTransactionstep each, on the retail package’sCallDeposit(and laterCurrentAccount); the transaction types carry the GL mapping. A type without the entry refuses withACCOUNT_TYPE_DOES_NOT_ACCEPT_CARD_PURCHASES, which Decision 6 records as an exception. - F3 — the domain guard needs the reductions passed in.
Account.Instructionscomputes available inside the aggregate from its own claims; an aggregate cannot call a reader. The instruction handler reads the reductions and passes them as a parameter, as the other three application call sites do directly. Same rule, one more argument; the ADR’s “six call sites” is five plus the aggregate method. - F4 — spend by period counts approved amounts, not cleared ones. Decision 1 says “open and cleared holds”; a cleared hold’s final amount can differ from the approval. The ceiling is a control on authorisations, so the projection sums approved amounts of holds placed in the period, net of reversals, and ignores what cleared. The ADR’s wording stands with that reading.
- F6 — the decider is one bite. Phase A: a control check that passes has nothing to answer until the funding walk exists, so the “Approved” and daily-ceiling rows of bite 3 were red until bite 4. Bites 3 and 4 are one bite, “the decider”; the table is six bites.
- F7 — the domestic country is a facet setting. Decision 1’s country check needs “the
tenant’s country”, which nothing declares (
TenantProvenanceSettings.CountryLayeris null off provisioning).CardProcessorSettings(ADR-820) gainsDomesticCountry(IsoCountryCode?, optional; null skips the check, F20), seeded ZA on the retail template and the fixture. - F8 — the card-purchase operation carries no availability guard, so the clearing post is unconditional on every type that integrates it; a refusal is an inactive account or a type without the integration. Decision 6’s “today the availability guard” is withdrawn: the current account ADR adds the unarranged-overdraft fee and rate, not the posting.
- F9 — the import invokes the post, it does not cascade it, so the expiry step at 44 never overtakes a same-day line; both run in the step’s tenant frame.
- F10 —
ControlBreachedstays in the enum, obsolete and never produced, so a stored receipt on a simulation tenant still deserialises (Marten stores enums as strings); the adapter still maps it to 57.ChannelNotAllowedandCountryNotAllowedshare 57, so the adapter’s round trip is many-to-one for that code. - F12 — one inline document per hold (plan grill point 1). A shared per-account document
loses a hold when two cards on one account approve at once (inline multi-stream projections
have no optimistic check), and nothing could find a hold by id, by expiry or once released.
CardHoldis keyed byCardHoldId; the reductions reader sums open holds by account in a query, the expiry step queriesExpiresOn, spend is a sum over the card’s holds by the date placed.CardHoldsByAccountandCardSpendByPeriodare gone. - F13 — the clearing post is a day-end step of its own (point 3): order 44, expiry 45. It runs over every batch with unposted items, records an outcome per item on the batch, and a matched item already posted still releases its hold; a re-run skips by item, never by account. The import stores batches and does nothing else.
- F14 — tenant on the post command, readers summed (point 4):
PostCardClearingBatchCommandcarries the tenant and is invoked for it, as steps 41–43 are; Accounts injects everyIAvailableBalanceReductionsReaderand sums them, so a host without Cards reduces by zero and a second holder joins rather than replaces. - F15 — the guard context’s reductions are a required parameter (point 5), passed by its
five callers; card holds reduce
Current, the position every retail deposit type’scardPurchaseoperation debits. - F16 — the merchant travels with the posting (point 6):
WorkflowDispatchContextgains properties,TransactionPostedcarries them, the transactions view shows them; country isIsoCountryCode?. A characterisation test ofExternalSourceDispatcheris written before it is edited (CRAP 420 at zero coverage). - F17 — the GL legs are named (point 7):
CardPurchasedebits the account’s deposit liability and creditscard-settlement-payable;CardRefundthe reverse; both inPostingSettings.yamlwith the new GL account in the chart template. - F18 — a hold is released at the close of its expiry date (point 8),
ExpiresOn <= the date being closed, not the day after. - F19 — a clearing
Reversalcredits the account its purchase posted to, else an exception (point 10); incremental authorisations are out of scope and the ADR names the consequence. - F20 — a null
DomesticCountryskips the country check (point 11). - F21 — the decider’s reads run under the budget, its save under none (point 13); it
captures tenant and trading date before its first await;
Aroundexposes the inner task. - F22 —
Cardgets an inline snapshot (point 15) so a tap loads a document, not a year of taps; with per-hold documents the aggregate keeps only the ids of its open holds. - F23 — the post step revisits a batch until every item is settled (phase B, bite 5): it
selects batches with an item lacking an outcome, an exception outcome, or a Posted outcome
whose hold is still open; exceptions are retried at every day-end, so a reopened account
posts; a re-import merges outcomes by reference rather than wiping them, and Accounts skips a
transaction id it has posted (
ExternalSourceDispatcher), so nothing posts twice either way. - F24 — what released a hold is the processor’s reference (bites 2, 4, 6): the reversal’s
processor reference or the clearing line’s, the string an operator recognises, never our URN.
A released hold’s remaining amount reads zero; the event’s
Amountis what was freed. - F25 —
ControlBreachedstays a plain member (bite 4):[Obsolete]is a build error under warnings-as-errors; the adapter maps it, nothing produces it, andCardClearingTestsscriptsCeilingExceededinstead. - F26 — the simulator can leave an approval uncleared (bite 4): every simulated approval
cleared the same day, so expiry could never be shown;
SimulateCardAuthorisationCommandgainsClears(default true) and the probe uses it for the hotel. - F27 — presence is the request’s flag (bite 3): the channel and entry mode pick the switch
(online, in-store, ATM, contactless),
CardPresentdecides which; an ATM tap abroad is a card-present tap for the country check; a wallet tap with contactless entry needs contactless. The merchant country is normalised to upper-case alpha-2 by the mapper; anything else reads as foreign. The conflict-and-retry path gets a unit test, since no component test can reach it. - F28 — expiry bands are disjoint and at most thirty-one days (bite 1); a narrower exception
is a split band, not an override; the default reuses the days code; ADR-820’s
MerchantCategoryCodeconverter answers a malformed code as a 400, not a 500. - F11 —
AvailableBalance.Projectloses its two-argument overload, so every caller must pass the reductions: the five external-source handlers’ guard context, the notice withdrawal guard’s held total and the detail mapper’s second overload included. - F5 — what the test suites need that the ADR does not declare:
ScriptedDeciders(ADR-820) yields to the real card decider when no script is set, and gainsAroundto wrap it (a late inner decision, a pause between the availability read and the append); the cards context funds accounts throughProcessCashDepositCommand(FundAsync), seeds the hold-expiry rows and a third ZAR call deposit for the demo customer, appends a hold directly for bite 2 (PlaceHoldAsync), and hosts the day-end helpersCardClearingTestskept private; the fixture’s account type gains a guardedcash-out, the two card integrations and their transaction types; dates anchor onSetTradingDateAsync, never a literal.
Files touched
Bite 1 — contract types, the changes to ADR-820’s types, the expiry settings and page
src/LedgerTM.Contracts/Cards/CardHold.cs— new;CardHoldId,CardHoldStatus,CardHoldReleaseReason,CardHold(the per-hold document, F12),CardClearingItemOutcome,CardClearingExceptionsrc/LedgerTM.Contracts/Cards/CardAuthorisation.cs—CardDeclineReasongainsChannelNotAllowed,CountryNotAllowed,CeilingExceeded,CredentialExpired;ControlBreachedstays, plain, unproduced (F25);CardAuthorisationRequest.PartialApprovalAllowedsrc/LedgerTM.Contracts/Cards/MerchantCategoryCode.cs— the converter throwsJsonExceptionon a malformed code (F28)src/LedgerTM.Contracts/Cards/CardClearing.cs—CardClearingBatch.Outcomes(nullable, defaulted, so ADR-820’s constructions stand);CardClearingItem.MerchantCountrystays a string on the wire typesrc/LedgerTM.Cards/Domain/CardProcessorSettings.cs,Application/Settings/AmendCardProcessor.cs, the card-processor form andcard-processor.md—DomesticCountry(F7)src/LedgerTM.Contracts/Accounts/IAvailableBalanceReductionsReader.cs— newsrc/LedgerTM.Contracts/Accounts/IAccountAvailabilityReader.cs— newsrc/LedgerTM.Contracts/Accounts/ProcessExternalSourceCommands.cs—ProcessCardPurchaseCommand,ProcessCardRefundCommandsrc/LedgerTM.Accounts/Domain/Account.Events.cs—TransactionPosted.Properties(merchant name, category, country) (F16)src/LedgerTM.Contracts/Accounts/Triggers/TransactionSource.cs—CardPurchase,CardRefundsrc/LedgerTM.Cards/Domain/Card.Events.cs—CardHoldPlaced,CardHoldReduced,CardHoldReleasedsrc/LedgerTM.Hosting/event-identity.tsv— three rowssrc/LedgerTM.Cards/Domain/CardHoldExpirySettings.cs— new;CardHoldExpirySettings,CardHoldExpiryRulesrc/LedgerTM.Cards/Application/Settings/AmendCardHoldExpiry.cs— new; command, handler, validator (range not inverted, days ≥ 1, default ≥ 1, ranges disjoint)src/LedgerTM.Cards/Application/Queries/GetCardHoldExpiry.cs— new;GET /api/settings/card-hold-expirysrc/LedgerTM.Cards/Application/Processor/PaymentologyOutboundMapper.cs— codes 54, 57, 57, 61;ControlBreachedstill 57, never producedsrc/LedgerTM.Cards/Application/Processor/PaymentologyInboundMapper.cs,PaymentologyBodies.cs—partialApprovalAllowedsrc/LedgerTM.Cards/Simulation/SimulateCommands.cs,PaymentologySimulator.cs—SimulateCardAuthorisationCommand.PartialApprovalAllowedandClears(F26); a reversal of an unknown authorisation sends the card’s billing currencysrc/LedgerTM.Infrastructure.Contracts/AccessControl/PermissionCatalog.cs—cards.amend-hold-expiry,cards.view-hold-expiry,cards.list-card-holds;// system-internal:cards.release-card-hold,cards.expire-card-holds,cards.post-card-clearing-batch,accounts.process-card-purchase,accounts.process-card-refundsrc/LedgerTM.Infrastructure.Contracts/Features/FeatureCatalog.cs— the keys undercards.issuingsrc/LedgerTM.Seeding.Provisioning/tenant-templates/packages/retail-bank/CardHoldExpirySettings.yaml— new; default 7; 7011 → 30; 7512 → 30; 5541–5542 → 3src/LedgerTM.Seeding.Provisioning/PackageImporter.cs— the settings document by filenamesrc/ui-apps/bank/src/features/entity-types/card-hold-expiry.tsx— new;settings-class-map.ts,category-taxonomy.ts,app.tsx(routesettings/card-hold-expiry),lib/api.tsdocs/guide/features/card-hold-expiry.md— new;feature: cards.issuing,attach: [route:/settings/card-hold-expiry]LedgerTM.Tests.Unit/Cards/PaymentologyOutboundMapperTests.cs,PaymentologyInboundMapperTests.cs— the reasons and the flag; the round trip is many-to-one for 57LedgerTM.Tests.Component/Cards/CardClearingTests.cs— the scriptedControlBreachedbecomesCeilingExceeded(F25);ALastBatchOnAsyncunchanged by the defaultedOutcomesLedgerTM.Tests.Component/Cards/CardHoldExpirySettingsTests.cs— new
Bite 2 — the hold on the card, the projections, the reductions seam, Accounts reads it
src/LedgerTM.Cards/Domain/Card.cs—PlaceHold,ReduceHold,ReleaseHold,ReleaseAllHolds(on close);Holdssrc/LedgerTM.Cards/Application/Projections/CardHoldProjection.cs— new; inline, one document per hold (F12)src/LedgerTM.Cards/Application/Holds/AvailableBalanceReductionsReader.cs— new;IAvailableBalanceReductionsReader: sum of openCardHolds by funding accountsrc/LedgerTM.Cards/Bootstrapper.cs—Cardwith an inline snapshot (F22)src/LedgerTM.Cards/Application/Holds/ReleaseCardHold.cs— new;ReleaseCardHoldCommand, handlersrc/LedgerTM.Cards/Application/Queries/ListCardHolds.cs— new;GET /api/cards/{id}/holdssrc/LedgerTM.Cards/Bootstrapper.cs— the projections, the reader, the handlersrc/LedgerTM.Accounts/Domain/AvailableBalance.cs—Project(ledger, claims, externalReductions); the two-argument overload removed (F11)src/LedgerTM.Accounts/Application/Queries/GetAccountDetail.cs— reads the reductions in both mapper overloads;PositionDto.HeldExternallysrc/LedgerTM.Accounts/Application/Queries/ResolveAccountBalanceQueryHandler.cs— reads the reductionssrc/LedgerTM.Accounts/Application/Operations/AccountGuardContextBuilder.cs—Buildtakes the reductions, required (F15); its callersOperationInterpreter,OperationAvailabilityEndpoint,RegulatoryLimitEnforcement,ProvisionRecomputeStepandExternalSourceDispatcherread and pass themsrc/LedgerTM.Accounts/Bootstrapper.cs— injectsIEnumerable<IAvailableBalanceReductionsReader>and sums (F14)src/LedgerTM.Accounts/Application/Workflows/WorkflowInterpreter.cs— reads the reductionssrc/LedgerTM.Accounts/Domain/Account.Instructions.cs,Account.Notices.cs—RailFeeShortfall, the instruction guard and the notice guard’s held total take the reductions (F3); their handlers read themsrc/LedgerTM.Accounts/Application/Commands/RaiseInstruction*.cs,ProcessExternalSourcePaymentHandlers.cs(ExternalSourceDispatcher.BuildEvaluationContext) — pass the reductions (F11)LedgerTM.Testing.Infrastructure/TestingEnvironment.cs— nothing: the reader is Cards’ ownLedgerTM.Tests.Component/Cards/CardsComponentFixture.cs—FundAsync,PlaceHoldAsync,ThirdZarCallDeposit, hold-expiry rows, the guarded and integrated fixture type, the day-end helpers (F5)LedgerTM.Testing.Builders/GenericAccountTestHelper.cs— the fixture type’scash-outguard and card integrations throughwithTypeLedgerTM.Tests.Component/Cards/CardHoldTests.cs— new
Bite 3 — the decider (F6)
src/LedgerTM.Cards/Application/Doors/CardAuthorisationDecider.cs— new; implementsICardAuthorisationDecider: token, status, credential expiry, channel, country and travel window, ceilings over the card’s holds by date placed, the funding walk, partial approval,PlaceHoldin its own session (reads under the budget, the save under none, F21) with one retry on a concurrency conflictsrc/LedgerTM.Accounts/Application/Queries/AccountAvailabilityReader.cs— new;IAccountAvailabilityReader: standard positions after claims and reductions (the facility is the current account ADR’s, F1)src/LedgerTM.Cards/Bootstrapper.cs,src/LedgerTM.Accounts/Bootstrapper.cs— the decider and the readerLedgerTM.Testing.Infrastructure/Cards/ScriptedDeciders.cs,TestingEnvironment.cs— the authorisation half decorates the real decider;Around(F5)LedgerTM.Tests.Component/Cards/CardAuthorisationDoorTests.cs—without_a_decider_every_authorisation_is_declined_as_not_readybecomesan_unknown_token_is_declined_with_its_reason;CardProcessorReceiptsTests.cs:102expectsUnknownTokenLedgerTM.Tests.Component/Cards/CardAuthorisationDeciderTests.cs— newLedgerTM.Tests.Unit/Cards/CardAuthorisationDeciderRetryTests.cs— new; a concurrency conflict retries once, a second isDecisionFailed(F27)
Bite 4 — release on reversal, closure and expiry at day-end
src/LedgerTM.Cards/Application/Doors/ReverseCardAuthorisation.cs— cascadesReleaseCardHoldCommandafter its receiptsrc/LedgerTM.Cards/Application/Commands/CloseCard.cs— releases the card’s open holdssrc/LedgerTM.Cards/Application/DayEnd/CardClearingSteps.cs—ExpireCardHoldsStep(order 45, NonCritical; releasesExpiresOn <= the date being closed, F18)src/LedgerTM.Cards/Application/DayEnd/CardClearingCommands.cs—ExpireCardHoldsCommand, handlerLedgerTM.Tests.Component/Cards/CardHoldReleaseTests.cs— new
Bite 5 — the clearing post
src/LedgerTM.Cards/Application/DayEnd/CardClearingSteps.cs—PostCardClearingStep(order 44, NonCritical, F13)src/LedgerTM.Cards/Application/DayEnd/CardClearingCommands.cs—PostCardClearingBatchCommand(TenantId, batch)and its handler: every batch with an unsettled item (F23); per item match by authorisation then token, post, record the outcome, release; never a throw (F13, F14, F19); the import merges outcomes by reference on a re-import (F23)src/LedgerTM.Accounts/Application/Workflows/WorkflowDispatchContext.cs(or its home) — properties (F16);TransactionHistoryViewshows themLedgerTM.Tests.Component/Accounts/ExternalSourceDispatcherCharacterisationTests.cs— new; written before the dispatcher is edited (F16)src/LedgerTM.Accounts/Application/Commands/ProcessExternalSourcePaymentHandlers.cs—ProcessCardPurchaseCommandHandler,ProcessCardRefundCommandHandlersrc/LedgerTM.Accounts/Domain/Configuration/ExternalIntegrations.cs,src/LedgerTM.Accounts/Yaml/ExternalIntegrationsYamlConverter.cs—CardPurchase,CardRefundentries (F2)src/LedgerTM.Seeding.Provisioning/tenant-templates/packages/retail-bank/AccountTypesSettings.yaml—CallDeposit: transaction typesCardPurchase,CardRefund; operationscard-purchase,card-refundwith no availability guard (F8);externalIntegrations.cardPurchase,cardRefundsrc/LedgerTM.Seeding.Provisioning/tenant-templates/packages/retail-bank/CardProcessorSettingsseed (SeedSimulationCardProcessor.cs) —DomesticCountryZA (F7)src/LedgerTM.Seeding.Provisioning/tenant-templates/packages/retail-bank/PostingSettings.yaml—CardPurchase: Dr the deposit liability, Cr the card settlement payable;CardRefund: the reverse (F17); the chart template gains a row described “Card settlement payable”src/LedgerTM.Cards/Simulation/PaymentologySimulator.cs— the simulated file carries a tip on one line and a refund (for the demo)LedgerTM.Tests.Component/Cards/CardClearingPostTests.cs— new
Bite 6 — the UI, the guide, the probe
src/ui-apps/bank/src/features/cards/card-holds-panel.tsx— new;card-viewer.tsxgains the Holds panel;hooks/cards.tssrc/ui-apps/bank/src/features/accounts/generic/generic-account-viewer.tsx— the “Held by cards” line beside the held-available tilessrc/ui-apps/bank/src/lib/api.ts— the holds readdocs/guide/features/cards.md— the holds section;docs/guide/features/card-processor.md— the clearing exceptionssrc/ui-apps/bank/ui-review/adr-uat/flows/adr-836-server-probe.ts— new; simulates an approval, a decline, a reversal, day-end with the clearing file; prints ids per scenarioLedgerTM.Tests.Component/Cards/CardHoldsPanelTests.cs— new; the holds read and the account detail’s held-by-cards figuresrc/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-02 after the grill: no new candidate for any declared name. Supporting
names the signatures needed: IFacilityAvailableReader (F1, back to the ADR),
CardHoldSummary (the hold as the list shows it), MoveTradingDateAsync (test only).
Interfaces
// src/LedgerTM.Contracts/Cards/CardHold.cs
public readonly record struct CardHoldId(string Value) : IStrongId<CardHoldId>
{ public static CardHoldId Of(CardAuthorisationId authorisation) => new(authorisation.Value); } // one hold per authorisation
public enum CardHoldReleaseReason { Reversed, Cleared, Expired, CardClosed }
public enum CardHoldStatus { Open, Released }
// One inline document per hold (F12); the reductions reader sums Open by FundingAccount, expiry queries ExpiresOn, spend sums by Card and PlacedOn.
public sealed class CardHold
{
public CardHoldId Id { get; set; } public CardId Card { get; set; } public CardAuthorisationId Authorisation { get; set; } public AccountId FundingAccount { get; set; }
public decimal OriginalAmount { get; set; } public decimal Amount { get; set; } /* remaining */ public CurrencyId Currency { get; set; }
public MerchantCategoryCode Mcc { get; set; } public string MerchantName { get; set; } = ""; public DateOnly PlacedOn { get; set; } public DateOnly ExpiresOn { get; set; }
public CardHoldStatus Status { get; set; } public CardHoldReleaseReason? Released { get; set; } public DateOnly? ReleasedOn { get; set; } public string? ReleasedBy { get; set; }
// ReleasedBy: the processor's reversal reference or clearing reference (F24); null for expiry and closure. Amount reads 0 once released.
}
public sealed record CardClearingItemOutcome(string ProcessorReference, CardClearingItemKind Kind, TransactionId? Posted, AccountId? Account, string? ExceptionCode, string? Message);
public sealed record CardClearingException(string ProcessorReference, CardClearingItemKind Kind, string Code, string Message); // the view of an outcome with a code
// src/LedgerTM.Contracts/Cards/CardAuthorisation.cs — changed
public enum CardDeclineReason { IssuerNotReady, CardNotActive, ControlBreached, InsufficientFunds, NoFundingAccount, DecisionFailed, UnknownToken,
DeviceTokensNotAllowed, DeviceTokenMissing, CredentialExpired, ChannelNotAllowed, CountryNotAllowed, CeilingExceeded } // ControlBreached kept, never produced (F25)
public sealed record CardAuthorisationRequest(/* ADR-820's members */ …, DateTimeOffset RequestedAt, bool PartialApprovalAllowed = false);
// src/LedgerTM.Contracts/Cards/CardClearing.cs — changed
public sealed record CardClearingBatch(/* ADR-820's members */ …, DateTimeOffset ImportedAt, IReadOnlyList<CardClearingItemOutcome>? Outcomes = null); // an item with no outcome is unposted
// src/LedgerTM.Cards/Domain/CardProcessorSettings.cs — changed (F7): public IsoCountryCode? DomesticCountry { get; set; } (optional; null: the country check is skipped, F20)
// src/LedgerTM.Accounts/Application/Queries/GetAccountDetail.cs — PositionDto gains decimal HeldExternally (per position; the card holds sit on Current)
// src/LedgerTM.Cards/Simulation/SimulateCommands.cs — SimulateCardAuthorisationCommand(…, string? ProcessorReference = null, bool PartialApprovalAllowed = false, bool Clears = true)
// src/LedgerTM.Contracts/Accounts/IAvailableBalanceReductionsReader.cs — Cards implements; Accounts injects IEnumerable<> and sums (D3, F14)
public interface IAvailableBalanceReductionsReader
{ Task<IReadOnlyDictionary<AccountId, decimal>> ReductionsAsync(IReadOnlyCollection<AccountId> accounts, DateOnly asOf, CancellationToken ct = default); }
// Every requested account is a key (0 when nothing is held); every Open hold counts whatever asOf says; opens its tenant session per call.
// src/LedgerTM.Contracts/Accounts/IAccountAvailabilityReader.cs — Accounts implements, Cards reads (D4); the facility joins with the current account ADR (F1)
public sealed record AccountAvailability(AccountId Account, CurrencyId Currency, decimal Available, decimal Ledger, decimal Claims, decimal ExternalReductions);
public interface IAccountAvailabilityReader { Task<AccountAvailability?> AvailableAsync(AccountId account, DateOnly asOf, CancellationToken ct = default); } // null: unknown or not Active; the walk skips it
// src/LedgerTM.Contracts/Accounts/ProcessExternalSourceCommands.cs — beside ProcessBankDepositCommand (F2)
[PermissionKey("accounts.process-card-purchase")]
public record ProcessCardPurchaseCommand(AccountId AccountId, TransactionId TransactionId, decimal Amount, DateOnly TradingDate, DateOnly ValueDate,
string SourceRef, string MerchantName, MerchantCategoryCode Mcc, IsoCountryCode? MerchantCountry) : ISystemCommand;
[PermissionKey("accounts.process-card-refund")]
public record ProcessCardRefundCommand(AccountId AccountId, TransactionId TransactionId, decimal Amount, DateOnly TradingDate, DateOnly ValueDate,
string SourceRef, string MerchantName, MerchantCategoryCode Mcc, IsoCountryCode? MerchantCountry) : ISystemCommand;
// WorkflowDispatchContext gains Properties; TransactionPosted.Properties carries merchantName, merchantCategoryCode, merchantCountry (F16).
// PostingSettings: CardPurchase Dr deposit liability / Cr card-settlement-payable; CardRefund the reverse (F17).
// TransactionSource gains CardPurchase, CardRefund. ExternalIntegrations gains CardPurchase and CardRefund entries (YAML cardPurchase, cardRefund),
// each naming an operation on the type; a type without one refuses ACCOUNT_TYPE_DOES_NOT_ACCEPT_CARD_PURCHASES / _REFUNDS.
// src/LedgerTM.Cards/Domain/Card.Events.cs — frozen once shipped
[MessageIdentity("cards.card-hold-placed")] public record CardHoldPlaced(CardId Id, CardHoldId Hold, CardAuthorisationId Authorisation, AccountId FundingAccount,
decimal Amount, CurrencyId Currency, MerchantCategoryCode Mcc, string MerchantName, DateOnly On, DateOnly ExpiresOn) : DomainEvent;
[MessageIdentity("cards.card-hold-reduced")] public record CardHoldReduced(CardId Id, CardHoldId Hold, AccountId FundingAccount, decimal By, decimal Remaining, string ReleasedBy /* the reversal's processor reference */, DateOnly On) : DomainEvent;
[MessageIdentity("cards.card-hold-released")] public record CardHoldReleased(CardId Id, CardHoldId Hold, AccountId FundingAccount, decimal Amount /* freed */, CardHoldReleaseReason Reason,
string? ReleasedBy /* the reversal's or clearing line's processor reference, null for expiry and closure */, DateOnly On) : DomainEvent; // Amount is what was freed: the remainder, never the reversal's figure
// src/LedgerTM.Cards/Domain/Card.cs — verbs; every Apply public
// PlaceHold(authorisation, account, amount, currency, mcc, merchantName, on, expiresOn): refused CARD_HOLD_EXISTS on a repeat, CARD_STATUS_FORBIDS unless Active
// ReduceHold(hold, by, releasedBy, on): refused CARD_HOLD_NOT_OPEN, CARD_HOLD_REDUCTION_INVALID (by ≤ 0, or a reduction with a reason other than Reversed,
// or no releasedBy); `by` is a reduction, not a replacement; at or above the remainder releases as Reversed
// ReleaseHold(hold, reason, on): refused CARD_HOLD_NOT_OPEN · ReleaseAllHolds(on): on Close, reason CardClosed
// src/LedgerTM.Cards/Domain/CardHoldExpirySettings.cs
public class CardHoldExpirySettings : Settings { public int DefaultDays { get; set; } = 7; public List<CardHoldExpiryRule> Rules { get; set; } = []; }
public sealed class CardHoldExpiryRule { public string Label { get; set; } = ""; public MerchantCategoryCode From { get; set; } public MerchantCategoryCode To { get; set; } public int Days { get; set; } }
// src/LedgerTM.Cards/Application/Settings/AmendCardHoldExpiry.cs — POST /api/settings/card-hold-expiry
[PermissionKey("cards.amend-hold-expiry")] public record AmendCardHoldExpiryCommand(int DefaultDays, IReadOnlyList<CardHoldExpiryRule> Rules) : ISettingsCommand<CardHoldExpirySettings>;
// Validator (400, every row's faults in one answer): CARD_HOLD_EXPIRY_RANGE_INVERTED, CARD_HOLD_EXPIRY_DAYS_BELOW_ONE (rows and the default),
// CARD_HOLD_EXPIRY_DAYS_ABOVE_THIRTY_ONE, CARD_HOLD_EXPIRY_RANGES_OVERLAP (inclusive ranges, disjoint; a narrower exception is a split band),
// CARD_HOLD_EXPIRY_MCC_REQUIRED; Label optional. An absent document reads as DefaultDays 7 and no rules (GET answers 200 with them).
// The command is four-eyes eligible through SettingsApproverViewReader.
[PermissionKey("cards.view-hold-expiry")] public record GetCardHoldExpiryQuery : IQuery<CardHoldExpirySettings>; // GET /api/settings/card-hold-expiry
// src/LedgerTM.Cards/Application/Holds/ReleaseCardHold.cs — system-internal; cascaded by the reversal door, the clearing post, the expiry command
[PermissionKey("cards.release-card-hold")]
public record ReleaseCardHoldCommand(CardHoldId Hold, CardHoldReleaseReason Reason, string? ReleasedBy = null, decimal? ReduceBy = null) : ICommand, ISystemCommand { … } // the CardHold document names the card; ReleasedBy required for Reversed and Cleared
// src/LedgerTM.Cards/Application/DayEnd/CardClearingCommands.cs
[PermissionKey("cards.expire-card-holds")] public record ExpireCardHoldsCommand(TenantId Tenant, DateOnly TradingDate) : ICommand, ISystemCommand { … } // releases ExpiresOn <= TradingDate (F18)
[PermissionKey("cards.post-card-clearing-batch")] public record PostCardClearingBatchCommand(TenantId Tenant, CardClearingBatchId Batch) : ICommand, ISystemCommand { … } // invoked for the tenant (F14)
public sealed class PostCardClearingStep : IDayEndStep // order 44, NonCritical, PreIncrement, id "cards.post-clearing": every batch with an unsettled item — no outcome,
// an exception outcome, or a Posted outcome whose hold is still Open (F13, F23)
public sealed class ExpireCardHoldsStep : IDayEndStep // order 45, NonCritical, PreIncrement, id "cards.expire-holds"
// src/LedgerTM.Cards/Application/Queries/ListCardHolds.cs — GET /api/cards/{id}/holds
[PermissionKey("cards.list-card-holds")] public record ListCardHoldsQuery(CardId Card) : IQuery<IReadOnlyList<CardHold>>; // 403 FEATURE_DISABLED without cards.issuing, as the other reads
// src/LedgerTM.Cards/Application/Doors/CardAuthorisationDecider.cs — implements ICardAuthorisationDecider (ADR-820)
// Order: UnknownToken (the index holds only open credentials, so a closed one is unknown) · CardNotActive · CredentialExpired (the credential's
// expiry month is before the trading date's month; good through the last day of its month) · DecisionFailed when the request's billing currency
// is not the card's (a processor fault, logged) · ChannelNotAllowed: the request's CardPresent flag decides presence (F27); Atm needs AtmAllowed
// and nothing else; a card-present tap needs InStoreAllowed, and Contactless entry (a phone tap included) also ContactlessAllowed; a
// card-not-present tap (Ecommerce, MailOrTelephone, Recurring, a remote wallet) needs OnlineAllowed · CountryNotAllowed: card present only (an
// ATM abroad included), merchant country (normalised to upper-case alpha-2 by the mapper; anything else reads as foreign) ≠ the facet's
// DomesticCountry, unless InStoreAbroadAllowed or the travel window covers the trading date and lists the country · CeilingExceeded: amount >
// per-transaction, or today's spend + amount > daily, or this calendar month's + amount > monthly, where today is the trading date and spend is
// by PlacedOn; equal passes; a ceiling breach is final even with partial approval allowed · NoFundingAccount: no account
// in the rule is open and Active · the walk (D4): for each account in order, IAccountAvailabilityReader (null skipped); the first whose Available
// ≥ amount takes PlaceHold(amount); none and PartialApprovalAllowed: the first with Available > 0 takes PlaceHold(Available), PartiallyApproved;
// none: InsufficientFunds. The decider captures tenant and trading date before its first await; its reads run under the door's budget and its
// save under CancellationToken.None, in its own IDocumentSession (store + current tenant), before the decision returns; a ConcurrencyException
// retries the whole decision once, a second is DecisionFailed. Writes nothing into the door's unit of work. Expiry: trading date + the first
// CardHoldExpiryRule whose range covers the MCC, else DefaultDays, in calendar days from the trading date. Spend (F4): sum over the card's
// CardHold documents by PlacedOn of OriginalAmount less reductions — NotAnswered, expired and closed holds count, declined taps do not. Two
// cards on one account may overcommit it between two reads; accepted (ADR Consequences). A null DomesticCountry skips the country check (F20).
// src/LedgerTM.Cards/Application/DayEnd/CardClearingCommands.cs — PostCardClearingBatchCommandHandler (D6)
// PostCardClearingStep (44) dispatches PostCardClearingBatchCommand for the tenant, per batch with an item lacking an outcome (F13). Per such item
// in file order: the authorisation's CardHold, open or released, names the account (a reissued card's old token still matches); else token →
// card (none: outcome UNKNOWN_TOKEN). Purchase with an open hold → ProcessCardPurchaseCommand to the hold's account for FinalAmount, ValueDate =
// TransactionDate (a live file publishes D on D+1, so a live post is back-valued a day and accrues from it), TransactionId = Uuid5(connection
// namespace, ProcessorReference), outcome recorded, then ReleaseCardHold(Cleared, ReleasedBy = reference); an item whose outcome says Posted
// but whose hold is still Open is released on a re-run. Purchase with a released hold → that hold's account, no release; Purchase with no hold →
// the first funding account; Refund → the account its authorisation's hold names, else the first funding account; Reversal → ProcessCardRefund
// to the account its purchase posted to (the purchase found by authorisation across batches), releasing the hold as Reversed if still open,
// else outcome REVERSAL_UNMATCHED (F19); Chargeback → outcome CHARGEBACK_NOT_HANDLED; a DomainException from Accounts → outcome with its code,
// the hold untouched, retried at the next day-end (F23). Never throws for an item. A Posted item is skipped on a re-run, by item; Accounts
// also skips a transaction id it has posted, so a re-import that merges outcomes by reference posts nothing twice. TransactionPosted.Properties carry merchantName, merchantCategoryCode, merchantCountry, read back through
// the account's transactions read (GET /api/accounts/{id}/transactions) (F16).
// LedgerTM.Tests.Component/Cards/CardsComponentFixture.cs (F5) — the fixture type: CallDeposit with cash-out guarded `Current >= $amount`,
// cardPurchase/cardRefund integrations and transaction types; hold-expiry rows (7 default, 7011 → 30, 7512 → 30, 5541–5542 → 3); DomesticCountry ZA
protected Task FundAsync(AccountId account, decimal amount); // ProcessCashDepositCommand
protected AccountId ThirdZarCallDeposit { get; } // the demo customer's, unfunded until a test funds it
protected Task<CardHoldId> PlaceHoldAsync(CardSummary card, AccountId account, decimal amount, string mcc = "5411"); // appends CardHoldPlaced (bite 2 only)
protected Task CloseAccountAsync(AccountId account); // appends AccountClosed, as other tests do
protected Task<IReadOnlyList<CardHold>> HoldsOfAsync(CardId card);
protected Task<CardAuthorisationReceipt> SimulateAuthorisationAsync(CardSummary card, decimal amount, string mcc = "5411", CardChannel channel = CardChannel.CardPresent,
CardEntryMode entry = CardEntryMode.Chip, string country = "ZA", bool partial = false, string? reference = null); // SimulateCardAuthorisationCommand through the bus
protected Task<CardReversalReceipt> SimulateReversalAsync(CardAuthorisationId authorisation, decimal? amount = null);
protected Task RunDayEndThroughAsync(DateOnly closes); // run-forward to closes + 1, waits for the run; from CardClearingTests
protected Task<CardClearingBatch> StoreBatchAsync(DateOnly businessDate, params CardClearingItem[] items); // a batch the post can be invoked on
// LedgerTM.Testing.Infrastructure/Cards/ScriptedDeciders.cs — the authorisation half decorates the real decider: script when set, else inner;
// Around(tenant, (inner, request, ct) => …) wraps the real one (a late answer, a pause between the availability read and the append) and
// exposes the inner task (LastInner(tenant)) so a test awaits the abandoned decision before asserting its hold (F21).
// SimulateCardAuthorisationCommand gains `bool PartialApprovalAllowed = false` after ProcessorReference.
Bites
| Bite | Description | Acceptance criterion | Status |
|---|---|---|---|
| 1 | Contract types: CardHoldId, the values, the three card events, the system commands, the two Accounts postings, the two readers, the hold document, the changes to ADR-820’s reason, request, facet, simulate command and converter; CardHoldExpirySettings with validator, amend and read, template rows, settings page |
A hold expiry rule is banded by merchant category | Pending |
| 2 | The hold on the card: PlaceHold, ReduceHold, ReleaseHold; CardHold inline; IAvailableBalanceReductionsReader; the holds read; Accounts reads the reductions at every available-balance site |
A card hold reduces the account’s available balance wherever a claim does | Pending |
| 3 | The decider: token, status, credential, channel, country and travel window, ceilings; IAccountAvailabilityReader in Accounts; the funding walk; partial approval; the hold placed in the decider’s own unit of work with one retry; the new reasons mapped in the adapter |
Every control refusal names its cause; A suspended card and an expired credential are declined naming each; An approval places the whole hold on the first account that covers it; A partial approval holds what the first account has; Two taps on one card serialise on the card | Pending |
| 4 | The reversal door cascades the release; closing a card releases its holds; ExpireCardHoldsStep (45) and its command |
A reversal releases the hold in real time; A hold expires at day-end by its merchant category; Closing a card releases its holds | Pending |
| 5 | PostCardClearingStep (44) and PostCardClearingBatchCommand: matching, the two Accounts postings with their transaction types, GL rules and the merchant on the posting, outcomes on the batch, retried until settled |
A cleared purchase posts to the funding account and releases its hold; An unmatched item posts to the first funding account and a chargeback is an exception | Pending |
| 6 | The holds panel, held-by-cards on the account, the guide, the probe | An operator sees a hold on the card and on the account | Pending |
Scenarios
Feature: A card processor's question is answered from the ledger, and the answer holds the money until the line clears
# Bite 1
Scenario: A hold expiry rule is banded by merchant category
Given the za-retail tenant's hold expiry settings hold a default of 7 days and a row for 7011 to 7011 of 30 days
When an operator adds a row for 7512 to 7512 of 30 days and a row for 5541 to 5542 of 3 days
Then the rules read back and a row whose range is inverted or whose days are below one is refused naming the fault
# Seen at: route:/settings/card-hold-expiry
# Bite 2
Scenario: A card hold reduces the account's available balance wherever a claim does
Given a call deposit holding 4,200.00 ZAR and an active card funded from it
When a hold of 1,200.00 is placed on the card against that account
Then the account's available balance reads 3,000.00 on its detail and through the balance resolver, its ledger balance still reads 4,200.00 and its own claims are unchanged
And a cash withdrawal of 3,500.00 against the account is refused for want of available balance
And a withdrawal of 2,900.00 is accepted and the ledger then reads 1,300.00
# Seen at: route:/accounts/{id}
# Bite 3
Scenario Outline: Every control refusal names its cause
Given an active card with online off, in-store abroad off, a per-transaction ceiling of 2,000.00 and a daily ceiling of 5,000.00, and a travel window for GB
When the processor asks to authorise <amount> at <channel> in <country>
Then the reply is <outcome> with reason <reason>, and no hold is placed on a decline
# Seen at: panel:cardProcessorReceipts
Examples:
| amount | channel | country | outcome | reason |
| 200.00 | online | ZA | Declined | ChannelNotAllowed |
| 200.00 | card present, chip | FR | Declined | CountryNotAllowed |
| 200.00 | card present, chip | GB | Approved | |
| 2,500.00 | card present, chip | ZA | Declined | CeilingExceeded |
| 1,900.00 twice then 1,900.00 | card present, chip | ZA | Declined on the third | CeilingExceeded |
# Bite 3
Scenario: A suspended card and an expired credential are declined naming each
Given a suspended card, and an active card whose credential expired last month
When the processor asks to authorise 100.00 on each
Then the first is Declined CardNotActive and the second Declined CredentialExpired
# Seen at: panel:cardProcessorReceipts
# Bite 3
Scenario: An approval places the whole hold on the first account that covers it
Given an active card whose funding rule names a call deposit holding 3,000.00 then a call deposit holding 5,000.00
When the processor asks to authorise 4,000.00 at merchant category 7011
Then the reply is Approved
And one hold of 4,000.00 sits on the card against the second account, expiring thirty days on
And the first account's available is unchanged and the second's reads 1,000.00
# Seen at: route:/cards/{id}
# Bite 3
Scenario: A partial approval holds what the first account has
Given an active card whose funding rule names a call deposit holding 3,000.00 then a call deposit holding 500.00
When the processor asks to authorise 5,000.00 with partial approval allowed
Then the reply is PartiallyApproved for 3,000.00 and a hold of 3,000.00 sits against the first account
And the same request without partial approval allowed is Declined InsufficientFunds and places no hold
And a request on a card whose only funding account has been closed is Declined NoFundingAccount
# Seen at: route:/cards/{id}
# Bite 3
Scenario: Two taps on one card serialise on the card
Given an active card funded from a call deposit holding 1,500.00
When the processor asks to authorise 1,000.00 twice at once under two references
Then exactly one is Approved and the other is Declined InsufficientFunds
And one hold sits on the card and the account's available reads 500.00
# Seen at: route:/cards/{id}
# Bite 4
Scenario: A reversal releases the hold in real time
Given an approved authorisation holding 3,000.00 against a call deposit
When the processor reverses it in full at 14:00
Then the hold is released as Reversed at once and the account's available is restored
When the processor reverses a different approved authorisation of 1,200.00 by 400.00
Then that hold reads 800.00 remaining of 1,200.00
And a further reversal of 900.00 releases it as Reversed
# Seen at: route:/cards/{id}
# Bite 4
Scenario: A hold expires at day-end by its merchant category
Given a hold placed today at merchant category 5411 and a hold placed today at 7011, with a default expiry of seven days and thirty for 7011
When day-end closes every trading date up to and including the seventh day after today
Then the first hold is released as Expired at that close and not at the sixth, and the second is still open
And a hold placed by a decision the door could not answer in time stays open until it clears or expires
# Seen at: route:/cards/{id}
# Bite 4
Scenario: Closing a card releases its holds
Given an active card with two open holds against a call deposit
When the card is closed
Then both holds are released as CardClosed and the account's available equals its ledger balance
# Seen at: route:/cards/{id}
# Bite 5
Scenario: A cleared purchase posts to the funding account and releases its hold
Given a hold of 1,200.00 on a card against a call deposit, placed by an approved authorisation
When a clearing batch whose item names that authorisation with a final amount of 1,150.00 dated today is posted
Then a card purchase of 1,150.00 is posted to the call deposit, value-dated today, naming the merchant, its category and country
And the books debit the deposit liability and credit card settlement payable by 1,150.00
And the hold is released as Cleared naming the clearing reference, and the account's available equals its ledger balance
And posting the same batch again posts nothing twice
And a line dated yesterday posts value-dated yesterday
And at day-end the clearing is posted before holds expire
# Seen at: route:/accounts/{id}
# Bite 5
Scenario: An unmatched item posts to the first funding account and a chargeback is an exception
Given an active card whose funding rule names a call deposit first, and an expired hold on it
When a clearing batch with a purchase naming an authorisation the ledger never saw, a purchase naming the expired hold, a refund, and a chargeback is posted
Then the first purchase posts to the first funding account and the second to the expired hold's account, and the refund posts as a credit
And a reversal item for a purchase already posted credits the account that purchase posted to
And the chargeback is recorded as an exception on the batch, naming its kind
And a purchase for a card whose funding account is closed is recorded as an exception naming the refusal
And the batch records an outcome for every item, and a re-run posts none of them again
# Seen at: route:/connectivity/card-processor
# Bite 6
Scenario: An operator sees a hold on the card and on the account
Given the demo customer's card holds 1,200.00 against their call deposit
When an operator opens the card viewer's holds panel and the account's detail
Then the hold shows its merchant, amount, placed-on and expires-on dates on the card
And the account's available breakdown shows 1,200.00 held by cards
# Seen at: route:/cards/{id}
Scenario → test
| Scenario | Bite | Project | Class | Method | Probe |
|---|---|---|---|---|---|
| A hold expiry rule is banded by merchant category | 1 | LedgerTM.Tests.Component |
CardHoldExpirySettingsTests |
expiry_rules_are_banded_by_merchant_category_and_refuse_a_bad_band |
adr-836-server-probe.ts |
| A card hold reduces the account’s available balance wherever a claim does | 2 | LedgerTM.Tests.Component |
CardHoldTests |
a_card_hold_reduces_available_on_the_detail_the_resolver_and_the_guard |
adr-836-server-probe.ts |
| Every control refusal names its cause — online with online off | 3 | LedgerTM.Tests.Component |
CardAuthorisationDeciderTests |
a_control_refusal_names_its_cause (theory) |
adr-836-server-probe.ts |
| Every control refusal names its cause — card present in FR | 3 | LedgerTM.Tests.Component |
CardAuthorisationDeciderTests |
a_control_refusal_names_its_cause (theory) |
adr-836-server-probe.ts |
| Every control refusal names its cause — card present in GB inside the window | 3 | LedgerTM.Tests.Component |
CardAuthorisationDeciderTests |
a_control_refusal_names_its_cause (theory) |
adr-836-server-probe.ts |
| Every control refusal names its cause — 2,500.00 over the per-transaction ceiling | 3 | LedgerTM.Tests.Component |
CardAuthorisationDeciderTests |
a_control_refusal_names_its_cause (theory) |
adr-836-server-probe.ts |
| Every control refusal names its cause — the third 1,900.00 over the daily ceiling | 3 | LedgerTM.Tests.Component |
CardAuthorisationDeciderTests |
the_daily_ceiling_counts_todays_approvals |
— timing, no surface |
| A suspended card and an expired credential are declined naming each | 3 | LedgerTM.Tests.Component |
CardAuthorisationDeciderTests |
a_suspended_card_and_an_expired_credential_are_declined_naming_each |
adr-836-server-probe.ts |
| An approval places the whole hold on the first account that covers it | 3 | LedgerTM.Tests.Component |
CardAuthorisationDeciderTests |
an_approval_holds_the_whole_amount_on_the_first_account_that_covers_it |
adr-836-server-probe.ts |
| A partial approval holds what the first account has | 3 | LedgerTM.Tests.Component |
CardAuthorisationDeciderTests |
a_partial_approval_holds_what_the_first_account_has |
adr-836-server-probe.ts |
| Two taps on one card serialise on the card | 3 | LedgerTM.Tests.Component |
CardAuthorisationDeciderTests |
two_taps_on_one_card_serialise_on_the_card |
— timing, no surface |
| A reversal releases the hold in real time | 4 | LedgerTM.Tests.Component |
CardHoldReleaseTests |
a_reversal_releases_the_hold_at_once_and_a_partial_one_reduces_it |
adr-836-server-probe.ts |
| A hold expires at day-end by its merchant category | 4 | LedgerTM.Tests.Component |
CardHoldReleaseTests |
a_hold_expires_at_day_end_by_its_merchant_category |
adr-836-server-probe.ts |
| Closing a card releases its holds | 4 | LedgerTM.Tests.Component |
CardHoldReleaseTests |
closing_a_card_releases_its_holds |
adr-836-server-probe.ts |
| A cleared purchase posts to the funding account and releases its hold | 5 | LedgerTM.Tests.Component |
CardClearingPostTests |
a_cleared_purchase_posts_to_the_funding_account_and_releases_its_hold |
adr-836-server-probe.ts |
| An unmatched item posts to the first funding account and a chargeback is an exception | 5 | LedgerTM.Tests.Component |
CardClearingPostTests |
an_unmatched_item_posts_to_the_first_funding_account_and_a_chargeback_is_an_exception |
adr-836-server-probe.ts |
| An operator sees a hold on the card and on the account | 6 | LedgerTM.Tests.Component |
CardHoldsPanelTests |
a_hold_is_listed_on_the_card_and_counted_on_the_account |
adr-836-server-probe.ts |
UI-surface sweep
Swept src/ui-apps/bank and src/ui-apps/shared for ControlBreached, holds, CardHold,
heldBy, held-by, card-hold-expiry, /holds, PartialApproval: no hits outside the
generated unions. The card viewer, the account viewer’s held-available tiles
(generic-account-viewer.tsx already renders a position’s available beside its amount) and the
settings taxonomy are the surfaces this ADR adds to:
src/ui-apps/shared/src/generated/permissions.generated.ts— gains the eight keys of Decision 10 (regenerated)src/ui-apps/shared/src/generated/api-types.ts—CardDeclineReasonreshaped (no UI reader ofControlBreachedtoday), the hold types,PositionDto.HeldExternally(regenerated)src/ui-apps/bank/src/features/cards/card-viewer.tsx— gains the Holds panel;card-holds-panel.tsxnewsrc/ui-apps/bank/src/features/accounts/generic/generic-account-viewer.tsx— the “Held by cards” line on the held-available tilesrc/ui-apps/bank/src/features/entity-types/card-hold-expiry.tsx— new;settings-class-map.ts,category-taxonomy.ts,app.tsxgain one entry eachsrc/ui-apps/bank/src/lib/api.ts— the holds read, the settings command and read
No existing UI surface is deleted, renamed or repointed.
Footprint
Feature projects touched: 7 — LedgerTM.Accounts, LedgerTM.Cards, LedgerTM.Contracts, LedgerTM.Hosting, LedgerTM.Infrastructure.Contracts, LedgerTM.Seeding.Provisioning, ui-apps
LedgerTM.Accounts— 13 changed, 0 newLedgerTM.Cards— 20 changed, 0 newLedgerTM.Contracts— 8 changed, 0 newLedgerTM.Hosting— 1 changed, 0 newLedgerTM.Infrastructure.Contracts— 2 changed, 0 newLedgerTM.Seeding.Provisioning— 4 changed, 0 newui-apps— 6 changed, 0 new Files: 97 named, 80 code, 3 config
Contracts types: 42 named, 35 changed by this ADR
ISystemCommand— fan-in 31, 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.Signing, LedgerTM.Statements, LedgerTM.Suspense, LedgerTM.Tasks, LedgerTM.Tax, LedgerTM.Warehouse)IAccountReferenceProvider— fan-in 15, referenced (LedgerTM.Accounts, LedgerTM.BankStatements, LedgerTM.Books, LedgerTM.Cards, LedgerTM.ClientChannel, LedgerTM.Collections, LedgerTM.Contracts, LedgerTM.Correspondence, LedgerTM.DocumentTemplates, LedgerTM.Hosting, LedgerTM.Payments, LedgerTM.Pricing, LedgerTM.ServiceEnrolment, LedgerTM.Statements, LedgerTM.Suspense)TransactionPosted— fan-in 9, changed (LedgerTM.Accounts, LedgerTM.BankStatements, LedgerTM.Books, LedgerTM.Contracts, LedgerTM.Hosting, LedgerTM.Seeding.[redacted].Conversion, LedgerTM.Suspense, LedgerTM.Warehouse, _creditplus)Card— fan-in 8, changed (LedgerTM.Accounts, LedgerTM.Cards, LedgerTM.Infrastructure.Contracts, LedgerTM.Payments, LedgerTM.Seeding.Provisioning, LedgerTM.Seeding.ZaRetail.Samples, _creditplus, ui-apps)CardProcessorSettings— fan-in 4, changed (LedgerTM.Cards, LedgerTM.Seeding.Provisioning, LedgerTM.Seeding.ZaRetail.Samples, ui-apps)CardSummary— fan-in 4, referenced (LedgerTM.Cards, LedgerTM.Contracts, LedgerTM.Seeding.ZaRetail.Samples, ui-apps)ResolveAccountBalanceQuery— fan-in 3, referenced (LedgerTM.Accounts, LedgerTM.Contracts, LedgerTM.Payments)CardAuthorisationDecision— fan-in 2, changed (LedgerTM.Cards, LedgerTM.Contracts)CardAuthorisationId— fan-in 2, referenced (LedgerTM.Cards, LedgerTM.Contracts)CardAuthorisationRequest— fan-in 2, changed (LedgerTM.Cards, LedgerTM.Contracts)CardClearingBatch— fan-in 2, changed (LedgerTM.Cards, LedgerTM.Contracts)CardClearingItem— fan-in 2, changed (LedgerTM.Cards, LedgerTM.Contracts)CardClosed— fan-in 2, changed (LedgerTM.Cards, LedgerTM.Hosting)CardDeclineReason— fan-in 2, changed (LedgerTM.Cards, LedgerTM.Contracts)ICardAuthorisationDecider— fan-in 2, referenced (LedgerTM.Cards, LedgerTM.Contracts)ICardByTokenReader— fan-in 2, referenced (LedgerTM.Cards, LedgerTM.Contracts)MerchantCategoryCode— fan-in 2, changed (LedgerTM.Cards, LedgerTM.Contracts)SimulateCardAuthorisationCommand— fan-in 1, changed (LedgerTM.Cards)AccountAvailability— fan-in 0, changedAmendCardHoldExpiryCommand— fan-in 0, changedCardClearingException— fan-in 0, changedCardClearingItemOutcome— fan-in 0, changedCardHold— fan-in 0, changedCardHoldExpiryRule— fan-in 0, changedCardHoldExpirySettings— fan-in 0, changedCardHoldId— fan-in 0, changedCardHoldPlaced— fan-in 0, changedCardHoldReduced— fan-in 0, changedCardHoldReleaseReason— fan-in 0, changedCardHoldReleased— fan-in 0, changedCardHoldStatus— fan-in 0, changedExpireCardHoldsCommand— fan-in 0, changedExpireCardHoldsStep— fan-in 0, changedGetCardHoldExpiryQuery— fan-in 0, changedIAccountAvailabilityReader— fan-in 0, changedIAvailableBalanceReductionsReader— fan-in 0, changedListCardHoldsQuery— fan-in 0, changedPostCardClearingBatchCommand— fan-in 0, changedPostCardClearingStep— fan-in 0, changedProcessCardPurchaseCommand— fan-in 0, changedProcessCardRefundCommand— fan-in 0, changedReleaseCardHoldCommand— fan-in 0, changed
Files reading each changed type: 35 types
AccountAvailability— 0 filesAmendCardHoldExpiryCommand— 0 filesCard— 158 filesLedgerTM.Tests.Architecture/CardVocabularyTests.csLedgerTM.Tests.Architecture/NoPrimaryAccountNumberTests.csLedgerTM.Tests.Component/Accounts/AccountsTestHelper.csLedgerTM.Tests.Component/Accounts/Consequences/CardRepricingPropagationTests.csLedgerTM.Tests.Component/Accounts/DayEnd/NoticeTierRepriceTests.csLedgerTM.Tests.Component/Accounts/DayEnd/NoticedFundsFollowTheCardTests.csLedgerTM.Tests.Component/Accounts/Features/FeatureUsageProbeTests.csLedgerTM.Tests.Component/Accounts/Migration/BackfillRatePricingTests.csLedgerTM.Tests.Component/Accounts/Operations/NoticeDepositNoticeOperationsTests.csLedgerTM.Tests.Component/Accounts/RateStructureBlastRadiusEndpointTests.csLedgerTM.Tests.Component/Accounts/Revaluation/BackdatedFinancialChangeDoubleFireTests.csLedgerTM.Tests.Component/Authorisation/SandboxPreflightGuardTests.csLedgerTM.Tests.Component/Cards/CardTypesSettingsTests.csLedgerTM.Tests.Component/Cards/CardsComponentFixture.csLedgerTM.Tests.Component/Cards/IssueCardTests.csLedgerTM.Tests.Component/Compliance/ClearanceIdentityTestHelper.csLedgerTM.Tests.Component/Connectivity/InstitutionConnectionReaderTests.csLedgerTM.Tests.Component/Counterparties/CounterpartyIdentificationRequirementTests.csLedgerTM.Tests.Component/Counterparties/CounterpartyLegalFormVocabularyTests.csLedgerTM.Tests.Component/Counterparties/IdentificationPreferenceOrderTests.csLedgerTM.Tests.Component/Lookups/LookupsEndpointTests.csLedgerTM.Tests.Component/Seeding/PackageImporterFolderTests.csLedgerTM.Tests.Component/Seeding/SampleCardsSeedTests.csLedgerTM.Tests.Unit/Accounts/AccountAggregateTests.csLedgerTM.Tests.Unit/Accounts/Commands/CreateAccountInputsTests.csLedgerTM.Tests.Unit/Accounts/Configuration/RegulatoryLimitGuardTests.csLedgerTM.Tests.Unit/Accounts/EffectiveRateResolverTests.csLedgerTM.Tests.Unit/Accounts/NoticeRateExpressionTests.csLedgerTM.Tests.Unit/Accounts/Projections/RateDependencyProjectionTests.csLedgerTM.Tests.Unit/Accounts/RateStructureTests.csLedgerTM.Tests.Unit/Regulatory/ConsumerCreditExtractTests.csLedgerTM.Tests.Unit/Regulatory/ScvExtractTests.csLedgerTM.Tests.Unit/Samples/camt.053.001.08.xsdLedgerTM.Tests/Integration.CreditPlus/Application/Features/FixedDepositMaturityOutcomeProjectionTests.csLedgerTM.Tests/Integration.CreditPlus/Application/Features/FixedDepositRolloverTests.csLedgerTM.Tests/Integration.CreditPlus/Application/Features/NoticeTierRepriceForwardDatedOpeningTests.cssrc/LedgerTM.Accounts/Application/Commands/CreateAccount.cssrc/LedgerTM.Accounts/Application/DayEnd/CardRepricing.cssrc/LedgerTM.Accounts/Application/Migration/BackfillRatePricing.cssrc/LedgerTM.Accounts/Application/Operations/OperationPreflightGuard.cssrc/LedgerTM.Accounts/Application/Projections/RateDependency.cssrc/LedgerTM.Accounts/Application/Services/CardRateBinding.cssrc/LedgerTM.Accounts/Application/Services/RateChangeConsequenceApplier.cssrc/LedgerTM.Accounts/Application/Services/RateChangeConsequenceComputer.cssrc/LedgerTM.Accounts/Application/Services/RepricingCardResolver.cssrc/LedgerTM.Accounts/Application/Settings/RateStructureEndpoints.cssrc/LedgerTM.Accounts/Domain/Configuration/RateStructure.cssrc/LedgerTM.Accounts/Domain/Configuration/RateStructureSettings.cssrc/LedgerTM.Accounts/Domain/Valuation/RuleRateResolver.cssrc/LedgerTM.Accounts/Yaml/AccountTypeLoader.cssrc/LedgerTM.Cards/Application/Authorisations/CardApproverViewReader.cssrc/LedgerTM.Cards/Application/Commands/ActivateCard.cssrc/LedgerTM.Cards/Application/Commands/AddCardDeviceCredential.cssrc/LedgerTM.Cards/Application/Commands/CardHandling.cssrc/LedgerTM.Cards/Application/Commands/CloseCard.cssrc/LedgerTM.Cards/Application/Commands/IssueCard.cssrc/LedgerTM.Cards/Application/Commands/MirrorCardToProcessor.cssrc/LedgerTM.Cards/Application/Commands/ReinstateCard.cssrc/LedgerTM.Cards/Application/Commands/ReissueCard.cssrc/LedgerTM.Cards/Application/Commands/RemoveCardCredential.cssrc/LedgerTM.Cards/Application/Commands/RenameCard.cssrc/LedgerTM.Cards/Application/Commands/ReportCardLostOrStolen.cssrc/LedgerTM.Cards/Application/Commands/RevealCard.cssrc/LedgerTM.Cards/Application/Commands/SetCardControls.cssrc/LedgerTM.Cards/Application/Commands/SetCardFundingRule.cssrc/LedgerTM.Cards/Application/Commands/SetCardTravelWindow.cssrc/LedgerTM.Cards/Application/Commands/SuspendCard.cssrc/LedgerTM.Cards/Application/Settings/AmendCardTypes.cssrc/LedgerTM.Cards/Bootstrapper.cssrc/LedgerTM.Cards/Domain/Card.cssrc/LedgerTM.Cards/Simulation/SimulateCommands.cssrc/LedgerTM.Infrastructure.Contracts/Features/FeatureCatalog.cssrc/LedgerTM.Payments/Cash/Domain/CashTransaction.cssrc/LedgerTM.Seeding.Provisioning/PackageModel.cssrc/LedgerTM.Seeding.Provisioning/tenant-templates/packages/ca-retail/AccountTypesSettings.yamlsrc/LedgerTM.Seeding.Provisioning/tenant-templates/packages/investment-house/AccountTypesSettings.yamlsrc/LedgerTM.Seeding.Provisioning/tenant-templates/packages/investment-house/IdentificationTypesSettings.yamlsrc/LedgerTM.Seeding.Provisioning/tenant-templates/packages/investment-house/RateStructureSettings.yamlsrc/LedgerTM.Seeding.Provisioning/tenant-templates/packages/microlender/IdentificationTypesSettings.yamlsrc/LedgerTM.Seeding.Provisioning/tenant-templates/packages/microlender/RateStructureSettings.yamlsrc/LedgerTM.Seeding.Provisioning/tenant-templates/packages/personal-lender/IdentificationTypesSettings.yamlsrc/LedgerTM.Seeding.Provisioning/tenant-templates/packages/personal-lender/RateStructureSettings.yamlsrc/LedgerTM.Seeding.Provisioning/tenant-templates/packages/retail-bank/AccountTypesSettings.yamlsrc/LedgerTM.Seeding.Provisioning/tenant-templates/packages/retail-bank/IdentificationTypesSettings.yamlsrc/LedgerTM.Seeding.Provisioning/tenant-templates/packages/retail-bank/InstitutionConnectionSettings.yamlsrc/LedgerTM.Seeding.Provisioning/tenant-templates/packages/retail-bank/RateStructureSettings.yamlsrc/LedgerTM.Seeding.ZaRetail.Samples/Steps/SampleData/SeedSimulationCardProcessor.cssrc/_creditplus/docs/superpowers/plans/2026-03-15-phase3-ui-commands-batch.mdsrc/_creditplus/docs/superpowers/plans/2026-03-18-ui-phase2-account-config-counterparties.mdsrc/_creditplus/frontend/src/components/ui/card.tsxsrc/_creditplus/frontend/src/pages/Dashboard.tsxsrc/_creditplus/frontend/src/pages/account-types/AccountTypeCreate.tsxsrc/_creditplus/frontend/src/pages/account-types/AccountTypeView.tsxsrc/_creditplus/frontend/src/pages/accounts/create/AccountCreateWizard.tsxsrc/_creditplus/frontend/src/pages/accounts/tabs/ForecastTab.tsxsrc/_creditplus/frontend/src/pages/accounts/tabs/InstalmentsTab.tsxsrc/_creditplus/frontend/src/pages/accounts/tabs/OverviewTab.tsxsrc/_creditplus/frontend/src/pages/accounts/tabs/PositionsTab.tsxsrc/_creditplus/frontend/src/pages/accounts/tabs/PropertiesTab.tsxsrc/_creditplus/frontend/src/pages/accounts/tabs/SchedulesTab.tsxsrc/_creditplus/frontend/src/pages/admin/BatchDetail.tsxsrc/_creditplus/frontend/src/pages/admin/BatchHistory.tsxsrc/_creditplus/frontend/src/pages/admin/CommandDetail.tsxsrc/_creditplus/frontend/src/pages/admin/ReconAccountDetail.tsxsrc/_creditplus/frontend/src/pages/admin/ReconAccountType.tsxsrc/_creditplus/frontend/src/pages/admin/ReconDashboard.tsxsrc/_creditplus/frontend/src/pages/admin/WorkersPage.tsxsrc/_creditplus/frontend/src/pages/batch/BatchProcessing.tsxsrc/_creditplus/frontend/src/pages/counterparties/CounterpartyCreate.tsxsrc/_creditplus/frontend/src/pages/counterparties/CounterpartyDetail.tsxsrc/_creditplus/frontend/src/pages/settings/DataInit.tsxsrc/_creditplus/frontend/src/pages/settings/Settings.tsxsrc/ui-apps/bank/src/__tests__/features/accounts/create/create-account-form.test.tsxsrc/ui-apps/bank/src/__tests__/features/counterparties/shared/identification-record-payload.test.tsxsrc/ui-apps/bank/src/__tests__/features/counterparties/shared/identification-step.test.tsxsrc/ui-apps/bank/src/__tests__/features/counterparties/shared/identifications-panel.test.tsxsrc/ui-apps/bank/src/__tests__/features/settings/rate-structures-page.test.tsxsrc/ui-apps/bank/src/__tests__/fixtures/type-catalogs.za-retail.jsonsrc/ui-apps/bank/src/components/error-boundary.tsxsrc/ui-apps/bank/src/components/financial-summary/positions-cards.tsxsrc/ui-apps/bank/src/components/panels/panel-section-header.tsxsrc/ui-apps/bank/src/features/account-types/create/create-account-type-wizard.tsxsrc/ui-apps/bank/src/features/accounts/create/create-account-form.tsxsrc/ui-apps/bank/src/features/accounts/create/schedules-step.tsxsrc/ui-apps/bank/src/features/accounts/generic/panels/details-panel.tsxsrc/ui-apps/bank/src/features/authorisations/approver-review.tsxsrc/ui-apps/bank/src/features/authorisations/mobile/mobile-enrolment.tsxsrc/ui-apps/bank/src/features/authorisations/mobile/mobile-queue.tsxsrc/ui-apps/bank/src/features/cards/card-issue-dialog.tsxsrc/ui-apps/bank/src/features/cards/card-operation-dialogs.tsxsrc/ui-apps/bank/src/features/cards/card-viewer.tsxsrc/ui-apps/bank/src/features/collections/work-case-page.tsxsrc/ui-apps/bank/src/features/connectivity/card-processor-form.tsxsrc/ui-apps/bank/src/features/connectivity/card-processor-page.tsxsrc/ui-apps/bank/src/features/counterparties/persons/panels/person-cards-panel.tsxsrc/ui-apps/bank/src/features/counterparties/shared/counterparty-form.tsxsrc/ui-apps/bank/src/features/designer/outcome-panel.tsxsrc/ui-apps/bank/src/features/designer/spec-panel.tsxsrc/ui-apps/bank/src/features/entity-types/card-types.tsxsrc/ui-apps/bank/src/features/settings/category-taxonomy.tssrc/ui-apps/bank/src/features/settings/counterparty-search-page.tsxsrc/ui-apps/bank/src/features/settings/failed-request-retention-page.tsxsrc/ui-apps/bank/src/features/settings/rate-structures-page.tsxsrc/ui-apps/bank/src/features/settings/tenant-secrets-page.tsxsrc/ui-apps/bank/src/features/suspense/case-page.tsxsrc/ui-apps/bank/src/features/suspense/dashboard-panel.tsxsrc/ui-apps/bank/src/features/system/batch-detail-page.tsxsrc/ui-apps/bank/src/features/system/command-detail-page.tsxsrc/ui-apps/bank/src/features/system/operations-page.tsxsrc/ui-apps/bank/src/features/system/recon/recon-account-detail.tsxsrc/ui-apps/bank/src/features/system/recon/recon-account-type.tsxsrc/ui-apps/bank/src/features/system/recon/recon-dashboard.tsxsrc/ui-apps/bank/src/features/system/reference-lookup-page.tsxsrc/ui-apps/bank/src/features/system/sample-data-page.tsxsrc/ui-apps/bank/src/features/system/workers-page.tsxsrc/ui-apps/bank/ui-review/adr-uat/flows/adr-835-server-probe.tssrc/ui-apps/shared/components/panels/display-panel.tsxsrc/ui-apps/shared/components/ui/card.tsx
CardAuthorisationDecision— 11 filesLedgerTM.Testing.Infrastructure/Cards/ScriptedDeciders.csLedgerTM.Tests.Architecture/CardVocabularyTests.csLedgerTM.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/CardReversalDoorTests.cssrc/LedgerTM.Cards/Application/Doors/DecideCardAuthorisation.cssrc/LedgerTM.Cards/Simulation/SimulateCommands.cssrc/LedgerTM.Contracts/Cards/CardAuthorisation.cssrc/LedgerTM.Contracts/Cards/ICardAuthorisationDecider.cs
CardAuthorisationRequest— 15 filesLedgerTM.Testing.Infrastructure/Cards/ScriptedDeciders.csLedgerTM.Tests.Architecture/CardVocabularyTests.csLedgerTM.Tests.Architecture/NoPrimaryAccountNumberTests.csLedgerTM.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/CardReversalDoorTests.csLedgerTM.Tests.Unit/Cards/PaymentologyInboundMapperTests.cssrc/LedgerTM.Cards/Application/Doors/DecideCardAuthorisation.cssrc/LedgerTM.Cards/Application/Processor/IInboundMapper.cssrc/LedgerTM.Cards/Application/Processor/PaymentologyInboundMapper.cssrc/LedgerTM.Contracts/Cards/CardAuthorisation.cssrc/LedgerTM.Contracts/Cards/CardReceipts.cssrc/LedgerTM.Contracts/Cards/ICardAuthorisationDecider.cs
CardClearingBatch— 7 filesLedgerTM.Tests.Architecture/contracts-shared-surface-baseline.txtLedgerTM.Tests.Component/Cards/CardClearingTests.csLedgerTM.Tests.Component/Cards/CardProcessorReceiptsTests.cssrc/LedgerTM.Cards/Application/DayEnd/CardClearingCommands.cssrc/LedgerTM.Cards/Application/Queries/ListCardClearingBatches.cssrc/LedgerTM.Cards/Bootstrapper.cssrc/LedgerTM.Contracts/Cards/CardClearing.cs
CardClearingException— 0 filesCardClearingItem— 8 filesLedgerTM.Testing.Infrastructure/Cards/StubCardProcessor.csLedgerTM.Tests.Architecture/contracts-shared-surface-baseline.txtLedgerTM.Tests.Component/Cards/CardClearingTests.csLedgerTM.Tests.Unit/Cards/PaymentologyClearingMapperTests.cssrc/LedgerTM.Cards/Application/Processor/IClearingFileMapper.cssrc/LedgerTM.Cards/Application/Processor/PaymentologyClearingMapper.cssrc/LedgerTM.Cards/Simulation/PaymentologySimulator.cssrc/LedgerTM.Contracts/Cards/CardClearing.cs
CardClearingItemOutcome— 0 filesCardClosed— 5 filesLedgerTM.Tests.Architecture/ShapeGate/stored-shapes.tsvsrc/LedgerTM.Cards/Application/Projections/CardSummaryProjection.cssrc/LedgerTM.Cards/Domain/Card.Events.cssrc/LedgerTM.Cards/Domain/Card.cssrc/LedgerTM.Hosting/event-identity.tsv
CardDeclineReason— 15 filesLedgerTM.Tests.Architecture/contracts-shared-surface-baseline.txtLedgerTM.Tests.Component/Cards/CardAuthorisationDoorTests.csLedgerTM.Tests.Component/Cards/CardClearingTests.csLedgerTM.Tests.Component/Cards/CardDeviceCredentialTests.csLedgerTM.Tests.Component/Cards/CardProcessorReceiptsTests.csLedgerTM.Tests.Component/Cards/CardTokenProvisioningDoorTests.csLedgerTM.Tests.Unit/Cards/PaymentologyOutboundMapperTests.cssrc/LedgerTM.Cards/Application/Doors/CardTokenProvisioningDecider.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.cssrc/LedgerTM.Contracts/Cards/ICardTokenProvisioningDecider.cs
CardHold— 0 filesCardHoldExpiryRule— 0 filesCardHoldExpirySettings— 0 filesCardHoldId— 0 filesCardHoldPlaced— 0 filesCardHoldReduced— 0 filesCardHoldReleaseReason— 0 filesCardHoldReleased— 0 filesCardHoldStatus— 0 filesCardProcessorSettings— 23 filesLedgerTM.Tests.Architecture/ShapeGate/stored-shapes.tsvLedgerTM.Tests.Architecture/TenantSettingsFolderTests.csLedgerTM.Tests.Component/Cards/CardProcessorClientTests.csLedgerTM.Tests.Component/Cards/CardProcessorSettingsTests.csLedgerTM.Tests.Component/Cards/CardsComponentFixture.cssrc/LedgerTM.Cards/Application/DayEnd/CardClearingCommands.cssrc/LedgerTM.Cards/Application/Doors/CardDoorClock.cssrc/LedgerTM.Cards/Application/Doors/DecideCardAuthorisation.cssrc/LedgerTM.Cards/Application/Doors/DecideCardTokenProvisioning.cssrc/LedgerTM.Cards/Application/Doors/ReverseCardAuthorisation.cssrc/LedgerTM.Cards/Application/Processor/CardProcessorClient.cssrc/LedgerTM.Cards/Application/Processor/PaymentologyProcessor.cssrc/LedgerTM.Cards/Application/Queries/GetCardProcessor.cssrc/LedgerTM.Cards/Application/Settings/AmendCardProcessor.cssrc/LedgerTM.Cards/Application/Settings/CardProcessorFacet.cssrc/LedgerTM.Cards/Domain/CardProcessorSettings.cssrc/LedgerTM.Cards/Simulation/SimulateCommands.cssrc/LedgerTM.Seeding.Provisioning/PackageExporter.cssrc/LedgerTM.Seeding.Provisioning/PackageImporter.cssrc/LedgerTM.Seeding.Provisioning/PackageModel.cssrc/LedgerTM.Seeding.ZaRetail.Samples/Steps/SampleData/SeedSampleCards.cssrc/LedgerTM.Seeding.ZaRetail.Samples/Steps/SampleData/SeedSimulationCardProcessor.cssrc/ui-apps/bank/src/features/settings/settings-class-map.ts
ExpireCardHoldsCommand— 0 filesExpireCardHoldsStep— 0 filesGetCardHoldExpiryQuery— 0 filesIAccountAvailabilityReader— 0 filesIAvailableBalanceReductionsReader— 0 filesListCardHoldsQuery— 0 filesMerchantCategoryCode— 16 filesLedgerTM.Tests.Architecture/CardVocabularyTests.csLedgerTM.Tests.Architecture/contracts-shared-surface-baseline.txtLedgerTM.Tests.Component/Cards/CardAuthorisationDoorTests.csLedgerTM.Tests.Component/Cards/CardClearingTests.csLedgerTM.Tests.Component/Cards/CardProcessorClientTests.csLedgerTM.Tests.Component/Cards/CardProcessorReceiptsTests.csLedgerTM.Tests.Unit/Cards/PaymentologyClearingMapperTests.csLedgerTM.Tests.Unit/Cards/PaymentologyInboundMapperTests.cssrc/LedgerTM.Cards/Application/Processor/PaymentologyBodies.cssrc/LedgerTM.Cards/Application/Processor/PaymentologyClearingMapper.cssrc/LedgerTM.Cards/Application/Processor/PaymentologyInboundMapper.cssrc/LedgerTM.Cards/Simulation/SimulateCommands.cssrc/LedgerTM.Cards/Simulation/SimulatorAuthorisation.cssrc/LedgerTM.Contracts/Cards/CardAuthorisation.cssrc/LedgerTM.Contracts/Cards/CardClearing.cssrc/LedgerTM.Contracts/Cards/MerchantCategoryCode.cs
PostCardClearingBatchCommand— 0 filesPostCardClearingStep— 0 filesProcessCardPurchaseCommand— 0 filesProcessCardRefundCommand— 0 filesReleaseCardHoldCommand— 0 filesSimulateCardAuthorisationCommand— 4 filesLedgerTM.Tests.Component/Cards/CardClearingTests.csLedgerTM.Tests.Component/Cards/CardProcessorClientTests.csLedgerTM.Tests.Component/Cards/CardProcessorReceiptsTests.cssrc/LedgerTM.Cards/Simulation/SimulateCommands.cs
TransactionPosted— 116 filesLedgerTM.Tests.Architecture/CascadedMoneyMoveTests.csLedgerTM.Tests.Architecture/DenormalisedReferenceReadTests.csLedgerTM.Tests.Architecture/ShapeGate/stored-shapes.tsvLedgerTM.Tests.Architecture/TransactionPostedConstructionSiteTests.csLedgerTM.Tests.Component/Accounts/AccountListEnrichmentSurvivesPostingTests.csLedgerTM.Tests.Component/Accounts/ActivateAccount/ActivateAccountBooksGateTests.csLedgerTM.Tests.Component/Accounts/Balance/BalanceExcludesArrearsTests.csLedgerTM.Tests.Component/Accounts/Balance/MemorandumPositionExclusionTests.csLedgerTM.Tests.Component/Accounts/Balance/MicroloanArrearsEndToEndTests.csLedgerTM.Tests.Component/Accounts/DayEnd/NoticedFundsFollowTheCardTests.csLedgerTM.Tests.Component/Accounts/DayEnd/SettlementNominationDegradeTests.csLedgerTM.Tests.Component/Accounts/Disbursements/CreditDisbursementTests.csLedgerTM.Tests.Component/Accounts/Operations/FurtherAdvanceInternalTests.csLedgerTM.Tests.Component/Accounts/Operations/InternalPayoutTransferTests.csLedgerTM.Tests.Component/Accounts/Operations/RailStepValueDatingTests.csLedgerTM.Tests.Component/Accounts/Operations/RecordedPayoutRefusalTests.csLedgerTM.Tests.Component/Accounts/Operations/TwoRailRefusalTests.csLedgerTM.Tests.Component/Accounts/Operations/UnresolvedPayoutDestinationTests.csLedgerTM.Tests.Component/Accounts/PostTransaction/PostTransactionEndpointTests.csLedgerTM.Tests.Component/Accounts/ReverseTransaction/PairedLegReversalOnRehydratedAccountTests.csLedgerTM.Tests.Component/Accounts/ReverseTransaction/ReverseTransactionEndpointTests.csLedgerTM.Tests.Component/Accounts/Statements/StatementLineCategoryTests.csLedgerTM.Tests.Component/Books/OeDailyBalanceSettledTests.csLedgerTM.Tests.Component/DayEnd/InterestPayoutGuardDegradeTests.csLedgerTM.Tests.Component/Import/ImportOutstandingTests.csLedgerTM.Tests.Component/Import/ImportTransactionsStepUnhappyPathTests.csLedgerTM.Tests.Component/Infrastructure/InfraAggregateEventsQueryTests.csLedgerTM.Tests.Component/Shapes/corpus/account-lifecycle.jsonLedgerTM.Tests.Unit/Accounts/Application/TransactionHistoryProjectionTests.csLedgerTM.Tests.Unit/Accounts/InternalTransferTests.csLedgerTM.Tests.Unit/Accounts/Operations/NoticeEarlyWithdrawalTests.csLedgerTM.Tests.Unit/Accounts/Operations/OperationInterpreterTests.csLedgerTM.Tests.Unit/Accounts/Operations/ZaRetailPayoutMigrationTests.csLedgerTM.Tests.Unit/Accounts/PostTransactionTaxRateTests.csLedgerTM.Tests.Unit/Accounts/Projections/AccountDetailAvailableBalanceTests.csLedgerTM.Tests.Unit/Accounts/ReverseTransactionTests.csLedgerTM.Tests.Unit/Accounts/Runtime/AccountTests.csLedgerTM.Tests.Unit/Accounts/Runtime/InstructionSettlementTests.csLedgerTM.Tests.Unit/Accounts/Runtime/OpenItemRestoreTests.csLedgerTM.Tests.Unit/Accounts/Runtime/OpenItemTests.csLedgerTM.Tests.Unit/Accounts/Runtime/ReverseOrCancelTests.csLedgerTM.Tests.Unit/Accounts/Runtime/TransactionSettlementTests.csLedgerTM.Tests.Unit/Accounts/Scenarios/NoticeExpiryWalkTests.csLedgerTM.Tests.Unit/Accounts/Valuation/OpeningAdvanceValueDateTests.csLedgerTM.Tests.Unit/Accounts/Workflows/WorkflowInterpreterTests.csLedgerTM.Tests.Unit/[redacted]/AccountFromDefinitionTests.csLedgerTM.Tests.Unit/[redacted]/TransactionImportTests.csLedgerTM.Tests.WorkerHost/WorkerHostBootSmokeTests.csLedgerTM.Tests/Integration.AccountLifecycle/AccountConcurrencyLifecycleTests.csLedgerTM.Tests/Integration.AccountLifecycle/CallDepositLifecycleFixture.csLedgerTM.Tests/Integration.AccountLifecycle/CallDepositLifecycleTests.csLedgerTM.Tests/Integration.AccountLifecycle/PersonalLoanLifecycleTests.csLedgerTM.Tests/Integration.CreditPlus/Application/Features/DepositCollectionAtActivationTests.csLedgerTM.Tests/Integration.CreditPlus/Application/Features/FixedDepositFundFromCallTests.csLedgerTM.Tests/Integration.CreditPlus/Application/Features/InstalmentCollectionOrderingTests.csLedgerTM.Tests/Integration.CreditPlus/Application/Features/OtherFundedOriginationTests.csLedgerTM.Tests/Integration.CreditPlus/Application/Projections/AccountDetailProjectionTests.csLedgerTM.Tests/Integration.CreditPlus/CreditPlusIntegrationFixture.csLedgerTM.Tests/Integration.CreditPlus/CreditPlusTransactionPostedEndToEndTests.cssrc/LedgerTM.Accounts/Application/Commands/ActivateAccount.cssrc/LedgerTM.Accounts/Application/Commands/InstructionSettlementStep.cssrc/LedgerTM.Accounts/Application/Commands/PostOpenItem.cssrc/LedgerTM.Accounts/Application/Commands/PostTransaction.cssrc/LedgerTM.Accounts/Application/Commands/ProcessExternalSourcePaymentHandlers.cssrc/LedgerTM.Accounts/Application/Commands/RevalueAccount.cssrc/LedgerTM.Accounts/Application/Commands/ReverseOpenItemClearing.cssrc/LedgerTM.Accounts/Application/Commands/ReverseTransactionCommandHandler.cssrc/LedgerTM.Accounts/Application/Commands/UnwindSettlementCommandHandler.cssrc/LedgerTM.Accounts/Application/Designer/SandboxDayWalk.cssrc/LedgerTM.Accounts/Application/IntegrationEvents/AccountIntegrationEventHandler.cssrc/LedgerTM.Accounts/Application/IntegrationEvents/AccountTriggerProjection.cssrc/LedgerTM.Accounts/Application/Integrations/CreditDisbursementOnTransactionPosted.cssrc/LedgerTM.Accounts/Application/Operations/AccountOperationResolver.cssrc/LedgerTM.Accounts/Application/Projections/AccountDetailReadModel.cssrc/LedgerTM.Accounts/Application/Projections/AccountFinancialSummaryReadModel.cssrc/LedgerTM.Accounts/Application/Projections/AccountListReadModel.cssrc/LedgerTM.Accounts/Application/Projections/AccountStatementLinesReadModel.cssrc/LedgerTM.Accounts/Application/Projections/AccountSummaryReadModel.cssrc/LedgerTM.Accounts/Application/Projections/NoticeReadModel.cssrc/LedgerTM.Accounts/Application/Projections/SuspenseItemReadModel.cssrc/LedgerTM.Accounts/Application/Projections/TransactionHistoryReadModel.cssrc/LedgerTM.Accounts/Application/Services/InstalmentRecalculator.cssrc/LedgerTM.Accounts/Application/Workflows/WorkflowInterpreter.cssrc/LedgerTM.Accounts/Bootstrapper.cssrc/LedgerTM.Accounts/Domain/Account.Events.cssrc/LedgerTM.Accounts/Domain/Account.Instructions.cssrc/LedgerTM.Accounts/Domain/Account.Posting.cssrc/LedgerTM.Accounts/Domain/Account.Snapshots.cssrc/LedgerTM.Accounts/Domain/Account.cssrc/LedgerTM.Accounts/Domain/BadDebtWriteOffPreview.cssrc/LedgerTM.Accounts/Domain/Configuration/AccountType.cssrc/LedgerTM.Accounts/Domain/Configuration/ExternalIntegrations.cssrc/LedgerTM.Accounts/Domain/Configuration/OpeningTransaction.cssrc/LedgerTM.Accounts/Domain/Configuration/ScheduledTransaction.cssrc/LedgerTM.Accounts/Domain/Transaction.cssrc/LedgerTM.BankStatements/BankDeposits/Application/Integrations/PostBankDepositOnAllocated.cssrc/LedgerTM.Books/Application/Commands/PostTransaction.cssrc/LedgerTM.Contracts/Accounts/PostTransactionReversalCommand.cssrc/LedgerTM.Contracts/Accounts/ProcessExternalSourceCommands.cssrc/LedgerTM.Contracts/Accounts/Triggers/PositionChangedTrigger.cssrc/LedgerTM.Contracts/Accounts/Triggers/PositionMovement.cssrc/LedgerTM.Contracts/Accounts/Triggers/TransactionPostedTrigger.cssrc/LedgerTM.Contracts/Accounts/Triggers/TransactionSnapshot.cssrc/LedgerTM.Contracts/Accounts/Triggers/TransactionSource.cssrc/LedgerTM.Hosting/event-identity.tsvsrc/LedgerTM.Seeding.[redacted].Conversion/Steps/ImportTransactionsStep.cssrc/LedgerTM.Suspense/Application/Commands/UnallocateSuspenseItem.cssrc/LedgerTM.Warehouse/Domain/ScheduleReconciliation.cssrc/_creditplus/docs/application_architecture.mdsrc/_creditplus/docs/architecture-overview.mdsrc/_creditplus/docs/archive/options/option-1/architecture.mdsrc/_creditplus/docs/archive/options/option-1/domain-model.mdsrc/_creditplus/docs/archive/options/option-1/migration-approach.mdsrc/_creditplus/docs/archive/strategy.mdsrc/_creditplus/docs/superpowers/plans/2026-03-14-rook-phase1-foundation.mdsrc/_creditplus/docs/superpowers/specs/2026-03-14-rook-option1-design.mdImplementations of changed types: 4
Card— 2:CardApproverViewReader(src/LedgerTM.Cards/Application/Authorisations/CardApproverViewReader.cs),CardIsItsOwnHolder(src/LedgerTM.Cards/Application/Authorisations/CardApproverViewReader.cs)CardProcessorSettings— 1:AmendCardProcessorCommand(src/LedgerTM.Cards/Application/Settings/AmendCardProcessor.cs)MerchantCategoryCode— 1:MerchantCategoryCodeJsonConverter(src/LedgerTM.Contracts/Cards/MerchantCategoryCode.cs) Files reading a touched file by path: 8LedgerTM.Testing.Infrastructure/TestingEnvironment.cs—LedgerTM.Tests.Component/Import/TransactionsImportComponentContext.csPaymentologyBodies.cs—LedgerTM.Tests.Component/Cards/CardProcessorReceiptsTests.csapp.tsx—src/ui-apps/bank/index.html,src/ui-apps/bank/src/__tests__/features/account-types/account-types-tabs.test.tsx,src/ui-apps/bank/src/__tests__/features/settings/settings-list-tabs.test.tsx,src/ui-apps/bank/src/__tests__/route-guard-helpers.ts,src/ui-apps/bank/src/__tests__/route-tree.ts,src/ui-apps/bank/src/__tests__/theme-boot-script.test.ts,src/ui-apps/bank/src/__tests__/window-location-guard.test.ts,src/ui-apps/bank/src/components/layout/rail-nav.tsx,src/ui-apps/bank/src/features/counterparties/flyout-config.ts,src/ui-apps/bank/src/lib/api.ts,src/ui-apps/bank/ui-review/targets/resolve-targets.ts,src/ui-apps/shared/lib/theme-key.tscard-viewer.tsx—src/ui-apps/bank/src/__tests__/standard-table-rowhref-guard.test.tscards.issuing—LedgerTM.Tests.Component/Cards/CardAuthorisationDoorTests.cs,LedgerTM.Tests.Component/Cards/CardClearingTests.cs,LedgerTM.Tests.Component/Cards/CardLifecycleTests.cs,LedgerTM.Tests.Component/Cards/CardOperationsTests.cs,LedgerTM.Tests.Component/Cards/CardProcessorReceiptsTests.cs,LedgerTM.Tests.Component/Cards/CardProcessorSettingsTests.cs,LedgerTM.Tests.Component/Cards/IssueCardTests.cs,src/LedgerTM.Cards/Application/DayEnd/CardClearingSteps.cs,src/LedgerTM.Infrastructure.Contracts/Features/FeatureCatalog.cs,src/LedgerTM.Operations/DispatchedOperations.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/counterparties/shared/panel-registry.tsx,src/ui-apps/bank/src/features/settings/category-taxonomy.tslib/api.ts—src/_creditplus/docs/architecture-overview.md,src/_creditplus/docs/superpowers/plans/2026-03-15-phase2-multitenancy-auth.md,src/_creditplus/docs/superpowers/plans/2026-03-15-phase3-ui-commands-batch.md,src/_creditplus/docs/superpowers/plans/2026-03-17-data-init-saga-workers.md,src/_creditplus/docs/superpowers/plans/2026-03-18-ui-phase2-account-config-counterparties.md,src/_creditplus/docs/superpowers/plans/2026-03-20-accounttype-crud-complete-fields.md,src/_creditplus/docs/superpowers/plans/2026-03-20-ui-polish-crud-validation.md,src/_creditplus/docs/superpowers/specs/2026-03-19-openapi-typescript-pipeline-design.md,src/ui-apps/bank/src/__tests__/field-kind-coverage-guard.test.ts,src/ui-apps/bank/src/__tests__/lib/api-no-drift.test.ts,src/ui-apps/bank/src/__tests__/window-location-guard.test.ts,src/ui-apps/bank/src/lib/api.ts,src/ui-apps/bank/src/lib/dev-act-as.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: 3 — CardHoldPlaced, CardHoldReduced, CardHoldReleased Aggregates touched: 1
Card—src/LedgerTM.Cards/Domain/Card.cs
Methods at CRAP 30+ in changed files: 2 (unit coverage, cached at main 442243a39)
LedgerTM.Accounts.Application.Commands.ExternalSourceDispatcher.BuildEvaluationContext— CRAP 506, complexity 22, 0% covered —src/LedgerTM.Accounts/Application/Commands/ProcessExternalSourcePaymentHandlers.csExternalSourceDispatcher.DispatchAsync— CRAP 420, complexity 20, 0% covered —src/LedgerTM.Accounts/Application/Commands/ProcessExternalSourcePaymentHandlers.csPermission keys to add: 9 — amend-card-hold-expiry, expire-card-holds, i-system, post-card-clearing-batch, process-card-purchase, process-card-refund, release-card-hold, get-card-hold-expiry-query, list-card-holds-query
Warnings
TransactionPostedis changed and read by 9 projects — name the seam in the ADR.Cardis changed and read by 8 projects — name the seam in the ADR.CardProcessorSettingsis changed and read by 4 projects — name the seam in the ADR.- A domain event is touched — set
reseed: trueand say so in the plan. LedgerTM.Accounts.Application.Commands.ExternalSourceDispatcher.BuildEvaluationContextis at CRAP 506 (and 1 more in that file) — write its test before the bite edits it, and name the test in the plan.- 7 feature projects touched — say why this is not two ADRs.
Land batches
One land — the whole ADR. Reseed at the land (reseed: true: the hold-expiry rows, the
two transaction types and operations on CallDeposit, the permission keys). The current
account ADR lands after this one.
Notes
- Depends on ADR-820 and ADR-835 (both Shipped). Nothing waits on the current account ADR; it consumes Decision 6’s exception path.
- The decider’s own unit of work is a tenant-scoped
IDocumentSessionfromIDocumentStoreunderICurrentUser.TenantId, as the provisioning decider reads; it appends to the card’s stream with optimistic concurrency and saves before returning. AConcurrencyExceptionreruns the whole decision once; a second conflict isDecisionFailed. - Available balance has one more input everywhere.
AvailableBalance.Projecttakes the reductions per position type; card holds reduce the account type’s first standard position (the funding position). Handlers readIAvailableBalanceReductionsReaderfor the accounts they touch and pass the figure down; the aggregate never calls the reader (F3). - The facility is the current account ADR’s (F1): no retail type integrates one, so this
ADR touches neither Limits nor a facility seam. Eight feature projects remain in the footprint
because Contracts, the catalogs, seeding, the test projects and the UI are touched by any
slice that adds a command; the domain change sits in
LedgerTM.CardsandLedgerTM.Accounts. - The posting runs the account type’s
card-purchaseoperation, which has no availability guard (F8): a clearing post is unconditional, and a call deposit can go below zero. The refusals that remain are an inactive account and a type without the integration. The current account ADR adds the unarranged-overdraft fee and rate. The transaction type names carry the GL mapping (books by type name). - Idempotency. A hold is keyed by its authorisation; a posting by a transaction id derived from the processor’s reference; a batch’s exceptions are rewritten on a re-run.
- The clearing post is step 44 and expiry step 45 (F13, F18): a line arriving that day
releases before expiry; the expiry step releases holds whose
ExpiresOnis on or before the trading date being closed. An overdue hold reduces available until the step releases it. - Incremental authorisations (a hotel or car hire topping up under new references) are each their own hold until expiry; the ADR names it out of scope.
- A funding account closed with open card holds keeps them until they expire, and its lines are exceptions retried each day-end; releasing on account closure is a later ADR’s.
- A clearing
Reversalwhose purchase never posted isREVERSAL_UNMATCHEDand touches no hold; an open hold under that authorisation expires in its own time. - GL: the chart template gains a liability row described “Card settlement payable”; the posting rules name it by its template key. The cards fixture’s accounts carry no posting group, so the legs are proven against the composed template, not a posted journal.
- Reachability. Every handler here is dispatched by its bite’s component test over the bus or
HTTP; the expiry step runs through
run-forwardinCardHoldReleaseTests; the clearing post by the bus inCardClearingPostTestsand through the import in its last clause. - ADR-820’s
CardClearingTestsitems name tokens with no card; after bite 5 they becomeUNKNOWN_TOKENexceptions on the batch, never a throw, so the tracked day-end acts stay green. AmendCardHoldExpiryCommandis four-eyes eligible through the settings approver view reader, as every settings command (plan grill point 14).- Phase A, 2026-10-02: 26 questions folded as F6–F11 and the Interfaces comments. Plan grill, 2026-10-02: 15 points folded as F12–F22, F1 reversed.
Changed during the plan grill
Phase A (26 questions) and the plan grill (15 points), 2026-10-02. The ADR’s own section carries
the decision-level changes; what the plan changed on its own: bites 3 and 4 merged; the fixture’s
account type guarded and integrated, funded through FundAsync, with a third call deposit and
the expiry rows; PlaceHoldAsync for bite 2; ScriptedDeciders.Around exposing the inner task;
the day-end helpers moved into the context; the guard context’s five callers listed; the
characterisation test of the dispatcher named before it is edited; PostingSettings.yaml and
the chart named; F1 reversed and F12–F22 added; CardHoldsByAccount and CardSpendByPeriod
dropped for one CardHold document. Phase B (six authors, 2026-10-02): F23–F28 — the post step
revisits a batch until every item is settled and retries exceptions; what released a hold is the
processor’s reference; ControlBreached stays plain; the simulator can leave an approval
uncleared; presence is the request’s flag; bands disjoint and capped; PositionDto.HeldExternally
declared; closure moved to bite 4’s files.
Landing notes
(appended by /ltm-partition and by lanes)
- Decided:
ProcessCardPurchaseCommandandProcessCardRefundCommandland in bite 5 with their handlers, not bite 1 · rests on:PermissionCatalogTestsrefuses a pinned key no handler owns · wrong if: a bite 1–4 test names either command. - Decided: the card hold’s Contracts types are baselined in
contracts-shared-surface-baseline.txtas a seam, not moved into Cards · rests on:## Interfacesdeclares them in Contracts and the bite 2 test compiles against that namespace · wrong if: the current account ADR never reads them. - Decided:
TransactionPostedalready carriesProperties, so bite 1 changes no event; the merchant reaches it through the dispatch context in bite 5 · rests on: F16 · wrong if: bite 5’s merchant properties are absent on the transactions read. - Decided: the card-processor form’s domestic-country field moves to bite 6 with the other UI · rests on: lanes prove UI at UAT only · wrong if: bite 6 lands without it.
- Bite 5’s authored test was corrected by its author (phase B re-dispatch): an
is nullpattern inside an expression tree did not compile; now== null. The file underdocs/adr/ADR-836-tests/carries the fix. - F-1791: the D7 accrual from a back-valued card post is proven only once ADR-837 bite 5 is in; ADR-836 does not fix the strict
<inPostTransaction.csorReverseTransactionCommandHandler.cs. - Decided: card holds reduce the account type’s first standard position through
ExternalReduction, passed intoAvailableBalance.Projecton the detail, the resolver, the guard context, the workflow refresh and the rail-fee cover check · rests on: D3, F15 · wrong if: a card-funded account’sCurrenton the detail differs from the availability reader. - Decided: the statutory-limit and provision contexts pass
ExternalReduction.None· rests on: card holds are not lending exposure and no lending type is card-fundable · wrong if: a card-funded type gains a provision matrix or a regulatory limit. - Decided: the notice guard’s held total does not count card holds · rests on: D6, the clearing post is unconditional and posts before it releases the hold · wrong if: a notice account becomes card-fundable.
- Decided: previews (sandbox forecast, instalment and adjustment replays) and the override-input defaults read no card holds; the execute, capture, dry-run and commit paths do · rests on: D3 names the guards that refuse money · wrong if: a preview approves a withdrawal the commit refuses for want of available.
- Decided:
Cardkeeps the open holds (id, account, remaining) on the aggregate and is still aggregated live; the inline snapshot (F22) is deferred · rests on: no test depends on it · wrong if: a tap on a long-lived card exceeds the door’s budget. - ADR-839 F26: the decider’s
CredentialExpiredcheck applies to a plastic or virtual credential only; a device token’s expiry belongs to the token service, and the processor declines a dead token itself. Build the decider that way; a renewal (ADR-839) never moves a device credential’s recorded expiry. - Decided:
CardHoldgainsReversed(what reversals freed), so a ceiling counts an approval net of reversals even after the hold is released for another reason · rests on: D1, F4 · wrong if: a reduced-then-expired hold is counted at its original amount against the daily ceiling. - Decided: the decider’s conflict-and-retry is
CardAuthorisationDecider.RetryingOnce, unit-tested inCardAuthorisationDeciderRetryTests· rests on: F27 · wrong if:two_taps_on_one_card_serialise_on_the_cardgoes red. - Decided: a device-token credential skips the expiry check (ADR-839 F26, landed on main mid-lane) · wrong if: a wallet tap is declined
CredentialExpired. - Decided: a dispatched post whose value date is before its trading date takes that value date (
WorkflowDispatchContext.BackValuedTo); a forward value date still raises an instruction · rests on: D6, a live file publishes a day late · wrong if:a_line_dated_yesterday_posts_value_dated_yesterdaygoes red. The accrual from the back-valued day is F-1791’s, fixed by ADR-837 bite 5. - Decided: the post step reads unsettled batches through
ListUnsettledCardClearingBatchesQuery(cards.list-unsettled-clearing-batches, a read, not system-internal) · rests on: a step takes only the bus · wrong if: a batch with an exception outcome is skipped at day-end. - Decided: the transactions read carries a posting’s text properties (
TransactionHistoryView.Properties), generic rather than card-only · rests on: F16 · wrong if: a non-card posting shows a property a clerk must not see. - Decided: the card transaction types carry ISO 20022 codes PMNT/CCRD/POSD (purchase) and PMNT/CCRD/RIMB (refund) · rests on: a master row requires a code · wrong if: a statement export misreads a card line.
- Not done: the characterisation test of
ExternalSourceDispatcher(F16) — its paths are proven by the existing external-source tests and bites 2 and 5; the simulator’s tip-and-refund demo lines — the probe reads holds and the account instead. - The simulator facet’s domestic country comes from the roster’s country, not a literal (
SampleStepsNameNoCountryTests). - Land: the standards register’s ISO 8583 row gains the three new response codes (54, 57, 61); the ISO 20022 BTC row names PMNT/CCRD/POSD and RIMB.