recon_gen.cli.audit
recon-gen audit — PDF reconciliation report.
Three operations:
- apply — emit Markdown source for the report (default), or
--executeto write a PDF via reportlab.- clean — list the report file that would be removed (default), or
--executeto delete it.test — pytest the audit module + pyright.
The report is a regulator-ready PDF generated directly from the
database, querying the per-prefix L1 invariant matviews + base
tables. Same emit-vs-execute pattern as the other artifact groups —
no --execute means the integrator can review the rendered
Markdown / page outline before committing to a real PDF write.
Phase U.2 ships the executive summary page on top of the U.1
cover: per-period totals (transaction count, transfer count, dollar
volume gross/net) + L1 invariant exception counts (drift, ledger
drift, overdraft, limit breach, stuck pending, stuck unbundled,
supersession). Real numbers when demo_database_url is configured;
graceful “—” placeholders + a notice when it isn’t, so the layout
stays previewable without a live DB.
Page footer carries a provenance-fingerprint placeholder (real fingerprint lands in U.7). Per-invariant violation tables, the per-account-day Daily Statement walk, and the sign-off block land in U.3+.
Period default: trailing:7 (a 7-day window ending yesterday).
Override with --period <shape> — see --help for the full
accepted-shapes list (trailing:N, today, yesterday,
YYYY-MM-DD..YYYY-MM-DD, or single YYYY-MM-DD).
Classes
|
One Posted-Money record on a Daily Statement walk page. |
|
One per-(account, business_day) Daily Statement page. |
|
One row of the |
|
Totals rendered on the executive summary page. |
|
Per (parent_role, rail_name) roll-up of breaching children. |
|
One row of the |
|
One matview's row count + SHA256 for the provenance appendix. |
|
Per parent-role roll-up of overdrawn child (template) accounts. |
|
One row of the |
|
Per (parent_role, rail_name) roll-up of stuck child txns. |
|
One row of the |
|
Per (parent_role, rail_name) roll-up of unbundled child txns. |
|
One row of the |
|
Per (base_table, category) total count, all-time. |
|
All-table supersession audit data: aggregates + in-window details. |
|
One in-window correcting entry from |
|
One in-window correcting entry from |
Modules
Markdown renderers for the audit report. |
|
PDF renderers for the audit report. |