P3: assets' posted and scheduled depreciation, their bases, and the K-1 on the tax basis (defect 13, D-41)
check / check (push) Canceled after 0s

Book value is cost less what the books posted; the schedule's figure is
apart. An asset's acquired date comes from its entry. Contributed
property keeps its section 723 carryover basis apart from its depreciable
basis (the lower of value and adjusted basis), with its 704(c) built-in
gain and method. The K-1 worksheet reports tax-basis capital (Form 1065
Item L) beside the book figures, leaving open what only the CPA knows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T3gXMVt7XJPi6ens1or9Dj
This commit is contained in:
swaitsandClaude Opus 5.5 committed 2026-10-21 14:04:12 -06:00
1 parent 3a9aa92315
commit 2f999c6050
81 files changed
+9391 -2604

No files matched your search

+32
View File
@@ -30,3 +30,35 @@ definitions exactly.
into retained earnings so the new period starts clean. (Future: R-FUTURE-2.)
- **Current earnings** — Net income to date on an unclosed book. We fold it
into equity so the accounting equation holds before close.
- **Placed in service (in-service date)** — The day an asset is ready and
available for its use. Depreciation starts here (`Asset::in_service_date`;
journaled under its old name `purchase_date`).
- **Acquired date** — The day the company got the asset: the date of the
entry that put it on the books (its purchase or a member's contribution),
never later than the in-service date. The register holds the asset from
here (`Ledger::asset_acquired_date`).
- **Accumulated depreciation, posted and scheduled** — What the books carry
for an asset (its depreciation runs, less any reversed:
`Ledger::accumulated_posted`), and what its schedule says is due by a date
(`accumulated_depreciation`, `accumulated_scheduled_through` in the
tools). Book value is cost less the posted figure.
- **§723 basis** — The company's tax basis in property a member contributed:
the member's adjusted basis at contribution (IRC §723).
- **Adjusted basis** — Cost plus improvements, less depreciation allowed or
allowable (IRC §1016(a)).
- **Depreciable basis** — What tax depreciation starts from: the cost for
something bought; the §723 basis for business property contributed; for
property contributed from personal use, the lesser of its fair market
value and the member's adjusted basis (Treas. Reg. §1.168(i)-4(b)).
- **Built-in gain or loss (§704(c))** — Property's fair market value less
its §723 basis when contributed (Treas. Reg. §1.704-3(a)(3)(ii)). A
built-in loss counts only for the member who contributed it (IRC
§704(c)(1)(C)).
- **§704(c) method** — How the tax items of contributed property are shared
among the members so the built-in gain or loss stays with its
contributor: traditional, traditional with curative allocations, or
remedial (Treas. Reg. §1.704-3(b)-(d)), chosen property by property.
- **Tax-basis capital** — A member's capital account as Schedule K-1 Item L
reports it: cash plus the adjusted tax basis of property contributed,
plus their share of income as figured for tax, less cash and the adjusted
tax basis of property distributed (Form 1065 instructions, Item L).
+99 -18
View File
@@ -595,11 +595,23 @@ the lifetime total is exactly (cost − salvage), rounded to the currency's
minor unit. A new asset's cost and salvage are in the minor unit, and its
life's last day is 9999-12-31 at the latest.
- `books.register_asset { description, purchase_date, cost, salvage_value?,
useful_life_months, cost_account, accum_depr_account, expense_account,
tag?, serial? }` → `{ asset_id, tag }`. Accounts resolved by id or code.
Without `tag`, the next free `PREFIX-0001` (`[books] asset_tag_prefix`,
else the company name's initials without LLC/Inc; "FA" when none).
- `books.register_asset { description, in_service_date, cost,
salvage_value?, useful_life_months, cost_account, accum_depr_account,
expense_account, tag?, serial?, acquisition_entry?, basis_rule?,
contributor_adjusted_basis?, fmv_at_contribution?, sec704c_method?,
basis_source? }` → `{ asset_id, tag, in_service_date, acquired_date,
basis?, notes? }`. Accounts resolved by id or code. Without `tag`, the
next free `PREFIX-0001` (`[books] asset_tag_prefix`, else the company
name's initials without LLC/Inc; "FA" when none). `in_service_date` (the
day it is ready and available for its use) starts depreciation (P3,
defect 13; B-15); `purchase_date` is its alias for one release (both
given and different: refused; the alias noted in `notes`). The
`acquisition_entry` (posted, debiting the cost account, dated on or
before the in-service date) gives `acquired_date`, which puts the asset
on the register; with none, the acquired date is the in-service date.
The basis facts are `books.set_asset_tax_basis`'s (`tax_basis_rule` and
`contributor_basis`, with the old rule names, are aliases for one
release); a bad one registers nothing.
- `books.label_asset { asset, tag?, serial?, clear_serial? }` → `{ asset_id,
tag, serial }`: set or change the tag (unique ignoring case, never reused
by another asset even after a retag or disposal) or the manufacturer's
@@ -614,11 +626,55 @@ life's last day is 9999-12-31 at the latest.
a disposed asset's ends on its disposal day. A schedule an earlier
version's asset can't compute is a tool error saying why, never a
panic.
- `books.list_assets {}` → assets with status, accumulated depreciation
by schedule and book value as of today (a disposed asset's through its
disposal day); `accumulated` and `book_value` are null, with
`schedule_error` saying why, for an asset whose schedule can't be
computed (one bad asset never fails the list).
- `books.list_assets { as_of? }` → `{ as_of, assets }` (default today, the
company's time zone): per asset `in_service_date`, `acquired_date`,
`cost`, `status`, `held` (acquired by `as_of` and not disposed),
`accumulated_posted` (what the books carry: its depreciation runs, less
reversals, a reversal of a reversal reinstating),
`accumulated_scheduled_through` (what the schedule says is due by
`as_of`), `unposted_depreciation` (the difference: run
`books.run_depreciation`), `book_value` (cost less posted: what the
books carry), and `basis` (as `books.set_asset_tax_basis` reports it).
Disposed by `as_of`: every figure 0.00; acquired after `as_of`: the
figures null. The rows are the register's (`fixed_asset_register`). An
asset whose figures can't be computed (one an earlier version took)
lists with them null and `schedule_error` saying why: one bad asset
never fails the list.
Before P3, `accumulated` was the schedule's figure and `book_value`
cost less it.
- `books.set_asset_tax_basis { asset, rule, contributor_adjusted_basis?,
fmv_at_contribution?, sec704c_method?, basis_source? }` → `{ asset_id, basis:
{ rule, contributor_adjusted_basis, fmv_at_contribution, fmv_recorded,
tax_basis_723, depreciable_basis, built_in_gain_704c, sec704c_1c_note?,
sec704c_method, source?, sources }, notes? }`. `rule`: `purchase` (the
company bought it: depreciable basis is its cost, IRC §1012),
`carryover_723` (a member contributed business property: the company's
§723 basis is the member's adjusted basis, depreciated from), or
`personal_use_conversion` (a member contributed personal-use property:
the §723 basis as for carryover, depreciable basis the lesser of fair
market value and that basis, Treas. Reg. §1.168(i)-4(b); D-41). A
contribution needs `contributor_adjusted_basis` (cost plus improvements,
less depreciation allowed or allowable, IRC §1016(a)) and
`fmv_at_contribution` (a fact the human gives: never assumed from the
cost); `built_in_gain_704c` = value − §723 basis at contribution (Treas.
Reg. §1.704-3(a)(3)(ii)), with the IRC §704(c)(1)(C) note when it is a
loss. `sec704c_method`: `traditional`, `traditional_with_curative`,
`remedial` (Treas. Reg. §1.704-3(b)-(d)). `basis_source` `{ decided_by,
decided_on?, citation?, note? }`: who gave the facts. `sources` names
each figure's authority. The figures are at contribution or purchase;
tax depreciation and what remains of a built-in gain later are the
CPA's. The old names (`cost`, `carryover`, `contributor_basis`) are
aliases for one release, noted. Journaled as `asset.basis_set` (the
journal feature `asset_basis`: books an older version wrote refuse it,
`format_upgrade_pending`, until the owner's format upgrade); a record
written before P3 (`asset.tax_basis_set`) reads its value as the book
cost (`fmv_recorded: false`).
- `books.correct_asset { asset, cost?, salvage_value?, useful_life_months?,
in_service_date?, reason }` → `{ asset_id, tag, cost, salvage_value,
useful_life_months, in_service_date, acquired_date, basis, notes? }`.
Refused while the books carry depreciation for it (a run posted and not
reversed), and for an in-service date before its acquisition entry's
date; `in_service` is the alias of `in_service_date` for one release.
- `books.run_depreciation { period: "YYYY-MM", asset_id? }`
→ `runs: [{ asset_id, description, period, amount, caught_up, entry_id,
already_posted }]` and `skipped: [{ asset_id, description, reason }]`.
@@ -635,7 +691,8 @@ life's last day is 9999-12-31 at the latest.
run-all's assets not yet in service and any whose schedule can't be
computed. A run before the in-service date is refused.
- `books.dispose_asset { asset_id | tag, date, proceeds, proceeds_account,
gain_loss_account, buyer?, confirmed?, receipt_attachment_ids? }` →
gain_loss_account, buyer?, confirmed?, receipt_attachment_ids? }` (the
date never before the acquired date) →
without confirmation: `{ status: "preview", accumulated, book_value,
proceeds, gain_loss, final_depreciation, excess_depreciation,
catch_up_depreciation, lines, receipt_required }` and posts nothing;
@@ -658,12 +715,23 @@ life's last day is 9999-12-31 at the latest.
posts (`party_required`); a retirement with no proceeds and no buyer is
marked as having no counterparty.
- `books.export { report: "fixed_asset_register", format: json | csv,
as_of? }`: every asset registered by the date (tag, serial, cost,
depreciation by schedule, book value, disposal), totals, and the
general ledger's balances of the assets' cost and accumulated
depreciation accounts, with `unposted_depreciation` and
`unregistered_cost` (zero when register and books agree;
`ledger_core::fixed_asset_register`).
as_of? }`: every asset acquired by the date (tag, serial, acquired and
in-service dates, cost, accumulated depreciation scheduled and posted,
book value as cost less posted, disposal, the basis facts and figures:
rule, contributor's adjusted basis, value at contribution and whether
it was recorded, §723 basis, depreciable basis, §704(c) built-in gain,
method, who gave the facts), totals (`total_accumulated_scheduled`,
`total_accumulated_posted`, `total_book_value`, `total_tax_basis_723`,
`total_depreciable_basis`, `missing_basis`), and the general ledger's
balances of the assets' cost and accumulated depreciation accounts, with
`unposted_depreciation` (scheduled less books), `unattributed_accumulated`
(books less the runs: an entry made by hand) and `unregistered_cost`
(zero when register and books agree; `ledger_core::fixed_asset_register`).
CSV columns: `tag, description, serial, acquired, in_service, cost,
salvage, useful_life_months, accumulated_scheduled, accumulated_posted,
book_value, status, proceeds, basis_rule, contributor_adjusted_basis,
fmv_at_contribution, fmv_recorded, tax_basis_723, depreciable_basis,
built_in_gain_704c, sec704c_method, basis_source`, then a TOTAL row.
- `books.show { asset }` opens an asset in the viewer; `page: "assets"`
and `report: "fixed_asset_register"` open the register.
@@ -1918,7 +1986,20 @@ entries.
year cancel: neither is a contribution or a distribution. A member's
party is the party with the member's name (not a display name) and the
member role, as the viewer's capital statement finds it; with none, the
member's TIN is a gap.
member's TIN is a gap. **Tax-basis capital** (`k1-tax-basis-capital.csv`,
P3, D-41, rules.md B-36; Form 1065 instructions, Item L, the tax-basis
method): per member, `member, item, book, tax_basis, book_less_tax,
status, note` for each Item L line (beginning; capital contributed,
cash and property; current year net income (loss); other increase
(decrease); withdrawals and distributions; ending), the property at its
§723 basis (`ledger_core::tax_capital`), then the reconciliation of book
to tax capital by cause (the §704(c) built-in gain or loss share,
property without a tax basis in the books, property distributed). A
line the books can't know (tax depreciation of the fixed assets in
service, a disposal's tax gain, the basis of property distributed or of
contributed property no asset holds) has `tax_basis` blank, status
`open: the CPA's`, and a note with what the books know so far and the
book amount the CPA's figure replaces; never a guessed number.
**1099 worksheet** (`1099-worksheet-<year>.csv`, `as_of`'s calendar
year) is `books.vendor_1099`'s CSV (above) for the package's cash and
financing accounts: the payments from January 1 through `as_of` (the
+1 -1
View File
@@ -27,7 +27,7 @@ No other statuses.
| Tax line mapping + tax summary | Accounts → Tax line mapping; Tax reports | partial | hand-verified fixture (50% meals, nondeductible, contra income); no golden file yet |
| Reversing entries | Reverse transaction | done | linked via `reversal_of` |
| Canonical report snapshots (JSON) | — (our oracle format) | done | `reports::snapshot` |
| Fixed-asset register + straight-line depreciation | Fixed Asset register | done | `assets.rs`; golden-covered schedule; idempotent runs; disposal with gain/loss |
| Fixed-asset register + straight-line depreciation | Fixed Asset register | done | `assets.rs`; golden-covered schedule; idempotent runs; disposal with gain/loss; posted (the books') vs scheduled, in-service vs acquired dates, the §723, depreciable and §704(c) figures (P3) |
| Cash flow statement (direct, with the reconciliation schedule and noncash disclosures) | Reports → Cash Flow | done | R-FUTURE-3; rules.md B-14 (P3 defect 1) |
| Foreign-currency lines (base + foreign stored) | Multi-currency accts | done | R-FUTURE-1 |
| Period close (closing entry to Retained Earnings) | Close books | done | R-FUTURE-2 |
+181 -44
View File
@@ -754,16 +754,47 @@ The rule, exactly (P3, defect 22; the engineer settled it from ASC
reversed on a day before its own (a correction comes after what it
corrects, B-9: a run of March reversed on Jan 31 would leave January
and February with negative depreciation; commands only, journals
replay as written). The viewer and the store read every run the
journal holds, not a month's latest (a run re-instated after its month
was run again and that run reversed is the month's run).
replay as written). The viewer and the store read every run the books
recorded (`Ledger::depreciation_runs`: each `asset.depreciation_posted`,
as replay records it), not a month's latest (a run re-instated after its
month was run again and that run reversed is the month's run).
7. Two dates (P3, defect 13). Depreciation starts on the day the asset is
placed in service, never the day it was bought: ASC 360-10-35-4
spreads cost over the periods the asset serves, and an asset serves no
period before it is in service. (For tax, Pub. 946's "ready and
available for a specific use", `sources/irs-partnership-basis.md`, is
the CPA's.) The register holds an asset from the day the company
acquired it: the date of the entry it is linked to (its purchase or
contribution), never later than the in-service date, or the in-service
date when no entry is linked (settled in design, 2026-10-20: "an
asset's acquired date comes from the entry it is linked to"; one
source of truth, so the register and the general ledger can't
disagree, B-24). 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; a disposal can't come before the acquired date (a
command's bound; replay accepts what earlier versions did, B-28), and
one before the in-service date takes no depreciation.
8. Posted and scheduled. What the schedule says is due through a date
(`assets::accumulated_scheduled_through`, the tools'
`accumulated_scheduled_through`) and what the books carry
(`Ledger::accumulated_posted`: the runs read entry by entry as rule 6
reads them, each on its own day: a run adds its amount, a reversal of
it takes it away, a reversal of that reversal adds it back, B-8, B-9;
zero once the asset is disposed, its disposal entry having cleared it)
are two figures, never one: book value is cost less the posted figure
(`assets::scheduled_book_value` is the schedule's own, for the
schedule only).
**Enforced:** `assets::depreciation_schedule`, `assets::run_amount`,
`assets::catch_up_room`, `assets::depreciation_effects`,
`kernel::prorated_through`, `kernel::catch_up`, `kernel::true_up`,
`calendar::month_parts`, `Store::run_depreciation`,
`Store::dispose_preview` (`check_nothing_after_disposal`),
`Store::check_reverse_entry`. **Checked:**
`Store::check_reverse_entry`, `Ledger::asset_acquired_date`,
`set_asset_acquisition` (`replay_set_asset_acquisition` for replay),
`check_correct_asset`, `dispose_asset` (strict: the acquired date),
`record_depreciation_run` / `check_depreciation_run`,
`accumulated_posted`, `live_depreciation_run`. **Checked:**
`schedule_sums_exactly_to_depreciable_amount`,
`salvage_value_is_never_depreciated`, `prop_depreciation_schedule_exact`,
`defect22_depreciation_through_mid_final_month_is_prorated_not_plugged`,
@@ -804,7 +835,14 @@ The rule, exactly (P3, defect 22; the engineer settled it from ASC
Lean `Prorate.kernel_parts_total`, `Prorate.kernel_parts_nonneg`,
`Prorate.part_near`, `Prorate.cum_near`, `Prorate.chargeMid_eq_cum`,
`Prorate.chargeLast_eq_cum`, `Prorate.chargeLast_start`,
`Prorate.chargeLast_mono`, `Prorate.cum_mono` (`docs/verification.md`).
`Prorate.chargeLast_mono`, `Prorate.cum_mono` (`docs/verification.md`);
`ledger-core` `tests/spec_asset_basis.rs` (the in-service and acquired
dates, `accumulated_posted` and its edges,
`a_reinstated_run_counts_and_is_live`); `ledger-store`
`tests/asset_tags.rs` (`runs_replay_reload_and_verify_catches_a_tampered_run`,
`the_viewer_and_writer_agree_on_a_bad_depreciation_posted_payload`);
`ledger-mcp` `tests/spec_assets.rs` (`a_reversed_run_is_not_posted`,
`list_assets_book_value_is_what_the_books_carry`).
## B-16 Prepaid expenses and deferred revenue are recognized over the period benefited or earned
@@ -1189,44 +1227,96 @@ Each fixed asset may carry a tag, the label stuck on the thing itself
`- _ . /`), and the manufacturer's serial number. Tags are unique ignoring
case and are never reused by another asset, even after a retag or a
disposal, so an old label can never point at the wrong thing. Both are
journaled. The fixed asset register lists every asset as of a date and
reconciles to the general ledger's cost and accumulated depreciation
accounts.
journaled. The fixed asset register lists every asset acquired by a date
(B-15) and reconciles to the general ledger's cost and accumulated
depreciation accounts: cost per register and per books
(`unregistered_cost`), accumulated depreciation by schedule and per
books (`unposted_depreciation`: run depreciation for it), and from the
assets' runs and per books (`unattributed_accumulated`: an entry made by
hand). Book value on the register is cost less the depreciation posted,
the books' figure, never the schedule's (P3, defect 13).
**Enforced:** `Ledger::set_asset_tag` / `check_asset_tag_for`,
`assets::check_asset_tag`, `assets::check_serial`. **Checked:**
`ledger-core` `tests/spec_asset_tags.rs`; `ledger-store`
`tests/asset_tags.rs`; `ledger-mcp` `tests/spec_assets.rs`.
## B-25 Tax basis beside book value
## B-25 Tax figures beside book value: the §723 basis, the depreciable basis, the §704(c) built-in gain
**Status:** AUTHORITY (`sources/irs-partnership-basis.md`); DECISION
(the owner, 2026-10-15: the register carries tax basis)
(the owner, 2026-10-15: the register carries tax basis); DECISION D-41
(the owner, 2026-10-20: the depreciable basis of property a member
contributed from personal use is the lesser of its fair market value and
the member's adjusted basis, 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)
Book value and tax basis are different numbers for the same asset. The
Book value and tax figures are different numbers for the same asset. The
book value of a member's contribution is its fair market value (Treas.
Reg. §1.704-1(b)(2)(iv)(d)(1), cited). Its federal tax basis follows the
rule that applies: property the company buys has a cost basis ("The basis
of property shall be the cost of such property", IRC §1012(a)); property a
member contributes keeps "the adjusted basis of such property to the
contributing partner at the time of the contribution" (IRC §723,
carryover); property a member converts from personal use depreciates from
"the lesser of its fair market value or its adjusted depreciable basis"
(Treas. Reg. §1.168(i)-4(b)(1)). The difference between fair market value
and the contributor's adjusted basis is the built-in gain (positive) or
loss (negative) that IRC §704(c) makes the partnership account for; a
built-in loss counts only for the contributing member (§704(c)(1)(C)).
wanderbooks records the rule, the contributor's adjusted basis, the
resulting tax basis, and the built-in gain or loss; tax depreciation
(MACRS, conventions, elections) stays with the CPA (`sources/irs-depreciation.md`).
Reg. §1.704-1(b)(2)(iv)(d)(1), cited; Treas. Reg. §1.704-3(a)(3)(i):
"book value is equal to fair market value at the time of contribution").
Three tax figures, each named for what it is, follow from the rule and
the facts recorded (`asset.basis_set`: the rule, the contributing
member's adjusted basis, the fair market value at contribution, the
§704(c) method if chosen, and who gave them, B-29):
**Enforced:** `Ledger::set_asset_tax_basis` / `check_asset_tax_basis`
(cost takes no contributor basis, a contribution requires one,
non-negative, in cents), `Asset::tax_basis`, `Asset::built_in_gain`,
`reports::fixed_asset_register` (per-row tax fields, `total_tax_basis`,
`missing_tax_basis`). **Checked:** `ledger-core` `tests/spec_tax_basis.rs`;
`ledger-store` `tests/asset_tags.rs` (`asset.tax_basis_set` journaling,
replay, v9 migration, corrupt payloads); `ledger-mcp` `tests/spec_assets.rs`.
- **Purchase** (`purchase`): "The basis of property shall be the cost of
such property" (IRC §1012(a)); depreciable basis is the cost. Not
§704(c) property: no §723 basis and no built-in gain.
- **§723 basis** of contributed property: "the adjusted basis of such
property to the contributing partner at the time of the contribution"
(IRC §723; Pub. 541: "the partnership's basis for determining
depreciation, depletion, gain, or loss"). Adjusted basis is cost plus
improvements, less depreciation allowed but not less than allowable
(IRC §1016(a)(1)-(2)). wanderbooks does not model §721(b) gain (an
investment-company partnership only), so the §723 basis is the
member's adjusted basis.
- **Depreciable basis:** for business property contributed
(`carryover_723`), the §723 basis; for property a member contributed
from personal use (`personal_use_conversion`), "the lesser of its fair
market value or its adjusted depreciable basis" (Treas. Reg.
§1.168(i)-4(b)(1); Pub. 946, "Property changed from personal use";
D-41).
- **§704(c) built-in gain or loss at contribution:** fair market value
less the §723 basis ("the excess of the property's book value over the
contributing partner's adjusted tax basis upon contribution", Treas.
Reg. §1.704-3(a)(3)(ii)); fixed at contribution, so correcting the book
cost later never moves it. A built-in loss counts only for the
contributing member (IRC §704(c)(1)(C)). The §704(c) method
(traditional, traditional with curative allocations, remedial: Treas.
Reg. §1.704-3(b)-(d)) is chosen property by property (§1.704-3(a)(2)).
The figures are at contribution (or purchase): tax depreciation reduces
the basis afterwards (§1016(a)(2)) and the built-in gain or loss "is
thereafter reduced" (§1.704-3(a)(3)(ii)); both are the CPA's (MACRS,
conventions, elections: `sources/irs-depreciation.md`). The facts are
kept, never the figures: the figures are derived when read, under the
rule in force, so a later change to a rule changes the reports without
refusing a line an earlier version wrote (B-28). A record made before
P3 (`asset.tax_basis_set`, with the old names `cost` and `carryover`)
has no fair market value recorded: it reads as the book cost, which
reproduces that version's figures exactly, and Needs attention asks for
the value. wanderbooks' book depreciation is GAAP straight line, not
§704(b) book depreciation, which must keep the tax depreciation's ratio
(Treas. Reg. §1.704-1(b)(2)(iv)(g)(3), cited): neither is the other.
**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
non-negative, in cents, at most one quadrillion) and its replay pairs
`check_journaled` and `check_legacy_journaled`, `Ledger::set_asset_basis`
/ `check_asset_basis` / `replay_set_asset_basis` /
`replay_set_asset_tax_basis`, `Asset::basis_figures`,
`reports::fixed_asset_register` (per-row tax fields,
`total_tax_basis_723`, `total_depreciable_basis`, `missing_basis`);
`ledger-store` `Store::set_asset_basis` (the journal feature
`asset_basis`); `ledger-mcp` `books.set_asset_tax_basis` and
`books.register_asset` (a contribution's fair market value is required,
never assumed). **Checked:** `ledger-core` `tests/spec_asset_basis.rs`,
`tests/kernel_bridge.rs` (`basis_figures_agree`), `tests/properties.rs`
(`prop_basis_figures_laws`); `ledger-store` `tests/asset_tags.rs`;
`ledger-mcp` `tests/spec_assets.rs`.
## B-26 Parties: one directory, no full TIN in the books
@@ -1426,15 +1516,18 @@ decided, a `not_reportable` decision, its reason or the date it takes
effect, and `vendor.w9_flag_set`: defects 18 and 23, D-40, B-19),
`schedule_convention` (a daily schedule's `schedule.registered` carries
`convention: daily`; an older version would read it as equal months,
B-16) and `month_reposting` (a schedule month or a depreciation period
B-16), `month_reposting` (a schedule month or a depreciation period
posted again after a reversal un-posted it; an older version would refuse
the second `schedule.posted`, and its projection ignore the second
`asset.depreciation_posted`, B-15). A command asks for the feature it
needs (`Store::ensure_feature`) before its first journaled line, and only
when the line it is about to write uses it, so a write refused for
waiting on the upgrade journals nothing, never an entry without the line
that says what it is (`a_write_waiting_for_the_upgrade_journals_nothing`),
and a write that needs nothing new is never refused. A tool journaling
`asset.depreciation_posted`, B-15) and `asset_basis` (an
`asset.basis_set`, a new event type: an asset's basis facts with the
value at contribution and the §704(c) method, B-25). A command asks for
the feature it needs (`Store::ensure_feature`) before its first journaled
line, and only when the line it is about to write uses it, so a write
refused for waiting on the upgrade journals nothing, never an entry
without the line that says what it is
(`a_write_waiting_for_the_upgrade_journals_nothing`), and a write that
needs nothing new is never refused. A tool journaling
several commands as one asks before the first of them, never between
them (a refusal there would leave the tool's work half done):
`books.set_w9` asks for `vendor_1099_decisions` before the W-9 when the
@@ -1570,9 +1663,9 @@ document line, a payment, a payroll run and disposal proceeds carry no
upper bound beyond what their own rules always said (positive, cents,
balanced, and so on); a schedule's months are 1 to 600 and an asset's
life ends on a date chrono holds. The checks split in two: the
command's (`Ledger::add_line`, `register_asset`, `TaxBasis::check`,
command's (`Ledger::add_line`, `register_asset`, `AssetBasis::check`,
`shares::check_shares`, ...) and replay's (`replay_add_line`,
`replay_register_asset`, `TaxBasis::check_journaled`,
`replay_register_asset`, `AssetBasis::check_journaled`, `AssetBasis::check_legacy_journaled`,
`shares::check_shares_journaled`, ...), and every bound has its pair of
tests: the command refuses past it; replay of an old line past it is
accepted. What an earlier version left beside its journal is kept for it
@@ -1602,17 +1695,17 @@ books open, never a panic.
`schedules::validate_schedule`, `validate_recurring`,
`periods::validate_period_range`, `arap::validate_lines`,
`validate_due_date`, `payroll::check_payroll_ranges`, `payout_plan`,
`shares::check_shares`, `TaxBasis::check`, `reconciliation_report`; for
`shares::check_shares`, `AssetBasis::check`, `reconciliation_report`; for
replay, `replay_add_line`, `replay_add_line_fx`,
`replay_register_asset`, `replay_correct_asset`,
`replay_dispose_asset`, `replay_set_asset_tax_basis`,
`replay_dispose_asset`, `replay_set_asset_tax_basis`, `replay_set_asset_basis`,
`replay_set_entry_parties`, `replay_register_recurring`,
`replay_register_schedule` (`validate_schedule_shape`),
`replay_create_period` (`validate_period_order`), `replay_invoice`,
`replay_bill`, `replay_invoice_payment`, `replay_bill_payment`,
`replay_payroll_run`, `validate_new_asset_journaled`,
`validate_recurring_journaled`, `check_shares_journaled`,
`TaxBasis::check_journaled`; derived: `Invoice::total`/`balance`,
`AssetBasis::check_journaled`, `AssetBasis::check_legacy_journaled`; derived: `Invoice::total`/`balance`,
`Bill::total`/`balance`, `AgingRow::total`, `ar_aging`, `ap_aging`,
`PayrollLine::net_pay`, `payroll_entry_plan`, `parties::entry_flow`,
`shares::share_target`, `shares::resolve`, `fixed_asset_register`,
@@ -2298,3 +2391,47 @@ distributions declared or of depreciated property, the properties), Kani
`reverseTarget_involutive`, `capitalTarget_odd`, `partyTarget_odd`,
`sumOver_movement_reversal`; `ledger-store` `tests/party_creditors.rs`;
`ledger-mcp` `tests/spec_party_totals.rs`; `ledger-gui` `tests/parties.rs`.
## B-36 The K-1 worksheet reports tax-basis capital beside book capital
**Status:** AUTHORITY (`sources/irs-partnerships.md`: Instructions for
Form 1065 (2025), Item L, "Tax-basis method"; required from tax year
2020: Instructions for Form 1065 (2020), Item L, "you must use the tax
basis method this year"); DECISION D-41 (the owner, 2026-10-20: "the
K-1 worksheet reports tax-basis capital ... the contributed property at
its §723 carryover basis, beside the book figures")
Schedule K-1 Item L reports each member's capital account on the tax
basis, by the transactional approach: beginning capital (last year's
ending), "the amount of cash plus the adjusted tax basis of all property
contributed", the member's share of income "as figured for tax
purposes", other increases and decreases "for tax purposes", and "the
amount of cash plus the adjusted tax basis of all property distributed".
The K-1 worksheet shows, per member, each Item L line on the book basis
(the members' equity roll-forward, B-13) beside the tax basis, and how
book capital reconciles to tax capital:
- Property contributed enters at its §723 basis (B-25): the member's
share of the property's book value less their share of its built-in
gain or loss at contribution, shared within the entry as its book value
is (B-13). Property contributed with no basis in the books (no
registered asset linked to the entry holds a contribution basis for it)
is open.
- What the books can't know is never guessed: the tax depreciation of
every fixed asset in service (MACRS, and for contributed property the
§704(c) method's allocation: the CPA's, B-15), the tax gain on a
disposal, the adjusted tax basis of property distributed, the tax
treatment of a change in book capital the books can't explain, and
last year's tax ending when an earlier year left a figure open. Each
such line is left blank and marked open, with what the books know so
far and the book amount the CPA's figure replaces.
- The reconciliation: book ending less tax ending (as far as the books
know it) = beginning (book less tax) + the built-in gain or loss share
+ property without a basis (at book) − property distributed (at book),
exactly.
**Enforced:** `ledger_core::tax_capital::tax_basis_capital`;
`ledger-package` `k1_tax` (`k1-tax-basis-capital.csv` in the CPA
package). **Checked:** `ledger-core` `tests/tax_capital.rs`;
`ledger-package` `tests/package.rs`
(`the_k1_worksheet_reports_tax_basis_capital`).
+65 -1
View File
@@ -1,5 +1,5 @@
# Tax basis of fixed assets: cost, contributed property, and personal-use conversion
Governs the tax basis the fixed asset register carries beside book value (rules.md B-25). Property the partnership buys has a cost basis (IRC §1012); property a member contributes keeps the member's adjusted basis (IRC §723), and the difference from its fair market value is the built-in gain or loss that §704(c) makes the partnership account for; property a member converts from personal use has a depreciable basis of the lesser of fair market value and adjusted basis (Treas. Reg. §1.168(i)-4(b)(1)). wanderbooks records the basis; tax depreciation (MACRS, conventions, elections) stays with the CPA.
Governs the tax figures the fixed asset register carries beside book value (rules.md B-25): the §723 basis, the depreciable basis, and the §704(c) built-in gain or loss at contribution; and the property contributed at its adjusted basis on the K-1 worksheet's tax-basis capital (rules.md B-36). Property the partnership buys has a cost basis (IRC §1012); property a member contributes keeps the member's adjusted basis (IRC §723), and the difference from its fair market value is the built-in gain or loss that §704(c) makes the partnership account for; property a member converts from personal use has a depreciable basis of the lesser of fair market value and adjusted basis (Treas. Reg. §1.168(i)-4(b)(1)). wanderbooks records the basis; tax depreciation (MACRS, conventions, elections) stays with the CPA.
## 26 U.S.C. §1012(a): basis is cost
Source: <https://www.law.cornell.edu/uscode/text/26/1012>
@@ -38,3 +38,67 @@ Retrieved: 2026-10-15
SHA-256 of the retrieved file (`ecfr168i4.html`): `284efb83eeb11442ab86e050f6d630bd468fd75463e27e3ec81dbc8de455e9be`
> Depreciation deduction allowable. This paragraph (b) applies to property that is converted from personal use to use in a taxpayer's trade or business, or for the production of income, during a taxable year. This conversion includes property that was previously used by the taxpayer for personal purposes, including real property (other than land) that is acquired before 1987 and converted from personal use to business or income-producing use after 1986, and depreciable property that was previously used by a tax-exempt entity before the entity changed to a taxable entity. Except as otherwise provided by the Internal Revenue Code or regulations under the Internal Revenue Code, upon a conversion to business or income-producing use, the depreciation allowance for the year of change and any subsequent taxable year is determined as though the property is placed in service by the taxpayer on the date on which the conversion occurs. Thus, except as otherwise provided by the Internal Revenue Code or regulations under the Internal Revenue Code, the taxpayer must use any applicable depreciation method, recovery period, and convention prescribed under section 168 for the property in the year of change, consistent with any election made under section 168 by the taxpayer for that year (see, for example, section 168(b)(5)). See §§ 1.168(k)-1(f)(6)(iii) or 1.168(k)-2(g)(6)(iii), as applicable, and 1.1400L(b)-1(f)(6) for the additional first year depreciation deduction rules applicable to a conversion to business or income-producing use. The depreciable basis of the property for the year of change is the lesser of its fair market value or its adjusted depreciable basis (as defined in § 1.168(b)-1T(a)(4)), as applicable, at the time of the conversion to business or income-producing use.
## 26 U.S.C. §1016(a)(1)-(2): adjusted basis
Source: <https://www.law.cornell.edu/uscode/text/26/1016>
Retrieved: 2026-10-20
SHA-256 of the retrieved file (`usc1016.html`): `fe4bb279ed8d661b06d997eab76ed699cbdc51ce87eb72ccf2d0174a5d08188e`
What "the contributing member's adjusted basis" adds and takes away: improvements up, depreciation down (allowed, but never less than allowable).
> Proper adjustment in respect of the property shall in all cases be made— (1) for expenditures, receipts, losses, or other items, properly chargeable to capital account, [...] (2) in respect of any period since February 28, 1913, for exhaustion, wear and tear, obsolescence, amortization, and depletion, to the extent of the amount— (A) allowed as deductions in computing taxable income under this subtitle or prior income tax laws, and (B) resulting (by reason of the deductions so allowed) in a reduction for any taxable year of the taxpayer’s taxes under this subtitle [...], but not less than the amount allowable under this subtitle or prior income tax laws.
## Treas. Reg. §1.704-3: contributed property (§704(c))
Source: <https://www.ecfr.gov/api/renderer/v1/content/enhanced/current/title-26?part=1&section=1.704-3>
Retrieved: 2026-10-20
SHA-256 of the retrieved file (`ecfr704-3.html`): `b927010356e8673c1d31ac56255c942f77a32818e9f85761e86eb4f7ee12eda7`
**§1.704-3(a)(1) General principles** (sentences three, five and six)
> Notwithstanding any other provision of this section, the allocations must be made using a reasonable method that is consistent with the purpose of section 704(c). [...] An allocation method is not necessarily unreasonable merely because another allocation method would result in a higher aggregate tax liability. Paragraphs (b), (c), and (d) of this section describe allocation methods that are generally reasonable.
**§1.704-3(a)(2) Operating rules** (first two sentences)
> Except as provided in paragraphs (e)(2) and (e)(3) of this section, section 704(c) and this section apply on a property-by-property basis. Therefore, in determining whether there is a disparity between adjusted tax basis and fair market value, the built-in gains and built-in losses on items of contributed property cannot be aggregated.
**§1.704-3(a)(3)(i) Section 704(c) property** (first three sentences)
> Property contributed to a partnership is section 704(c) property if at the time of contribution its book value differs from the contributing partner's adjusted tax basis. For purposes of this section, book value is determined as contemplated by § 1.704-1(b). Therefore, book value is equal to fair market value at the time of contribution and is subsequently adjusted for cost recovery and other events that affect the basis of the property.
**§1.704-3(a)(3)(ii) Built-in gain and built-in loss** (the first four sentences)
> The built-in gain on section 704(c) property is the excess of the property's book value over the contributing partner's adjusted tax basis upon contribution. The built-in gain is thereafter reduced by decreases in the difference between the property's book value and adjusted tax basis. The built-in loss on section 704(c) property is the excess of the contributing partner's adjusted tax basis over the property's book value upon contribution. The built-in loss is thereafter reduced by decreases in the difference between the property's adjusted tax basis and book value.
**§1.704-3(b)(1) Traditional method** (sentences one, two, five to seven)
> This paragraph (b) describes the traditional method of making section 704(c) allocations. In general, the traditional method requires that when the partnership has income, gain, loss, or deduction attributable to section 704(c) property, it must make appropriate allocations to the partners to avoid shifting the tax consequences of the built-in gain or loss. [...] For section 704(c) property subject to amortization, depletion, depreciation, or other cost recovery, the allocation of deductions attributable to these items takes into account built-in gain or loss on the property. For example, tax allocations to the noncontributing partners of cost recovery deductions with respect to section 704(c) property generally must, to the extent possible, equal book allocations to those partners. However, the total income, gain, loss, or deduction allocated to the partners for a taxable year with respect to a property cannot exceed the total partnership income, gain, loss, or deduction with respect to that property for the taxable year (the ceiling rule).
## IRS Publication 541 (12/2025), Partnerships: basis of contributed property
Source: <https://www.irs.gov/publications/p541>
Retrieved: 2026-10-20
SHA-256 of the retrieved file (`p541.html`): `d19b1ede5efb1e7e9f25584ee2034912ed4a499833d15854545761953c5eab39`
**Basis of contributed property.**
> If a partner contributes property to a partnership, the partnership’s basis for determining depreciation, depletion, gain, or loss for the property is the same as the partner’s adjusted basis for the property when it was contributed, increased by any gain recognized by the partner at the time of contribution.
**Allocations to account for built-in gain or loss.** (first two sentences)
> The FMV of property at the time it is contributed may be different from the partner’s adjusted basis. The partnership must allocate among the partners any income, deduction, gain, or loss on the property in a manner that will account for the difference.
## IRS Publication 946 (2025), How To Depreciate Property: personal-use property and the placed-in-service date
Source: <https://www.irs.gov/publications/p946>
Retrieved: 2026-10-20
SHA-256 of the retrieved file (`p946.html`): `bcc1d04f59bbfc4e74181831c112745e629e671445dab78e39f17051a4a74eb1`
**Property changed from personal use.**
> If you held property for personal use and later use it in your business or income-producing activity, your depreciable basis is the lesser of the following.
> - The FMV of the property on the date of the change in use.
> - Your original cost or other basis adjusted as follows.
> - Increased by the cost of any permanent improvements or additions and other costs that must be added to basis.
> - Decreased by any deductions you claimed for casualty and theft losses and other items that reduced your basis.
**Placed in Service** (for tax depreciation, the CPA's; the book in-service date rests on ASC 360-10-35-4, rules.md B-15)
> You place property in service when it is ready and available for a specific use, whether in a business activity, an income-producing activity, a tax-exempt activity, or a personal activity. Even if you are not using the property, it is in service when it is ready and available for its specific use.
+53 -1
View File
@@ -1,5 +1,5 @@
# Partnerships: shares of income and capital accounts
Governs `CloseTo::Members` and the members' equity statement. Partners' shares come from the partnership agreement (IRC §704(a)); a partner's capital account is one running balance of what they contributed, their allocations of income and loss, and what was distributed to them (Treas. Reg. §1.704-1(b)(2)(iv)(b)); when a partner's interest changes during the year, the distributive shares take the varying interests into account, period by period (IRC §706(d)(1), Treas. Reg. §1.706-4(a)); Form 1065 reports each partner's capital account on the tax basis (Schedule K-1 item L) and the changes in them (Schedule M-2). No authority prescribes how to round a share to the cent: that rule is the owner's decision (largest remainder, 2026-10-13), counted from the company's first close (D-10, 2026-10-16).
Governs `CloseTo::Members`, the members' equity statement, and the K-1 worksheet's capital accounts on the tax basis (`ledger_core::tax_capital`, rules.md B-36). Partners' shares come from the partnership agreement (IRC §704(a)); a partner's capital account is one running balance of what they contributed, their allocations of income and loss, and what was distributed to them (Treas. Reg. §1.704-1(b)(2)(iv)(b)); when a partner's interest changes during the year, the distributive shares take the varying interests into account, period by period (IRC §706(d)(1), Treas. Reg. §1.706-4(a)); Form 1065 reports each partner's capital account on the tax basis (Schedule K-1 item L) and the changes in them (Schedule M-2). No authority prescribes how to round a share to the cent: that rule is the owner's decision (largest remainder, 2026-10-13), counted from the company's first close (D-10, 2026-10-16).
## 26 U.S.C. §704(a)-(b)
Source: <https://www.law.cornell.edu/uscode/text/26/704>
@@ -68,3 +68,55 @@ SHA-256 of the retrieved file (`i1065sk1.html`): `d7d6298286601fd95ab8e445c10fd6
**Basis Limitations, its third paragraph of five** (where "based on the partnership's books and records" comes from: not Item L)
> Although the partnership provides an analysis of the partner’s capital account in item L of Schedule K-1, that information is based on the partnership’s books and records and can’t be used to figure the partner’s adjusted basis.
## Instructions for Form 1065 (2025): Item L, the tax-basis method
Source: <https://www.irs.gov/instructions/i1065>
Retrieved: 2026-10-20
SHA-256 of the retrieved file (`i1065.html`): `3485e936c1f6532a3a8efda78d45db38c70892abe9c532704d605a4bc45714fe`
Under "Item L. Partner’s Capital Account Analysis" (Specific Instructions, Schedule K-1 only):
**Tax-basis method.**
> Figure each partner’s capital account for the partnership’s tax year using the transactional approach, discussed below, for the tax-basis method.
**How to report partnership events or transactions.** (first two sentences)
> If you’re uncertain how to report a partnership event or transaction, you should account for the event or transaction in a manner generally consistent with figuring the partner’s adjusted tax basis in its partnership interest (without regard to partnership liabilities), taking into account the rules and principles of sections 705, 722, 733, and 742 and by reporting the amount on the line for other increase (decrease). The partner’s ending capital account as reported using the tax-basis method in item L might not equal the partner’s adjusted tax basis in its partnership interest.
**Beginning capital account.**
> Enter the partner’s ending capital account as determined for last year on the line for beginning capital account. If a partner joined the partnership through a contribution to the partnership this year, enter zero as the partner’s beginning capital account.
**Capital contributed during the year.**
> On the line “Capital contributed during the year,” enter the amount of cash plus the adjusted tax basis of all property contributed by the partner to the partnership during the year. The amount you enter on this line should be reduced by any liabilities assumed by the partnership in connection with, or liabilities to which the property is subject immediately before, the contribution. This amount might be negative.
**Current year net income (loss).**
> On the line “Current year net income (loss),” enter the partner’s distributive share of partnership income and gain (including tax-exempt income) as figured for tax purposes for the year, minus the partner’s distributive share of partnership loss and deductions (including nondeductible, noncapital expenditures) as figured for tax purposes for the year.
**Other increase (decrease).** (first sentence)
> On the line “Other increase (decrease),” enter the sum of all other increases or decreases that affected the partner’s capital account for tax purposes during the year and attach a statement explaining each adjustment.
**Withdrawals and distributions.**
> On the line “Withdrawals and distributions,” enter the amount of cash plus the adjusted tax basis of all property distributed by the partnership to the partner during the year. The amount you enter on this line should be reduced by any liabilities assumed by the partner in connection with, or liabilities to which the property is subject immediately before, the distribution. This amount might be negative.
**Ending capital account.**
> The sum of the amounts shown on the lines in item L above the line “Ending capital account” must equal the amount reported on the line “Ending capital account.” A partner’s ending capital account determined under the tax-basis method may be negative if the sum of a partner’s losses and distributions exceeds the sum of the partner’s contributions and share of income.
Under "Item M. Did the Partner Contribute Property With a Built-in Gain or Loss?":
> A property’s built-in gain is the amount by which the FMV of the property exceeds its adjusted tax basis at the time the property is contributed to the partnership. A property’s built-in loss is the amount by which the FMV of the property is less than its adjusted tax basis at the time the property is contributed to the partnership. Partnerships are required to keep track of this information; see Regulations section 1.704-3.
## Instructions for Form 1065 (2020): the tax-basis method required
Source: <https://www.irs.gov/pub/irs-prior/i1065--2020.pdf>
Retrieved: 2026-10-20
SHA-256 of the retrieved file (`i1065--2020.pdf`): `64a48b6e8a9d713eaf641ffdd9a5a09e9811692d84a4be2c45f458e69eb7491a`
Under "Item L. Partner's Capital Account Analysis", from tax year 2020:
> Tax basis method. Figure each partner's capital account for the partnership's tax year using the transactional approach, discussed below, for the tax basis method. If you reported the partner's capital account last year using any other method (for example, GAAP, section 704(b), or other), you must use the tax basis method this year.
+87 -1
View File
@@ -25,7 +25,7 @@ promise.
| Differential: GnuCash | another implementation, adjudicated (3) | `tests/oracle_gnucash.rs`, `oracle/gnucash/` | `just oracle` | ~2 min | weekly |
| Formal proofs | Kani (bounded) and Lean (unbounded) | `src/proofs.rs`, `verify/lean/` | `just prove` | ~15-20 min (bounded by `entry_flows_of_a_reversal_mirror`, ~14 min; all 29 harnesses ~43 min of CPU, run in parallel) | weekly |
| Fuzzing | crash, hang, broken books (4); for `fuzz_store_replay` (validly chained journals with fuzz-chosen events): books that open must verify, and the viewer must accept exactly what the writer does | `fuzz/fuzz_targets/`, corpora in `fuzz/corpus/` | `just fuzz <target> <secs>` | 10 min each | weekly |
| Miri | undefined behavior in our use of dependencies (4) | the core's unit, bridge, invariant tests | `just miri` | ~2 min | on demand |
| Miri | undefined behavior in our use of dependencies (4) | the core's unit, bridge, invariant tests (the exhaustive calendar walk aside) | `just miri` | ~4 min | on demand |
| Golden | `tests/golden/fixture_company.json` (5) | `invariants.rs` | `just check` | <1s | every change |
| Benchmarks | a baseline (6) | `ledger-core/benches/books.rs`, `ledger-store/benches/store.rs` | `just bench` | ~2 min | none (no budget, by decision) |
| Mutation | can the tests fail? | `ledger-core` (2026-10-13: 1,011 caught + 13 timeouts of 1,024 viable, 0 missed) | `just mutants` | ~3 h | weekly |
@@ -1554,6 +1554,92 @@ version's journal format (rules.md B-27). Mutation testing waits for P12
`upgrade`, `book_line`, `upgraded_lines`, `upgrade_explained`,
`ASKED_UPGRADES`). None run.
## P3: asset basis and tax-basis capital (2026-10-20)
Defect 13 (assets: posted vs scheduled, the in-service and acquired dates,
the contributed property's bases) and D-41's K-1 worksheet on the tax
basis. Mutation runs wait for P12 (D-33); none was run.
- **Named regressions** (the brief's reproductions, anonymized):
`list_assets_book_value_is_what_the_books_carry` and
`a_reversed_run_is_not_posted` (`ledger-mcp/tests/spec_assets.rs`),
`an_asset_bought_before_it_is_in_service_is_on_the_register_from_acquisition`,
`personal_use_contribution_keeps_its_723_basis_apart_from_depreciable_basis`,
`built_in_gain_is_fixed_at_contribution_not_book_cost`
(`ledger-core/tests/spec_asset_basis.rs`, which replaces
`spec_tax_basis.rs`). Each is also a bookspec example
(`bookspec/examples/assets-*.toml`).
- **ledger-core:** `spec_asset_basis.rs` (every `AssetBasis::check`
refusal and its replay pairs, the figure table for each rule, legacy
records giving the figures they gave, the four-contributed-devices
shape, the acquired date from the link and its refusals, the disposal
floor, `accumulated_posted` and its edges: a run dated after `as_of`, a
reversal dated after it, a reversal dated before its run, a reinstated
run, disposal on and after `as_of`, `check_depreciation_run` and
`record_depreciation_run`); `tax_capital.rs` (tax-basis capital per
member with a cash contribution, a contribution of property, a
distribution and a year of depreciation; next year's beginning; cash-only
books; property without a basis; property distributed; the roll-forward
and reconciliation over spans); `properties.rs`
`prop_basis_figures_laws` (5,000 cases); `kernel_bridge.rs`
`basis_figures_agree`; Kani `basis_figures_laws` (`src/proofs.rs`, 83
checks, its cover satisfied); `spec_asset_tags.rs` (the register's
posted and scheduled figures, runs recorded as a store records them).
- **ledger-store:** `asset_tags.rs` (`asset.basis_set` journaled under the
feature `asset_basis` (new books declare it as they are created),
replayed, reloaded from the database and rebuilt, and in the viewer; a
line whose figures disagree with today's formula still replays; an
unknown rule or method is newer, a malformed figure corrupt; pre-P3
`asset.tax_basis_set` lines give the figures they gave; P2's v12
database left as it is while this version builds its v13 file, runs
keyed by entry (`a_p2_database_is_left_and_v13_built_from_the_journal`);
v9 and v10 databases under this version's name rebuilt). The old books
(`books_an_earlier_version_wrote_open_to_its_figures`) open to exactly
their figures.
- **ledger-mcp:** `spec_assets.rs` (the aliases `purchase_date`,
`in_service`, `tax_basis_rule`, `contributor_basis` and the old rule
names, noted, and refused when they disagree; the acquired date from the
acquisition entry; a value at contribution required; every refusal
changing nothing; list_assets as of a date, disposed and not yet
acquired; the register export's columns and totals).
- **ledger-package:** `package.rs`
`the_k1_worksheet_reports_tax_basis_capital` (the CSV line by line).
- **bookspec:** the one loader (`ledger-core/tests/bookspec.rs`) runs the
assets' examples in the shared shape: `setup.assets` with `acquired_by`
and `basis`, a `[[changes]]` `correct_asset`, and the queries
`register_row`, `register_totals`, `asset_basis`, `k1_tax_basis` and
`k1_reconciliation` (keyed `"<member>.<line>"`, beside `k1`'s book
figures); refused: a register row before the asset was acquired
(`a_register_row_before_the_asset_was_acquired_is_refused`), an
`acquired_by` naming an event with no entry
(`an_asset_acquired_by_an_event_with_no_entry_is_refused`), a figure for
a tax line the books can't know (`a_tax_line_the_books_cant_know_is_open`)
and a member's reconciliation leaving a cause out
(`a_members_reconciliation_shows_every_cause`).
- **ledger-import:** `asset_register.rs` (`pdf_shows_723_and_depreciable_basis`
and the other PDF checks) and `spec_import.rs` (XLSX columns, totals,
reconciliation and notes).
- **ledger-gui:** `tests/assets.rs` (`basis_figures_are_ledger_cores`,
`journal_text_names_each_basis_figure`, the "Confirm its value" and
"Choose a §704(c) method" items); `pages/assets.rs`
(`an_assets_page_shows_its_own_book_value`: cost less posted, the
schedule beside it); `pages/reports.rs`
(`asset_register_report_carries_tax_basis`).
**For P12 (mutation targets):** `kernel::basis_figures` (min for max, the
sign of the gain, purchase to a contribution); `Ledger::accumulated_posted`
and `assets::run_chain_entries` (`<=` for `<` on the entry and reversal
dates, the disposed → 0 branch, the alternating sign); `live_depreciation_run`'s
reversal test; `check_depreciation_run`'s arms; the register filter
`acquired <= as_of` and `asset_acquired_date`'s min; `AssetBasis::check`,
`check_journaled` and `check_legacy_journaled` arms; the acquisition and
in-service date refusals; the disposal floor; the MCP `aliased` logic
(both given and differing); `asset_basis_from_journal` (newer vs corrupt);
the projection loader's two key sets; `tax_capital::share` and
`entry_property` (the mismatch branch, the unknown sum), the open-item
conditions (`in_service`, the disposal window), and the reconciliation's
signs.
## Benchmarks (baseline 2026-10-13)
No budget, by decision (the owner, 2026-10-13: the books do little work
+16
View File
@@ -419,6 +419,22 @@ months); an exhaustive test walks the kernel itself over every
1-to-3-month span of two calendar years, and the bridge and the exact
unit tests check the rest.
### An asset's basis figures (P3, defect 13)
The register's tax figures beside book value (rules.md B-25) come from
one kernel function, `kernel::basis_figures`, for every rule:
27. **Each figure follows from the rule and the facts, and none
overflows**: a purchase depreciates from its cost and has no §723 basis
or built-in gain; a contribution's §723 basis is the member's adjusted
basis and its built-in gain the value less it (a loss exactly when the
basis exceeds the value); carryover property depreciates from the
basis, personal-use property from the lesser of value and basis (at
most each, equal to one). · Kani `basis_figures_laws` (every rule,
costs, bases and values within the bounds) · bridge `basis_figures_agree`
(the `Decimal` instantiation agrees, rule by rule) · property
`prop_basis_figures_laws`
## What the proofs found
The engine already had 190+ tests, property tests, mutation testing,