Money store without double-entry ledger
errormoney-store-without-double-entry-ledger
The design promises that money movements sum to zero, but it has no ledger to enforce double entry. Balances kept in an ordinary table drift and cannot be audited.
- Severity
- error
- Selects
- every design
- Components in scope
- 2,366
It looks at every design, and fires when:
- — all of these hold:
- — the design requirement `money.zeroSum` is true
- — this does not hold:
- — the design contains a node of kind ledger
Design '{{design.id}}' requires zero-sum money movement but has no ledger node. Record money in an append-only double-entry ledger.This rule is about the whole design, not one node.
This rule names no kind: it reads the design as a whole.
Reference designs whose broken twin names this rule in its header. The gate reads the same header, and fails when a rule no design trips.
# yaml-language-server: $schema=../schema/rule.schema.json # The design promises the books balance to zero, but no ledger kind exists to enforce # double entry. Balances kept in an ordinary table drift and cannot be audited. # Tripped by: designs/payment-system.broken.yaml schemaVersion: "1" type: "rule" id: "money-store-without-double-entry-ledger" severity: "error" select: design: true when: all: - requirement: "money.zeroSum" equals: true - not: hasNode: kind: "ledger" message: "Design '{{design.id}}' requires zero-sum money movement but has no ledger node. Record money in an append-only double-entry ledger."