fix(context-loader): write the prepared document verbatim on stdout

The two output routes disagreed by one byte: `-o` wrote the document as
serialized, while stdout appended a newline. A consumer that hashes what it
reads to detect drift would get different answers depending on which route it
used, which is the opposite of what a single-producer wire format is for.
This commit is contained in:
Jax Liu
2026-09-07 16:24:14 +08:00
parent 8009031ded
commit ced09d369c
+3 -1
View File
@@ -52,7 +52,9 @@ fn main() -> ExitCode {
return ExitCode::from(1);
}
}
None => println!("{document}"),
// `print!`, not `println!`: the `-o` path writes the document verbatim, and a consumer
// that hashes what it reads would see the two routes disagree by one byte.
None => print!("{document}"),
}
ExitCode::SUCCESS
}