wip: pause checkpoint — P6 feature complete, gate interrupted (not for merge)

This commit is contained in:
swaits committed 2026-10-27 14:41:34 -06:00
1 parent cc4f104f06
commit ce36640874
68 files changed
+4592 -374

No files matched your search

+14
View File
@@ -78,6 +78,20 @@ test = false
doc = false
bench = false
[[bin]]
name = "fuzz_extract_pdf"
path = "fuzz_targets/fuzz_extract_pdf.rs"
test = false
doc = false
bench = false
[[bin]]
name = "fuzz_extract_xlsx"
path = "fuzz_targets/fuzz_extract_xlsx.rs"
test = false
doc = false
bench = false
[[bin]]
name = "fuzz_config_parse"
path = "fuzz_targets/fuzz_config_parse.rs"
+17
View File
@@ -0,0 +1,17 @@
//! The PDF extractor on arbitrary bytes (plan P6): reading text, a page's
//! pixels and the page count is a refusal or an answer, never a panic or a
//! hang (D-32: it runs in the server's process).
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
let _ = ledger_import::extract::pdf_text(data);
let _ = ledger_import::extract::pdf_lines(data);
if let Ok(pages) = ledger_import::extract::page_count(data) {
for page in [0, pages.saturating_sub(1), pages] {
let _ = ledger_import::extract::page_png(data, page, 64);
}
}
let _ = ledger_import::extract::text_of(data, "application/pdf", "receipt.pdf");
});
+15
View File
@@ -0,0 +1,15 @@
//! The XLSX extractor on arbitrary bytes (plan P6): a zip or not, a sheet
//! or not, it is a value or a refusal, never a panic; a cell's number is
//! read as the decimal string the XML holds.
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
let _ = ledger_import::extract::xlsx_text(data);
let _ = ledger_import::extract::text_of(
data,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"sheet.xlsx",
);
});
+3 -2
View File
@@ -24,7 +24,8 @@ use serde_json::{Map, Value, json};
const TYPES: &[&str] = &[
"account.added", "account.renamed", "account.tax_set", "asset.depreciation_posted",
"asset.disposed",
"asset.registered", "attachment.withdrawn", "bill.created", "bill.paid", "class.added",
"asset.registered", "attachment.annotated", "attachment.text_extracted", "attachment.withdrawn",
"bill.created", "bill.paid", "class.added",
"customer.added", "document.filed", "entry.created", "entry.line_added",
"entry.line_class_set", "entry.posted", "entry.reversed", "entry.vendor_set",
"fx.rate_set", "invoice.created", "invoice.payment_received", "journal.tail_repaired",
@@ -40,7 +41,7 @@ const TYPES: &[&str] = &[
"entry.party_set", "party.added", "party.role_set", "party.tin_set", "party.updated",
"party.w4_set", "party.w9_set", "payroll.taxes_remitted", "reconciliation.completed",
"reconciliation.voided", "role.assigned", "statement.recorded", "statement.voided",
"project.set",
"project.set", "entry.settles",
];
const FIELDS: &[&str] = &[