Merge main into the K-U5 branch: X-H1b, K-U3, S-E2, S-E3, X-H1c

This commit is contained in:
swaits committed 2026-11-09 04:35:21 -07:00
commit 5e4950697e
100 files changed
+1793 -374

No files matched your search

+2 -2
View File
@@ -75,9 +75,9 @@ each checked again against the same sources in the P3 review (numbers,
pages and wording hold). Open: 105-10-05-1 to 05-3, read only in their
2009 text (ASU 2009-01, and as Wiley GAAP 2020 quotes them); their
current wording is unconfirmed. Also open (P3 surface review, 2026-10-21): ASC 230-10-45-15(f) (debt
issue costs, cited by BS-statement-3 rule 11) is in neither list above; ASC
issue costs, cited by BS-statement-3 statement 16) is in neither list above; ASC
606-10-25-31, 25-32 and 55-20 (BS-prepaid-1's over-time method) are not yet read;
BS-asset-1 rule 6 cites ASC 250 with no paragraph; BS-revenue-1's 606-10-55-39 is in
BS-asset-1 statement 16 cites ASC 250 with no paragraph; BS-revenue-1's 606-10-55-39 is in
neither list. Each is to be read in the ASC basic view and listed in
`sources/fasb-asc.md` before it is relied on further. Also open (plan
P4b, 2026-10-23): BS-arap-2 cites ASC 310-10, 405-20-40-1 and 606-10-45-4,
+38 -7
View File
@@ -74,7 +74,12 @@ Kani `bounds_check_matches_definition`, `bounds_kept_is_the_definition_on_books_
Lean `Documents.control_agrees`, `Documents.Step.document_unattached`,
`Documents.Step.reverse_moves`, `Documents.Reachable.unattached_zero`
(through role assignments and releases),
`Documents.Reachable.control_is_documents`. The model's limits: it
`Documents.Reachable.control_is_documents`; bookspec examples
`arap-hand-control-posting-refused` (BS-arap-2 `lines-that-stand`: the
hand line is refused, the line an earlier version wrote still reads right),
run by the adapter, and `arap-a-hand-line-on-receivables-is-taken`
(`documents-kept-apart`), which names the option wanderbooks did not pick
and is skipped for it. The model's limits: it
starts from empty books (legacy lines are covered by the identity
`Documents.control_agrees` alone), it names documents by one id space (an injective
coding of `DocRef`), and an account becoming a control account by its
@@ -179,8 +184,8 @@ behind the feature `documents_v2`. **Checked:**
**Claims:** yes
**Pick:** a vendor's invoice reference is compared after the normalization that drops case and spaces (`Ledger::check_vendor_ref`); the old text names no separate decision for it.
**Pick (BS-arap-10):** `ignore-case-and-spaces`; a vendor's invoice reference is compared after the normalization that drops case and spaces.
**Pick:** a vendor's invoice reference is compared after the normalization that drops case, spaces and hyphens (`Ledger::check_vendor_ref`), so "ACME-123", "acme 123" and "Acme123" are one reference (pinned by `duplicate_vendor_ref_refused_unless_a_reason_is_given`); plan P4b S4 (the owner) specifies it.
**Pick (BS-arap-10):** `ignore-case-spaces-and-hyphens`; a vendor's invoice reference is compared after the normalization that drops case, spaces (any whitespace) and hyphens.
**Enforced:** `Ledger::next_invoice_number`, `Ledger::check_vendor_ref`,
`PartySnapshot::from_party` (the snapshots at issue, D-55);
@@ -195,7 +200,14 @@ every amount through `amount_parts`).
`tests/arap_standing.rs` (`documents_v2_waits_for_the_upgrade`,
`issued_pdf_is_filed_with_the_invoice_or_nothing_is`); over the wire
`crates/ledger-cli/tests/documents.rs` (`an_invoice_from_issue_to_paid`,
`duplicate_vendor_invoice_refused`); the page `ledger-import`
`duplicate_vendor_invoice_refused`); bookspec examples
`arap-invoice-numbers-run-in-order-and-are-kept` (the adapter numbers each
invoice with `Ledger::next_invoice_number` and reads the place back from the
number the engine stored), `arap-a-vendor-invoice-is-entered-once`
(the refusal of a second bill, from `Ledger::check_vendor_ref`) and, for
BS-arap-10, `arap-a-vendor-reference-differing-in-case-spaces-and-hyphens-is-a-duplicate`;
`arap-a-vendor-reference-differing-in-case-spaces-and-hyphens-is-not-a-duplicate`
names `compare-exactly` and is skipped; the page `ledger-import`
`tests/spec_import.rs::invoice_pdf_prints_what_it_should` and the unit tests
`labels_are_data`, `an_invoice_renders_deterministically`,
`two_hundred_lines_paginate`; the viewer
@@ -260,7 +272,14 @@ item.
`tests/arap_props.rs` (`status_is_a_function_of_journal_and_date` with
write-offs); over the wire `crates/ledger-cli/tests/documents.rs`
(`write_off_then_recovery`, `write_off_needs_evidence`); bookspec
`bad-debt-direct-write-off`; Lean `Documents.Step.writeOff_unattached`,
`bad-debt-direct-write-off` (BS-arap-5 `direct-write-off`; the allowance
method has no example yet, it needs a provision event) and, for BS-arap-11,
`arap-a-recovery-reverses-the-write-off-in-its-year` (the adapter reverses
the write-off with `Store::reverse_entry` and takes the money with
`Store::receive_payment` in the write-off's tax year, and posts a plain
entry in a later one);
`arap-a-recovery-is-a-movement-on-the-document` names `recovery-movement`
and is skipped; Lean `Documents.Step.writeOff_unattached`,
`Documents.writeOff_within_bounds`; the viewer
`a_write_off_shows_on_the_timeline`; the item
`a_write_off_is_flagged_for_the_cpa`.
@@ -319,12 +338,24 @@ check_discount}`, `arap::{Application, Fee, SettleParams, SettlementRow}`,
(`bill_on_terms_with_discount`, `late_discount_needs_a_reason`,
`discount_on_an_asset_bill_is_refused_with_the_remedy`,
`a_fee_posts_gross_to_receivables_and_net_to_the_bank`,
`a_settlement_names_its_lines_and_refuses_a_document_twice`),
`a_settlement_names_its_lines_and_refuses_a_document_twice`,
`a_fee_above_the_cash_is_refused_and_changes_nothing`: the refusal is
`LedgerError::FeeAboveCash`, its own variant),
`tests/kernel_bridge/main.rs::settle_agrees`; Kani `settle_is_exact`;
`ledger-store` `tests/arap_standing.rs`
(`a_settlement_names_its_lines_and_replays`, `settlement_waits_for_documents_v2`,
`legacy_payment_events_keep_the_positional_rule`), `tests/arap_props.rs`;
`ledger-cli` `tests/documents.rs`; `ledger-package`'s aging tie-out test.
`ledger-cli` `tests/documents.rs`; `ledger-package`'s aging tie-out test;
bookspec examples `arap-a-settlement-pays-several-documents-and-names-each-line`
and `arap-a-settlement-that-is-not-exact-is-refused` (BS-arap-6, through
`Store::settle`, each refusal read off the engine's own error), and one per
option picked: `arap-a-discount-taken-is-booked-when-it-is-taken` (BS-arap-12),
`arap-a-processors-fee-is-posted-gross` (BS-arap-13) and
`arap-a-discount-on-an-asset-bill-is-refused` (BS-arap-14); the examples
`arap-a-discount-expected-is-booked-with-the-document`,
`arap-a-processors-fee-is-not-shown-against-the-deposit` and
`arap-a-discount-on-an-asset-bill-is-apportioned` name the options not picked
and are skipped.
The Lean step is the document constructor of the Lean documents model, with
every control line tagged (`Documents.settle_unattached`); no new step
constructor.
+2 -2
View File
@@ -78,14 +78,14 @@ dates, `accumulated_posted` and its edges,
### Product rules
**WB-asset-1** The bounds `BS-asset-1` states (rules 25-26: a new link to
**WB-asset-1** The bounds `BS-asset-1` states (statements 25-26: a new link to
an entry dated after the in-service date or the disposal is refused, as is
a new in-service date before the linked entry's date, and a disposal dated
before the acquired date is refused) are the commands', never replay's
(B-28): a journal an earlier version wrote replays as written, whatever
those dates say. (That depreciation starts on the in-service date and that
the register holds the asset from the acquired date are `BS-asset-1`
rules 23-24.)
statements 23-24.)
*Enforced:* `set_asset_acquisition` / `replay_set_asset_acquisition`,
`Ledger::asset_acquired_date`, `dispose_asset`, `Ledger::set_asset_acquisition`.
*Checked:* `ledger-core` `tests/spec_asset_basis.rs` (each bound and its
+22 -2
View File
@@ -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,21 @@ 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`), `entry-evidence-is-decided-in-one-place` and
`entry-only-a-draft-can-be-posted-or-discarded` (`LedgerError::EntryAlreadyPosted`
and `LedgerError::UnknownEntry`, through `Store::post_entry` and `Store::discard_draft`). An entry the example
says is refused when posted at once is made, lined and posted on a rehearsal:
the books replayed from their journal into a `Store` of their own (the
journal and the blobs copied, `Store::open`), so the refusal, an evidence
refusal included, is `Store::post_entry_checked`'s own and the example's books
keep no draft the engine would have journaled.
### Product rules
+6 -1
View File
@@ -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
+1 -1
View File
@@ -374,7 +374,7 @@ the 1099 worksheet together, labelled, and neither is read for the
other: `books.get_entry` gives each part's `resolved`, `direction`,
`cash` and `in_kind`; `books.party` gives both a party's totals
(`basis` cash or all) and its worksheet figures, labelled; the known
limits of BS-partner-3 rule 7 are stated in the tools' text; the
limits of BS-partner-3 statement 9 are stated in the tools' text; the
viewer's party pages and entry page show the same parts.
**Enforced:** `ledger-mcp` `books.get_entry`, `books.party`,
+1 -1
View File
@@ -327,7 +327,7 @@ contribution_margin_pct}`, `ProjectToDate::margin_pct`. **Checked:**
**WB-statement-8** The statement's words and groupings are
wanderbooks' product strings, not accounting (the accounting is
BS-statement-3's rules 4, 6 and 8): a reversal shown alone reads
BS-statement-3's statements 5, 11 and 13): a reversal shown alone reads
"Reversal of #N — <N's description>" and a reinstatement "Reinstatement
of #A (reverses #B)", both listed under the original's kind; a
financing inflow under a borrowing reads "Proceeds from borrowing —
+5 -5
View File
@@ -69,7 +69,7 @@ Quotes are short; the rest is paraphrase.
- **230-10-10-1** (EY p. 1): the statement's primary objective is "to
provide relevant information about the cash receipts and cash payments
of an entity during a period." → BS-statement-3 rule 1.
of an entity during a period." → BS-statement-3 statement 2.
- **230-10-45-1** (EY p. 1): the statement "shall report the cash effects
during a period of an entity's operations, its investing transactions,
and its financing transactions." (It says nothing of reconciling
@@ -275,7 +275,7 @@ basic view: check it there at the next reading. A contingency that might
result in a gain "usually should not be reflected in the financial
statements because to do so might be to recognize revenue before its
realization."
→ BS-statement-5 item 4: a payment hoped for from work done on spec is recorded
→ BS-statement-5 statement 5: a payment hoped for from work done on spec is recorded
neither as a receivable nor as income until it is received; the
unrecovered cost is a figure, never an asset.
@@ -289,12 +289,12 @@ contract or an anticipated contract the entity can specifically
identify; they generate or enhance resources used in satisfying
performance obligations in the future; and they "are expected to be
recovered."
→ BS-statement-5 item 4 (with BS-asset-2): on-spec work has no contract it is expected
→ BS-statement-5 statement 5 (with BS-asset-2): on-spec work has no contract it is expected
to recover its costs from, so its costs are expensed as incurred.
## 340-40-25-7 (Costs that relate directly to a contract)
Added 2026-10-22 for BS-statement-5 item 8 as the DART revenue roadmap sets it
Added 2026-10-22 for BS-statement-5 statement 4 as the DART revenue roadmap sets it
out; not re-read in the ASC basic view: check it there at the next
reading. The costs that "relate directly to a contract" (25-5(a)) are
(a) direct labor, (b) direct materials, (c) allocations of costs that
@@ -314,7 +314,7 @@ the contract), costs of wasted materials, labor or other resources not
reflected in the contract's price, costs that relate to satisfied (or
partly satisfied) performance obligations, and costs the entity cannot
tell apart between satisfied and unsatisfied obligations.
→ BS-statement-5 item 8 (with 25-7): a cost traceable to one job (25-7(a), (b),
→ BS-statement-5 statement 4 (with 25-7): a cost traceable to one job (25-7(a), (b),
(d), (e)) is that job's, whole, on the document's line; a cost that
relates to several jobs reaches them only by an allocation on a stated
basis (25-7(c)), which the books record as the allocation convention's
+3 -3
View File
@@ -89,7 +89,7 @@ Cited (not quoted, but for the lines below): the Class list's keyword is CLASS;
> If the class is a subclass of another class, the name includes the name of the parent classes, beginning with the highest level class. If you are creating an import file, use a colon (:) to separate subclass names.
So a class's NAME, like an account's, is one level per colon: the books, whose classes have no parents, write a colon in a class's name as '-', as in an account's (BS-format-2 rule 8). The page states no length limit and nothing about case.
So a class's NAME, like an account's, is one level per colon: the books, whose classes have no parents, write a colon in a class's name as '-', as in an account's (BS-format-2 statement 29). The page states no length limit and nothing about case.
### IIF Example Files: list declarations
SHA-256 of `IIF Import Kit/IIF Example Files/QB 2007 & Enterprise 7.0 and later/Import First - List Declarations (Not Version Specific).iif` (the same bytes in each version's folder): `13c730b23bcb8c142621b04206e3628241d83051442c9b14ea2416d21163439c`
@@ -180,7 +180,7 @@ Searched 2026-10-20. What Intuit says:
Not Intuit, for the record: a third-party IIF vendor answering on Intuit's community (BigRedConsulting, 14 April 2020, <https://quickbooks.intuit.com/learn-support/en-us/other-questions/iif-import-error-3040/00/535675>) wrote that "a NAME is required for any AR row", about a bill, not a journal; QuickBooks Desktop sync tools quote the refusal "Transaction split lines to accounts receivable must include a customer on that split line" (Acctivate, <https://hub.acctivate.com/articles/troubleshoot/synchronization/transaction-split-lines-to-accounts-receivable-must-include-a-customer-on-that-split-line>).
No Intuit source says what an IIF journal import does with an A/R or A/P line that has no NAME (refuses it, imports it, or asks). So the books write no NAME (writing names would need the customer and vendor lists declared too, with a name unique across them) and the package README names the entries with an A/R or A/P line, so the CPA can add the name in QuickBooks if it asks (BS-format-2 rule 7).
No Intuit source says what an IIF journal import does with an A/R or A/P line that has no NAME (refuses it, imports it, or asks). So the books write no NAME (writing names would need the customer and vendor lists declared too, with a name unique across them) and the package README names the entries with an A/R or A/P line, so the CPA can add the name in QuickBooks if it asks (BS-format-2 statement 26).
## How long a class's name may be
@@ -203,7 +203,7 @@ Not Intuit, for the record: Conductor's QuickBooks Desktop API reference (a serv
> Maximum length: 31 characters.
So the books hold a class's NAME to 31 characters, as an account's own level (Intuit's own limit for a class, above), and keep no two alike ignoring case (Conductor: case-insensitive; BS-format-2 rule 8).
So the books hold a class's NAME to 31 characters, as an account's own level (Intuit's own limit for a class, above), and keep no two alike ignoring case (Conductor: case-insensitive; BS-format-2 statements 29 and 30).
## What QuickBooks does with an over-long name (not Intuit)
Source: Thomson Reuters, Accounting CS help, "Export payroll journal entries", <https://thomsonreuters.com/en-us/help/accounting-cs/integrate-data-with-other-applications/export-payroll-journal-entries>