docs(docs): L1 resolved, lone surrogates refused and set aside (RUST.md 8.7, PDF-FORMAT, CHANGELOG)
This commit is contained in:
1 parent
5020954433
commit
f8a8b25614
3 files changed
+26
-7
No files matched your search
+5
-1
@@ -156,7 +156,11 @@ never lost because of its wrapper:
|
||||
contains `faunosteo-archive`, else `no_attachment`. A stamped file saved
|
||||
with object streams (before BLK-009) hides its stamp and reads as
|
||||
`no_attachment`.
|
||||
3. The report is located (`data.report` inside an envelope, `data` for a
|
||||
3. An attachment whose JSON escapes a lone UTF-16 surrogate is refused
|
||||
whole (`lone_surrogate`, "malformed text, import refused, file not
|
||||
modified"): the core cannot hold it without altering it and never
|
||||
rewrites it (L1, `docs/development/RUST.md` §8.7).
|
||||
The report is located (`data.report` inside an envelope, `data` for a
|
||||
bare attachment) and read with the report reader: v3 as is, v2 migrated
|
||||
through the sheet's `report-migration-map.json` (items the map cannot
|
||||
place are kept with their labels and flagged `unresolved: true`), any
|
||||
|
||||
@@ -136,8 +136,9 @@ under a 10 s CPU limit.
|
||||
`JSON.stringify(v, null, 2)` / `JSON.stringify(v)` byte for byte (proof
|
||||
§5.2). Every facade output goes through them.
|
||||
- `faunosteo_core::domain::js`: the JavaScript and Zod semantics the
|
||||
contracts depend on (`JSON.parse` duplicate keys, lone surrogates → U+FFFD
|
||||
(L1, §8.7), `.int()` as `JsInt`, UTF-16 lengths, the id / region / colour /
|
||||
contracts depend on (`JSON.parse` duplicate keys, a lone surrogate escape
|
||||
refused as `lone_surrogate` (L1, §8.7), `.int()` as `JsInt`, UTF-16
|
||||
lengths, the id / region / colour /
|
||||
sha256 / base64 / uuid / URL patterns, optional fields absent and never
|
||||
`null`, nullable fields required). Fields are declared in the Zod schema
|
||||
order (D-R11). `cargo test -p faunosteo-core --features ts` writes the
|
||||
@@ -595,9 +596,22 @@ application itself builds.
|
||||
|
||||
### 8.7 Behaviour differences (declared)
|
||||
|
||||
1. **L1**: a lone UTF-16 surrogate escape in a draft or an attachment reads
|
||||
as U+FFFD instead of being kept (TypeScript kept it, Rust strings cannot
|
||||
hold it). Owner confirmation requested.
|
||||
1. **L1** (owner decision 2026-10-14, BDR-051): a JSON text that escapes a
|
||||
lone UTF-16 surrogate is refused whole with the closed kind
|
||||
`lone_surrogate`, never altered (TypeScript kept the surrogate; a Rust
|
||||
string cannot hold it, and the U+FFFD replacement delivered first was
|
||||
refused). serde_json rejects the escape like any other error and
|
||||
`js::parse_json` classifies the failure with a strict escape scan, run on
|
||||
failures only. A draft goes to `osteo:quarantine:draft` verbatim with the
|
||||
existing quarantine notice; an archive kept beside a draft goes to
|
||||
`osteo:quarantine:archive`; an import is refused with
|
||||
`home.import.error_lone_surrogate` and the file is not modified; an
|
||||
editor action on a report holding one (only a pasted malformed text can
|
||||
bring it) is refused with `core.action_failed` and the report is left as
|
||||
it was; the publish gate reads it as `invalid_shape`. Keeping such a
|
||||
string byte for byte would need a JSON reader of our own and a lossless
|
||||
string type across the contracts (rejected for R2, the refusal leaves
|
||||
that door open: nothing is lost).
|
||||
2. Drafts and the attachment's report are written in contract order instead
|
||||
of insertion order (D-R11); values unchanged, the N-1 reader parses them.
|
||||
3. An unreadable draft or archive is set aside under `osteo:quarantine:*`
|
||||
|
||||
Reference in new issue
Block a user