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-837 — Implementation Plan

Findings for the ADR

Files touched

Bite 1 — contracts and configuration

Bite 2 — Accounts reads the facility

Bite 3 — Limits reads below zero

Bite 4 — the oracle’s available

Bite 5 — the post past the limit, priced and shown

Bite 6 — the viewer, the sample data, the guide, the probe, the register

Prior art

Nothing changed since the grill. Supporting types the signatures needed — FacilityExposureSnapshot (F1), FacilitySymbols / FacilitySymbolResolver (F2), OverdraftDto (D11) — carry no decision; PayoutLimitContext gains PositionsBefore (an extension of an ADR-760 type) and FacilityReadModel gains UsageByAccount (an ADR-050 read model). All are in the ADR’s table through the names they serve.

Interfaces

// src/LedgerTM.Contracts/Accounts/LimitIntegrations.cs — changed (D2)
public enum LimitDirection { Raise, BelowZero }
public sealed class CreditLimitIntegration { public string Position { get; init; } = ""; public bool ActivationCheck { get; init; } public LimitDirection Direction { get; init; } = LimitDirection.Raise; }
public sealed class FacilityIntegration { public string Position { get; init; } = ""; public LookupValueId FacilityTypeId { get; init; } public bool ActivationCheck { get; init; } public LimitDirection Direction { get; init; } = LimitDirection.Raise; }
// Validator (load time): BelowZero needs a declared position on a Liability-nature type; a BelowZero credit-limit wire needs a facility wire too.

// src/LedgerTM.Contracts/Limits/IFacilityAvailabilityReader.cs — new (D3); Limits implements, Accounts reads
public sealed record FacilityExposureSnapshot(decimal Amount, decimal Reserved, bool IsFrozen, IReadOnlyDictionary<AccountId, decimal> UsageByAccount);   // F1; no FacilityId — it lives in Limits, and Accounts needs none
public interface IFacilityAvailabilityReader
{
    Task<FacilityExposureSnapshot?> ForAsync(CounterpartyId counterparty, CurrencyId currency, LookupValueId facilityType, string tenantSlug, CancellationToken ct = default);   // null: none granted; tenantSlug as IArrearsReader (F14)
}

// src/LedgerTM.Contracts/Accounts/IAccountAvailabilityReader.cs — changed (D4; ADR-836's type; bite 4, after ADR-836 lands)
public sealed record AccountAvailability(AccountId Account, CurrencyId Currency, decimal Available, decimal Ledger, decimal Claims, decimal ExternalReductions, decimal FacilityAvailable);
// Available = max(0, Ledger − Claims − ExternalReductions + FacilityAvailable); FacilityAvailable is the D3 account symbol (own usage added back). A card hold is an ExternalReduction (ADR-836).

// src/LedgerTM.Contracts/Accounts/IAccountPayoutLimitGate.cs — changed (bite 1 declares, bite 3 reads)
public sealed record PayoutLimitContext(AccountId AccountId, CounterpartyId OwnerCounterpartyId, CurrencyId CurrencyId, LimitIntegrations Integrations,
    IReadOnlyDictionary<string, decimal> PositionDeltas, IReadOnlyList<ExposureLine> Lines, IReadOnlyDictionary<string, decimal> PositionsBefore);

// src/LedgerTM.Limits/LimitExposure.cs — changed (D2); the two-argument overload is removed
public static IReadOnlyList<(TransactionId TransactionId, decimal Amount)> Asked(IEnumerable<ExposureLine> lines, string position, LimitDirection direction, decimal balanceBefore);
// Raise: as today. BelowZero: the asked total is max(0, −after all lines) − max(0, −balanceBefore); the balance and every credit net against the lowering lines in order, so the ask lands on the lines that cross zero (F23): from 500, −300/−400/−600 ask 0/200/600.

// src/LedgerTM.Limits/Facilities/Domain/Facility.cs — changed (D2, F12)
public void SetUsageTo(AccountId accountId, decimal utilisation, DateOnly tradingDate, TransactionId? sourceTransactionId = null);
// Emits FacilityUsageSet with TransactionAmount = |utilisation − recorded for the account| and NewUtilisation = Utilisation + that change; nothing when equal; dedups on the source id as SetUsage does.
// src/LedgerTM.Limits/Facilities/Application/Commands/SetFacilityUsage.cs — SetFacilityUsageCommand gains decimal? AbsoluteUtilisation; set → SetUsageTo, else SetUsage as today.

