UTF-8 file reads capped by [vox_scaling_policy::ScalingPolicy::embedded] max_file_bytes_hint.
This crate is the workspace SSOT for scaling-policy-aware capped reads used by CI, MCP,
publisher, Populi, and other crates. Prefer it over per-crate copies of bounded_fs.
Read a file as UTF-8; errors if size exceeds [max_file_bytes_hint] or bytes are not valid UTF-8.
normalize_text
Normalize source/text bytes for cross-platform consistency: strip one leading UTF-8 BOM and convert CRLF/CR line endings to LF. Pure, idempotent, and allocation-light (returns input unchanged when already clean). Shared by the compiler lexer and the runtime text-read functions.
read_utf8_path_capped_or_empty
Same as [read_utf8_path_capped] but returns an empty string on any failure.
read_utf8_path_capped_opt
Same as [read_utf8_path_capped] but returns None on any failure.
read_utf8_path_capped_async
Capped read on the blocking pool (for async call sites; avoids unbounded tokio::fs::read_to_string).
Normalize source/text bytes for cross-platform consistency: strip one leading UTF-8 BOM and convert CRLF/CR line endings to LF. Pure, idempotent, and allocation-light (returns input unchanged when already clean). Shared by the compiler lexer and the runtime text-read functions.