docs: sub-references name bookspec's statements, invariants and scenarios
Unit S-E rewrote each `B-n` citation to its bookspec id but kept the
sub-reference after it ("item 7", "rule 11", "INVARIANT 2"). Those
numbers counted parts of the retired rules.md text, so `BS-statement-5
item 7` pointed at finished and abandoned projects, not at the snapshot
it meant. Bookspec numbers a record's parts from 1 as `statement`,
`invariant` and `scenario`; every sub-reference now says so.
The map was built by content, not by position: each old item,
INVARIANT or SCENARIO was read in `git show ca8d676d5^:docs/spec/rules.md`
(the last full rule text), found in the pinned records
(bookspec bc92cf3) and in docs/spec/claims/, and each reference was
read in its context before it was mapped. Where the old numbering still
survives as the "Rule n" labels inside bookspec's statements (the cash
flow, party totals) the new number is that statement's position; where
a record carries the whole rule differently (the asset depreciation, the
IIF file, the arap invariants) the reference follows the content. Where
bookspec keeps no counterpart, the product rule that states it is cited
instead: WB-statement-5 (a project's facts and names), -7 (the snapshot),
WB-arap-4 (the document_standing feature), -8 (the issued PDF), -15 (a
payment event names its line), WB-ledger-15 (BS-ledger-12 is retired).
A reference that had pointed at the wrong part is corrected, for example
the discount-reason references that said BS-arap-6 INVARIANT 2 (a
bound) now say invariant 6 (the discount cap and date).
Only the reference tokens and their sentence change; no paragraph is
reflowed. A reference wrapped across a comment prefix keeps its wrap.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
609e4e6b26
commit
e41cc3a161
78 files changed
+298
-302
No files matched your search
@@ -168,7 +168,7 @@ fn s(t: &str) -> String {
|
||||
t.to_string()
|
||||
}
|
||||
|
||||
/// The laws every statement keeps (BS-statement-3 rules 8 and 9): each
|
||||
/// The laws every statement keeps (BS-statement-3 statements 13 and 14): each
|
||||
/// section is its lines, and its kinds; the sections are the change in
|
||||
/// cash; net income and the reconciling items are operating.
|
||||
fn foots(cf: &CashFlowStatement) {
|
||||
@@ -205,7 +205,7 @@ fn no_distribution(cf: &CashFlowStatement) {
|
||||
/// The minimal reproduction of defect 1. Property contributed (Dr
|
||||
/// Equipment 2,340 / Cr Capital), the asset registered, the entry reversed
|
||||
/// the same day. No cash moved, and the entry and its reversal cancel
|
||||
/// (BS-statement-3 rules 1, 6): every section 0.00, no lines, no
|
||||
/// (BS-statement-3 statements 2 and 11): every section 0.00, no lines, no
|
||||
/// disclosures, footing 0 / 0 / 0. Before the fix: investing −2,340.00
|
||||
/// against a change in cash of 0.00 (the reversal's credit to the
|
||||
/// equipment account belonged to no section).
|
||||
@@ -876,7 +876,7 @@ fn a_property_contribution_is_a_noncash_disclosure() {
|
||||
assert_eq!(n.label, format!("Laptop contributed (#{e})"));
|
||||
}
|
||||
|
||||
/// D-42, BS-statement-3 rule 11 (ASC 230 is silent on a payment a third
|
||||
/// D-42, BS-statement-3 statement 16 (ASC 230 is silent on a payment a third
|
||||
/// party makes on the entity's behalf; PwC FSP 6.9.3.1, DART Roadmap 7.2
|
||||
/// and BDO Blueprint 3.4 present it by substance, as constructive receipt
|
||||
/// and disbursement). An expense a member pays personally (Dr Supplies
|
||||
@@ -1011,7 +1011,7 @@ fn equipment_a_lender_paid_for_is_borrowed_and_invested() {
|
||||
assert_eq!(cf.net_change_in_cash, x("-500.00"));
|
||||
}
|
||||
|
||||
/// The expense-to-capital case (BS-statement-3 rule 11): a member pays a
|
||||
/// The expense-to-capital case (BS-statement-3 statement 16): a member pays a
|
||||
/// vendor for the company and the books credit the member's capital (Dr
|
||||
/// Supplies 80 / Cr Capital — Member A), no cash. The member paid cash to
|
||||
/// a third party on the company's behalf, as through 2100; only the form
|
||||
@@ -1150,7 +1150,7 @@ fn equipment_on_the_sellers_credit_stays_noncash_and_flagged() {
|
||||
assert!(w.message.contains("borrowed and spent"), "{}", w.message);
|
||||
}
|
||||
|
||||
/// BS-statement-3 rule 6 with rule 11: a payment a member made for the
|
||||
/// BS-statement-3 statement 11 with statement 16: a payment a member made for the
|
||||
/// company and its reversal, both in February, drop out together (their
|
||||
/// flows, constructive cash included, are exact negatives: Kani
|
||||
/// `constructive_mirrors`); no line, no disclosure, no total moves. The
|
||||
@@ -1351,7 +1351,7 @@ fn interest_and_guaranteed_payments_charged_to_a_creditor_stay_noncash() {
|
||||
);
|
||||
}
|
||||
|
||||
/// BS-statement-3 rule 6 (BS-ledger-5: a correction undoes what it corrects): an
|
||||
/// BS-statement-3 statement 11 (BS-ledger-5: a correction undoes what it corrects): an
|
||||
/// entry and its reversal both in the period drop out of every line and
|
||||
/// disclosure, and no total moves (their flows are exact negatives, Kani
|
||||
/// `entry_flows_of_a_reversal_mirror`).
|
||||
@@ -1390,7 +1390,7 @@ fn an_entry_and_its_reversal_in_the_period_drop_out() {
|
||||
assert_eq!(cf.net_change_in_cash, before.net_change_in_cash);
|
||||
}
|
||||
|
||||
/// BS-statement-3 rule 6: a reversal shown alone (its original in an
|
||||
/// BS-statement-3 statement 11: a reversal shown alone (its original in an
|
||||
/// earlier period) is labelled "Reversal of #N — <N's description>" and
|
||||
/// listed under its original's kind, never as a distribution (D1-c).
|
||||
#[test]
|
||||
@@ -1414,7 +1414,7 @@ fn a_reversal_alone_is_labelled_reversal_of() {
|
||||
no_distribution(&cf);
|
||||
}
|
||||
|
||||
/// BS-statement-3 rules 4 and 6: a reversal takes its chain root's
|
||||
/// BS-statement-3 statements 5 and 11: a reversal takes its chain root's
|
||||
/// sections, class and kind, with its own sign. Reversing January's cash
|
||||
/// sale at a 300 gain in February: investing −500 under "Proceeds from
|
||||
/// sales of property and equipment", G +300 (the gain, reversed, is still
|
||||
@@ -1766,7 +1766,7 @@ fn operating_classes_follow_asc_230_10_45_25() {
|
||||
|
||||
/// ASC 230-10-45-28(b): depreciation is an item of net income with no
|
||||
/// cash effect, a reconciling item; it is not an investing or financing
|
||||
/// activity, so nothing is disclosed (BS-statement-3 rule 7).
|
||||
/// activity, so nothing is disclosed (BS-statement-3 statement 12).
|
||||
#[test]
|
||||
fn depreciation_is_reconciling_not_disclosed() {
|
||||
let mut b = funded();
|
||||
@@ -1862,7 +1862,7 @@ fn operating_reconciliation_ties_to_operating_cash() {
|
||||
);
|
||||
}
|
||||
|
||||
/// BS-period-1 and BS-statement-3 rule 10: a period close moves earnings into
|
||||
/// BS-period-1 and BS-statement-3 statement 15: a period close moves earnings into
|
||||
/// equity; it earns and spends nothing, so it is never in the statement.
|
||||
#[test]
|
||||
fn closing_entries_never_appear() {
|
||||
@@ -1881,7 +1881,7 @@ fn closing_entries_never_appear() {
|
||||
assert!(!text.contains(&format!("entry: {close},")));
|
||||
}
|
||||
|
||||
/// The period is [start, end] inclusive (BS-statement-3 rule 1): a
|
||||
/// The period is [start, end] inclusive (BS-statement-3 statement 2): a
|
||||
/// contribution on the start date is a flow, not opening cash.
|
||||
#[test]
|
||||
fn cash_flow_starts_counting_on_the_start_date() {
|
||||
@@ -1921,8 +1921,7 @@ fn a_transfer_between_cash_accounts_is_not_a_flow() {
|
||||
assert!(cf.noncash_disclosures.is_empty());
|
||||
}
|
||||
|
||||
/// Review round 2, footing in odd shapes (BS-statement-3 rules 1, 6, 9,
|
||||
/// 11), by hand:
|
||||
/// Review round 2, footing in odd shapes (BS-statement-3 statements 2, 11, 14 and 16), by hand:
|
||||
/// - two cash accounts in one entry, a transfer less its fee (Dr Savings
|
||||
/// 99, Dr Supplies 1 / Cr Cash 100): only the net, −1, moves cash,
|
||||
/// operating (d); no investing or financing;
|
||||
@@ -2217,7 +2216,7 @@ fn financing_lists_each_members_contributions_and_distributions() {
|
||||
/// "at a minimum" apart from the other classes, so an entry's operating
|
||||
/// cash is classed kind by kind: its interest lines are (b) or (e)
|
||||
/// whatever else it settles, the rest by its structure (BS-statement-3
|
||||
/// rule 5). By hand:
|
||||
/// statement 7). By hand:
|
||||
/// - a payment of 900 on a loan the settings leave operating, with 100
|
||||
/// interest (Dr 2500 900, Dr 6200 100 / Cr cash 1,000): (d) −900 and
|
||||
/// (e) −100, not (e) −1,000;
|
||||
@@ -2547,7 +2546,7 @@ fn a_reversed_bill_payment_leaves_the_purchase_unpaid() {
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Role refusals (BS-statement-3 rule 2) and the footing check (rule 9).
|
||||
// Role refusals (BS-statement-3 statement 3) and the footing check (statement 14).
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
fn refused(b: &Books, cash: &[&str], financing: &[&str], investing: &[&str]) -> String {
|
||||
@@ -2617,7 +2616,7 @@ fn a_registered_asset_account_cannot_be_cash() {
|
||||
assert!(m.contains("a registered fixed asset's account"), "{m}");
|
||||
}
|
||||
|
||||
/// BS-statement-3 rule 9: any difference between the sections and the
|
||||
/// BS-statement-3 statement 14: any difference between the sections and the
|
||||
/// change in cash is an engine error, never a statement.
|
||||
#[test]
|
||||
fn foot_refuses_any_difference() {
|
||||
@@ -3244,7 +3243,7 @@ fn a_disposals_depreciation_credit_back_is_depreciation() {
|
||||
assert_eq!(cf.cash_from_investing, x("975.00"));
|
||||
}
|
||||
|
||||
/// BS-statement-3 rule 5 (the P3 cutover review's open point 2): ASC
|
||||
/// BS-statement-3 statement 8 (the P3 cutover review's open point 2): ASC
|
||||
/// 230-10-45-17(c), "Cash payments to governments for taxes, duties,
|
||||
/// fines, and other fees or penalties", is not 45-17(b)'s "Cash payments
|
||||
/// to other suppliers and employees": a state's filing fee booked to an
|
||||
@@ -3316,7 +3315,7 @@ fn a_payment_to_a_government_is_other_operating() {
|
||||
assert_eq!((line.class, line.amount), (Some(OtherPayments), x("75.00")));
|
||||
}
|
||||
|
||||
/// BS-statement-3 rule 5: the payee decides on any account, and the tax
|
||||
/// BS-statement-3 statement 8: the payee decides on any account, and the tax
|
||||
/// category still does without one: a license on `taxes_licenses` with no
|
||||
/// party is (g). An entry naming a government and a supplier together
|
||||
/// (half each) is split by their shares, as ASC 230-10-45-22 has each
|
||||
@@ -3371,7 +3370,7 @@ fn a_government_payee_moves_a_fee_on_any_account() {
|
||||
assert_eq!(classes(&cf, shared), [(OtherPayments, x("-100.00"))]);
|
||||
}
|
||||
|
||||
/// BS-statement-3 rule 5: a split by shares that leaves an odd cent rounds
|
||||
/// BS-statement-3 statement 8: a split by shares that leaves an odd cent rounds
|
||||
/// the government's part half to even, the supplier's the rest, so the
|
||||
/// line still sums to the payment; its reversal next month mirrors it to
|
||||
/// the cent. Fixed amounts split as given.
|
||||
@@ -3450,7 +3449,7 @@ fn a_shared_government_payment_splits_to_the_cent() {
|
||||
);
|
||||
}
|
||||
|
||||
/// BS-statement-3 rule 5: a reversal takes its original's payee, so the
|
||||
/// BS-statement-3 statement 8: a reversal takes its original's payee, so the
|
||||
/// pair always lands in one class and nets. A state's fee paid in
|
||||
/// February and reversed in March: (g) both. The books keep a reversal
|
||||
/// chain's parties one (Ledger::set_entry_parties INVARIANT 5): tagging
|
||||
@@ -3500,7 +3499,7 @@ fn a_reversal_takes_its_originals_payee() {
|
||||
assert_eq!(classes(&b), both(ToSuppliersAndEmployees));
|
||||
}
|
||||
|
||||
/// BS-statement-3 rules 5 and 11: a payment shared between a state and an
|
||||
/// BS-statement-3 statements 8 and 16: a payment shared between a state and an
|
||||
/// agent that a member paid personally (Dr 6000 137.00 / Cr 2100, the
|
||||
/// members' financing account) is borrowed and spent, and its spending is
|
||||
/// split by the parties' shares as a bank payment's is, the part no bank
|
||||
@@ -3577,7 +3576,7 @@ fn a_shared_government_payment_a_member_paid_splits_both_ways() {
|
||||
assert_eq!(cf.net_change_in_cash, Decimal::ZERO);
|
||||
}
|
||||
|
||||
/// BS-statement-3 rule 5 (CONVENTION): payroll keeps its structure. Taxes
|
||||
/// BS-statement-3 statement 9 (CONVENTION): payroll keeps its structure. Taxes
|
||||
/// withheld from employees and remitted to the tax agency are the
|
||||
/// employees' pay (45-17(b), "Cash payments to other suppliers and
|
||||
/// employees"), and the payroll payables mix them with the employer's
|
||||
@@ -3636,7 +3635,7 @@ fn a_payroll_remittance_to_a_tax_agency_stays_pay() {
|
||||
assert_eq!(class(employer), Some(OtherPayments));
|
||||
}
|
||||
|
||||
/// BS-statement-3 rule 5: a government selling goods or services is a
|
||||
/// BS-statement-3 statement 8: a government selling goods or services is a
|
||||
/// supplier (45-17(b), "for other goods or services"), not 45-17(c)'s
|
||||
/// taxes, fees or penalties: the post office named with the `vendor`
|
||||
/// role, postage stays (d). The roles decide, so a post office given the
|
||||
|
||||
Reference in new issue
Block a user