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
@@ -71,7 +71,7 @@ fn sort_value(v: &Value) -> Value {
|
||||
}
|
||||
|
||||
/// The keys of a journal line, the same in every journal format
|
||||
/// (rules.md B-27): a newer format adds its fields inside `payload`, never
|
||||
/// (BS-format-1): a newer format adds its fields inside `payload`, never
|
||||
/// beside it, and a line's hash is always the SHA-256 of its canonical
|
||||
/// JSON ([`canonical_json`]), whatever the format.
|
||||
pub const ENVELOPE_KEYS: [&str; 5] = ["payload", "prev", "seq", "ts", "type"];
|
||||
@@ -84,7 +84,7 @@ impl JournalLine {
|
||||
/// hash chain covers) is a fixed point.
|
||||
/// SOURCE: R-2 (no floats in money paths); found by fuzz_journal_line
|
||||
/// (2026-10-13): a float payload re-canonicalized differently;
|
||||
/// rules.md B-27 (the envelope is frozen).
|
||||
/// BS-format-1 (the envelope is frozen).
|
||||
/// INVARIANTS:
|
||||
/// 1. NEVER accepts a floating-point number anywhere in the line:
|
||||
/// amounts are decimal strings and ids are integers.
|
||||
@@ -267,7 +267,7 @@ pub fn read_and_verify_journal(path: &Path) -> Result<Vec<JournalLine>, StoreErr
|
||||
///
|
||||
/// ```text
|
||||
/// GOAL: books read whole and verified, or refused with the reason.
|
||||
/// SOURCE: docs/receipt-store.md "Line format"; rules.md B-27.
|
||||
/// SOURCE: docs/receipt-store.md "Line format"; BS-format-1.
|
||||
/// INVARIANTS:
|
||||
/// 1. Line by line, in order: parse, seq, chain, then the format gate.
|
||||
/// 2. Damage before the first line this version can't read is
|
||||
|
||||
Reference in new issue
Block a user