public static readPrefix(filename as String, maxBytes as Int) as String throws IOException:
Reads at most the first maxBytes bytes from a text file.
This helper is intended for bounded previews and tooling. It avoids loading large files entirely before truncation.
Prefix text, trimmed to a valid UTF-8 boundary when possible.