// src/LedgerTM.Limits/Facilities/Application/Projections/FacilityReadModel.cs — changed: public Dictionary<AccountId, decimal> UsageByAccount (from FacilityUsageSet; sign = NewUtilisation − previous)

// src/LedgerTM.Accounts/Application/Operations/FacilitySymbolResolver.cs — new (D3, F2)
public sealed record FacilitySymbols(decimal FacilityLimit, decimal FacilityAvailable) { public static readonly FacilitySymbols None = new(0m, 0m); }   // F13: Excess is computed where Current is bound
public sealed class FacilitySymbolResolver(IFacilityAvailabilityReader reader)
{
    public Task<FacilitySymbols> ForAsync(Account account, AccountType accountType, string tenantSlug, CancellationToken ct = default);
    // No BelowZero facility wire, no facility, or frozen → None. Else:
    //   FacilityLimit     = min(Amount, max(0, Amount − Σ max(0, UsageByAccount[other accounts])))   (F22; the owner's facility only)
    //   FacilityAvailable = max(0, FacilityLimit − Reserved)   (every reservation on the facility, at rest)
    // Every context binds Excess = max(0, −ledger Current − FacilityLimit) and recomputes it after each posting in a walk.
    // Evaluated before an operation's own reservation, so a payout never counts against itself.
}

// src/LedgerTM.Accounts/Application/Operations/AccountGuardContextBuilder.cs — changed: Build(..., FacilitySymbols facility) — required (F17); bite 1's callers pass None, bite 2's the resolved value
// src/LedgerTM.Accounts/Domain/Valuation/AccountValuation.cs — changed: ctor gains FacilitySymbols facility (caller-resolved, ADR-329 D6 shape); BuildContext binds FacilityLimit and computes Excess from the ledger Current it binds
// src/LedgerTM.Accounts/Application/Settings/ScriptSymbolValidator.cs — changed: the three names join ContextVariables

// src/LedgerTM.Accounts/Application/Queries/GetAccountDetail.cs — changed (D11, F9; bite 5)
public record OverdraftDto(decimal Limit, decimal Available, decimal Excess, bool Frozen);   // computed at read time; Limit = the facility's amount (frozen included); Available = max(0, Current + FacilityAvailable), Current as the guard bag binds it (after claims and external reductions); Excess from the ledger Current
// AccountDetailDto gains OverdraftDto? Overdraft — null when the type has no BelowZero wire; wired with no facility: Limit 0, Available = the balance floored, Excess as computed, Frozen false

// Configuration (D1, D7) — src/LedgerTM.Seeding.Provisioning/tenant-templates/packages/retail-bank/AccountTypesSettings.yaml, CurrentAccount:
//   nature: Liability; accountRoles: holder (min 1, servicing); positionTypes: Current, Accrued, DebitAccrued
//   transactionTypes (every one with costOfCreditCategory, none with a guard): CashDeposit, CashWithdrawal, TransferIn, TransferOut,
//     InterestAccrued (Cr Accrued, maximumPrecision), InterestCapitalised (Dr Accrued, Cr Current),
//     DebitInterestAccrued (Dr DebitAccrued, maximumPrecision, sequenceNumber 1), ExcessInterestAccrued (Dr DebitAccrued, maximumPrecision, sequenceNumber 2),
//     DebitInterestCapitalised (Cr DebitAccrued, Dr Current), UnarrangedOverdraftFeeCharged (Dr Current, sequenceNumber 9); CardPurchase, CardRefund arrive in bite 5 (F3, F16)
//   operations: withdraw → a teller cash withdrawal: one `amount` input, one postTransaction CashWithdrawal step, no payout, no destination;
//     availabilityGuard: Current + FacilityAvailable > 0; guard: Current + FacilityAvailable >= $amount;
//     guardFailureMessage: 'Insufficient funds: the withdrawal exceeds the balance and the overdraft available.' (refused as OPERATION_GUARD_FAILED, as every operation guard is)
//     transfer-out → availabilityGuard only (the facility gate refuses at execution, ADR-794 D10), limitCheck: true, a payout step
//     the standingOrder workflow → debits Current under guard: Current + FacilityAvailable >= $amount (honoured into the overdraft, refused past it: WORKFLOW_GUARD_FAILED); debitOrder stays the call deposit's inbound credit (F20)
//   scheduledTransactions: Decision 7's table, all EndOfDay; capitalisations monthly StartOfDay with conditionExpression Accrued > 0 / DebitAccrued < 0 and amount Accrued / 0 - DebitAccrued
//   properties: regulatoryRegime (Lookup, required), servicingUnit, taxReportingRegime, interestPayment — as the call deposit; no rate properties (F18)
//   rates: rate('Call', valueDate) for credit interest, rate('Overdraft', valueDate), rate('UnarrangedOverdraft', valueDate) — named rate types in the country × package RateSettings cell; daysInYear(valueDate) is the calendrical built-in
//   limitIntegrations: facility { position: Current, facilityType: Overdraft, direction: BelowZero, activationCheck: false }
//   The sign of DebitAccrued follows the liability nature: a Debit operation drives it negative; a test reads −0.99 on the position for 0.99 of debit interest.

