Skip to main content

Module tranche

Module tranche 

Source
Expand description

Conservative-filing DeclareTranche record path + the tranche⇄allocation mutual-exclusion guard (D-8 UX layer). A tranche is undocumented BTC declared at $0 basis (the IRS fallback), folded to an EstimatedConservative lot homed at window_end. See design/conservative-filing/SPEC.md D-8.

The engine backstop (Task 5 — SafeHarborUnconservable denies a SafeHarborAllocation effectiveness over a live tranche residue) is the GUARANTEE; these record-time guards are the early, friendly error. They are the single source of the mutual-exclusion predicate for ALL FOUR allocation append sites (CLI safe_harbor_allocate + safe_harbor_attest; TUI persist_safe_harbor_allocate + persist_safe_harbor_attest) and the tranche record path here.

Functions§

declare_tranche
Append a DeclareTranche decision (a $0-basis EstimatedConservative lot) and persist.
guard_allocation_vs_tranche
ALLOCATION-side guard (the chokepoint for all four allocation append sites): refuse recording a SafeHarborAllocation while a pre-2025 tranche is on file. v1 makes them mutually exclusive (D-8).
wallet_is_known
P8 Nit: is wallet referenced by any prior event — an import’s wallet, or a prior tranche declaration’s target wallet? A false result means --wallet likely has a TYPO. This drives a WARN only, NEVER a refusal: a conservative-filing tranche lot in any wallet still files at its conservative basis ($0, or a promoted floor) — tax-neutral — so a typo merely strands the lot in a phantom wallet rather than mis-stating tax. Pure over the event log.