test(core): the adapter runs a platform's payout, an asset's tag and the K-1's tax-basis note through the engine

The bookspec schema gained a `payout` event, a `tag_asset` event, an
`asset_tag` query and a note on the tax-basis property line (BS-revenue-1,
BS-asset-3, BS-partner-17). The adapter runs each through the engine and
rebuilds none of it: a payout goes through `payouts::payout_plan`, which
refuses unless gross less fee is the deposit to the cent, and its plan's lines
post as one entry; a tag goes through `Store::set_asset_tag`, which refuses a
tag of a wrong form and one another asset holds or ever held; the tax-basis
line's note is `Note::PrepaidAtBook` read off the worksheet. The engine's
InvalidPayout, InvalidAssetTag and AssetTagTaken are worded as the examples
word them.

Thirteen examples were added and every one the engine's picks reach passes:
five are for options wanderbooks did not pick (no-tags, every-prepaid-is-cash,
every-prepaid-is-property, left-open, whole-payment-to-each) and are skipped,
so the skipped count is 22 + 5 = 27 and 112 of 139 run. A prepaid contract
credited straight to capital is property (1,500.00 each) and a service paid
through Due to Members is cash (1,000.00 each); the contract enters the tax
capital at its book amount with the note; a 1,000.00 check naming Dana Studio
at 600.00 counts 600.00 toward Dana's 1099.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Sonnet 5.5 committed 2026-11-09 12:05:15 -07:00
1 parent e45c62348a
commit a87e2d0a7a
8 files changed
+138 -11

No files matched your search

+13 -6
View File
@@ -115,12 +115,12 @@ pub(crate) fn every_bookspec_example_holds() {
("cash_flow", 7),
("trial_balance", 2),
("profit_and_loss", 2),
("vendor_1099_paid", 4),
("vendor_1099_paid", 5),
("vendor_1099", 10),
("entry", 8),
("balances", 4),
("members_equity", 10),
("k1", 3),
("k1", 5),
("party_part", 28),
("party_totals", 23),
("party_tin_last4", 5),
@@ -145,7 +145,8 @@ pub(crate) fn every_bookspec_example_holds() {
("register_row", 5),
("register_totals", 1),
("asset_basis", 6),
("k1_tax_basis", 4),
("asset_tag", 4),
("k1_tax_basis", 5),
("k1_reconciliation", 2),
("project", 6),
("aging", 4),
@@ -175,10 +176,16 @@ pub(crate) fn every_bookspec_example_holds() {
// BS-ledger-21's round-per-account, BS-period-4's allow-partial-overlap,
// BS-1099-2's carry-the-last-amount and BS-partner-8's nowhere
// (wanderbooks nests periods, refuses a year whose threshold it does not
// know, and keeps the full TIN outside the books).
// know, and keeps the full TIN outside the books), and X-H1e2's:
// BS-asset-3's no-tags, BS-partner-15's every-prepaid-is-cash and
// every-prepaid-is-property, BS-partner-17's left-open and BS-1099-5's
// whole-payment-to-each (wanderbooks keeps asset tags, counts a contract
// handed over as property and a vendor-paid service as cash, takes a
// prepaid contract into the tax capital at its book amount with a note,
// and counts only the payee's share of a shared entry).
assert_eq!(
skipped.len(),
22,
"the twenty-two unpicked-option examples: {skipped:?}"
27,
"the twenty-seven unpicked-option examples: {skipped:?}"
);
}