Bite 6 — no contracts of its own. The sample data uses GrantFacilityCommand and the account-creation command unchanged; the viewer reads OverdraftDto.

Bites

Bite Description Acceptance criterion Status
1 Contracts and configuration: LimitDirection on both integrations and its YAML, IFacilityAvailabilityReader, AccountAvailability.FacilityAvailable, PayoutLimitContext.PositionsBefore; the three symbols bound to zero; the Overdraft lookup value and the holder role; CurrentAccount on the retail template with positions, transaction types, operations, scheduled transactions, properties, rates, prices and GL a current account opens and pays out within its balance; the current account type is classified and its postings are unguarded Pending
2 Accounts reads the facility: the reader in Limits and its read model’s usage by account, the symbol resolver, the three symbols in the guard bag and the day-walk, the withdraw guards a withdrawal into the arranged overdraft; a withdrawal past the limit is refused; no facility declines at zero; a standing order is honoured into the overdraft and refused past it; an overdrawn account may draw the rest of its overdraft and no further; a frozen overdraft declines a withdrawal at zero; a facility that is not the customer’s overdraft in the account’s currency lends nothing; a sibling account in overdraft never lifts this account’s limit above the facility; day-end prices an arranged overdraft with no excess Pending
3 Limits reads below zero: usage set from the balance, the asked amount for the gates, the payout gate’s direction the facility shows the overdraft drawn; repaying releases it; a transfer out past the facility is refused; a transfer out that dips into the overdraft asks only for the dip; money moving above zero never touches the facility; a facility granted to an overdrawn account reads its usage at the next movement; two accounts on one overdraft each set only their own share; a transfer past zero without an overdraft is refused Shrunk
4 The oracle: facility available in AccountAvailability; the funding walk approves into the overdraft a tap is approved against the overdraft Pending
5 The post past the limit; excess interest, debit interest and the daily fee at day-end; the revaluation seam includes the closed day; GL; the overdraft on the account detail a clearing line past the limit posts and shows the excess; day-end prices the overdraft and the excess; with no facility the whole shortfall is excess; a frozen facility makes the whole draw excess; a back-dated reversal takes the fee with it; the account detail carries the overdraft figures; the screen, the guard and the oracle read one available Pending
6 The account viewer’s overdraft tiles; sample data and the probe; the guide article; the standards row an operator sees the overdraft on the account; the probe prints the scenario ids; the guide article passes the guide tests Pending

Scenarios

Feature: a current account with an overdraft funds a card and prices what the card draws

# Bite 1
Scenario: a current account opens and pays out within its balance
  Given a retail tenant whose template declares a current account type
  And a customer opens a current account with 4 200 in it
  When a clerk withdraws 1 000
  Then the account's current balance is 3 200
  # Seen at: route:/accounts/{id}

# Bite 1
Scenario: the current account type is classified and its postings are unguarded
  Given a retail tenant whose template declares a current account type
  When the template is read
  Then the type asks for a regulatory regime on every account
  And every transaction type on it carries a cost-of-credit category
  And no transaction type on it carries a posting guard
  # Seen at: none

# Bite 2
Scenario: a withdrawal into the arranged overdraft
  Given a current account holding 500 whose customer holds an overdraft facility of 2 000
  When a clerk withdraws 1 500
  Then the withdrawal posts and the current balance is -1 000
  # Seen at: route:/accounts/{id}

# Bite 2
Scenario: a withdrawal past the limit is refused
  Given a current account holding 500 whose customer holds an overdraft facility of 2 000
  When a clerk tries to withdraw 2 600
  Then the withdrawal is refused with the insufficient-funds message the type configures
  And the current balance is still 500
  # Seen at: route:/accounts/{id}

