fix: rule references the rewrite missed and ranges it mangled

common.rs (two doc comments and a test-helper panic message) and the fuzz target still cited the retired numbering outside the script's roots; they now cite BS-period-3 and BS-arap-2. A repo-wide sweep of tracked files found no other real citations beyond the deliberately kept strings.

Bookspec ids are not ordered across areas, so ranges the script produced are nonsense: the three 'all rules' ranges now say all 45 rules in docs/spec/rules.md's index, the seven allocated ids and the nine statement-era ids are listed explicitly, taken from that index table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Opus 5.5 committed 2026-11-08 20:02:08 -07:00
1 parent d45cb8687b
commit 9aeee94fd2
6 files changed
+18 -16

No files matched your search

+4 -2
View File
@@ -7,8 +7,10 @@
//! reproducible and its workpaper hashes the same twice.
//! SOURCE: IRS Pub. 583 (records that support entries); Rev. Proc. 98-25
//! §5.01 (the relationship between the records and the books must
//! be demonstrable); BS-statement-1 to BS-statement-3 (the
//! statements), BS-arap-2 (control accounts), BS-entry-5 (evidence);
//! be demonstrable); BS-statement-1, BS-statement-2, BS-ledger-4, BS-ledger-5,
//! BS-ledger-6, BS-period-1, BS-period-2, BS-partner-1 and
//! BS-statement-3 (the statements), BS-arap-2 (control accounts),
//! BS-entry-5 (evidence);
//! DECISION D-9 (the audit and its bar), D-53 (a run, not a job).
//! INVARIANTS:
//! 1. Pure: reads the ledger and the facts [`AuditInput`] hands in,
+3 -3
View File
@@ -16,7 +16,7 @@ pub(crate) fn account_type(a: &AccountSpec, id: &str) -> AccountType {
}
/// The period `[from, to]` a period query covers, each date omitted
/// resolved by the one rule (B-30) on `setup.today`; panics on
/// resolved by the one rule (BS-period-3) on `setup.today`; panics on
/// `as_of`, on an omitted date without `setup.today`, and on a period the
/// rule refuses.
pub(crate) fn period(ex: &Example, x: &Expect) -> (NaiveDate, NaiveDate) {
@@ -83,12 +83,12 @@ pub(crate) trait Pipe: Sized {
}
}
impl<T> Pipe for T {}
/// What an omitted date means for `ex` (B-30): its fiscal year
/// What an omitted date means for `ex` (BS-period-3): its fiscal year
/// on `setup.today`, which `query` needs.
pub(crate) fn defaults(ex: &Example, query: &str) -> PeriodDefaults {
let today = ex.setup.today.as_deref().unwrap_or_else(|| {
panic!(
"{}: {query} omits a date: setup.today says what it means (B-30)",
"{}: {query} omits a date: setup.today says what it means (BS-period-3)",
ex.id
)
});