From d889f2e7fba75fbfc3ebe96cd6c7c1c7cdb9f422 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Mon, 9 Nov 2026 03:44:13 -0700 Subject: [PATCH] docs(claims): the draft and evidence examples are checked lines B-1 (BS-entry-1, BS-entry-6), B-43 (BS-entry-5) and B-20 (BS-ledger-7, BS-ledger-17) name the bookspec examples that now show their rules, the real engine functions each runs through, and the examples for the options wanderbooks did not pick, which are skipped. Co-Authored-By: Claude Sonnet 5.5 --- docs/spec/claims/entry.md | 17 +++++++++++++++-- docs/spec/claims/ledger.md | 7 ++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/docs/spec/claims/entry.md b/docs/spec/claims/entry.md index b311d1e2..42ecf20b 100644 --- a/docs/spec/claims/entry.md +++ b/docs/spec/claims/entry.md @@ -21,7 +21,13 @@ more lines, debits = credits exactly); `Ledger::add_line` for the account check at line-adding time (`a_line_on_an_unknown_or_placeholder_account_is_refused_when_added`). **Checked:** Kani `check_lines_is_exact`, `accepted_entry_nets_to_zero`; Lean -`Accepted.net_zero`; property `prop_posted_entries_balance`. +`Accepted.net_zero`; property `prop_posted_entries_balance`; bookspec example +`entry-a-line-on-a-header-is-refused-when-it-is-added` (BS-entry-6, the option +picked: a draft with a line on a header account is refused as the draft is +made, through `Ledger::try_create_entry` and `Ledger::add_line`, and the +refusal read off the engine's `LedgerError::PlaceholderAccount`); the example +`entry-a-line-on-a-header-is-refused-when-the-entry-posts` names the option +not picked and is skipped. ### Product rules @@ -209,7 +215,14 @@ pinned; every tool over every old book). (`draft_states_replay_and_project`, `drafts_v2_waits_for_the_upgrade`, `posted_seq_is_the_posting_lines_seq`); `ledger-cli` `tests/drafts.rs` (`a_draft_waits_for_its_receipt_and_posts`, `a_reversal_needs_no_receipt_of_its_own`, `gui_and_server_gate_agree`, -`stale_preview_refused`). +`stale_preview_refused`); bookspec examples, through `Store::post_entry_checked`, +`Store::set_draft_state`, `Store::attach_receipt`, `Store::discard_draft` and +`ledger_core::evidence::requirement`, each answer read off the engine: +`entry-a-draft-waits-on-its-evidence-and-posts-once-it-has-it`, +`entry-a-discarded-draft-leaves-the-books-unchanged`, +`entry-a-drafts-state-is-a-note-and-a-posted-entry-has-none`, +`period-a-draft-holds-its-period-open-until-it-is-discarded` (BS-period-2's +`LedgerError::DraftsInPeriod`) and `entry-evidence-is-decided-in-one-place`. ### Product rules diff --git a/docs/spec/claims/ledger.md b/docs/spec/claims/ledger.md index 3d642908..cffad93e 100644 --- a/docs/spec/claims/ledger.md +++ b/docs/spec/claims/ledger.md @@ -164,7 +164,12 @@ None. (`a_draft_waits_for_its_receipt_and_posts`, `a_reversal_needs_no_receipt_of_its_own`); `ledger-store` `tests/store.rs` (`draft_states_replay_and_project`, -`drafts_v2_waits_for_the_upgrade`). +`drafts_v2_waits_for_the_upgrade`); bookspec example +`ledger-a-reversal-needs-no-evidence-of-its-own` (BS-ledger-17, the option +picked: a reversal of a 40.00 entry under a policy of over 25.00 posts at once +and `ledger_core::evidence::requirement` exempts it as a reversal); the example +`ledger-a-reversal-carries-its-own-evidence` names the option not picked and is +skipped. ### Product rules