# Bite 2
Scenario: no facility declines at zero
  Given a current account holding 500 whose customer holds no overdraft facility
  When a clerk withdraws 500 and then tries to withdraw 1
  Then the second withdrawal is refused
  And the withdraw action reads as unavailable with the reason the type configures
  # Seen at: route:/accounts/{id}

# Bite 2
Scenario: a standing order is honoured into the overdraft and refused past it
  Given a current account holding 500 whose customer holds an overdraft facility of 2 000
  When a standing order of 1 500 runs and then a standing order of 1 100
  Then the first posts and the current balance is -1 000
  And the second is refused and the current balance is still -1 000
  # Seen at: route:/accounts/{id}

# Bite 2
Scenario: an overdrawn account may draw the rest of its overdraft and no further
  Given a current account holding 500 whose customer holds an overdraft facility of 2 000
  When a clerk withdraws 1 500 and then 1 000
  Then both post and the current balance is -2 000
  And the withdraw action reads as unavailable with the reason the type configures
  And a withdrawal of 0.01 is refused
  # Seen at: route:/accounts/{id}

# Bite 2
Scenario: a frozen overdraft declines a withdrawal at zero
  Given a current account holding 500 whose customer's overdraft facility of 2 000 is frozen
  When a clerk tries to withdraw 600
  Then the withdrawal is refused and the current balance is still 500
  # Seen at: route:/accounts/{id}

# Bite 2
Scenario Outline: a facility that is not the customer's overdraft in the account's currency lends nothing
  Given a current account holding 500 and a 2 000 facility <facility>
  When a clerk tries to withdraw 600
  Then the withdrawal is refused and the current balance is still 500
  # Seen at: route:/accounts/{id}

  Examples:
    | facility |
    | in another currency |
    | of another type |
    | held by another customer |
    | held by the account's second holder |

# Bite 2
Scenario: a sibling account in overdraft never lifts this account's limit above the facility
  Given two current accounts of one customer on one overdraft facility of 2 000, the second drawn to -1 500
  When a clerk tries to withdraw 2 600 from the first, holding 500
  Then the withdrawal is refused and the current balance is still 500
  # Seen at: route:/accounts/{id}

# Bite 2
Scenario: day-end prices an arranged overdraft with no excess
  Given a current account at -1 000 whose customer holds an overdraft facility of 2 000, on a tenant that is not the default
  When day-end runs for one day
  Then debit interest accrues on 1 000 at the overdraft rate
  And no excess interest and no excess fee are charged
  # Seen at: route:/accounts/{id}

# Bite 3
Scenario: the facility shows the overdraft drawn
  Given a customer with a current account holding 4 200 and an overdraft facility of 2 000
  When a clerk withdraws 5 000
  Then the current balance is -800
  And the facility shows 800 used and 1 200 available
  # Seen at: panel:facilities

# Bite 3
Scenario: repaying releases it
  Given a current account at -800 whose overdraft facility shows 800 used
  When a deposit of 1 000 posts
  Then the facility shows nothing used and 2 000 available
  # Seen at: panel:facilities

# Bite 3
Scenario: a transfer out past the facility is refused
  Given a current account holding 500 whose customer holds an overdraft facility of 2 000
  When a clerk transfers 2 600 out to an external account
  Then the transfer is refused as a facility breach naming the 2 100 of overdraft it needed
  And the facility shows nothing reserved and nothing used
  # Seen at: panel:facilities

# Bite 3
Scenario: a transfer out that dips into the overdraft asks only for the dip
  Given a current account holding 4 200 whose customer holds an overdraft facility of 2 000
  When a clerk transfers 5 000 out to the customer's own account
  Then the transfer posts and the current balance is -800
  And the facility shows 800 used, nothing reserved and 1 200 available
  # Seen at: panel:facilities

# Bite 3
Scenario: money moving above zero never touches the facility
  Given a customer whose overdraft facility of 2 000 is granted before any money moves
  When a deposit of 4 200 posts and a clerk withdraws 1 000
  Then the facility shows nothing used and records no usage change
  # Seen at: panel:facilities

# Bite 3
Scenario: a facility granted to an overdrawn account reads its usage at the next movement
  Given a current account already at -800 when its overdraft facility of 2 000 is granted
  When a deposit of 100 posts
  Then the facility shows 700 used and 1 300 available
  # Seen at: panel:facilities

