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:
swaitsandMuse Wonder 1.0 committed 2026-11-08 19:40:22 -07:00
1 parent 7a177a3cfc
commit 489360f598
221 files changed
+1706 -1580

No files matched your search

+4 -4
View File
@@ -1,6 +1,6 @@
//! Spec-derived tests for an asset's basis facts and tax figures
//! (rules.md B-25), its two dates and its two accumulated figures
//! (rules.md B-15, B-24): `BasisRule`, `Sec704cMethod`, `AssetBasis`
//! (BS-asset-4), its two dates and its two accumulated figures
//! (BS-asset-1, BS-asset-3): `BasisRule`, `Sec704cMethod`, `AssetBasis`
//! (`check`, `check_journaled`, `check_legacy_journaled`),
//! `Ledger::set_asset_basis` / `replay_set_asset_basis` /
//! `replay_set_asset_tax_basis`, `Asset::basis_figures`,
@@ -942,7 +942,7 @@ fn posted_follows_the_entries_dates() {
assert_eq!(l.live_depreciation_run(id, "2026-01"), None);
}
/// A reversal of the reversal reinstates the run (B-9), and the run counts
/// A reversal of the reversal reinstates the run (BS-ledger-5), and the run counts
/// again: the month is not due twice (review R2).
#[test]
fn a_reinstated_run_counts_and_is_live() {
@@ -963,7 +963,7 @@ fn a_reinstated_run_counts_and_is_live() {
/// −100.00, as the trial balance does (review R2). No command can write one
/// any more (D-73: a reversal is dated on or after its original, so
/// `reverse_entry` refuses it), but a journal an earlier version wrote holds
/// them and replays as it was (B-28): this test replays one.
/// them and replays as it was (BS-entry-4): this test replays one.
#[test]
fn a_reversal_dated_before_its_run_matches_the_trial_balance() {
let (mut l, a, id, e) = one_run();