check / check (push) Canceled after 0s
Split kernel::entry_flows into entry_movements and flows_of so the reversal-mirror proof fits CI; prove runs the fast harnesses, prove-slow the 8 slow ones (own job in scheduled CI), prove-all both. Laws in verification.md renumbered 1-31 with a table of all 55 harnesses. MCP docs checked against the 115 tools (about 60 fixes) with a test that every tool is documented; rules.md cross-references fixed; bookspec statuses and loader tightened; viewer notes wrap and accounts sort by code; STATUS.md says P3 is built, cutover pending. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T3gXMVt7XJPi6ens1or9Dj
101 lines
2.8 KiB
TOML
101 lines
2.8 KiB
TOML
# P3 defect 14, the second bug found in design (wanderbooks P3 brief
|
|
# §1.4): a member pays the card from their own funds; reversing it read
|
|
# as a second payment. Regression test: ledger-core
|
|
# tests/spec_party_totals.rs
|
|
# defect14_a_reversed_member_card_payment_nets_to_zero. The shape:
|
|
# bookspec/README.md (`after = N` asks a query after event N).
|
|
|
|
id = "p3-party-reversed-card-payment"
|
|
title = "A reversed payment of one liability by another nets to zero"
|
|
rule = """
|
|
A reversal's part for each party is its original's negated, never read
|
|
from the reversal's own lines. A member paying the company's card from
|
|
their own funds (Dr card / Cr due to members), tagged with the card's
|
|
issuer, is paid to the issuer; its reversal takes that back, so the pair
|
|
nets to zero; reversing the reversal pays it again.
|
|
"""
|
|
status = "CHOICE"
|
|
sources = [
|
|
"Pacioli, Summa (1494), Geijsbeek tr.: a mistake is corrected by the opposite entry (wanderbooks docs/spec/sources/pacioli-1494.md, rules.md B-9)",
|
|
"DECISION D-42 (owner, 2026-10-20): what a member pays for the company through the members' financing is money: cash borrowed and spent (wanderbooks plan/served.md; rules.md B-14 rule 11, B-35 items 5 and 8)",
|
|
]
|
|
tags = ["parties", "reversals", "liabilities"]
|
|
|
|
[setup]
|
|
currency = "USD"
|
|
fiscal_year_start = "01-01"
|
|
basis = "accrual"
|
|
rounding = "half-even"
|
|
cash_accounts = ["1000"]
|
|
financing_accounts = ["2100"]
|
|
|
|
[[setup.accounts]]
|
|
code = "1000"
|
|
name = "Checking"
|
|
type = "asset"
|
|
|
|
[[setup.accounts]]
|
|
code = "2050"
|
|
name = "Business Card"
|
|
type = "liability"
|
|
|
|
[[setup.accounts]]
|
|
code = "2100"
|
|
name = "Due to Members"
|
|
type = "liability"
|
|
|
|
[[setup.parties]]
|
|
name = "Harbor Bank"
|
|
roles = ["financial_institution"]
|
|
|
|
[[events]]
|
|
date = "2026-06-01"
|
|
description = "A member pays the card from their own funds"
|
|
parties = [{ party = "Harbor Bank" }]
|
|
lines = [
|
|
{ account = "2050", side = "debit", amount = "100.00" },
|
|
{ account = "2100", side = "credit", amount = "100.00" },
|
|
]
|
|
|
|
[[events]]
|
|
date = "2026-06-02"
|
|
description = "Reversed"
|
|
reverses = 1
|
|
|
|
[[events]]
|
|
date = "2026-06-03"
|
|
description = "The reversal reversed"
|
|
reverses = 2
|
|
|
|
[[expect]]
|
|
query = "party_part"
|
|
entry = 1
|
|
party = "Harbor Bank"
|
|
values = { resolved = "100.00", direction = "paid", cash = "100.00", in_kind = "0.00" }
|
|
|
|
[[expect]]
|
|
query = "party_part"
|
|
entry = 2
|
|
party = "Harbor Bank"
|
|
values = { resolved = "-100.00", direction = "received", cash = "-100.00", in_kind = "0.00" }
|
|
|
|
# After the reversal: nothing paid (before P3: 200.00, the reversal read
|
|
# as a second payment).
|
|
[[expect]]
|
|
query = "party_totals"
|
|
after = 2
|
|
party = "Harbor Bank"
|
|
basis = "cash"
|
|
from = "2026-01-01"
|
|
to = "2026-12-31"
|
|
values = { paid = "0.00", received = "0.00" }
|
|
|
|
[[expect]]
|
|
query = "party_totals"
|
|
after = 3
|
|
party = "Harbor Bank"
|
|
basis = "cash"
|
|
from = "2026-01-01"
|
|
to = "2026-12-31"
|
|
values = { paid = "100.00", received = "0.00" }
|