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-839 — Implementation Plan
Findings for the ADR
- F1 — bite 1 configures ADR-836’s integration rows and ADR-837’s and ADR-838’s types. The
cardFeeintegration sits besidecardPurchaseon every fundable type; the current account and the credit card gain it in whichever lane lands second. Bite 1 starts after ADR-836 lands; bite 2 can start now. - F2 — the fee cascade needs the card’s funding account.
CardSummary.FundingRulecarries the ordered accounts; the first is the fee’s account. A card with no funding account (a single-account card type before its account is set) posts no fee and logs it. Shape only. - F3 — the step needs a query over cards by expiry.
CardSummarycarries the credentials with their expiry; the step queries active and suspended cards whose primary credential’s expiry month ends within the lead. A supporting read, no decision; declared under## Interfaces. - F4 — the simulator’s clock. The simulator mints expiry from its keyed
TimeProviderplusCredentialLifeYears; the facet’sSimulatedCredentialLifeMonths, when set, replaces the years at mint and at reissue (reissue date plus the months). Shape only. - F5 — the external-source dispatcher binds no price lookup (phase A Q1):
price($feeType, valueDate)reads 0 there today. Bite 1 resolves the account’s price provider in the dispatcher (the owner’s plan, else the tenant default — Q2) and binds it. Decision 4. - F6 — issuance is charged the first time a card becomes active (Q4, Q5):
IssueCardcascades it for a virtual card,ActivateCardfor a plastic one, and the aggregate’sWasEverActivestops a replacement’s second activation charging again. Decision 3. - F7 — every new-number reissue is a replacement, and a clerk’s same-number reissue is a renewal (Q6, Q7): both cascade their fee. Decision 3.
- F8 — the renewal’s own guard (Q12):
Card.RequireRenewal()admitsActiveandSuspended; ADR-835’s status table andCardLifecycleTestsare untouched. Decision 1. - F9 — a renewal moves every open credential’s expiry (Q17):
Apply(CardReissued)withSameNumberNewExpirywrites the answered expiry on the primary and every open device credential;CardSummaryProjectionfollows. Decision 1. - F10 — the step’s outcome (Q13–Q16):
Completed(renewed + refused, note)whenever anything was attempted,Skippedonly when nothing was due; a transport fault counts as refused; the note names display name and last four; tests run the full walk and “today” is the closing date. - F11 — a missing price row (Q3) refuses the fee at run time with
CARD_FEE_UNPRICED; the cascade dead-letters. Decision 5 changed. - F12 — the fee’s id and its naming (Q8, Q11): the cascaded command carries the card event’s
version; the id derives from card id, fee type and version; the posting’s properties carry
feeTypeandcardId, its source reference the card’s id. Decision 4. - F13 — no guard on the fee (Q9): a fee can overdraw a deposit as a clearing line can.
- F14 — a refused fee’s observable (Q10): the cascade’s dead letter; no funding account means no cascade and no dead letter, and the card act stands.
- F15 — the validator (Q18):
AmendCardTypesrefuses withCARD_TYPE_RENEWAL_LEAD_INVALID; provisioning runs the same validator. - F16 — replay safety (Q19): the step’s guard is “a renewed credential leaves the selection; a re-run on the same date selects only what the first did not renew”; the simulated tenant’s short life is the stated exception and harmless.
- F17 — the simulated life is two months, set by the seed step (Q21, Q24): one month sits
inside the lead and renews daily; the facet is seeded by
SeedSimulationCardProcessor, not YAML. Decision 6 and the worked example changed; the demo claim is “within six weeks”. - F18 — two scenarios were vacuously true (phase A, c): “a fee priced at nothing” gains a priced positive control; “a lost card is not renewed” runs beside an active card that is.
- F19 —
Renewis a verb and a status-table row (plan grill 1):Card.ReissuerunsRequireReissueitself, so a second guard outside the table would fail on a suspended card and breakCardOperationGuardParityTests.CardVerb.Renew, admitted onActiveandSuspended, excluded from the menu; F8 superseded. - F20 — fee ids from facts (grill 2): no aggregate version exists at handler time;
TransactionId.ForwithIdPart()—{card}-card-issuance-fee,{newToken}-card-replacement-fee,{token}-{expiry}-card-renewal-fee.CardVersionleaves the command; F12 superseded. - F21 — the fee is published, with its date and a typed fee type (grill 3, 4): an aggregate
handler’s returned messages are appended as events, so the fee command is published beside
the mirror;
IssueCardpublishes its own;ChargeCardFeeCommandcarriesOnfrom the card event;FeeTypeisPriceTypeIdon both commands. - F22 — the price provider and the value date (grill 5, 6):
IPriceProviderResolver .ResolveAsync(tenant, account)gives the account’s plan or null — no tenant default exists — so an account with no plan prices nothing and posts nothing; the dispatcher bindsvalueDatetoo;ExternalIntegrationsValidatordeclarescardFee’s parameters. - F23 — the unpriced refusal is ADR-704’s (grill 7):
UnpricedOnDateException, not a new code; a fee on a funding account that is not active is forgone and logged, never retried — the dispatcher’s refusal is caught inProcessCardFeeCommandHandler. F11, F14 superseded. - F24 — the properties are dispatcher-supplied (grill 8): ADR-836’s
WorkflowDispatchContext.Properties; the handler suppliesfeeTypeandcardId; the characterisation test ADR-836 names gains a price-binding case before the edit. - F25 — the simulator’s clock is the trading date (grill 9):
CardDoorClockis the wall clock in production while the probe walks the trading date; the simulator readsITradingDateServicefor a credential’s life and the facet throughISettingsProvider;LifeOfyields months when set. Every sample card on the simulated tenant gets the short life. - F26 — device tokens keep their own expiry (grill 10): moving them would change what a
stored
CardReissuedmeans on replay; ADR-836’s decider skips the expiry check on a device credential instead (landing note on its plan). F9 reversed. - F27 — the step command carries no tenant (grill 11):
InvokeForTenantAsyncputs it on the envelope; the handler takesIMessageBus; expiry sits behind a JSON converter, so the handler filters the tenant’s summaries in memory with the per-type lead. - F28 — the facet refuses a simulated life inside the lead (grill 12):
AmendCardProcessorchecksmonths × 28against the largestRenewalLeadDayson the tenant’s card types (the default 45 when there are none), on any facet kind;AmendCardTypeschecks the other way; the seed runs the same check and orders itself beforeSeedSampleCards; the months are set only on a tenant the seed builds, whichreseed: truecovers. - F29 — the step’s records are its renewals (phase B, bite 3):
Completed(renewed, note), the note carrying the refused count and names; a day with one refusal and nothing renewed isCompletedwith no records. F10 corrected. - F30 — a forgone fee is a card event (bite 1, the auditor’s seat):
CardFeeForgone(FeeType, Reason, On)on the card’s stream for an inactive funding account or a funding rule with no account. F23 extended. - F31 — one clock, and the simulator keeps each card’s life (bite 3): every simulated
expiry, years path included, comes from the trading date;
SimulatorCardcarries its life so a reissue answers the life it was minted with (LifeOfgoes). - F32 — a template test (bite 1): every account type carrying
cardPurchasecarriescardFeeandCardFeeCharged, and the three price rows exist, on every composed preset. - F33 — scenario wordings (bites 1, 2): “two tenants” is two price lists; “a day later than the lead” is a type whose lead is one day shorter; a suspended card renewed stays suspended; an empty display name leaves the last four alone in the note; the step catches each card’s exception before any retry policy.
Files touched
Bite 1 — the card fee
src/LedgerTM.Contracts/Accounts/ProcessExternalSourceCommands.cs—ProcessCardFeeCommandsrc/LedgerTM.Contracts/Accounts/Triggers/TransactionSource.cs—CardFeesrc/LedgerTM.Accounts/Domain/Configuration/ExternalIntegrations.cs,src/LedgerTM.Accounts/Yaml/ExternalIntegrationsYamlConverter.cs—CardFee(yamlcardFee)src/LedgerTM.Accounts/Application/Commands/ProcessExternalSourcePaymentHandlers.cs—ProcessCardFeeCommandHandler: the dispatcher withfeeTypeas a string parameter, binding the account’s price provider throughIPriceProviderResolverand the value date (F5, F22);feeTypeandcardIdas dispatcher-supplied properties (F24); an inactive account forgone and logged (F23)src/LedgerTM.Accounts/Application/Settings/ExternalIntegrationsValidator.cs—cardFeesuppliesamount,feeType(F22)LedgerTM.Tests.Component/Accounts/ExternalSourceDispatcherCharacterisationTests.cs(ADR-836’s) — a price-binding case before the edit (F24)src/LedgerTM.Infrastructure.Contracts/AccessControl/PermissionCatalog.cs—accounts.process-card-fee(system-internal)src/LedgerTM.Cards/Application/Commands/CardHandling.cs—MirroredAndChargedAsync(card, fee, bus): publishesChargeCardFeeCommandbeside the mirror; a card with no funding account publishes nothing (F2, F21)src/LedgerTM.Cards/Application/Commands/ChargeCardFee.cs— new;ChargeCardFeeCommand(CardId, PriceTypeId FeeType, TransactionId Fee, DateOnly On)(system) and its handler:ProcessCardFeeCommandto the first funding account (F20, F21)src/LedgerTM.Cards/Domain/Card.cs—WasEverActive(F6)src/LedgerTM.Cards/Application/Commands/IssueCard.cs,ActivateCard.cs,ReissueCard.cs—card-issuance-feethe first time the card becomes active;card-replacement-feeon aNewNumberreissue;card-renewal-feeon a clerk’sSameNumberNewExpiry(F6, F7)src/LedgerTM.Infrastructure.Contracts/AccessControl/PermissionCatalog.cs—cards.charge-card-fee(system-internal)src/LedgerTM.Seeding.Provisioning/tenant-templates/packages/retail-bank/AccountTypesSettings.yaml—CardFeeChargedand thecard-feeoperation (inputfeeType,postTransaction CardFeeCharged price($feeType, valueDate)underwhenCondition price($feeType, valueDate) > 0) andexternalIntegrations.cardFeeon every type that carriescardPurchasesrc/LedgerTM.Seeding.Provisioning/tenant-templates/packages/retail-bank/PriceSettings.yaml—card-issuance-fee(0),card-replacement-fee(150),card-renewal-fee(0) and their price-list rowssrc/LedgerTM.Seeding.Provisioning/tenant-templates/packages/retail-bank/PostingSettings.yaml—CardFeeCharged: Dr the deposit liability (or the card receivable), Cr fee incomeLedgerTM.Tests.Component/Cards/CardsComponentFixture.cs— the fixture’s account type gains thecardFeeintegration, thecard-feeoperation andCardFeeCharged(throughwithType:), a price list holding the three types assigned to the demo customersrc/LedgerTM.Cards/Domain/Card.Events.cs,Card.cs,src/LedgerTM.Hosting/event-identity.tsv—CardFeeForgone(F30)LedgerTM.Tests.Unit/Seeding/CardFeeTemplateTests.cs— new (F32)LedgerTM.Tests.Component/Cards/CardFeeTests.cs— new
Bite 2 — renewal at day-end
src/LedgerTM.Cards/Domain/CardTypesSettings.cs—CardType.RenewalLeadDays(default 45; 1 to 365, below the life)src/LedgerTM.Cards/Application/Settings/AmendCardTypes.cs— the bound,CARD_TYPE_RENEWAL_LEAD_INVALID(F15)LedgerTM.Testing.Infrastructure/Cards/StubCardProcessor.cs— a per-token reissue refusal and a transport fault, scriptedsrc/LedgerTM.Seeding.Provisioning/tenant-templates/packages/retail-bank/CardTypesSettings.yaml—renewalLeadDays: 45on each typesrc/LedgerTM.Cards/Domain/Card.cs,CardStatusTable—CardVerb.Renewadmitted onActiveandSuspended, excluded from the menu;Card.Renew(credential, on)emittingCardReissued(SameNumberNewExpiry)(F19)src/LedgerTM.Cards/Application/Commands/RenewCardCredential.cs— new;RenewCardCredentialCommandand its handler: the processor’s same-number reissue,card.Renew, plastic ordered, mirrored and chargedcard-renewal-feesrc/LedgerTM.Cards/Application/DayEnd/CardRenewalStep.cs— new;RenewCardCredentialsStep(46),RenewExpiringCardCredentialsCommand(TradingDate)and its handler: the tenant’s summaries filtered in memory with the per-type lead (F3, F27), oneRenewCardCredentialCommandper card through the bus, refusals in the notesrc/LedgerTM.Infrastructure.Contracts/AccessControl/PermissionCatalog.cs—cards.renew-card-credential,cards.renew-expiring-card-credentials(system-internal)LedgerTM.Tests.Architecture/ShapeGate/stored-shapes.tsv—CardType.RenewalLeadDays(default:45)LedgerTM.Tests.Component/Cards/CardRenewalTests.cs— new
Bite 3 — the demo, the guide, the probe
src/LedgerTM.Cards/Domain/CardProcessorSettings.cs,src/LedgerTM.Cards/Application/Settings/CardProcessorFacet.cs,AmendCardProcessor.cs—SimulatedCredentialLifeMonths(nullable; refused whenmonths × 28does not clear the largest lead, F28)src/LedgerTM.Cards/Simulation/PaymentologySimulator.cs,SimulatorCard— reads the facet throughISettingsProviderand the trading date throughITradingDateServicefor every credential’s life, at mint and at reissue; the card keeps its life (F4, F25, F31)src/LedgerTM.Seeding.ZaRetail.Samples/Steps/SampleData/SeedSimulationCardProcessor.cs— runs the facet check and orders beforeSeedSampleCards(F28)LedgerTM.Tests.Architecture/ShapeGate/stored-shapes.tsv—CardProcessorSettings.SimulatedCredentialLifeMonths(default:null)src/LedgerTM.Seeding.ZaRetail.Samples/Steps/SampleData/SeedSimulationCardProcessor.cs— setsSimulatedCredentialLifeMonthsto two on the simulated tenant (F17)src/ui-apps/bank/ui-review/adr-uat/flows/adr-839-server-probe.ts— newdocs/guide/features/cards.md— renewal and the three fees;docs/guide/features/card-types.md— the lead days;docs/guide/features/card-processor.md— the simulated lifeLedgerTM.Tests.Component/Cards/CardRenewalSimulationTests.cs— new
Prior art
Nothing changed since the grill. Two supporting shapes the signatures needed —
RenewExpiringCardCredentialsCommand (the step’s tenant command, as every card step has one) and
CardHandling.ChargeFeeAsync — carry no decision.
Interfaces
// src/LedgerTM.Contracts/Accounts/ProcessExternalSourceCommands.cs — new (D4), beside ProcessCardPurchaseCommand
[PermissionKey("accounts.process-card-fee")]
public record ProcessCardFeeCommand(AccountId AccountId, TransactionId TransactionId, PriceTypeId FeeType, DateOnly TradingDate, DateOnly ValueDate, string SourceRef) : ISystemCommand;
// SourceRef is the card's id. The handler: an account that is not Active → log, return nothing (F23); else run the type's cardFee integration with parameters amount = 0, feeType = FeeType.IdPart(),
// binding the account's price provider (IPriceProviderResolver.ResolveAsync(tenant, account); null → prices 0) and valueDate (F22), and supplying properties feeType, cardId through WorkflowDispatchContext.Properties (F24);
// the operation prices it: whenCondition price($feeType, valueDate) > 0 → postTransaction CardFeeCharged price($feeType, valueDate). Refused ACCOUNT_TYPE_DOES_NOT_ACCEPT_CARD_FEES without the integration;
// a price type with no price on the day is ADR-704's UnpricedOnDateException, dead-lettered (F23). No guard (F13). TransactionSource gains CardFee. TransactionId comes from the caller (F20).
// src/LedgerTM.Cards/Application/Commands/CardHandling.cs — changed (D4)
public static Task<object[]> MirroredAndChargedAsync(Card card, CardFee fee, IMessageBus bus); // mirror as today, then publishes ChargeCardFeeCommand when the funding rule names an account; none → card.ForgoFee(fee, "no funding account") (F2, F21, F30)
// src/LedgerTM.Cards/Domain/Card.Events.cs — new (F30)
[MessageIdentity("cards.card-fee-forgone")] public record CardFeeForgone(CardId Id, PriceTypeId FeeType, string Reason, DateOnly On) : DomainEvent;
// ChargeCardFeeCommandHandler: an inactive funding account → the Accounts handler answers "forgone" and the Cards handler records CardFeeForgone(…, "funding account not active").
public readonly record struct CardFee(PriceTypeId Type, TransactionId Id, DateOnly On); // Id from facts (F20): TransactionId.For($"{card.IdPart()}-card-issuance-fee"), For($"{newToken.IdPart()}-card-replacement-fee"), For($"{token.IdPart()}-{expiry}-card-renewal-fee")
// IssueCard publishes its own ChargeCardFeeCommand for a virtual card (no mirror there, F21).
// src/LedgerTM.Cards/Application/Commands/ChargeCardFee.cs — new (D4, F20, F21)
[PermissionKey("cards.charge-card-fee")]
public record ChargeCardFeeCommand(CardId Id, PriceTypeId FeeType, TransactionId Fee, DateOnly On) : ICommand, ISystemCommand { public AuthorisationTarget Target => new("Card", Id.Value); }
// Handler: reads the summary's funding rule; ProcessCardFeeCommand(fundingRule.Accounts[0], Fee, FeeType, On, On, SourceRef: Id.Value). A refusal dead-letters here, never in the card's own chain.
// src/LedgerTM.Cards/Domain/Card.cs — changed (D1, D3, F19)
public bool WasEverActive { get; } // true from the first CardActivated or a virtual issue; IssueCard/ActivateCard charge card-issuance-fee only when it was false (F6)
public void Renew(CardCredential credential, DateOnly on); // Require(CardVerb.Renew): Active or Suspended, a status-table row excluded from the menu; emits CardReissued(SameNumberNewExpiry, credential, on)
// Device credentials keep their own expiry (F26); ADR-836's decider does not check expiry on a device credential.
// src/LedgerTM.Cards/Application/Commands/RenewCardCredential.cs — new (D1)
[PermissionKey("cards.renew-card-credential")]
public record RenewCardCredentialCommand(CardId Id) : ICommand, ISystemCommand { public AuthorisationTarget Target => new("Card", Id.Value); }
// Handler: card.Require(CardVerb.Renew) (F19); processor.ReissueAsync(primary token, SameNumberNewExpiry); card.Renew(credential, on); OrderPlasticAsync for a plastic credential;
// MirroredAndChargedAsync(card, "card-renewal-fee", bus). A refusal from the processor surfaces as the DomainException the user's reissue raises. The expiry recorded is the processor's answer.
// src/LedgerTM.Cards/Application/DayEnd/CardRenewalStep.cs — new (D1, D2)
public sealed class RenewCardCredentialsStep(IMessageBus bus) : IDayEndStep // Id "cards.renew-credentials", order 46, PreIncrement, NonCritical, FeatureKey "cards.issuing", RequiresSimulation false
[PermissionKey("cards.renew-expiring-card-credentials")]
public record RenewExpiringCardCredentialsCommand(DateOnly TradingDate) : ICommand, ISystemCommand { … } // the tenant rides the envelope (F27); the handler takes IMessageBus
public sealed record CardRenewalStepResult(int Renewed, int Refused, string? Note);
// Handler: every CardSummary with Status Active or Suspended whose primary (non-device, open) credential's expiry month ends on or before TradingDate + the type's RenewalLeadDays (inclusive, no lower bound), read once per run;
// per card: bus.InvokeAsync(RenewCardCredentialCommand); any exception is counted as refused and the card named (display name, last four) in the note; never throws for a card.
// Outcome: Completed(renewed, note) when anything was attempted — the note carries the refused count and names (display name, or last four alone) — Skipped("nothing to renew") otherwise (F29). Each card's exception is caught before any retry policy (F33).
// [ReplaySafe(Guard = "a renewed credential leaves the selection; a re-run on the same date selects only what the first did not renew")] (F16).
// src/LedgerTM.Cards/Domain/CardTypesSettings.cs — changed (D1)
public int RenewalLeadDays { get; set; } = 45; // yaml renewalLeadDays; validator (AmendCardTypes and provisioning): 1..365, below CredentialLifeYears * 365, and below the facet's SimulatedCredentialLifeMonths * 28 when set (F28)
// src/LedgerTM.Cards/Domain/CardProcessorSettings.cs — changed (D6)
public int? SimulatedCredentialLifeMonths { get; set; } // set by SeedSimulationCardProcessor (two months); the simulator mints and reissues expiry = the tenant's trading date + months when set, else + the type's years (F4, F17, F25); refused when months × 28 does not clear the largest lead (F28); a live processor ignores it
// Configuration (D4, D5) — retail AccountTypesSettings.yaml, every type carrying cardPurchase:
// transactionTypes: CardFeeCharged (Dr Current on a deposit type; Dr Fees, Dr Outstanding on CreditCard; costOfCreditCategory Fee where the type is regulated)
// operations: card-fee → inputs amount (Decimal), feeType (String); steps: whenCondition price($feeType, valueDate) > 0 → postTransaction CardFeeCharged price($feeType, valueDate)
// externalIntegrations: cardFee → card-fee
// PriceSettings.yaml: card-issuance-fee 0, card-replacement-fee 150, card-renewal-fee 0
// CardTypesSettings.yaml: renewalLeadDays: 45 on debit and virtual-debit (and credit, ADR-838)
Bites
| Bite | Description | Acceptance criterion | Status |
|---|---|---|---|
| 1 | ProcessCardFeeCommand, the cardFee integration and CardFeeCharged on the fundable types, the three price rows, the fee cascade on activation and on a new-number reissue, CardFeeForgone, the template test |
a replaced card is charged the replacement fee; a fee priced at nothing posts nothing; a fee on a closed funding account is forgone and recorded; a redelivered replacement fee posts once; CardFeeTemplateTests green |
Pending |
| 2 | RenewalLeadDays on the card type, the Renew verb, RenewCardCredentialCommand, RenewCardCredentialsStep at 46, the refusal note |
a credential about to expire is renewed at day-end; a refused renewal is tried again tomorrow; a lost card is not renewed; an already expired credential is renewed and an ordered or closed card is not; a renewed card is not renewed again the next day; a transport fault counts as a refusal and does not stop the next card; renewal is never offered on the operator’s menu; a renewal lead is one to 365 days and below the credential’s life | Pending |
| 3 | The simulated life on the facet and its checks, the seed, the probe, the guide article, the day-end step in the operator’s step list | an operator watches a renewal in the simulated tenant; a clerk’s reissue on the simulated tenant takes the simulated life; the facet refuses a simulated life that does not clear the largest lead; a live processor ignores the simulated life; the simulated tenant is seeded with a two-month life | Pending |
Scenarios
Feature: a card is renewed before it expires, and its fees are rows
# Bite 1
Scenario: a replaced card is charged the replacement fee
Given an active card funded from a call deposit, and a replacement fee of 150
When the card is reported stolen and reissued with a new number
Then the old credential is closed and a new one minted
And the call deposit is charged 150 as a card fee, naming the card
# Seen at: route:/accounts/{id}
# Bite 1
Scenario: a fee priced at nothing posts nothing
Given an issuance fee priced at 50 on one price list and at nothing on another, each list on a customer's funding account
When a virtual card is issued for each customer, and a plastic card is activated for each
Then the first list's funding accounts are charged 50 once per card, and the second's see no transaction
And activating a replacement plastic on the first charges no second issuance fee
# Seen at: route:/accounts/{id}
# Bite 1
Scenario: a fee on a closed funding account is forgone and recorded
Given a lost card whose funding account has been closed
When it is reissued with a new number
Then the card is replaced, no fee posts, nothing dead-letters, and the card records the fee as forgone
# Seen at: route:/cards/{id}
# Bite 1
Scenario: a redelivered replacement fee posts once
Given a replaced card whose replacement fee has posted
When the fee is delivered again
Then the funding account still shows one card fee
# Seen at: route:/accounts/{id}
# Bite 2
Scenario: a credential about to expire is renewed at day-end
Given an active card with a wallet token whose credential's month ends exactly the lead days from the closing date
When day-end runs
Then the credential is reissued with the same number and the expiry the processor answered, and the wallet token keeps its own
And a card with the same expiry on a type whose lead is a day shorter is left alone, and the step reports one renewal
# Seen at: route:/cards/{id}
# Bite 2
Scenario: an already expired credential is renewed and an ordered or closed card is not
Given cards in the window: one whose month has already ended, one plastic and active, one ordered and never activated, one closed
When day-end runs
Then the expired one and the plastic one are renewed, the plastic one ordering a new plastic on the same token, and the other two are untouched
# Seen at: route:/cards/{id}
# Bite 2
Scenario: a renewed card is not renewed again the next day
Given a card renewed last night whose wallet token still carries the old expiry month
When the next day-end runs
Then nothing is renewed and the step is skipped
# Seen at: none
# Bite 2
Scenario: a transport fault counts as a refusal and does not stop the next card
Given two cards due, one whose processor call faults
When day-end runs
Then the healthy card is renewed, the faulted one is unchanged and named in the note, and the step reports one renewal
# Seen at: none
# Bite 2
Scenario: renewal is never offered on the operator's menu
Given an active card and a suspended card
When their menus are read
Then each offers the clerk's reissue and neither offers a renewal
# Seen at: route:/cards/{id}
# Bite 2
Scenario Outline: a renewal lead is one to 365 days and below the credential's life
Given a card type with a life of <life> years
When its lead is set to <lead> days
Then it is <outcome>
# Seen at: none
Examples:
| life | lead | outcome |
| 1 | 364 | accepted |
| 1 | 365 | refused |
| 3 | 365 | accepted |
| 3 | 366 | refused |
| 3 | 0 | refused |
# Bite 2
Scenario: a refused renewal is tried again tomorrow
Given an active card whose credential expires within the lead days and a processor that refuses the reissue
When day-end runs
Then the step completes, its note names the card, and the credential is unchanged
And the next day-end, with the processor answering, renews it
# Seen at: none
# Bite 2
Scenario: a lost card is not renewed
Given a card reported lost or stolen and an active card, both with credentials expiring within the lead days
When day-end runs
Then the active card is renewed and the lost card's credential is unchanged
And a suspended card in the same run is renewed too and stays suspended
# Seen at: route:/cards/{id}
# Bite 3
Scenario: an operator watches a renewal in the simulated tenant
Given the simulated tenant, whose seed sets a simulated credential life of two months, and a lead of forty-five days
When a card is issued and the trading date walks to forty-five days before its expiry month ends
Then that day-end renews it to an expiry two months on, and the day-end log shows one renewal
And the day before renews nothing, and the day after leaves the renewed card alone
# Seen at: route:/cards/{id}
# Bite 3
Scenario: a clerk's reissue on the simulated tenant takes the simulated life
Given the simulated tenant with a two-month life and two active cards
When a clerk reissues one with the same number and the other with a new number
Then both credentials expire two months from the trading date
# Seen at: route:/cards/{id}
# Bite 3
Scenario Outline: the facet refuses a simulated life that does not clear the largest lead
Given card types whose leads are <leads>
When the processor facet is amended to a simulated life of <months> months
Then it is <outcome>
# Seen at: none
Examples:
| leads | months | outcome |
| 45 | 1 | refused |
| 45 | 2 | accepted |
| 56 | 2 | refused |
| 45, 60 | 2 | refused |
| 45, 60 | 3 | accepted |
# Bite 3
Scenario: a live processor ignores the simulated life
Given a processor facet naming a live processor that carries a simulated life of two months
When a card is issued on a three-year type
Then its expiry is three years on
# Seen at: none
# Bite 3
Scenario: the simulated tenant is seeded with a two-month life
Given the za-retail sample tenant
When its seed has run
Then its processor facet carries a simulated life of two months and every sample card's credential expires two months after its issue
# Seen at: none
Scenario → test
| Scenario | Bite | Project | Class | Method | Probe |
|---|---|---|---|---|---|
| a replaced card is charged the replacement fee | 1 | LedgerTM.Tests.Component |
CardFeeTests |
a_replaced_card_is_charged_the_replacement_fee |
adr-839-server-probe.ts |
| a fee priced at nothing posts nothing | 1 | LedgerTM.Tests.Component |
CardFeeTests |
a_fee_priced_at_nothing_posts_nothing |
— |
| a fee on a closed funding account is forgone and recorded | 1 | LedgerTM.Tests.Component |
CardFeeTests |
a_fee_on_a_closed_funding_account_is_forgone_and_recorded |
— |
| a redelivered replacement fee posts once | 1 | LedgerTM.Tests.Component |
CardFeeTests |
a_redelivered_replacement_fee_posts_once |
— |
| every card-funding type carries the fee rows (F32) | 1 | LedgerTM.Tests.Unit |
CardFeeTemplateTests |
every_card_funding_type_carries_the_card_fee_rows_and_the_three_prices_exist |
— template |
| a credential about to expire is renewed at day-end | 2 | LedgerTM.Tests.Component |
CardRenewalTests |
a_credential_about_to_expire_is_renewed_at_day_end |
adr-839-server-probe.ts |
| a refused renewal is tried again tomorrow | 2 | LedgerTM.Tests.Component |
CardRenewalTests |
a_refused_renewal_is_tried_again_tomorrow |
— |
| a lost card is not renewed | 2 | LedgerTM.Tests.Component |
CardRenewalTests |
a_lost_card_is_not_renewed |
— |
| an already expired credential is renewed and an ordered or closed card is not | 2 | LedgerTM.Tests.Component |
CardRenewalTests |
an_already_expired_credential_is_renewed_and_an_ordered_or_closed_card_is_not |
— |
| a renewed card is not renewed again the next day | 2 | LedgerTM.Tests.Component |
CardRenewalTests |
a_renewed_card_is_not_renewed_again_the_next_day |
— |
| a transport fault counts as a refusal and does not stop the next card | 2 | LedgerTM.Tests.Component |
CardRenewalTests |
a_transport_fault_counts_as_a_refusal_and_does_not_stop_the_next_card |
— |
| renewal is never offered on the operator’s menu | 2 | LedgerTM.Tests.Component |
CardRenewalTests |
renewal_is_never_offered_on_the_operators_menu |
— |
| a renewal lead is one to 365 days and below the credential’s life — 5 rows | 2 | LedgerTM.Tests.Component |
CardRenewalTests |
a_renewal_lead_is_one_to_365_days_and_below_the_credentials_life (a [Theory], one row per example) |
— refusal |
| an operator watches a renewal in the simulated tenant | 3 | LedgerTM.Tests.Component |
CardRenewalSimulationTests |
the_simulated_tenant_renews_a_card_on_its_next_day_end |
adr-839-server-probe.ts |
| a clerk’s reissue on the simulated tenant takes the simulated life | 3 | LedgerTM.Tests.Component |
CardRenewalSimulationTests |
a_clerks_reissue_on_the_simulated_tenant_takes_the_simulated_life_from_the_trading_date |
— |
| the facet refuses a simulated life that does not clear the largest lead — 5 rows | 3 | LedgerTM.Tests.Component |
CardRenewalSimulationTests |
the_facet_refuses_a_simulated_life_that_does_not_clear_the_largest_lead (a [Theory]) |
— refusal |
| a live processor ignores the simulated life | 3 | LedgerTM.Tests.Component |
CardRenewalSimulationTests |
a_live_processor_ignores_the_simulated_life |
— |
| the simulated tenant is seeded with a two-month life | 3 | LedgerTM.Tests.Component |
CardRenewalSimulationSeedTests |
the_simulated_tenant_is_seeded_with_a_two_month_life_and_its_sample_card_carries_it |
— seed |
UI-surface sweep
Swept src/ui-apps/bank/src for renewalLeadDays, credentialLifeYears, simulatedCredentialLifeMonths,
cardFee, CardFeeCharged, renew:
src/ui-apps/bank/src/features/settings/card-types/— the card types settings form carriescredentialLifeYears; gainsrenewalLeadDaysbeside it (bite 2; regenerated types)src/ui-apps/bank/src/features/settings/card-processor/— the facet form; gainssimulatedCredentialLifeMonths(bite 3)- The day-end run page lists steps by id and display name from the registry;
cards.renew-credentialsappears with no change. - No permission or feature key changes beyond the two system-internal catalog entries, which
permissions.generated.tscarries as every system key is carried.
Footprint
Feature projects touched: 8 — LedgerTM.Accounts, LedgerTM.Cards, LedgerTM.Contracts, LedgerTM.Hosting, LedgerTM.Infrastructure.Contracts, LedgerTM.Seeding.Provisioning, LedgerTM.Seeding.ZaRetail.Samples, ui-apps
LedgerTM.Accounts— 4 changed, 0 newLedgerTM.Cards— 12 changed, 0 newLedgerTM.Contracts— 2 changed, 0 newLedgerTM.Hosting— 1 changed, 0 newLedgerTM.Infrastructure.Contracts— 1 changed, 0 newLedgerTM.Seeding.Provisioning— 4 changed, 0 newLedgerTM.Seeding.ZaRetail.Samples— 1 changed, 0 newui-apps— 1 changed, 0 new Files: 46 named, 32 code, 4 config
Contracts types: 20 named, 14 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)IDayEndStep— fan-in 19, referenced (LedgerTM.Accounts, LedgerTM.BankStatements, LedgerTM.Books, LedgerTM.Cards, LedgerTM.Collections, LedgerTM.Compliance, LedgerTM.Currencies, LedgerTM.DayEnd, LedgerTM.Hosting, LedgerTM.Identifications, LedgerTM.Infrastructure, LedgerTM.Infrastructure.Contracts, LedgerTM.Metering, LedgerTM.Payments, LedgerTM.[redacted], LedgerTM.Scheduling, LedgerTM.Statements, LedgerTM.Suspense, LedgerTM.Tasks)Card— fan-in 8, changed (LedgerTM.Accounts, LedgerTM.Cards, LedgerTM.Infrastructure.Contracts, LedgerTM.Payments, LedgerTM.Seeding.Provisioning, LedgerTM.Seeding.ZaRetail.Samples, _creditplus, ui-apps)PriceTypeId— fan-in 6, referenced (LedgerTM.Accounts, LedgerTM.Contracts, LedgerTM.Metering, LedgerTM.Payments, LedgerTM.Pricing, LedgerTM.Seeding.Provisioning)TransactionSource— fan-in 6, changed (LedgerTM.Accounts, LedgerTM.Books, LedgerTM.Contracts, LedgerTM.Payments, LedgerTM.Tax, ui-apps)CardProcessorSettings— fan-in 4, changed (LedgerTM.Cards, LedgerTM.Seeding.Provisioning, LedgerTM.Seeding.ZaRetail.Samples, ui-apps)CardReissueKind— fan-in 3, referenced (LedgerTM.Cards, LedgerTM.Contracts, ui-apps)CardType— fan-in 3, changed (LedgerTM.Cards, LedgerTM.Seeding.Provisioning, ui-apps)CardCredential— fan-in 2, referenced (LedgerTM.Cards, LedgerTM.Contracts)CardExpiry— fan-in 2, referenced (LedgerTM.Cards, LedgerTM.Contracts)CardReissued— fan-in 2, changed (LedgerTM.Cards, LedgerTM.Hosting)ExternalIntegrations— fan-in 1, changed (LedgerTM.Accounts)CardFee— fan-in 0, changedCardFeeForgone— fan-in 0, changedCardRenewalStepResult— fan-in 0, changedChargeCardFeeCommand— fan-in 0, changedProcessCardFeeCommand— fan-in 0, changedRenewCardCredentialCommand— fan-in 0, changedRenewCardCredentialsStep— fan-in 0, changedRenewExpiringCardCredentialsCommand— fan-in 0, changed
Files reading each changed type: 14 types
Card— 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
CardFee— 0 filesCardFeeForgone— 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
CardReissued— 7 filesLedgerTM.Tests.Architecture/ShapeGate/stored-shapes.tsvLedgerTM.Tests.Component/Cards/CardLifecycleTests.cssrc/LedgerTM.Cards/Application/Projections/CardByTokenProjection.cssrc/LedgerTM.Cards/Application/Projections/CardSummaryProjection.cssrc/LedgerTM.Cards/Domain/Card.Events.cssrc/LedgerTM.Cards/Domain/Card.cssrc/LedgerTM.Hosting/event-identity.tsv
CardRenewalStepResult— 0 filesCardType— 12 filesLedgerTM.Tests.Component/Cards/CardControlsAndFundingTests.csLedgerTM.Tests.Component/Cards/CardTypesSettingsTests.csLedgerTM.Tests.Component/Cards/CardsComponentFixture.csLedgerTM.Tests.Component/Cards/IssueCardTests.cssrc/LedgerTM.Cards/Application/Queries/GetCardTypes.cssrc/LedgerTM.Cards/Application/Settings/AmendCardTypes.cssrc/LedgerTM.Cards/Domain/CardFundingRuleCheck.cssrc/LedgerTM.Cards/Domain/CardTypesSettings.cssrc/LedgerTM.Seeding.Provisioning/PackageImporter.cssrc/ui-apps/bank/src/features/cards/hooks/card-types.tssrc/ui-apps/bank/src/features/entity-types/card-types.tsxsrc/ui-apps/bank/src/lib/api.ts
ChargeCardFeeCommand— 0 filesExternalIntegrations— 12 filesLedgerTM.Tests.Architecture/ShapeGate/stored-shapes.tsvLedgerTM.Tests.Unit/Accounts/Configuration/CashOperationsSystemOnlyTests.csLedgerTM.Tests.Unit/Accounts/Operations/EvaluationContextParityTests.csLedgerTM.Tests.Unit/Accounts/Yaml/ExternalIntegrationsYamlTests.csLedgerTM.Tests/Integration.CreditPlus/Application/Features/OtherFundedOriginationTests.cssrc/LedgerTM.Accounts/Application/Commands/ProcessExternalSourcePaymentHandlers.cssrc/LedgerTM.Accounts/Application/Queries/ForecastAccount.cssrc/LedgerTM.Accounts/Application/Services/ExternalSourceCheck.cssrc/LedgerTM.Accounts/Application/Settings/ExternalIntegrationsValidator.cssrc/LedgerTM.Accounts/Domain/Configuration/AccountType.cssrc/LedgerTM.Accounts/Domain/Configuration/ExternalIntegrations.cssrc/LedgerTM.Accounts/Yaml/ExternalIntegrationsYamlConverter.cs
ProcessCardFeeCommand— 0 filesRenewCardCredentialCommand— 0 filesRenewCardCredentialsStep— 0 filesRenewExpiringCardCredentialsCommand— 0 filesTransactionSource— 51 filesLedgerTM.Tests.Component/Accounts/Disbursements/CreditDisbursementTests.csLedgerTM.Tests.Component/Accounts/ReverseTransaction/ReverseTransactionEndpointTests.csLedgerTM.Tests.Component/Accounts/TransactionHistoryExternalAccountTests.csLedgerTM.Tests.Component/Accounts/TransactionHistoryOrderingTests.csLedgerTM.Tests.Component/Books/PostTransactionTests.csLedgerTM.Tests.Component/Books/SubLedgerTestHelper.csLedgerTM.Tests.Unit/Accounts/Application/TransactionHistoryProjectionTests.csLedgerTM.Tests.Unit/Accounts/Commands/RevaluationEngineTests.csLedgerTM.Tests.Unit/Accounts/Disbursements/CreditDisbursementOnTransactionPostedTests.csLedgerTM.Tests.Unit/Accounts/IntegrationEvents/AccountTriggerProjectionTests.csLedgerTM.Tests.Unit/Accounts/ReverseTransactionTests.csLedgerTM.Tests.Unit/Accounts/Runtime/OpenItemRestoreTests.csLedgerTM.Tests.Unit/Accounts/Runtime/ReverseOrCancelTests.csLedgerTM.Tests.Unit/Accounts/Scenarios/NoticeExpiryWalkTests.csLedgerTM.Tests.Unit/Accounts/Workflows/WorkflowInterpreterTests.csLedgerTM.Tests.Unit/Payments/DirectCredits/InitiateDirectCreditOnTransactionPostedTests.csLedgerTM.Tests.Unit/Payments/DirectDebits/InitiateDirectDebitOnTransactionPostedTests.csLedgerTM.Tests.Unit/Tax/PostTaxToLedgerTests.csLedgerTM.Tests.WorkerHost/TransactionPostedTriggerSeparatedDispatchTests.cssrc/LedgerTM.Accounts/Application/Commands/OpenTradingDay.cssrc/LedgerTM.Accounts/Application/Commands/PostRailFeeCommandHandler.cssrc/LedgerTM.Accounts/Application/Commands/PostTransaction.cssrc/LedgerTM.Accounts/Application/Commands/ProcessDayEnd.cssrc/LedgerTM.Accounts/Application/Commands/ProcessExternalSourcePaymentHandlers.cssrc/LedgerTM.Accounts/Application/Commands/ProcessToDate.cssrc/LedgerTM.Accounts/Application/Commands/ReverseTransactionCommandHandler.cssrc/LedgerTM.Accounts/Application/Commands/UnwindSettlementCommandHandler.cssrc/LedgerTM.Accounts/Application/DayEnd/NoticeExpiryStep.cssrc/LedgerTM.Accounts/Application/DayEnd/ProvisionRecomputeStep.cssrc/LedgerTM.Accounts/Application/DayEnd/SmallBalanceWriteOffStep.cssrc/LedgerTM.Accounts/Application/Designer/DesignerForecast.cssrc/LedgerTM.Accounts/Application/FixedDepositRollover.cssrc/LedgerTM.Accounts/Application/IntegrationEvents/AccountTriggerProjection.cssrc/LedgerTM.Accounts/Application/InternalTransferTarget.cssrc/LedgerTM.Accounts/Application/Operations/AccountOperationResolver.cssrc/LedgerTM.Accounts/Application/Projections/AccountStatementLinesReadModel.cssrc/LedgerTM.Accounts/Application/Projections/SuspenseItemReadModel.cssrc/LedgerTM.Accounts/Application/Projections/TransactionHistoryReadModel.cssrc/LedgerTM.Accounts/Application/Queries/ForecastAccount.cssrc/LedgerTM.Accounts/Application/Queries/TransactionHistoryQuery.cssrc/LedgerTM.Accounts/Application/Settlement/SettlementAcceptance.cssrc/LedgerTM.Accounts/Application/Workflows/WorkflowInterpreter.cssrc/LedgerTM.Accounts/Domain/Account.Events.cssrc/LedgerTM.Accounts/Domain/Account.Posting.cssrc/LedgerTM.Books/Application/Integrations/PostTransactionToBooks.cssrc/LedgerTM.Contracts/Accounts/OpenItemCommands.cssrc/LedgerTM.Contracts/Accounts/Triggers/TransactionSnapshot.cssrc/LedgerTM.Contracts/Accounts/Triggers/TransactionSource.cssrc/LedgerTM.Payments/DirectDebits/Application/Integrations/InitiateDirectDebitOnTransactionPosted.cssrc/LedgerTM.Tax/Application/Integrations/PostTaxToLedger.cssrc/ui-apps/bank/src/lib/api.tsImplementations 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)CardType— 1:GetCardTypesQuery(src/LedgerTM.Cards/Application/Queries/GetCardTypes.cs) Files reading a touched file by path: 0
Domain events touched: 2 — CardReissued, SameNumberNewExpiry Aggregates touched: 1
Card—src/LedgerTM.Cards/Domain/Card.cs
Methods at CRAP 30+ in changed files: 2 (unit coverage, cached at main d5082c6be)
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: 4 — charge-card-fee, i-system, price-type-id, process-card-fee
Warnings
Cardis changed and read by 8 projects — name the seam in the ADR.TransactionSourceis changed and read by 6 projects — name the seam in the ADR.CardProcessorSettingsis changed and read by 4 projects — name the seam in the ADR.CardTypeis changed and read by 3 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.- 8 feature projects touched — say why this is not two ADRs.
At land: 52 files touched, 46 predicted, 21 unplanned. LedgerTM.Testing.Builders/GenericAccountTestHelper.cs, LedgerTM.Tests.Architecture/ContractsClassificationPinTests.cs, LedgerTM.Tests.Architecture/MessageRoutingCatalogTests.cs, LedgerTM.Tests.Architecture/contracts-shared-surface-baseline.txt, LedgerTM.Tests.Architecture/replay-safe-outer-writes.txt, LedgerTM.Tests.Component/Cards/CardControlsAndFundingTests.cs, LedgerTM.Tests.Component/Cards/CardRenewalDispatchTests.cs, LedgerTM.Tests.Component/Cards/CurrentAccountExcessTests.cs, LedgerTM.Tests.Unit/AccessControl/PermissionKeyPinTests.cs, LedgerTM.Tests.Unit/Cards/CardOperationGuardParityTests.cs, LedgerTM.Tests.Unit/Seeding/preset-snapshots.txt, src/LedgerTM.Cards/Application/Commands/ActivateCard.cs, src/LedgerTM.Cards/Application/Commands/ReissueCard.cs, src/LedgerTM.Cards/Application/Queries/GetCardProcessor.cs, src/LedgerTM.Cards/Application/Settings/AmendCardProcessor.cs, src/LedgerTM.Cards/Bootstrapper.cs, src/LedgerTM.Cards/Simulation/SimulatorCard.cs, src/LedgerTM.Seeding.Provisioning/tenant-templates/countries/gb/retail-bank/PriceSettings.yaml, src/LedgerTM.Seeding.Provisioning/tenant-templates/countries/za/retail-bank/PriceSettings.yaml, src/ui-apps/bank/src/features/connectivity/card-processor-form.tsx, src/ui-apps/bank/src/features/entity-types/card-types.tsx
Land batches
One land, the whole ADR; reseed: true. Bite 1 starts after ADR-836 lands (the cardPurchase
rows and ProcessCardPurchaseCommand it sits beside); bites 2 and 3 can start now.
Notes
- The fee’s transaction id is derived from facts (F20):
{card}-card-issuance-fee,{newToken}-card-replacement-fee,{token}-{yyyy-MM}-card-renewal-fee, all id parts, so a redelivered cascade posts once and a processor answering the same month twice charges once;ExternalSourceDispatcheralready skips a posted id. The posting’sfeeTypeandcardIdproperties carry id parts; its trading and value date are the card event’s trading date. - A suspended card renews so it works the day it is reinstated; a lost card does not; an ordered card that was never activated does not.
- Clocks. The simulator mints and reissues a credential’s expiry from the tenant’s trading date (F25); the step selects by the closing trading date; a test sets the trading date and the simulator follows it.
- The step reads the summary, not the aggregate, and dispatches one command per card through the bus, so each renewal is its own tracked act and a refused one does not stop the next.
- Fixtures.
StubCardProcessorscriptsReissueAsync’s answer, a per-token refusal and a transport fault; the card’s expiry is whatever the stub answered at issue, so a test issues with a short life rather than waiting. The fixture’s account type carries thecardFeerows throughwithType:and a price list holding the three types is assigned to the demo customer. The day-end step log is read by step id and date for the renewal count. - The guide names no standard; renewal practice is the scheme’s, and the register has no row.
Changed during the plan grill
Phase A (24 questions), the plan grill (12 press points) and three phase B authors ran
2026-10-02; F5–F33 record the rulings. The largest: Renew is a verb and a status-table row, not a second guard; fee ids derive
from facts; the fee is published with its date and a typed fee type; the external-source path
binds the price lookup and the value date, and an account with no pricing plan charges nothing;
device tokens keep their own expiry and ADR-836’s decider skips the check on them; the simulator’s
clock for a credential’s life is the trading date. Held: the three price rows, the step’s order
and criticality, the lead’s default of 45.
Landing notes
-
F1:
CurrentAccount(ADR-837) andCreditCard(ADR-838) gain thecardFeeintegration andCardFeeChargedin whichever lane lands second. -
F26: ADR-836’s decider skips the expiry check on a device credential; recorded on ADR-836’s plan as a landing note so its lane builds it that way.
-
Landing note (coordinator, 2026-10-03): ADR-839 (lane
cards-authorisation) sharesProcessExternalSourcePaymentHandlers.cs,ProcessExternalSourceCommands.cs,event-identity.tsvandPermissionCatalog.cswith ADR-845 (lanecashier-management), andPermissionCatalog.cswith ADR-784 (lanestudio-countersign). Built in parallel; the second to land resolves them at its integrate step. -
Decided: the card’s charge catches the dispatcher’s existing
ACCOUNT_NOT_ACTIVErefusal and recordsCardFeeForgone, rather than the Accounts handler returning nothing · rests on: D4, F23, F30 · wrong if:CardFeeTests.a_fee_on_a_closed_funding_account_is_forgone_and_recordeddead-letters or records nothing. -
Decided: the card doors bind
valueDatewhenever they carry a price resolver, so an account with no pricing plan prices nothing instead of failing to bindprice($feeType, valueDate)· rests on: D4, F22 · wrong if:CardFeeTests.an_account_with_no_pricing_plan_is_charged_nothingreddens. -
Decided: the three fee prices go on each country’s three card-pricing lists, not the notice-deposit list; the GB replacement fee is 10.00 GBP · rests on: D5 · wrong if:
CardFeeTemplateTestsreddens, or a GB card is charged 150. -
Decided: ADR-836’s
ExternalSourceDispatcherCharacterisationTestsdoes not exist, so F24’s price-binding case lives inCardFeeTests· rests on: F24 · wrong if: the file turns up onmain. -
Decided: bites 2 and 3’s authored tests are copied in at the start of their own bite, with the contract types they compile against, and measured red there, as ADR-838 did its bite 4 · rests on: ADR-787 step 6 · wrong if: a test copied in at bite 2 or 3 starts green.
-
Decided:
CardOperationGuardParityTestsexcludesCardVerb.Renewfrom its every-verb-is-on-the-menu check, so the table holds the row and the menu does not · rests on: F19 · wrong if:CardRenewalTests.renewal_is_never_offered_on_the_operators_menureddens. -
Decided: the renewal step’s selection reads
CardSummaryin memory and the card type’s lead, defaulting to 45 for a card whose type is gone · rests on: F3, F27 · wrong if: a card whose type was removed is never renewed. -
Decided: the simulator reads the trading date through
ApplicationContext, resolved at call time, becauseITradingDateServicelives in a project Cards may not reference · rests on: F25, §Dependency Rule · wrong if:CardRenewalSimulationTests.the_simulated_tenant_renews_a_card_on_its_next_day_endanswers a wall-clock expiry. -
Decided:
SimulatorCardcarriesLifeMonths(default 36 for a document stored before it); the facet’s months, when set, replace it at reissue · rests on: F31 · wrong if: a reissue on the simulated tenant answers a life in years. -
Decided: the seed sets the two-month life only when it clears the largest lead, and leaves the type’s years otherwise · rests on: F28 · wrong if:
CardRenewalSimulationSeedTestsreddens on a tenant whose leads are 45. -
Decided: ADR-840 and ADR-841’s
## Modelblocks are regenerated here, since this lane’s card types staled them · rests on: ADR-773 D8 · wrong if:gen_index.py --checkreports them stale after the land.