docs(spec): claims cite the V-D2 tests

WB-entry-5 and WB-entry-6 (the evidence requirement and its exemptions),
WB-ledger-15 (annotations and entry.settles), WB-ledger-10 (approval
rules and renumbering) and WB-ledger-16 (the audit) now name the tests
that check them; the traceability gate resolves each.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Sonnet 5.5 committed 2026-11-09 03:08:03 -07:00
1 parent f2058931d8
commit 7a1d4a51a8
2 files changed
+31 -5

No files matched your search

+16 -2
View File
@@ -219,7 +219,14 @@ of the exemption). The store's gate, the server's previews and digest, the
viewer and Needs attention all call it; none decides on its own.
**Enforced:** `ledger_core::evidence::{requirement, Requirement}`,
`Store::post_entry_checked`. **Checked:** `ledger-cli` `tests/drafts.rs`
(`gui_and_server_gate_agree`).
(`gui_and_server_gate_agree`); `ledger-core` `tests/evidence_gate.rs`
(`a_hand_entry_is_required_above_the_threshold_with_its_reason`,
`a_required_account_always_needs_a_receipt`,
`exempt_accounts_exempt_only_whole_entries`,
`the_threshold_is_strict_and_the_exemption_needs_every_line`,
`a_split_purchase_is_one_purchase`,
`only_the_same_day_description_and_accounts_make_a_split_group`,
`debits_past_exact_arithmetic_are_refused_by_the_sum_and_past_the_threshold_for_the_gate`).
**WB-entry-6** Exempt by origin, each with its source: a period's closing
entry (derived from the books), a schedule month's or a depreciation
@@ -234,7 +241,14 @@ account, or as part of a split group; exempt only when every line is on an
exempt account.
**Enforced:** `ledger_core::evidence::requirement`. **Checked:**
`ledger-cli` `tests/drafts.rs` (`a_reversal_needs_no_receipt_of_its_own`,
`a_draft_waits_for_its_receipt_and_posts`).
`a_draft_waits_for_its_receipt_and_posts`); `ledger-core`
`tests/evidence_gate.rs` (`a_reversal_of_a_large_entry_needs_no_receipt_of_its_own`,
`a_closing_entry_is_derived_so_it_needs_no_receipt`,
`a_schedule_months_posting_has_the_schedule_for_evidence`,
`a_depreciation_run_has_the_assets_schedule_for_evidence`,
`disposals_and_remittances_are_exempt_by_their_recorded_origin`,
`a_document_entry_and_a_payroll_run_carry_their_own_evidence`,
`a_recurring_draft_is_the_policys`).
**WB-entry-7** A draft has a state: `building` (the default) or
`awaiting_evidence` with a note. A state is a note on the draft; it moves
+15 -3
View File
@@ -251,7 +251,7 @@ checked to change no figure or entry;
**WB-ledger-10** Approval rules block anything only when the company enforces them (`policy.approval_rules = enforce`; off by default). Then a draft a rule covers posts only once its approver approved it as it stands (its fingerprint: date, description, every line and class), and an operation that would post such an entry at once (an invoice, a bill, a payment, payroll, a remittance, a disposal) is refused: it is drafted instead. Reversals, closes, depreciation and amortization follow from entries already posted and are exempt. A rule names accounts that take postings, and an account a rule names can't be renumbered until the rule is revised.
*Enforced:* `Ledger::approvals_missing`; `Store::post_entry` and `approval_gate` (`ApprovalRequired`, `ApprovalNeedsDraft`), `check_renumber_account`; `ledger-mcp` `books.post_entry` (`approval_required`).
*Checked:* `ledger-store` `tests/settings.rs` (`approval_rules_off_by_default`, `approvals_cover_every_post`).
*Checked:* `ledger-store` `tests/settings.rs` (`approval_rules_off_by_default`, `approvals_cover_every_post`); `ledger-core` `tests/conventions_refusals.rs` (`approvals_are_missing_only_under_enforcement_and_fail_closed`, `the_fingerprint_notices_parties_shares_and_reasons`, `an_approval_is_refused_for_a_posted_or_unknown_entry_and_bad_text`, `an_approval_rule_needs_an_approver_and_a_limit`), `tests/ledger_edits.rs` (`an_account_is_renumbered_only_where_the_books_can_stand_it`).
## B-31 Renaming an account changes its label, nothing else
@@ -412,7 +412,13 @@ withdraw_attachment_duplicate}` and `Store::attach`'s dedup; feature
`reimbursed_is_derived_from_settles_only`); `ledger-cli`
`tests/evidence.rs` (`get_receipt_default_has_text_and_no_bytes`,
`page_image_is_a_png_of_the_page`,
`consolidation_never_removes_an_entrys_only_evidence`); fuzz targets
`consolidation_never_removes_an_entrys_only_evidence`); `ledger-core`
`tests/evidence_gate.rs` (`annotation_fields_are_trimmed_and_blank_ones_dropped`,
`an_annotation_field_alone_is_a_record`,
`an_annotation_refuses_a_zero_number_a_negative_amount_and_a_date_off_the_calendar`,
`an_annotation_needs_a_field_or_a_note`), `tests/ledger_edits.rs`
(`annotations_replace_by_file_and_receipt_numbers_run_from_the_max`,
`a_settlement_of_entries_names_existing_distinct_entries_only`); fuzz targets
`fuzz_extract_pdf` and `fuzz_extract_xlsx`.
## B-45 An audit is deterministic over the books; an attestation is a claim by a named client
@@ -505,7 +511,13 @@ ledger-mcp `tools/audit.rs` and the gate in `books.export_cpa_package`,
journal feature `audits`.
*Checked:* `ledger-core` `tests/audit.rs`
(`audit_detects_each_seeded_defect`, `below_bar_not_counted`,
`amount_mismatch_never_counts`); `ledger-store` `tests/audit.rs`
`amount_mismatch_never_counts`), `tests/audit_branches.rs`
(`the_cash_flow_check_says_what_it_found`,
`control_accounts_report_differences_unattached_lines_and_overpaid_documents`,
`a_close_split_drifts_only_beyond_a_minor_unit`,
`a_reversal_without_its_own_receipt_is_info_and_only_when_the_policy_would_cover_it`,
`the_bar_setting_parses_what_it_names_and_refuses_the_rest`,
`the_bar_counts_at_its_edges_and_only_asks_for_what_it_sets`); `ledger-store` `tests/audit.rs`
(`audit_writes_wait_for_audits`, `a_run_is_idempotent_on_the_figure_head`,
`stale_head_period_attestation_refused`, `integrity_detects_each_seeded_defect`,
`books_the_version_before_p8_wrote_wait_for_the_upgrade`); `ledger-import`