test(core): no retired rule number anywhere, SOURCE clauses checked whole
The retired-reference test now scans the whole text of every tracked file (git ls-files, skipping plan/, docs/spec/rules.md and docs/spec/claims/) for any word-boundary retired number from 1 to 45, wrapped references included, with an exact-count allow-list for the deliberately kept user-visible and golden strings; a count rising or falling fails. The SOURCE test now reads each whole clause with its continuations (crates/*/src, crates/*/tests and fuzz/), checks every bookspec and product-rule id in it, requires every path-like token to exist and every crate code reference to name a real item, counts clauses passing only through the free-text branch against a constant (56; 353 clauses checked), and keeps a floor on the total. The repo_root doc comment became the module header. Lines the tightened check made fail, fixed in the lines not the test: relative sources/ and claims/ paths in form1099, instruments, kernel entries, money, kernel round and the 1099 tests now give full docs/spec paths; wrapped docs/spec/sources/ and docs/parties-and-attachments.md paths in ledger, store, reconciliation, tins and the GUI books module are joined; settings.rs names the real parser path instead of a runtime filename; the bounds tests name the real kernel and calendar files, and spec_bounds no longer cites rules.md for the line bound. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9aeee94fd2
commit
8d3cc5056f
16 files changed
+349
-128
No files matched your search
@@ -5186,8 +5186,8 @@ impl Store {
|
||||
///
|
||||
/// ```text
|
||||
/// GOAL: rename an account, keeping the name it had in the journal.
|
||||
/// SOURCE: BS-ledger-10; Rev. Proc. 98-25 (docs/spec/sources/
|
||||
/// irs-records.md): a report printed under the old name can
|
||||
/// SOURCE: BS-ledger-10; Rev. Proc. 98-25
|
||||
/// (docs/spec/sources/irs-records.md): a report printed under the old name can
|
||||
/// be tied to the new one.
|
||||
/// INVARIANTS:
|
||||
/// 1. Only the account's name changes (Ledger::rename_account
|
||||
@@ -5967,8 +5967,8 @@ impl Store {
|
||||
/// ```text
|
||||
/// GOAL: a monthly close that leaves proof: which statement, which
|
||||
/// balance, which lines it cleared.
|
||||
/// SOURCE: CONVENTION (bank reconciliation); docs/parties-and-
|
||||
/// attachments.md "Reconciliations"; DECISION (owner,
|
||||
/// SOURCE: CONVENTION (bank reconciliation);
|
||||
/// docs/parties-and-attachments.md "Reconciliations"; DECISION (owner,
|
||||
/// 2026-10-15).
|
||||
/// INVARIANTS:
|
||||
/// 1. Recorded only when the difference is exactly zero
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
//! run without end; no journal line an earlier version wrote is
|
||||
//! refused for a bound added after it.
|
||||
//! SOURCE: DECISION (P0 review round 3, 2026-10-16, S1; round 4,
|
||||
//! 2026-10-17); ledger_core calendar.rs and kernel.rs
|
||||
//! MAX_LINE_AMOUNT.
|
||||
//! 2026-10-17); ledger_core `crates/ledger-core/src/calendar.rs`
|
||||
//! and `crates/ledger-core/src/kernel/entries.rs` MAX_LINE_AMOUNT.
|
||||
//! ```
|
||||
|
||||
use chrono::NaiveDate;
|
||||
|
||||
Reference in new issue
Block a user