refactor: rule references cite bookspec ids
Every B-n citation in crates/, docs/, deploy/, scripts/ and .github/ now names its bookspec id BS-<area>-<n> (D-68), via scripts/rewrite-rule-refs.py: the map is parsed from docs/spec/rules.md's index, rules.md-prefixed and bare forms are rewritten, sub-references (rule 11, item 7, INVARIANT 2) survive, and plan/, docs/spec/rules.md and docs/spec/claims/ are untouched. Program-output string literals that cited a rule were reverted by hand so user-visible output and its goldens are unchanged; DatedRule.catalog, metadata no output prints, now holds BS-1099-1. One SOURCE line that cited only 'R-?' now also cites BS-statement-5. Co-Authored-By: Muse Wonder 1.0
This commit is contained in:
1 parent
7a177a3cfc
commit
489360f598
221 files changed
+1706
-1580
No files matched your search
@@ -1,6 +1,6 @@
|
||||
//! Figures derived from what replay accepts: computed exactly where exact
|
||||
//! arithmetic and chrono's calendar reach, refused (TooLargeToCompute,
|
||||
//! DateOutOfRange) where they don't, never a panic (rules.md B-28; P0
|
||||
//! DateOutOfRange) where they don't, never a panic (BS-entry-4; P0
|
||||
//! review round 4, 2026-10-17).
|
||||
//!
|
||||
//! ```text
|
||||
@@ -243,8 +243,8 @@ fn a_draft_of_decimals_largest_is_refused_where_summed() {
|
||||
assert!(why.contains("too large to compute"), "{why}");
|
||||
assert_eq!(l.post_entry(e).unwrap_err(), LedgerError::AmountOutOfRange);
|
||||
}
|
||||
// A member's capital moved past exact arithmetic (rules.md B-35, case
|
||||
// 3, B-28): the target is refused, never a panic.
|
||||
// A member's capital moved past exact arithmetic (BS-partner-3, case
|
||||
// 3, BS-entry-4): the target is refused, never a panic.
|
||||
let e = l.create_entry(d(2026, 3, 1), "huge capital");
|
||||
for _ in 0..2 {
|
||||
l.replay_add_line(e, cash, Side::Debit, usd(Decimal::MAX))
|
||||
@@ -285,7 +285,7 @@ fn a_draft_of_decimals_largest_is_refused_where_summed() {
|
||||
|
||||
/// A document is restored as journaled: its total is exact, or refused
|
||||
/// past exact arithmetic; what it owes is what the ledger lines tagged
|
||||
/// with it carry (rules.md B-38), exact, whatever the journal held (paid
|
||||
/// with it carry (BS-arap-2), exact, whatever the journal held (paid
|
||||
/// above its total included); aging refuses a document whose total it
|
||||
/// can't compute.
|
||||
#[test]
|
||||
@@ -363,7 +363,7 @@ fn documents_and_aging_are_exact_or_refused() {
|
||||
(Decimal::from(11), -Decimal::ONE)
|
||||
);
|
||||
// A payment event naming an amount no line of its entry carries tags
|
||||
// nothing, and is refused nothing (B-28).
|
||||
// nothing, and is refused nothing (BS-entry-4).
|
||||
l.replay_invoice_payment(1, -Decimal::ONE, p).unwrap();
|
||||
assert_eq!(l.get_invoice(1).unwrap().balance(), Ok(-Decimal::ONE));
|
||||
// A total of lines that overflow, and its balance; aging refuses it.
|
||||
|
||||
Reference in new issue
Block a user