# Bite 3
Scenario: two accounts on one overdraft each set only their own share
  Given two current accounts of one customer at -800 and -500 on one overdraft facility of 2 000
  When a deposit of 1 000 posts to the first
  Then the facility shows 500 used
  # Seen at: panel:facilities

# Bite 3
Scenario: a transfer past zero without an overdraft is refused
  Given a current account holding 500 whose customer holds no overdraft facility
  When a clerk transfers 600 out
  Then the transfer is refused as a missing facility and the balance is still 500
  # Seen at: route:/accounts/{id}

# Bite 4
Scenario: a tap is approved against the overdraft
  Given a card funded first from a current account holding 4 200 whose customer holds an overdraft facility of 2 000
  When a merchant asks to authorise 5 000
  Then the authorisation is approved
  And a hold of 5 000 sits on the card against the current account
  And the current account's available reads 1 200
  # Seen at: route:/cards/{id}

# Bite 5
Scenario: a clearing line past the limit posts and shows the excess
  Given a current account at -800 whose customer holds an overdraft facility of 2 000
  When a card clearing line of 2 300 with no matching authorisation is posted at day-end
  Then the purchase posts and the current balance is -3 100
  And the facility shows 3 100 used and nothing available
  And the account shows an excess of 1 100
  # Seen at: route:/accounts/{id}

# Bite 5
Scenario: day-end prices the overdraft and the excess
  Given a current account at -3 100 with an overdraft facility of 2 000, an overdraft rate of 18%, an unarranged rate of 28% and a daily excess fee of 50
  When day-end runs for one day
  Then debit interest of 0.99 to the cent accrues on the arranged 2 000
  And excess interest of 0.84 to the cent accrues on the 1 100 excess
  And a fee of 50 posts to the current balance after the interest
  And no credit interest accrues
  # Seen at: route:/accounts/{id}

# Bite 5
Scenario: with no facility the whole shortfall is excess
  Given a current account holding 500 whose customer holds no overdraft facility
  When a card clearing line of 1 500 with no matching authorisation is posted at day-end
  Then the purchase posts and the current balance is -1 000
  And the account shows an excess of 1 000
  And the next day-end accrues excess interest on 1 000 and no arranged debit interest
  # Seen at: route:/accounts/{id}

# Bite 5
Scenario: a frozen facility makes the whole draw excess
  Given a current account at -800 whose customer holds an overdraft facility of 2 000
  When the facility is frozen
  Then the account shows an excess of 800 and a frozen limit of 2 000
  And the next day-end accrues excess interest on 800, no arranged debit interest, and the excess fee
  # Seen at: route:/accounts/{id}

# Bite 5
Scenario: a back-dated reversal takes the fee with it
  Given a current account that was in excess at day-end and was charged the daily fee
  When the purchase that caused the excess is reversed with that day's value date, the day after it closed
  Then the account is revalued and the fee is reversed with the excess that caused it
  And the interest accrued on the excess is reversed too
  # Seen at: route:/accounts/{id}

# Bite 5
Scenario: the account detail carries the overdraft figures
  Given a current account at -3 150 whose customer holds an overdraft facility of 2 000
  When the account's detail is read
  Then it carries an overdraft limit of 2 000, nothing available and an excess of 1 150
  And a current account whose customer holds no facility carries a limit of zero and its balance as available
  And a call deposit carries no overdraft figures at all
  # Seen at: route:/accounts/{id}

# Bite 5
Scenario: the screen, the guard and the oracle read one available
  Given a card funded from a current account holding 4 200 whose customer holds an overdraft facility of 2 000
  And a merchant's authorisation of 5 000 holds against the account
  When the account's detail, its withdraw action and the card's funding walk are each asked what is available
  Then every one of them answers 1 200
  # Seen at: route:/accounts/{id}

# Bite 6
Scenario: an operator sees the overdraft on the account
  Given a current account at -3 150 whose customer holds an overdraft facility of 2 000
  When an operator opens the account
  Then the header shows an overdraft limit of 2 000, nothing available and an excess of 1 150
  # Seen at: route:/accounts/{id}

Scenario → test

