docs(plan): S4.5 as built (P4b S4.5)
Departures from the Build text, one bullet each: no golden sha to recompute, invoice_document's dropped `today`, where the ways to pay, the footer and the website come from, exact unit prices, the handbook steps the earlier slices had already written, the viewer parity test's shape, and the bookspec index left to P13. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HS8WZziDnyxunC23MUxrLp
This commit is contained in:
1 parent
caad35d75b
commit
ab3bd958c4
1 file changed
+10
-1
+10
-1
@@ -1303,7 +1303,7 @@ Each unit follows the 8.0.4 template. "A-n" is an owner answer numbered in 8.3.1
|
||||
|
||||
#### P4b S4: `documents_v2`
|
||||
|
||||
1. **Status:** in progress: S4.1 (`13282cf8`), S4.2 (`bf91c5a7`) and S4.3 (`d19fb464`) landed 2026-10-27; S4.4 landed 2026-10-29 (`d329bd6f`, merged clean from branch `S4.4` at `002fb9f8`); S4.5 not started, the next unit.
|
||||
1. **Status:** in progress: S4.1 (`13282cf8`), S4.2 (`bf91c5a7`) and S4.3 (`d19fb464`) landed 2026-10-27; S4.4 landed 2026-10-29 (`d329bd6f`, merged clean from branch `S4.4` at `002fb9f8`); S4.5 built 2026-10-29 on branch `S4.5`, not merged.
|
||||
2. **Depends on:** S1-S3 (landed). Inside the unit: S4.1 and S4.2 need nothing and may run in two worktrees; S4.3 needs both; S4.4 needs U0a and S4.3; S4.5 needs S4.4. S6 may start when S4.1 has merged; S5 when S4.2 has; S7.2 when S4.3 has. Go-ahead: `documents_v2`, one upgrade after S7 (D-52; Q-5 asks the owner whether to upgrade earlier). Until the go-ahead, on the owner's books a document carrying any new field is refused with `format_upgrade_pending`; a document carrying none posts exactly as before.
|
||||
3. **Feature and schema:** feature `documents_v2` (R-A; shared with S5, S6, S7, so S4 creates the constant and the test and the later slices add their call sites). New fields on `invoice.created` and `bill.created` and on their lines, and on `party.updated`, as 8.0.3 lists; no new event type. Provisional schema 16: columns on the documents and document lines tables, a `parties.email` and two terms columns.
|
||||
4. **Build:**
|
||||
@@ -1358,6 +1358,15 @@ Each unit follows the 8.0.4 template. "A-n" is an owner answer numbered in 8.3.1
|
||||
- D-55: `PartySnapshot::from_party` is the one place the billing-else-general rule lives (an invoice's bill-to `address`/`email` are the billing ones when set); the snapshot carries the whole block, and `PartyOut` gained the email, terms and contact fields so `books.party` shows what `books.update_party` sets.
|
||||
- Item 17's `documents_v2_refused_until_consent` is in `crates/ledger-cli/tests/format_upgrade.rs`; the wire tests are in the new `crates/ledger-cli/tests/documents.rs`, and D-55's round-trip and at-issue tests in `crates/ledger-store/tests/parties.rs`.
|
||||
- Existing callers of `books.create_invoice` and `books.create_bill` gained `confirmed: true` (and a bill its vendor's number, line accounts and file): the contract A-1 changes. Two tests that named `books.create_invoice` as a tool a write token cannot see now name `books.receive_payment`, since a write token may preview an invoice.
|
||||
S4.5 (2026-10-29, branch `S4.5`), departures only:
|
||||
- Item 19's "golden sha updated once": `an_invoice_renders_deterministically` never held a hash (it renders twice and compares bytes), so there was nothing to recompute; no golden moved. Its new siblings are unit tests beside it in `invoice_pdf.rs` (`labels_are_data`, `two_hundred_lines_paginate`, `a_quantity_prints_beside_its_price`, `only_the_current_copy_says_it_was_re_created`); `invoice_pdf_prints_what_it_should` is in `crates/ledger-import/tests/spec_import.rs`, as named.
|
||||
- `ledger_package::invoice_document` lost its `today` argument: 8.3.11 has the "Re-created on" note print `as_of`, so `today` had no use (`InvoiceVersion::Current { as_of }` carries it). The three callers (server, viewer, the package's own tests) changed with it. `issued_invoice_document`, `draft_invoice_document` and `invoice_document` now share one private `page_of`, so the three copies read the invoice's snapshots one way.
|
||||
- The ways to pay and the footer are read from the ledger's journaled settings (`ledger.settings()`), the company's email and website from `company.profile`: neither is in the seller snapshot (`PartySnapshot` has an email but no website), so the issued copy freezes today's values into its filed bytes and the current copy reprints with whatever the settings say by then. Only the party's side is snapshotted at issue (A-13, D-55); the plan's step 18 did not say where these come from.
|
||||
- A unit price with more than two decimals prints exactly ("8 x $0.125"), never rounded to the cent: `quantity x unit_price = amount` is exact (B-39 item 4), and a rounded price beside the unchanged amount would read as an error. The two-decimal case still passes through `amount_parts`.
|
||||
- Item 21: S5, S6 and S7 had already written steps 1 (the send), 2, 3, 4 and 5 of the handbook section, so this unit extended step 1 (the issue: preview, confirm, the filed copy, quantities, the snapshot) and renamed "What the CPA will check" step 6 with the 8.3.2 list, instead of writing the whole procedure. `{documents_v2}` needs the feature, which `handbook::section` did not know: `section_with(.., documents_v2)` is the new function, the server and the handbook tool call it, and the four-argument `section` stays only for tests (`#[cfg(test)]`), so no other caller changed.
|
||||
- Item 20's "`view_model.rs` parity for the new fields": `books.document` carries no number, terms or snapshot (S4.4 did not add them to its output), so there is no server figure to compare. `the_viewer_holds_a_numbered_invoice_as_the_store_does` compares the viewer's replayed invoice to the live store's instead, and the page's own facts are one function (`pages::invoices::details`) that the invoices test reads back.
|
||||
- The viewer's Details card is on bills too (the vendor's number, day received, terms, memo), which item 20 did not ask for; the list names a bill by "Bill {id}" as before. The breadcrumb, the command palette and the attention titles still say "Invoice {id}" for a numbered invoice; naming them by number is a follow-up outside this unit.
|
||||
- B-39 and B-40 (item 21) are written in `docs/spec/rules.md`; `bookspec/spec/rules-index.md` still lists them as "allocated, not yet stated", which is P13's file and its checker's table, so it was not touched.
|
||||
|
||||
#### P4b S5: sent tracking (`invoice.sent`)
|
||||
|
||||
|
||||
Reference in new issue
Block a user