docs(spec): wanderbooks declares its picks for the new CHOICE records (partner, asset, 1099, format)
bookspec split the CHOICEs embedded in BS-partner-1..4, BS-asset-1, BS-asset-4, BS-1099-1 and BS-format-2 into records of their own (S-C7b). Wanderbooks' decisions are unchanged; each is now recorded against the id an engine declares it by: - partner: BS-partner-5 largest-remainder-first-listed (owner, 2026-10-13), -6 cumulative-from-first-close (D-10, 2026-10-16), -7 running-split (D-38, 2026-10-20), -8 outside-the-books and -9 tin-facts-then-w9 (2026-10-15), -10..-13 money, entry flow, books' carrying amount, labelled basis (2026-10-15, 2026-10-20), -14 tax-basis-beside-book (D-41), -15 running-cumulative (D-38's rule, 2026-10-22) - asset: BS-asset-5 straight-line-by-days, -6 lesser-of-value-and-basis, -7 books-recorded-amounts, -8 register-carries-tax-figures - 1099: BS-1099-2 refuse-an-unknown-year, -3 presumed-a-check-ach-or-transfer, -4 dated-by-the-payments-date - format: BS-format-3..7 (D-36, 2026-10-20) Each is a `**Pick (BS-..):**` line in docs/spec/claims/<area>.md and a `with_choice` in the adapter's claims(). The rules_md test no longer expects a B-n row for a rule born without one (a split-out CHOICE has none): it requires the pick line, that the pick is one of the record's options, and that the adapter declares the same option. The pin is not moved here: this needs bookspec's s-c7b to be merged and the pin moved to it. Verified with ledger-core's bookspec test patched to the s-c7b checker and runner (53 passed). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8ecf177cb2
commit
422a956ffc
6 files changed
+107
-2
No files matched your search
@@ -29,10 +29,43 @@ impl Engine for Books<'_> {
|
||||
}
|
||||
|
||||
fn claims(&self) -> Claims {
|
||||
Claims::new(
|
||||
let mut claims = Claims::new(
|
||||
bookspec_checker::covered_rules()
|
||||
.into_iter()
|
||||
.map(|r| r.id.clone()),
|
||||
)
|
||||
);
|
||||
for &(area, n, option) in PICKS_S_C7B {
|
||||
claims = claims.with_choice(RuleId::new(area, n), option);
|
||||
}
|
||||
claims
|
||||
}
|
||||
}
|
||||
|
||||
/// The option wanderbooks picks for each CHOICE record split out of the
|
||||
/// partner, asset, 1099 and format rules (P14 unit S-C7b); each is recorded
|
||||
/// in `docs/spec/claims/<area>.md` as `**Pick (BS-<area>-<n>):**`.
|
||||
pub(crate) const PICKS_S_C7B: &[(Area, u32, &str)] = &[
|
||||
(Area::Partner, 5, "largest-remainder-first-listed"),
|
||||
(Area::Partner, 6, "cumulative-from-first-close"),
|
||||
(Area::Partner, 7, "running-split"),
|
||||
(Area::Partner, 8, "outside-the-books"),
|
||||
(Area::Partner, 9, "tin-facts-then-w9"),
|
||||
(Area::Partner, 10, "cash-cards-and-financing"),
|
||||
(Area::Partner, 11, "capital-movement-counted-once"),
|
||||
(Area::Partner, 12, "books-carrying-amount"),
|
||||
(Area::Partner, 13, "labelled-cash-default-or-all"),
|
||||
(Area::Partner, 14, "tax-basis-beside-book"),
|
||||
(Area::Partner, 15, "running-cumulative"),
|
||||
(Area::Asset, 5, "straight-line-by-days"),
|
||||
(Area::Asset, 6, "lesser-of-value-and-basis"),
|
||||
(Area::Asset, 7, "books-recorded-amounts"),
|
||||
(Area::Asset, 8, "register-carries-tax-figures"),
|
||||
(Area::Tax1099, 2, "refuse-an-unknown-year"),
|
||||
(Area::Tax1099, 3, "presumed-a-check-ach-or-transfer"),
|
||||
(Area::Tax1099, 4, "dated-by-the-payments-date"),
|
||||
(Area::Format, 3, "plain-ascii-transliterated-and-listed"),
|
||||
(Area::Format, 4, "cr-lf"),
|
||||
(Area::Format, 5, "docnum-is-the-entry-id"),
|
||||
(Area::Format, 6, "everything-through-as-of"),
|
||||
(Area::Format, 7, "journal-sample-columns"),
|
||||
];
|
||||
@@ -25,6 +25,32 @@ pub(crate) fn rules_md_carries_every_id() {
|
||||
}
|
||||
|
||||
for rule in bookspec_checker::rules().iter() {
|
||||
if rule.b == 0 {
|
||||
// A rule born after the B numbering has no row in the index.
|
||||
// A CHOICE record split out of another rule (P14 unit S-C7)
|
||||
// has its pick recorded in its claims file, and the engine's
|
||||
// adapter declares the same option, which the record names.
|
||||
if rule.status == Some(bookspec_checker::Status::Choice) {
|
||||
let marker = format!("**Pick ({}):** `", rule.id);
|
||||
let at = all
|
||||
.find(&marker)
|
||||
.unwrap_or_else(|| panic!("{} carries its pick in its claims file", rule.id));
|
||||
let option = all[at + marker.len()..].split('`').next().unwrap();
|
||||
assert!(
|
||||
rule.record().options.iter().any(|o| o.name == option),
|
||||
"{}'s pick {option:?} is one of its options",
|
||||
rule.id
|
||||
);
|
||||
assert!(
|
||||
engine::PICKS_S_C7B
|
||||
.iter()
|
||||
.any(|&(area, n, o)| RuleId::new(area, n) == rule.id && o == option),
|
||||
"{}'s pick {option:?} is declared in the adapter's claims()",
|
||||
rule.id
|
||||
);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
assert!(
|
||||
index.contains(&format!("| B-{} | `{}` |", rule.b, rule.id)),
|
||||
"rules.md indexes B-{} to {}",
|
||||
|
||||
@@ -14,6 +14,12 @@ Rules: B-19.
|
||||
|
||||
**Pick:** `refuse-an-unknown-year` and the D-40 options: a threshold the engine does not know is refused, never guessed (CHOICE, the owner, 2026-10-13); a payment from a cash account with no recorded method is presumed a check, ACH or transfer and counts (CHOICE D-40, the owner, 2026-10-20); a shared entry counts only the payee's share (CHOICE, the owner, 2026-10-15); decisions are dated, and each payment takes the decision in force on its reversal chain's first entry's date (CHOICE D-40, the owner, 2026-10-20: "legally this has to be 2 dated statuses").
|
||||
|
||||
**Pick (BS-1099-2):** `refuse-an-unknown-year`, the owner, 2026-10-13.
|
||||
|
||||
**Pick (BS-1099-3):** `presumed-a-check-ach-or-transfer`, the owner, D-40, 2026-10-20.
|
||||
|
||||
**Pick (BS-1099-4):** `dated-by-the-payments-date`, the owner, D-40, 2026-10-20.
|
||||
|
||||
**Enforced:** the bucket table is `kernel::payment_bucket` and
|
||||
`kernel::net_buckets`; `kernel::apportion` splits a payee's part across
|
||||
the buckets; `form1099::vendor_1099_report` applies the threshold and the
|
||||
|
||||
@@ -14,6 +14,8 @@ Rules: B-15, B-22, B-24, B-25.
|
||||
|
||||
**Pick:** `straight-line-by-days`: CHOICE (the owner, 2026-10-13; the engineer settled the arithmetic from ASC 360-10-35-4, 2026-10-20): straight line, partial months prorated by days, including a schedule through a mid-month date, with each cumulative figure rounded half away from zero to the currency's minor unit. The tax conventions (half-year, mid-month, mid-quarter) are not applied: they are the CPA's, per IRS Publication 946.
|
||||
|
||||
**Pick (BS-asset-5):** `straight-line-by-days`, the owner, 2026-10-13; the engineer settled the arithmetic from ASC 360-10-35-4, 2026-10-20.
|
||||
|
||||
**Enforced:** `assets::depreciation_schedule`, `assets::run_amount`,
|
||||
`assets::catch_up_room`, `assets::depreciation_effects`,
|
||||
`kernel::prorated_through`, `kernel::catch_up`, `kernel::true_up`,
|
||||
@@ -147,6 +149,12 @@ printer makes an Avery 5160 label sheet from the register's tags.
|
||||
|
||||
**Pick:** `register-carries-tax-figures` and the D-41 options: the register carries the tax figures beside book value (CHOICE, the owner, 2026-10-15); for property a member contributed from personal use, the depreciable basis is the lesser of its fair market value and the member's adjusted basis (the MAY of `BS-asset-4`, taken by analogy to Treas. Reg. §1.168(i)-4(b)(1), which governs a taxpayer converting its own property; the choice is wanderbooks', the CPA to confirm at year end); the §704(c) method is `traditional`, recorded as a choice the CPA confirms; the contributed property's values on the contribution date are the books' recorded amounts (CHOICE D-41, the owner, 2026-10-20).
|
||||
|
||||
**Pick (BS-asset-6):** `lesser-of-value-and-basis`, the owner, D-41, 2026-10-20.
|
||||
|
||||
**Pick (BS-asset-7):** `books-recorded-amounts`, the owner, D-41, 2026-10-20.
|
||||
|
||||
**Pick (BS-asset-8):** `register-carries-tax-figures`, the owner, 2026-10-15; D-41, 2026-10-20.
|
||||
|
||||
**Enforced:** `kernel::basis_figures` (Kani `basis_figures_laws`),
|
||||
`AssetBasis::check` (a purchase takes no contribution facts; a
|
||||
contribution needs the adjusted basis and the fair market value, each
|
||||
|
||||
@@ -239,6 +239,16 @@ unless another class's own name is the same ignoring case (the P4 follow-ups'
|
||||
review, finding 4, 2026-10-22: before, all the classes whose names matched
|
||||
were renamed).
|
||||
|
||||
**Pick (BS-format-3):** `plain-ascii-transliterated-and-listed`, the owner, 2026-10-20, D-36.
|
||||
|
||||
**Pick (BS-format-4):** `cr-lf`, the owner, 2026-10-20, D-36.
|
||||
|
||||
**Pick (BS-format-5):** `docnum-is-the-entry-id`, the owner, 2026-10-20, D-36.
|
||||
|
||||
**Pick (BS-format-6):** `everything-through-as-of`, the owner, 2026-10-20, D-36.
|
||||
|
||||
**Pick (BS-format-7):** `journal-sample-columns`, the owner, 2026-10-20, D-36 (CHOICE).
|
||||
|
||||
**Pick:** `no-customer-or-vendor-name`: CHOICE (open risk). The IIF writes no
|
||||
NAME on a line to accounts receivable or payable, though Intuit's staff say
|
||||
such a line requires one: no Intuit source says what an IIF journal import
|
||||
|
||||
@@ -14,6 +14,12 @@ Rules: B-13, B-26, B-35, B-36.
|
||||
|
||||
**Pick:** a share is rounded to the base currency's minor unit by largest remainder, a tied odd unit to the member the count's first close listed first (the owner, 2026-10-13; closes made before then replay with the last member absorbing it); members closes are counted cumulatively from the company's first close (D-10, 2026-10-16); the statement of members' equity splits unclosed earnings the same running way (D-38, 2026-10-20); a prepaid service contract credited straight to capital is contributed property, while a prepaid service a member paid a vendor for on the company's behalf, booked through Due to Shareholders, is cash (the owner, 2026-10-15); a period closes at the shares in force at the close.
|
||||
|
||||
**Pick (BS-partner-5):** `largest-remainder-first-listed`, the owner, 2026-10-13.
|
||||
|
||||
**Pick (BS-partner-6):** `cumulative-from-first-close`, the owner, D-10, 2026-10-16.
|
||||
|
||||
**Pick (BS-partner-7):** `running-split`, the owner, D-38, 2026-10-20.
|
||||
|
||||
**Enforced:** `CloseTo::Members`, `CloseTo::MembersCumulative`,
|
||||
`Ledger::members_regime`, `Regime::allocate`,
|
||||
`periods::allocate_cumulative`, `kernel::apportion_cumulative`,
|
||||
@@ -99,6 +105,10 @@ journal (the owner, 2026-10-15); any party may have its TIN in the
|
||||
vault, whatever its roles (the owner, 2026-10-15); a party's last four
|
||||
is its TIN facts', else its W-9 facts'.
|
||||
|
||||
**Pick (BS-partner-8):** `outside-the-books`, the owner, 2026-10-15.
|
||||
|
||||
**Pick (BS-partner-9):** `tin-facts-then-w9`, the owner, 2026-10-15.
|
||||
|
||||
**Enforced:** `crate::parties` (has_full_tin, check_text, W9Facts::check,
|
||||
W4Facts::check), `Ledger::add_party`, `update_party`, `set_party_role`,
|
||||
`set_party_w9`, `set_party_w4`, `set_party_tin` (TinFacts::check; TIN and
|
||||
@@ -292,6 +302,14 @@ owner, 2026-10-20); property distributed counts at the books'
|
||||
carrying amount; party totals take basis cash by default, or all,
|
||||
always labelled.
|
||||
|
||||
**Pick (BS-partner-10):** `cash-cards-and-financing`, the owner, 2026-10-20.
|
||||
|
||||
**Pick (BS-partner-11):** `capital-movement-counted-once`, the owner, 2026-10-15 and 2026-10-20.
|
||||
|
||||
**Pick (BS-partner-12):** `books-carrying-amount`, the owner, 2026-10-20.
|
||||
|
||||
**Pick (BS-partner-13):** `labelled-cash-default-or-all`, the owner, 2026-10-20.
|
||||
|
||||
**Enforced:** `kernel::party_target`, `kernel::reverse_target`,
|
||||
`shares::{target, split, resolve}`, `parties::{flow, money_accounts,
|
||||
card_accounts, MoneyAccounts::for_parties, activity_with, Activity::totals,
|
||||
@@ -376,6 +394,10 @@ contributed to a prepaid account with no fixed asset for it enters at
|
||||
its book amount, with a note (P3 review, 2026-10-21; the CPA to
|
||||
confirm).
|
||||
|
||||
**Pick (BS-partner-14):** `tax-basis-beside-book`, the owner, D-41, 2026-10-20.
|
||||
|
||||
**Pick (BS-partner-15):** `running-cumulative`, the owner, D-38's rule applied 2026-10-22.
|
||||
|
||||
**Enforced:** `ledger_core::tax_capital::tax_basis_capital`;
|
||||
`ledger-package` `k1_tax` (`k1-tax-basis-capital.csv` in the CPA
|
||||
package); the odd cents, `ledger_core::tax_capital::RunningSplit` on
|
||||
|
||||
Reference in new issue
Block a user