Expand description
Console output + JSON reports.
Report guarantees:
files[]is sorted bypath, so audits are reproducible run to run.- Each mode serializes exactly its own summary fields via an untagged enum
(
scandistribution,convert/fetchcounters,verifygate).
§JSON report schema (summary)
Top level: tool, version, mode, root (tree modes) or url
(fetch), started_at, duration_ms, options, summary, files[],
unknown_files, error_files, and the omit-when-empty warnings,
verify_failed_files. The summary shape depends on mode (scan:
encoding buckets; convert/fetch and fix: outcome counters; verify: gate
counts). Every field of FileRecord, OptionsBlock, the four
summary structs, and Report itself documents its JSON name; all of
them implement both Serialize and Deserialize, so downstream tools can
read reports
back without hand-written mirrors. Report’s Deserialize dispatches
on mode — the per-mode summaries share field names, so parsing a report
requires knowing its mode.
Per-file action vocabulary (open set across versions — new actions may
appear): FILE_ACTIONS.
Structs§
- Console
Cfg - Console verbosity settings.
- Convert
Summary convert/fetchsummary.- File
Record - A single processed file in the report.
- FixSummary
fixsummary: convert counters plus the verify gate result on the same tree.fetch_erroris impossible in fix mode and is omitted.- Options
Block - Effective CLI options snapshot, embedded in every JSON report.
- Report
- Full JSON report document.
- Scan
Summary scansummary: per-encoding distribution counts.- Verify
Summary verifysummary.
Enums§
- Summary
- Mode-specific summary, serialized inline (untagged).
Constants§
- FILE_
ACTIONS - Every per-file action the tool currently emits. New actions may appear in future versions (treat the list as an open set); unknown actions in a parsed report are not an error.
Functions§
- print_
header - Print the mode header line.
- print_
problem - Print a per-file problem line (stderr, always shown).
- print_
verbose - Print a per-file verbose line (stdout,
-vonly). - rfc3339_
from_ secs - Format a unix timestamp as RFC 3339 UTC (
1970-01-01T00:00:00Zstyle).chronois deliberately not a dependency; the civil-from-days algorithm is well-known and unit-tested. - rfc3339_
now - Current wall-clock time as RFC 3339 UTC.
- write_
report - Serialize the report and write it next to a trailing newline.