Scenario Bite Project Class Method Probe
a current account opens and pays out within its balance 1 LedgerTM.Tests.Component CurrentAccountTests a_current_account_opens_and_pays_out_within_its_balance adr-837-server-probe.ts
the current account type is classified and its postings are unguarded 1 LedgerTM.Tests.Component CurrentAccountTests the_type_is_classified_and_its_postings_are_unguarded — configuration
a withdrawal into the arranged overdraft 2 LedgerTM.Tests.Component CurrentAccountOverdraftTests a_withdrawal_into_the_arranged_overdraft_posts adr-837-server-probe.ts
a withdrawal past the limit is refused 2 LedgerTM.Tests.Component CurrentAccountOverdraftTests a_withdrawal_past_the_limit_is_refused — refusal, shares the row above
a standing order is honoured into the overdraft and refused past it 2 LedgerTM.Tests.Component CurrentAccountOverdraftTests a_standing_order_is_honoured_into_the_overdraft_and_refused_past_it —
an overdrawn account may draw the rest of its overdraft and no further 2 LedgerTM.Tests.Component CurrentAccountOverdraftTests an_overdrawn_account_may_draw_the_rest_of_its_overdraft_and_no_further —
a frozen overdraft declines a withdrawal at zero 2 LedgerTM.Tests.Component CurrentAccountOverdraftTests a_frozen_overdraft_declines_a_withdrawal_at_zero —
day-end prices an arranged overdraft with no excess 2 LedgerTM.Tests.Component CurrentAccountOverdraftTests day_end_prices_an_arranged_overdraft_with_no_excess —
a facility that is not the customer’s overdraft … — “in another currency” 2 LedgerTM.Tests.Component CurrentAccountOverdraftTests a_facility_that_is_not_the_customers_overdraft_in_the_accounts_currency_lends_nothing — refusal
a facility that is not the customer’s overdraft … — “of another type” 2 LedgerTM.Tests.Component CurrentAccountOverdraftTests the same [Theory] — refusal
a facility that is not the customer’s overdraft … — “held by another customer” 2 LedgerTM.Tests.Component CurrentAccountOverdraftTests the same [Theory] — refusal
a facility that is not the customer’s overdraft … — “held by the account’s second holder” 2 LedgerTM.Tests.Component CurrentAccountOverdraftTests the same [Theory] — refusal
a sibling account in overdraft never lifts this account’s limit above the facility 2 LedgerTM.Tests.Component CurrentAccountOverdraftTests a_sibling_account_in_overdraft_never_lifts_this_accounts_limit_above_the_facility — refusal
no facility declines at zero 2 LedgerTM.Tests.Component CurrentAccountOverdraftTests without_a_facility_a_withdrawal_declines_at_zero — refusal
the facility shows the overdraft drawn 3 LedgerTM.Tests.Component OverdraftFacilityUsageTests a_balance_below_zero_is_facility_usage adr-837-server-probe.ts
repaying releases it 3 LedgerTM.Tests.Component OverdraftFacilityUsageTests a_deposit_that_returns_the_balance_above_zero_releases_the_usage adr-837-server-probe.ts
a transfer out past the facility is refused 3 LedgerTM.Tests.Component OverdraftFacilityUsageTests a_transfer_out_past_the_facility_is_refused_and_reserves_nothing — refusal
a transfer out that dips into the overdraft asks only for the dip 3 LedgerTM.Tests.Component OverdraftFacilityUsageTests a_transfer_out_that_dips_into_the_facility_asks_only_for_the_dip —
money moving above zero never touches the facility 3 LedgerTM.Tests.Component OverdraftFacilityUsageTests money_moving_above_zero_never_touches_the_facility —
a facility granted to an overdrawn account reads its usage at the next movement 3 LedgerTM.Tests.Component OverdraftFacilityUsageTests a_facility_granted_to_an_overdrawn_account_reads_its_usage_at_the_next_movement —
two accounts on one overdraft each set only their own share 3 LedgerTM.Tests.Component OverdraftFacilityUsageTests two_accounts_on_one_overdraft_each_set_only_their_own_share —
a transfer past zero without an overdraft is refused 3 LedgerTM.Tests.Component OverdraftFacilityUsageTests a_transfer_out_past_zero_without_a_facility_is_refused — refusal
below-zero asked — net growth across the lines, allocated in order 3 LedgerTM.Tests.Unit LimitExposureTests a_below_zero_wire_asks_for_the_growth_of_the_negative_part — unit
usage set from the balance — the D2 table, a late grant, a phantom cleared 3 LedgerTM.Tests.Unit LimitExposureTests setting_usage_to_the_balance_corrects_what_is_recorded — unit
a tap is approved against the overdraft 4 LedgerTM.Tests.Component CardAuthorisationOverdraftTests a_tap_is_approved_against_the_overdraft adr-837-server-probe.ts
a clearing line past the limit posts and shows the excess 5 LedgerTM.Tests.Component CurrentAccountExcessTests a_clearing_line_past_the_limit_posts_and_shows_the_excess adr-837-server-probe.ts
day-end prices the overdraft and the excess 5 LedgerTM.Tests.Component CurrentAccountExcessTests day_end_prices_the_arranged_overdraft_and_the_excess adr-837-server-probe.ts
with no facility the whole shortfall is excess 5 LedgerTM.Tests.Component CurrentAccountExcessTests without_a_facility_the_whole_shortfall_is_excess —
a frozen facility makes the whole draw excess 5 LedgerTM.Tests.Component CurrentAccountExcessTests a_frozen_facility_makes_the_whole_draw_excess —
a back-dated reversal takes the fee with it 5 LedgerTM.Tests.Component CurrentAccountExcessTests a_back_dated_reversal_takes_the_fee_with_it —
the account detail carries the overdraft figures 5 LedgerTM.Tests.Component CurrentAccountViewerTests the_account_detail_carries_the_overdraft_figures adr-837-server-probe.ts
the screen, the guard and the oracle read one available 5 LedgerTM.Tests.Component CurrentAccountExcessTests the_screen_the_guard_and_the_oracle_read_one_available adr-837-server-probe.ts
an operator sees the overdraft on the account 6 src/ui-apps/bank (vitest) generic-account-viewer.overdraft.test.tsx renders the overdraft tiles from the detail adr-837-server-probe.ts

