fix(domain): refuse lone UTF-16 surrogates instead of replacing them (L1)

serde_json already refuses a lone surrogate escape; the U+FFFD pre-pass
is gone and parse_json classifies the refusal (strict escape scan, on
failure only) so callers name it: closed kind lone_surrogate from
operation inputs, sheet.check, draft.restore and archive.import.
Oracles untouched: the two L1 cases and the Zod verdict now assert that
TypeScript kept the surrogate and Rust refuses the text.
This commit is contained in:
bchanot committed 2026-10-14 21:49:28 +02:00
1 parent 36316cf67f
commit 20d03cf7fd
9 files changed
+275 -75

No files matched your search

+1 -2
View File
@@ -81,8 +81,7 @@ pub fn draft_map() -> ReportMigrationMap {
/// The horse slice of `packages/domain/tests/fixtures/horse-slice.ts`, as Zod parsed it (the
/// characterisation oracle carries it, written by the TypeScript generator).
pub fn horse_slice() -> Value {
json_file("crates/core/tests/oracles/characterisation.json")["sheets"]["slice"]["document"]
.clone()
super::common::oracle_file("characterisation.json").1["sheets"]["slice"]["document"].clone()
}
pub fn snake_ref(sheet_id: &str, version_id: Option<&str>, sha: &str) -> Value {