recon_gen.common.spine.failed_transaction
FailedTransaction family — spine generator only (no Invariant).
AY.2.b promotion of the OLD FailedTransactionPlant /
_emit_failed_transaction_rows. The plant emits ONE Debit leg with
status='Failed' per scenario; drives the L2FT Postings dataset’s
Status='Other' dropdown coverage (X.1.g e2e test). The L1 schema
treats status as an open enum — Pending / Posted are the
tracked terminal states, anything else (Failed, Cancelled, …)
collapses to Other in the L2FT dataset’s CASE projection.
Not a violation — the existence of a Failed leg is a valid terminal state. The generator’s intended returns an AuditFixture (the AY.2.a evidence-currency subtype for audit-PDF / dropdown input markers; no matview surfaces these). No Invariant matches; the generator registers in INVARIANT_GENERATOR_EDGES with an empty tuple of invariants (the AY.2.b widening that lets coverage / audit-fixture generators stay on the spine without inventing no-op detectors).
Single-edge property: transfers-only emit, no balance row, no drift trip.
Classes
|
Plant ONE Debit leg with |
- class recon_gen.common.spine.failed_transaction.FailedTransactionGenerator(account_id, account_role, account_scope, account_parent_role, rail_name, amount, anchor_day, prefix='spec_example')[source]
Bases:
objectPlant ONE Debit leg with
status='Failed'.Single-leg, no counter-leg: a Failed transaction never settled, so the rail’s other side wasn’t created. The leg posts at a normal Debit shape with
status='Failed'so the L2FT postings dataset’sCASE WHEN status IN ('Pending','Posted') THEN status ELSE 'Other' ENDcollapses it toOther.Account context (role / scope / parent_role) arrives as construction args; the AY.4 adapter resolves them from the OLD plant’s referenced template instance.
- Parameters:
account_id (str)
account_role (str)
account_scope (str)
account_parent_role (str | None)
rail_name (str)
amount (float)
anchor_day (date)
prefix (str)
- account_id: str
- account_parent_role: str | None
- account_role: str
- account_scope: str
- amount: float
- anchor_day: date
- property claimed_accounts: frozenset[str]
- emit(conn, *, scenario_id=None)[source]
- Return type:
None- Parameters:
conn (SyncConnection)
scenario_id (str | None)
- property intended: AuditFixture
The Failed-status row’s identity — the dropdown-coverage claim the X.1.g e2e test reads back.
- prefix: str = 'spec_example'
- rail_name: str
- property transaction_id: str
Deterministic id from the account_id — claimed_accounts + transaction_id naming both derive purely from construction fields so the AV.5 ScenarioContext collision check fires consistently.