UI-surface sweep

Swept src/ui-apps/bank/src for limitIntegrations, facilityType, CurrentAccount, CorporateCurrentAccount, HeldExternally, PositionDto, availabilityGuard, requiresFacility:

Changed during the plan grill

Phase A (27 questions) and the plan grill (14 press points) ran 2026-10-02; the operator’s standing instruction was to take the recommendations. F5–F17 record what moved: bites 2 and 3 swapped; the retail template wires the facility only; usage is set from the balance, not added by delta, and the usage floor is superseded; Excess is computed live where Current is bound; the reader carries the tenant; FacilitySymbols is a required parameter; a back-dated reversal takes the fee with it; transfer-out carries the availability guard only; bites 4 and 5 start after ADR-836 lands; six files the signatures reach joined ## Files touched (ProcessDayEnd, RevalueAccount, ForecastAccount, RegulatoryLimitEnforcement, ProvisionRecomputeStep, LimitIntegrationsYamlTests). Held: the symbols’ names, the two-field reader snapshot, the sequence-number ordering (verified at AccountValuation.cs:313), the six-project footprint.

Phase B (six authors, 2026-10-02): F18–F28. The day count moves to the rate rows; the current account carries the call deposit’s required properties; the outbound act is the standing order; bite 2 proves the day-walk on a non-default tenant; the limit formula clamps and caps; asks land on the lines that cross zero; a hold never reserves on the facility and the three available figures are tied by a parity scenario; OverdraftDto gains Frozen and the detail test moves to bite 5; the revaluation seam gains the closed day and the dispatcher cascade (a finding against ADR-836); sixteen scenarios the authors wrote as unhappy paths join bites 2, 3 and 5. The rates are named rate types in the country × package cell, not properties (F18, corrected twice).

Footprint

Feature projects touched: 6 — LedgerTM.Accounts, LedgerTM.Contracts, LedgerTM.Limits, LedgerTM.Seeding.Provisioning, LedgerTM.Seeding.ZaRetail.Samples, ui-apps

Contracts types: 22 named, 15 changed by this ADR

Files reading each changed type: 15 types

Domain events touched: 1 — FacilityUsageSet Aggregates touched: 1

Methods at CRAP 30+ in changed files: 9 (unit coverage, cached at main 56b33d240)

Warnings

Land batches

One land, the whole ADR; reseed: true. Bites 4 and 5 start after ADR-836 has landed (F16): the lane builds 1–3 and 6 first and takes 4 and 5 after a bite-boundary merge, or partition puts the two ADRs in one lane with ADR-836’s bites first.

Notes

Landing notes