wip: pause checkpoint — P6 feature complete, gate interrupted (not for merge)
This commit is contained in:
1 parent
cc4f104f06
commit
ce36640874
68 files changed
+4592
-374
No files matched your search
+10
-1
@@ -1428,7 +1428,16 @@ Each unit follows the 8.0.4 template. "A-n" is an owner answer numbered in 8.3.1
|
||||
5. **Files:** owns `crates/ledger-import/src/extract.rs`, `crates/ledger-mcp/src/tools/evidence.rs`, the two fuzz targets; touches `crates/ledger-gui/src/receipts.rs`, `crates/ledger-mcp/src/tin_files.rs`, `store.rs` (`attach`), `crates/ledger-host/src/commands.rs`, the 8.0.3 files.
|
||||
6. **Tests and proofs:** named above; no kernel or Lean change (no money moves).
|
||||
7. **Done when:** (1) every attachment of the `p2-served` fixture and of the demo books gives a `get_receipt` default answer under 8 KiB; (2) the viewer and the TIN scan read PDFs through the one `extract` module (no `hayro` use left in `ledger-gui` beyond the call, none in `ledger-mcp`); (3) the dedup property and the only-evidence refusal pass; (4) the backfill command runs on a fixture and is idempotent; (5) 8.0.6 in the PR; (6) `just check` green and the two fuzz targets run clean for 10 minutes locally.
|
||||
8. **As built:** none yet.
|
||||
8. **As built** (2026-10-27, branch `P6`): every step built; departures and findings:
|
||||
- Step 1: `ledger-import/src/extract.rs` also promotes `pdf_lines` (the per-line glyphs its tests read), adds `page_count` and `extract` (the `ok`/`none`/`failed` answer the journal records), and `extract::VERSION` is the crate's version. The renderer `hayro` moves to `ledger-import`'s dependencies as well as `hayro-interpret`: `page_png` rasterizes, and the renderer is not in `hayro-interpret`. Caps are constants (`MAX_BYTES`, `MAX_PAGES`, `MAX_TEXT_BYTES`).
|
||||
- Step 2: `ledger-store` depends on `ledger-import`, so the writer reads a file as it is filed and on the backfill. Attach-time extraction runs only in books that have declared `attachment_text`: books waiting for the owner's go-ahead keep filing (an existing store test requires it), and `wanderbooks books extract` reads their old and new files after the upgrade. The command is `wanderbooks books extract BOOK ATTACHMENT` (the plan's `extract ID` needed the book as the other `books` commands name it).
|
||||
- Step 3: `books.get_receipt` takes `page` and `max_px` as flat arguments beside `view` (the MCP arguments are one object; the plan's `page_image { page, max_px }` reads as those two), and its meta carries `text_status` too. The page resource is a PNG blob (`BlobResourceContents`), the first binary resource; `books://receipts/{id}` stays an alias of `books://attachments/{id}`.
|
||||
- Step 4: consolidation groups every record sharing a blob, withdrawn ones included, so the only-evidence refusal is reachable (a withdrawn oldest record cannot stand in); a preview changes nothing and is served on books that haven't declared the feature, the confirmed call refuses before any journal line.
|
||||
- Step 5: `books.set_entry_settles` is the Build step's name but is not in 8.0.3's new-tools row; the Build step's name is used (flagged to the EM). Annotations are ledger state (`ledger_core::evidence`) as well as a projection table, because `Ledger::next_receipt_number` reads them; `entry.settles` is ledger state only, and `differs_from` compares both.
|
||||
- `books.find_attachment`'s `sha256` is exempt from the D-46 inline-argument refusal (it names a search key, not bytes), and `no_tool_takes_a_path` exempts an annotation's `source` (what a human says a record came from, never a place).
|
||||
- Two `ledger-store/tests/spec_store.rs` tests encoded the invariant step 4 replaces (two records for one blob); they are rewritten as `same_bytes_are_one_attachment_linked_to_both` and `the_first_filings_name_and_type_stay`.
|
||||
- Schema 16 (8.0.3's provisional 20 was a guide; numbers are taken at merge). No kernel, Kani or Lean change: no money moves, so `just prove` is unchanged.
|
||||
- 8.0.6: `tests/store.rs::books_written_under_older_rules_still_open` gained the three new event shapes; the fixture `tests/fixtures/old-books/p6_evidence` was written by the version before the unit (its API, its `expected.json`); the cutover test's refused list gained `books.annotate_attachment`; `attachment_text_is_its_own_feature` and the `tests/format.rs` arms pass; no figure moves, so no golden changed; merging needs no go-ahead (the live books refuse the new writes until the owner gives it).
|
||||
|
||||
**Struck from P6:** ~~`ledger-extract` sandboxed subprocess (rlimits, seccomp, Landlock), `extractor_sandboxed`~~ → D-32, D-53; ~~`lopdf`~~ → hayro; ~~`attach_email`, `attachment.rendered`, `fuzz_eml`~~ → D-17 (email-in waits for the hosted service; a receipt that is an email is printed to PDF by the human, as the first company's convention says); ~~`compare_reference`, `record_inventory`, `check_inventory`, `inventory.recorded`, `reference.compared`~~ → the Sheet and the books as of 2026-10-11 are frozen and the final `verify-sheet` run is a filed workpaper; P10 step 5 cites it (IZ-3b, Z-6); ~~`inline_base64_requires_sha`~~ → D-46; ~~`reimbursed` by FIFO~~ → `entry.settles` only; ~~"the books dir's `company/` folder retired"~~ → done at the P1 and P2 cutovers.
|
||||
|
||||
|
||||
Reference in new issue
Block a user